akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
using namespace std;

int main(){
  
  int N, i, j, k, cnt = 0;
  cin >> N;
  vector<int> L(N);
  for (i = 0; i < N; i++) cin >> L.at(i);
  
  sort(L.begin(), L.end());
  reverse(L.begin(), L.end());
  
  for (i = 0; i < N; i++){
    for (j = i + 1; j < N; j++){
      for (k = j + 1; k < N; k++){
        
        if(L.at(i) >= L.at(j) + L.at(k)) break;
        cnt++;
      }
    }
  }
    
  cout << cnt << endl;
  return 0;
}

Measured memory_bytes: 256
// D.

#include <iostream>
#include <algorithm>
#include <numeric>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <set>
#include <map>

using namespace std;

string solve(int n, string s) {
	for (int a = 0; a <= 1; ++a) {
		for (int b = 0; b <= 1; ++b) {
			bool ok = true;
			vector<int> t(n, -1);
			t[0] = a;
			t[n - 1] = b;
			for (int j = 0; j < n; ++j) {
				bool same = s[j] == 'o';
				int prev = t[(j - 1 + n) % n];
				int& next = t[(j + 1) % n];
				if (t[j] == 0) {
					if (next == -1) {
						next = same ? prev : !prev;
					} else if (same != (next == prev)) {
						ok = false;
					}
				} else {
					if (next == -1) {
						next = same ? !prev : prev;
					} else if (same == (next == prev)) {
						ok = false;
					}
				}
			}
			if (ok) {
				string ans;
				for (int i = 0; i < n; ++i) {
					ans += t[i] ? 'W' : 'S';
				}
				return ans;
			}
		}
	}
	return "-1";
}

int main(int argc, char *argv[]) {
	int n;
	cin >> n;
	string s;
	cin >> s;
	cout << solve(n, s) << endl;
	return 0;
}


Measured memory_bytes: 4080
#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"

using namespace std;

const long long int MOD = 1000000007;
const long double EPS = 1e-8;

long long int N, M, K, H, W, L, R;

struct Coordinate {
	long double x;
	long double y;
	bool operator <(const Coordinate& c)const {
		if (y < c.y)return true;
		if (y > c.y)return false;
		if (x < c.x)return true;
		return false;
	}
	bool operator >(const Coordinate& c)const {
		if (y > c.y)return true;
		if (y < c.y)return false;
		if (x > c.x)return true;
		return false;
	}
	Coordinate operator +(const Coordinate& c)const {
		Coordinate box;
		box.x = x + c.x;
		box.y = y + c.y;
		return box;
	}
	Coordinate operator -(const Coordinate& c)const {
		Coordinate box;
		box.x = x - c.x;
		box.y = y - c.y;
		return box;
	}
	long double det(Coordinate a) {
		return x*a.y - y*a.x;
	}
};

struct Convex_hull {
	vector<Coordinate>node;
	vector<Coordinate>ret;
	bool line;
	Convex_hull(bool l) {
		line = l;
	}
	void Add_node(Coordinate n) {
		node.push_back(n);
	}
	vector<Coordinate>solve() {
		sort(node.begin(), node.end());
		int index = 0;
		int num = node.size();
		ret.resize(num * 2);
		for (int i = 0; i < num; i++) {
			if (line) {
				while (index > 1 && (ret[index - 1] - ret[index - 2]).det(node[i] - ret[index - 1]) < -EPS) {
					index--;
				}
			}
			else {
				while (index > 1 && (ret[index - 1] - ret[index - 2]).det(node[i] - ret[index - 1]) < EPS) {
					index--;
				}
			}
			ret[index++] = node[i];
		}
		int box = index;
		for (int i = num - 2; i >= 0; i--) {
			if (line) {
				while (index > box && (ret[index - 1] - ret[index - 2]).det(node[i] - ret[index - 1]) < -EPS) {
					index--;
				}
			}
			else {
				while (index > box && (ret[index - 1] - ret[index - 2]).det(node[i] - ret[index - 1]) < EPS) {
					index--;
				}
			}
			ret[index++] = node[i];
		}
		ret.resize(index - 1);
		return ret;
	}
};

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

	cin >> N;
	Convex_hull ch(true);
	for (int i = 0; i < N; i++) {
		Coordinate c;
		cin >> c.x >> c.y;
		ch.Add_node(c);
	}
	auto ans = ch.solve();
	cout << ans.size() << endl;
	for (auto i : ans) {
		cout << i.x << " " << i.y << endl;
	}
	return 0;
}



Measured memory_bytes: 13184
package main

import (
	"bufio"
	"fmt"
	"io/ioutil"
	"os"
)

type IOTp struct {
	iBuffer []byte
	iPos int
}
func (this *IOTp) GetChar() byte {
	res:=this.iBuffer[this.iPos]
	this.iPos++
	return res
}
func (this *IOTp) ReadInt() int {
	res:=0
	k:=1
	for ch:=this.iBuffer[this.iPos]; !(ch>='0' && ch<='9'); ch=this.iBuffer[this.iPos]{
		if ch=='-' {
			k=-1
		}
		this.iPos++
	}
	for ch:=this.iBuffer[this.iPos]; ch>='0' && ch<='9'; ch=this.iBuffer[this.iPos]{
		res=res*10+int(ch-'0')
		this.iPos++
	}
	res*=k
	return res
}
func NewIOTp() *IOTp {
	now:=new(IOTp)
	//inputFile,_:=os.Open("in.txt")
	inputFile:=os.Stdin
	now.iBuffer,_=ioutil.ReadAll(inputFile)
	now.iBuffer=append(now.iBuffer, '\n')
	now.iPos=0
	return now
}
var cin *bufio.Reader
var cout *bufio.Writer
const MAXN=100000
var fa map[int]int
func find(x int) int {
	if fa[x]==x {
		return x
	}
	fa[x]=find(fa[x])
	return fa[x]
}
func main() {
	fa=make(map[int]int)
	IO:=NewIOTp()
	cout=bufio.NewWriter(os.Stdout)
	n:=IO.ReadInt()
	var a,b [MAXN+10]int
	for i:=1; i<=n; i++ {
		a[i]=IO.ReadInt()
	}
	for i:=1; i<=n; i++ {
		b[i]=IO.ReadInt()
	}
	for _,v:=range a[1:n+1] {
		a[n+1]^=v
	}
	for _,v:=range b[1:n+1] {
		b[n+1]^=v
	}
	m:=make(map[int]int)
	for _,v:=range a[1:n+2] {
		m[v]++
	}
	for _,v:=range b[1:n+2] {
		m[v]--
	}
	for _,v:=range m {
		if v!=0 {
			fmt.Println(-1)
			return;
		}
	}
	for _,v:=range a[1:n+2] {
		fa[v]=v
	}
	ans:=0
	bz:=make(map[int]int)
	for i:=range a[1:n+2] {
		if a[i]!=b[i] {
			fx,fy:=find(fa[a[i]]),find(fa[b[i]])
			if fx!=fy {
				fa[fx]=fy
				bz[fx]=1
				bz[fy]=1
			}
			if i<=n {
				ans++
			}
		}
	}
	if ans==0 {
		fmt.Println(0)
	} else {
		bz[a[n+1]]=1
		bz[b[n+1]]=1
		for _,v:=range a[1:n+2] {
			if bz[v]==1 && find(v)==v {
				bz[v]=0
				ans++
			}
		}
		fmt.Println(ans-1)
	}
	cout.Flush()
}


