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

using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>;
using ll = long long int;
using vll = vector<ll>; using vvll = vector<vll>; using vvvll = vector<vvll>;
using vd = vector<double>; using vvd = vector<vd>; using vvvd = vector<vvd>;
using P = pair<int, int>;
using Pll = pair<ll, ll>;
using cdouble = complex<double>;

const double eps = 1e-9;
const double INFD = numeric_limits<double>::infinity();
const double PI = 3.14159265358979323846;
#define Loop(i, n) for(int i = 0; i < (int)(n); i++)
#define Loop1(i, n) for(int i = 1; i <= (int)(n); i++)
#define Loopr(i, n) for(int i = (int)(n) - 1; i >= 0; i--)
#define Loopr1(i, n) for(int i = (int)(n); i >= 1; i--)
#define Foreach(buf, container) for(auto buf : container)
#define Loopdiag(i, j, h, w, sum) for(int i = ((sum) >= (h) ? (h) - 1 : (sum)), j = (sum) - i; i >= 0 && j < (w); i--, j++)
#define Loopdiagr(i, j, h, w, sum) for(int j = ((sum) >= (w) ? (w) - 1 : (sum)), i = (sum) - j; j >= 0 && i < (h); j--, i++)
#define Loopdiagsym(i, j, h, w, gap) for (int i = ((gap) >= 0 ? (gap) : 0), j = i - (gap); i < (h) && j < (w); i++, j++)
#define Loopdiagsymr(i, j, h, w, gap) for (int i = ((gap) > (h) - (w) - 1 ? (h) - 1 : (w) - 1 + (gap)), j = i - (gap); i >= 0 && j >= 0; i--, j--)
#define Loopitr(itr, container) for(auto itr = container.begin(); itr != container.end(); itr++)
#define printv(vector) Loop(ex_i, vector.size()) { cout << vector[ex_i] << " "; } cout << endl;
#define printmx(matrix) Loop(ex_i, matrix.size()) { Loop(ex_j, matrix[ex_i].size()) { cout << matrix[ex_i][ex_j] << " "; } cout << endl; }
#define quickio() ios::sync_with_stdio(false); cin.tie(0);
#define bitmanip(m,val) static_cast<bitset<(int)m>>(val)
#define Comp(type_t) bool operator<(const type_t &another) const
#define fst first
#define snd second
bool nearlyeq(double x, double y) { return abs(x - y) < eps; }
bool inrange(int x, int t) { return x >= 0 && x < t; }
bool inrange(vi xs, int t) { Foreach(x, xs) if (!(x >= 0 && x < t)) return false; return true; }
ll rndf(double x) { return (ll)(x + (x >= 0 ? 0.5 : -0.5)); }
ll floorsqrt(ll x) { ll m = (ll)sqrt((double)x); return m + (m * m <= x ? 0 : -1); }
ll ceilsqrt(ll x) { ll m = (ll)sqrt((double)x); return m + (x <= m * m ? 0 : 1); }
ll rnddiv(ll a, ll b) { return (a / b + (a % b * 2 >= b ? 1 : 0)); }
ll ceildiv(ll a, ll b) { return (a / b + (a % b == 0 ? 0 : 1)); }
ll gcd(ll m, ll n) { if (n == 0) return m; else return gcd(n, m % n); }
ll lcm(ll m, ll n) { return m * n / gcd(m, n); }

/*******************************************************/

int main() {
	int n; cin >> n;
	ll s, t; cin >> s >> t;
	int ans = 0;
	Loop(i, n) {
		ll x; cin >> x;
		if (s <= x && x < t);
		else ans++;
	}
	cout << ans << endl;
}

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

#define ONLINE_JUDGE
#define pb(a) push_back(a)
#define ALL(a) a.begin(), a.end()
#define FOR(x,to) for(x=0;x<(to);x++)

using ll = long long;

const int E5 = 1e5;

//////////// Solution /////////////////////////////////

void solve() {
	ll A,B,C,X,Y;
	cin >> A >> B >> C >> X >> Y;
	ll ans = 0;
	if (A+B >= 2*C) {
		ans = min(X,Y) * 2*C;
	} else {
		ans = (A+B) * min(X,Y);
	}

	if (X <= Y) {
		if (B >= 2*C) {
			ans += (Y-X) * 2*C;
		} else {
			ans += (Y-X) * B;
		}
	} else {
		if (A >= 2*C) {
			ans += (X-Y) * 2*C;
		} else {
			ans += (X-Y) * A;
		}
	}

	cout << ans << '\n';
}	

/////////// End Solution ///////////////////////////////////////

//////// Initialization ////////////////////////////////////

int main() {

	#ifndef ONLINE_JUDGE
	FILE *FIN = freopen("/home/danil/prog/input.txt", "r", stdin);
	clock_t time_start = clock();
	#endif

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

	solve();

	#ifndef ONLINE_JUDGE
	fclose(FIN);
	cerr << "\x1b[031m\n-----------------\nTime=" << (ll)((double)(clock()-time_start) / CLOCKS_PER_SEC * 1000) << "ms\n\x1b[0m";
	#endif

	return 0;
}

//////// End Initialization ///////////////////////////////////////

Measured memory_bytes: 256
n = int(input())
s = [input() for _ in range(n)]


ans = ["AC","WA", "TLE", "RE"]
cnt =[0] * 4

for i in range(n):
  cnt[ans.index(s[i])] += 1

for i in range(4):
  print("{} x {}".format(ans[i],cnt[i]))



Measured memory_bytes: 16296
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <bits/stdc++.h>
#include<queue>
#include <numeric>
#include<stdio.h>
using namespace std;
 
//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
 
//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}
 template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
 
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define fore(i,a) for(auto &i:a)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
 
//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

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

LL lcm(LL a, LL b){
    LL g = gcd(a,b);
    return a/g *b;
}

