akhauriyash/Code-Regression huggingface dataset:
#include<iostream>
using namespace std;
int main(){
        int a,b,c;
        scanf("%d %d %d",&a,&b,&c);
        /*
        if(a<b && b<c){
                printf("Yes\n");
        }else{
                printf("No\n");
        }
        */
        printf(((a<b)&&(b<c))?"Yes":"No");
        printf("\n");
        return 0;
}

Measured memory_bytes: 1164
#include<iostream>
using namespace std;
int main(){
  int a,b;
  cin >> a >> b;
  if(a>b)cout << "a > b" << endl;
  else if(a==b)cout << "a == b" << endl;
  else if(a<b)cout << "a < b" << endl;
  return 0;
}

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

using namespace std;

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

	vector < int >A(N - 1);
	for (int i = 0; i < N - 1; i++) {
		cin >> A[i];
	}

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

	int index = 0;
	for (int i = 1; i <= N; i++) {
		int count = 0;
		while ((size_t)index < A.size()) {
			if (A[index] > i) {
				break;
			}

			if (A[index] == i) {
				count++;
			}
			index++;
		}

		cout << count << endl;
	}

	return 0;
}


Measured memory_bytes: 4024
// 解答不能.
// treeone氏.
// https://atcoder.jp/contests/abc151/submissions/9462695
#include <bits/stdc++.h>
using namespace std;
#define repex(i, a, b, c) for(int i = a; i < b; i += c)
#define repx(i, a, b) repex(i, a, b, 1)
#define rep(i, n) repx(i, 0, n)
#define repr(i, a, b) for(int i = a; i >= b; i--)
const double EPS = 1e-9;
double cx = 1e9, cy = 1e9, cr = 1e9;

void calc(double x1, double y1, double x2, double y2, double x3, double y3){
    double d = 2.0 * ((y1 - y3) * (x1 - x2) - (y1 - y2) * (x1 - x3));
    if(fabs(d) < EPS){
        cr = -1e9;
        return;
    }
    cx = ((y1 - y3) * (y1 * y1 - y2 * y2 + x1 * x1 - x2 * x2)
       - (y1 - y2) * (y1 * y1 - y3 * y3 + x1 * x1 - x3 * x3)) / d;
    cy = ((x1 - x3) * (x1 * x1 - x2 * x2 + y1 * y1 - y2 * y2) 
       - (x1 - x2) * (x1 * x1 - x3 * x3 + y1 * y1 - y3 * y3)) / (-d);
    cr = hypot(cx - x1, cy - y1);
}

int main(){
    int n;
    scanf("%d", &n);
    vector<int> x(n), y(n);
    rep(i, n) scanf("%d %d", &x[i], &y[i]);
    double ans = 1e18;
    rep(i, n){
        repx(j, i + 1, n){
            cr = hypot(x[j] - x[i], y[j] - y[i]) / 2.0;
            cx = (x[i] + x[j]) / 2.0;
            cy = (y[i] + y[j]) / 2.0;
            bool f = true;
            rep(l, n){
                if(hypot(cx - x[l], cy - y[l]) - cr > EPS){
                    f = false;
                    break;
                }
            }    
            if(f) ans = min(ans, cr);
        }
    }
    rep(i, n){
        repx(j, i + 1, n){
            repx(k, j + 1, n){
                calc(x[i], y[i], x[j], y[j], x[k], y[k]);
                bool f = true;
                rep(l, n){
                    if(hypot(cx - x[l], cy - y[l]) - cr > EPS){
                        f = false;
                        break;
                    }
                }    
                if(f) ans = min(ans, cr);
            }
        }
    }
    printf("%.15f\n", ans);
    return 0;
}

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

int main()
{
    int N;
    string S, T;
    cin >> N;
    cin >> S >> T;
    for (int i = 0; i < N;i++)
    {
        cout << S[i] << T[i];
    }
}

Measured memory_bytes: 256
# coding:utf-8

import sys


input = sys.stdin.readline
INF = float('inf')
MOD = 10 ** 9 + 7


def inpl(): return list(map(int, input().split()))


# aのp乗を求めるアルゴリズム
# MOD版
def pow_mod(a, p):
    if p == 0: return 1

    if p % 2 == 0:
        half_p = p // 2
        half = pow_mod(a, half_p)
        return half * half % MOD
    else:
        return a * pow_mod(a, p - 1) % MOD


def solve(N, A):
    # 1/1 + 1/2 + 1/3 + ... + 1/Nの累積和を求めておく
    inv_sum = [0]
    for i in range(N):
        inv_sum.append((inv_sum[-1] + pow_mod(i + 1, MOD - 2)) % MOD)
    del inv_sum[0]

    # 各iについて、Σ(j=1, N) 1/(|j - i| + 1)を求めて、
    # それらを係数としてA[i]に掛け、加算する
    ans = 0
    for i in range(N):
        ans += + A[i] * (inv_sum[N - 1 - i] + inv_sum[i] - 1)
        ans %= MOD

    # 階乗N!を求める
    fact = 1
    for i in range(N):
        fact *= (i + 1)
        fact %= MOD

    return ans * fact % MOD


N = int(input())
A = inpl()
print(solve(N, A))


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

typedef long long ll;

#define reg register 
#define rep(a,b,c) for(reg int a=b,a##end=c;a<=a##end;++a)
#define drep(a,b,c) for(reg int a=b,a##end=c;a>=a##end;--a)

char IO;
int rd(){
	int s=0,f=0;
	while(IO=getchar(),IO<'0'||IO>'9')if(IO=='-')f=1;
	do s=(s<<1)+(s<<3)+(IO^'0');
	while(IO=getchar(),IO>='0'&&IO<='9');
	return f?-s:s;
}

const int N=2e5+10;

int n,m;
int cnt;


vector <int> G[N],R[N];

int fa[N];
int Find(int x) { return fa[x]==x?x:fa[x]=Find(fa[x]); }

int sz[N];

void merge(int x,int y){
	int fx=Find(x),fy=Find(y);
	//cout<<"M"<<x<<' '<<y<<' '<<fx<<' '<<fy<<endl;
	if(fx!=fy) {
		if(G[fx].size()<G[fy].size()) swap(fx,fy);
		sz[fx]+=sz[fy];
		fa[fy]=fx;
	}
}


