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

int N;
string str;
struct DL_Node {
	int data;
	struct DL_Node *next;
	struct DL_Node *pre;
};

void Insert(DL_Node *&L, int x)
{
	DL_Node *t = (DL_Node *)malloc(sizeof(DL_Node));
	t->data = x;
	L->next->pre = t;
	t->next = L->next;
	t->pre = L;
	L->next = t;
	
}

void Delete(DL_Node *&L, int x)
{
	DL_Node *r = L;
	while (r->next != L)
	{
		if (r->next->data == x)
		{
			DL_Node *p = r->next;
			r->next->next->pre = r;
			r->next = r->next->next;
			free(p);
			break;
		}
		else
		{
			r = r->next;
		}
	}
}
void deleteFirtst(DL_Node* &L)
{
	if (L->next != L)
	{
		DL_Node *p = L->next;
		p->next->pre = L;
		L->next = p->next;
		free(p);
	}
}
void deleteLast(DL_Node *&L)
{
	if (L->next != L)
	{
		DL_Node *p = L->pre;
		L->pre = p->pre;
		p->pre->next = p->next;
		free(p);
	}
}
int main()
{
	DL_Node *L = (DL_Node *)malloc(sizeof(DL_Node));
	L->next = L;
	L->pre = L;
	L->data = -1;
	DL_Node *p = L;
	cin >> N;
	cin.get();
	for (int i = 0; i < N; ++i)
	{
		getline(cin, str);
		if (str == "deleteFirst") deleteFirtst(L);
		else if (str == "deleteLast") deleteLast(L);
		else {
			int num = stoi(str.substr(7));
			string com = str.substr(0, 6);
			if (com == "insert") Insert(L, num);
			else Delete(L, num);
		}
	}
	for (int i = 0; p->next != L; ++i)
	{
		if (i) printf(" ");
		printf("%d", p->next->data);
		p = p->next;
	}
	cout << endl;
	free(L);
	return 0;
}


Measured memory_bytes: 34488
import java.util.*;

public class Main{
  public static void main(String args[]){
  	Scanner scan = new Scanner(System.in);
  	int num = scan.nextInt();
  	if(num==0)
  		System.out.println(1);
  	else
  		System.out.println(0);
  	scan.close();
  }
}

Measured memory_bytes: 26912
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll N=1000000;
typedef long long ll;
ll qpow(ll a,ll b)
{
    ll ans=1;
    while(b)
    {
        if(b&1)
        {
            ans=ans*a;
        }
        a=a*a;
        b>>=1;
    }
    return ans;
}
ll gcd(ll a, ll b)
{
    ll da = max(a,b);
    ll xiao = min(a,b);
    if(da % xiao == 0)
        return xiao;
    else
	return gcd(xiao, da % xiao);
}
bool IsPrime(ll n)
{
	if(n <= 1){
		return false;
	}
    for (ll i = 2; i*i <=n; i++)
    {
        if ((n % i) == 0){
            return false;
        }
    }
    return true;
}


vector<ll>v[20];
map<ll,ll>Vis;
ll a[N],cnt,Type;
void dfs(ll x,ll step)
{
    if(Vis[x]==0&&step==Type)
    {
        Vis[x]=1;
        a[cnt++]=x;
        return ;
    }
    for(ll i=0; i<v[step].size(); i++)
    {
        dfs(x*v[step][i],step+1);
    }
}
void solve()
{
    ll n,x,p,o,ans=0;
    cin>>o>>p;
     n=gcd(o,p);

    cnt=0;
    for(ll i=0; i<20; i++)
    {
        v[i].clear();
    }
    Type=0;
    Vis.clear();
    for(ll i=2; i*i<=n; i++)
    {
        if(n%i==0)
        {
            ll D=0;
            while(n%i==0)
            {
                D++;
                n/=i;
            }
            for(ll j=0; j<=D; j++)
            {
                v[Type].push_back(qpow(i,j));
            }
            Type++;
        }
    }
    if(n!=1)
    {
        v[Type].push_back(1);
        v[Type].push_back(n);
        Type++;
    }
    dfs(1,0);
    sort(a,a+cnt);
    for(ll i=0; i<cnt; i++)
    {
        if(IsPrime(a[i]))
            ans++;
       // printf("%lld%c",a[i],i==cnt-1?'\n':' ');
    }
    cout<<ans+1;
}
int main()
{
        solve();

    return 0;
}


Measured memory_bytes: 768
#pragma GCC optimize("Ofast")
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define PI 3.141592
#define all(a) (a).begin(), (a).end()
#define fi first
#define se second

int main(){
    int N;
    cin >> N;
    vector<int> L(N);
    for(int i = 0; i < N; i++) cin >> L[i];
    int sum = 0;
    for(int i = 0; i < N; i++) sum += L[i];
    int max_l = 0;
    for(int i = 0; i < N; i++){
        max_l = max(max_l, L[i]);
    }
    if(max_l < sum - max_l) puts("Yes");
    else puts("No");
}


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

#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep3(i,m,n) for(int (i)=m;(i)<=(n);(i)++)
#define rep3rev(i,m,n) for(int (i)=m;(i)>=(n);(i)--)
#define all(a) (a.begin()),(a.end())
#define rall(a) (a.rbegin()),(a.rend())
#define fi first
#define se second

typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int, int> pii;

void Main()
{
	int a, b;
  	cin >> a >> b;
	cout << max({a+b, a-b, a*b}) << endl;
	return;
}