int main(){
    int A,B;
    cin >> A >> B;
    int num=0;
    if(A>=13){
        num=B;
    }
    else if(A>=6){
        num=B/2;
    }
    else{
        num=0;
    }
    cout << num;
    }

Measured memory_bytes: 256
n = int(input())
s = input()

r = 0
g = 0
b = 0
for i in range(n):
    if s[i] == "R":
        r += 1
    elif s[i] == "G":
        g += 1
    else:
        b += 1

ans = r * g * b

for i in range(1, (n-1)//2+1):
    for j in range(0, n-i*2):
        x = j
        y = j + i
        z = j + i * 2
        if s[x]!=s[y] and s[y]!=s[z] and s[z]!=s[x]:
            ans -= 1

print(ans)

Measured memory_bytes: 9208
# E - Coprime
from math import gcd

N = int(input())
A = list(map(int,input().split()))
MAX = 10**6
p = [0]*(MAX+1)

for i in range(2,MAX+1):
    if p[i]>0:
        continue
    tmp = i
    while tmp<=MAX:
        p[tmp] = i
        tmp += i

pairwise = True
g = -1
q = [N]*(MAX+1)

for i in range(N):
    a = A[i]
    g = a if g<0 else gcd(g,a)
    while pairwise and a>1:
        pairwise = False if q[p[a]]<i else True
        q[p[a]] = i
        a //= p[a]

if pairwise:
    print('pairwise coprime')
elif g==1:
    print('setwise coprime')
else:
    print('not coprime')

Measured memory_bytes: 189088
#include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for(int i = 0; (i) < (n); (i)++)
#define FOR(i, m, n) for(int i = (m); (i) < (n); (i)++)
#define All(v) (v).begin(), (v).end()
#define MP make_pair
#define pb push_back
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1 << 30;
const ll LINF = 1LL << 61;
const int MOD = 1e9 + 7;

int main() {
    int a, b;
    cin >> a >> b;
    cout << (a - 1) + (b >= a) << endl;
    return 0;
}

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

using namespace std;

int n, m;
int a[1000];
int b[1000];
const int md = 1000000007;
int kek[1000010];
int cnt[1000010];
vector < int > row;
vector < int > col;
int in_row[1000010];
int in_col[1000010];

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin >> n >> m;
    for(int i = 0; i < n; i++){
        cin >> a[i];
        cnt[a[i]]++;
        in_row[a[i]]++;
        if(in_row[a[i]] > 1){
            cout << 0;
            return 0;
        }
        row.push_back(a[i]);
    }
    for(int i = 0; i < m; i++){
        cin >> b[i];
        cnt[b[i]]++;
        in_col[b[i]]++;
        if(in_col[b[i]] > 1){
            cout << 0;
            return 0;
        }
        col.push_back(b[i]);
    }
    sort(col.begin(), col.end());
    sort(row.begin(), row.end());
    int an = 1;
    for(int i = n * m - 1; i >= 1; i--){
        kek[i] += kek[i+1];
    }
    for(int i = n * m; i >= 1; i--){
        if(cnt[i] > 2){
            an = 0;
        }
        int pos;
        if(cnt[i] == 2){
            pos = 1;
        }
        else if(cnt[i] == 0){
            auto it = (int)(lower_bound(col.begin(), col.end(), i) - col.begin());
            int x = m - (it);
            it = (int)(lower_bound(row.begin(), row.end(), i) - row.begin());
            int y = n - (it);
            pos = x * y - (n*m - i);
        }
        else{
            if(in_row[i]){
                auto it = (int)(lower_bound(col.begin(), col.end(), i) - col.begin());
                pos = m - (it);
            }
            else{
                auto it = (int)(upper_bound(row.begin(), row.end(), i) - row.begin());
                pos = n - (it);
            }
        }
        an = (an * 1ll * pos) % md;
        //cout << i << ' ' << kek[i] << ' ' << pos << endl;
    }
    cout << an;
    return 0;
}


Measured memory_bytes: 9728
#include<bits/stdc++.h>
#include<boost/multiprecision/cpp_int.hpp>
using namespace std;
using namespace boost::multiprecision;
#define BEGIN ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define END return EXIT_SUCCESS
#define rep(I,N) for(auto I=0;I<(N);++I)
#define up(I,A,B) for(auto I=(A);I<=(B);++I)
#define dw(I,A,B) for(auto I=(A);I>=(B);--I)
#define all(C) (C).begin(),(C).end()
#define rall(C) (C).rbegin(),(C).rend()
#define ft first
#define sd second
#define mp make_pair
#define mt make_tuple
#define pf push_front
#define pb push_back
#define pt pop_front
#define pk pop_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define rs resize
template<class T> T count_bit(T p){
  if(typeid(p)==typeid(int))return __builtin_popcount(p);
  else if(typeid(p)==typeid(long))return __builtin_popcountl(p);
  else return __builtin_popcountll(p);
}
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;}
template<class T>inline void                                      in(T &p){cin>>p;}
template<class T1,class T2>inline void                            in(T1 &p1,T2 &p2){cin>>p1>>p2;}
template<class T1,class T2,class T3>inline void                   in(T1 &p1,T2 &p2,T3 &p3){cin>>p1>>p2>>p3;}
template<class T1,class T2,class T3,class T4>inline void          in(T1 &p1,T2 &p2,T3 &p3,T4 &p4){cin>>p1>>p2>>p3>>p4;}
template<class T1,class T2,class T3,class T4,class T5>inline void in(T1 &p1,T2 &p2,T3 &p3,T4 &p4,T5 &p5){cin>>p1>>p2>>p3>>p4>>p5;}
template<class T>inline void                                      ins(T &p){for_each(all(p),in<decltype(p[0])>);}
template<class T>inline void                             out(T p){cout<<p<<endl;}
template<class T1,class T2>inline void                   out(T1 p1,T2 p2){cout<<p1<<" "<<p2<<endl;}
template<class T1,class T2,class T3>inline void          out(T1 p1,T2 p2,T3 p3){cout<<p1<<" "<<p2<<" "<<p3<<endl;}
template<class T1,class T2,class T3,class T4>inline void out(T1 p1,T2 p2,T3 p3,T4 p4){cout<<p1<<" "<<p2<<" "<<p3<<" "<<p4<<endl;}
inline                                              void out(double p){printf("%.10f\n",p);}
template<class T>inline                             void outs(T p){for_each(all(p),out<decltype(p[0])>);}
template<class T>inline T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>inline T lcm(T a,T b){return a*b/gcd(a,b);}