int main(){
	n=rd();
	rep(i,1,2e5) fa[i]=i,sz[i]=1;
	rep(i,1,n){
		int x=rd(),y=rd();
		R[y].push_back(x);
		G[x].push_back(y);
	}
	rep(i,1,1e5) rep(j,1,R[i].size()-1) merge(R[i][0],R[i][j]);
	rep(i,1,1e5) rep(j,1,G[i].size()-1) merge(1e5+G[i][0],1e5+G[i][j]);
	ll ans=0;
	rep(i,1,1e5) if(Find(i)==i) { 
		if(!G[i].size())continue;
		int f=Find(G[i][0]+1e5);
		ans+=1ll*sz[i]*sz[f];
		//cout<<sz[i]<<' '<<sz[f]<<endl;
	}
	ans-=n;
	cout<<ans<<endl;
}







Measured memory_bytes: 14336
import bisect
n=int(input())
l=sorted(map(int,input().split()))
ans=0
for i in range(n):
  for j in range(i+1,n):
    idx=bisect.bisect_left(l,l[i]+l[j])
    ans+=max(0,idx-j-1)
    
print(ans)

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

namespace AtCoder
{

    class Program
    {
        static void Main()
        {
            Solve();

            Console.ReadKey();
        }

        static void Solve()
        {
            var X = GetInt();
            var A = GetInt();
            var B = GetInt();
            var ans = (X - A) % B;
            Console.Write(ans);
        }



        static public string GetStr() { return Console.ReadLine(); }
        static public int GetInt() { return int.Parse(Console.ReadLine()); }
        static public long GetLong() { return long.Parse(Console.ReadLine()); }
        static public string[] GetStrArray() { return Console.ReadLine().Split(' '); }
        static public int[] GetIntArray() { return Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); }
        static public long[] GetLongArray() { return Console.ReadLine().Split(' ').Select(long.Parse).ToArray(); }
        static public List<double> GetDoubleList() { return Console.ReadLine().Split(' ').Select(double.Parse).ToList(); }
        static public void WriteObjects<T>(IEnumerable<T> values) { foreach (var o in values) { Console.Write(o + " "); } }

        static bool eq<T, U>() => typeof(T).Equals(typeof(U));
        static T ct<T, U>(U a) => (T)Convert.ChangeType(a, typeof(T));
        static T cv<T>(string s) => eq<T, int>() ? ct<T, int>(int.Parse(s))
                           : eq<T, long>() ? ct<T, long>(long.Parse(s))
                           : eq<T, double>() ? ct<T, double>(double.Parse(s))
                           : eq<T, char>() ? ct<T, char>(s[0])
                                             : ct<T, string>(s);
        static void Multi<T>(out T a) => a = cv<T>(GetStr());
        static void Multi<T, U>(out T a, out U b)
        {
            var ar = GetStrArray(); a = cv<T>(ar[0]); b = cv<U>(ar[1]);
        }
        static void Multi<T, U, V>(out T a, out U b, out V c)
        {
            var ar = GetStrArray(); a = cv<T>(ar[0]); b = cv<U>(ar[1]); c = cv<V>(ar[2]);
        }
    }
}

Measured memory_bytes: 11092
#include <iostream>

using namespace std;

static const int WHITE=0;
static const int GRAY=1;
static const int BLACK=2;
static const int LEN=100;
static const int INF=(1<<21);

int n,M[LEN][LEN];


int prim()
{
    int u,minc;
    int d[LEN],node[LEN],color[LEN];
    for(int i=0; i<n; i++){
        node[i]=-1;
        d[i]=INF;
        color[i]=WHITE;
    }
    d[0]=0;

    while(1){
        minc=INF;
        u=-1;
        for(int i=0;i<n;i++){
            if(d[i]<minc && color[i]!=BLACK){
                u=i; minc=d[i];
            }
        }

        if(u==-1) break;
        color[u]= BLACK;

        for(int i=0;i<n;i++){
            if(color[i]!=BLACK && M[u][i]!=INF){
                if(M[u][i]<d[i]){
                    d[i]=M[u][i];
                    node[i]=u;
                    color[i]=GRAY;
                }
            }
        }
    }
    int sum=0;
    for(int i=0;i<n;i++){
        if(node[i]!=-1) sum+=M[i][node[i]];
    }
    return sum;
}



int main()
{
    cin>>n;
    for(int i=0; i<n; i++)
    {
        for(int j=0; j<n; j++)
        {
            int k;
            cin>>k;
            M[i][j]=(k==-1?INF:k);
        }
    }
    cout<<prim()<<endl;

    return 0;
}



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

int main(void){
  int x,a,b;
  cin >> x >> a >> b;
  if(b-a <= 0){
    cout << "delicious" << '\n';
  }
  else if(b-a > x){
    cout << "dangerous" << '\n';
  }
  else{
    cout << "safe" << '\n';
  }
}


Measured memory_bytes: 256
while True:
    n, x = list(map(int, input().split()))
    if n == 0 and x == 0:
        break
    ans = 0
    for i in range(1,n+1):
        for j in range(i+1,n+1):
            for k in range(j+1,n+1):
                if (i != j and j != k and k != i) and (i + k + j == x):
                    ans +=1
    print(int(ans))


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

int main() {
  int n;
  string s;
  cin >> n >> s;
  int mx = 0;
  int x = 0;
  for (int i = 0; i < n; i++) {
    if (s.at(i) == 'I') {
      x++;
    }
    if (s.at(i) == 'D') {
      x--;
    }
    mx = max(mx, x);
  }
  cout << mx << endl;
  return 0;
}


Measured memory_bytes: 3608
#include<math.h>
#include<map>
#include<iostream>
#include <algorithm>
#include <string>
#include<vector>
#include<array>
#include<tuple>
#include<queue>
#include<stack>
#include<iomanip>
#include<bitset>
#include <list>
//AtCoderC++.cpp

using namespace std;

inline int ceileing(int a, int b) {
	return a % b == 0 ? a / b : a / b + 1;
}

int main() {
	int N; cin >> N;
	int answer = 1;
	while (answer * 2 <= N) {
		answer *= 2;
	}
	cout << answer << endl;
}

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

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;