Measured memory_bytes: 26112
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
=begin
ALDS1_4-B

Search II
=end
class Srch
  def binindex(c, s)
    i=0
    j=s.length-1
    if c < s[i] or c > s[j] then
      return(false)
    end
    while j>i do
      k=(i+j)/2
      if c == s[i] or c == s[j] then
        return true
      elsif c < s[k]  then
        j=k-1
      elsif s[k] < c  then
        i=k+1
      else
        return true
      end
    end
    false
  end
end

class Main
  def initialize()
    #fh = open("/home/muz/Downloads/ALDS1_4_B_in1.txt")
    fh = STDIN

    n = fh.gets.chomp.to_i
    s = fh.gets.chomp.split.map{|x| x.to_i}
    q = fh.gets.chomp.to_i
    t = fh.gets.chomp.split.map{|x| x.to_i}

    abort("number of s not equal to n") if n != s.length
    abort("number of t not equal to q") if q != t.length
    sr = Srch.new()
    ans = 0
    t.each {|x|
      if sr.binindex(x, s) then
        ans += 1
      end
    }
    puts ans
  end

end

if $0==__FILE__ then
  Main.new()
end

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

#define debug(s) cout << s << endl
#define debug1(s, t) cout << s << " " << t << endl
#define debug2(s, t, u) cout << s << " " << t << " " << u << endl
#define printvec(v)       \
    for (auto &&i : v)    \
        cout << i << " "; \
    cout << endl

using namespace std;
using i64 = long long;

int main()
{
    string s, t;
    cin >> s >> t;

    vector<vector<int>> index(26);
    string ss = s + s; // 二周分
    for (int i = 0; i < ss.size(); i++)
    {
        index[ss[i] - 'a'].push_back(i);
    }

    int now_ix = -1;
    i64 length = 0;
    for (auto &&c : t)
    {
        if (index[c - 'a'].empty())
        {
            length = -1;
            break;
        }
        int next_ix = *lower_bound(index[c - 'a'].begin(), index[c - 'a'].end(), now_ix + 1);
        length += next_ix - now_ix;

        now_ix = next_ix % s.size();
    }

    cout << length << endl;

    return 0;
}

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

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


template <typename T> void add(T& a, T b, int mod) {
	a += b;
	if (a >= mod)
		a -= mod;
}

template <typename T> void mul(T& a, T b, int mod) {
	a = a * b % mod;
}

const int mod = 1e9 + 7, mxN = 1e5 + 5;

ll dp[mxN][2];

class TaskP {
public:
	int N;
	vector<int> adj[mxN];

	void solve(std::istream& in, std::ostream& out) {
		in >> N;
		for (int i = 0; i < N - 1; i++) {
			int u, v;
			in >> u >> v;
			u--, v--;
			adj[u].push_back(v);
			adj[v].push_back(u);
		}
		memset(dp, -1, sizeof(dp));
		ll ans = rec(0, -1, 0);
		out << ans;
	}

	ll rec(int u, int p, int col) {
		if (dp[u][col] != -1) return dp[u][col];
		ll ways = 1, tot = 0;
		if (col == 0) {
			for (int v : adj[u]) {
				if (v == p) continue;
				mul(ways, rec(v, u, 1), mod);
			}
			add(tot, ways, mod);
		}
		ways = 1;
		for (int v : adj[u]) {
			if (v == p) continue;
			mul(ways, rec(v, u, 0), mod);
		}
		add(tot, ways, mod);
		return dp[u][col] = tot;
	}
};

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	TaskP solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}


Measured memory_bytes: 18856
n=int(input())
l=list(map(int,input().split()))
dp=[[0 for j in range(n+1)] for i in range(n+1)]
e=[]
for i in range(n):
    e.append([l[i],i])
e.sort(reverse=True)
for i in range(1,n+1):
    p=e[i-1][0]
    q=e[i-1][1]
    for j in range(i+1):
        if j<i:
            a1=dp[i-1][j]+p*abs(n-(i-j)-q)
        else:
            a1=0
        if j>0:
            a2=dp[i-1][j-1]+p*abs(q-j+1)
        else:
            a2=0
        dp[i][j]=max(a1,a2)
print(max(dp[-1]))


Measured memory_bytes: 101676
n = int(input())

def factorize(x):
    res = {}
    p = 2
    while p * p <= x:
        if x % p != 0: 
            p += 1
            continue
        cnt = 0
        while x % p == 0:
            x //= p
            cnt += 1
        res[p] = cnt
        p += 1
    if x != 1:
        res[x] = 1
    return res

f = factorize(n)

ans = 0
for pe in f.items():
    for e in range(1, pe[1] + 1):
        z = pe[0] ** e
        if n % z == 0:
            n //= z
            ans += 1

print(ans)


Measured memory_bytes: 62940
//#define NDEBUG
#include <cstddef>
#include <cstdint>
#include <vector>

using i8 = ::std::int_least8_t;
using i32 = ::std::int_least32_t;
using i64 = ::std::int_least64_t;
using u8 = ::std::uint_least8_t;
using u32 = ::std::uint_least32_t;
using u64 = ::std::uint_least64_t;
using isize = ::std::ptrdiff_t;
using usize = ::std::size_t;

template <class T = usize> class rep {
	const T f, l;

public:
	class itr {
		friend rep;
		T i;
		constexpr itr(T x) noexcept : i(x) {}

	public:
		void operator++() noexcept { ++i; }
		T operator*() const noexcept { return i; }
		bool operator!=(const itr x) const noexcept { return i != x.i; }
	};
	constexpr rep(const T first, const T last) noexcept : f(first), l(last) {}
	itr begin() const noexcept { return itr(f); }
	itr end() const noexcept { return itr(l); }
};
template <class T = usize> class revrep {
	const T f, l;

public:
	class itr {
		friend revrep;
		T i;
		constexpr itr(T x) noexcept : i(x) {}

	public:
		void operator++() noexcept { --i; }
		T operator*() const noexcept { return i; }
		bool operator!=(const itr x) const noexcept { return i != x.i; }
	};
	constexpr revrep(const T first, const T last) noexcept : f(first), l(last) {}
	itr begin() const noexcept { return itr(l - 1); }
	itr end() const noexcept { return itr(f - 1); }
};
template <class T> bool maxi(T &a, const T &b) {
	return a <= b ? (a = b, 1) : 0;
}
template <class T> bool mini(T &a, const T &b) {
	return b <= a ? (a = b, 1) : 0;
}
template <class T> bool smaxi(T &a, const T &b) {
	return b <= a ? 0 : (a = b, 1);
}
template <class T> bool smini(T &a, const T &b) {
	return a <= b ? 0 : (a = b, 1);
}
template <class T> using vec_alias = ::std::vector<T>;
template <class T> auto md_vec(usize n, const T &value) {
	return ::std::vector<T>(n, value);
}
template <class... Args> auto md_vec(usize n, Args... args) {
	return ::std::vector<decltype(md_vec(args...))>(n, md_vec(args...));
}
template <class T> const T &as_const(const T &v) noexcept { return v; }

