akhauriyash/Code-Regression huggingface dataset:
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n;
    while (cin >> n, n) {
        vector<vector<int>> field(21, vector<int>(21, 0));
        for (int i = 0; i < n; i++) {
            int x, y; cin >> x >> y;
            field[y][x] = 1;
        }
        int pos_x = 10, pos_y = 10;
        int m; cin >> m;
        while (m--) {
            char c; int d; cin >> c >> d;
            while (d--) {
                if (c == 'N') pos_y += 1;
                if (c == 'S') pos_y -= 1;
                if (c == 'E') pos_x += 1;
                if (c == 'W') pos_x -= 1;
                if (field[pos_y][pos_x]) {
                    n--; field[pos_y][pos_x] = 0;
                }
            }
        }
        puts(n ? "No" : "Yes");
    }
    return 0;
}


Measured memory_bytes: 3148
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
/* clang-format off */
#define INF (INT_MAX / 4)
#define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define ALL(a) (a).begin(), (a).end()
#define __DEBUG__
#ifdef __DEBUG__
#define CH_P(a) cout <<"check_point("<<#a<<")" << "\n";
#define DEBUG(x) cout<<#x<<":"<<x<<"\n"
#define DEBUGS(v) cout << #v << ":";for(auto x:v){cout<<x<<" ";}cout<<"\n"
#endif
#ifndef __DEBUG__
#define CH_P(a) 
#define DEBUG(x) 
#define DEBUGS(v) 
#endif
#define TIMER_S(start) chrono::system_clock::time_point start = chrono::system_clock::now();
#define TIMER_E(end) chrono::system_clock::time_point end = chrono::system_clock::now();
#define TIME(start, end) cout << static_cast<double>(chrono::duration_cast<chrono::microseconds>(end - start).count()) << "ms" << "\n";
/* clang-format on */

int main() {
  ll a;
  string s;
  cin >> a >> s;
  int b = (s.at(0) - '0') * 100 + (s.at(2) - '0') * 10 + s.at(3) - '0';
  cout << a * b / 100 << "\n";
  return 0;
}


Measured memory_bytes: 3624
#include<bits/stdc++.h>
using namespace std;
int a[1111111];
int main ()
{
	int n;
	long long t,i=1;
	cin>>n;
	t=7%n;
	for(;t!=0;t=(t*10+7)%n,i++)
	{
		a[t]++;
		if(a[t]==2)
		{
			cout<<"-1";
			return 0;
		}
	}
	cout<<i;
	return 0;
}

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

int main() {
  long long n, a, b;
  cin >> n >> a >> b;
  if (n < a + b - 1 || n > a * b) {
    cout << -1 << endl;
    return 0;
  }
  long long idx = 1;
  long long remainder = n - a;
  while (idx <= n) {
    long long offset = min(b - 1, remainder);
    for (int i = offset; i >= 0; i--) {
      cout << idx + i << " ";
    }
    idx += offset + 1;
    remainder -= offset;
  }
  cout << endl;
  return 0;
}

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

int main(){
  
  int h, n;
  cin >> h >> n;
  int a[n];
  
  int sum = 0;
  
  for(int i = 0; i < n; i++){
    cin >> a[i];
  }
  
  for(int i = 0; i < n; i++){
    sum += a[i];
  }
  //cout << a[1] << endl;
  
  if(sum >= h)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  
  return 0;
}

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

struct Benri { Benri() { std::cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(12);}} benri;

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vll = vector<long long>;
using pll = pair<ll, ll>;
using ull = unsigned long long;

template <typename T> using PQ = priority_queue<T>;
template <typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define F first
#define S second

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

constexpr long long MOD = 1000000007;
//constexpr long long MOD = 998244353;
//constexpr int INF = 1001001001;
constexpr ll INF = 1001001001001001001ll;
constexpr double EPS = 1e-10;
using number = long long;


int main() {
    int N; cin >> N;
    vector<pll> pos(N);
    for (int i = 0; i < N; ++i) cin >> pos[i].first >> pos[i].second;
    
    int par = (abs(pos[0].first) + abs(pos[0].second)) % 2;
    for (int i = 0; i < N; ++i) {
        int par2 = (abs(pos[i].first) + abs(pos[i].second)) % 2;
        pos[i] = pll(pos[i].first + pos[i].second, pos[i].first - pos[i].second);
        if (par2 != par) {
            cout << -1 << endl;
            return 0;
        }
    }
    
    vector<long long> d;
    for (int i = 30; i >= 0; --i) d.push_back(1LL<<i);
    if (par % 2 == 0) d.push_back(1);
    cout << d.size() << endl;
    for (int j = 0; j < d.size(); ++j) cout << d[j] << " ";
    cout << endl;
        
    for (int i = 0; i < N; ++i) {
        int xdir, ydir;
        long long xsum = 0, ysum = 0;
        for (int j = 0; j < (int)d.size(); ++j) {
            if (xsum <= pos[i].first) xdir = 1, xsum += d[j];
            else xdir = -1, xsum -= d[j];
            if (ysum <= pos[i].second) ydir = 1, ysum += d[j];
            else ydir = -1, ysum -= d[j];
            
            if (xdir == 1 && ydir == 1) cout << "R";
            else if (xdir == 1 && ydir == -1) cout << "U";
            else if (xdir == -1 && ydir == -1) cout << "L";
            else cout << "D";
        }
        cout << endl;
    }
}

Measured memory_bytes: 384
n, k = list(map(int, input().split()))
vs = list(map(int, input().split()))

maxv = 0
for t in range(k+1):
    mr = k - t  # 返せる最大個数

    if t >= n:
        vss = sorted(vs)
        for r in range(min(t, mr)+1):
            maxv = max(maxv, sum(vss[r:]))
    else:
        for il in range(t+1):
            ir = t - il
            vss = vs[:il] if ir == 0 else vs[:il] + vs[-ir:]
            vss = sorted(vss)
            for r in range(min(t, mr)+1):
                maxv = max(maxv, sum(vss[r:]))

print(maxv)

Measured memory_bytes: 3064
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); ++i)
#define all(x) x.begin(),x.end()
#define ln '\n'
const long long MOD = 1000000007LL;
//const long long MOD = 998244353LL;
typedef long long ll;
typedef unsigned long long ull; 
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
template<class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true;} return false; }
template<class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true;} return false; }
///////////////////////////////////////////////////////////////////////////////////////////////////

int main() {
    ios::sync_with_stdio(false); cin.tie(nullptr);
    int H,W; cin >> H >> W;
    vector<vector<char>> S(H+2, vector<char>(W+2,'.'));
    rep(i,H) rep(j,W) cin >> S[i+1][j+1];

    const int dx[4] = {-1,0,0,1};
    const int dy[4] = {0,-1,1,0};
    rep(i,H) {
        rep(j,W) {
            if (S[i+1][j+1]=='#') {
                bool ok = false;
                rep(k,4) {
                    int ny = i+1+dy[k];
                    int nx = j+1+dx[k];
                    if (S[ny][nx]=='#') ok = true;
                }
                if (!ok) {
                    cout << "No" << ln;
                    return 0;
                }
            }
        }
    }

    cout << "Yes" << ln;
}

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

