akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h> 
#define ll                 long long                            
#define ra                 return a;                                          
#define pb                 push_back                                                     
#define sti                stack<ll>
#define spi                stack<pair<ll,ll>>
#define S                  second
#define msi                map<string,ll >
#define msi                map<string,ll >
#define mii                map<ll ,ll >
#define dbg(x)             { cerr<<#x<<": "<<x<< endl; }
#define dbg2(x,y)          { cerr<<#x<<": "<<x<<" , "<<#y<<": "<<y<<endl; }
#define dbg3(x,y,z)        { cerr<<#x<<": "<<x<<" , "<<#y<<": "<<y<<" , "<<#z<<": "<<z<<endl; }
#define mis                map<ll , string>
#define rep(i,a,b)         for(ll  i=a;i<b;i++)
#define mpi                map<pair<ll ,ll >,ll >                                                
#define pii                pair<ll ,ll >
#define ppb                pop_back
#define F                  first 
#define vi                 vector<ll >
#define vii                vector<pair<ll , ll >>
#define pqi                priority_queue<ll>
#define si                 set <ll>
#define vs                 vector<string>
#define all(a)             (a).begin(),(a).end()
#define sz(x)              (ll )x.size()
#define hell               1000000007
#define bs                 binary_search
#define mp                 make_pair
#define qi                 queue<ll>
#define qs                 queue<string>
#define qpi                queue<pair<ll,ll>>
#define qps                queue<pair<ll,string>> 
#define endl               '\n' 
#define itr(a,it)          for(typeof(a.begin()) it=a.begin();it!=a.end();it++)// This will produce const_iterator for const object and normal iterator for non-const object
#define ss                 set<string>
using namespace std;
#define N  300005
ll dp[N][3];
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    ll t=1;
//    cin>>t;
    while(t--)
{
    ll n;
    cin>>n;
    ll a[n+1][3];
    rep(i,1,n+1)
    cin>>a[i][0]>>a[i][1]>>a[i][2];
    rep(i,1,n+1)
    {
    	rep(j,0,3)
    	{
    		dp[i][j]=max(dp[i-1][(j+1)%3]+a[i][j],dp[i-1][(j+2)%3]+a[i][j]);
    	}
    }
    cout<<max(dp[n][0],max(dp[n][1],dp[n][2]));
}
    return 0;
}

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

int main() {
    int64_t h, w, n;
    cin >> h >> w >> n;
    vector<int64_t> dxy { 0, 1, -1, -1, 0, 0, -1, 1, 1, 0 };
    map<pair<int64_t, int64_t>, int64_t> m;
    for (int i = 0; i < n; i++) {
        int64_t a, b;
        cin >> a >> b;
        for (int j = 0; j < 9; j++) {
            auto e = make_pair(a+dxy[j], b+dxy[j+1]);
            if ((1 < e.first && e.first < h) && (1 < e.second && e.second < w)) m[e]++;
        }
    }

    vector<int64_t> ans(10);
    for (auto& e : m) ans[e.second]++;
    ans[0] = (h-2) * (w-2) - accumulate(begin(ans)+1, end(ans), 0l);
    for (auto& e : ans) cout << e << endl;
}


Measured memory_bytes: 56448
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <unordered_map>
#include <vector>
#include <string.h>
#include <set>
#include <stack>

using namespace std;

#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl

template<class T> void printvec(const vector<T>& v) {
  for (auto x : v) { cout << x << " "; }
  cout << endl;
}
template<class T> void printtree(const vector< vector<T> >& tree) {
  for (long long i = 0; i < tree.size(); ++i) {
    cout << i + 1 << ": "; printvec(tree[i]);
  }
}
template<class T, class U> void printmap(const map<T, U>& mp) {
  for (auto x : mp) { cout << x.first << "=>" << x.second << endl; }
}

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 rep(i, n) for(ll i = 0; i < n; ++i)
#define all(s) s.begin(), s.end()
#define sz(x) (ll)(x).size()
#define fr first
#define sc second
#define mp make_pair
#define pb push_back
#define eb emplace_back

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> triple;
typedef double D;
typedef vector<ll> vl;
typedef vector<P> vp;

const ll INF = 1e9;
const ll MOD = 1000000007;  // 1e9 + 7

int main(int argc, char** argv) {
  cin.tie(NULL);
  cout.tie(NULL);
  ios_base::sync_with_stdio(false);
  //cout << setprecision(10) << fixed;

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

  vector<ll> b(3);
  b[0] = a[0];
  b[1] = a[1];
  if (n > 2) {
    ll now = 0;
    for (int i = 2; i < n; ++i) {
      now ^= a[i];
    }
    b[2] = now;
  }

  ll S = b[0]+b[1];
  ll X = b[2];

  // Find (i,j) where..
  //   i+j == i^j + 2*(i&j)
  //   S == X + 2*D
  //   i+j == S
  //   i^j == X
  //   i&j == D
  if (S < X) {
    cout << -1 << endl;
    return 0;
  }
  if ((S-X)%2 == 1) {
    cout << -1 << endl;
    return 0;
  }
  ll D = (S-X)/2;

  rep(i,50) {
    if (((X>>i)&1ll) && ((D>>i)&1ll)) { // both is 1. invalid.
      cout << -1 << endl;
      return 0;
    }
  }
  // Here, D is valid.

  ll c = D; // target. "a[0] - c" is diff.
  if (c > a[0]) { // too large
    cout << -1 << endl;
    return 0;
  }
  // Here, i <= a[0]
  for (ll i = 50; i >= 0; --i) {
    if ((X>>i)&1ll) { // i bit exists in X
      ll now = c+(1ll<<i);
      if (now <= a[0]) {
        c = now;
      }
    }
  }

  if (c == 0) { // invalid
    cout << -1 << endl;
  } else {
    cout << a[0]-c << endl;
  }
}