int main()
{
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Main();
	return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
// #define int               long long 
#define pb                push_back
#define ppb               pop_back
#define pf                push_front
#define ppf               pop_front
#define all(x)            (x).begin(),(x).end()
#define uniq(v)           (v).erase(unique(all(v)),(v).end())
#define sz(x)             (int)((x).size())
#define fr                first
#define sc                second
#define pii               pair<int,int>
#define loop(i,a,b)        for(int i=a;i<b;i++)
#define mem1(a)           memset(a,-1,sizeof(a))
#define mem0(a)           memset(a,0,sizeof(a))
#define ppc               __builtin_popcount
#define ppcll             __builtin_popcountll
#define br                break
#define con               continue
#define ll				  long long int

template<typename T1,typename T2>istream& operator>>(istream& in,pair<T1,T2> &a){in>>a.fr>>a.sc;return in;}
template<typename T1,typename T2>ostream& operator<<(ostream& out,pair<T1,T2> a){out<<a.fr<<" "<<a.sc;return out;}
template<typename T,typename T1>T amax(T &a,T1 b){if(b>a)a=b;return a;}
template<typename T,typename T1>T amin(T &a,T1 b){if(b<a)a=b;return a;}
 
const long long INF=1e18;
const int32_t M=1e9+7;
const int32_t MM=998244353;

priority_queue<pii, vector<pii>, greater<pii> >q;

#include<bits/stdc++.h>
using namespace std;
signed main(){
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output1.txt","w",stdout);
	#endif
    ios_base::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
 
	
		int n;
		ll ans=0;
		cin>>n;
		int a[n+1];
		loop(i,0,n)cin>>a[i];
		int mx=0;
		for(int i=0;i<n;i++){
			if(a[i]<mx)
				ans+= mx-a[i];
			else mx=a[i];
		}
		cout<<ans<<endl;
	
 
}


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

int main()
{
 int N,K;
  int count=0;
  cin>>N>>K;
  vector<int> H(N);
  for(int i=0;i<N;i++)
  {
    cin>>H.at(i);
    if(H.at(i)>=K)count++;
  }
  cout<<count<<endl;
}

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

int main(){
    int a,b;
    cin>>a>>b;
    if(a==1)a=14;
    if(b==1)b=14;
    if(a>b) cout<<"Alice"<<endl;
    else if(a<b) cout<<"Bob"<<endl;
    else cout<<"Draw"<<endl;
}

Measured memory_bytes: 256
#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, bytes) => {
        read_value!($next, String).into_bytes()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
use std::collections::{BinaryHeap, HashMap};

#[allow(dead_code)]
type Graph = Vec<Vec<usize>>;

fn main() {
    input! {
        s: chars,
    }

    let mut dp = vec![vec![0; 4]; s.len() + 1];
    dp[s.len()][3] = 1_usize;

    for i in (0..s.len()).rev() {
        for j in 0..4 {
            let c = s[i];
            dp[i][j] = dp[i + 1][j];
            if c == '?' {
                dp[i][j] *= 3;
            }
            if j < 3 && (c == '?' || c == "ABC".chars().nth(j).unwrap()) {
                dp[i][j] += dp[i + 1][j + 1];
            }
            dp[i][j] %= 1_000_000_007;
        }
    }
    println!("{}", dp[0][0]);
}


Measured memory_bytes: 10492
#include<bits/stdc++.h>
using namespace std;
const int N=2005;
int l[N][N],r[N][N],up[N][N],down[N][N];
char s[N][N];
int n,m;
int main()
{
	cin>>n>>m;
	for(int i=1;i<=n;i++) cin>>(s[i]+1);
	for(int j=1;j<=m;j++)
	{
		for(int i=1;i<=n;i++) 
			if(s[i][j]=='.') up[i][j]=up[i-1][j]+1;
			else up[i][j]=0;
		for(int i=n;i>=1;i--) 
			if(s[i][j]=='.') down[i][j]=down[i+1][j]+1;
			else down[i][j]=0;
	}
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=m;j++) 
			if(s[i][j]=='.') l[i][j]=l[i][j-1]+1;
			else l[i][j]=0;
		for(int j=m;j>=1;j--) 
			if(s[i][j]=='.')r[i][j]=r[i][j+1]+1;
			else r[i][j]=0;
	}
	int ans=-1;
	for(int i=1;i<=n;i++)
		for(int j=1;j<=m;j++)
		{
			if(s[i][j]=='.')
			{
				ans=max(ans,l[i][j]+r[i][j]+up[i][j]+down[i][j]-3);
			}
		}
	cout<<ans<<endl;
 }


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

int main(){
  ll n;
  cin >> n;
  vector<ll> vec(n);
  ll sl=0;
  ll tmp;
  for(ll i=0; i<n; i++){
    cin >> tmp;
    vec.at(i) = tmp;
    sl += tmp;
  }
  ll left,right;
  left =0;
  right =0;
  ll lp,rp;
  lp = 0;
  rp = vec.size()-1;
  bool flag = true;
  for(ll i=0; i<n; i++){
    if(flag){left += vec.at(lp);lp++;}
    else {right += vec.at(rp);rp--;}
    if(left<right){flag = true;}
    else{flag = false;}
  }
  cout << abs(left-right) << endl;
}
  
  
  
  

Measured memory_bytes: 1792
from collections import Counter
n = int(input())
a = [int(x) for x in input().split()]

f = Counter()

for x in a:
    f[x] += 1

ans = 0
for x, val in f.items():
    ans += x*val

q = int(input())
for _ in range(q):
    b, c = map(int, input().split())
    ans -= f[b]*b
    ans += f[b]*c
    f[c] += f[b]
    f[b] = 0
    print(ans)


Measured memory_bytes: 91232
#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
using namespace std;

int main(){
    int A,B;
    cin>>A>>B;
    int cmin,cmax,dmin,dmax;
    cmin=10*B;
    cmax=10*B+9;
    dmin=(25*A+1)/2;
    dmax=(25*(A+1)-1)/2;
    if (cmin<=dmin){
        if (dmin<=cmax){
            cout<<dmin<<endl;
        }
        else{
            cout<<"-1"<<endl;
        }
    }
    else{
        if (cmin<=dmax){
            cout<<cmin<<endl;
        }
        else{
            cout<<"-1"<<endl;
        }
    }
    return 0;
}

Measured memory_bytes: 256
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using System.Globalization;
using System.Diagnostics;



class Myon
{
    public Myon() { }
    public static int Main()
    {
        new Myon().calc();
        return 0;
    }
    

    Scanner cin;

    void calc()
    {
        cin = new Scanner();
        int x, a, b;
        x = cin.nextInt();
        a = cin.nextInt();
        b = cin.nextInt();
        if (Math.Abs(x - a) < Math.Abs(x - b)) Console.WriteLine("A");
        else Console.WriteLine("B");
    }




}



class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length) return s[i++];
        string st = Console.ReadLine();
        while (st == "") st = Console.ReadLine();
        s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        if (s.Length == 0) return next();
        i = 0;
        return s[i++];
    }

    public int nextInt()
    {
        return int.Parse(next());
    }
    public int[] ArrayInt(int N, int add = 0)
    {
        int[] Array = new int[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextInt() + add;
        }
        return Array;
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

    public long[] ArrayLong(int N, long add = 0)
    {
        long[] Array = new long[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextLong() + add;
        }
        return Array;
    }

    public double nextDouble()
    {
        return double.Parse(next());
    }


    public double[] ArrayDouble(int N, double add = 0)
    {
        double[] Array = new double[N];
        for (int i = 0; i < N; i++)
        {
            Array[i] = nextDouble() + add;
        }
        return Array;
    }
}

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

using namespace std;

int main(){
#ifdef LOCAL
	freopen("input", "r", stdin);
#endif

	int k, a, b;

	scanf("%d %d %d", &k, &a, &b);

	bool ok = false;

	for (int i = a; i <= b; i++){
		if (i % k == 0){
			ok = true;
		}
	}

	printf("%s\n", ok?"OK":"NG");

	return 0;
}

Measured memory_bytes: 3660
#include <iostream>
#include <stdio.h>
#include <vector>
#include <string>
#include <map>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <queue>
#include <time.h>

using namespace std;

#define INT_MAX 2147483647
typedef long long ll;

ll gcd(ll m, ll n);		//最大公倍数
ll lcm(ll m, ll n);		//最小公倍数