#include <algorithm>
#include <iostream>
#include <utility>
#include <limits>

int main() {
	usize n, k;
	::std::cin >> n >> k;
	--k;
	::std::vector<u32> h(n);
	for (auto &e : h) {
		::std::cin >> e;
	}
	::std::sort(h.begin(), h.end());
	u32 min{ ::std::numeric_limits<u32>::max() };
	for (const auto i : rep<>(k, n)) {
		smini(min, h[i] - h[i - k]);
	}
	::std::cout << min << ::std::endl;
	return 0;
}


Measured memory_bytes: 640
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vs = vector<string>;
using pll = pair<ll, ll>;
using vp = vector<pll>;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define repr(i, a, b) for(ll i = (a); i < (b); i++)
#define ALL(a) (a).begin(), (a).end()
#define SZ(x) ((ll)(x).size())
const ll MOD = 1000000007;
const ll INF = 100000000000000000LL;
inline ll GCD(ll a, ll b){ return b?GCD(b, a % b):a; }
inline ll LCM(ll a, ll b){ return a/GCD(a, b)*b; }
inline ll powint(ll x, ll y){ ll r=1; while(y){ if(y&1) r*=x; x*=x; y>>=1; } return r; }
inline ll powmod(ll x, ll y, ll m = MOD){ ll r=1; while(y){ if(y&1) r*=x; x*=x; r%=m; x%=m; y>>=1; } return r; }
template<class T>bool chmax(T &a, const T &b){ if(a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b){ if(b<a) { a=b; return 1; } return 0; }
#ifdef OJ_LOCAL
#include "dump.hpp"
#else
#define dump(...) ((void)0)
#endif

int main(){
    cin.tie(0); ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    ll n;
    cin >> n;
    vll h(n);
    rep(i, n){
        cin >> h[i];
    }
    h[0]--;
    repr(i, 1, n){
        ll d = h[i]-h[i-1];
        if(d < 0){
            cout << "No" << endl;
            return 0;
        }
        if(d > 0){
            h[i]--;
        }
    }
    cout << "Yes" << endl;
    return 0;
}

Measured memory_bytes: 1024
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define agewari(a, b) ((ll)a + ((ll)b - 1)) / b
const int MOD = 1000000007;
const long long INF = 1LL << 60;
using Graph = vector<vector<ll>>;

int main()
{
    ll n;
    string s;
    cin >> n >> s;

    //2つ目の条件を満たすRGBの組み合わせの個数
    ll hiku = 0;
    rep(i, n)
    {
        rep(j, n)
        {
            if (i + 2 * j >= n)
                break;
            if (s[i] != s[i + j] && s[i] != s[i + 2 * j] && s[i + j] != s[i + 2 * j])
                hiku++;
        }
    }

    ll r = 0, g = 0, b = 0;
    rep(i, n)
    {
        if (s[i] == 'R')
            r++;
        if (s[i] == 'G')
            g++;
        if (s[i] == 'B')
            b++;
    }

    cout << r * g * b - hiku << endl;
}


Measured memory_bytes: 3596
//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx,avx2,fma")
#pragma GCC optimize("O3")
#include<iostream>
#include<algorithm>
#include<string>
#include<cmath>
#include<cstdlib>
#include<set>
#include<vector>
#include<sstream>
#include<queue>
#include <iomanip>
#include<unordered_set>
#include <stack>
#include <unordered_map>
#include <map>
#include<numeric>
constexpr auto INF = 9223372036854775807;
typedef long long int ll;
typedef unsigned long long int ull;
typedef unsigned long int ul;
#define f(i,a,b) for(ll i=(ll)a;i<(ll)b;i+=1)
#define rf(i,a,b) for(ll i=(ll)a;i>=(ll)b;i-=1)
#define endl '\n'
#define N 1000000007 // prime modulo value 
#define M 998244353
#define all(x) x.begin(),x.end()
#define mkp(a,b) make_pair(a,b)
using namespace std;

inline int mex(unordered_set<int> st)
{
	int m = 0;
	while (st.find(m) != st.end())
	{
		m += 1;
	}
	return m;
}
inline int calculateGrundy(int n)
{
	if (n == 1)
		return 0;
	unordered_set<int> mexi;
	for (int i = 1; i <= sqrt(n); i += 1)
	{
		if (n % i == 0)
		{
			if (n / i != n)
				mexi.insert(calculateGrundy(n / i));
			mexi.insert(calculateGrundy(i));
		}
	}
	return mex(mexi);
}
inline ll gcd(ll a, ll b)
{
	// This is code taken from geeksforgeek
	if (b == 0)
		return a;
	return gcd(b, a % b);
}
/*ll power(ll x, ll y)
{
	// This is code taken from geeksforgeek
	ll res = 1;

	x = x % N;
	if (x == 0) return 0;
	while (y > 0)
	{
		if (y & 1)
			res = (res * x) % N;
		y = y >> 1;
		x = (x * x) % N;
	}
	return res;
}*/
ll power(ll x, ll y, ll p)
{
	ll res = 1;

	x = x % p;

	while (y > 0)
	{

		if (y & 1)
			res = (res * x) % p;

		y = y >> 1;
		x = (x * x) % p;
	}
	return res;
}


ll modInverse(ll n, ll p)
{
	return power(n, p - 2, p);
}

ll nCrModPFermat(ll n, ll r, ll p)
{
	if (r == 0)
		return 1;

	vector<ll> fac(n + 1, 0);
	fac[0] = 1;
	for (ll i = 1; i <= n; i++)
		fac[i] = fac[i - 1] * i % p;

	return (fac[n] * modInverse(fac[r], p) % p *
		modInverse(fac[n - r], p) % p) % p;
}

bool check(ll a)
{
	ll count = 0;
	while (a % 2 == 0)
	{
		a /= 2;
		count += 1;
	}
	if (count > 1)
		return false;
	bool flag = true;
	for (ll i = 3; i <= sqrt(a); i += 2)
	{
		if (a % i == 0)
		{
			flag = false;
			break;
		}
	}
	return flag;
}
ll sum(ll n)
{
	return (n * (n + 1)) / 2;
}

int main()
{
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	char ch;
	cin >> ch;
	if (isupper(ch))
	{
		cout << "A";
	}
	else
		cout << "a";
	return 0;
}

Measured memory_bytes: 3644
#include <bits/stdc++.h>
#define fi first
#define se second
#define eb emplace_back
#define all(v) (v).begin(), (v).end()
#define rmin(r, x) r = min(r, x)
#define rmax(r, x) r = max(r, x)
#define ends ' '
#define endl '\n'
#define fastio ios_base::sync_with_stdio(0), cin.tie(0)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int main(void) {
    fastio;
    int n;  cin >> n;
    bool ans = false;
    int cnt = 0;
    for(int i = 1; i <= n; ++i) {
        int a, b;   cin >> a >> b;
        if(a != b)  cnt = 0;
        else        ++cnt;
        ans |= (cnt == 3);
    }
    cout << (ans ? "Yes" : "No");
    return 0;
}


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