inline void solve(void){
  long A,B,C,D;
  in(A,B,C,D);
  long l=lcm(C,D);
  long cd=B/l-(A-1)/l;
  long c=B/C-(A-1)/C;
  long d=B/D-(A-1)/D;
  out(B-A+1-c-d+cd);
}
int main(int argc,char**argv){
  BEGIN;
  solve();
  END;
}


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

using namespace std;

int main(){
  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  cout.setf(ios::fixed); cout.precision(11);

  string a, b;
  cin >> a >> b;
  int n = a.size(), m = b.size(); 
  vector<vector<int>> dp(n + 1, vector<int>(m + 1, 0));
  
  for(int i = 1; i <= n; i++){
    for(int j = 1; j <= m; j++){
      if(a[i-1] == b[j-1]) dp[i][j] = dp[i-1][j-1] + 1;
      else dp[i][j] = max(dp[i-1][j], dp[i][j-1]);
    }
  }
  int i = n, j = m;
  string ans = "";
  while(i > 0 && j > 0){
    if(dp[i][j] == dp[i-1][j]) i--;
    else if(dp[i][j] == dp[i][j-1]) j--;
    else if(dp[i][j] == dp[i-1][j-1] + 1){
      ans += a[i-1];
      i--, j--;
    }
  }
  
  reverse(ans.begin(), ans.end()); 
  cout << ans << '\n';
  
  return 0;
}


Measured memory_bytes: 35584
#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 int long long
#define vec(a,n) vector<int> (a)((n));
#define Vec(a,n) vector<string> (a)((n));
#define twovec(a,n,m) vector<vector<int>> a(n,vector<int>(m,0));
#define Twovec(a,n,m) vector<vector<double>> a(n,vector<double>(m,0));
#define P pair<int,int>
#define All(a) (a).begin(),(a).end()
#define Sort(a) sort(All(a));
#define Reverse(a) sort((a).rbegin(),(a).rend());
#define PQ(n) priority_queue<P,vector<P>,greater<P>> (n)
#define pq(n) priority_queue<int> (n)
#define print(a) cout << (a) << endl;
#define printD(a) cout << setprecision(10) << ans << endl;
using namespace std;
int max_int = 1000000007;
void Debug(auto a);
int nibul(auto a,auto b);
int nibuu(auto a,auto b);
void input(vector<int>& a,int n);

int n,m;


struct UnionFind {
    vector<int> par; // 親ノード
    vector<int> rank; // ランク

    UnionFind(int n = 1) {
        init(n);
    }

    void init(int n = 1) {
        par.resize(n); rank.resize(n);
        for (int i = 0; i < n; ++i) par[i] = i, rank[i] = 0;
    }

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

    bool issame(int x, int y) {
        return root(x) == root(y);
    }

    bool merge(int x, int y) {
        x = root(x); y = root(y);
        if (x == y) return false;
        if (rank[x] < rank[y]) swap(x, y);
        if (rank[x] == rank[y]) ++rank[x];
        par[y] = x;
        return true;
    }
};





signed main(){
    cin >> n >> m;
    vector<tuple<int,int,int>> a(m);
    twovec(b,2,m);
    REP(i,m){
        int s,t;
        cin >> s >> t;
        a[i] = make_tuple(s,t,i);
    }
    Sort(a);
    int count = 1;
    REP(i,m){
        if(i==0){
            b[0][get<2>(a[i])] = get<0>(a[i]);
            b[1][get<2>(a[i])] = count;
        }
        else{
            if(get<0>(a[i]) != get<0>(a[i-1])){
                count = 1;
            }
            else{
                count++;
            }
            b[0][get<2>(a[i])] = get<0>(a[i]);
            b[1][get<2>(a[i])] = count;
        }
    }
    REP(i,m){
        cout << setw(6) << setfill('0') << b[0][i];
        cout << setw(6) << setfill('0') << b[1][i] << endl;
    }


    return 0;
}

void Debug(auto a){
    cout << "{ ";
    for(auto b: a){
        cout << b << " ";
    }
    cout << "}" << endl;
}
int nibul(auto a,auto b){
    int x = lower_bound(All(a),b) - a.begin();
    //key以上の初めてのitr
    return x;
}
int nibuu(auto a,auto b){
    int x = upper_bound(All(a),b) - a.begin();
    //key以下の最後のitr
    return x-1;
}

void input(vector<int>& a,int n){
    REP(i,n){
        cin >> a[i];
    }
}


Measured memory_bytes: 5488
#import matplotlib.pyplot as plt
#import matplotlib.patches as patches
from itertools import combinations
printed_later = []
while True:
    n = int(input())
    if(n == 0):
        break
    dots = []
    for _ in range(n):
        x, y = map(float, input().split())
        dots.append(complex(x, y))
    inside_max = 1
    for p, q in combinations(dots, 2):
        abs_p_q = abs(p - q)
        if abs_p_q > 2:
            continue
        for pl_mn_j in [1j, -1j]:
            center = (p + q) / 2 + (p - q) * pl_mn_j / abs_p_q * (1 - (abs_p_q / 2) ** 2) ** 0.5
            dots_inside_num = 0
            for dot in dots:
                #plt.gca().add_patch(patches.Circle(xy=(center.real, center.imag), radius=1, fill=False, ec='r'))  # debug
                if abs(dot - center) < 1 or dot == p or dot == q:
                    dots_inside_num += 1
            if dots_inside_num > inside_max:
                inside_max = dots_inside_num
    printed_later.append(inside_max)
    #plt.scatter([z.real for z in dots], [z.imag for z in dots])
    #plt.show()