int main(void) {

	int ans = 0;

	int a, b;
	cin >> a >> b;
	ans = (a - 1) * (b - 1);

	cout << ans << endl;

	return 0;

}

// 2番目から3要素だけ抜き出した部分文字列を取得する
//std::string result = s.substr(2, 3);  

#if 1
//最大公倍数
ll gcd(ll m, ll n)
{
	ll temp;
	while (m % n != 0)
	{
		temp = n;
		n = m % n;
		m = temp;
	}
	return n;
}

//最小公倍数
ll lcm(ll m, ll n)
{
	return m * n / gcd(m, n);
}
#endif

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

int main(){
  int N, M;
  cin >> N >> M;
  int L = 0;
  int R = N;

  for(int i = 0; i < M; i++){
    int l, r;
    cin >> l >> r;
    L = max(L, l);
    R = min(R, r);
  }

  cout << max(R-L+1, 0) << endl;

  return 0;
}

Measured memory_bytes: 256
#include<cstdio>
#include<cstring>
#include<algorithm>
int a[1000][1000];
char s[1000][1001];
using namespace std;
int main(void)
{
	int n,i,j,k,low,high,mid,x,cnt,flg,f2;
	while(1)	{
		scanf("%d",&n);
		if(n==0)	break;
		for(i=0;i<n;i++)	scanf("%s",s[i]);
		for(i=0;i<n;i++)	{
			cnt=0;
			for(j=n-1;j>=0;j--)	{
				if(s[i][j]=='*')	{
					cnt=0;
					a[i][j]=cnt;
				}
				else {
					cnt++;
					a[i][j]=cnt;
				}
			}
		}
		low=0;	high=n;
		while(low<=high)	{
			mid=(low+high)/2;
			f2=0;
			for(i=0;i<n;i++)	{
				for(j=0;j<n;j++)	{
					if(a[i][j]>=mid)	{
						flg=1;
						for(k=i+1;k<i+mid;k++)	{
							if(k>=n || a[k][j]<mid)	{
								flg=0;
								break;
							}
						}
						if(flg==1)	{
							f2=1;
							j=n;
							i=n;
						}
					}
				}
			}
			if(f2==1)	{
				low=mid+1;
			}
			else {
				high=mid-1;
				if(high==0)	break;
			}
		}
		printf("%d\n",high);
	}
	return 0;
}


Measured memory_bytes: 5916
#include<bits/stdc++.h>
using namespace std;
#define maxn 100005
inline void read(int& x)
{
	x=0;char c=getchar();
	while(!isdigit(c)) c=getchar();
	while(isdigit(c)) x=x*10+c-'0',c=getchar();
}
int n,a[maxn],sum[maxn],c[maxn+maxn];

inline int lowbit(int x)
{
	return x&(-x);
}
inline void modify(int pos)
{
	for(int i=pos;i<=n+100000;i+=lowbit(i)) ++c[i];
}
inline int query(int pos)
{
	int ans=0;
	for(int i=pos;i;i-=lowbit(i)) ans+=c[i];
	return ans;
}

bool check(int x)
{
	sum[0]=0;
	for(int i=1;i<=n;++i)
		sum[i]=sum[i-1]+(a[i]>=x?1:-1);
	memset(c,0,sizeof(c));
	long long ans=0;
	for(int i=0;i<=n;++i)
	{
		ans+=query(sum[i]+100000);
		modify(sum[i]+100000);
	}
	return (ans<<2)>=1ll*n*(n+1);
}
int main()
{
	int l=0x3f3f3f3f,r=-0x3f3f3f3f,mid;
	read(n);
	for(int i=1;i<=n;++i) read(a[i]),l=min(l,a[i]),r=max(r,a[i]);
	while(l<=r)
	{
		mid=(l+r)>>1;
		if(check(mid)) l=mid+1;
		else r=mid-1;
	}
	printf("%d\n",r);
	return 0;
}

Measured memory_bytes: 1792
r, c = map(int, input().split())
spread = []
for i in range(r):
    spread.append(list(map(int, input().split())))

for i in range(r):
    spread[i].append(sum(spread[i]))

sum_c = [0] * c
for i in range(r):
    for j in range(c):
        sum_c[j] = sum_c[j] + spread[i][j]

sum_c.append(sum(sum_c))
spread.append(sum_c)
for i in spread:
    print(" ".join(map(str, i)))



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

using namespace std;

int main()
{
    int e, y;   cin >> e >> y;

    if (e == 0) {
        if (y >= 1989)  cout << 'H' << y - 1988 << endl;
        else if (y >= 1926) cout << 'S' << y - 1925 << endl;
        else if (y >= 1912) cout << 'T' << y - 1911 << endl;
        else    cout << 'M' << y - 1867 << endl;
    } else if (e == 1) {
        cout << y + 1867 << endl;
    } else if (e == 2) {
        cout << y + 1911 << endl;
    } else if (e == 3) {
        cout << y + 1925 << endl;
    } else {
        cout << y + 1988 << endl;
    }
}


Measured memory_bytes: 3112
#include <cstdio>
#include <cmath>
#include <cstdint>
#include <cinttypes>
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

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

    cout << (3 * a + p) / 2 << endl;

    return 0;
}


Measured memory_bytes: 256
#include<stdio.h>
#include<vector>
#include<algorithm>
using namespace std;
#define SIZE 300001
class unionfind
{
public:
	int par[SIZE];
	int ran[SIZE];
	int ren[SIZE];
	void init()
	{
		for (int i = 0; i<SIZE; i++)
		{
			par[i] = i;
			ran[i] = 0;
			ren[i] = 1;
		}
	}
	int find(int a)
	{
		if (a == par[a])return a;
		else return par[a] = find(par[a]);
	}
	void unite(int a, int b)
	{
		a = find(a);
		b = find(b);
		if (a == b)return;
		if (ran[a]>ran[b])
		{
			par[b] = a;
			ren[a] += ren[b];
		}
		else
		{
			par[a] = b;
			ren[b] += ren[a];
		}
		if (ran[a] == ran[b])ran[b]++;
	}
};
unionfind uf;
typedef long long ll;
typedef pair<ll, ll>pii;
typedef pair<ll, pii>pi3;
int dat[111111];
int main()
{
	int num, way, col;
	scanf("%d%d%d", &num, &way, &col);
	uf.init();
	for (int i = 0; i < num; i++)scanf("%d", &dat[i]);
	vector<pi3>vec;
	for (int i = 0; i < way; i++)
	{
		int za, zb, zc;
		scanf("%d%d%d", &za, &zb, &zc);
		za--, zb--;
		vec.push_back(make_pair(zc, make_pair(za,zb)));
	}
	sort(vec.begin(), vec.end());
	//reverse(vec.begin(), vec.end());
	int cnt = 0;
	ll ans = 0;
	for (int i = 0; i < way; i++)
	{
		if (cnt == col - 1)break;
		ll d = vec[i].first;
		int a = vec[i].second.first, b = vec[i].second.second;
		if (dat[a] == 0)a += 111111;
		else a = dat[a];
		if (dat[b] == 0)b += 111111;
		else b = dat[b];
		if (uf.find(a) != uf.find(b))uf.unite(a, b), ans += d, cnt++;
	}
	if (cnt < col - 1)printf("-1\n");
	else printf("%lld\n", ans);
}

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