using namespace std;

int main(){

    string s,t;
    cin>>s;
    bool f = false;
    for(int i=0;i<(int)s.size()-6;i++){
        if(s.substr(i,7)=="keyence"){
            f = true;
        }
    }

    for (int i = 1; i< 7;i++){
        t = s.substr(0, i) + s.substr(s.size()-(7 - i)) ;
        if(t=="keyence"){
            f = true;
        }
    }
    
        if(f){
            cout << "YES" << endl;
        }
        else{
            cout << "NO" << endl;
        }
}


Measured memory_bytes: 256
/*************************************************************
     File Name: F.cpp
     Created Time: Fri 18 May 2018 07:43:41 PM CST
 ************************************************************/

#include <iostream>
#include <vector>
using namespace std;

struct uf_tree {
  vector<int> parent;
  uf_tree(int s) : parent(s, -1) {}
  void unite(int x, int y) {
    x = find(x);
    y = find(y);
    if (x == y) return;
    if (parent[x] > parent[y]) swap(x, y);
    parent[x] += parent[y];
    parent[y] = x;
  }
  int find(int x) {
    return parent[x] < 0 ? x : parent[x] = find(parent[x]);
  }
  bool is_same(int x, int y) {
    return find(x) == find(y);
  }
};

int a[100000 + 10];
int main() {
  int n, m, x, y;
  while (cin >> n >> m) {
    for (int i = 1; i <= n; ++i) cin >> a[i];
    uf_tree uf(n + 1);
    while (m--) {
      cin >> x >> y;
      uf.unite(a[x], a[y]);
    }
    int ans = 0;
    for (int i = 1; i <= n; ++i)
      if (uf.is_same(i, a[i]))
        ++ans;
    cout << ans << endl;
  }
}


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

int main(){
  int aa, bb, cc;
  cin >> aa >> bb >> cc;
  int buf;
  if(aa>bb){
      buf =aa;
      aa = bb;
      bb = buf;
  }
  if(bb>cc){
      buf = bb;
      bb = cc;
      cc = buf;
  }
  if(aa>bb){
      buf = aa;
      aa = bb;
      bb = buf;
  }
  string s = to_string(aa)+" "+to_string(bb)+" "+to_string(cc);
  cout << s << endl;
  return 0;
}


Measured memory_bytes: 3200
#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <utility>
#include <functional>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <deque>
#include <ctime>
  
using namespace std;
  
#define rep(i,n) REP(i,0,n)
#define REP(i,s,e) for(int i=(s); i<(int)(e); i++)
#define pb push_back
#define mp make_pair
#define all(r) r.begin(),r.end()
#define rall(r) r.rbegin(),r.rend()
#define fi first
#define se second
#define println(X) cout<<X<<endl;
#define DBG(X) cout<<#X<<" : "<<X<<endl;
  
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
 
const int INF = 1e9;
const ll MOD = 1e9 + 7;
double EPS = 1e-8;
const double PI = acos(-1);

ll n, a;
ll f(const ll c, const int i){
	int l = 0, r = i+1;
	rep(_, 50){
		int m = (l + r) /2;
		double d = pow(c, m) * pow(c+1, i - m);
		// cout<<"("<<l<<" "<<r<<") ("<<m<<", "<<d<<")"<<endl;
		// cout<<" "<<c<<" "<<m<<" "<<pow(c, m)<<endl;
		// cout<<" "<<c+1<<" "<<i-m<<" "<<pow(c+1, i - m)<<endl;
		if(d >= n){
			l = m;
		}
		else {
			r = m;
		}
	}
	return l;
}
int main(){
	cin>>n>>a;
	ll ans = n;

	// cout<<f(2, 3)<<endl;
	// return 0;

	REP(i, 2, 100){
		double d = pow(n, 1.0/i);
		ll c = d;
		ll k = f(c, i);
		ans = min(ans, (ll)(c*k + (c+1)*(i-k)+(i-1LL)*a));
		//cout<<k<<" ("<< c<<" "<< i<<") "<< (ll)(c*k + (c+1)*(i-k)+(i-1LL)*a)<<endl;
		//cout<<i<<" "<<pow(n, 1.0/i)<<" "<< (ll)(0.9999999+pow(n, 1.0/i)+(i-1LL)*a)<<endl;
	}
	cout<<ans<<endl;
}

Measured memory_bytes: 256
# coding: utf-8

N, K, Q = [int(x) for x in input().split(" ")]

points = [K - Q for i in range(N)]

for i in range(Q):
    n = int(input())
    points[n - 1] += 1

for x in points:
    if x > 0:
        print("Yes")
    else:
        print("No")

Measured memory_bytes: 7852
#pragma region template 1.2
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef pair<ll, ll> ii;
#define REP(i, n) for (ll i = 0; i < (n); ++i)
#define REP1(i, n) for (ll i = 1; i <= (n); ++i)
#define OUT(x) cout << (x) << endl;
#define OUTA(a) \
    REP(i, (a).size()) { cout << (a[i]) << (i == (a).size() - 1 ? "\n" : " "); }
#define FOUT(x) cout << fixed << setprecision(15) << (x) << endl;
#define ALL(a) (a).begin(), (a).end()
#define SORT(a) sort(ALL(a))
#define RSORT(a) \
    SORT(a);     \
    reverse(ALL(a))

const ll INF = 1e18;
const ll MOD = 1e9 + 7;
#pragma endregion template

int main()
{
    ll N;
    cin >> N;
    vi l(N), r(N);
    REP(i, N)
    {
        cin >> l[i] >> r[i];
    }

    ll ans = 0;
    REP(i, N)
    {
        ans += r[i] - l[i] + 1;
    }

    OUT(ans);
}

Measured memory_bytes: 256
#include<iostream>
#include<string>
#include<algorithm>
#include<stack>
#include<vector>
#include<map>
#define rep(i, n) for(int i = 0; i < (n); i++ )
#define MAX 100000
#define NIL -1
using namespace std;
typedef long long ll;


string s[MAX];
int N;

int main() {
  map<string, int> M;
  cin >> N;
  rep(i, N) {
    cin >> s[i];
    string ss(s[i]);
    sort(ss.begin(), ss.end());
    M[ss]++;
  }
  ll ans = 0;
  for(auto P : M) {
    ans += (ll)P.second * (P.second - 1)/2;
  }
  cout << ans << endl;
  return 0;
}


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

