akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define be begin()
#define en end()
#define le length()
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (__typeof(n) i = 0; i < n; i++)
#define repo(i, n) for (__typeof(n) i = 1; i <= n; i++)
#define eps 1e-6
#define pi 3.141592653589793
#define c(a) cout << a << "\n";
#define a(a)         \
    for (auto i : a) \
        cout << i << " ";
typedef vector<int> vii;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MOD = 1e9 + 7;
const int INF = 1e9;
int main()
{
    ll a, b, cnt = 1;
    cin >> a >> b;
    ll g = __gcd(a, b);
    for (int i = 2; i <= sqrt(g); i++)
    {
        if (g % i == 0)
        {
            cnt++;
            while (g % i == 0)
                g /= i;
        }
        if (g <= 0)
            break;
    }
    if (g > 1)
        cnt++;
    c(cnt)

        return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define REG register
using namespace std;
inline void read(int& x){
	static char c;
	while(!isdigit(c=getchar()));x=c^48;
	while(isdigit(c=getchar()))x=(x*10)+(c^48);
}

const int Mod=1000000007;

int n;

int x[100005];

int Pow(int a,int b){
	int ans=1;
	while(b){
    	if(b&1) ans=1ll*ans*a%Mod;
    	a=1ll*a*a%Mod,b>>=1;
    }
	return ans;
}

int _Inv[100005];

inline void Work(){
	read(n);
	for(REG int i=1;i<=n;++i) read(x[i]);
	int Ans=0;
	for(REG int i=1;i<=n;++i) _Inv[i]=(_Inv[i-1]+Pow(i,Mod-2))%Mod;
	for(REG int i=1;i<n;++i) Ans=(Ans+1ll*(x[i+1]-x[i])*_Inv[i]%Mod)%Mod;
	for(REG int i=1;i<n;++i) Ans=1ll*Ans*i%Mod;
	printf("%d\n",Ans);
}

int main(){Work();}

Measured memory_bytes: 1024
process.stdin.resume();
process.stdin.setEncoding('utf-8');
 
let inputString = '';
let currentLine = 0;
 
process.stdin.on('data', inputStdin => {
    inputString += inputStdin;
});
 
process.stdin.on('end', _ => {
    inputString = inputString.split(/\n/);
    main();    
});
 
function readLine() {
    return inputString[currentLine++];
}

function main() {
  const x = Number(readLine())
  console.log(x === 0 ? 1 : 0)
}

Measured memory_bytes: 30016
#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<queue>
#include<algorithm>
typedef long long ll;

int main() {
	int k = 0, s = 0;
	int count = 0;
	std::cin >> k >> s;
	for (int i = 0; i <= k; i++) {
		for (int j = 0; j <= k; j++) {
			if (i + j + (s - (i + j)) == s && s-(i+j)>=0 && s - (i + j) <= k) {
				count++;
			}
		}
	}
	std::cout << count << std::endl;
}

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

int a, z;
string s;

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

	a = -1;
	cin >> s;

	for (int i = 0; i < s.size(); i++) {
		if (s[i] == 'A' && a == -1) {
			a = i;
		}
		else if (s[i] == 'Z') {
			z = i;
		}
	}

	cout << z-a+1 << '\n';

	return 0;
}

Measured memory_bytes: 720
const isPrime = n => {
  if (n < 2) return false;
  if (n === 2 || n === 3 || n === 5) return true;
  if (n % 2 === 0 || n % 3 === 0 || n % 5 === 0) return false;
  let prime = 7;
  let step = 4;
  const limit = Math.sqrt(n);
  while (prime <= limit) {
    if (n % prime === 0) return false;
    prime += step;
    step = 6 - step;
  }
  return true;
};

const main = (input) => {
  const x = Number(input.trim())
  let result = x
  if (result === 2) {
    console.log(result)
    return
  }
  if (result%2 === 0) result++
  while(true) {
  	if (isPrime(result)) break;
  	result += 2
  }
  console.log(result)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))


Measured memory_bytes: 7500
//by The_One_solver
#include<bits/stdc++.h>
using namespace std;
long long n,m,c;
map<long long ,int >mp;
int main()
{
    cin>>n;
    for(int i=0;i<n;i++)
    {
        cin>>m;
        if(mp[m]>0){mp[m]--;c--;}
        else {mp[m]++;c++;}
    }
   cout<<c;
    return 0;
}


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

int main() {
    int N; cin >> N;
    vector<int> X(N);
    vector<int> Y(N);
    for (int i = 0; i < N; i++) {
        cin >> X[i];
        Y[i] = X[i];
    }

    sort(X.begin(), X.end(), less<int>());
    int m = X[N/2-1];
    int n = X[N/2];
    for (int i = 0; i < N; i++) {
        if (Y[i] < n) {
            cout << n << endl;
        } else {
            cout << m << endl;
        }
    }
}

Measured memory_bytes: 3712
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define stoi stoll
using pii=pair<int,int>;
#define all(c) begin(c),end(c)
#define rall(c) rbegin(c),rend(c)
#define fore(x,c) for(auto &&x:c)
#define rep(i,a,n) for(int i=a,i##len=(int)(n);i<i##len;++i)
#define rrep(i, a, n) for(int i=(int)(n-1);i>=a;--i)
#define sz(c) ((int)c.size())
#define contains(c,x) (c.find(x)!=end(c))
#define inseg(l,x,r) ((l)<=(x)&&(x)<(r))
#define dump(...)
#define pb push_back
#define _ 0
const signed INF_=1001001001; const long long INF=1001001001001001001LL;
const int DX[9]={0,1,0,-1,1,1,-1,-1,0},DY[9]={-1,0,1,0,-1,1,1,-1,0};
template<class T> ostream& operator<<(ostream &os,const vector<T> &v) {
    for (auto i = begin(v); i != end(v); i++) os<<*i<<(i==end(v)-1?"":" ");return os;}
template<class T> istream& operator>>(istream &is,vector<T> &v) {
    for (auto i = begin(v); i != end(v); i++) is>>*i;return is;}
template<class T,class U> istream& operator>>(istream &is, pair<T,U> &p) {
    is>>p.first>>p.second;return is;}
template<class T, class U> bool chmax(T &a,const U &b){return a<b?a=b,1:0;}
template<class T, class U> bool chmin(T &a,const U &b){return a>b?a=b,1:0;}
template <class T> void psum(T& c) {partial_sum(begin(c), end(c), begin(c));}
template<class T> using heap=priority_queue<T,vector<T>,greater<T>>;
struct before_main_function {
    before_main_function() {
        cin.tie(0); ios::sync_with_stdio(0);
        cout << setprecision(15) << fixed;
        // #define endl "\n"
    }
} before_main_function;
//------------------8<------------------------------------8<--------------------