int main() {
  int a,b,c;
  cin >> a >> b;
  c = a * b;
  if(c % 2 == 0) {
    cout << "Even" << endl;
  } else {
    cout << "Odd" << endl;
  }
}


Measured memory_bytes: 3532
#include <iostream>
#include<time.h>
#include<string>
#include<cstring>
#include <cstdio>
#include<utility>
#include<algorithm>
#include<vector>
#include<cmath>
#include<map>
#include<bitset>
#include<queue>
#include<stack>
#include<set>
#include <limits>
#include <climits>
#include <numeric>
#include<cassert>
#include<cctype>
#include<iterator>
#include<unordered_map>
using namespace std;
typedef long long ll;
typedef unsigned long long LL;
typedef vector<ll>VI;
typedef vector<bool>VB;
typedef pair<ll,ll>P;
typedef pair<double,double>P_D;
#define VV(T) vector<vector<T>>
#define PI 3.1415926535897932384626433832795
#define rep(i, n) for (ll i = 0; i < (ll)n; i++)
#define reprev(i, n) for (ll i = (ll)n - 1; i >= 0; i--)
#define bitrep(bit,A) for(int bit=A; ;bit=(bit-1)&A)
#define ALL(a)  (a).begin(),(a).end()
#define SZ(a) (ll)((a).size())
#define c_max(a, b) (((ll)a)>((ll)b)?(a):(b))
#define c_min(a,b) (((ll)a)<((ll)b)?(a):(b))
#define chmax(x,a) x=c_max(x,a)
#define chmin(x,a) x=c_min(x,a)
#define vmax(v) *max_element(ALL(v))
#define vmin(v) *min_element(ALL(v))
#define SORT(c) stable_sort(ALL(c))
#define $(x) {cout<<#x<<" = " <<(x)<<endl;}
#define fi first
#define se second
#define MAX 100100//5
#define MAX2 200100
#define MAX_6 1001001//6
#define MAX_7 10010010//7
#define SENTINEL 2000000000//9
#define NIL -1
const int MOD = 1000000007;
#define INF 1<<30
#define INFTY 1LL<<61
#define MAX_INT INT_MAX
#define Endl '\n'
#define greater greater<int>()
inline ll GCD(ll a,ll b){return b?GCD(b,a%b):a;}
inline ll lcm(ll a,ll b){return a*b/GCD(a,b);}
using Edge=pair<int,ll>;
using Graph=vector<vector<ll> >;//ll or Edge
using Edge=pair<int,ll>;
//const int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
// g++ -o a a.cpp -Wall -lm -std=c++14

int main(){
    int l,r,d;cin>>l>>r>>d;
    cout<<(r/d)-((l-1)/d)<<endl;
}

Measured memory_bytes: 3588
#import sys

#input = sys.stdin.readline

#import bisect

def main():
#    h,w,a,b = map(int, input().split())
    a=[]
    for i in range(9):
        for j in range(9):
            a.append((i+1)*(j+1))
    n=int(input())
    if n in a:
        print("Yes")
    else:
        print("No")






if __name__ == "__main__":
    main()

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

// {U}{INT,LONG,LLONG}_{MAX,MIN}
#define INF         INT_MAX/3
#define LLINF       LLONG_MAX/3
#define MOD         (1000000007LL)
#define MODA(a, b)  a=((a)+(b))%MOD
#define MODP(a, b)  a=((a)*(b))%MOD
#define inc(i, l, r)   for(int i=(l);i<(r);i++)
#define dec(i, l, r)   for(int i=(r)-1;i>=(l);i--)
#define pb          push_back
#define se          second
#define fi          first
#define mset(a, b)  memset(a, b, sizeof(a))

using LL  = long long;
using G   = vector<vector<int>>;

int di[] = {0, -1, 0, 1};
int dj[] = {1, 0, -1, 0};
// }}}

LL dp[101][8];

int main() {
    cin.tie(0);ios::sync_with_stdio(false);
    int h, w, k;
    cin >> h >> w >> k;
    dp[0][0] = 1;
    inc(i, 0, h){
        inc(bit, 0, 1 << (w-1)){
            bool flag = false;
            inc(j, 0, w-1){
                if(bit >> j & 1 && bit >> j+1 & 1){
                    flag = true;
                }
            }
            if(flag) continue;

            inc(j, 0, w){
                if(bit >> j-1 & 1){
                    MODA(dp[i+1][j], dp[i][j-1]);
                }else if(bit >> j & 1){
                    MODA(dp[i+1][j], dp[i][j+1]);
                }else{
                    MODA(dp[i+1][j], dp[i][j]);
                }
            }
        }
    }
    cout << dp[h][k-1] << endl;
    return 0;
}


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