int main() {
    int n, m;
    cin >> n >> m;
    int i, a[n];
    float sum = 0;
    for (i = 0; i < n; ++i) {
        cin >> a[i];
        sum += a[i];
    }
    sum = sum / (4 * m);
    int count = 0;
    for (int j = 0; j < n; ++j) {
        if (a[j] >= sum) {
            count++;
        }
    }
    if (count >= m) {
        cout << "Yes" << endl;
    } else
        cout << "No" << endl;

}

Measured memory_bytes: 256
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        long[] a = new long[100005];
        long[] b = new long[100005];
        for(int i = 0; i < n + 1; ++i){
            a[i] = input.nextLong();
        }
        for(int i = 0; i < n; ++i){
            b[i] = input.nextLong();
        }
        long sum = 0;
        for(int i = 0; i < n; ++i){
            if(a[i] <= b[i]){
                sum += a[i];
                b[i] -= a[i];
            }
            else{
                sum += b[i];
                b[i] = 0;
            }
            if(a[i + 1] <= b[i]){
                sum += a[i + 1];
                b[i] -= a[i + 1];
                a[i + 1] = 0;
            }
            else{
                sum += b[i];
                a[i + 1] -= b[i];
                b[i] = 0;
            }
        }
        System.out.println(sum);
    }
}


Measured memory_bytes: 91752
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>


using namespace std;

const int INF = 1000000;

int main(){
    string s;
    cin >> s;

    int ans = 700;
    for(int i=0;i<3;i++)if(s[i]=='o')ans+=100;

    cout << ans << endl;

}


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

int main()
{
	string s = "";
	string res = "";
	cin >> s;
	for (int i = 0; i < s.size(); i++)
	{
		if ((i + 1) % 2 != 0)
		{
			res += s[i];
		}
	}

	cout << res << "\n";

	return 0;
}

Measured memory_bytes: 512
def main():
    K, S = map(int, input().split())
    cnt = 0
    for x in range(K+1):
        for y in range(K+1):
            z = S - x - y
            if 0 <= z and z <= K:
                cnt += 1
    print(cnt)


if __name__ == "__main__":
    main()


Measured memory_bytes: 41068
<?php
list($n) = ints();
$a = ints();
$r = $l = [];
for ($i = 0; $i < $n; ++$i) {
    if ($i % 2 === 0) $r[] = $a[$i];
    else $l[] = $a[$i];
}
if ($n % 2) list($l, $r) = [$r, $l];
krsort($l);
echo implode(' ', array_merge($l, $r));
function ints()
{
    return array_map('intval', explode(' ', trim(fgets(STDIN))));
}


Measured memory_bytes: 42676
#include<iostream>
#include<stack>
using namespace std;
static const int N = 100;
static const int WHITE = 0; // 未訪問の状態
static const int GRAY = 1; // 訪問中
static const int BLACK = 2; // 訪問済み

int n, M[N][N];
int color[N], d[N], f[N], tt;
int nt[N];            

// u に隣接するvを番号順に取得
int next(int u) {
  for ( int v = nt[u]; v < n; v++ ) {
    nt[u] = v + 1;
    if (M[u][v] ) return v;
  }
  return -1;
}

// スタックを用いた深さ優先探索
void dfs_visit(int r) {
  for (int i = 0; i < n; i++) nt[i] = 0;

  stack<int> S;
  S.push(r); // 始点uをスタックに追加
  color[r] = GRAY;
  d[r] = ++tt; // 訪問時刻を記載

  while (!S.empty() ) { // Sが空でない間
    int u = S.top(); // stackの一番上にある要素
    int v = next(u); 
    if ( v!= -1) {
      // topの隣に訪問していないものがあったら、スタックに追加
      if (color[v] == WHITE) {
        color[v] = GRAY;
        d[v] = ++tt;
        S.push(v);
      }
    } else {
      // topの隣が何もなかったら、スタックから一番上をだす。
      // fに時間を記載
      S.pop();
      color[u] = BLACK;
      f[u] = ++tt;

    }
 }
}


void dfs() {
  // 初期化
  for (int i = 0; i < n; i++) {
    color[i] = WHITE;
    nt[i] = 0;
  }
  tt = 0;

  // 未訪問のuを始点として深さ優先探索
  for (int u = 0; u < n; u++ ) {
    // 全頂点について、未訪問ならdfs_visit
    if ( color[u] == WHITE ) dfs_visit(u);
  }
  for (int i = 0; i < n; i++) {
    cout << i+1 << " " << d[i] << " " << f[i] << endl;
  }
}


int main() { 
  int u, k, v;
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++ ) M[i][j] = 0;
  }

  for (int i = 0; i < n; i++ ){
    cin >> u >> k;
    // 0オリジンに
    u--;
    for (int j = 0; j < k; j++) {
      cin >> v;
      // 0オリジンに
      v--;
      M[u][v] = 1;
    }
  }

  dfs();

  return 0;
}



Measured memory_bytes: 3120
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>  
#include <functional>
#define ll long long int
#define ld long double
#define pb push_back
#define pll pair<ll,ll>
#define pint pair<int,int>
#define forn(i, n) for (int i = 0; i < int(n); i++)
#define mod 1000000007
#define MAX 1000010
#define endl '\n'
#define mp make_pair
#define INF INT_MAX
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
#define ff first
#define ss second
#define ps(x,y) fixed<<setprecision(y)<<x
#define setbits(x) __builtin_popcountll(x)			//counts no of ones in binary representation
#define w(t) 	int t; cin>>t; while(t--)
#define pi 3.141592653589793238
#define sortt(v)  sort(v.begin(),v.end())
#define lb(v,x) std::lower_bound(v.begin(),v.end(),x)
#define ub(v,x) std::upper_bound(v.begin(),v.end(),x)

using namespace std;

int main(){
	fast;
	int n,k;
	cin>>n>>k;
	int a[n];
	forn(i,n)	cin>>a[i];
	sort(a,a+n);
	ll sum=0;
	forn(i,k)	sum+=a[i];
	cout<<sum;
}