int main() {
        long long n;
        scanf("%lld", &n);
        if (n & 1) {
                printf("0\n");
                return 0;
        }
        long long res = 0;
        long long b = 2;
        int c = 26;
        while (c --) {
                b *= 5;
                res += n / b;
                cerr << b << endl;
        }
        printf("%lld\n", res);
        return 0;
}


Measured memory_bytes: 256
#include <algorithm>
#include <boost/optional.hpp>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define REP(i, n) for(int i = 0, i##_MACRO = (n); i < i##_MACRO; i++)
#define RANGE(i, a, b) for(int i = (a), i##_MACRO = (b); i < i##_MACRO; i++)
#define EACH(e, a) for(auto&& e : a)
#define ALL(a) std::begin(a), std::end(a)
#define RALL(a) std::rbegin(a), std::rend(a)
#define FILL(a, n) memset((a), n, sizeof(a))
#define FILLZ(a) FILL(a, 0)
#define INT(x) (static_cast<int>(x))
#define PRECISION(x) std::fixed << std::setprecision(x)

using namespace std;

using ll = long long;
using VI = vector<int>;
using VI2D = vector<vector<int>>;

constexpr int INF = 2e9;
constexpr double EPS = 1e-10;
constexpr double PI = acos(-1.0);

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

template <typename T>
constexpr int sign(T x) {
	return x < 0 ? -1 : x > 0 ? 1 : 0;
}

template <>
constexpr int sign(double x) {
	return x < -EPS ? -1 : x > EPS ? 1 : 0;
}

template <typename T, typename U>
constexpr void chmax(T& m, U x) {
	m = max(m, x);
}

template <typename T, typename U>
constexpr void chmin(T& m, U x) {
	m = min(m, x);
}

template <typename T>
constexpr T square(T x) {
	return x * x;
}

int main() {
	int n;
	cin >> n;
	int c = n % 1000 == 0 ? (n / 1000) : n / 1000 + 1;
	cout << c * 1000 - n << endl;
	return 0;
}


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

typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef map<int, int> mii;
typedef vector<char> vc;
typedef vector<bool> vb;
#define ar array
//#define endl '\n'
#define FOR(i, s, e) for (int i = s; i < e; ++i)
#define FORL(i, s, e) for (ll i = s; i < e; ++i)
#define RFOR(i, s, e) for (int i = e - 1; i >= s; --i)
#define all(x) x.begin(), x.end()
#define sz(x) (ll) x.size()
#define MOD 1000000007LL
#define F first
#define S second
#define pb push_back
#define pf push_front
#define rb pop_back
#define rf pop_front
#define in insert
#define mp make_pair
#define fill(a, x) memset(a, x, sizeof a);

#ifdef TRACE
#define lol std::cout << "Calling " << __func__ << endl

#else
#define lol
#endif

ll modpow(ll a, ll b, ll m = MOD)
{
	a %= m;
	ll res = 1;
	while (b)
	{
		if (b & 1)
			res = (res * a) % m;
		a = (a * a) % m;
		b >>= 1;
	}
	return res;
}
ll bpow(ll a, ll b)
{
	ll res = 1;
	while (b)
	{
		if (b & 1)
			res = res * a;
		a = a * a;
		b >>= 1;
	}
	return res;
}
ll modinv(ll a, ll m = MOD) { return modpow(a, m - 2, m); }

void solve(int t)
{
//	cout << "Case #" << t << ": ";
	ll A,B,C,K;
	cin >> A >>B >> C >> K;
	if(A+B-K>=0) cout << min(A,K) << endl;
	else cout << A-(K-B-A) << endl;
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
#ifdef IOF
	freopen("alchemy_input.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
	freopen("err.txt", "w", stderr);
#endif
	int t = 1;
	//cin >> t;
	for (int tc = 1; tc <= t; tc++)
		solve(tc);
}


Measured memory_bytes: 3576
#pragma GCC optimize ("O2")
#pragma GCC target ("avx2")
//#include<bits/stdc++.h>
#include<cstdio>
#include<algorithm>
#include<cstring>

using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

const int CM = 1 << 17, CL = 12;
char cn[CM + CL], * ci = cn + CM + CL, * owa = cn + CM, ct;
const ll ma0 = 1157442765409226768;
const ll ma1 = 1085102592571150095;
const ll ma2 = 71777214294589695;
const ll ma3 = 281470681808895;
const ll ma4 = 4294967295;
inline int getint() {
	if (ci - owa > 0) {
		memcpy(cn, owa, CL);
		ci -= CM;
		fread(cn + CL, 1, CM, stdin);
	}
	ll tmp = *(ll*)ci;
	int dig = 68 - __builtin_ctzll((tmp & ma0) ^ ma0);
	tmp = tmp << dig & ma1;
	tmp = tmp * 10 + (tmp >> 8) & ma2;
	tmp = tmp * 100 + (tmp >> 16) & ma3;
	tmp = tmp * 10000 + (tmp >> 32) & ma4;
	ci += 72 - dig >> 3;
	return tmp;
}
const int dm = 1 << 17;
char *dn = cn, * di = dn, * owad = dn + dm - 20;
inline void putint(int X) {
	if (owad < di) {
		fwrite(dn, 1, di - dn, stdout);
		di = dn;
	}
	int dig = 1;
	if (X >= 10000) {
		if (X >= 100000) dig = 6;
		else dig = 5;
	}
	else {
		if (X >= 1000) dig = 4;
		else if (X >= 100) dig = 3;
		else if (X >= 10) dig = 2;
	}
	rep1(i, dig) {
		di[dig - i] = '0' + X % 10;
		X /= 10;
	}
	di[dig] = '\n';
	di += dig + 1;
}
const int bm = 500001;
int BIT[bm];
void add(int A) {
	while (A > 0) {
		BIT[A]++;
		A -= A & -A;
	}
}
int query(int A) {
	int ret = 0;
	while (A < bm) {
		ret += BIT[A];
		A += A & -A;
	}
	return ret;
}
int L[500001], R[500001], C[500001], ne[500001];
int are[500001];
int main() {
	//cin.tie(0);
	//ios::sync_with_stdio(false);


	int N = getint(), Q = getint();
	rep1(i, N) C[i] = getint();
	rep1(i, Q) {
		L[i] = getint();
		int r = getint();
		ne[i] = R[r];
		R[r] = i;
	}
	rep1(i, N) {
		if (are[C[i]]) add(are[C[i]]);
		are[C[i]] = i;
		
		for (int r = R[i]; r; r = ne[r]) {
			L[r] = i - L[r] - query(L[r]) + 1;
		}
	}

	rep1(i, Q) putint(L[i]);
	fwrite(dn, 1, di - dn, stdout);


	Would you please return 0;
}

Measured memory_bytes: 14956
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++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
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 int inf=1000000000;
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};
int f[MAX_N]={};
int b[MAX_N]={};