signed main() {
    int n;
    cin >> n;
    vector<int> a(n);
    cin >> a;
    int ans = 1;
    int mx = a[0];
    rep(i, 1, n) {
        if (mx <= a[i]) {
            ans++;
        }
        chmax(mx, a[i]);
    }
    cout << ans << endl;
    return (0^_^0);
}



Measured memory_bytes: 256
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <climits>
#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 <queue>
#include <random>
#include <complex>
#include <regex>

using namespace std;

#define SHOW_VECTOR(v) {std::cerr << #v << "\t:";for(const auto& xxx : v){std::cerr << xxx << " ";}std::cerr << "\n";}
#define SHOW_MAP(v){std::cerr << #v << endl; for(const auto& xxx: v){std::cerr << xxx.first << " " << xxx.second << "\n";}}


int main() {

    int N;
    cin >> N;

    vector<int> a(N);
    for (int i = 0; i < N; i++)cin >> a[i], a[i]--;

    int ans = 0;
    for (int i = 0; i < N; i++) if (a[a[i]] == i) ans++;

    cout << ans / 2 << endl;

}


























































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

using namespace std;

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

  int x1, y1, x2, y2;
  cin >> x1 >> y1 >> x2 >> y2;

  int v1 = x2 - x1, v2 = y2 - y1;
  cout << x2 - v2 << " " << y2 + v1 << " " << x2 - v2 - v1 << " " << y2 + v1 - v2 << endl; 

  return 0;
}



Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define retunr return
#define pb push_back
#define mp make_pair
#define null NULL
#define sc(x) scanf("%d", &x)
#define sc64(x) scanf("%I64d", &x)
#define pr(x) printf("%d", (x))
#define sp putchar(' ')
#define ln putchar('\n')
#define pr64(x) printf("%I64d", (x))
#define rep(i,l,r) for (int i = l, lim = r;i <= lim; ++i)
#define repr(i,l,r) for (int i = r, lim = l;i >= lim; --i)
#define fi first
#define se second
#define SET(__set, val) memset(__set, val, sizeof __set)
#define prf(x) printf("%.20f", x)
typedef unsigned int uint;
typedef double db;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define N 100010
#define M 1024
#define MOD 1000000007
void _add(int &a, int b){a = (a+b)%MOD;}
void _sub(int &a, int b){a = (a+MOD-b)%MOD;}
void _mul(int &a, int b){a = (ll)a*b%MOD;}
void _max(int &a, int b){a = max(a,b);}
void _min(int &a, int b){a = min(a,b);}
ll gcd(ll a, ll b){if(!b)return a;return gcd(b,a%b);}
ll pw(ll a, ll b){ll res(1);while(b){if(b&1)res=res*a%MOD;a=a*a%MOD;b>>=1;}return res;}
ll pwM(ll a, ll b, ll mod){ll res(1);while(b){if(b&1)res=res*a%mod;a=a*a%mod;b>>=1;}return res;}

const int infi = 2147483647;
const ll infl = 9223372036854775807ll;
const db PI = 3.14159265358979323846;

/*
struct E{
	int v, w, n;
}G[N];
int cnt, point[N];
void adde(int u, int v, int w = 0){
	G[++cnt]=(E){v,w,point[u]},point[u]=cnt;
	G[++cnt]=(E){u,w,point[v]},point[v]=cnt;
}
void Ginit(){
	cnt = 0;
	SET(point,0);
}
*/
/*
struct hh{
	int a, b;
	bool operator < (const hh &x) const{
		if(a==x.a)return b<x.b;
		return a<x.a;
	}
}a[N];
*/
int n, m, k,q;
int main(){
//	freopen("1", "r", stdin);
	string s;
	cin>>s;
	n = s.length();
	s = "0"+s;
	int ok = 0;
	if(s[1] == 'A'){
		int cnt = 0;
		int x = 0;
		rep(i,3,n-1)cnt += s[i] == 'C';
		if(cnt == 1){
			rep(i,1,n)x += (s[i]>='A'&&s[i]<='Z');
			if(x == 2)ok = 1;
		}
	}
	puts(ok?"AC":"WA");
/*
	int Case;
	sc(Case);
	rep(ca, 1, Case){
	    printf("Case #%d: ", ca);
	}
*/
	return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<vector>
#include<utility>
#include<queue>
#include<deque>
#include<stack>
#include<set>
#include<map>
#include<bitset>
#include<string>
#include<functional>
#define rep(i,n,m) for(int i=(n);i<(int)(m);i++)
#define reps(i,n,m) for(int i=(n);i<=(int)(m);i++)
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(), v.rend()
#define SZ(x) ((int)(x).size())
#define pb push_back
#define fs first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define LB(a,x) lb(all(a), x) - a.begin()
#define UB(a,x) ub(all(a), x) - a.begin()
#define printfdouble(x) printf("%.12f\n",(x))
#define chartoint(c) (int)((c) - '0')
#define chartoll(c) (long long)((c) - '0')
#define MOD 1000000007
#define itn int
#define enld endl
#define ednl endl
#define icn cin
#define Endl endl
#define stirng string
using namespace std;
typedef long long ll;
const double pi = 3.141592653589793;
using Graph = vector<vector<int>>;
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;}
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

int main(){
    cin.tie(0);ios::sync_with_stdio(false);
    ll N; cin >> N;
    ll C[505],S[505],F[505];
    rep(i,0,N-1) cin >> C[i] >> S[i] >> F[i];
    rep(i,0,N){
        ll total = 0;
        rep(j,i,N-1){
            if(total < S[j]){
                total = S[j];
            }else if(total % F[j] != 0){
                total = (total + F[j] - total % F[j]);
            }
            total += C[j];
        }
        cout << total << "\n";
    }
    return 0;
}


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

using namespace std;

bool isRightTriangle(vector<int> &vecSide);

int main(void)
{
    int i,j;
    int n;
    vector<int> vecSide;
    
    cin >> n;
    vecSide.resize(3);
    for (i = 0; i < n; i++) {
        for (j = 0; j < 3; j++) {
            cin >> vecSide[j];
        }
        
        if (isRightTriangle(vecSide)) {
            cout << "YES" << endl;
        } else {
            cout << "NO" << endl;
        }
    }
    
    return 0;
}

bool isRightTriangle(vector<int> &vecSide)
{
    int a,b,c;
    
    if (vecSide[0] > vecSide[1]) {
        swap(vecSide[0], vecSide[1]);
    }
    if (vecSide[1] > vecSide[2]) {
        swap(vecSide[1], vecSide[2]);
    }
    
    a = vecSide[0];
    b = vecSide[1];
    c = vecSide[2];
    
    if (c * c == a * a + b * b) {
        return true;
    } else {
        return false;
    }
}