#define fi first
#define se second
#define repl(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define mmax(x,y) (x>y?x:y)
#define mmin(x,y) (x<y?x:y)
#define maxch(x,y) x=mmax(x,y)
#define minch(x,y) x=mmin(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
#define exist(x,y) (find(all(x),y)!=x.end())
#define bcnt __builtin_popcount

#define INF 1e16

struct RangeMinQuery{
  int dat[(1<<19)-1];
  int size;

  void init(int n_){
    size=1;
    while(size<n_) size*=2;
    for(int i=0;i<2*size-1;i++)dat[i]=INT_MAX;
  }

  void update(int k,int a){
    k+=size-1;
    dat[k]=a;
    while(k>0){
      k=(k-1)/2;
      dat[k]=min(dat[k*2+1],dat[k*2+2]);
    }
  }

  int subquery(int a,int b,int k,int l,int r){
    if(r<=a||b<=l)return INT_MAX;
    if(a<=l&&r<=b)return dat[k];
    else{
      return min(subquery(a,b,k*2+1,l,(l+r)/2),subquery(a,b,k*2+2,(l+r)/2,r));
    }
  }
  
  int query(int a,int b){
    return subquery(a,b,0,0,size);
  }
};

int n;
ll x[202020],y[202020];
multiset<ll> st;
RangeMinQuery r1,r2;

int main(){
	cin.sync_with_stdio(false);
  cin>>n;
  rep(i,n){ // x[i] <= y[i]
    cin>>x[i]>>y[i];
    if(x[i]>y[i])swap(x[i],y[i]);
  }
  ll maxx=*max_element(y,y+n);
  ll minn=*min_element(x,x+n);
  ll resa,resb;
  {
    ll mina=minn,maxb=maxx;
    ll maxa=-INF;
    rep(i,n){
      maxch(maxa,x[i]);
    }
    ll minb=INF;
    rep(i,n){
      minch(minb,y[i]);
    }
    resa=(maxa-mina)*(maxb-minb);
  }
  {
    ll mina=minn,maxa=maxx;
    ll mind=INF;
    r1.init(n); r2.init(n);
    rep(i,n){
      r1.update(i,x[i]);
      r2.update(i,-x[i]);
    }
    vector<P> tmp;
    rep(i,n){
      tmp.push_back(P(x[i],i));
    }
    sort(all(tmp));
    minch(mind,-r2.query(0,n)-r1.query(0,n));
    rep(i,n){
      int idx=tmp[i].se;
      r1.update(idx,y[idx]);
      r2.update(idx,-y[idx]);
      minch(mind,-r2.query(0,n)-r1.query(0,n));
    }
    resb=(maxa-mina)*mind;
  }
  cout<<min(resa,resb)<<endl;
  return 0;
}


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

using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pii;

#define min(a, b) ((a) < (b)? (a):(b))
#define max(a, b) ((a) > (b)? (a):(b))
#define abs(a) ((a) < (0)? -(a):(a))
#define rep(i, n) REP(i, 0, (n))
#define REP(i, a, n) for(int i=(a); i<(n); i++)
#define pb push_back

const int MOD = 1e9 +7;

int n;
map<string, ll> memo[105];

bool ok(string last4) {
    assert(last4.size() == 4);
    rep(i, 4) {
        string s = last4;
        if(i > 0) swap(s[i-1], s[i]);
        if(s.substr(0, 3) == "AGC" || s.substr(1, 3) == "AGC") return false;
    }
    return true;
}

int dfs(int len, string last3) {
    assert(last3.size() == 3);
    if(memo[len].count(last3)) return memo[len][last3];
    if(len == n) return 1;
    int ret = 0;
    for(char c : {'A', 'C', 'G', 'T'})
        if(ok(last3 + c)) ret = (ret + dfs(len+1, last3.substr(1, 2)+c)) % MOD;
    return memo[len][last3] = ret;
}

int main() {
    cin >> n;
    cout << dfs(0, "...") << endl;
}

Measured memory_bytes: 896
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author aajisaka
 */

#include<bits/stdc++.h>

using namespace std;

void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

#define SPEED ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define all(v) v.begin(), v.end()
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; }

using ll = long long;
using P = pair<ll, ll>;

constexpr long double PI = 3.14159265358979323846264338327950288L;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

class ERedAndGreenApples {
public:
    void solve(istream& cin, ostream& cout) {
      SPEED;
      ll x, y, a, b, c; cin >> x >> y >> a >> b >> c;
      vector<ll> p(a);
      rep(i, a) cin >> p[i];
      vector<ll> q(b);
      rep(i, b) cin >> q[i];
      vector<ll> r(c);
      rep(i, c) cin >> r[i];

      vector<P> vec;
      rep(i, a) {
        vec.emplace_back(p[i], 1LL);
      }
      rep(i, b) {
        vec.emplace_back(q[i], 2LL);
      }
      rep(i, c) {
        vec.emplace_back(r[i], 3LL);
      }

      sort(vec.rbegin(), vec.rend());

      int red = 0;
      int green = 0;
      int sum = 0;
      ll ret = 0;
      for(auto e: vec) {
        debug(e.first, e.second);
        if (e.second == 1 && red < x) {
          ret += e.first;
          red++;
          sum++;
        } else if (e.second == 2 && green < y) {
          ret += e.first;
          green++;
          sum++;
        } else if (e.second == 3) {
          ret += e.first;
          sum++;
        }
        if (sum == x+y) {
          cout << ret << endl;
          return;
        }
      }




    }
};

signed main() {
  ERedAndGreenApples solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}

Measured memory_bytes: 12908
N,A = map(int,input().split())
x = list(map(int,input().split()))
xsum =sum(x)

dp = [ [ [ 0 for j in range(N+1)] for i in range(2501) ] for k in range(N+1)]
dp[0][0][0] = 1
for i in range(N):
    for j in range(2501):
        for k in range(N):
            if j - x[i] >=0:
                dp[i+1][j][k+1] = dp[i][j-x[i]][k]
            dp[i+1][j][k] += dp[i][j][k]

ans = 0
for k in range(1,N+1):
    ans += dp[N][A*k][k]
print(ans)


Measured memory_bytes: 112476
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1000000007;

#include <bits/stdc++.h>
using namespace std;

string to_string(string s)
{
    return '"' + s + '"';
}

string to_string(const char *s)
{
    return to_string((string)s);
}

string to_string(bool b)
{
    return (b ? "true" : "false");
}