Measured memory_bytes: 3644
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
#pragma GCC optimize("Ofast")
typedef pair<ll, ll> P;
using VP = vector<P>;
using VVP = vector<VP>;
using VI = vector<ll>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
const int inf = 1e9 + 7;
const ll INF = 1LL << 61;
const ll mod = 1e9 + 7;

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 i, j;
    int n;
    cin >> n;
    VI v(1010101, 0), w(1010101, 0);
    for (i = 1; i <= n; i++) cin >> v[i] >> w[i];
    int q;
    cin >> q;
    int m = 1 << 9;
    int ml = 100000;
    VVI r(m, VI(100001, 0));
    for (int l = m; l < m * 2; l++) {
        int u = l;
        VI av, aw;
        while (1) {
            av.pb(v[u]);
            aw.pb(w[u]);
            if (u == 1) break;
            u = u >> 1;
        }
        int y = av.size();
        for (i = 0; i < (1 << y); i++) {
            ll nv = 0, nw = 0;
            for (j = 0; j < y; j++) {
                if ((i >> j) & 1) {
                    nv += av[j];
                    nw += aw[j];
                }
            }
            if (nw <= ml) chmax(r[l - m][nw], nv);
        }
        ll h = 0;
        for (i = 0; i <= ml; i++) {
            chmax(h, r[l - m][i]);
            r[l - m][i] = h;
        }
    }
    while (q--) {
        int u, l;
        cin >> u >> l;
        if (u < m) {
            VI av, aw;
            while (1) {
                av.pb(v[u]);
                aw.pb(w[u]);
                if (u == 1) break;
                u = u >> 1;
            }
            int y = av.size();
            ll ans = 0;
            for (i = 0; i < (1 << y); i++) {
                ll nv = 0, nw = 0;
                for (j = 0; j < y; j++) {
                    if ((i >> j) & 1) {
                        nv += av[j];
                        nw += aw[j];
                    }
                }
                if (nw <= l) chmax(ans, nv);
            }
            cout << ans << endl;
        } else {
            VI av, aw;
            while (1) {
                if (u<2*m) break;
                av.pb(v[u]);
                aw.pb(w[u]);
                u = u >> 1;
            }
            int y = av.size();
            ll ans = 0;
            for (i = 0; i < (1 << y); i++) {
                ll nv = 0, nw = 0;
                for (j = 0; j < y; j++) {
                    if ((i >> j) & 1) {
                        nv += av[j];
                        nw += aw[j];
                    }
                }
                if (nw <= l) chmax(ans, nv + r[u - m][l - nw]);
            }
            cout << ans << endl;
        }
    }
}

Measured memory_bytes: 421112
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct node{
    int key;
    struct node *right, *left, *p;
};

typedef struct node Node;

Node *NIL, *T;

void insert(Node *z){
    Node *y = NIL;
    Node *x = T;

    while(x != NIL){
        y = x;
        if(z->key < x->key){
            x = x->left;
        }
        else{
            x = x->right;
        }
    }
    z->p = y;

    if(y == NIL){
        T = z;
    }
    else if(z->key < y->key){
        y->left = z;
    }
    else y->right = z;
}

void inorder(Node *i){
    if(i == NIL) return;
    inorder(i->left);
    printf(" %d", i->key);
    inorder(i->right);
}

void preorder(Node *i){
if(i == NIL) return;
printf(" %d", i->key);
preorder(i->left);
preorder(i->right);
}

Node* find(int k){
    Node *y = NIL;
    Node *x = T;

    while(x != NIL){
        y = x;
        if(k < x->key){
            x = x->left;
        }
        else if(k > x->key){
            x = x->right;
        }
        else return x;

    }
    return x;
}

Node* minim(Node *z){
    while(z->left != NIL){
        z = z->left;
    }
    return z;
}

Node* SearchNext(Node *z){
    Node *y;
    if(z->right != NIL) {
        return minim(z->right);
    }

    y = z->p;
    while(y != NIL && z == y->right){
        z = y;
        y = y->p;
    }
    return y;
}

void delete(Node *z){
    Node *y, *x;
    if(z->left == NIL || z->right == NIL){
        y = z;
    }
    else y = SearchNext(z);

    if(y->left != NIL){
        x = y->left;
    }
    else{
        x = y->right;
    }

    if(x != NIL){
        x->p = y->p;
    }

    if(y->p == NIL){
        T = x;
    }
    else if(y == y->p->left){
        y->p->left = x;
    }
    else {
        y->p->right = x;
    }

    if(y != z){
        z->key = y->key;
    }
}

int main(void){
    int nm, i, inp, finm;
    char wd[10];
    Node *z;

    scanf("%d", &nm);
    for(i = 0; i < nm; i++){
        scanf("%s", wd);
        if(strcmp(wd,"insert") == 0){
            scanf("%d", &inp);
            z = (Node *)malloc(sizeof(Node));
            z->key = inp;
            z->left = NIL;
            z->right = NIL;
            insert(z);
        }
        else if(strcmp(wd, "print") == 0){
            inorder(T);
            printf("\n");
            preorder(T);
            printf("\n");
        }
        else if(strcmp(wd, "find") == 0){
            scanf("%d", &finm);
            if(find(finm) == NIL) printf("no");
            else printf("yes");
            printf("\n");
        }
        else if(strcmp(wd, "delete") == 0){
            scanf("%d", &inp);
            delete(find(inp));
        }
    }
    return 0;
}



Measured memory_bytes: 20468
lst=input().split(" ")
N=int(lst[0])
M=int(lst[1])
C=int(lst[2])
count=0
lst=input().split(" ")
B = [int(b) for b in lst]
for i in range(N):
    sum=0
    lst=input().split(" ")
    A=[int(a) for a in lst]
    for j in range(M):
        sum += A[j]*B[j]
    if sum+C>0:
        count += 1
    
print(count) 

Measured memory_bytes: 3064
#include<stdio.h>
int MIN(int a,int b){return a<b?a:b;}
int main(){
  int a,b,c,d,n,i,s=0;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d %d",&a,&b);
    s=0;
    while(--a){
      c=127-b;
      d=b^c;
      b=MIN(c,d);
      s+=c+d-b;
    }
    printf("%d\n",s+b);
  }
  return 0;
}

Measured memory_bytes: 128
/*
Author : N_o_o_B
Created : December 22 2019 17:34:16 
*/
#include <bits/stdc++.h>
using namespace std;
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
#define TRACE
#ifdef TRACE
#define trace(...) { cerr<<"[ "; __trace__(#__VA_ARGS__, __VA_ARGS__);}
#undef endl
template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const pair<Arg1,Arg2> &x) {
    return out<<"("<<x.first<<","<<x.second<<")";
}
 
template <typename Arg1>
ostream& operator << (ostream& out, const vector<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}
 
template <typename Arg1>
ostream& operator << (ostream& out, const set<Arg1> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}
 