Measured memory_bytes: 3652
/*  
    tanuj_johal :: gla_clg_sync_with_CSE(true);
    bonding.tie(true);
    hardwork.tie(true);
    
    ::::::::--------------------::::::::
*/

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define ll          long long
#define fio         ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pb          push_back
#define vi          vector<ll>
#define pp          push_pop
#define pll         pair<ll,ll>
#define in          insert
#define f(i,a,b)    for(ll i=a;i<b;i++)
#define f0(i,n)     f(i,0,n)
#define arr(a,n)    int a[n];f0(i, n) cin >> a[i];
#define ini(a,n)    memset(a,n,sizeof(a))
#define ff          first
#define ss          second
#define inf         10000000000000000
#define all(p)      p.begin(), p.end()
#define que_max     priority_queue <int>
#define que_min     priority_queue <int, vi, greater<int>>
#define print(a)    for(auto i:a){cout<<i<<" ";}
#define print1(a)   for(auto i:a){cout<<i.ff<<" "<<i.ss<<endl;}

typedef tree<pll, null_type, less<pll>, rb_tree_tag, tree_order_statistics_node_update> Set;


const ll mod = 1e9+7;

ll power(ll x,ll y,ll p){ll r=1;x=x%p;while(y>0){if(y&1)r=(r*x)%p;y=y>>1;x=(x*x)%p;}return r;}
bool imp = false;
ll a[100][100];
map<ll,ll> mp;
ll dp[100];


ll solve1(ll n,ll m,ll x,ll i){
    bool flag = false;
    for(ll i1=1;i1<=n;i1++){
        if(dp[i1]<x){
            flag = true;
            break;
        }
    }
    if(!flag){
        return 0;
    }
    
    if(i >= m){
        return INT_MAX;
    }
    
    ll ans = INT_MAX;
    for(ll j=1;j<=n;j++){
        dp[j] += a[i][j];
    }
    ans = min(ans,mp[i] + solve1(n,m,x,i+1));
    for(ll j=1;j<=n;j++){
        dp[j] -= a[i][j];
    }
    ans = min(ans, solve1(n,m,x,i+1));
    return ans;
}


void solve()
{
    memset(dp,0,sizeof(dp));
    ll n,m,x;cin>>n>>m>>x;
    swap(n,m);
    for(ll j=0;j<m;j++){
        for(ll i=0;i<=n;i++){
            if(i==0){
                ll t;
                cin>>t;
                mp[j] = t;
                continue;
            }
            cin>>a[j][i];
        }
    }
    ll ans = solve1(n,m,x,0);
    if(ans == INT_MAX){
        cout<<-1<<endl;
    }
    else{
        cout<<ans<<endl;
        
    }
    

}

int main()
{
    fio
    int t=1;
    if(imp) cin>>t;
    while(t--)
    {
        // cout<<"Case #"<<tc<<": ";
        solve();
        // tc++;
    }
    
}


Measured memory_bytes: 3684
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <sstream>
#include <map>
#include <set>
#include <cmath>
#include <queue>
#include <stack>
#include <list>
#include <numeric>
#include <bitset>
#include <ext/algorithm>
#include <ext/numeric>
#define ffor(_a,_f,_t) for(int _a=(_f),__t=(_t);_a<__t;_a++)
#define all(_v) (_v).begin() , (_v).end()
#define sz size()
#define pb push_back
#define SET(__set, val) memset(__set, val, sizeof(__set))
#define FOR(__i, __n) ffor (__i, 0, __n)
typedef long long LL; using namespace std;

char m[301][301];
int dp[301][301], col, cnt[301][602][301];

const int OFFSET = 301;


int memo(int r1, int r2) {
	if (!r1 || !r2)
		return 0;
	int &ret = dp[r1][r2];
	if (ret != -1)
		return ret;

	ret = cnt[col][OFFSET + r1 - r2][min(r1, r2)] + min(memo(r1, r2 - 1), memo(r1 - 1, r2));
	return ret;
}

void preprocess(int r, int c) {
	FOR (i,  c - 1) {
		FOR (diff, r + 1) {
			FOR (steps, r + 1) {
				if (steps + diff > r)
					break;
				if (!steps) {
					cnt[i][OFFSET + diff][steps] = 0;
					cnt[i][OFFSET - diff][steps] = 0;
					continue;
				}
				int add = 0;
				if (m[diff + steps - 1][i] == m[steps - 1][i + 1])
					add = 1;
				cnt[i][OFFSET + diff][steps] = add + cnt[i][OFFSET + diff][steps - 1];

				add = 0;
				if (m[diff + steps - 1][i + 1] == m[steps - 1][i])
					add = 1;
				cnt[i][OFFSET - diff][steps] = add + cnt[i][OFFSET - diff][steps - 1];
			}
		}
	}
}

int main() {
	int r, c;
	cin >> r >> c;
	FOR (i, r)
		FOR (j, c)
			cin >> m[i][j];
	preprocess(r, c);
	int ret = 0;
	FOR (i, c - 1) {
		col = i;
		SET(dp, 255);
		ret += memo(r, r);
	}
	cout << ret << endl;
	return 0;
}

Measured memory_bytes: 212480
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.NoSuchElementException;

public class Main {
	public void solve() {
		String s = next();
		for(int i = 0;i < s.length();i++){
			for(int j = i + 1;j < s.length();j++){
				if(s.charAt(i) == 'C' && s.charAt(j) == 'F'){
					out.println("Yes");
					return;
				}
			}
		}

		out.println("No");
	}

	public static void main(String[] args) {
		out.flush();
		new Main().solve();
		out.close();
	}

	/* Input */
	private static final InputStream in = System.in;
	private static final PrintWriter out = new PrintWriter(System.out);
	private final byte[] buffer = new byte[2048];
	private int p = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (p < buflen)
			return true;
		p = 0;
		try {
			buflen = in.read(buffer);
		} catch (IOException e) {
			e.printStackTrace();
		}
		if (buflen <= 0)
			return false;
		return true;
	}

	public boolean hasNext() {
		while (hasNextByte() && !isPrint(buffer[p])) {
			p++;
		}
		return hasNextByte();
	}

	private boolean isPrint(int ch) {
		if (ch >= '!' && ch <= '~')
			return true;
		return false;
	}

	private int nextByte() {
		if (!hasNextByte())
			return -1;
		return buffer[p++];
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = -1;
		while (isPrint((b = nextByte()))) {
			sb.appendCodePoint(b);
		}
		return sb.toString();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	public long nextLong() {
		return Long.parseLong(next());
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}

Measured memory_bytes: 8276
#include<cstdio>
int a[100001];
int main(){
    int n,ans=0;
    scanf("%d",&n);
    for(int i=1;i<=n;i++)scanf("%d",&a[i]);
    for(int i=1;i<=n;i++)if(a[a[i]]==i)ans++;
    printf("%d",ans/2);
    return 0;
}

Measured memory_bytes: 512
#include <iostream> pre processor directive
#include <string>
#include <iomanip>
#include <cctype>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
    string S;
    cin>>S;
    int x,counter=0;
    for (int i=0;i<S.length();i++){
        if (S[i]==',')counter++;
    }
    for(int i=0;i<counter;i++){
        x=S.find(',');
        S.erase(x,1);
        S.insert(x," ");
    }
    cout<<S<<endl;
}


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