int main(){
    int a1,a2,a3;
    cin >> a1 >> a2 >> a3 ;
    if((a1+a2+a3) >= 22){
        cout << "bust"<< endl;
    }else{
        cout << "win"<< endl;
    }
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
const int mod=1e9+7;
int n,m,f[310][310][310],res3,res2,res1,res;
bool ok[310][310][310];
int main(){
	scanf("%d%d",&n,&m),f[1][0][0]=1;
	for(int i=1;i<=n;i++)for(int j=i-1;j>=0;j--)for(int k=j;k>=0;k--)ok[i][j][k]=true;
	for(int i=1,l,r,x;i<=m;i++){
		scanf("%d%d%d",&l,&r,&x);
		if(x==1)for(int j=r-1;j>=l;j--)for(int k=j;k>=0;k--)ok[r][j][k]=false;
		if(x==2){
			for(int j=r-1;j>=l;j--)for(int k=j;k>=l;k--)ok[r][j][k]=false;
			for(int j=l-1;j>=0;j--)for(int k=j;k>=0;k--)ok[r][j][k]=false;
		}
		if(x==3)for(int k=l-1;k>=0;k--)for(int j=k;j<=r-1;j++)ok[r][j][k]=false;
	}
	if(!ok[1][0][0]){puts("0");return 0;}
	for(int i=1;i<n;i++)for(int j=i-1;j>=0;j--)for(int k=j;k>=0;k--){
		if(!ok[i][j][k])continue;
		if(ok[i+1][j][k])(f[i+1][j][k]+=f[i][j][k])%=mod;
		if(ok[i+1][i][j])(f[i+1][i][j]+=f[i][j][k])%=mod;
		if(ok[i+1][i][k]&&j!=k)(f[i+1][i][k]+=f[i][j][k])%=mod;
	}
//	for(int i=1;i<=n;i++){
//		printf("%d:\n",i);
//		for(int j=i-1;j>=0;j--){
//			for(int k=j;k>=0;k--)printf("%d ",f[i][j][k]);puts("");
//		}
//	}
	for(int j=n-1;j>=1;j--)for(int k=j;k>=1;k--)if(ok[n][j][k])(res3+=f[n][j][k])%=mod;
	for(int j=n-1;j>=1;j--)if(ok[n][j][0])(res2+=f[n][j][0])%=mod;
	res1=f[n][0][0];
	printf("%d\n",(6ll*res3+6ll*res2+3ll*res1)%mod);
	return 0;
} 

Measured memory_bytes: 74332
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <iostream>
#include <iostream>
#include <fstream>
#include <numeric>
#include <cstring>
#include <cassert>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <cmath>
#include <set>
#include <map>
#include <functional>
#include <bitset>
#include <iomanip>
#include <stack>
#include <list>
#include <cstdint>
#include <chrono>

using namespace std;
#define     loop(n,i,a)     for(ll i=a;i<n;i++)
#define     loopR(n,i,a)    for(ll i=a-1;i>=n;i--)
#define     all(arr,n)      arr,arr+n
#define     allv(v)         (v).begin(),(v).end()
#define     rallv(v)        (v).rbegin(),(v).rend()
#define     m_p             make_pair
#define     ll              long long
#define     pii             pair<ll,ll>
#define     vi              vector<int>
#define     vll             vector<ll>
#define     vii             vector<pii>
#define     sz(x)           (int)x.size()
#define     pb              push_back
#define     endl            "\n"
#define     Endl            "\n"
#define     f               first
#define     s               second
#define     mem(dp,n)       memset(dp,n,sizeof dp)
template<typename T>void max_self(T &a,T b){a=max(a,b);}
template<typename T>void min_self(T &a,T b){a=min(a,b);}
int dx[] = { 1 , 0 ,-1 , 0 ,-1 ,-1 , 1 , 1 };
int dy[] = { 0 , 1 , 0 ,-1 ,-1 , 1 ,-1 , 1 };
int KnightI[] = { 2, 1, -1, -2, -2, -1, 1, 2 };
int KnightJ[] = { 1, 2, 2, 1, -1, -2, -2, -1 };
void fast(){
    std::ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    cout.tie(NULL);
}
vector<string> vec_splitter(string s) {
    s += ',';
    vector<string> res;
    while(!s.empty()) {
        res.push_back(s.substr(0, s.find(',')));
        s = s.substr(s.find(',') + 1);
    }
    return res;
}
void debug_out(
        vector<string> __attribute__ ((unused)) args,
        __attribute__ ((unused)) int idx,
        __attribute__ ((unused)) int LINE_NUM) { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
    if(idx > 0) cerr << ", "; else cerr << "Line(" << LINE_NUM << ") ";
    stringstream ss; ss << H;
    cerr << args[idx] << " = " << ss.str();
    debug_out(args, idx + 1, LINE_NUM, T...);
}
#define debug(...) debug_out(vec_splitter(#__VA_ARGS__), 0, __LINE__, __VA_ARGS__)
const ll mxN=3e5+10,oo=0x3f3f3f3f,MOD=998244353;
const long double PI = acos(-1),eps=1.0e-14;
vii adj[mxN];
ll dist[mxN];
void DFS(int node,int par,ll c){
    dist[node]=c;
    for(auto child:adj[node]){
        if(par!=child.f){
            DFS(child.f,node,c+child.s);
        }
    }
}
void solve(){
    int n;
    cin>>n;
    loop(n-1,i,0){
        int u,v,c;
        cin>>u>>v>>c;
        adj[u].pb({v,c});
        adj[v].pb({u,c});
    }
    int q,k;
    cin>>q>>k;
    DFS(k,0,0ll);
    while(q--){
        int u,v;
        cin>>u>>v;
        cout<<dist[u]+dist[v]<<endl;
    }
}
int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    fast();
    solve();

}


Measured memory_bytes: 20792
#include <iostream>
#include <iomanip>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <algorithm>
#include <map>
#define rep(i,n) for(ll i=0; i<n; i++)
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
const ll mod=1e9+7;

int main(){
	double L;
	cin >> L;
	double A = L/3;
	double V;
	V = A*A*A;

	cout << fixed;
	cout << setprecision(6) << V << endl;
	return 0;
}

Measured memory_bytes: 256
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

#define FOR(i,k,n) for (int (i)=(k); (i)<(n); ++(i))
#define rep(i,n) FOR(i,0,n)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fst first
#define snd second
#define all(v) begin(v), end(v)
#define debug(x) cerr<< #x <<": "<<x<<endl
#define debug2(x,y) cerr<< #x <<": "<< x <<", "<< #y <<": "<< y <<endl

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vector<int> > vvi;
typedef vector<ll> vll;
typedef vector<vector<ll> > vvll;
typedef vector<char> vc;
typedef vector<vector<char> > vvc;
typedef vector<double> vd;
typedef vector<vector<double> > vvd;
template<class T> using vv=vector<vector< T > >;
typedef deque<int> di;
typedef deque<deque<int> > ddi;
typedef deque<bool> db;
typedef deque<deque<bool> > ddb;

// cout pair
template<typename T1, typename T2> ostream& operator<<(ostream& s, const pair<T1, T2>& p) {
  s << p.first << " " << p.second << "\n"; return s;
}

// cout vector<pair>
template<typename T1, typename T2> ostream& operator<<(ostream& s, const vector<pair<T1, T2> >& vp) {
  int len = vp.size(); s << "\n";
  for (int i = 0; i < len; ++i) { s << vp[i]; }
    s << "\n"; return s;
}

// cout vector
template<typename T> ostream& operator<<(ostream& s, const vector<T>& v) {
  int len = v.size(); s << "\n";
  for (int i = 0; i < len; ++i) {
    s << v[i]; if (i < len - 1) s << "\t";
  }
  s << "\n"; return s;
}

// cout deque
template<typename T> ostream& operator<<(ostream& s, const deque<T>& v) {
  int len = v.size(); s << "\n";
  for (int i = 0; i < len; ++i) {
    s << v[i]; if (i < len - 1) s << "\t";
  }
  s << "\n"; return s;
}

// cout 2-dimentional vector
template<typename T> ostream& operator<<(ostream& s, const vector< vector<T> >& vv) {
  int len = vv.size();
  for (int i = 0; i < len; ++i) { s << vv[i]; }
  return s;
}

// cout 2-dimentional deque
template<typename T> ostream& operator<<(ostream& s, const deque< deque<T> >& vv) {
  int len = vv.size();
  for (int i = 0; i < len; ++i) { s << vv[i]; }
  return s;
}

int main() {
  string s;
  cin >> s;
  string correct = "CODEFESTIVAL2016";
  int ans = 0;
  int len = s.length();
  rep (i, len) {
    if (s[i] != correct[i]) {
      ans += 1;
    }
  }
  printf("%d\n", ans);

  return 0;
}