template <typename Arg1,typename Arg2>
ostream& operator << (ostream& out, const map<Arg1,Arg2> &a) {
    out<<"[";for(const auto &x:a)out<<x<<",";return out<<"]";
}
 
template <typename Arg1>
void __trace__(const string name, Arg1&& arg1){
    cerr << name << " : " << arg1 << " ] " << endl;
}
 
template <typename Arg1, typename... Args>
void __trace__(const string names, Arg1&& arg1, Args&&... args){
    const string name = names.substr(0,names.find(','));
    cerr<<name<<" : "<<arg1<<" | ";
    __trace__(names.substr(1+(int)name.size()), args...);
}
#else
    #define trace(args...)
#endif
 
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<pair<int,int>> vii;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<pair<ll,ll>> vll;
typedef vector<vl> vvl;
//typedef tree<pii, null_type, less<pii>, rb_tree_tag, tree_order_statistics_node_update> oset;
#define fori(i,n) for(int i=0;i<n;i++)
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define repd(i,a,b) for(int i=a;i>=b;i--)
#define ford(i,n)  for(int i=n-1;i>=0;i--)
#define trav(x,a) for(auto& x:a)
#define all(x) x.begin(),x.end()
#define pb push_back
#define endl '\n'
#define sz(a) (int)a.size()
#define fi first
#define se second
clock_t time_p=clock();
void time_taken()
{
    time_p=clock()-time_p;
    cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
}
//const ll mod=998244353;
const ll mod=1e9+7;
const ll INF=1e18;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    cout.precision(12);cout << fixed;

    int n;
    cin >> n;
    vi a(n);
    int cur = 1;
    fori(i,n){
        cin >> a[i];
        if(a[i]==cur) cur++;
    }
    if(cur==1) cout << -1 << endl;
    else cout << n - cur + 1 << endl;


    time_taken();
    return 0;
}

Measured memory_bytes: 1024
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
//#include <utility>
#include <set>
#include <iostream>
//#include <memory>
#include <string>
#include <vector>
#include <algorithm>
//#include <functional>
#include <sstream>
//#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
//#include <cctype>
#include <cstring>
//#include <ctime>
#include <iterator>
#include <bitset>
//#include <numeric>
//#include <list>
//#include <iomanip>

#if __cplusplus >= 201103L
#include <array>
#include <tuple>
#include <initializer_list>
#include <unordered_set>
#include <unordered_map>
#include <forward_list>

#define cauto const auto&
#else

#endif

using namespace std;


namespace{
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
    v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
    stringstream ss;
    ss << f;
    ss >> t;
}


#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define F first
#define S second
#define mkp make_pair
#define RALL(v) (v).rbegin(),(v).rend()


#define MOD 1000000007LL
#define EPS 1e-8
static const int INF=1<<24;

void mainmain(){
  int a,b;
  while(cin>>a>>b,a||b){
    rep(i,a){
      rep(j,b) cout<<"#";
      cout<<endl;
    }
    cout<<endl;
  }
}



}
main() try{
    mainmain();
}
catch(...){
}