for line in printed_later:
    print(line)


Measured memory_bytes: 5780
#[allow(dead_code)]
fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

#[allow(dead_code)]
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}

#[allow(dead_code)]
fn yn(result: bool) {
    if result {
        println!("Yes");
    } else {
        println!("No");
    }
}

fn main() {
    let _n = read::<usize>();
    let v = read_vec::<i64>();
    let min = v.iter().min().unwrap();
    let max = v.iter().max().unwrap();
    let sum = v.iter().fold(0, |sum, x| sum + x);
    println!("{} {} {}", min, max, sum);
}



Measured memory_bytes: 5040
#![allow(unused_imports)]
#![allow(non_snake_case)]
use std::cmp::*;
use std::collections::*;
use std::io::Write;

#[allow(unused_macros)]
macro_rules! debug {
    ($($e:expr),*) => {
        #[cfg(debug_assertions)]
        $({
            let (e, mut err) = (stringify!($e), std::io::stderr());
            writeln!(err, "{} = {:?}", e, $e).unwrap()
        })*
    };
}

fn main() {
    let v = read_vec::<usize>();
    for i in 0..5 {
        if v[i] == 0 {
            println!("{}", i + 1);
        }
    }
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}


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

typedef long long                ll;
typedef long long  int           lli;
typedef long double              ld;
typedef unsigned long long       ull;
typedef pair <int,int>           pii;
typedef pair <ll,ll>             pll;
typedef vector <int>             vi;
typedef vector <ll>              vll;
typedef vector <vector <int> >   vvi;

const int N             =(int)2e5 + 5;
const int maxN          =(int)1e6 + 6;
const ll  Mod           =(ll)1e9 + 7;
const int inf           =(int)2e9;
const ll  Inf           =(ll)1e18;

long long int qq=0,aa=1,m,nn,a2=0,i,j;
vector<long long int>vvv[maxN];
vector<long long int>vv;

void fun()
{
    long long int a1=0;
    for(i=1; i<=nn; i++)
    {
        set<long long int>st(vvv[i].begin(),vvv[i].end());
        vector<long long int>v(st.begin(),st.end());
        for(j=0; j<v.size(); j++)
        {
            //cout<<v[j]<<" ";
            if(vv[i-1]>vv[v[j]-1])
            {
                a1++;
            }
            else
            {

            }
        }

            if(a1==v.size())
            {
                a2++;
                //cout<<i<<" ";
            }



        a1=0;
    }
    cout<<a2<<endl;
}
int main()
{
    long long int x,y;
    cin>>nn>>m;
    for(i=0; i<nn; i++)
    {
        cin>>x;
        vv.push_back(x);
    }
    for(i=0; i<m; i++)
    {
        cin>>x>>y;
        vvv[x].push_back(y);
        vvv[y].push_back(x);
    }

    fun();
}


Measured memory_bytes: 33364
#include<bits/stdc++.h>
#include<string>
#define LL long long
#define INF 0x3f3f3f3f
#define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
const int N=2e5+100;
using namespace std;
LL a[N];
LL tmp[N],tot;
LL maxs[N];
int main()
{
	int n,m;
	while(cin>>n>>m)
	{
		tot=0;
		for(int i=1;i<=n;i++)cin>>a[i];
		for(int i=n;i>=1;i--)maxs[i]=max(maxs[i+1],a[i]);
		for(int i=1;i<n;i++)
			tmp[++tot]=maxs[i+1]-a[i];
		sort(tmp+1,tmp+1+tot);
		reverse(tmp+1,tmp+1+tot);
		LL ans=0;
		for(int i=1;i<=tot;i++)
			if(tmp[i]==tmp[1])ans++;
		cout<<ans<<endl;
	}
	return 0;
} 

Measured memory_bytes: 3584
import java.io.*;
public class Main{
    public static void main(String[] args) throws IOException{
        Reader r = new Reader();        
        int[] XY = r.ii();
        print(XY[0]+XY[1]/2);
    }
    static void print(Object o){
        System.out.println(o.toString());
    }
    static void print(boolean b, String s1, String s2){
        System.out.println(b ? s1 : s2);
    }
    static int max(int[] ii){
        int max = ii[0];
        for(int i : ii) if(max < i) max = i;
        return max;
    }
    static int min(int[] ii){
        int min = ii[0];
        for(int i : ii) if(i < min) min = i;
        return min;
    }
    static long max(long[] ll){
        long max = ll[0];
        for(long l : ll) if(max < l) max = l;     
        return max;
    }
    static long min(long[] ll){
        long min = ll[0];
        for(long l : ll) if(l < min) min = l;
        return min;
    }
    static double max(double[] dd){
        double max = dd[0];
        for(double d : dd) if(max < d) max = d;
        return max;
    }
    static double min(double[] dd){
        double min = dd[0];
        for(double d : dd) if(d < min) min = d;
        return min;
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return readLine().split(" ");
        }
        int i() throws IOException{
            return Integer.parseInt(readLine());
        }
        int[] ii() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            int[] ii = new int[size];
            for(int j = 0; j < size; j++) ii[j] = Integer.parseInt(ss[j]);
            return ii;
        }
        int[] ii(int N) throws IOException{
            int[] ii = new int[N];
            for(int j = 0; j < N; j++) ii[j] = i();
            return ii;
        }
        long l() throws IOException{
            return Long.parseLong(readLine());
        }
        long[] ll() throws IOException{
            String[] ss = ss();
            int size = ss.length;
            long[] ll = new long[size];
            for(int j = 0; j < size; j++) ll[j] = Long.parseLong(ss[j]);            
            return ll;
        }
        long[] ll(int N) throws IOException{
            long[] ll = new long[N];
            for(int j = 0; j < N; j++) ll[j] = i();            
            return ll;
        }
    }
}