int r[2002][2002]={};
int l[2002][2002]={};
int u[2002][2002]={};
int d[2002][2002]={};
bool s[2002][2002]={};

int main() {
	int x,a;
	cin>>x>>a;
	if(x<a){
		cout<<"0"<<endl;
	}else{
		cout<<"10"<<endl;
	}
	return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}


struct Precision{
  Precision(){
    cout<<fixed<<setprecision(12);
  }
}precision_beet;

//INSERT ABOVE HERE
signed main(){
  using D = long double;

  Int n;
  cin>>n;
  vector<D> p(n);
  for(Int i=0;i<n;i++) cin>>p[i];
  
  vector<D> dp(n+2,0);
  dp[0]=1;
  for(Int i=0;i<n;i++){
    vector<D> nx(n+2,0);
    for(Int j=0;j<=n;j++){
      nx[j+1]+=dp[j]*p[i];
      nx[j]+=dp[j]*(1-p[i]); 
    }
    swap(dp,nx);
  }

  D ans=0;
  for(Int i=0;i<=n;i++)
    if(i>n-i) ans+=dp[i];
  
  cout<<ans<<endl;
  return 0;
}


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



int main(){
  int64_t n,k,q;
  cin >> n >> k >> q;
  vector<int> a(q);
  for (int i=0; i<q; i++){
    cin >> a.at(i);
  }
  sort(a.begin(), a.end());
  int b = 0;
  int j = 1;
  int p = 0;
  for (int i=0; i<q; i++){

    if(a.at(i)==j){b++;}
    else{

    if (k-q+b>0){cout << "Yes" << endl;}
    else{cout << "No" << endl;}
    b = 0;
    j++;
    p++;
    while(j<a.at(i)){
      if (k-q+b>0){cout << "Yes" << endl;}
      else{cout << "No" << endl;}
      j++;
      p++;
    }
    if(a.at(i)==j){b++;}
    }
  }

  if(a.at(q-1)==j){b++;}

  if (k-q+b>0){cout << "Yes" << endl;}
  else{cout << "No" << endl;}
  b = 0;
  j++;
  p++;
  if(p<n){
    while(p<n){
      if (k-q>0){cout << "Yes" << endl;}
      else{cout << "No" << endl;}
      p++;
    }
  }
}

Measured memory_bytes: 1024
#include <stdio.h>

int main() {
  int number_n, start, end, i, count = 0;
  scanf("%d", &number_n);
  for(i = 0; i < number_n; i++) {
    scanf("%d %d", &start, &end);
    count = count + end - start + 1;
  }
  printf("%d\n", count);
  return 0;
}


Measured memory_bytes: 128
#include <iostream>
using namespace std;
int main(){
	int N,H,W;
	int ans1,ans2,ans=0;
	cin>>N;
	cin>>H;
	cin>>W;
	ans1=(N-W)+1;
	ans2=(N-H)+1;
	ans=ans1*ans2;
	cout<<ans<<endl;
}

Measured memory_bytes: 256
#include <stdio.h>
#define MAX 500001
int N;
char inst[7];

class Node {
public:
    int key;
    int val;
    Node* left;
    Node* right;
    Node* parent;
};

class BST {
public:
    BST() { root = NULL; }
    Node* root;
    Node* data[MAX];
    Node* createNode(int k);
    void insert(Node* node);
    void find(int k);
    void printInOrder(Node* node);
    void printPreOrder(Node* node);
};

Node* BST::createNode(int k)
{
    Node* node_ptr = new Node;
    node_ptr->key = k;
    node_ptr->val = k;
    node_ptr->left = NULL;
    node_ptr->right = NULL;
    node_ptr->parent = NULL;
    
    return node_ptr;
}

void BST::insert(Node* node)
{
    Node* parent_node = NULL;
    Node* compared_node = root;
    while (compared_node != NULL) {
        parent_node = compared_node;
        if (node->key < compared_node->key) {
            compared_node = compared_node->left;
        } else {
            compared_node = compared_node->right;
        }
    }
    node->parent = parent_node;
    if (parent_node == NULL) {
        root = node;
    } else if (node->key < parent_node->key) {
        parent_node->left = node;
    } else {
        parent_node->right = node;
    }
}

void BST::find(int k)
{
    bool found = false;
    Node* node = root;
    while (node != NULL) {
        if (k == node->key) {
            found = true;
            break;
        } else if (k < node->key) {
            node = node->left;
        } else {
            node = node->right;
        }
    }
    if (found) {
        printf("yes\n");
    } else {
        printf("no\n");
    }
}

void BST::printInOrder(Node* start)
{
    if (start != NULL) {
        printInOrder(start->left);
        printf(" %d", start->key);
        printInOrder(start->right);
    }
}

void BST::printPreOrder(Node* start)
{
    if (start != NULL) {
        printf(" %d", start->key);
        printPreOrder(start->left);
        printPreOrder(start->right);
    }
}

int main(void)
{
    //freopen("in.txt", "r", stdin);
    BST bst;
    scanf("%d", &N);
    for (int i = 0; i < N; ++i) {
        scanf("%s", inst);
        int k;
        if (inst[0] == 'i') {
            scanf("%d", &k);
            Node* node = bst.createNode(k);
            bst.insert(node);
        } else if (inst[0] == 'f') {
            scanf("%d", &k);
            bst.find(k);
        } else {
            bst.printInOrder(bst.root);
            printf("\n");
            bst.printPreOrder(bst.root);
            printf("\n");
        }
    }
    return 0;
}

Measured memory_bytes: 21344
// https://atcoder.jp/contests/abc102/tasks/abc102_a

#include <iostream>
using namespace std;