Measured memory_bytes: 760
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
using namespace std;
int main() {
    int n;
    cin >> n ;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    for (int x : a) {
        if (x%2==0){
            if(x%3==0 || x%5==0){
                continue;
            }
            else {
                cout << "DENIED" << endl;
                return 0;
            }
        }
    }
    cout << "APPROVED" << endl;
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
 
int main () {
  string S, A, B;
  cin >> S;
  int N, tmp, ans;
  ans = 0;
  N = S.length();
  A = B = "";
  for (int i = 0; i < N; ++i) {
    A += S[i];
    B += S[N-1-i];
  }
  if (A == B) {
    ans += 1;
  }
  tmp = (N-1) / 2;
  A = B = "";
  for (int i = 0; i < tmp; ++i) {
    A += S[i];
    B += S[tmp-1-i];
  }
  if (A == B) {
    ans += 1;
  }
  // cout << A << endl;
  // cout << B << endl;
  tmp = (N+3) / 2;
  A = B = "";
  int j = 0;
  for (int i = tmp-1; i < N; ++i) {
    A += S[i];
    B += S[N-1-j];
    ++j;
  }
  if (A == B) {
    ans += 1;
  }
  // cout << A << endl;
  // cout << B << endl;
  if (ans == 3) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  return 0;
}

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

int main(void)
{
	int a,b,x;
	scanf("%d%d%d",&a,&b,&x);
	int v = a*a*b;	
	if (x*2<=v)
	{
		double xx = x,aa = a,bb = b;
		double dui = xx*2.0/(aa*bb);
		double ans = atan(dui/bb)*180.0/3.141592653589793238;
		printf("%lf",90.0-ans);
		return 0;
	}	
	x = v-x;
	double xx = x,aa = a,bb = b;
	double dui = xx*2/(aa*aa);
	double ans = atan(aa/dui)*180.0/3.141592653589793238;
	printf("%lf",90.0-ans);
	return 0;	
} 

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
  int N,L;
  cin>>N>>L;
  vector<int> A(N);
  for(int &i:A)cin>>i;
  for(int i=1;i<N;i++)
    if(A[i]+A[i-1]>=L){
      puts("Possible");
      for(int j=1;j<i;j++)cout<<j<<endl;
      for(int j=N-1;j>i;j--)cout<<j<<endl;
      cout<<i<<endl;
      return 0;
    }
  puts("Impossible");
}

Measured memory_bytes: 4028
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        int S, h, m, s;
        Scanner sc = new Scanner(System.in);
        S = sc.nextInt();
        h = (int)(S / 3600);
        m = (int)((S % 3600) / 60);
        s = S % 60;
        System.out.println(h+":"+m+":"+s);
    }
}


Measured memory_bytes: 26424
#include <cstdio>
#include <vector>
#include <iostream>
using namespace std;
typedef long long ll;
#define INF 1000000000000000ll
#define pb push_back
ll A[100100];
vector<ll> a;
int N;
ll sum;
bool C(ll x)
{
	vector<ll>::iterator it;
	for(int i=0;i<N;i++)
	{
		ll f = a[i];
		it = lower_bound(a.begin(),a.end(),f+x);
		if(it==a.end())continue;
		ll s = *it;
		it = lower_bound(a.begin(),a.end(),s+x);
		if(it==a.end())continue;
		ll t = *it;
		it = lower_bound(a.begin(),a.end(),t+x);
		if(it==a.end())continue;
		ll ff = *it;
		if(ff-f<=sum)return true;
	}
	return false;
}
int main()
{
	scanf("%d",&N);
	for(int i=0;i<N;i++)scanf("%lld",&A[i]);
	for(int i=1;i<N;i++)A[i]+=A[i-1];
	sum=A[N-1];
	a.pb(0);
	for(int i=0;i<N;i++)a.pb(A[i]);
	for(int i=0;i<N;i++)a.pb(A[i]+sum);
	ll l=0,r=INF;
	while(r-l>1)
	{
		ll mid = (l+r)/2ll;
		if(C(mid))l = mid;
		else r = mid;
	}
	printf("%lld\n",l);
	return 0;
}

Measured memory_bytes: 3892
#include <stdio.h>
int main(){
	int x,y;
	scanf("%d%d",&x,&y);
	while(x!=0||y!=0){
		if(x<y)
		printf("%d %d\n",x,y);
		else
		printf("%d %d\n",y,x);
		scanf("%d%d",&x,&y);
	}
}

Measured memory_bytes: 1732
#include <iostream>
#include <vector>
typedef std::vector <int> vi;
vi PRIMES;
vi prime(int n){
	int i=0,j=1,h=(n+1)/2,x;
	vi s(h),p;
	while(j<=n){
		s[i++]=j;
		j+=2;
	}
	for (i=1;i*i<=n;i++)
		if (x=s[i]) for (j=x*x/2;j<h;j+=x) s[j]=0;
	s[0]=2;
	for (i=0;i<h;i++) if(s[i]!=0) p.push_back(s[i]);
	return p;
}
int main(void){
	int n,s;
	PRIMES=prime(105000);
	while (true){
		std::cin>>n; if (n==0) break;
		for (s=0;n--;) s+=PRIMES[n];
		std::cout<<s<<"\n";
	}
} 

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

using namespace std;

long long int GCD(long long int a, long long int b){
	long long int dummy1, dummy2, dummy;
	dummy1 = max(a, b);
	dummy2 = min(a, b);
	while(true){
		dummy = dummy1 % dummy2;
		dummy1 = dummy2;
		dummy2 = dummy;
		if(dummy == 0){
			break;
		}
	}
	return dummy1;
}

int main(){
	
	long long int N, K;
	
	cin >> N >> K;
	
	long long int a[200000];
	
	cin >> a[0];
	long long int gcd = a[0];
	
	for(int i = 1; i < N; i++){
		cin >> a[i];
		gcd = GCD(a[i], gcd);
	}
	
	sort(a, a + N);
	
	if(K > a[N - 1] || K % gcd != 0){
		cout << "IMPOSSIBLE" << endl;
	}else{
		cout << "POSSIBLE" << endl;
	}
	
	return 0;
}



Measured memory_bytes: 1024
#include<bits/stdc++.h> //Ithea Myse Valgulious
namespace chtholly{
typedef long long ll;
#define re0 register int
#define rec register char
#define rel register ll
#define gc getchar
#define pc putchar
#define p32 pc(' ')
#define pl puts("")
/*By Citrus*/
inline int read(){
  int x=0,f=1;char c=gc();
  for (;!isdigit(c);c=gc()) f^=c=='-';
  for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
  return f?x:-x;
  }
inline void read(rel &x){
  x=0;int f=1;char c=gc();
  for (;!isdigit(c);c=gc()) f^=c=='-';
  for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
  x=f?x:-x;
  }
template <typename mitsuha>
inline int write(mitsuha x){
  if (!x) return pc(48);
  if (x<0) x=-x,pc('-');
  int bit[20],i,p=0;
  for (;x;x/=10) bit[++p]=x%10;
  for (i=p;i;--i) pc(bit[i]+48);
  }
inline char fuhao(){
  char c=gc();
  for (;isspace(c);c=gc());
  return c;
  }
}using namespace chtholly;
using namespace std;
char c[55][55];
int n=read(),m=read();
int main(){
for (int i=1;i<=n;++i){
  scanf("%s",c[i]+1);
  }
for (int i=1;i<=n;++i){
  for (int j=1;j<=m;++j){
    if (c[i][j]=='#'&&c[i-1][j]=='.'&&c[i+1][j]=='.'&&c[i][j-1]=='.'&&c[i][j+1]=='.') return puts("No"),0;
    }
  }
puts("Yes");
}