Measured memory_bytes: 1152
#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll n , s;
bool check(ll x){
	if(n/x>=x)return 0;
	if(x<2)return 0;
	ll k=n/x;ll r=n%x;
	if(s==k+r)return 1;
	return 0;
}
ll f(ll x,ll b){
	ll ans=0;
	while(x){
		ans+=x%b;
		x/=b;
	}
	return ans;
}
int main()
{
    ios::sync_with_stdio(false);
    cin >> n >> s;
    ll ans = -1;
    if (n == s) {
        ans = n + 1;
    }
    for (ll i = 2 ; i * i <= n ; i++){
        if (f(n , i) == s) {
            ans = i;
            break;
        }
    }
    if (ans != -1){
        cout << ans << endl;
        return 0;
    }
    for (ll i = 1 ; i * i <= n - s ; i++){
        if ((n - s) % i == 0){
            ll b = (n - s) / i + 1;
            if (check(b) && (ans == -1 || ans > b)) ans = b;
        }
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 3596
#include <iostream>

using namespace std;

int main() {
  int c1, c2, c3;
  while (cin >> c1 >> c2 >> c3) {
    bool data[11] = {};
    data[c1] = true;
    data[c2] = true;
    data[c3] = true;

    int a = 20 - c2 - c1;
    int c = 0;
    for (int i = 1; i <= 10; ++i)
      if (i <= a && data[i] == false)
        ++c;

    cout << ((c >= 4) ? "YES" : "NO") << endl;
  }
}


Measured memory_bytes: 3004
#include <bits/stdc++.h>
#include <boost/multi_array.hpp>
#include <boost/range/algorithm.hpp>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;

int main() {
  int n;
  cin >> n;
  string ans = "No";
  rep(i, 9) {
    rep(j, 9) {
      if (n == (i + 1) * (j + 1)) ans = "Yes";
    }
  }
  cout << ans << endl;
  return 0;
}


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

using namespace std;

int main() {
	long N, K; cin >> N >> K;
	if (K % 2 == 1) {
		long m = N / K;
		cout << m * m * m << endl;
	}
	else {
		long m = (N + K / 2) / K;
		long n = N / K;
		cout << m * m * m + n * n * n << endl;
	}
	return 0;
}

Measured memory_bytes: 256
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <bitset>
#include <sstream>
#include <stdio.h>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

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

//typedef
//------------------------------------------
typedef long long LL;

typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<string, int> PSI;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

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

//constant
//--------------------------------------------
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
const LL MOD = 1e9+7; 
//vector <vector<int>> x(20, vector<int> (20)), y(20,vector<int> (20));
/*int counter_1 (int x) {
    if(x == 0) return 0;
    return counter_1(x >> 1) + (x & 1);
}*/

//int Counter(int x)
/*int factorial(int n) {
    if (n > 0) {
        return n * factorial(n - 1);
    } else {
        return 1;
    }
}*/
/*bool pairCompare(const P& firstElof, const P& secondElof)
{
    return firstElof.second > secondElof.second;
}*/


/*long nCr(int n, int r)
{
       if(n==r) return dp[n][r] = 1;
       if(r==0) return dp[n][r] = 1;
       if(r==1) return dp[n][r] = n;
       if(dp[n][r]) return dp[n][r];
       return dp[n][r] = nCr(n-1,r) + nCr(n-1,r-1);
}*/
/*int stoi(std::string str){
int ret;
std::stringstream ss;
ss << str;
ss >> ret;
return ret;
}*/
void Main(){
   LL n,a,b;
   cin >> a >> b >> n;
   LL ans=0;
   LL x = min(b-1,n);
   double af = 0.0;
   double f=x/(double)b;
      LL z = x/b;
      //cout << f << endl;
      af=f-double(z);
    ans = (a*af)/1;
   cout << ans << endl;
}
int main()
{
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(0);
	Main();
}


Measured memory_bytes: 3584
#include <stdio.h>

int main(void)
{
  int A,B;
  scanf("%d %d",&A,&B);
  if(A == B)
    printf("Draw");
  else if(A == 1)
    printf("Alice");
  else if(B == 1)
    printf("Bob");
  else if(A > B)
    printf("Alice");
  else
    printf("Bob");
  return 0;
}

Measured memory_bytes: 128
def f(a, b, c):
    if a > 1 and a == b and a == c:
        print(-1)
    else:
        count = 0
        for i in range(100):
            if a%2 or b%2 or c%2:
                break
            a, b, c = b//2 + c//2, a//2 + c//2, a//2 + b//2
            count += 1
        print(count)

a, b, c = map(int, input().split())
f(a, b, c)


Measured memory_bytes: 9176
from math import atan,degrees
a,b,x=map(int,input().split())
aab2 = a * a * b /2
if a*a*b==x:
  print(0)
elif x >= aab2:
  print(90-degrees(atan(a/(b-2 *(x-aab2)/(a*a)))))
else:
  print(90-degrees(atan((2*x/(a*b)/b))))

Measured memory_bytes: 3060
n,k=map(int,input().split())
r,s,p=map(int,input().split())
t=list(input())
 
res=0
for i in range(n):
  if i>k-1 and t[i-k]==t[i]:
    t[i]="n"
  if t[i]=="r":
    res+=p
  elif t[i]=="s":
    res+=r
  elif t[i]=="p":
    res+=s
  
print(res)

Measured memory_bytes: 49648
#include<iostream>
using namespace std;
#include<vector>
#include<algorithm>
struct bridge{
	vector<int>ord,low;
	vector<bool>art;
	vector<pair<int,int> >bridges;
	vector<vector<int> >G;
	bridge(int n_=0):ord(n_,-1),low(n_),art(n_,false),G(n_){}
	void add_edge(int u,int v)
	{
		G[u].push_back(v);
		G[v].push_back(u);
	}
	bool operator[](int a){return art[a];}
	bool is_bridge(int a,int b)
	{
		if(ord[a]>ord[b])swap(a,b);
		return ord[a]<low[b];
	}
	void dfs(int u,int p,int&cnt)
	{
		low[u]=ord[u]=cnt++;
		for(int&v:G[u])
		{
			if(ord[v]==-1)
			{
				dfs(v,u,cnt);
				low[u]=min(low[u],low[v]);
				art[u]=art[u]|ord[u]<=low[v];
				if(ord[u]<low[v])bridges.push_back(u<v?make_pair(u,v):make_pair(v,u));
			}
			else if(v!=p)
			{
				low[u]=min(low[u],ord[v]);
			}
		}
	}
	void build()
	{
		int k=1,cnt=0;
		low[0]=ord[0]=0;
		for(int&v:G[0])if(ord[v]==-1)
		{
			dfs(v,0,k);
			if(ord[0]<low[v])bridges.push_back(make_pair(0,v));
			cnt++;
		}
		if(cnt>=2)art[0]=true;
	}
};

main()
{
	int n,m;cin>>n>>m;
	bridge P(n);
	vector<pair<int,int> >e;
	for(int i=0;i<m;i++)
	{
		int a,b;cin>>a>>b;
		P.add_edge(a,b);
		e.push_back(a<b?make_pair(a,b):make_pair(b,a));
	}
	P.build();
	sort(e.begin(),e.end());
	for(int i=0;i<e.size();i++)if(P.is_bridge(e[i].first,e[i].second))cout<<e[i].first<<" "<<e[i].second<<endl;
}



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

int main()
{
    int A, B, C;
    cin >> A >> B >> C;
    
    // cout << A+B+C << endl;
    if(A+B+C >= 22){
        cout << "bust" << endl;
    }
    else{
        cout << "win" << endl;
    }
    return 0;
}


Measured memory_bytes: 256
import java.util.Scanner

fun main(args:Array<String>){
    val cin = Scanner(System.`in`)
    val a = cin.nextInt()
    val b = cin.nextInt()

    if(a > b){
	println("a > b")
    }  
 
    if(a < b){
	println("a < b")
    }

    if(a == b){
	println("a == b")
    }
}   



Measured memory_bytes: 25640
x, n = map(int, input().split())
p = list(map(int, input().split()))
all = list(range(0, 102))
diff = []

for i in p:
    all.remove(i)

for j in all:
    diff.append(abs(x-j))

diff_min = min(diff)
num_min = diff.index(diff_min)
ans = all[num_min]

print(ans)


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

int main(){
  int N;
  int l,r;
  int chair;
  cin >> N;
  
  for(int i = 0;i < N;i++){
    cin >> l >> r;
    chair += r - l + 1;
  }
  
  cout << chair << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main()
{
  int W, a, b;
  cin >> W >> a >> b;
  if (a > b)
  {
    swap(a, b);
  }
  int ans = 0;
  if (a + W < b)
  {
    ans = b - (a + W);
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &x) {
	x = 0;
	T f = 1;
	char c = getchar();
	for (; !isdigit(c); c = getchar()) if (c == '-') f = -1;
	for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
	x *= f;
}
template <typename T>
inline void w(T x) {
	if (x > 9) w(x / 10);
	putchar(x % 10 + 48);
}
template <typename T>
inline void write(T x, char c) {
	if (x < 0){
		putchar('-');
		x = -x;
	}
	w(x);
	putchar(c);
}
int a[200005];
int main(){
	int n; int s = 0;
	read(n);
	for (int i = 1; i <= n; i ++) {
		read(a[i]);
		s ^= a[i];
	}
	for (int i = 1; i < n; i ++) {
		write(s ^ a[i], ' ');
	}
	write(s ^ a[n], '\n');
	return 0;
}


Measured memory_bytes: 4296
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <locale>
#include <iostream>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()

using namespace std;

using ll = long long;
using ld = long double;

template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template <typename T> int len(const T &x) { return x.size(); }

template<typename T>
vector<T> table(int n, T v) { return vector<T>(n, v); }

template <class... Args>
auto table(int n, Args... args) {
  auto val = table(args...);
  return vector<decltype(val)>(n, move(val));
}

struct yes_no : numpunct<char> {
  string_type do_truename()  const { return "YES"; }
  string_type do_falsename() const { return "NO"; }
};

void solve(ll X, ll t) {
  cout << max(0LL, X - t) << endl;
}

int main() {
  locale loc(locale(), new yes_no);
  cout << boolalpha << setprecision(12) << fixed;
  cout.imbue(loc);
	ll X;
	ll t;
	scanf("%lld", &X);
	scanf("%lld", &t);
	solve(X, t);
	return 0;
}


Measured memory_bytes: 256
import java.util.*;
public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);

      int x = sc.nextInt();

      int[] n = {1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196, 216, 225, 243, 256, 289, 324, 343, 361, 400, 441, 484, 512, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1000, 1001};

     int i = 0; 
     
      for (i = 0; i < 43; i++) {
         if ( x < n[i]) {
            break;
         }
      }

      System.out.println(n[i-1]);
   }
}

Measured memory_bytes: 21716
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <string>
using namespace std;

int comp(const void* a, const void* b){
	return *(int*)a - *(int*)b;
}

int main(){
	int a[5], ans[5], cnt, max = 0, answ = 0;
	cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4];
	for(int i = 0; i < 5; i++){
		ans[i] = a[i] % 10;
		if(ans[i] != 0){
			cnt = 10 - ans[i];
		}else{
			cnt = 0;
		}
		answ += a[i] + cnt;
		if(cnt > max){
			max = cnt;
		}
	}
	cout << answ - max << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
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 all(x) (x).begin(),(x).end()
#define pll pair<ll,ll>
#define pii pair<int,int>
#define rep(i,n) for(int i=0;i<n;i++)
#define sz(x) ((ll)(x).size())
#define pb push_back
#define mp make_pair
#define bit(n) (1LL<<(n))
#define F first
#define S second
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
const ll INF = 1LL<<60;
const ll mod = (int)1e9 + 7;

/*
テストケース全てに目を通す
テストケースが2個以下だったらなんかある
N最小のコーナーケースがないか調べる
制約をしっかりと確認する（1からNまでの順列、全て異なる値などの制約も含め）
操作の逆順を考える
Codeforcesではscanfを使う
 */

int main() {
    int n,m;
    cin >> n >> m;
    int dp[bit(n)];
    rep(i,bit(n)){
        dp[i]=mod;
    }
    dp[0]=0;
    rep(i,m){
        int a,b;
        cin >> a >> b;
        int sum=0;
        rep(j,b){
            int c;
            cin >> c;
            sum|=bit(c-1);
        }
        rep(j,bit(n)){
          	chmin(dp[j|sum],dp[j]+a);
        }
      	cerr << endl;
    }
    if(dp[bit(n)-1]!=mod)cout << dp[bit(n)-1];
    else cout << -1;
}

/*



 */



Measured memory_bytes: 256
//header{{{
#include<bits/stdc++.h>
  
using namespace std;
 
#define rep(i,n) for(int i=0;i<(n);++i)
#define reps(i,n) for(int i=1;i<=(n);++i)
#define all(x) (x).begin(),(x).end()
#define setout(n,x) setw(n) << setfill(x)
#define Fixed fixed << setprecision(10)
#define int long long
using pii = pair<int,int>;
constexpr int INF  = 0x3f3f3f3f;
constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr int mod = 1e9+7; 

template <class A, class B> inline bool chmax(A &a, const B &b) { return b > a && (a = b, true); }
template <class A, class B> inline bool chmin(A &a, const B &b) { return b < a && (a = b, true); }
  
int gcd(int a,int b){ return b ? gcd(b,a % b) : a;}
int lcm(int a,int b){ return a / gcd(a,b) * b;}
//}}}

signed main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n,sum = 0;
	cin >> n;
	unordered_map<int,int> mp;
	vector<int> a(n);
	rep(i,n){
		cin >> a[i];
		++mp[a[i]];
	}
	sort(all(a));
	a.erase(unique(all(a)),a.end());
	int m = a.size();
	rep(i,m){
		if(mp[a[i]] == a[i]) continue;
		else if(mp[a[i]] < a[i]) sum += mp[a[i]];
		else sum += mp[a[i]] - a[i];
	}
	cout << sum << '\n';
	return 0;
}