int main()
{
  /* Magic word */
  cin.tie(0);
  ios::sync_with_stdio(false);
  /* ---------- */

  int n, r;

  cin >> n;

  r = n % 2 == 0 ? n : 2 * n;

  cout << r << '\n';

  return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
using namespace std;
int main(void){
    
    string s, t;
    cin >> s >> t;
    
    sort(s.begin(), s.end());
    sort(t.rbegin(), t.rend());
    
    if(s < t) cout << "Yes" << endl;
    else cout << "No" << endl;
    
    
    
}


Measured memory_bytes: 3108
N, M, X = map(int,input().split())
C = []
A = []
for i in range(N):
    ca = list(map(int,input().split()))
    C.append(ca[0])
    A.append(ca[1:])

INF = 10**18
ans = INF
for mask in range(1<<N):
    skill = [0 for i in range(M)]
    cost = 0
    for i in range(N):
        if mask&(1<<i):
            cost += C[i]
            for j in range(M):
                skill[j] += A[i][j]
    if min(skill) >= X:
        ans = min(ans,cost)
print(-1 if ans==INF else ans)

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

int cnt[26];
string s;

int main ()
{
	cin >> s;
	for (int i = 0; i < s.length(); ++i)
	{
		int num = s[i] - 'a';
		++cnt[num];
	}
//		++cnt[s[i]-'a'];
	for (int i = 0; i < 26; ++i)
		if (cnt[i]&1)
		{
			cout << "No";
//			cout << s[i] << ":" << cnt[i] << endl;
			return 0;
		}
	cout << "Yes";
}

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

#define rep(i, N) for(int i = 0;i < N;i++)

typedef long long ll;

const int mod = 1e9 + 7;

using namespace std;



int main(void) {
	//========================================
	
	int D; cin >> D;
	vector<int> c(26); rep(i, 26)cin >> c[i];
	vector<vector<int>> s(D, vector<int>(26));
	rep(i, D) {
		rep(j, 26)cin >> s[i][j];
	}

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

	srand(time(NULL));
	vector<int> t(D);
	rep(i, D) {
		cin >> t[i];
		t[i]--;
	}
	
	//=========================================

	vector<int> last(26, 0);
	int v = 0;
	rep(i, D) {
		v += s[i][t[i]];
		last[t[i]] = i + 1;
		rep(j, 26) {
			v -= c[j] * (i + 1 - last[j]);
		}
		cout << v << endl;
	}

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

	return 0;
}

Measured memory_bytes: 3648
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <algorithm>
#include <map>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#define ll long long
using namespace std;
int gcd(int a,int b) {
    while (a ^= b ^= a ^= b %= a);
    return b;
}
int T;
int main() {
//    for (cin >> T; T; T--) {
//
//    }
    ll a,b,n;
    scanf("%lld%lld%lld",&a,&b,&n);
    if(n>=b) n=b-1;
    ll ans=a*n/b;
    printf("%lld",ans);
}

Measured memory_bytes: 3196
#include <iostream>
#include <iomanip>
#include <utility>
#include <cmath>
#include <numeric>
#include <vector>
#include <set>
#include <algorithm>
#include <string>

using namespace std;

typedef long long ll;

#define rep(i, n) for(int i = 0; i < n; i++)
#define repr(i, a, b) for(int i = a; i < b; i++)
#define vec_all(vec) vec.begin(), vec.end()

int main() {
    int n;
    cin >> n;
    vector<int> a(n);

    rep(i, n) {
        cin >> a[i];
    }

    sort(vec_all(a));

    vector<pair<int, int>> dic;

    int tmp = 0;
    rep(i ,n) {
        if (tmp != a[i]) {
            tmp = a[i];
            dic.push_back(make_pair(a[i], 1));
        } else {
            dic[dic.size() - 1].second++;
        }
    }

    int sum = 0;
    rep(i, dic.size()) {
        if (dic[i].first > dic[i].second) {
            sum += dic[i].second;
        } else {
            sum += dic[i].second - dic[i].first;
        }
    }

    cout << sum << endl;

    return 0;
}

Measured memory_bytes: 1784
#include<bits/stdc++.h>
#include<boost/variant.hpp>
using namespace std;
typedef long long ll;
typedef vector<boost::variant<bool, ll, int, string, double, char*, const char*>> any;
template<typename T> inline void pr(const vector<T> &xs){
	for(int i=0; i<xs.size()-1; i++) cout<<xs[i]<<" ";
	(xs.empty()?cout:(cout<<xs[xs.size()-1]))<<endl;
}
#ifdef DEBUG
#define debug(...) pr(any{__VA_ARGS__})
#define debugv(x) pr((x))
#else
#define debug(...)
#define debugv(x)
#endif

ll fact[200000];

// Extended Euclid's greatest common divisor algorithm
// Find (x, y, g)
// where $a*x + b*y = g$ and g is the greatest common divisor of (a, b)
ll ext_gcd(ll a, ll b, ll &x, ll &y){
	if(b == 0){
		x = 1;
		y = 0;
		return a;
	}
	ll nx, ny;
	ll g = ext_gcd(b, a%b, nx, ny);
	x = ny;
	y = nx - a/b *ny;
	return g;
}

// Modular inverse of x given modulo p, y
// x*y = 1 mod p
// <=> x*y + z*p = 1
ll inv_mod(ll x, ll p){
	ll y,z;
	ext_gcd(x, p, y, z);
	return y>=0 ? y : p+(y%p);
}


// Modular factorial of n, also counting p's appearance e
// n! = a * p^e
// return: a % p
// n! = n * (n-1) * ... * (k*p+1) *
//      (k*p) * (k*p-1) * ... ((k-1)*p+1) *
//      ...
//      p * (p-1) * ... * 2 * 1   (k = floor(n/p))
//    = (n%p) * ... * 1 *
//      (k*p) * (p-1) * ... * 1 *
//      p * (p-1) * ... * 1       (mod p, preserving p's multiples)
//    = (n%p)! * p^k * k! * (p-1)^k
//    = (n%p)! * p^k * k! * (p-1)^(k%2)
//
// From the facts:
//   (p-1)! = p-1 (mod p) (c.f. Willson's theorem)
//   (p-2)**2 = 1 (mod p)
ll fact_mod(ll n, ll p, ll &e, ll fact[]){
	if(n == 0){
		e = 0;
		return 1;
	}

	ll na = fact_mod(n/p, p, e, fact);

	e += n/p;
	ll a = na * fact[n%p] % p;

	if((n/p)%2) a = a * (p-1)%p;
	return a;
}

int main(){
	ll N;
	cin >> N;
	if(N%2){
		cout << 0 << endl;
		return 0;
	}

	ll e2, e5;
	ll f2[] = {1, 1};
	ll f5[] = {1, 1, 2, 1, 4};
	fact_mod(N/2, 2, e2, f2);
	fact_mod(N/2, 5, e5, f5);

	e2 += N;

	cout << min(e2, e5) << endl;

	return 0;
}


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

typedef long long ll;
const ll MOD = 1e9 + 7;

const ll INF = 1LL<<60;
const int MAX = 2500;

using pll = pair<ll, ll>; // (money, time)
using Edge = pair<int, pll>;
using Graph = vector<vector<Edge> >;

int N, M;
ll S;
Graph G;
vector<ll> C, D; // money, time

void solve() {
    if (S >= MAX) S = MAX;
    vector<vector<ll> > dp(N, vector<ll>(MAX+1, INF));
    priority_queue<pair<ll, pll>, vector<pair<ll, pll> >, greater<pair<ll, pll> > > que;
    dp[0][S] = 0;
    que.push(make_pair(0, pll(0, S)));
    while (!que.empty()) {
        auto p = que.top(); que.pop();
        ll time = p.first;
        int v = p.second.first;
        ll s = p.second.second;
        if (time > dp[v][s]) continue;

        // 補充
        if (s + C[v] <= MAX) {
            ll ns = s + C[v];
            ll ntime = time + D[v];
            if (dp[v][ns] > ntime) {
                dp[v][ns] = ntime;
                que.push(make_pair(ntime, pll(v, ns)));
            }
        }
        // 辺を通る
        for (auto e : G[v]) {
            if (s < e.second.first) continue;
            int nv = e.first;
            ll ns = s - e.second.first;
            ll ntime = time + e.second.second;
            if (dp[nv][ns] > ntime) {
                dp[nv][ns] = ntime;
                que.push(make_pair(ntime, pll(nv, ns)));
            }
        }
    }
    for (int v = 1; v < N; ++v) {
        ll res = INF;
        for (int s = 0; s <= MAX; ++s) {
          res = min(res, dp[v][s]);
        }
        cout << res << endl;
    }
}

int main() {
    cin >> N >> M >> S;
    G.assign(N, vector<Edge>());
    for (int i = 0; i < M; ++i) {
        ll u, v, a, b;
        cin >> u >> v >> a >> b;
        --u, --v;
        G[u].push_back(Edge(v, pll(a, b)));
        G[v].push_back(Edge(u, pll(a, b)));
    }
    C.resize(N); D.resize(N);
    for (int i = 0; i < N; ++i) cin >> C[i] >> D[i];
    solve();
    return 0;
}

Measured memory_bytes: 7256
#include<bits/stdc++.h>
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
using namespace std;

int main(){
    int n;
    cin>>n;
    long double a[n],ans=1;
    for(int i=0;i<n;i++){
        cin>>a[i];
    }
    bool flag = false;
    sort(a,a+n);
    for(int i=0;i<n;i++){
        ans *= a[i];
        if(ans>1000000000000000000) {
            flag = true;
            break;
        }
    }

    if(flag) cout<<"-1\n";
    else cout<<fixed<<setprecision(0)<<ans<<"\n";
    
    return 0;
}



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

int main(void)
{
    string S;
    cin >> S;
    if (S == "Sunny") {
        cout << "Cloudy" << endl;
    }
    else if (S == "Cloudy") {
        cout << "Rainy" << endl;
    }
    else if (S == "Rainy") {
        cout << "Sunny" << endl;
    }
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
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; }
const ll INF=1LL<<60;
const int inf=1<<30;
const int mod=1e9+7;
const int MOD=998244353;
vector<ll> v;
void f(ll a,ll b){
    if(b==11){
        return;
    }
    int t=a%10;
    if(b==0){
        for(int i=1;i<=9;i++){
            v.push_back(i);
            f(i,1);
        }
        return;
    }
    for(int i=-1;i<=1;i++){
        if(t+i<0||t+i>9){
            continue;
        }
        v.push_back(a*10+t+i);
        f(a*10+t+i,b+1);
    }
}
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll k;cin >> k;
    f(0,0);
    sort(v.begin(),v.end());
    cout << v[k-1] << endl;
}