// limit
#define mod1 22439423LL
#define mod2 42342432LL
#define mod3 56454765LL
#define mod4 66867574LL
#define oo 1000000007LL
#define OO 1000000000000000007LL
#define maxN 507

// loop
#define fto(i, x, y) for(int i = (x); i <= (y); ++i)
#define fdto(i, x, y) for(int i = (x); i >= (y); --i)
#define ftoa(i, x, y, a) for(int i = (x); i <= (y); i += a)
#define fdtoa(i, x, y, a) for(int i = (x); i >= (y); i -= a)
#define ftosqrt(i, x, y) for(int i = (x); i*i <= (y); ++i)
#define ftoit(it, var) for (__typeof(var.begin()) it = var.begin(); it != var.end(); ++it)
#define fdtoit(rit, var) for (__typeof(var.rbegin()) rit = var.rbegin(); rit != var.rend(); ++rit)

// debug
#define debug cout << "*" << endl;
#define bug1d(a, x, y) { cout << #a << ": "; fto(_, x, y) cout << a[_] << ' '; cout << endl; }
#define bug2d(a, x, y, u, v) { cout << #a << ": " << endl; fto(i, x, y) {fto(j, u, v) cout << a[i][j] << ' '; cout << endl;}; cout << endl;}
#define bug(a) cout << #a << " = " << a << endl;
#define bug2(a, b) cout << #a << " = " << a << "; "; cout << #b << " = " << b << endl;
#define bug3(a, b, c) cout << #a << " = " << a << "; "; cout << #b << " = " << b << "; "; cout << #c << " = " << c << endl;

// operation
#define mp make_pair
#define pb push_back
#define pf push_front
// structure
#define ii pair<int, int>
#define iii pair<ii, int>
#define vi vector<int>
#define vll vector<ll>
#define vii vector<ii>
#define matrix vector<vi>

// get value
#define FF first
#define SS second

// data type
#define ll long long
#define ull unsigned long long

// function
#define lb lower_bound
#define ub upper_bound

// const value
#define pi 3.14159265358979323846264338327950288419716939937510

using namespace std;

template <class T>
T min(T a, T b, T c) {
    return min(a, min(b, c));
}

template <class T>
T min(T a, T b, T c, T d) {
    return min(a, min(b, min(c, d)));
}

template <class T>
T max(T a, T b, T c) {
    return max(a, max(b, c));
}

template <class T>
T max(T a, T b, T c, T d) {
    return max(a, max(b, max(c, d)));
}

bool cmp(const ii& a, const ii& b) {return (a.FF > b.FF || (a.FF == b.FF && a.SS >= b.SS));}
ll GCD(ll a, ll b) {return (a%b) ? GCD(b, a%b) : b;}

const string namePro = "tmp";

ll f[maxN][maxN], _f[maxN][maxN];
ll w[maxN], v[maxN];

int main() {
    int n; ll _w;
    scanf("%d%lld", &n, &_w);

    fto (i, 1, n) {
        scanf("%lld%lld", &w[i], &v[i]);
    }

    fto (i, 0, n) {
        fto (j, 0, 300) {
            f[i][j] = _f[i][j] = -OO;
        }
    }

    _f[0][0] = 0LL;
    fto (i, 1, n) {
        fto (j, 1, n) {
            fto (k, 0, 300) if (k >= (w[i]-w[1])) f[j][k] = max(_f[j][k], _f[j-1][k-(w[i]-w[1])]+v[i]);
        }
        fto (j, 1, n) fto (k, 0, 300) _f[j][k] = f[j][k];
    }

    ll ans = 0LL;
    fto (i, 0, n) {
        fto (j, 0, 300) {
            if ((ll)i*(ll)w[1]+(ll)j <= _w) {
                ans = max(ans, f[i][j]);
            }
        }
    }

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

Measured memory_bytes: 1024
#include <iostream>
using namespace std;
int main(){
  int N,A;cin>>N>>A;
  int L=A;int R=A+N-1;
  int eat;
  if (R<0)eat=R;
  else if (L>0)eat=L;
  else eat=0;
  int ans =(L+R)*(R-L+1)/2-eat;
  cout<<ans<<endl;
}


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

const ll LINF = 1e18;
const int INF = 1e9;
const ll MOD = 1000000007;


int main(){

    char c;
    cin >> c;
    if(c - 'A' <= 'Z' - 'A') cout << 'A' << endl;
    else cout << 'a' << endl;

    return 0;
}

Measured memory_bytes: 3644
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <climits>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <fstream>

using namespace std;
#define TOSTRING(x) #x
#define SZ(x) (int)(x).size()
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REPR(i,n) for(int i=(n)-1;i>=0;i--)
#define ALL(s) (s).begin(), (s).end()
#define so(V) sort(ALL(V))
#define rev(V) reverse(ALL(V))
#define uni(v) v.erase( unique(ALL(v)) , v.end());
#define PAU system("pause")

typedef long long unsigned int llu;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef vector<vb> vvb;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
const int INF = (1 << 28);
const double PI = acos(-1);

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int H, W, K;
	cin >> H >> W >> K;
	vvll dp(H + 1, vll(W, 0));
	dp[0][0] = 1;
	FOR(i, 1, H + 1) {
		REP(j, (1 << W - 1)) {
			bool canWrite = true;
			bool isOk = true;
			vi nextpos(W);
			REP(k, W) {
				nextpos[k] = k;
			}
			REP(k, W - 1) {
				if (((j >> k) & 1 ) != 0) {
					if (!canWrite) {
						isOk = false;
						break;
					}
					else {
						swap(nextpos[k], nextpos[k + 1]);
						canWrite = false;
					}
				}
				else {
					canWrite = true;
				}
			}
			if (!isOk)continue;
			REP(k, W) {
				dp[i][nextpos[k]] += dp[i - 1][k];
				dp[i][nextpos[k]] %= MOD;
			}
		}
	}
	cout << dp[H][K - 1] << endl;
	PAU;
	return 0;
}


Measured memory_bytes: 504
#include <stdio.h>

int main(){
	int a,b,d,r;
	double f ; 
	scanf ("%d %d",&a,&b);
	d=a/b;
	r=a%b;
	f=1.0*a/b;
	printf ("%d %d %lf\n",d,r,f);
	return 0;
}
//(???,_??????)???????????????????????????!!

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

int main() {
    int n; cin >> n;
    int ans = 0;
    while (n > 0) {
        ans += n %10;
        n /= 10;
    }
    if (ans == 1) ans = 10;
    cout << ans << endl;
    return 0;
}

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

typedef long long ll; 

int main(){
        string s; cin>>s;
        int sum=s.size()-2; 
        if(s[0]==s[s.size()-1]) sum--; 
        if(sum%2==0) { cout<<"Second"; }
        else cout<<"First";

	return 0; 
}