Measured memory_bytes: 256
#include <iostream>
  #include <complex>
  #include <vector>
  #include <string>
  #include <algorithm>
  #include <cstdio>
  #include <numeric>
  #include <cstring>
  #include <ctime>
  #include <cstdlib>
  #include <set>
  #include <map>
  #include <unordered_map>
  #include <unordered_set>
  #include <list>
  #include <cmath>
  #include <bitset>
  #include <cassert>
  #include <queue>
  #include <stack>
  #include <deque>
 #include <iomanip>
#include <fstream>
#include <climits>
 
  using namespace std;
   
 
//abcdefghijklmnopqrstuvwxyz
//ABCDEFGHIJKLMNOPQRSTUVWXYZ

  typedef long long ll;
  typedef long double lld;
  typedef unsigned long long ull;
  int INF = INT_MAX;
  ll mod = 1e9+7;
  // lld PI = 3.141592653;



  int main()
  {
      ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
     
    int n;
    cin>>n;
    ll a,b;
    cin>>a>>b;
    vector<ll> x(n);
    for (int i = 0; i<n;i++) cin>>x[i];
    // if (b<=a){
    //   cout<<b*n<<"\n";
    //   return 0;
    // }
    ll ans = 0;
    for (int i = 1;i<n;i++){
      ans += min((x[i] - x[i-1])*a, b);
    }

    cout<<ans<<"\n";




}
  

Measured memory_bytes: 3556
#include<iostream>
#include<iomanip>
#include<string>
#include<array>
#include<cmath>
#include<vector>
#include<utility>
#include<algorithm>
#include<ctype.h>
using namespace std;


int main() {
	int a, b, c;
	cin >> a >> b >> c;
	if (a==b) {
		cout << c << endl;
	}
	else if (b==c) {
		cout << a << endl;
	}
	else {
		cout << b << endl;
	}
}

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

//型定義
typedef long long ll;

//定数
const int INF=1e+9;
const int MOD=1e+9+7;

//REPマクロ
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define REP2(i,a,b) for(ll i=a;i<(ll)(b);i++)
#define REPD2(i,a,b) for(ll i=a;i>(ll)(b);i--)

// 多次元 vector 生成
template<class T>
vector<T> make_vec(size_t a){
    return vector<T>(a);
}
template<class T, class... Ts>
auto make_vec(size_t a, Ts... ts){
  return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));
}

//vectorの扱い
#define ALL(x) (x).begin(),(x).end() //sortなどの引数省略
#define SIZE(x) ((ll)(x).size()) //size
#define MAX(x) *max_element(ALL(x)) //最大値
#define MIN(x) *min_element(ALL(x)) //最小値

int main(){
    ll N;
    cin>>N;
    vector<ll> a(N),b(N),c(N),d(N);
    REP(i,N){
        cin>>a[i]>>b[i];
    }

    REP(i,N){
        cin>>c[i]>>d[i];
    }
    vector<vector<bool>> p(110,vector<bool>(110,false));
    ll cnt=0;
    REP(i,N){
        REP(j,N){
            if(a[i]<c[j]&&b[i]<d[j]){
                p[i][j]=true;
                cnt++;
            }
        }
    }
    ll lose=INF;
    ll ans=0;
    while(lose>0){
        ll lose_m=INF;
        ll idx=-1,jdx=-1;
        REP(i,N){
            REP(j,N){
                if(p[i][j]==false) continue;
                lose=0;
                REP(k,N){
                    if(p[i][k]==true) lose++;
                    if(p[k][j]==true) lose++;
                }
                lose--;
                if(lose<lose_m){
                    lose_m=lose;
                    idx=i;
                    jdx=j;
                }
            }
        }
        if(idx==-1||jdx==-1) break;
        REP(k,N){
            p[idx][k]=false;
            p[k][jdx]=false;
        }

        cnt-=lose_m;
        ans++;

    }
    cout<<ans<<endl;
    


}

Measured memory_bytes: 3636
#include <cstdio>
#include <algorithm>
using namespace std;
const long long NR=114514;
long long x,y,a,b,c,pl,sum,u[NR],v[NR],w[NR*3];
bool cmp(long long a,long long b)
{
	return a>b;
}
int main()
{
	scanf("%lld%lld%lld%lld%lld",&x,&y,&a,&b,&c);
	for(long long i=1;i<=a;i++)
	{
		scanf("%lld",&u[i]);
	}
	for(long long i=1;i<=b;i++)
	{
		scanf("%lld",&v[i]);
	}
	for(long long i=1;i<=c;i++)
	{
		scanf("%lld",&w[i]);
	}
	sort(u+1,u+a+1,cmp);
	sort(v+1,v+b+1,cmp);
	pl=c;
	for(long long i=1;i<=x;i++)
	{
		w[++pl]=u[i];
	}
	for(long long i=1;i<=y;i++)
	{
		w[++pl]=v[i];
	}
	sort(w+1,w+pl+1,cmp);
	for(long long i=1;i<=x+y;i++)
	{
		sum+=w[i];
	}
	printf("%lld",sum);
	return 0;
}

Measured memory_bytes: 4480
#include<iostream>
#include<vector>
#include<string.h>
#include<queue>
using namespace std;

char ma[1001][1001];
bool visited[1001][1001];
int h,w,n;
int dx[4]={-1,0,1,0};
int dy[4]={0,-1,0,1};
int sx,sy;
vector<pair<int,int> >vec(10);
queue<pair<pair<int,int>,int> >que;
int bfs(int d){
    while(que.size()){
        pair<pair<int,int>,int>q=que.front();
        que.pop();
        int x=q.first.first;
        int y=q.first.second;
        if(visited[y][x])continue;
        if(ma[y][x]-'0'==d){
            return q.second;
        }
        visited[y][x]=1;
        for(int i=0;i<4;i++){
            int nx=x+dx[i];
            int ny=y+dy[i];
            if(nx>=0&&nx<w&&ny>=0&&ny<h&&ma[ny][nx]!='X'&&!visited[ny][nx]){
                que.push(make_pair(make_pair(nx, ny),q.second+1));
            }
        }
    }
    return 0;
}