Measured memory_bytes: 10476
package main

import (
	"bufio"
	"fmt"
	"io"
	"math"
	"os"
	"strconv"
	"strings"

)


func main() {
	solve(os.Stdin, os.Stdout)
}

type ReaderEx struct {
	baseScanner *bufio.Scanner
	words       []string
	nextWordIdx func() int
	initWordIdx func(int)
}

func NewScannerEx(stdin io.Reader) *ReaderEx {
	var this ReaderEx
	var idx int
	var wordsCnt int
	this.baseScanner = bufio.NewScanner(stdin)
	this.baseScanner.Buffer(make([]byte, 0), 1E+11)
	this.nextWordIdx = func() int {
		cur := idx
		idx = (idx + 1) % wordsCnt
		return cur
	}
	this.initWordIdx = func(wc int) {
		idx = 0
		wordsCnt = wc
	}
	return &this
}

func (me *ReaderEx) Scan(doSplit bool) (isScanned bool) {
	isScanned = me.baseScanner.Scan()
	if doSplit {
		me.words = strings.Fields(me.baseScanner.Text())
	} else {
		me.words = []string{me.baseScanner.Text()}
	}
	me.initWordIdx(len(me.words))
	return
}

func (me *ReaderEx) nextBytes() []byte {
	return []byte(me.words[me.nextWordIdx()])
}
func (me *ReaderEx) nextString() string {
	return me.words[me.nextWordIdx()]
}

type StringArray []string

func (me *ReaderEx) nextStringArray() StringArray {
	return me.words[me.nextWordIdx():]
}

func (me StringArray) toStrings() []string {
	return me
}

func (me StringArray) toInts() []int {
	strValues := me.toStrings()
	values := make([]int, len(strValues))
	for i, v := range strValues {
		n, err := strconv.Atoi(v)
		if err != nil {
			panic(err)
		}
		values[i] = n
	}
	return values
}
func (me *ReaderEx) nextInt() int {
	n, err := strconv.Atoi(me.words[me.nextWordIdx()])

	defer func() {
		if err != nil {
			panic(fmt.Sprintf("getInt(%d)", n))
		}
	}()
	return n
}

func pow(x, y, mod int) (ans int) {

	ans = 1
	for bit := 1 << uint(math.Floor(math.Log2(float64(y)))); ; bit >>= 1 {
		if y&bit != 0 {
			ans *= x
			if mod > 0 {
				ans %= mod
			}
		}
		if bit <= 1 {
			return
		}
		ans *= ans
		if mod > 0 {
			ans %= mod
		}
	}
}

type factType struct {
	prime int
	count int
}

func fact(n int) (facts []*factType) {

	for i := 2; i*i <= n; i++ {
		if n%i == 0 {
			fa := factType{prime: i}
			for n%fa.prime == 0 {
				n /= fa.prime
				fa.count++
			}
			facts = append(facts, &fa)
		}
	}
	if n > 1 {
		facts = append(facts, &factType{prime: n, count: 1})
	}
	return facts
}
func dec2bin(n int) (ret []bool) {
	for bit := 1 << uint(math.Floor(math.Log2(float64(n)))); ; bit >>= 1 {
		ret = append(ret, n&bit != 0)

		if bit <= 1 {
			return
		}
	}

}

func abs(v int) int {
	if v < 0 {
		v = -v
	}
	return v
}

func b2i(b bool) (i int) {
	if b {
		i = 1
	} else {
		i = 0
	}
	return
}

func solve(stdin io.Reader, stdout io.Writer) {

	r := NewScannerEx(stdin)
	r.Scan(true)
	k := r.nextInt()

	cnt := 0
	i := 1
	for {
		c := 0
		s := strconv.Itoa(i)[:]
		idx := 0
		for ; idx < len(s); idx++ {
			v := s[idx]
			if c != 0 && abs(int(v)-c) > 1 {
				break
			}
			c = int(v)
		}
		if idx >= len(s) {
			cnt++
			if cnt >= k {
				break
			}
			i++
		} else {
			i += pow(10, len(s)-idx-1, 0)
		}
	}
	fmt.Fprintln(stdout, i)
}