template <typename A, typename B>
string to_string(pair<A, B> p)
{
    return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A>
string to_string(A v)
{
    bool first = true;
    string res = "{";
    for (const auto &x : v)
    {
        if (!first)
        {
            res += ", ";
        }
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}

void debug_out() { cerr << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T)
{
    cerr << " " << to_string(H);
    debug_out(T...);
}

int N, T, ans, minv = mod, maxg = 0;

int main()
{
    cin >> N >> T;
    vector<int> A(N);
    for (int i = 0; i < N; i++)
    {
        cin >> A[i];
        if (A[i] <= minv)//min
            minv = A[i];
        if (maxg < A[i] - minv)
        {
            maxg = A[i] - minv;
            ans = 1;
        }
        else if (maxg == A[i] - minv)
            ans++;
    }
    cout << ans << endl;
}

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

using namespace std;

const int N = 2005;

int n, m;
int res;
int sum[N];
int fr[N], to[N];
int h[N], p[11][N];
int color[N * 2];
vector<int> G[N], G2[N * 2];
set< pair<int, int> > S[N];
vector< pair<int, int> > vdel[N];

int lca(int u, int v) {
	if (h[u] > h[v]) swap(u, v);
	for (int i = 10; i >= 0; --i) if (h[p[i][v]] >= h[u]) v = p[i][v];
	for (int i = 10; i >= 0; --i) if (p[i][v] != p[i][u]) v = p[i][v], u = p[i][u];
	return (u == v) ? u : p[0][u];
}

void dfs(int u) {
	for (int i = 1; i <= 10; ++i) {
		p[i][u] = p[i - 1][p[i - 1][u]];
	}
	for (auto v : G[u]) if (p[0][u] != v) {
		p[0][v] = u, h[v] = h[u] + 1, dfs(v);
	}
}

void solve(int u) {
	int pmx = 0;
	for (auto v : G[u]) if (p[0][u] != v) {
		solve(v);
		if (S[v].size() == 1) res++;
		if (S[v].size() > 1) {
			res += 2;
			if (!sum[v]) {
				auto p0 = S[v].begin();
				auto p1 = ++S[v].begin();
				G2[p0 -> second].push_back(p1 -> second);
				G2[p1 -> second].push_back(p0 -> second);
				int x = p0 -> first;
				int y = p1 -> first;
				if (h[x] > h[y]) swap(x, y);
				sum[v]++, sum[y]--;
			}
		}
		sum[u] += sum[v];
		if (!pmx || S[pmx].size() < S[v].size()) pmx = v;
	} 
	if (pmx) swap(S[u], S[pmx]);
	for (auto v : G[u]) if (p[0][u] != v) {
		for (auto i : S[v]) S[u].insert(i);
	}
	for (auto i : vdel[u]) S[u].erase(i);
}

void dfscolor(int u) {
	for (auto v : G2[u]) {
		if (color[v]) {
			assert(color[v] == 3 ^ color[u]);
			continue;
		}
		color[v] = 3 ^ color[u], dfscolor(v);
	}
}

int main() {
	ios::sync_with_stdio(false);
	cin >> n >> m;
	for (int i = 1; i < n; ++i) {
		int u, v; cin >> u >> v;
		G[u].push_back(v), G[v].push_back(u);
	}
	p[0][1] = 1, dfs(1);
	for (int i = 0; i < m; ++i) {
		cin >> fr[i] >> to[i];
		if (h[fr[i]] > h[to[i]]) swap(fr[i], to[i]);
		int tmp = lca(fr[i], to[i]);
		if (tmp == fr[i]) {
			S[to[i]].insert({tmp, i * 2});
			vdel[tmp].push_back({tmp, i * 2});
		}
		else {
			S[to[i]].insert({tmp, i * 2});
			S[fr[i]].insert({tmp, i * 2 + 1});
			G2[i * 2].push_back(i * 2 + 1);
			G2[i * 2 + 1].push_back(i * 2);
			vdel[tmp].push_back({tmp, i * 2});
			vdel[tmp].push_back({tmp, i * 2 + 1});
		}
	}
	solve(1);
	for (int i = 0; i < m * 2; ++i) {
		if (!color[i]) color[i] = 1, dfscolor(i);
	}
	cout << res << '\n';
	for (int i = 0; i < m; ++i) {
		if (color[i * 2] == 1) cout << fr[i] << ' ' << to[i] << '\n';
		else cout << to[i] << ' ' << fr[i] << '\n';
	}
}


Measured memory_bytes: 1536
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower

#define lint long long

using namespace std;

int main()
{
  int n,sum=0;
  cin >> n;

  vector<int> y(n);
  for(int i=0;i<n;i++){
    int x;
    cin >> x;
    y.at(i) = x;
    sum += x;
  }
  double ave = (double)sum/n;
  int ave_i = sum/n;

  int mid = 0;
  if(ave-ave_i<=0.5){
    mid = ave_i;
  }else{
    mid = ave_i+1;
  }

  int answer = 0;
  for(int i=0;i<n;i++){
    answer += (y.at(i)-mid)*(y.at(i)-mid);
  }
  cout << answer << endl;

  return 0;
}


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

int main() {
	ios::sync_with_stdio(false);
	while(true) {
		string S; getline(cin, S);
		if(S == ".") break;
		stack<char> stk;
		bool ok = true;
		for(int i = 0; i < (int)S.size(); ++i) {
			if(S[i] == '[') {
				stk.push(S[i]);
			}
			if(S[i] == '(') {
				stk.push(S[i]);
			}
			if(S[i] == ']') {
				if(stk.empty() == false && stk.top() == '[') {
					stk.pop();
				}
				else {
					ok = false;
					break;
				}
			}
			if(S[i] == ')') {
				if(stk.empty() == false && stk.top() == '(') {
					stk.pop();
				}
				else {
					ok = false;
					break;
				}
			}
		}
		if(stk.empty() == false) ok = false;
		cout << (ok ? "yes" : "no") << endl;
	}
}

Measured memory_bytes: 1184
import Data.Array

main = do
  s <- getLine
  let ans = compute s
  putStrLn $ unwords $ map show ans

compute :: String -> [Int]
compute s = elems res
  where
    n = length s
    ar0 = listArray (1,n) [ if c == 'L' then i-1 else i+1 | (i,c) <- zip [1..] s ]
    do10 arr = listArray (1,n) [ (!! 10) $ iterate (arr !) i | i <- [1..n] ]
    ar100 = (!! 5) $ iterate do10 ar0
    res = accumArray (+) 0 (1,n) [ (ar100 ! i,1) | i <- [1..n] ]


Measured memory_bytes: 43260
#include <iostream>
#include <algorithm>
#include <cstdio>

#define MAX 1010001000

using namespace std;

int main()
{
    int a, b;
    string str;
    bool c = false, f = false;

    cin >> str;

    for (int i = 0; i < str.length(); i++) {
        if (c == false && str[i] == 'C') {
            c = true;
        } else if (c && str[i] == 'F') {
            f = true;
        }
    }

    if (c && f) {
        cout << "Yes" << endl;
    } else {
        cout << "No" <<endl;
    }

    return 0;
}


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

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

  int k, a, b;
  cin >> k >> a >> b;
  for (int i = a; i <= b; ++i)
    if (i % k == 0) {
      cout << "OK\n";
      return 0;
    }

  cout << "NG\n";
}

Measured memory_bytes: 3616
#include<bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < (int)n; i++)
#define REPvec(itr, mp) for(auto itr = mp.begin();itr != mp.end(); itr ++)
#define all(x) x.begin(), x.end()
#define MOD 1000000007//1e9+7
using namespace std;
typedef long long ll;
typedef vector<int >    vecint;
typedef vector<string > vecstr;
int main()
{
  int n, m;
  cin >> n >> m;
  cout << (n - 1)*(m - 1) << endl;
}


Measured memory_bytes: 256
let () =
  let s = read_line () in
  let dp = Array.make_matrix (String.length s) 2 min_int in
  dp.(0).(0) <- 1;
  dp.(0).(1) <- min_int;
  dp.(1).(0) <- if s.[0] = s.[1] then min_int else 2;
  dp.(1).(1) <- 1;
  for i = 2 to String.length s - 1 do
    dp.(i).(0) <-
      1 +
      if s.[i - 1] = s.[i]
      then dp.(i - 1).(1)
      else max dp.(i - 1).(0) dp.(i - 1).(1);
    dp.(i).(1) <- 1 + dp.(i - 2).(0)
  done;
  Printf.printf "%d\n" @@
  max dp.(String.length s - 1).(0) dp.(String.length s - 1).(1)


Measured memory_bytes: 9984
#!/usr/bin/env python3
import sys


def solve(N: int, R: int):
    if N >= 10:
        print(R)
    else:
        print(R + 100 * (10 - N))


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    R = int(next(tokens))  # type: int
    solve(N, R)

if __name__ == '__main__':
    main()


Measured memory_bytes: 2940
#include<bits/stdc++.h>
#define ll long long
#define dl double
using namespace std;

//***********************************************************************
int MAXNUM = 5e3+5;
vector <int>vis(MAXNUM);
vector<int> pr;
void sieve() {
	pr.push_back(2);
	for(ll i=3;i<MAXNUM;i+=2) if(!vis[i]) {
		pr.push_back(i);
		for(ll j=i*i;j<MAXNUM;j+=2*i) vis[j]=true;
	}
}
//************************************************************************

void solve()
{
    int s,w;
    cin >> s >> w;
    if(w>=s)
    cout << "unsafe" << endl;
    else
    {
        cout <<"safe" << endl;
    }
    
}


int main()
{ 
	ios_base::sync_with_stdio(false); 
    cin.tie(NULL);
	ll t;
	//cin >> t;
	t=1;
	while(t--)
	{
		solve();
	}

	return 0;
}

Measured memory_bytes: 3664
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
using namespace std;

#define int long long
typedef pair<int, int> P;
#define rep(i, n) for (int i=0; i<(n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define _1 first
#define _2 second
#define pb push_back
#define INF (1LL<<60)
#define MOD 1000000007

int N, S;
int f(int b, int n) {
  if (n<b) return n;
  else return f(b, n/b) + (n%b);
}

signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  cin >> N >> S;
  int m = INF;
  for (int b=sqrt(N); b>=2; b--) {
    if (f(b, N) == S) {
      m = b;
    }
  }
  if (m == INF) {
    // 0 x
    if (N == S) m = S+1;
    // x (s-x)
    auto f = [&m](int d) {
      int b = d+1;
      int x = (N-S)/d;
      if (1 <= x && x <= S && x < b && (S-x) < b) m = min(m, b);
    };
    // d | (n-s)
    for (int d=sqrt(N-S); d>=1; d--) {
      if ((N-S) % d == 0) {
        f(d);
        f((N-S)/d);
      }
    }
  }
  if (m == INF) cout << -1 << "\n";
  else cout << m << "\n";
  return 0;
}