int main(){
    cin>>h>>w>>n;
    for(int i=0;i<h;i++){
        string str;
        cin>>str;
        for(int j=0;j<w;j++){
            ma[i][j]=str[j];
            if(ma[i][j]>'0'&&ma[i][j]<='9'){
                vec[ma[i][j]-'0']=make_pair(j, i);
            }
            if(ma[i][j]=='S'){
                vec[0]=make_pair(j, i);
            }
        }
    }
    int c=0;
    for(int i=1;i<=n;i++){
        while(que.size())que.pop();
        memset(visited,0,sizeof(visited));
        que.push(make_pair(make_pair(vec[i-1].first,vec[i-1].second),0));
        c+=bfs(i);
    }
    cout<<c<<endl;
}

Measured memory_bytes: 3188
#include<bits/stdc++.h>
using namespace std;
int k,x;
int main(){
	cin>>k>>x;
	for(int i=max(-1000000,x-k+1);i<x;++i)cout<<i<<" ";
	cout<<x<<" ";
	for(int i=x+1;i<=min(1000000,x+k-1);++i)cout<<i<<" ";
	return 0;
}

Measured memory_bytes: 256
#include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>

using namespace std;

typedef long long ll;
// constexpr ll MOD = 998244353;
constexpr ll MOD = 1000000007;

// struct UnionFind {
//     vector<int> par;
    
//     UnionFind(int N): par(N) {
//         for (int i=0;i<N;i++) par[i] = i;
//     }

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

//     void unite(int x, int y) {
//         int rx = root(x);
//         int ry = root(y);
//         if (rx == ry) return;
//         par[rx] = ry;
//     }

//     bool same(int x, int y) {
//         int rx = root(x);
//         int ry = root(y);
//         return rx == ry;
//     }
// };

set<int> p;
vector<int> s(100001,0);

void prime(void) {
    for (int i=2;i<=100000;i++) p.insert(i);
    for (int i=2;i<=100000;i++) {
        if (p.find(i) != p.end()) {
            for (int j=2*i;j<=100000;j+=i) p.erase(j);
        }
    }
    // for (int i=2;i<=100000;i++) {
    //     bool flag = true;
    //     for (int j=2;j*j<=i;j++) {
    //         if (i%j == 0) {
    //             flag = false;
    //             break;
    //         }
    //     }
    //     if (flag) p.insert(i);
    // }
}

void like2017(void) {
    for (int i=1;i<=100000;i++) {
        s[i] = s[i-1];
        if (i%2 == 0) continue;
        if (p.find(i) != p.end() && p.find((i+1)/2) != p.end()) s[i]++;
    }
}

int main(void) {
    int Q;
    int l[100010], r[100010];
    cin >> Q;
    for (int i=0;i<Q;i++) cin >> l[i] >> r[i];

    prime();
    like2017();
    for (int i=0;i<Q;i++) {
        cout << s[r[i]]-s[l[i]-1] << endl;
    }

    return 0;
}


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

using ll = long long;
using ull = unsigned long long;
using ld = long double;

#define MOD 1000000007

#define rep(i, n) for(ll (i) = 0LL;(i) < (ll)(n);(i)++)
#define rep2(i, s, e) for(ll (i) = (ll)(s);(i) < (ll)(e);(i)++)
#define repi(i, n) for(ll (i) = 0LL;(i) <= (ll)(n);(i)++)
#define repi2(i, s, e) for(ll (i) = (ll)(s);(i) <= (ll)(e);(i)++)
#define per(i, n) for(ll (i) = (ll)(n) - 1LL;(i) >= 0LL;(i)--)
#define per2(i, s, e) for(ll (i) = (ll)(s) - 1LL;(i) >= (ll)(e);(i)--)
#define peri(i, n) for(ll (i) = (ll)(n);(i) >= 0LL;(i)--)
#define peri2(i, s, e) for(ll (i) = (ll)(s);(i) >= (ll)(e);(i)--)
#define iter(i, it) for(auto &(i): (it))

template<typename T, typename U> ostream& operator<<(ostream &s, const pair<T, U> m) {
    cout << "(" << m.first << ", " << m.second << ")";
    return s;
}
template<typename T, typename U> ostream& operator<<(ostream &s, const map<T, U> m) {
    ll c = 0;
    cout << "{ ";
    iter(i, m) cout << i << (c++ == m.size() - 1 ? " " : ", ");
    cout << "}";
    return s;
}
template<typename T> ostream& operator<<(ostream &s, const vector<T> &v) {
    cout << "{ ";
    rep(i, v.size()) cout << v[i] << (i == v.size() - 1 ? " " : ", ");
    cout << "}";
    return s;
}
template<typename T> ostream& operator<<(ostream &s, const list<T> &v) {
    ll c = 0;
    cout << "{ ";
    iter(i, v) cout << i << (c++ == v.size() - 1 ? " " : ", ");
    cout << "}";
    return s;
}

int main(void) {
    ll N;
    ll ans;
    vector<ll> S, T;
    cin >> N;
    S.resize(N);
    rep(i, N) cin >> S[i];
    ans = accumulate(S.begin(), S.end(), 0);
    copy_if(S.begin(), S.end(), back_inserter(T), [](ll a) { return a % 10 != 0; });
    sort(T.begin(), T.end(), greater<>());
    if(!T.empty() && ans % 10 == 0) ans -= T.back();
    if(ans % 10 == 0) ans = 0;
    cout << ans << endl;
    return 0;
}


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


int dist(std::string x, std::string y) {

  if (x.length() != y.length()) {
    return 10000;
  }

  int count = 0;

  for (int i=0; i<x.length(); ++i) {
    if (x.at(i) != y.at(i)) {
      count++;
    }
  }

  return count;
}

int main() {

  std::string S;
  std::string T;

  std::cin >> S;
  std::cin >> T;

  int min = 10000;

  for (int i=0; i + T.length() <= S.length(); ++i) {
    std::string S_comp = S.substr(i, T.length());
    min = std::min(min, dist(T, S_comp));
  }

  std::cout << min << std::endl;

  return 0;

}


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

#define INCANT cin.tie(0), ios::sync_with_stdio(false), cout << fixed << setprecision(20)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,n) FOR(i,0,n)
#define all(x) (x).begin(),(x).end()
#define out(a) cout << a << endl
#define PRINT(V) for (auto v : (V)) cout << v << " "

const int MOD = 1000000007;
const double PI = acos(-1.0);

void solve() {
    ll A, B;
    cin >> A >> B;
    out(A*B);
}
int main() {
    INCANT;
    solve();
    return 0;
}




Measured memory_bytes: 3660
#include <stdio.h>
#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <math.h>
#include <algorithm>
using namespace std;
#define ll long long
const double EPS = 1e-10;

int main(){
  ll a,b,c;
  cin>>a>>b>>c;
  if(a+b+1<=c){
    cout<<b+a+b+1<<endl;
  }
  else{
    cout<<b+c<<endl;
  }
}


Measured memory_bytes: 256