Measured memory_bytes: 512
#pragma region template
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const long long MOD = 1e9 + 7, MAX = 1e18, larg = 1e5, INF = -1e9;
long long A, B, C, D, E, F, G, H, I, J, K, L, N, M, O, P, Q, R, S, T, U, V, W, x, y, z;
long long max_value = INF, max_index = -1;
long long min_value = MAX, min_index = -1;
typedef long long ll;
typedef pair<ll, ll> Pa;

template <std::int_fast64_t Modulus> class modint {
	using u64 = std::int_fast64_t;
public:
	u64 a;
	constexpr modint(const u64 x = 0) noexcept : a(x% Modulus) {}
	constexpr u64& value() noexcept { return a; }
	constexpr const u64& value() const noexcept { return a; }
	constexpr modint operator+(const modint rhs) const noexcept {
		return modint(*this) += rhs;
	}
	constexpr modint operator-(const modint rhs) const noexcept {
		return modint(*this) -= rhs;
	}
	constexpr modint operator*(const modint rhs) const noexcept {
		return modint(*this) *= rhs;
	}
	constexpr modint operator/(const modint rhs) const noexcept {
		return modint(*this) /= rhs;
	}
	constexpr modint& operator+=(const modint rhs) noexcept {
		a += rhs.a;
		if (a >= Modulus) {
			a -= Modulus;
		}
		return *this;
	}
	constexpr modint& operator-=(const modint rhs) noexcept {
		if (a < rhs.a) {
			a += Modulus;
		}
		a -= rhs.a;
		return *this;
	}
	constexpr modint& operator*=(const modint rhs) noexcept {
		a = a * rhs.a % Modulus;
		return *this;
	}
	constexpr modint& operator/=(modint rhs) noexcept {
		u64 exp = Modulus - 2;
		while (exp) {
			if (exp % 2) {
				*this *= rhs;
			}
			rhs *= rhs;
			exp /= 2;
		}
		return *this;
	}
};
#pragma endregion

string m[100];
int m_count[100][100];

int main() {
	cin >> H >> W;
	rep(i, H) {
		cin >> m[i];
	}
	rep(i, H) {
		rep(j, W) {
			m_count[i][j] = 500;
		}
	}
	if (m[0][0] == '#') m_count[0][0] = 1;
	else m_count[0][0] = 0;
	queue<pair<int, int>> que;
	que.push(make_pair(0, 0));
	while (!que.empty()) {
		pair<int, int> curr = que.front(); que.pop();
		int curr_y = curr.first, curr_x = curr.second;
		char curr_c = m[curr_y][curr_x];
		if (curr_y + 1 < H && !(curr_c == '.' && m[curr_y + 1][curr_x] == '#')) {
			if (m_count[curr_y][curr_x] < m_count[curr_y + 1][curr_x]) {
				m_count[curr_y + 1][curr_x] = m_count[curr_y][curr_x];
				que.push(make_pair(curr_y + 1, curr_x));
			}
		}
		if (curr_y + 1 < H && curr_c == '.' && m[curr_y + 1][curr_x] == '#') {
			if (m_count[curr_y][curr_x] + 1 < m_count[curr_y + 1][curr_x]) {
				m_count[curr_y + 1][curr_x] = m_count[curr_y][curr_x] + 1;
				que.push(make_pair(curr_y + 1, curr_x));
			}
		}
		if (curr_x + 1 < W && !(curr_c == '.' && m[curr_y][curr_x + 1] == '#')) {
			if (m_count[curr_y][curr_x] < m_count[curr_y][curr_x + 1]) {
				m_count[curr_y][curr_x + 1] = m_count[curr_y][curr_x];
				que.push(make_pair(curr_y, curr_x + 1));
			}
		}
		if (curr_x + 1 < W && curr_c == '.' && m[curr_y][curr_x + 1] == '#') {
			if (m_count[curr_y][curr_x] + 1 < m_count[curr_y][curr_x + 1]) {
				m_count[curr_y][curr_x + 1] = m_count[curr_y][curr_x] + 1;
				que.push(make_pair(curr_y, curr_x + 1));
			}
		}
	}
	cout << m_count[H - 1][W - 1];
}




Measured memory_bytes: 256
#include <bits/stdc++.h>
//#include <stdio.h>
//#include <iostream>
//#include <algorithm>

using namespace std;
#define BUF (1000)

int a,b,c;