Measured memory_bytes: 384
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
using namespace std;

#ifdef LOCAL
	#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
	#define eprintf(...) 42
#endif

typedef long long ll;
typedef pair<int, int> pii;
#define mp make_pair

int cnt[500];

int main()
{
//	freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);

	string s;
	cin >> s;
	for (char c : s)
		cnt[c]++;
	if (abs(cnt['a'] - cnt['b']) <= 1 && abs(cnt['a'] - cnt['c']) <= 1 && abs(cnt['b'] - cnt['c']) <= 1)
		cout << "YES" << endl;
	else
		cout << "NO" << endl;

	return 0;
}


Measured memory_bytes: 512
import java.io.*;
import java.util.*;

public class Main {
	
	static int N;
	static int W;
	static long[][] dp;
	static int[] v;
	static int[] w;
	static int INF = Integer.MAX_VALUE / 2;
		
	public static void main(String[] args) throws IOException {
		FastScanner sc = new FastScanner(System.in);
		
		N = sc.nextInt();
		W = sc.nextInt();
		v = new int[N+1];
		w = new int[N+1];
		for(int i = 1; i <= N; i++){
			w[i] = sc.nextInt();
			v[i] = sc.nextInt();
		}
		
		dp = new long[N+1][W+1];
		
		for(int i = 0; i < N; i++){
			for(int j = 0; j <= W; j++){
				dp[i+1][j] = Math.max(dp[i+1][j], dp[i][j]);
				if(j + w[i+1] <= W){
					dp[i+1][j+w[i+1]] = Math.max(dp[i+1][j+w[i+1]], dp[i][j] + v[i+1]);
				}
			}
		}
		
		System.out.println(dp[N][W]);
		
	}//end main
	