Measured memory_bytes: 5028
#define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>

using namespace std;

typedef long long ll;
typedef pair<int,string> P;

static const double EPS = 1e-8;

int main(){
  int total_games;
  while(~scanf("%d",&total_games)){
    for(int game_i = 0; game_i < total_games; game_i++){
      int num_of_stones;
      int num_of_players;
      scanf("%d %d",&num_of_stones,&num_of_players);
      if(num_of_stones < num_of_players){
        printf("%d\n",num_of_stones);
      }
      else{
        if(num_of_stones % num_of_players == 0){
          printf("%d\n",num_of_players);
        }
        else{
          printf("%d\n",num_of_stones % num_of_players);
        }
      }
    }
  }
}

Measured memory_bytes: 1192
#include <iostream>
#include <algorithm>
#include <numeric>
#include <vector>
#include <map>
#include <unordered_set>
#include <cmath>
using namespace std;
typedef long long ll;

int main( int argc, char* argv[] ){
  ll N, C;
  cin >> N >> C;
  vector<ll> x(N), v(N);
  for( ll i=0; i<N; ++i ){
    cin >> x[i] >> v[i];
  }

  ll a=0, b=0, y=0, z=0;
  vector<ll> A(N,0), B(N,0), Z(N,0), Y(N,0);  
  for( ll i=0, cal=0, pos=0; i<N; ++i ){
    cal += v[i] - (x[i] - pos);
    a = max( a, cal );
    A[i] = a;
    if( x[i] < C/2 ){
      z = max(z,cal-x[i]);
      Z[i+1] = z;
    }
    pos = x[i];
  }
  for( ll i=0, cal=0, pos=C; i<N; ++i ){
    cal += v[N-1-i] - (pos-x[N-1-i]);
    b = max( b, cal );
    B[i] = b;
    if( x[N-1-i] > C/2 ){
      y = max(y,cal-(C-x[N-1-i]));
      Y[i+1] = y;
    }
    pos = x[N-1-i];
  }
  // for( auto s : A ){ cerr << s << ","; } cerr << endl;
  // for( auto s : B ){ cerr << s << ","; } cerr << endl;
  // for( auto s : Y ){ cerr << s << ","; } cerr << endl;
  // for( auto s : Z ){ cerr << s << ","; } cerr << endl;

  ll c=0;
  for( int i=0; i<N; ++i ){
    c = max( c, A[N-1-i]+Y[i] );
    c = max( c, B[N-1-i]+Z[i] );
  }
  cout << c << endl;
  return 0;
}

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