int main(void){
	cin >> a >> b >> c;
	int ans;
	if(a==b) ans = c;
	else if(a==c) ans = b;
	else ans = a;

	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 256
#include <stdio.h>
int main(int argc, const char * argv[]){
int a,b;
scanf("%d %d",&a,&b);
if(a<b){
printf("a < b\n");
}
else if(a>b){
printf("a > b\n");
}
else{
printf("a == b\n");
}
return 0;
}

Measured memory_bytes: 580
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <utility>
#include <climits>
#include <vector>
using namespace std;

#define ll long long int

const int MOD = 1000000007;

int main() {

	ll n, m, ans = 0;

	cin >> n;

	for (int i = 1; i <= sqrt(n); i++) {

		if (n%i == 0)m = i;

	}
	if (m < n / m)m = n / m;
	while (1 <= m) {

		m /= 10;
		ans++;

	}

	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
string s,x,k;
int len;
int main()
{
    cin>>s;
    x=s;
    len=s.length();
    for(int i=0;i<=(len/2)-1;i++)
    {
        swap(s[i],s[len-1-i]);
    }

    for(int i=0;i<len;i++)
    {
        if(s[i]=='b')
        {
            s[i]='d';
            continue;
        }
        if(s[i]=='d')
        {
            s[i]='b';
            continue;
        }
        if(s[i]=='p')
        {
            s[i]='q';
            continue;
        }
        if(s[i]=='q')
        {
            s[i]='p';
            continue;
        }
    }
    if(x==s)
    {
        cout<<"Yes";
    }
    else
    {
        cout<<"No";
    }
    return 0;
}

Measured memory_bytes: 512
h,w = map(int,input().split())
mod = 10**9 + 7
data = [input() for _ in range(h)]
dp = [[0 for _ in range(w)] for i in range(h)]
dp[0][0] = 1
for i in range(h):
    for j in range(w):
        if data[i][j] == '.':
            if i > 0 and data[i-1][j] == '.':
                dp[i][j] += dp[i-1][j]
            if j > 0 and data[i][j-1] == '.':
                dp[i][j] += dp[i][j-1]
            dp[i][j] %= mod

print(dp[h-1][w-1])

Measured memory_bytes: 56284
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <functional>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cassert>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repd(i, n) for (int i = n; i > 0; i--)
#define mod 1000000007
#define MOD 998244353
#define inf 1e20
typedef long long int ll;
typedef pair<ll, ll> p;

int main() {
	int n;
	cin >> n;
	string ans = "AGC";
	if (n < 2800) {
		ans = "ARC";
	}
	if (n < 1200) {
		ans = "ABC";
	}
	cout << ans << endl;
	return 0;
}

//Ctrl+Aを使わない

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

using namespace std;

struct ownCompare{
    bool operator()(const int &a, const int &b) const{
        if(a % 10 == 0) return false;
        else return (a % 10) < (b % 10);
    }
};

int main() {
	vector<int> v(5);
	
	for(int i = 0; i < 5; i++) scanf("%d", &v[i]);
	
	sort(v.begin(), v.end(), ownCompare() );
	
	int ans = 0;
	for(int i = 1; i < 5; i++) ans += (v[i] + 9) / 10 * 10;
	ans += v[0];
	
	printf("%d", ans);
	
}


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

const int mod = 998244353;
const int N = 1100000;

int a[N], dp[N], r[N];
long long s[N], ss[N];

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    r[1] = 1;
    for (int i = 2; i < N; i++) r[i] = (long long)r[mod % i] * (mod - mod / i) % mod;
    int n; cin >> n;
    for (int i = 0; i < n; i++) {
        int x; cin >> x;
        a[x]++;
    }
    for (int i = 1; i < N; i++) for (int j = i; j < N; j += i) s[i] += (long long)j * a[j], ss[i] += (long long)j * j * a[j];
    for (int i = 1; i < N; i++) s[i] %= mod, ss[i] %= mod;
    int ans = 0;
    for (int i = N-1; i >= 1; i--) {
        dp[i] = (s[i] * s[i] + mod - ss[i]) % mod;
        for (int j = i + i; j < N; j += i) {
            dp[i] = dp[i] - dp[j];
            if (dp[i] < 0) dp[i] += mod;
        }
    }
    for (int i = 1; i < N; i++) {
        ans = ans + (long long)dp[i] * r[i] % mod;
        if (ans >= mod) ans -= mod;
    }
    if (ans & 1) ans += mod;
    ans /= 2;
    cout << ans << "\n";
    return 0;
}


Measured memory_bytes: 29952
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstdio>

int main() {
    long long n, a = 1, count = 0;

    std::cin >> n;

    for (int i = 0; i < n; i++) {
        int num;
        std::cin >> num;

        if (num == a) {
            a++;
        } else {
            count += num / a;
            if (num % a == 0) count--;
        }
        if (a == 1) a++;
    }

    std::cout << count << std::endl;

    return 0;
}

Measured memory_bytes: 256
<?php
fscanf(STDIN, "%d %d", $n, $m);
while ($n--) {
	fscanf(STDIN, "%d %d", $a, $b);
	$w[$a][] = $b;
}
$x = 0;
$q = new SplMaxHeap();
for ($i = 1; $i <= $m; $i++) {
	if (isset($w[$i])) {
		foreach ($w[$i] as $b) $q->insert($b);
	}
	if (!$q->isEmpty()) {
		$x += $q->extract();
	}
}
echo $x;

Measured memory_bytes: 47604
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on 2019/3/24
Solved on 2019/3/
@author: shinjisu
"""


# ABC 062 C - Chocolate Bar
def getIntList(): return [int(x) for x in input().split()]
class Debug():
    def __init__(self):
        self.debug = True
 
    def off(self):
        self.debug = False
 
    def dmp(self, x, cmt=''):
        if self.debug:
            if cmt != '':
                print(cmt, ':  ', end='')
            print(x)
        return x

def prob():
    d = Debug()
    d.off()
    H, W = getIntList()
    d.dmp((H, W), 'H, W')

    # 縦か横の分割
    large1 = (H+2) // 3 * W
    small1 = H // 3 * W
    large2 = (W+2) // 3 * H
    small2 = W // 3 * H
    if large1-small1 < large2-small2:
        large, small = large1, small1
    else:
        large, small = large2, small2
    d.dmp((large, small), 'large, small')
    cand = large - small

    # 縦及び横の分割
    area = H*W
    d.dmp((area), 'area')
#    for i in range(area//large,  area//small+1):
    for i in range(max(1, min(H, W)//3),  (max(H, W)+1)//2+1):
        #d.dmp((i), 'i')
        div1 = i*W
        div2 = (H-i)*(W//2)
        div3 = (H-i)*((W+1)//2)
        #d.dmp((div1, div2, div3), 'div1, div2, div3')
        cand0 = max(div1, div2, div3) - min(div1, div2, div3)
        #d.dmp((cand0), 'cand0')
        cand = min(cand, cand0)
        div1 = i*H
        div2 = (W-i)*(H//2)
        div3 = (W-i)*((H+1)//2)
        #d.dmp((div1, div2, div3), 'div1, div2, div3')
        cand0 = max(div1, div2, div3) - min(div1, div2, div3)
        #d.dmp((cand0), 'cand0')
        cand = min(cand, cand0)
        #d.dmp((cand), 'cand')
    return cand


ans = prob()
if ans is None:
    pass
elif type(ans) == tuple and ans[0] == 1:  # 1,ans
    for elm in ans[1]:
        print(elm)
else:
    print(ans)


Measured memory_bytes: 3188
#include <stdio.h>
#include <stdlib.h>//random,NULL
#include <string.h>
#include <time.h>
#include <unistd.h>//sleep()
#include <math.h>
#include <stdbool.h>

#define rep(i,n) for(int i=0; i<((int)n); i++)
#define REP(i,n) for(int i=0; i<=((int)n); i++)
#define srep(i,a,n) for(int i=a; i<((int)n); i++)
#define SREP(i,a,n) for(int i=a; i<=((int)n); i++)
#define rrep(i,n) for(int i=n-1; i>=0; i--)
#define RREP(i,n) for(int i=n; i>=0; i--)
#define INF 1000000000

int min(int a, int b){
  if(a>=b){
    return b;
  }
  else{
    return a;
  }
}

int solve(int N, int number, int *w, int *v){
  //dp[i]=（ちょうど i 円払うのに必要な支払いの最低回数）
  int *dp=(int *)malloc(sizeof(int)*(N+1));
  dp[0]=0;
  srep(i, 1, N+1){
    dp[i]=100000;
    rep(j,number){
      if(i-w[j]==0 || (i-w[j]>0 && dp[i-w[j]]!=0)){
        dp[i]=min(dp[i], dp[i-w[j]]+v[j]);
      }
    }
  }
  return dp[N];
}

int main(){
  char buf[1024];
  int N;

  fgets(buf,sizeof(buf),stdin);
  sscanf(buf, "%d", &N);

  int w[12];
  int v[12];
  w[0]=1;
  int degree=1;
  int number=1;
  while(pow(6,degree)<=N){
    w[number]=pow(6,degree);
    number++;
    degree++;
  }
  degree=1;
  while(pow(9,degree)<=N){
    w[number]=pow(9,degree);
    number++;
    degree++;
  }
  rep(i,number){
    v[i]=1;
  }

  // rep(i,number){
  //   printf("w[%d] = %d, v[%d] = %d\n", i, w[i], i, v[i]);
  // }
  // printf("number = %d\n", number);

  int ans=solve(N, number, w, v);

  printf("%d\n", ans);

  return 0;
}


Measured memory_bytes: 640