Measured memory_bytes: 1184
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define fi first
#define se second 
#define pb push_back
#define all(x) (x).begin() , (x).end()
#define rep(i,a,b) for( ll i = a ; i < b ; i+=1 )
#define pp pair<ll,ll> 
#define sz(v) (ll)(v.size())
#define hell (ll)1000000007
#define slld(x) scanf("%lld",&x)
ll t = 1;
void solve() 
{
	ll n, tmp;
	cin>>n;
	if(n&1){
		cout<<"0\n";return;
	}
	ll cnt2=n/2, cnt5=0;
	tmp=n;
	n/=2;
	while(n){
		cnt2+=n/2;
		n/=2;
	}
	n=tmp/2;
	while(n){
		cnt5+=n/5;
		n/=5;
	}
	cout<<min(cnt2,cnt5)<<"\n";
}
signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    //cin >> t ;
    while(t--){
        solve();
    }
    return 0 ;
}


Measured memory_bytes: 256
using System;
using System.IO;

class Program{
    static void Main(string[] args){
        var N = int.Parse(Console.ReadLine());
        var plusTax = 1.08;
        var X = Math.Ceiling(N / plusTax);
        var m = (int) (X * plusTax);
        var answer = m != N ? ":(" : X.ToString();
        var writer = new StreamWriter(Console.OpenStandardOutput()) {AutoFlush = false};
        Console.SetOut(writer);
        Console.WriteLine(answer);
        Console.Out.Flush();}}

Measured memory_bytes: 27552
//
// Created by Hideaki Imamura on 2020-03-30.
//
# include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair <ll, ll> l_l;
typedef pair<int, int> i_i;

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

# define EPS (1e-7)
# define INF (1e9)
# define PI (acos(-1))
//const ll mod = 1000000007;

int A, B, C, X, Y;