#define int long long
typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;
#define rep(i,n) for(int i=0;i<(n);i++)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
#define all(v) (v).begin(),(v).end()
#define each(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}

signed main(){
    string S;cin>>S;
    int N;
    cin>>N;

    int ans=0;
    while(N--){
        string T;
        cin>>T;
        T+=T;
        if(T.find(S)!=string::npos)ans++;
    }
    cout<<ans<<endl;
    return 0;
}

Measured memory_bytes: 1208
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>; // グラフ型
typedef long long ll;
#define _GLIBCXX_DEBUG




int main() {
  vector<ll> a(5);
  
  

  ll ans = 0;
  for(ll i=0; i<5; i++){
    cin >> a[i];
    if(a.at(i) == 0){
      ans = i+1;
      cout << ans << endl;
      break;
    }   
  }
  //cout << ans << endl;

  return 0;
}


Measured memory_bytes: 3624
#include <stdio.h>
#include <string.h>
int main(void){
    long long ans=0,tmp=0;
    char s[200020];
    scanf("%s",s);
    for (int i=0; i<strlen(s); i++){
        if (s[i]=='B'){
            tmp++;
        } else {
            ans+=tmp;
        }
    }
    printf("%lld\n",ans);
	return 0 ;
}


Measured memory_bytes: 384
//                   ********** YATIN KWATRA **********

// AC BAKSHI RABBA

#include <bits/stdc++.h>
#define ll                      long long 
#define ld                      long double
#define ull                     unsigned long long 
#define FIO                     ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl                    "\n"
#define fo(i,a,b)               for(int i = a; i<=b ; i++)
#define rfo(i,a,b)              for(int i = a; i>=b ; i--)
#define vii                     vector<int>
#define vll                     vector<ll>
#define pq                      priority_queue
#define uom                     unordered_map                
#define all(v)                  v.begin(),v.end()
#define mp                      make_pair
#define pb                      push_back
#define pob                     pop_back
#define ff                      first
#define ss                      second
#define pii                     pair<int,int> 
#define pll                     pair<long,long>
#define mll                     map<ll,ll>
#define mii                     map<int,int>
#define vvii                    vector<vii>
#define vvll                    vector<vll>
#define mod                     1000000007
#define MIN                     -1e9
#define pi                      3.1415926535897932384626433832795

using namespace std;

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

/*
    
   -> Check For Overflows
   -> Out of Bounds
   -> Initialisations of global arrays and variables
   -> Its not Always Complex, Try to simplify
   -> write it down and try to solve
   -> Have Faith in urself and in ur approach
   -> If it seems totally out of reach, switch to next :)
   -> And Come Back later, if possible ..
*/


string s1,s2;
int n1,n2;

const int N = 3005;

int dp[N][N];

int f(int i, int j)
{
  if(i == n1 or j == n2) return 0;

  if(dp[i][j] != -1) return dp[i][j];

  int op1 = 0, op2 = 0;

  if(s1[i] == s2[j])
  {
    op1 = 1 + f(i+1,j+1);
  }
  else
  {
    op1 = f(i+1,j);
    op2 = f(i,j+1);
  }

  dp[i][j] = max(op1,op2);

  return dp[i][j];
}


void solve()
{ 
    cin >> s1 >> s2;

    n1 = s1.length();
    n2 = s2.length();

    memset(dp,-1,sizeof(dp));

    f(0,0);

    string s = "";

    int i = 0, j = 0;

    while(i<n1 and j<n2)
    {
      if(s1[i] == s2[j])
      {
        s += s1[i];
        i++;
        j++;
      }
      else if(dp[i+1][j] > dp[i][j+1]) i++;
      else j++;
    }
    
    cout << s << endl;

       
}
int main() {
    
    FIO
    INPUT();
    
    int t;
    t = 1;
    //cin >> t;
    
    while(t--)
    {
       solve();
    }
    return 0;
}


Measured memory_bytes: 39184
#include <set>          
#include <map>           
#include <list>
#include <ctime>
#include <deque>         
#include <bitset>        
#include <vector>
#include <list>
#include <stack>
#include <random>		 
#include <string>       
#include <numeric>      //  needed for  accumulate
#include <utility>     // needed for std:: move
#include <iterator> 
#include <fstream>
#include <iostream> 
#include <iomanip>  
#include <algorithm> 
#include <functional>    
#include <cmath>         
#pragma warning(disable:4996) // ignore this
#define ve vector
#define pb push_back
#define mp make_pair                     
#define srt(x) sort(x.begin(),x.end())         
#define mod static_cast<long long> (1e9+7)     
#define sumx(x) accumulate(x.begin(),x.end(),0LL)
#define int2 int64_t
#define pi 3.14159265358979323846
#define testing 0
#define code_chef 0
#define code_jam 0

using namespace std;
template<typename T>
istream& operator >> (istream& in, ve<T> &v)
{
	for (auto &x : v)
		scanf("%d",&x);
	return in;
}
template<typename T>
ostream& operator<<(ostream& in, ve<T> &v)
{
	for (auto &x : v)
		in << x << " ";
	return in;
}
long long fast(long long a,long long b,long long pr)
{
	if(b==0)
		return 1%pr;
	long long ans=1%pr;
	while(b)
	{
		if(b&1)
		{
			ans*=a;
			ans%=pr;
		}
		b>>=1;
		a*=a;
		a%=pr;
	}
	return ans;
}

class solve
{
public:
	solve()
	{
		string S;
		cin >> S;
		if((S[0]==S[1] && S[1]==S[2]) ||((S[2]==S[3] && S[1]==S[2])))
		{
			cout <<"Yes";
		}
		else
			cout <<"No\n";
		
	}
};
int32_t main()
{
	int t = 1, i = 1;
	if (code_chef)
		scanf("%d", &t);
	while (t--)
	{
		if (code_jam)
			printf("Case #%d: ", i++);
		new solve;
	}
	return 0;
}

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