Measured memory_bytes: 21460
#include "bits/stdc++.h"
#define rep(i,b) for(ll i=0;i<b;i++)
#define ll long long
using namespace std;
/*--Input//////////////////////////////////////////////////*/
inline void IN(void){return;}
template <typename First, typename... Rest>
void IN(First& first, Rest&... rest){cin >> first;IN(rest...);return;}
#define SS(T, ...)      T __VA_ARGS__; IN(__VA_ARGS__);
#define SV(type,c,n) vector<type> c(n);for(auto& i:c)cin >> i;
/*--Output/////////////////////////////////////////////////*/
inline int p(void){cout << endl; return 0;}
template<class Head> int p(Head&& head){cout << head;p();return 0;} template<class Head,class... Tail> int p(Head&& head,Tail&&... tail){cout<<head<<" ";p(forward<Tail>(tail)...);return 0;}
struct ProconInit {
    static constexpr bool AUTOFLUSH = false;
    ProconInit() {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        cout << fixed << setprecision(15);
        if(AUTOFLUSH)
            cout << unitbuf;
    }
} PROCON_INIT;

#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define vl vector<ll>
#define debug(x) cerr<<#x<<" "<<x<<'\n';
#define all(x) (x).begin(),(x).end()
#define bit(n) (1LL<<(n))
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
bool cmp(pair<ll,ll> a, pair<ll,ll> b) { return a.first+a.second > b.first+b.second; }

signed main() {
  SS(string,s,S);
  bool flag=true;
  rep(i,s.size()){
    if(s[i]!=S[i])flag=false;
  }
  Yes(flag);
}

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

if x <= 599:
    ans = 8
elif x <= 799:
    ans = 7
elif x <= 999:
    ans = 6
elif x <= 1199:
    ans = 5
elif x <= 1399:
    ans = 4
elif x <= 1599:
    ans = 3
elif x <= 1799:
    ans = 2
else:
    ans = 1

print(ans)

Measured memory_bytes: 61580
def divide_2(n):
    count = 0
    while n % 2 == 0:
        n /= 2
        count += 1
    return count


n = int(input())
a = list(map(int, input().split()))

control_count = 0
for i in range(n):
    control_count += divide_2(a[i])
print(control_count)


Measured memory_bytes: 10100
from itertools import zip_longest

def main():
    n, *a = map(int, open(0).read().split())
    a = reversed(sorted(a))
    res = sum(a - b for a, b in zip_longest(*[iter(a)]*2, fillvalue=0))
    print(res)


if __name__ == "__main__":
    main()


Measured memory_bytes: 3060
import java.io.PrintWriter;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String[] S = new String[s.length()];
        int a = -1;
        int length = 0;
        S = s.split("");

        for (int i = 0; i < s.length(); i++) {
            if (S[i].equals("A") && a == -1) {
                a = i;
            }

            if (S[i].equals("Z") && a != -1) {
                length = i - a + 1;
            }
        }

        PrintWriter out = new PrintWriter(System.out);
        out.println(length);

        sc.close();
        out.flush();
    }
}

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

typedef long long ll;
#define all(x) (x).begin(),(x).end()
const int mod=1000000007,MAX=100005;

int par[MAX];
set<int> cntx[MAX],cnty[MAX];
ll cnt[MAX];

struct point{
    int x;
    int y;
    int num;
};

void init(int n){
    for(int i=0;i<n;i++){
        par[i]=i;
        cnt[i]=1;
    }
}

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

void unite(int a,int b){
    if(root(a)!=root(b)) {
        cnt[root(a)]+=cnt[root(b)];
        par[root(b)]=root(a);
    }
}

bool check(pair<int,int> a,pair<int,int> b){
    return (a.first==b.first||a.second==b.second);
}
bool xsort(point a,point b){
    if(a.x==b.x) return a.y<b.y;
    return a.x<b.x;
}

bool ysort(point a,point b){
    if(a.y==b.y) return a.x<b.x;
    return a.y<b.y;
}

int main(){
    
    int N;cin>>N;
    vector<point> S(N);
    
    init(N);
    
    for(int i=0;i<N;i++){
        cin>>S[i].x>>S[i].y;
        S[i].num=i;
    }
    
    sort(all(S),xsort);
    
    for(int i=1;i<N;i++){
        if(S[i].x==S[i-1].x){
            unite(S[i-1].num,S[i].num);
        }
    }
    
    sort(all(S),ysort);
    
    
    for(int i=1;i<N;i++){
        if(S[i].y==S[i-1].y){
            unite(S[i].num,S[i-1].num);
        }
    }
    
    for(int i=0;i<N;i++){
        cntx[root(S[i].num)].insert(S[i].x);
        cnty[root(S[i].num)].insert(S[i].y);
    }
    ll ans=0;
    for(int i=0;i<N;i++){
        if(root(i)==i){
            if(cntx[i].size()>=2&&cnty[i].size()>=2){
                ans+=(cntx[i].size()*cnty[i].size()-cnt[i]);
            }
        }
    }
    cout<<ans<<endl;
    
   /*for(int i=0;i<N;i++){
        cout<<root(i)<<" "<<cnt[i]<<" "<<cntx[i].size()<<" "<<cnty[i].size()<<endl;
    }*/
    
}


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

using namespace std;
using ll = long long;

int main() {
	int N;
	cin >> N;
	vector<ll> a(N);
	vector<ll> b(N);
	for (int i = 0; i < N; ++i) { cin >> a[i]; }
	for (int i = 0; i < N; ++i) { cin >> b[i]; }

	ll wl = 0;
	for (int i = 0; i < N; ++i) {
		if (b[i] > a[i]) {
			wl += ((b[i] - a[i]) / 2);
		} else {
			wl -= (a[i] - b[i]);
		}
	}

	if (wl >= 0) { cout << "Yes" << endl; }
	else { cout << "No" << endl; }

	return 0;
}


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