Measured memory_bytes: 6528
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll GCD(ll x,ll y){
    if(y == 0) return x;
    else return GCD(y,x%y);
}
const int MOD = 1000000007;


int main() {
    int n; cin >> n;
    int mx = 0;
    int mn = 1001;
    for(int i = 0;i < n;i++){
        int x; cin >> x;
        mx = max(mx,x);
        mn = min(mn,x);
    }
    cout << mx - mn;
}




Measured memory_bytes: 256
n,a,b = map(int,input().split())

M = 10**9+7

def pow(x,n,M):
    if n == 0:
        return 1
    elif n % 2 == 0:
        return pow((x % M)**2, n // 2, M)
    if n % 2 == 1:
        return (x % M) * pow((x % M)**2, n // 2, M)

def inv(x,M): #法Mでのxの逆元,Mは素数
    return pow(x,M-2,M) % M

#2**n - 1 - C(n,a) - C(n,b)
Cna_nume,Cna_deno,Cnb_nume,Cnb_deno = 1,1,1,1
for i in range(1,a+1):
    Cna_nume *= (n-i+1)
    Cna_nume %= M
    #まとめてCna_nume *= (n-i+1)%Mとかすると重くなるようだ
    Cna_deno *= i
    Cna_deno %= M
for i in range(1,b+1):
    Cnb_nume *= (n-i+1)
    Cnb_nume %= M
    Cnb_deno *= i
    Cnb_deno %= M
Cna = (Cna_nume * inv(Cna_deno,M)) % M
Cnb = (Cnb_nume * inv(Cnb_deno,M)) % M

print((pow(2,n,M) - 1 - Cna - Cnb) % M)


Measured memory_bytes: 3064
//CODING ME ACCHHA KARNEKA HAI TERKO TO BAS PRACTICE KARTE REH
#include <bits/stdc++.h>
#define pragma
using namespace std;
#define ll unsigned long long
#define ld long double
#define pb push_back
#define pf push_front
#define aisort sort(a,a+n)
#define adsort sort(a,a+n,greater<ll>())
#define PI 2 * acos(0)

typedef pair<ll, ll> pii;
typedef pair<ll, pii> piii;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef vector<pii> vii;
typedef vector<piii> viii;
typedef set<ll> Set;

const ll maxs = 1e5+3;
const ll maxs1 = 1e3+4;
const ll mod = 1e9 + 7;

//MODULO OPEARTIONS
    inline ll add(ll a, ll b) { return (mod + a + b) % mod; }
    inline ll sub(ll a, ll b) { return (a - b + mod) % mod; }
    inline ll mul(ll a, ll b) { return (1ll * a * b) % mod; }

//POWER
    ll fastpow(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;}

//MODULAR INVERSE
    ll inv(ll x){ return fastpow(x , mod - 2);}
    
//PRIME
    bool isPrime(ll n) { if (n <= 1)  return false; if (n <= 3)  return true;if (n%2 == 0 || n%3 == 0) return false; for (int i=5; i*i<=n; i=i+6) if (n%i == 0 || n%(i+2) == 0) return false; return true; } 


int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll n;
    cin>>n;
    ll a[n],i,k=0,l=0;
    for(i=0;i<n;i++)
    {
        cin>>a[i];
        if(a[i]%2==0)
        {
            k++;
            if(a[i]%3==0||a[i]%5==0)
            l++;
        }
    }
    if(k==l)
    cout<<"APPROVED";
    else
    cout<<"DENIED";
}



Measured memory_bytes: 3556
A, B, K = map(int, input().split())

ans_array = []

for i in range(A, A + K if B > (A + K) else (B+1)):
    ans_array.append(i)

for i in range(B, B - K if A < (B - K) else (A-1), -1):
    ans_array.append(i)

ans_array = sorted(list(set(ans_array)))

for i in ans_array:
    print(i)

Measured memory_bytes: 3060
///I don't wanna read problem's statement anymore
using namespace std;
#include<bits/stdc++.h>
#define ll long long
#define read freopen("in.txt", "r", stdin)
#define write freopen("out.txt", "w", stdout)
#define sf scanf
#define pb push_back
#define pfr push_front
#define reap(i,n) for(int i=0; i<n; i++)
#define case_ printf("Case %d: ",i)
#define check printf("working\n")
#define pf printf
#define ato(v) for(auto k:v)
#define vi vector<int>
#define vll vector<ll>
#define vec_ch vector<char>
#define list_i list<int>
#define list_ll list<ll>
#define list_ch list<ch>
#define M 100005
#define ios ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);


ll d[M];
ll a[M];
ll x=LONG_MAX;
ll solve(int n, int k){
    if(n==0)
        return 0;
    if(d[n]!=-1) return d[n];
    else{
        for(int i=1; i<=k; i++)
            if(n-i>=0)
                x=min(abs(a[n]-a[n-i])+solve(n-i,k),x);
    d[n]=x;
    x=LONG_MAX;
    return d[n];
    }
}
int main(){
    ios
    //read;
    //write;
    int n,k;
    cin>>n>>k;
    for(ll i=0; i<n; i++) cin>>a[i];
    memset(d,-1,sizeof(d));
    cout<<solve(n-1,k);
    return 0;
}


Measured memory_bytes: 6528
#include <stdio.h>
int main(void){
  int n,m,i;
  int sum = 0;;
  int a[10000];
  
  scanf("%d %d",&n, &m);
  for(i = 0; i < m; i++){
    scanf("%d",&a[i]);
    sum += a[i];
  }
  
  if(sum <= n){
    printf("%d",n-sum);
  }
  else
    printf("-1");
  
  return 0;
}

Measured memory_bytes: 1768
#include<iostream>
#define N 101
using namespace std;

int main(){
  while(1){
    int p[N][N]={},l,n,m,a,ans=-1,fl[N]={},cnt=0;
  cin>>n;
  if(n==0) break;
  for(int i=1;i<=n;i++){
    cin>>m;
    for(int j=0;j<m;j++){
      cin>>l;
    p[i][l]=1;
    }
  }
  cin>>m;
  for(int i=0;i<m;i++){
    cin>>a;
    for(int j=1;j<=n;j++){
      if(p[j][a]==0) fl[j]=0;
      if(p[j][a]==1 && i==0) fl[j]=1;
      if(p[j][a]==1 && i>0 && fl[j]==1) fl[j]=1;
    }
  }
  for(int i=1;i<=n;i++)
    if(fl[i]==1){
      ans=i;
      cnt++;
    }
  
  if(cnt!=1) ans=-1;
       cout<<ans<<endl;
  }
  return 0;
}

Measured memory_bytes: 1208
#include"bits/stdc++.h"
using namespace std;
int main(){
	string b="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
	int num;
	cin>>num;
	string a;
	cin>>a;
	for(int i=0;i<a.length();i++){
		a[i]=b[(a[i]-65+num%26)%26]; 
	}
	cout<<a<<endl;
} 

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;
#define MOD 1000000007
#define MSG(a) cout << #a << " " << a << endl;
#define print(a) cout << a << endl;
template <class T, class C>
void chmax(T &a, C b)
{
    a > b ?: a = b;
}
template <class T, class C>
void chmin(T &a, C b) { a < b ?: a = b; }

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

// vector の出力
template <typename T>
ostream &operator<<(ostream &out, const vector<T> &v)
{
    size_t last = v.size() - 1;
    for (size_t i = 0; i < v.size(); ++i)
    {
        out << v[i];
        if (i != last)
            out << " ";
    }
    return out;
}

int main()
{
    //入力の高速化用のコード
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    //////////////////////////////////////////

    int a,b;
    cin >> a >> b;
    ll ans= 0;
    rep(i,b-a){
        ans+=i+1;
    } 
    print(ans-b);

    return 0;
}


Measured memory_bytes: 3644
#include <bits/stdc++.h>
using namespace std;
int64_t X, Y, A, B, C, p, q, r;

int main()
{
  cin >> X >> Y >> A >> B >> C;
  priority_queue<int64_t> P, Q, R;
  for (int i = 0; i < A; i++)
  {
    cin >> p;
    P.push(p);
  }
  for (int i = 0; i < B; i++)
  {
    cin >> q;
    Q.push(q);
  }
  for (int i = 0; i < C; i++)
  {
    cin >> r;
    R.push(r);
  }
  int64_t as = 0, bs = 0, cs = 0, ans = 0;
  while (as + bs + cs < X + Y)
  {
    int64_t ptop = P.empty() ? 0 : P.top();
    int64_t qtop = Q.empty() ? 0 : Q.top();
    int64_t rtop = R.empty() ? 0 : R.top();
    if (ptop >= qtop && ptop >= rtop)
    {

      P.pop();
      if (as < X)
      {
        as++;
        ans += ptop;
      }
    }
    else if (qtop >= ptop && qtop >= rtop)
    {
      Q.pop();
      if (bs < Y)
      {
        bs++;
        ans += qtop;
      }
    }
    else
    {
      R.pop();
      cs++;
      ans += rtop;
    }
  }
  cout << ans << endl;
}

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

int main(){
    int n;
    cin >> n;
    vector<int> v(n);

    for(auto& x : v) cin >> x, --x;

    vector<int> d(n, 0);

    for(int i = 0; i < n; ++i){
        if(v[i] == 0) d[v[i]] = 1;
        else d[v[i]] = d[v[i]-1]+1; }


    cout << (n - *max_element(begin(d), end(d))) << endl;
    return 0; }


Measured memory_bytes: 1792
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define MOD 1000000007
#define INF 1000000001

int main(){
  int n;
  cin>>n;
  ll t[n], a[n], num[n], tma=-1,ama=-1;
  for(int i=0;i<n;i++){
    cin>>t[i];
    tma=max(tma,t[i]);
  }
  for(int i=0;i<n;i++){
    cin>>a[i];
    ama=max(ama,a[i]);
  }
  if(tma!=ama){
    cout<<0<<endl;
    return 0;
  }
  for(int i=0;i<n;i++) num[i]=INF;
  num[0]=1, num[n-1]=1;
  for(int i=1;i<n;i++){
    int j=n-(i+1);
    if(t[i]!=t[i-1]){
      num[i]=1;
    }
    if(a[j]!=a[j+1]){
      num[j]=1;
    }
    num[i]=min(num[i],t[i]);
    num[j]=min(num[j],a[j]);
  }
  ll ans=1;
  for(int i=1;i<n-1;i++){
    if(num[i]==1){
      if(t[i]!=t[i-1]){
        if(t[i]>a[i]){
          ans=0;
          break;
        }
      }
      if(a[i]!=a[i+1]){
        if(a[i]>t[i]){
          ans=0;
          break;
        }
      }
    }
  }
  for(int i=0;i<n;i++){
    ans*=num[i];
    ans%=MOD;
  }
  cout<<ans<<endl;
  return 0;
}


Measured memory_bytes: 2560
#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <memory>
#include <complex>
#include <numeric>
#include <cstdio>
#include <iomanip>

#define REP(i,m,n) for(int i=int(m);i<int(n);i++)
#define EACH(i,c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl
#define dump(x)  cerr << #x << " = " << (x) << endl
#define BR cout << endl;
#else
#define DEBUG(s) do{}while(0)
#define dump(x) do{}while(0)
#define BR 
#endif
using namespace std;

using UI = unsigned int;
using UL = unsigned long;
using LL = long long int;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VLL = vector<LL>;
using VS = vector<string>;
using PII = pair<int,int>;
using VP = vector<PII>;

//struct edge {int from, to, cost;};

constexpr double EPS = 1e-10;
constexpr double PI  = acos(-1.0);
//constexpr int INF = INT_MAX;

template<class T> inline T sqr(T x) {return x*x;}

int dp[101][101][301] = {};

int main() {
    int n, maxw;
    cin >> n >> maxw;
    VI w(n), v(n);
    REP(i,0,n) cin >> w[i] >> v[i];
    int times = min(100, maxw / w[0]);
    if (times == 100) {
        int ans = 0;
        REP(i,0,n) ans += v[i];
        cout << ans << endl;
        return 0;
    } else if (times == 0) {
        cout << 0 << endl;
        return 0;
    }
    int base = w[0];
    REP(i,0,n) w[i] -= base;
    //dump(base);
    //dump(times);
    dp[0][0][0] = 0;
    dp[0][1][0] = v[0];
    REP(i,1,n) {
        REP(j,0,times+1) {
            REP(k,0,i * 3 + 1) {
                if (j > 0) {
                    if (k - w[i] >= 0) {
                        dp[i][j][k] = max(dp[i-1][j][k], dp[i-1][j-1][k-w[i]] + v[i]);
                    } else {
                        dp[i][j][k] = dp[i-1][j][k];
                    }
                } else {
                    dp[i][j][k] = dp[i-1][j][k];
                }
                //cerr << "[" << i << "][" << j << "][" << k << "] = " << dp[i][j][k] << endl;
            }
        }
    }
    int ans = 0;
    REP(j,0,times+1) REP(k,0,n*3+1) {
        if (j * base + k <= maxw) {
            ans = max(ans, dp[n-1][j][k]);
        }
        //cerr << "[" << j << "][" << k << "] = " << dp[n-1][j][k] << endl;
    }
    cout << ans << endl;
    
    return 0;
}

Measured memory_bytes: 12032