int main() {
    cin >> A >> B >> C >> X >> Y;
    int ans = INF;
    for (int z = 0; z <= X + Y; ++z) {
        ans = min(ans, 2 * C * z + A * max(0, X - z) + B * max(0, Y - z));
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
k,n = list(map(int,input().split()))
mod = 998244353
fact = [1]*(n+k+1)
rfact = [1]*(n+k+1)
for i in range(1, n+k):
    fact[i] = r = (i * fact[i-1]) % mod
    rfact[i] = pow(r, mod-2, mod)

save = []
for p in range(1,int((k+3)/2)):
    i = 2 * p + 1
    temp = 0
    for t in range(min(p+1,n+1)):
        if k-i+t<0:continue
        res = (fact[p] * rfact[t] * rfact[p-t]) % mod
        res *= (fact[n+k-i] * rfact[k-i+t] * rfact[n-t]) % mod
        res *= pow(2,t,mod)
        temp = (temp+res) % mod
    save.append(temp)
output = []
i = 1
while i<k:
    output.append(save[(i-1)//2])
    i+=1

for x in output+[save[-1]]+output[::-1]:
    print(x)



Measured memory_bytes: 3608
#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define uli unsigned long long int
#define INF 999999999999999999
#define rep(i,m,n) for(lli i = m;i < n;i++)
#define rrep(i,m,n) for(lli i=m-1;i>=n;i--)
#define pb(n) push_back(n)
#define UE(N) N.erase(unique(N.begin(),N.end()),N.end());
#define Sort(n) sort(n.begin(), n.end())
#define Rev(n) reverse(n.begin(),n.end())
#define Out(S) cout << S << endl
#define NeOut(S) cout << S
#define HpOut(S) cout << setprecision(25) << S << endl
#define Vec(K,L,N,S) vector<L> K(N,S)
#define DV(K,L,N,M,S) vector<vector<L>> K(N,vector<L>(M,S))
#define TV(K,L,N,M,R,S) vector<vector<vector<L>>> K(N,vector<vector<L>>(M,vector<L>(R,S)))
#define pint pair<lli,lli>
#define paf(L,R) pair<L,R>
#define mod 1000000007
#define MAX 5100000
#define ALL(a)  a.begin(),a.end()
#define chmax(a, b) a = (((a)<(b)) ? (b) : (a))
#define chmin(a, b) a = (((a)>(b)) ? (b) : (a))
int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  lli A,B,C,D,E,F,N,M,K,L,X,Y,Z,H,W,sum=0,num=0,flag=0;string S,T;
  cin >> N;
  HpOut((double)(N*N*N)/27);
}


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

int main() {
	string S;
	cin >> S;
	int Q, cnt = 0;
	cin >> Q;
	for (int i = 0; i < Q; i++) {
		int tmp;
		cin >> tmp;
		if (tmp == 1) {
			cnt++;
		}
		else if (tmp == 2) {
			int F;
			string c;
			cin >> F >> c;
			if (F == 1) {
				if (cnt % 2 == 0) {
					S.insert(0, c);
				} else {
					S += c;
				}
			}
			else if (F == 2) {
				if (cnt % 2 == 0) {
					S += c;
				} else {
					S.insert(0, c);
				}
			}
		}
	}
	if (cnt % 2 == 1) reverse(S.begin(), S.end());
	cout << S << endl;
}

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

int main(){
  int n, k, x;
  cin >> n >> k;
  int a = 0;
  rep(i, n) {
    cin >> x;
    if (x < k - x) {
      a += x * 2;
    } else {
      a += (k - x) * 2;
    }
  }
  cout << a << endl;
}


Measured memory_bytes: 3624
#include "bits/stdc++.h"
#define YES "YES"
#define NO "NO"
#define YESNO OUT(three(solve(),YES,NO))
#define ECHO OUT(solve())
#define three(A,B,C) ((A)?(B):(C))
#define FOR(i,a,b)  for(LL i=(a);i< (LL)(b);i++)
#define EFOR(i,a,b) for(LL i=(a);i<=(LL)(b);i++)
#define RFOR(i,a,b) for(LL i=(b);i>=(LL)(a);i--)
#define REP(i,b) FOR(i,zero,b)
#define rep REP
#define EREP(i,b) EFOR(i,zero,b)
#define RREP(i,b) RFOR(i,b,zero)
#define ALL(c) c.begin(),c.end()
#define UNIQUE(c) sort(ALL(c));c.erase(unique(ALL(c)),c.end())
#define MAX(c) (*max_element(ALL(c)))
#define MIN(c) (*min_element(ALL(c)))
#define MP make_pair
#define FI first
#define SE second
#define SI(x) (LL(x.size()))
#define PB push_back
#define DEBUG(a) OUT(a)
#define DEBUG2(a,b) OUT2(a,b)
#define cat cout << __LINE__ << endl
#define OUT(a) cout << (a) << endl
#define OUT2(a,b) cout << (a) <<" "<<(b) << endl
#define zero 0LL
#define all ALL
#define pb emplace_back
#define eb pb
#define int long long
using namespace std;
template<typename T> inline void maximize(T &a, T b) { a = max(a, b); }
template<typename T> inline void minimize(T &a, T b) { a = min(a, b); }
template<typename T> inline bool middle(T a, T b, T c) { return b <= a && a <= c; }
template<class T> inline bool MX(T &l, const T &r) { return l < r ? l = r, 1 : 0; }
template<class T> inline bool MN(T &l, const T &r) { return l > r ? l = r, 1 : 0; }
typedef int LL;
typedef double ld;
typedef int ut;
typedef vector<ut> VI;
typedef vector<VI> VII;
typedef pair<ut, ut> pr;
typedef pair<ut, pr> ppr;
typedef vector<pr> Vpr;
typedef vector<ppr> Vppr;
typedef tuple<int, int, int, int> tapu;
typedef vector<tapu> Vtapu;
typedef priority_queue<tapu, Vtapu, greater<tapu> > PQ;
inline void outputVI(VI x) { REP(i, SI(x)) { cout << three(i, " ", "") << x[i]; }OUT(""); }
const int SIZE1 = 3e5 + 1000;
const int SIZE2 = 5010;
const int SIZE3 = 430;
const int SIZE = SIZE1;
const int MAPSIZE = 40;
const LL p = 7 + 1e9;
const LL INF = 1LL << 60;
const long double EPS = 1e-7;
typedef pair<ld, ut> pld;
 

signed main(){
  LL T1,T2,R1,R2;
 	cin >> T1>> T2>>R1>>R2;
  if(R1==-1 or R2==-1 ){
    if(T1==T2) cout << "Draw" << endl;
    else if(T1<T2) cout << "Alice" << endl;
    else cout <<"Bob" << endl;
  }
  else if(R1==R2) cout << "Draw" << endl;
  else if(R1>R2) cout << "Alice" << endl;
  else cout << "Bob" << endl;
  return 0;
}



Measured memory_bytes: 3104
#include<stdio.h>
#include<string.h>
#define MAX 100
#define INF 200000
#define WHITE 0
#define GRAY 1
#define BLACK 2

int n,M[MAX][MAX];

void dijkstra(){
  int i,v,min;
  int d[MAX],color[MAX];

  for(i=0;i<n;i++){
    d[i]=INF;
    color[i]=WHITE;
  }

  d[0]=0;
  color[0]=GRAY;
  while(1){
    min=INF;
    int u=-1;
    for(i=0;i<n;i++){
      if(min>d[i] && color[i]!=BLACK){
	u=i;
	min=d[i];
      }
    }
    if(u==-1)break;
    color[u]=BLACK;
    for(v=0;v<n;v++){
      if(color[v] != BLACK && M[u][v] != INF){
	if(d[v]>d[u]+M[u][v]){
	  d[v]=d[u]+M[u][v];
	  color[v] = GRAY;
	}
      }
    }
  }
  
  for(i=0;i<n;i++){
    printf("%d %d\n",i,d[i]==INF ? -1 :d[i]);
  }
}

int main(){
  int i,j;
  scanf("%d",&n);
  
  for(i=0;i<n;i++){
    for(j=0;j<n;j++){
      M[i][j] = INF;
    }
  }

  int k,c,u,v;
  for(i=0;i<n;i++){
    scanf("%d%d",&u,&k);
    for(j=0;j<k;j++){
      scanf("%d%d",&v,&c);
      M[u][v]=c;
    }
  }

  dijkstra();

  return 0;
}

Measured memory_bytes: 636
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<ctype.h>
#include<stdlib.h>
#define STR 11
int main(){
    char S[STR],T[STR+1];
    scanf("%s %s",S,T);
    for(int i=0;S[i] != '\0';i++){
        if(S[i]!=T[i]){
            printf("No\n");
            return 0;
        }
    }
    printf("Yes\n");
    return 0;
}

Measured memory_bytes: 1612
# Problem https://atcoder.jp/contests/abc095/tasks/abc095_b
# Python 2nd Try


def solver(donuskind, eachgram, givenpow):
    result = 0
    eachonesum = sum(eachgram)
    mingram = min(eachgram)
    result = donuskind + ((givenpow - eachonesum) // mingram)
    return result


if __name__ == "__main__":
    N, X = map(int, input().split())
    gram = []
#    print("N={} X={}".format(N, X))
    for j in range(0, N, +1):
        gram.append(int(input()))
    print("{}".format(solver(N, gram, X)))
#    print("gram = {}".format(gram))


Measured memory_bytes: 3060
S = input()
ans = 0
if S[0] == 'R':
    if S[1] == 'R':
        ans = 2
        if S[2] == 'R':
            ans =3
    if S[1] == 'S':
        ans=1
else:
    if S[1] == 'R':
        if S[2] == 'R':
            ans = 2
        else:
            ans = 1
    else:
        if S[2] == 'R':
            ans = 1
print(ans)

Measured memory_bytes: 9088
#include <algorithm>
#include <iostream>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <bitset>
#include <complex>
#include <unistd.h>
#include <cassert>
#include <cctype>
#include <random>
#define _USE_MATH_DEFINES
#define _GLIBCXX_DEBUG
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef pair<double, ll> pdlg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef tuple<double, double, double> tddd;
typedef complex<double> xy_t;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
double pi = 3.141592653589793;
ll mod = 1000000007;
int intmax = 2147483647;
int intmin = -2147483648;
ll llmax = 9223372036854775807;
ll llmin = -9223372036854775807;
int iinf = intmax / 8;
ll inf = llmax / 8;
double eps = 1e-11;

int rail[510][510];

int main() {
    int N, M, Q;
    cin >> N >> M >> Q;
    for (int i = 0; i < 510; i++) {
        fill(rail[i], rail[i] + 510, 0);
    }
    for (int i = 0; i < M; i++) {
        int L, R;
        cin >> L >> R;
        rail[L][R]++;
    }
    for (int i = 1; i <= N; i++) {
        for (int j = i; j <= N; j++) {
            rail[i][j + 1] += rail[i][j];
        }
    }
    for (int i = 0; i < Q; i++) {
        int p, q;
        cin >> p >> q;
        ll ans = 0;
        for (int i = p; i <= q; i++) {
            ans += rail[i][q];
        }
        cout << ans << endl;
    }
}


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

signed main(){
  lint N; cin >> N;
  string s; cin >> s;
  lint B = 0, W = 0;
  for(lint i = 0; i < N; i++){
    if(s[i] == '.') W++;
  }
  lint ans = W;
  for(lint i = 0; i < N; i++){
    lint ans1;
    if(s[i] == '#') B++;
    else W--;
    ans1 = W + B;
    ans = min(ans, ans1);
  }
  cout << ans << endl;
}

Measured memory_bytes: 640
#include<bits/stdc++.h>
using namespace std;
#define int long long int 
#define debug(x) cerr << "[(" << __LINE__ << ") " << (#x) << "]: " << x << endl;

const int N = 1e6;

int n , a[N];

int32_t main() {
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    
    cin >> n;
    int sum = 0;
    for(int i = 1 ; i <= n ; i++){
        int x ;cin >> x;
        a[x]++;
        sum += x;
    }
    int q;
    cin >> q;
    while(q--){
        int x , y;
        cin >> x >> y;
        int u = a[x];
        a[x] = 0;
        a[y] += u;
        sum = sum - x * u + u * y;
        cout << sum << "\n"; 
    }


    return 0;
}



Measured memory_bytes: 4396
#include<bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
using namespace std;
#define rep(i,x) for(int i = 0; i < x; i++)
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<ll,ll> Pll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<vector<vector<int>>> vvvi;
const ll N = 1e9+7;
const int n_max = 1e5+10;

int main(){
    ll n; cin >> n;
    vector<ll> a(n+1);
    rep(i,n+1) cin >> a[i];
    vector<ll> b(n);
    rep(i,n) cin >> b[i];

    ll ans = 0;
    while(a.size() > 1){
        ll alast = a.back();a.pop_back();
        ll alast2 = a.back();a.pop_back();
        ll blast = 0;
        ll temp = 0;
        assert(b.size() > 0);
        blast = b.back();b.pop_back();
        
        if(alast <= blast){
            temp = alast + alast2;
            if(temp >= blast){
                ans += blast;
                temp -= blast;
            }
            else{
                ans += temp;
                temp = 0;
            }
            a.push_back(temp);
        }
        else{
            ans += blast;
            a.push_back(alast2);
        }

    }
    cout << ans << endl;
    return 0;

}

Measured memory_bytes: 1920
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef long long ll;
typedef pair<ll,ll> pll;
#define INF 1000000007
#define H first
#define I second
ll n;
pll arr[100010];
ll ans[100010];
bool cmp(pll a,pll b){
	if(a.H!=b.H)	return a.H>b.H;
	return a.I<b.I;
}
int main(){
	cin>>n;
	ll k;
	for(int i=0;i<n;i++){
		cin>>k;
		arr[i]={k,i+1};
	}
	sort(arr,arr+n,cmp);
	int now=0;
	ll hi=arr[0].H;
	ll mi=INF;
	while(now<n){
		if(mi<INF)
			ans[mi]+=(hi-arr[now].H)*now;
		hi=arr[now].H;
		while(now<n&&arr[now].H==hi){
			mi=min(mi,arr[now].I);
			now++;
		}
	}
	ans[mi]+=hi*now;
	for(int i=1;i<=n;i++)
		cout<<ans[i]<< '\n';
	return 0;
}

Measured memory_bytes: 3456
/////////////////////////////////////////
///       Please Give Me AC!!!!!      ///
/////////////////////////////////////////

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define forin(in) for(int i=0; i<(int)in.size(); i++) cin>>in[i]
#define forout(out) for(int i=0; i<(int)out.size(); i++) cout<<out[i]<<endl
#define rep(i, n) for(int i=0; i<(n); i++)

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


int main() {
    const int MOD = 1000000007;
    int N; cin>> N;

    int ans = modpow(10, N, MOD) - 2 * modpow(9, N, MOD) + modpow(8, N, MOD);
    cout<< (ans % MOD + MOD) % MOD << endl;
}

Measured memory_bytes: 3612
//
//  main.cpp
//  ABC154B
#include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
    string S;
    cin>>S;
    unsigned long len=S.length();
    for (int i=0; i<len; i++) {
        cout<<"x";
    }
    cout<<endl;
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <sstream>
#include <vector>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iomanip>
#include <cstdio>
#include <float.h>
#include <queue>
#include <set>
#include <map>
#include <fstream>
#include <cstdlib>
#include <string>
#include <cstring>
#include <algorithm>
#include <numeric>
#include <stack>
#include <functional>
       
using namespace std;
       
#define endl '\n'
#define MOD 1000000007
#define INF 1ll<<30
 
// #define MAX 100010
 
#define eps 1e-11
#define bit_max 1ll<<32
#define _USE_MATH_DEFINES
 
// long long binpow(long long a,long long b)
// {
//     if (b == 1) return a;
//     long long res = binpow(a, b/2)%MOD;
//     if (b % 2) return (res*((res*a)%MOD))%MOD;
//     else return (res * res)%MOD;
// }
 
// long long int fact(long long int a)
// {
//     if(a==0||a==1)
//         return 1;
//     long long int ans = 1;
//     for(int i=a;i>=1;i--)
//         ans = (ans * i);
//     return ans;
// }
 
// long long int ivmod(long long int a)
// {
//     return binpow(a,MOD-2);
// }
 
// long long int ncr(long long int a,long long int b)
// {
//     long long int pans=1;
//     for(int i =a;i>max(b,a-b);i--)
//         pans=pans*i;
//     long long int div = fact(min(b,a-b));
//     // cout<<ans<<"            "<<div<<endl;
//     pans = pans/div;
//     return pans;
// }

long long int solve(int size, int a[])
{
    long long int ans = 0;
    if(size%2==0)
    {
        long long int k = size-1;
        for(int i=size-1;i>=0;i--)
        {
            ans+=k*a[i];
            ans = ans%MOD;
            k-=2;
        }
    }
    else
    {
        long long int k = size-1;
        for(int i=size-1;i>=0;i--)
        {
            ans+=k*a[i];
            ans = ans%MOD;
            k-=2;
        }
    }
    return ans;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    // #ifndef ONLINE_JUDGE
        // freopen("input.txt","r",stdin);
        // freopen("output.txt","w",stdout);
    // #endif
    int n;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
    }
    int count = 1;
    int prev_val;
    if(n==1)
    {
        cout<<1<<endl;
        return 0;
    }
    if(a[1]>a[0])
        prev_val = 1;
    else if (a[0]==a[1])
        prev_val = 0;
    else
        prev_val = -1;
    for(int i=2;i<n;i++)
    {
        // cout<<prev_val<<"   "<<i<<endl;
        if(prev_val==1)
        {
            if(a[i]<a[i-1])
            {
                count++;
                prev_val=0;
            }
        }
        else if (prev_val==-1)
        {
            if(a[i]>a[i-1])
            {
                count++;
                prev_val = 0;
            }
        }
        else
        {
            if(a[i]<a[i-1])
            {
                prev_val=-1;
            }
            else if(a[i]>a[i-1])
            {
                prev_val =1;
            }
        }
    }
    cout<<count<<endl;
    return 0;
}

Measured memory_bytes: 640
#from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    a,b,c,x,y = mi()
    ans = 1<<60
    for i in range(max(x,y)+1):
        ans = min(max(x-i,0)*a+max(y-i,0)*b+2*i*c,ans)
    print(ans)


main()




Measured memory_bytes: 3700
#include <stdio.h>

int main()
{
	long N;
	scanf("%ld", &N);
	long M;
	scanf("%ld", &M);
	long a[M + 1];
	int i = 0;
	long sum = 0;
	while (i < M)
	{
		scanf("%ld", &a[i]);
		sum += a[i];
		i++;
	}
	if (N - sum >= 0)
		printf("%ld\n", N - sum);
	else
	{
			printf("-1\n");
	}
	
	return 0;
}


Measured memory_bytes: 2204
#include <cstdio>
#include <utility>
using namespace std;

#define gcu getchar_unlocked
#define pcu putchar_unlocked
#define _T template <typename T>
#define _HT template <typename H, typename... T>
#define _il inline
#define _in _il int in
#define _sc _il bool scan
_T T in(int c){T n=0;bool m=false;if(c=='-')m=true,c=gcu();
	do{n=10*n+(c-'0'),c=gcu();}while(c>='0');return m?-n:n;} //&&c<='9'
_in() {return in<int>(gcu());}
_T T scan(T &n){int c=gcu();return c==EOF?false:(n=in<T>(c),true);}
_sc(char &c){c=gcu();gcu();return c!=EOF;}
#ifdef _GLIBCXX_STRING
_sc(string &s){int c;s="";
	for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=c;}}
#endif
_HT _sc(H &h, T&&... t){return scan(h)&&scan(t...);}
#define _vo _il void out
#define _vl _il void outl
_vo(const char *s){while(*s)pcu(*s++);}
_vo(char c){pcu(c);}
#ifdef _GLIBCXX_STRING
_vo(string s){for(char c:s)pcu(c);}
#endif
_T _vo(T n){static char buf[20];char *p=buf;
	if(n<0)pcu('-'),n*=-1;if(!n)*p++='0';else while(n)*p++=n%10+'0',n/=10;
	while (p!=buf)pcu(*--p);}
_vl(){out('\n');}
#ifdef _GLIBCXX_VECTOR
_T _vo(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);outl();}
#endif
_HT _vo(H&& h, T&&... t){out(h);out(move(t)...);}
template <typename... T> _vl(T&&... t){out(move(t)...);outl();}

int main() {
	for (int n; (n = in());) {
		int h = 0;
		for (int i = n / 4; i; i--)
			h += in();
		outl(h);
	}
}


Measured memory_bytes: 2460
#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <map>

using namespace std;

int main(){
	
	int N, A, B, max, ans;
	
	max = 0;
	
	cin >> N;
	
	for(int i = 0; i < N; i++){
		cin >> A >> B;
		if(A > max){
			ans = B;
			max = A;
		}
	}
	
	cout << ans + max << endl;
	
	return 0;
}

Measured memory_bytes: 384
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
using ll=long long;
using vec=vector<ll>;
using graph = vector<vector<ll>>;
#define loop(i,n) for(ll i=0;i<n;i++)
#define Loop(i, m, n) for(ll i = m;i < n;i++)
#define pool(i,n) for(ll i=n-1;i>=0;i--)
#define Pool(i, m, n) for(ll i=n-1;i>=m;i--)
#define MAX 999999999ll
#define MIN -999999999ll
#define setbit bitset<8>
#define flagcount __builtin_popcount
#define flag(x) (1<<x)
#define flagadd(bit,x) bit|=flag(x)
#define flagpop(bit,x) bit&=~flag(x) 
#define flagon(bit,i) bit&flag(i)
#define flagoff(bit,i) !(bit & (1<<i))
#define all(v) v.begin(),v.end()
#define low2way(v,x) lower_bound(all(v),x)
#define high2way(v,x) upper_bound(all(v),x)
#define count2way(v,x) high2way(v,x)-low2way(v,x)
#define lower(v,x) low2way(v,x)-v.begin() //1番左が0、もし見つから無いならｎを出力
#define higher(v,x) high2way(v,x)-v.begin()-1 //1番左が0、もし見つからないならn-1を出力（注意）
#define putout(x) cout<<x<<endl
int main() {
  cout << fixed << setprecision(16);
  ll n;
  cin>>n;
  ll x,y;
  Pool(i,1,10){
    if(n%i==0){
      x=i;
      y=n/i;
      break;
    }
  }
  if(x<10&&y<10){
    putout("Yes");
  }
  else putout("No");
}

Measured memory_bytes: 256
from sys import stdin
# import sys
# import itertools
# import math

K, S = [int(x) for x in stdin.readline().rstrip().split()]
# print(2500**2)
cnt = 0
for i in range(K+1):
    for k in range(K+1):
        Z = S-i-k
        if 0 <= Z and Z <= K:
            cnt += 1
print(cnt)


Measured memory_bytes: 2940
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <numeric>
using namespace std;
typedef long long int ll;

int main(){
    string s; cin >> s;
    int n=s.size();
    bool ok=true;
    for(int i=0;i<n;i+=2){
        if(s[i]=='L')ok=false;
    }
    for(int i=1;i<n;i+=2){
        if(s[i]=='R')ok=false;
    }
    if(ok){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#define rep(i,n) for(int i = 0;  i < n ; ++i)
#define REP(i,a,b) for(int i = a ; i <= b ; ++i)
#define filei freopen("input.txt", "r", stdin);
#define fileo freopen("output.txt", "w", stdout);
#define gooi cout<<"Case #"<<i+1<<" :";
#define s(n) scanf("%d",&n)
#define rev(i,n) for(int i = n ; i >= 0 ; --i)
#define REV(i,a,b) for(int i = a ; i >= b ; --i)
#define miN(a,b) (((a)<(b))?(a):(b))
#define sc(n) scanf("%c",&n)
#define tr(c,i) for(typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define INF 1000000000
#define pii pair<long long int,long long int>
#define pb(a) push_back(a)
#define F first
#define S second
typedef long long ll;
using namespace std;
void pre(){}
void solve(){
    ll n,m,k;cin>>n>>m>>k;
    ll arr[n+1];
    ll brr[m+1];
    arr[0]=0;
    brr[0]=0;
    for(int i=1;i<=n;i++){
        cin>>arr[i];
        arr[i]+=arr[i-1];
    }
    for(int i=1;i<=m;i++){
        cin>>brr[i];
        brr[i]+=brr[i-1];
    }
    ll i = 0;
    ll j = m;
    ll ans = 0;
    for(;i<=n;i++){
        if(arr[i]>k){
            break;
        }
        while(j>0 && brr[j]+arr[i]>k){
            j--;
        }
        ans = max(ans,i+j);
    }
    cout<<ans<<"\n";
}
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    pre();
    long long int num = 1;
    //cin>>num;
    for(long long int i=0;i<num;i++){
       	solve();
    }   
}





Measured memory_bytes: 6764
#include <vector>
#include <map>
#include <set>
#include <cmath>
#include <iostream>
#include <algorithm>

typedef char                SINT8;
typedef unsigned char       UINT8;
typedef short               SINT16;
typedef unsigned short      UINT16;
typedef int                 SINT32;
typedef unsigned int        UINT32;
typedef long long           SINT64;
typedef unsigned long long  UINT64;
typedef double              DOUBLE;

#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)>(0)?(a):-(a))
#define rep(i,a,b) for(int (i)=int(a);(i)<int(b);(i)++)

#define INF 1e9;
#define MOD 1e9+7;
#define INF64 1e18;


using namespace std;

int main() {

	SINT32 N = 0;
	SINT32 M = 0;
	SINT32 X = 0;
	SINT32 cnt = 0;
	SINT32 ANS = 0;

	cin >> N;
	cin >> M;
	cin >> X;

	vector<SINT32> DATA(M);
	
	rep(i,0,M) {
		cin >> DATA[i];
		if (DATA[i] > X) {
			cnt++;
		}
	}
	ANS = MIN(cnt,(M-cnt));

	cout << ANS << endl;
	return 0;
}

//	sort(DATA.begin(),DATA.end());
//	sort(DATA.begin(),DATA.end(),std::greater<SINT32>());
//	__gcd(ANS,DATA[i]);

//	// DATA.emplace_back(BUF);	//後ろに追加

//  DATA.erase(std::unique(DATA.begin(), DATA.end()), DATA.end());	//ソート後に使用

//	DATA.insert(DATA.begin() + X, 0);	//X番目の要素に0を挿入


//	vector<vector<SINT32>> DP(N,vector<SINT32>(3));　//2次元配列

/*
	SINT32 M = 3;
	vector<pair<SINT32,SINT32>> DATA2(M);
	for (SINT32 i = 0; i < M; i++) {
		cin >> DATA2[i].first;
		cin >> DATA2[i].second;
	}
	sort(DATA2.begin(),DATA2.end());
	cout << DATA2[0].first << endl;
	cout << DATA2[0].second << endl;
*/

// 	vector<pair<int,pair<int,int>>> DATA(M);
//	cin >> DATA[i].first;
//	cin >> DATA[i].second.first;
//	cin >> DATA[i].second.second;


//		APOSI = lower_bound(ADATA.begin(),ADATA.end(),QDATA[i]) - ADATA.begin();
//		BPOSI = lower_bound(BDATA.begin(),BDATA.end(),QDATA[i]) - BDATA.begin();


/* 文字列回転
	string N;
	cin >> N;
	N = N[N.length()-1] + N.substr(0,N.length()-1);
*/

/* SET コンテナ
	set<SINT32> DATA;
	for (SINT32 i = 0; i < N; i++) {
		SINT32 buf;
		cin >> buf;
		DATA.insert(buf);
	}

	//全表示
    set<string>::iterator it; //  イテレータを用意
    for(it = DATA.begin(); it != DATA.end(); it++) {
        cout << *it << endl;
    }

	//N番目を一部表示
	set<string>::iterator it; //  イテレータを用意
	it = DATA.begin();
	rep (i,0,N) {
		it++;
	}
	cout << *it << endl;
*/

/* map
	map<string,SINT32> mp;
	SINT32 N = 0;
	SINT32 mx = 0;

	cin >> N;
	for (SINT32 i = 0; i < N; i++) {
		string s;
		cin >> s;
		mp[s]++;
	}
	for(auto it=mp.begin();it!=mp.end();it++) {
		mx=max(mx,it->second);
	}

*/

Measured memory_bytes: 256
def main():
    N = int(input())
    a_list = list(map(int, input().split(' ')))
    answer = 'APPROVED'
    for a in a_list:
        if a % 2 == 0:
            if a % 3 != 0 and a % 5 != 0:
                answer = 'DENIED'
                break
    print(answer)


if __name__ == '__main__':
    main()


Measured memory_bytes: 2940
#include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;

int main(){
	int r;
	cin >> r;
	cout << 3*r*r << endl;
	return 0;
}

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

int main() {
  /* code */
  int h, n;
  cin >> h >> n;
  int skill;
  int sum_skill = 0;
  for(int i = 0; i < n; i++) {
    cin >> skill;
    sum_skill += skill;
  }
  if(sum_skill >= h){
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
  return 0;

}

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

int main(void) {
	long long a, b, x;
	cin >> a >> b >> x;

	long long l = b/x + 1, f;
	if(a != 0) f = (a-1)/x + 1;
	else f = 0;

	cout << l - f << endl;
}


Measured memory_bytes: 256
// g++ -std=c++11 a.cpp
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>	
#include<map>
#include<set>
#include<unordered_map>
#include<utility>
#include<cmath>
#include<random>
#include<cstring>
#include<queue>
#include<stack>
#include<bitset>
#include<cstdio>
#include<sstream>
#include<iomanip>
#include<assert.h>
#include<typeinfo>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define FOR(i,a) for(auto i:a)
#define pb push_back
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
#define show1d(v) rep(i,v.size())cout<<" "<<v[i];cout<<endl<<endl;
#define show2d(v) rep(i,v.size()){rep(j,v[i].size())cout<<" "<<v[i][j];cout<<endl;}cout<<endl;
using namespace std;
//kaewasuretyuui
typedef long long ll;
//#define int ll
typedef int Def;
typedef pair<Def,Def> pii;
typedef vector<Def> vi;
typedef vector<vi> vvi;
typedef vector<pii> vp;
typedef vector<vp> vvp;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef pair<Def,pii> pip;
typedef vector<pip>vip;
#define mt make_tuple
typedef tuple<int,int,int> tp;
typedef vector<tp> vt;
template<typename A,typename B>bool cmin(A &a,const B &b){return a>b?(a=b,true):false;}
template<typename A,typename B>bool cmax(A &a,const B &b){return a<b?(a=b,true):false;}
const double PI=acos(-1);
const double EPS=1e-9;
Def inf = sizeof(Def) == sizeof(long long) ? 2e18 : 1e9+10;
int dx[]={0,1,0,-1};
int dy[]={1,0,-1,0};
int main(){
	int n,m;
	cin>>n>>m;
	vvi in(n,vi(3));
	rep(i,n)rep(j,3)cin>>in[i][j];
	
	vd data(m+2);
	data[1]=1;
	rep(i,m)for(int j=m;j>=0;j--){
		data[j+1]+=data[j]/3;
		data[j]*=2./3;
	}
	rep(i,m+1)data[i+1]+=data[i];
	
	vvd dp(3,vd(m+1));
	int w[]={5,3,2};
	rep(i,3)rep(j,m+1){
		int t=in[0][i]*j;
		vd d={1,0,0,0};
		double q=1;
		loop(k,1,n){
			vd nd(4);
			int co=(t+in[k][i]-1)/in[k][i];
			double a=data[min(m+1,co)];//t以下になる確率
			rep(l,3){
				nd[l]+=d[l]*a;
				nd[l+1]+=d[l]*(1-a);
			}
			q*=1-a;
			d=nd;
		}
		dp[i][j]=w[i]*(d[0]+d[1]+d[2])-q;
	}

	double out=-3;
	rep(i,m+1)rep(j,m+1)if(i+j<=m){
		out=max(out,dp[0][i]+dp[1][j]+dp[2][m-i-j]);
	}
	
	cout<<shosu(9)<<out<<endl;
}














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

#define ll long long
#define ar array

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

	int n;
	cin >> n;
	cout << (n+999)/1000*1000-n;

	return 0;
}

/* stuff you should look for
	* int overflow, array bounds
	* special cases (n=1?)
	* do smth instead of nothing and stay organized
	* WRITE STUFF DOWN
*/


Measured memory_bytes: 3604
N, Q = map( int, input().split())
s = input()
TD = [list( input().split()) for _ in range(Q)]
l = -1
r = N
while r-l >= 2:
    m = (l+r)//2
    now = m
    fall = False
    for i in range(Q):
        t, d = TD[i]
        if d == "L":
            if s[now] == t:
                if now == 0:
                    fall = True
                    break
                now -= 1
        else:
            if s[now] == t:
                # if now = N-1:
                #     fall = True
                #     break
                if not now == N-1:
                    now += 1
    if fall == True:
        l = m
    else:
        r = m
L = l
l = max(L-2,-1)
r = N
while r-l >= 2:
    m = (l+r)//2
    now = m
    fall = False
    for i in range(Q):
        t, d = TD[i]
        if d == "L":
            if s[now] == t:
                if not now == 0:
                    now -= 1
        else:
            if s[now] == t:
                if now == N-1:
                    fall = True
                    break
                now += 1
    if fall == True:
        r = m
    else:
        l = m
R = r
print( max(0, R - L-1))


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

int main(){
  string S(3,'\0');
  int y;
  cin>>S;
  if(S == "xxx"){
    y=700;
  }
  else if(S == "ooo"){
    y=1000;
  }
  else if(S == "xox"||S == "xxo"||S == "oxx"){
    y=800;
  }
else{
    y=900;
  }
  cout<<y;
    return 0;
}

Measured memory_bytes: 256
#if 1
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <array>
#include <deque>
#include <algorithm>
#include <utility>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <numeric>
#include <assert.h>
#include <bitset>
#include <list>
#include <cmath>

auto& in = std::cin;
auto& out = std::cout;
#define all_range(C) std::begin(C), std::end(C)
const double PI = 3.141592653589793238462643383279502884197169399375105820974944;

int64_t N, K;
int64_t A[100000];

int64_t func(int i)
{
	if (i < 0) { return 0; }

	int64_t resX = 0;
	int64_t x = (int64_t(1) << 60);
	while (x > K) { x >>= 1; }
	while (x > (int64_t(1) << i)) { resX |= (K&x); x >>= 1; }
	while (x>0 && (K&x) == 0) { x >>= 1; }
	x >>= 1;
	bool over = true;
	for (; x > 0; x >>= 1)
	{
		int32_t count = 0;
		for (size_t i = 0; i < N; i++)
		{
			if ((A[i] & x) == 0) {
				++count;
			}
		}

		if (over)
		{
			if (count > N / 2) {
				resX += x;
			}
		}
		else
		{
			if ((K&x) != 0) {
				if (count > N / 2) {
					resX += x;
				}
				else {
					over = true;
				}
			}
			else {
				//0
			}
		}
	}
	int64_t res = 0;
	for (size_t i = 0; i < N; i++)
	{
		res += (A[i] ^ resX);
	}
	return std::max(res, func(i - 1));
}

int main()
{
	using std::endl;
	in.sync_with_stdio(false);
	out.sync_with_stdio(false);
	in.tie(nullptr);
	out.tie(nullptr);

	in >> N >> K;
	for (size_t i = 0; i < N; i++)
	{
		in >> A[i];
	}
	int64_t res = 0;
	for (size_t i = 0; i < N; i++)
	{
		res += (A[i] ^ K);
	}
	out << std::max(func(60), res) << endl;

	return 0;
}
#endif


Measured memory_bytes: 1024
/**
 *      purpose : 
 *      author  : kyomukyomupurin
 *      created : 
**/

// input/output
#include <iostream>
#include <fstream>
#include <sstream>
// container class
#include <array>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
// math, algorithm
#include <algorithm>
#include <cmath>
#include <complex>
#include <numeric>
// etc
#include <bitset>
#include <cctype>
#include <cstring>
#include <chrono>
#include <iomanip>
#include <random>
#include <utility>
// using-directive
using namespace std;
// alias template
using int64 = int64_t;
using pii = pair<int, int>;
using pll = pair<int64_t, int64_t>;
// text macro replacement
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define print(x) cout << (x) << '\n'
#define debug(x) cout << #x << ": " << (x) << '\n'

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);

  int n, k; cin >> n >> k;
  print(n - k + 1);

  return 0;
}

Measured memory_bytes: 256
A,V = list(map(int,input().split()))
B,W = list(map(int,input().split()))
T = int(input())
if A < B:
    a = A + V*T
    b = B + W*T
    if a >= b:
        print('YES')
    else:
        print('NO')
if A == B:
    print('YES')
if A > B:
    a = A - V*T
    b = B - W*T
    if a <= b:
        print('YES')
    else:
        print('NO')

Measured memory_bytes: 61660
def main():
    import sys
    input = sys.stdin.readline

    N, Q = map(int, input().split())
    s = input().rstrip()

    imos = [0] * (N + 1)
    for i in range(N - 1):
        if s[i:i + 2] == 'AC':
            imos[i + 2] += 1
    for i in range(N):
        imos[i + 1] += imos[i]

    ans = []
    for _ in range(Q):
        l, r = map(int, input().split())
        t = imos[r] - imos[l - 1] - (0 if imos[l] == imos[l - 1] else 1)
        ans.append(t)
    print(*ans, sep='\n')


if __name__ == '__main__':
    main()

# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())


Measured memory_bytes: 13460