#define MP make_pair
#define PB push_back
#define ALL(x)      (x).begin(),(x).end()
#define REP(i,n)    for(int i=0;i<(n);i++)
#define REP1(i,n)   for(int i=1;i<(n);i++)
#define REP2(i,d,n) for(int i=(d);i<(n);i++)
#define RREP(i,n)   for(int i=(n);i>=0;i--)
#define CLR(a)      memset((a),0,sizeof(a))
#define MCLR(a)     memset((a),-1,sizeof(a))
#define RANGE(x,y,maxX,maxY) (0 <= (x) && 0 <= (y) && (x) < (maxX) && (y) < (maxY))
 
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI > VVI;
typedef vector<string> VS;
typedef vector<LL> VLL;
typedef pair<int,int> PII;
 
const int INF = 0x3f3f3f3f;
const LL INFL = 0x3f3f3f3f3f3f3f3fLL;
const double EPS = 1e-9;
 
const int DX[]={1,0,-1,0},DY[]={0,-1,0,1};


void solve(long long A, long long B, long long C){
    if(A > B) {
        LL tmp =B;
        B = A;
        A = tmp;
    }
    if(B > C){
        LL tmp = C;
        C = B;
        B = tmp;
    }

    cout << C*10 + B + A << endl;
}

int main(){
    long long A;
    scanf("%lld",&A);
    long long B;
    scanf("%lld",&B);
    long long C;
    scanf("%lld",&C);
    solve(A, B, C);
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main () {
  int Aa, Ab, Ac;
  cin >> Aa >> Ab >> Ac;
  max(max(Aa,Ab),Ac);
  cout << max(max(Aa,Ab),Ac) - min(min(Aa,Ab),Ac)<< endl;
  return 0;
}

Measured memory_bytes: 256
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;

/**
 * Built using CHelper plug-in Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)), true);
		TaskB solver = new TaskB();
		solver.solve(1, in, out);
		out.flush();
		out.close();
	}
}

class Pair {
	long first;
	long second;
	long third;

	Pair(long first, long second, long third) {
		this.first = first;
		this.second = second;
		this.third = third;
	}
}

class TaskB {

	public void solve(int testNumber, InputReader in, PrintWriter pw) {
		int N = in.nextInt();
		int K = in.nextInt();
		int h[] = new int[N];
		for (int i = 0; i < N; i++) {
			h[i] = in.nextInt();
		}
		int dp[] = new int[N];
		Arrays.fill(dp, Integer.MAX_VALUE);
		dp[0] = 0;
		for (int i = 0; i < N; i++) {
			for (int j = i + 1; j <= i + K; j++) {
				if (j < N) {
					dp[j] = Math.min(dp[j], dp[i] + Math.abs(h[i] - h[j]));
				}
			}
		}
		pw.println(dp[N - 1]);

	}

	int __gcd(int a, int b) {
		if (b == 0)
			return a;
		return __gcd(b, a % b);

	}

	public int getInt(int num) {
		int ret = -1;
		switch (num) {
		case 0:
			ret = 6;
			break;
		case 1:
			ret = 2;
			break;
		case 2:
			ret = 5;
			break;
		case 3:
			ret = 5;
			break;
		case 4:
			ret = 4;
			break;
		case 5:
			ret = 5;
			break;
		case 6:
			ret = 6;
			break;
		case 7:
			ret = 3;
			break;
		case 8:
			ret = 7;
			break;
		case 9:
			ret = 6;
			break;
		}
		return ret;
	}

	public int isPow(long num) {
		int count = 0;
		while (num > 0) {
			num /= 2;
			count++;
		}
		return count;
	}
}

class InputReader {
	BufferedReader br;
	StringTokenizer st;

	public InputReader(InputStream in) {
		br = new BufferedReader(new InputStreamReader(in));
		st = null;
	}

	public String next() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return st.nextToken();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}


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

int main() {
  int A, B, x;
  
  cin >> A >> B;
  x = A*B;
  
  for(int i = 1; i<4; i++) {
    if(x % 2 == 0){
    }else{
      cout << "Yes" << endl;
      exit(0);
    }
  }
  cout << "No" << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;
 
#define fi first
#define se second
#define mp make_pair
#define pb push_back
 
typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef unsigned long long ull;
typedef long double ld; 
typedef tree<ii, null_type, less<ii>, rb_tree_tag, tree_order_statistics_node_update> pbds;

vector<int> fact;
vector<int> ifact;
vector<int> inv;
vector<int> pow2;
const int MOD = (1e9 + 7);
int add(int a, int b)
{
	a+=b;
	while(a>=MOD) a-=MOD;
	return a;
}
int mult(int a, int b)
{
	return (a*1LL*b)%MOD;
}
int modpow(int a, int b)
{
	int r=1;
	while(b)
	{
		if(b&1) r=mult(r,a);
		a=mult(a,a);
		b>>=1;
	}
	return r;
}
int choose(int a, int b)
{
	if(a<b) return 0;
	if(b==0) return 1;
	if(a==b) return 1;
	return mult(fact[a],mult(ifact[b],ifact[a-b]));
}
int inverse(int a)
{
	return modpow(a,MOD-2);
}
void init(int _n)
{
	fact.clear(); ifact.clear(); inv.clear(); pow2.clear();
	fact.resize(_n+1);
	ifact.resize(_n+1);
	inv.resize(_n+1);
	pow2.resize(_n+1);
	pow2[0]=1;
	ifact[0]=1;
	fact[0]=1;
	for(int i=1;i<=_n;i++)
	{
		pow2[i]=add(pow2[i-1],pow2[i-1]);
		fact[i]=mult(fact[i-1],i);
		//ifact[i]=mult(ifact[i-1],inv[i]);
	}
	ifact[_n] = inverse(fact[_n]);
	for(int i=_n-1;i>=1;i--)
	{
		ifact[i] = mult(ifact[i + 1], i + 1);
	}
	for(int i=1;i<=_n;i++)
	{
		inv[i] = mult(fact[i-1],ifact[i]);
	}
}

int sub[5555];
vi adj[5555];

void prep(int u, int p=-1)
{
	sub[u]=1;
	for(int v:adj[u])
	{
		if(v==p) continue;
		prep(v,u);
		sub[u]+=sub[v];
	}
}
int n; 
int centroid(int u, int p=-1)
{
	for(int v:adj[u])
	{
		if(v==p) continue;
		if(sub[v]*2>n) return centroid(v,u);
	}
	return u;
}

int dp[5112][5112];

int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
	init(12345);
	cin>>n;
	for(int i=0;i<n-1;i++)
	{
		int u,v; cin>>u>>v; u--; v--; adj[u].pb(v); adj[v].pb(u);
	}
	prep(0);
	int c = centroid(0); vi vec;
	prep(c);
	for(int v:adj[c])
	{
		vec.pb(sub[v]);
	}
	dp[0][0]=1;
	for(int i=0;i<vec.size();i++)
	{
		for(int j=0;j<=n;j++)
		{
			if(dp[i][j]==0) continue;
			int v=dp[i][j];
			for(int k=0;k<=vec[i];k++)
			{
				dp[i+1][j+k]=add(dp[i+1][j+k],mult(choose(vec[i],k),mult(v,ifact[vec[i]-k])));
			}
		}
	}
	int ans = 0;
	int coeff = 1;
	for(int i=0;i<vec.size();i++) coeff=mult(coeff,fact[vec[i]]);
	for(int i=0;i<=n;i++)
	{
		int res=dp[int(vec.size())][i];
		res=mult(res,fact[n-i]);
		//cerr<<i<<' '<<res<<'\n';
		if(i&1) res=mult(res,MOD-1);
		ans=add(ans,res);
	}
	ans=mult(ans,coeff);
	cout<<ans<<'\n';
}


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

int main(){
	int h,w,n,cnt=0,x,y;
	cin>>h>>w>>n;
	
	x=min(h,w);
	y=max(h,w);
	while(n>=x)
	{
		n-=y;
		cnt++;
	}
	
	if(n<=0)
		cout<<cnt<<endl;
	else
		cout<<cnt+1<<endl;

	return 0;
}

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

using namespace std;

int main()
{
    string s;
    cin >> s;
    int x = s.length();
    if(x%2!=0)
    {
        cout << "No";
        return 0;
    }
    for(int i = 0; i < x; i++)
    {
        if(i%2==0)
        {
            if(s[i] == 'h')
                ;
            else
            {
                cout << "No";
                return 0;
            }
        }
        else
        {
            if(s[i] == 'i')
                ;
            else
            {
                cout << "No";
                return 0;
            }
        }
    }
    cout << "Yes";
}


Measured memory_bytes: 256
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve();
    }
    public void solve() {
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        int N = scan.nextInt();
        int M = scan.nextInt();
        int K = scan.nextInt();
        if ( K == 0 || K == N * M) {
            System.out.println("Yes");
            return;
        }
        if ( K % M == 0 || K % N == 0) {
            System.out.println("Yes");
            return;
        }

        for (int i = 1; i <= N; i++) {
            int count = M * i;
            for (int j = 1; j <= M; j++) {
                count = count - i + (N - i);
                if (count == K) {
                    System.out.println("Yes");
                    return;
                }
            }
        }
        System.out.println("No");
    }
}


Measured memory_bytes: 25172
import java.util.*;

public class Main {


	public static void main(String[] args) {
		Main main = new Main();
		main.run();
	}

	public void run() {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int a=sc.nextInt();
		int b=sc.nextInt();
		int x[] = new int[n];
		for(int i=0; i<n; i++) {
			x[i]=sc.nextInt();
		}
		long ans = 0;
		for(int i=1; i<n; i++) {
			ans += Math.min(((long)x[i]-x[i-1])*a, (long)b);
		}
		System.out.println(ans);
		sc.close();
	}
}


Measured memory_bytes: 59532
///Bismillahir Rahmanir Rahim
#include "bits/stdc++.h"

#define                           ll                          long long
#define                           int                         ll
#define                           fi                          first
#define                           si                          second
#define                           mp                          make_pair
#define                           pb                          push_back
#define                           pi                          pair<ll,ll>
#define                           clr(x)                      memset(x,0,sizeof(x));
#define                           f(i,l,r)                    for(int i=l;i<=r;i++)
#define                           rf(i,r,l)                   for(int i=r;i>=l;i--)
#define                           done(i)                     cout<<"done = "<<i<<endl;
#define                           show(x,y)                   cout<<x<<" : ";for(auto z:y)cout<<z<<" ";cout<<endl;
#define                           fast                        ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

using namespace std;

const ll inf=1e18;
const int mod=1e9+7;
const int M=2005;
map<int,vector<int> >adj;
int n,k,q;
int vis[M];
int a[M];
set<int>s[M];
int home[M];
 main()

{
    fast
    cin>>n>>k>>q;
    f(i,1,n)
    {
        cin>>a[i];
        adj[a[i]].pb(i);
    }
    int ses=inf;
    vis[n+1]=1;
    adj[0].pb(0);
    for(auto tmp:adj)
    {
        vector<int>idx=tmp.si;
        int x=tmp.fi;
        for(auto id:idx)
        {
            vis[id]=1;
        }
        int cur=0;
        s[cur].clear();
        priority_queue< pi , vector<pi> , greater<pi> > pq;
        f(i,1,n+1)
        {
            if(vis[i])
            {
                if(s[cur].size()!=0)
                {
                    cur++;
                    s[cur].clear();
                }
            }
            else
            {
                s[cur].insert(i);
                home[i]=cur;
                pq.push(mp(a[i],i));
            }
        }
        int tq=q;
        int last=-1;
        int fst;
        while(!pq.empty())
        {
            int z=pq.top().fi;
            int ii=pq.top().si;
            //cout<<z<<" "<<ii<<endl;
            ii=home[ii];
            pq.pop();
            if(s[ii].size()<k)continue;
            s[ii].erase(s[ii].begin());
            tq--;
            if(last==-1)fst=z;
            last=z;
            if(tq==0)break;
        }
       // cout<<fst<<" # "<<last<<endl;
        if(tq==0)
        {
            ses=min(ses,last-fst);
        }
    }
    cout<<ses<<endl;
    return 0;
}





































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

namespace ABC
{
    class ABC164C
    {
        const bool TESTING = false;
        const string FILE = "/tmp/data.txt";

        static void Main(string[] args)
        {
            if (TESTING)
            {
                Console.SetIn(new StreamReader(FILE));
            }
            var line = Console.ReadLine();
            int n = int.Parse(line);

            var hash = new HashSet<string>();
            for (int i = 0; i < n; ++i)
            {
                hash.Add(Console.ReadLine());
            }
            Console.WriteLine(hash.Count);

#if DEBUG
            Console.WriteLine();
#endif
        }
    }
}


Measured memory_bytes: 47352
#include <bits/stdc++.h>
#define ALL(a)  (a).begin(),(a).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<long long, long long> Pll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<long long> vll;
typedef vector<vector<long long>> vvll;
template <typename T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template <typename T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const long long INF = 1LL << 60;
const int INT_INF = 1 << 30;
#define MOD 1000000007LL

template <typename T>
T beki(T x, ll n){
  T res = 1;
  while(n > 0){
    if(n & 1) res *= x;
    x = x * x;
    n >>= 1;
  }
  return res;
}

int main(){
  ll D, N;
  cin >> D >> N;
  ll num = beki(100LL, D);
  if(N != 100) cout << num * N << endl;
  else cout << num * (N+1) << endl;
}


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

int main() {

	int A, B, K;
	cin >> A >> B >> K;
	
	int cnt = 0; // 今まで見つかった数
	for (int i = min(A, B); i >= 1; i--)
	{
		// A % i  →　Aをiで割った余り
		// if(A && B) → AもBも条件を満たすとき
		if (A % i == 0 && B % i == 0) {
			cnt++;	//cntを1増やす。
			if (cnt == K) {	//もし割切れる数が見つかったのがK番目だったら
				cout << i << endl;
				return 0;
			}
		}
	}
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0, i##_len = (n); i < i##_len; i++)
#define reps(i, s, n) for(ll i = (s), i##_len = (n); i < i##_len; i++)
#define rrep(i, n) for(ll i = (n) - 1; i >= 0; i--)
#define rreps(i, e, n) for(ll i = (n) - 1; i >= (e); i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((ll)(x).size())
#define len(x) ((ll)(x).length())

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    // ifstream in("input.txt");
    // cin.rdbuf(in.rdbuf());
    const ll inf = LONG_LONG_MAX / 2 - 1;
    ll n;
    cin >> n;
    vector<ll> h(n);
    rep(i, n) cin >> h[i];
    vector<ll> dp(n + 1, 0);
    reps(i, 2, n + 1) {
        if (i == 2) dp[i] = dp[i - 1] + abs(h[i - 1] - h[i - 2]);
        else dp[i] = min(dp[i - 1] + abs(h[i - 1] - h[i - 2]), dp[i - 2] + abs(h[i - 1] - h[i - 3]));
    }
    cout << dp[n] << endl;
    return 0;
}


Measured memory_bytes: 1792
#include <iostream>
#include <string>
#include <map>
#include <cmath>
#include <vector>
#include<cstdio>
#include <iterator>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;
int main() {
	int N;
	cin >> N;
	vector<int> A(N);
	for (int a = 0; a < N; a++)
	{
		cin >> A[a];
	}
	vector<bool> B(N,false);
	int i = 0;
	bool f = false;
	int count = 0;
	while (!B[i]) {
		B[i] = true;
		i=A[i] - 1;
		count++;
		if (i==1) {
			f = true;
			break;
		}
	}
	cout<<(f?count:-1)<<endl;
}

Measured memory_bytes: 640
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;

int main(){
    string t;
    cin >> t;
    if (t == "A"){
        cout << "T" << endl;
    }
    if (t == "T"){
        cout << "A" << endl;
    }
    if (t == "G"){
        cout << "C" << endl;
    }
    if (t == "C"){
        cout << "G" << endl;
    }
    return 0;
}

Measured memory_bytes: 256
/*
#pragma GCC optimize("O2")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2,sse,sse2,fma,tune=native")
//*/
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int  ,int > pii;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const ll maxn  = 3e6;
const ll mod =1e9+7;
const ld PI = acos((ld)-1);

#define pb push_back
#define endl '\n'
#define dokme(x) return(cout << x , 0);
#define migmig ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define ms(x , y) memset(x , y , sizeof x);
#define file_init freopen("input.txt", "r+", stdin); freopen("output.txt", "w+", stdout);
ll pw(ll a, ll b, ll md = mod){ll res = 1;while(b){if(b&1){res=(a*res)%md;}a=(a*a)%md;b>>=1;}return(res);}

int b[maxn];
int p[maxn];
int n;

int32_t main(){
    migmig
    cin >> n;
    for (int i = 1 ; i <= n ; i ++)
        cin >> p[i];
    for(int i = 1 ; i <= n ; i ++)
        cout << i*20001 << ' ';
    cout << endl;
    for(int i = 1 ; i <= n ; i ++)
        b[p[i]] = i + 20001 * (n-p[i]);
    for(int i = 1 ; i <= n ; i ++)
        cout << b[i] << ' ';
    return(0);
}

Measured memory_bytes: 3832