	/*
	public static int solve(int i){
		
	}
	*/
	
}//end Main

class FastScanner {
    private InputStream in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    public FastScanner(InputStream in) {
		this.in = in;
	}
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() {
    	if (hasNextByte()) return buffer[ptr++];
    	else return -1;
    }
    private static boolean isPrintableChar(int c){
    	return 33 <= c && c <= 126;
    }
    public boolean hasNext() {
    	while(hasNextByte() && !isPrintableChar(buffer[ptr]))
    		ptr++; return hasNextByte();
    }
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() {
    	return Double.parseDouble(next());
    }
}


Measured memory_bytes: 128852
import numpy as np
from functools import *

import sys

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def acinput():
    return list(map(int, input().split(" ")))


def factorial(n):
    fact = 1
    for integer in range(1, n + 1):
        fact *= integer
    return fact


H, W, NN = acinput()

initp = np.array(acinput())

S = list(input())[:-1]
T = list(input())[:-1]
#S = list(input().split(""))
#T = list(input().split(""))


def position_relative(direction, direction_op, cs, flg, seq1, seq2, N):
    global H, W
    # N=len(seq1)
    for i in range(len(seq1)):
        s1 = seq1[i]
        s2 = seq2[i]

        #print(cs,flg)
        if s1 == direction:
            cs += flg

        if flg > 0:
            if cs > N:
                return False

        else:
            if cs <= 0:
                return False
            # elif cs>N:
            #    cs=N
        #print(cs)
        if s2 == direction_op:
            #print("op",N)
            cs -= flg
    
    
        if cs > N:
           cs = N
        
        if cs <= 0:
            cs = 1

    return cs


sr = position_relative("R", "L", initp[1], 1, S, T, W)
sl = position_relative("L", "R", initp[1], -1, S, T, W)
su = position_relative("U", "D", initp[0], -1, S, T, H)
sd = position_relative("D", "U", initp[0], 1, S, T, H)

#print(sr, sl, su, sd)

# su=0
# if sr or sl or su or sd:
if sr*sl*su*sd == 0:
    print("NO")
else:
    print("YES")


Measured memory_bytes: 19424
#include<math.h>
#include<stdio.h>

int main(){
	double r,p,s,l;
	scanf("%lf",&r);
	p=3.14159265359;
	s=r*r*p;
	l=2*r*p;
	printf("%lf %lf",s,l);
return 0;
}


Measured memory_bytes: 2088
// AtCode.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <algorithm>
#include <stdint.h>
#include <queue>
#include <bitset>
#include <iomanip>

using namespace std;

#define PI 3.14159265358979323846
#define INF 1e+9

int dp[20+1][50000+1]; // dp[i][j]:i種類まで使ってj円払うときの最小枚数
int coins[20+1];

int main() {

	int n, m;
	cin >> n >> m;
	for (int i = 0; i < m; i++) {
		cin >> coins[i+1];
	}

	fill(dp[0], dp[0] + n + 1, INF);

	for (int i = 1; i < m + 1; i++) {
		for (int j = 1; j < n + 1; j++) {
			if (j < coins[i]) dp[i][j] = dp[i - 1][j];
			else dp[i][j] = min(dp[i - 1][j], dp[i][j - coins[i]] + 1);
		}
	}

	cout << dp[m][n] << endl;

	return 0;
}




Measured memory_bytes: 7200
#include<iostream>
#include<map>
#include<set>
#include<list>
#include<queue>
#include<cmath>
#include<string>
#include<string.h>
#include<iomanip>
#include<stdlib.h>
#include<algorithm>
typedef long long ll;
using namespace std;

int main()
{
	ll a,b;
	cin >> a >> b;
	if(a+b >= 10)
		cout << "error" << endl;
	else
		cout << a+b << endl;
	return 0;
} 

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

const int N = (int)1e5;

int dp[N+5];

int main() {
    for (int i=0; i<N+3; i++) dp[i] = 0;
    dp[0] = 1;

    for (int price=100; price<=105; price++) {
        for (int i=price; i<=N; i++) dp[i] |= dp[i-price];
    }

    int x; scanf("%d", &x);
    printf("%d\n", dp[x]);
    return 0;
}


Measured memory_bytes: 640
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i,n) for(ll i = 0; i<(ll)(n); i++)
#define REPS(i,n) for (ll i = 1; i<=(ll)(n); i++)
#define REPD(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=(a);i<=(b);i++)
#define FORD(i,a,b) for(ll i=(a);i>=(b);i--)
#define pb push_back
#define MOD 1000000007
#define MOD2 998244353

int main(){
	ll n, m; cin >> n >> m;
	ll a, b;
	b = 0;
	REP(i,m){
		cin >> a;
		b+=a;
	}
	if (b>n){
		cout << -1 << endl;
	}
	else{
		cout << n-b << endl;
	}
}

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

using namespace std;

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

typedef long long ll;
typedef unsigned long long ul;
typedef vector<ll> VL;
typedef pair<ll, ll> PL;
typedef priority_queue<ll> PQ;
typedef priority_queue<ll, VL, greater<ll>> PQG;

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

ll N;
string S;
map<pair<string, string>, ll> memo2;

signed main() {
    cin >> N >> S;
    string f = S.substr(0, N), b = S.substr(N, N);
    REP(i, 1 << N) {
        string s1, s2;
        REP(j, N) {
            if(i >> j & 1)
                s1 += b[j];
            else
                s2 += b[j];
        }
        reverse(All(s1));
        reverse(All(s2));
        memo2[{s1, s2}]++;
    }
    ll ans = 0;
    REP(i, 1 << N) {
        string s1, s2;
        REP(j, N) {
            if(i >> j & 1)
                s1 += f[j];
            else
                s2 += f[j];
        }
        ans += memo2[{s1, s2}];
    }
    cout << ans << "\n";
    return 0;
}


Measured memory_bytes: 87040
#include<stdio.h>

int main(void){
    int s,i,stock[1000000],num,m;
    num=1;
    scanf("%d",&s);
    stock[0]=s;
    m=1;
    while(1){
        if((s%2)==0){
            s=s/2;
        }else{
            s=3*s+1;
        }
        m++;
        for(i=0;i<num;i++){
            if(stock[i]==s){
                printf("%d\n",m);
                break;
            }
        }
        if(num!=i) break;
        else{
            stock[i]=s;
            num++;
        }
    }

    return 0;
}