using namespace std;

#define ios         ios_base::sync_with_stdio(false);
#define ll          long long
#define ld          long double
#define db(x)       cout << "[" << #x << ": " << (x) << "]\n"
#define db2(x,y)    cout << "[" << #x << ": " << (x) << "]  [" << #y << ": " << (y) << "]\n"
#define db3(x,y,z)  cout << "[" << #x << ": " << (x) << "]  [" << #y << ": " << (y) << "]  [" << #z << ": " << (z) << "]\n"
#define cn          107
#define sn          1007
#define bn          200007
#define M           1000000007
#define inf         LLONG_MAX



int main()
{
        ios;
        string a,b,c; cin >> a >> b >> c;
        cout << a[0] << b[1] << c[2];
}



Measured memory_bytes: 3572
<?php
list($a,$b,$c)= explode(" ", trim(fgets(STDIN)));
$k=trim(fgets(STDIN));
$i=0;
while($a>=$b){
$b*=2;
++$i;
}
while($b>=$c){
$c*=2;
++$i;
}
echo ($i<=$k)? "Yes":"No";

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

using namespace std;
#define all(a)a.begin(),a.end()
using ll=long long;
const int INF = 1<<30;
const ll INFll =1LL<<62;
const int mod =(1e9)+7;
using P = pair<ll,ll>;

int main(){
   ll mx,mint;
   ll ans=INFll;
   ll a,b,c;cin >>a>>b>>c;
   mx=a*b*((c-1)/2+1);
   mint=a*b*(c/2);
   ans=min(ans,mx-mint);
   swap(b,c);
    mx=a*b*((c-1)/2+1);
    mint=a*b*(c/2);
    ans=min(ans,mx-mint);
    swap(a,c);
    mx=a*b*((c-1)/2+1);
    mint=a*b*(c/2);
    ans=min(ans,mx-mint);
    cout <<ans <<endl;
   return 0;
}



Measured memory_bytes: 256
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

// 内部定数
#define D_MOD			1000000007								// 除数(10の9乗+7)
#define D_CHAR_MAX		100005									// 最大文字数

// 内部変数
static FILE *szpFpI;											// 入力
static char sc1Str[D_CHAR_MAX];									// 文字列
static int siSLen;												// 文字列長

// 内部変数 - テスト用
#ifdef D_TEST
	static int siRes;
	static FILE *szpFpA;
#endif

// 改行カット
// 戻り値：文字数
int
fCutCrLf(
	char *pcpStr				// <I> 文字列
)
{
	int i;

	for (i = 0; pcpStr[i] != '\0'; i++) {
		if (pcpStr[i] == '\n') {
			pcpStr[i] = '\0';
			break;
		}
	}

	return i;
}

// 実行メイン
int
fMain(
	int piTNo					// <I> テスト番号 1～
)
{
	int i;
	char lc1Buf[1024], lc1Out[1024];

	// 入力 - セット
#ifdef D_TEST
	sprintf(lc1Buf, ".\\Test\\T%d.txt", piTNo);
	szpFpI = fopen(lc1Buf, "r");
	sprintf(lc1Buf, ".\\Test\\A%d.txt", piTNo);
	szpFpA = fopen(lc1Buf, "r");
	siRes = 0;
#else
	szpFpI = stdin;
#endif

	// 文字列 - 取得
	fgets(sc1Str, sizeof(sc1Str), szpFpI);

	// 文字列長 - 取得
	siSLen = fCutCrLf(sc1Str);

	// 順にチェック
	int liACnt = 0;
	int liBCnt = 0;
	int liCCnt = 0;
	int liSPtn = 1;
	for (i = 0; i < siSLen; i++) {

		// C
		if (sc1Str[i] == '?' || sc1Str[i] == 'C') {
			if (sc1Str[i] == '?') {
				liCCnt = (int)((long long)liCCnt * 3 % D_MOD);
			}
			liCCnt = (liCCnt + liBCnt) % D_MOD;
		}

		// B
		if (sc1Str[i] == '?' || sc1Str[i] == 'B') {
			if (sc1Str[i] == '?') {
				liBCnt = (int)((long long)liBCnt * 3 % D_MOD);
			}
			liBCnt = (liBCnt + liACnt) % D_MOD;
		}

		// A
		if (sc1Str[i] == '?' || sc1Str[i] == 'A') {
			if (sc1Str[i] == '?') {
				liACnt = (int)((long long)liACnt * 3 % D_MOD);
			}
			liACnt = (liACnt + liSPtn) % D_MOD;
		}

		// ?
		if (sc1Str[i] == '?') {
			liSPtn = (int)((long long)liSPtn * 3 % D_MOD);
		}
	}

	// 結果 - セット
	sprintf(lc1Out, "%d\n", liCCnt);

	// 結果 - 表示
#ifdef D_TEST
	fgets(lc1Buf, sizeof(lc1Buf), szpFpA);
	if (strcmp(lc1Buf, lc1Out)) {
		siRes = -1;
	}
#else
	printf("%s", lc1Out);
#endif

	// テストファイルクローズ
#ifdef D_TEST
	fclose(szpFpI);
	fclose(szpFpA);
#endif

	// テスト結果
#ifdef D_TEST
	if (siRes == 0) {
		printf("OK %d\n", piTNo);
	}
	else {
		printf("NG %d\n", piTNo);
	}
#endif

	return 0;
}

int
main()
{

#ifdef D_TEST
	int i;
	for (i = D_TEST_SNO; i <= D_TEST_ENO; i++) {
		fMain(i);
	}
#else
	fMain(0);
#endif

	return 0;
}



Measured memory_bytes: 256
from collections import deque
from bisect import bisect_right
N,K = map(int,input().split())
P = list(map(int,input().split()))
Lmax = []
Lmin = []
if P[1]>P[0]:
    flag = 1
else:
    flag = -1
for i in range(2,N):
    if P[i]>P[i-1]:
        if flag==1:continue
        else:
            Lmin.append([i-1,P[i-1]])
            flag = 1
    else:
        if flag==1:
            Lmax.append([i-1,P[i-1]])
            flag = -1
        else:continue
cnt = 0
flagMono = 0
indmin = bisect_right(Lmin,[K-1,P[K-1]])
Smax = deque([0])
Smin = deque([0])
for i in range(1,K):
    while Smax:
        if P[Smax[-1]]<P[i]:
            Smax.pop()
        else:break
    Smax.append(i)
    while Smin:
        if P[Smin[-1]]>P[i]:
            Smin.pop()
        else:break
    Smin.append(i)    