Measured memory_bytes: 128
#include <cstdio>
#include <cstdint>
#include <vector>
#include <algorithm>
#include <queue>

template <class T>
constexpr T inf=(T(1)<<(8*sizeof(T)-3));

template <class Weight>
struct Edge {
  size_t src, dst;
  Weight cost;

  Edge(size_t src, size_t dst, Weight cost=1):
    src(src), dst(dst), cost(cost)
  {}

  bool operator <(const Edge<Weight> &rhs) const {
    if (cost != rhs.cost) return cost < rhs.cost;
    if (src != rhs.src) return src < rhs.src;
    return dst < rhs.dst;
  }
};

template <class Weight>
using Graph=std::vector<std::vector<Edge<Weight>>>;

template <class Weight>
bool is_bipartite_component(
    const Graph<Weight> &g, size_t node, std::vector<int> &colors, 
    int color=1) {

  colors[node] = color;
  std::queue<size_t> q;
  q.emplace(node);
  while (!q.empty()) {
    size_t v=q.front();
    q.pop();
    for (const auto &e: g[v]) {
      if (colors[v] == colors[e.dst]) return false;
      if (colors[e.dst]) continue;
      colors[e.dst] = -colors[v];
      q.emplace(e.dst);
    }
  }
  return true;
};

template <class Weight>
bool is_bipartite(const Graph<Weight> &g, std::vector<int> &colors) {
  int c=0;
  for (size_t i=0; i<g.size(); ++i)
    if (!colors[i] && !is_bipartite_component(g, i, colors, ++c))
      return false;

  return true;
}

int main() {
  size_t N, M;
  scanf("%zu %zu", &N, &M);

  Graph<int> g(N);
  for (size_t i=0; i<M; ++i) {
    size_t A, B;
    scanf("%zu %zu", &A, &B);
    --A;
    --B;

    g[A].emplace_back(A, B);
    g[B].emplace_back(B, A);
  }

  std::vector<int> colors(N);
  if (is_bipartite(g, colors)) {
    size_t B=std::count(colors.begin(), colors.end(), 1);
    printf("%zu\n", B*(N-B)-M);
  } else {
    printf("%zu\n", N*(N-1)/2-M);
  }
}



Measured memory_bytes: 9600
#include <bits/stdc++.h>
#define fi first
#define se second
#define pii pair<int,int>
#define space putchar(' ')
#define enter putchar('\n')
#define mp make_pair
#define pb push_back
#define MAXN 200005
//#define ivorysi
using namespace std;
typedef long long int64;
template<class T>
void read(T &res) {
	res = 0;T f = 1;char c = getchar();
	while(c < '0' || c > '9') {
		if(c == '-') f = -1;
		c = getchar();
	}
	while(c >= '0' && c <= '9') {
		res = res * 10 + c - '0';
		c = getchar();
	}
	res *= f;
}
template<class T>
void out(T x) {
	if(x < 0){putchar('-');x = -x;}
	if(x >= 10) out(x / 10);
	putchar('0' + x % 10);
}

int N,a[MAXN],nxt[MAXN][25];
void Solve() {
	read(N);
	for(int i = 1 ; i <= N ; ++i) read(a[i]);
	for(int i = 0 ; i < 20 ; ++i) nxt[N + 1][i] = N + 1;

	for(int i = N ; i >= 1 ; --i) {
		for(int j = 0 ; j < 20 ; ++j) {
			if(a[i] >> j & 1) {
				nxt[i][j] = i;
			}
			else nxt[i][j] = nxt[i + 1][j];
		}
	}
	int64 ans = 0;
	for(int i = 1 ; i <= N ; ++i) {
		int r = N;
		for(int j = 0 ; j < 20 ; ++j) {
			int t = nxt[i][j];
			if(t != N + 1) r = min(r,nxt[t + 1][j] - 1);
		}
		ans += (r - i + 1);
	}
	out(ans);enter;
}
int main() {
#ifdef ivorysi
	freopen("f1.in","r",stdin);
#endif
	Solve();
}


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

using namespace std;

int main() {
    int a, b;
    cin >> a >> b;

    if (a % 2 == 0 || b % 2 == 0) {
        cout << "Even" << endl;
    } else {
        cout << "Odd" << endl;
    }
    return 0;
}


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

#define SZ(v) ((int)(v).size())
using ll = long long;

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

	ll A, B, N;
	cin >> A >> B >> N;
	ll r = min(N, B-1);
	cout << (ll)((A*r/B)) << endl;
}


Measured memory_bytes: 3640
#include <iostream>
#include <vector>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main()
{
    int n;
    cin >> n;
    string s;
    cin >> s;
    if(n % 2 == 1){
        cout << "No" << endl;
        return 0;
    }
    for(int i = 0; i < n / 2; i++){
        if(s[i] != s[i + n / 2]){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define IL inline
#define _ 18
#define ll long long
#define RG register
using namespace std ;

IL int gi() {
	RG int data = 0 , fu = 1 ; RG char ch = 0 ;
	while(ch != '-' && (ch < '0' || ch > '9')) ch = getchar() ; if(ch == '-') fu = -1 , ch = getchar() ;
	while('0' <= ch && ch <= '9') data = (data << 1) + (data << 3) + (ch ^ 48) , ch = getchar() ; return data * fu ;
}

int n , A , B , cnt[(1 << _)] , Mx ; 

void dfs(int delta , int fin , int ban) {  //task: 0 ==> fin ; extra xor = delta ;
	if(cnt[Mx ^ ban] == 1) return (void)(printf("%d %d " , delta , fin ^ delta)) ;
	for(int i = 0; i < n; i ++)
		if(!(ban & (1 << i)) && (fin & (1 << i))) {
			for(int j = 0; j < n; j ++)
				if(!(ban & (1 << j)) && i != j) {
					dfs(delta , 1 << j , ban | (1 << i)) ;
					dfs(delta ^ (1 << i) ^ (1 << j) , fin ^ (1 << i) ^ (1 << j) , ban | (1 << i)) ;
					return ;
				}
		}
}

int main() {
	n = gi() ; A = gi() ; B = gi() ; Mx = (1 << n) ;
	-- Mx ; 
	for(int i = 0; i <= Mx; i ++) cnt[i] = __builtin_popcount(i) ;
	if(cnt[A ^ B] & 1) {
		puts("YES") ;
		dfs(A , A ^ B , 0) ; puts("") ;
	}
	else puts("NO") ;
}


Measured memory_bytes: 1536
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
 
using namespace std;
typedef long long ll;
#define REP(i,n) for(int i=0;i<(int)(n);i++)

class BellmanFord{
    public:
        typedef struct Edge{
            int from,to,cost;
            Edge(int f,int t,int c):from(f),to(t),cost(c){}
        } Edge;
        const ll INF=1<<30;
        int edge_num, vertex_num, start, goal;
        vector<Edge> edges;
        vector<ll> dist;
        vector<int> negative;

    BellmanFord(int e,int v,int s,int g) : edge_num(e),vertex_num(v),start(s),goal(g){
        dist=vector<ll>(vertex_num,INF);
        dist[start]=0;
        negative=vector<int>(vertex_num,false);
    }

    void connect(int from, int to, int cost) {
        edges.push_back(Edge(from,to,cost));
    }

    void relax(){
        REP(i,vertex_num){
            for(auto edge : edges){
                if(dist[edge.from]!=INF && dist[edge.to]>dist[edge.from]+edge.cost)
                   dist[edge.to]=dist[edge.from]+edge.cost;
            }
        }
    }

    void check_negative_cycle(){
        REP(i,vertex_num){
            for(auto edge : edges){
                if(dist[edge.from]==INF)continue;
                if(dist[edge.to]>dist[edge.from]+edge.cost){
                    negative[edge.to]=true;
                    dist[edge.to]=dist[edge.from]+edge.cost;
                }
                if(negative[edge.from]==true)negative[edge.to]=true;
            }
        }
    }

    ll distance(){
        this->relax();
        ll ans_dist=dist[goal];
        this->check_negative_cycle();
        if(ans_dist>dist[goal] || negative[goal]==true)return -INF;
        else return ans_dist;
    }
};

int main(){
    const ll INF=1<<30;
    int n,m,p;
    cin >> n >> m >> p;
    BellmanFord bf(m,n,0,n-1);
    int a,b,c;
    REP(i,m){
        cin >> a >> b >> c;
        bf.connect(a-1,b-1,p-c);
    }
    ll dist=bf.distance();
    if(dist==-INF)printf("-1\n");
    else if(dist>0)printf("0\n");
    else printf("%lld\n",-dist);
    return 0;
}

Measured memory_bytes: 512
#include <iostream>
#include <string>
#include <algorithm> 
#include<map>
using namespace std;
typedef long long lint;
typedef pair<int ,int> pi;
const int MAXN=20005;
map<int,int> mp;
int query(int x){
	if(mp.find(x)!=mp.end()) return mp[x];
	printf("%d\n",x);
	fflush(stdout);
	string s;
	cin>>s;
	if(s=="Vacant") exit(0);
	return mp[x]=(s=="Male");
}
int main(){
	int n;
	cin>>n;
	int s=0,e=n-1;
	while(e-s>=2){
		int m=(s+e)/2;
		if((query(m)^(m%2))!=(query(s)^(s%2))){
			e=m;
		}
		else s=m;
	}
	for(int i=s;i<=e;i++) query(i);
}

Measured memory_bytes: 852
macro_rules! get {
    (Vec<$t:ty>) => {
        {
            let mut line: String = String::new();
            std::io::stdin().read_line(&mut line).unwrap();
            line.split_whitespace()
                .map(|t| t.parse::<$t>().unwrap())
                .collect::<Vec<_>>()
        }
    };
    ($t:ty) => {
        {
            let mut line: String = String::new();
            std::io::stdin().read_line(&mut line).unwrap();
            line.trim().parse::<$t>().unwrap()
        }
    };
    ($($t:ty),*) => {
        {
            let mut line: String = String::new();
            std::io::stdin().read_line(&mut line).unwrap();
            let mut iter = line.split_whitespace();
            (
                $(iter.next().unwrap().parse::<$t>().unwrap(),)*
            )
        }
    };
    ($t:ty; $n:expr) => {
        (0..$n).map(|_|
            get!($t)
        ).collect::<Vec<_>>()
    };
    ($($t:ty),*; $n:expr) => {
        (0..$n).map(|_|
            get!($($t),*)
        ).collect::<Vec<_>>()
    };
}

fn main() {
    let (N, P) = get!(usize, usize);
    let A = get!(Vec<usize>);

    let mut even = vec!(0; N + 1);
    let mut odd = vec!(0; N + 1);
    even[0] = 1;
    odd[0] = 0;
    for i in 0..N {
        even[i + 1] = (2 - A[i] % 2) * even[i] + (A[i] % 2) * odd[i];
        odd[i + 1] = (2 - A[i] % 2) * odd[i] + (A[i] % 2) * even[i];
    }

    let ans = if P == 0 {
        even[N]
    } else {
        odd[N]
    };

    println!("{}", ans);
}


Measured memory_bytes: 4352
#include<iostream>
#include<math.h>
using namespace std;

typedef struct point_tag {
  double x;
  double y;
} point;

void print(point p){
  cout << p.x << " " << p.y << endl;
}

void koch(int n, point p1, point p2){
  if (n == 0) return;

  point s, u, t;
  double th = M_PI * 60.0 / 180.0;

  s.x = p1.x * 2 / 3  + p2.x / 3;
  s.y = p1.y * 2 / 3  + p2.y / 3;
  t.x = p1.x / 3  + p2.x * 2 / 3;
  t.y = p1.y / 3  + p2.y * 2 / 3;
  u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x;
  u.y = (t.x - s.x) * sin(th) + (t.y - s.y) * cos(th) + s.y;

  koch(n-1, p1,s);

  print(s);
  koch(n-1, s,u);

  print(u);
  koch(n-1, u,t);

  print(t);
  koch(n-1, t,p2);
}

int main(){
  int n;
  cin >> n;
  point s, e;
  s.x = 0.0;
  s.y = 0.0;
  e.x = 100.0;
  e.y = 0.0;

  print(s);
  koch(n, s, e);
  print(e);

  return 0;
}


Measured memory_bytes: 3288