if P[0]==P[Smin[0]] and P[K-1]==P[Smax[0]] and (len(Lmin)==0 or indmin==0 or Lmin[indmin-1][0]==0):
    flagMono=1
    cnt += 1
elif P[0]==P[Smin[0]] and K<N and P[K]>P[Smax[0]]:
    pass
else:
    cnt += 1
for i in range(1,N-K+1):
    if Smax[0]==i-1:
        Smax.popleft()
    while Smax:
        if P[Smax[-1]]<P[i+K-1]:
            Smax.pop()
        else:break
    Smax.append(i+K-1)
    if Smin[0]==i-1:
        Smin.popleft()
    while Smin:
        if P[Smin[-1]]>P[i+K-1]:
            Smin.pop()
        else:break
    Smin.append(i+K-1)
    indmin = bisect_right(Lmin,[i+K-1,P[i+K-1]])
    if P[i]==P[Smin[0]] and P[i+K-1]==P[Smax[0]] and (len(Lmin)==0 or indmin==0 or Lmin[indmin-1][0]<=i):
        if flagMono==0:
            flagMono = 1
            cnt += 1
        else:
            pass
    elif P[i]==P[Smin[0]] and i+K<N and P[i+K]>P[Smax[0]]:
        continue
    else:
        cnt += 1
print(cnt)

Measured memory_bytes: 112636
N,u,v = map(int,input().split())
u -= 1
v -= 1

data = [[] for _ in range(N)]

for i in range(N-1):
    A,B = map(int,input().split())
    A -= 1
    B -= 1
    data[A].append(B)
    data[B].append(A)

#print(data)

stack = [[u,u]]
taka_dis = [0] * N
while stack:
    x = stack.pop()
    #print(x)
    for y in data[x[1]]:
        if y == x[0]:
            continue
        else:
            stack.append([x[1],y])
            taka_dis[y] = taka_dis[x[1]] + 1
    #print(stack)

stack = [[v,v]]
aoki_dis = [0] * N
while stack:
    x = stack.pop()
    for y in data[x[1]]:
        if y == x[0]:
            continue
        else:
            stack.append([x[1],y])
            aoki_dis[y] = aoki_dis[x[1]] + 1
    
can = [0] * N

for i in range(N):
    if aoki_dis[i] - taka_dis[i] > 0:
        can[i] = aoki_dis[i]
    else:
        can[i] = 0
#print(aoki_dis)
#print(taka_dis)
#print(can)

print(max(can) -1 )


Measured memory_bytes: 30128
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<map>
#include<math.h>
#include<queue>
#include<deque>
#include<stack>
#include<cstdio>
#include<utility>
#include<set>
#include<list>
#include<cmath>
#include<stdio.h>
#include<string.h>
#include<iomanip>
#include<cstdio>
#include<cstdlib>
#include<cstring>
using namespace std;
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define REP(i, n) FOR(i, 0, n - 1)
#define NREP(i, n) FOR(i, 1, n)
using ll = long long;
using pii = pair<int, int>;
using piii = pair<pii, pii>;
const ll dx[4] = { 0, -1, 1, 0 };
const ll dy[4] = { -1, 0, 0, 1 };
const int INF = 1e9 + 7;
const ll inf = 1LL << 50;
int gcd(int x, int y) {
	if (x < y)swap(x, y);
	if (y == 0)return x;
	return gcd(y, x%y);
}
void mul(ll a, ll b) {
	a = a * b % INF;
}
///////////////////////////////////////

//明らかにxとyについて独立なのでxの差の絶対値の和とyの差の絶対値の和をそれぞれ求める
//Xの差について考える。ある2マスの組み合わせを固定した時これら以外からk-2マス選ぶ場合に
//全てに1度ずつこれらの差が寄与するのでこの組を固定して考えると(N*M-2)C(k-2)通りある
//さらにXが同じ場合は差が0なのでxが異なると仮定するとXの差の絶対値がdとなるように
//2マス選ぶ方法は(N-d)*M^2通りある。これを全てのdに対して足し合わせるとXについての答えが
//求まる。yについてもnとmを入れ替えると同様に解くことができる。

//差のほうを固定するという考え方！

//あるマス2つにコマが置いてあるようなコマの配置の通り数を計算する。
//その２マスがどこであっても残りのマスA-2個に残りのコマk-2個を置く場合の数になるこれをxとする
//求める値はマス2つのペア全通りについてそのマンハッタン距離を合計して最後にxを掛けたもの
//マス二つのペア全通りについてマンハッタン距離(の縦だけ)を合計した値は

vector<pair<ll, ll>>prime_factorize(ll n) {
	vector<pair<ll, ll>>res;
	for (ll p = 2; p*p <= n; ++p) {
		if (n%p != 0)continue;
		int num = 0;
		while (n%p == 0) { ++num; n /= p; }
		res.push_back(make_pair(p, num));
	}
	if (n != 1)res.push_back(make_pair(n, 1));
	return res;
}
const int MAX = 210000;
ll fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; ++i) {
		fac[i] = fac[i - 1] * i%INF;
		inv[i] = INF - inv[INF%i] * (INF / i) % INF;
		finv[i] = finv[i - 1] * inv[i] % INF;
	}
}
ll COM(int n, int k) {
	if (n < k)return 0;
	if (n < 0 || k < 0)return 0;
	return fac[n] * (finv[k] * finv[n - k] % INF) % INF;
}//二項係数ライブラリ
int main() {
	int N, M, K;
	cin >> N >> M >> K;
	COMinit();
	ll ans = 0;
	for (ll d = 1; d <= N - 1; ++d) {
		ans += d * (N - d)*M*M;
		ans %= INF;
	}
	for (ll d = 1; d <= M - 1; ++d) {
		ans += d * (M - d)*N*N;
		ans %= INF;
	}
	ans *= COM(N*M - 2, K-2);
	ans %= INF;
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 5120
#include <iostream>
#include <string>
#include <cmath>
#include <vector>
typedef unsigned int UINT;
using namespace std;


int main(void) {
    int A, B;
    cin >> A >> B;
    float x = A + B;
    x /= 2;
    cout << ceil(x) << endl;
    return 0;
}

Measured memory_bytes: 256