akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define For(i, l, r) for(int i = (l), i##end = (int)(r); i <= i##end; ++i)
#define Fordown(i, r, l) for(int i = (r), i##end = (int)(l); i >= i##end; --i)
#define Set(a, v) memset(a, v, sizeof(a))
using namespace std;

bool chkmin(int &a, int b) {return b < a ? a = b, 1 : 0;}
bool chkmax(int &a, int b) {return b > a ? a = b, 1 : 0;}

inline int read() {
    int x = 0, fh = 1; char ch = getchar();
    for (; !isdigit(ch); ch = getchar() ) if (ch == '-') fh = -1;
    for (; isdigit(ch); ch = getchar() ) x = (x << 1) + (x << 3) + (ch ^ '0');
    return x * fh;
}


void File() {
#ifdef zjp_shadow
	freopen ("F.in", "r", stdin);
	freopen ("F.out", "w", stdout);
#endif
}

const int N = 55, M = 205;

typedef long long ll;
const ll Mod = 1e9 + 7;

ll fpm(ll x, int power) {
	ll res = 1;
	for (; power; power >>= 1, (x *= x) %= Mod)
		if (power & 1) (res *= x) %= Mod;
	return res;
}

ll fac[M], ifac[M];

void Init(int maxn) {
	fac[0] = ifac[0] = 1ll;
	For (i, 1, maxn) fac[i] = fac[i - 1] * i % Mod;
	ifac[maxn] = fpm(fac[maxn], Mod - 2);
	Fordown (i, maxn - 1, 1) ifac[i] = ifac[i + 1] * (i + 1) % Mod;
}

ll C(int m, int n) {
	if (m > n || n < 0 || m < 0) return 0ll;
	return fac[n] * ifac[m] % Mod * ifac[n - m] % Mod;
}

set <int> Point;
int n, m, k; ll ans = 1ll;

ll Polya(int n) {
	ll res = 0;
	For (i, 1, n) (res += fpm(k, __gcd(n, i))) %= Mod;
	return res * fpm(n, Mod - 2) % Mod;
}

ll Permu(int m) { return C(k - 1, m + k - 1); }

vector<int> G[N];
int dfn[N], lowlink[N], sta[N], top;
void Tarjan(int u, int fa) {
	static int clk = 0;
	dfn[u] = lowlink[u] = (++ clk); sta[++ top] = u;

	for (int v : G[u]) if (!dfn[v]) {
		Tarjan(v, u), chkmin(lowlink[u], lowlink[v]);
		if (lowlink[v] >= dfn[u]) {
			Point.clear();
			int n = 0, m = 0, Last;
			do Point.insert(Last = sta[top --]), ++ n; while (Last != v);
			Point.insert(u), ++ n;
			for (int x : Point) for (int v : G[x])
				if ((bool)Point.count(v)) ++ m;
			m >>= 1;

	//		cerr << k << endl;
			if (m < n) (ans *= k) %= Mod;
			if (m == n) (ans *= Polya(n)) %= Mod;
			if (m > n) (ans *= Permu(m)) %= Mod;
		}
	} else chkmin(lowlink[u], dfn[v]);
	if (!fa) -- top;
}

int main () {
	File();
	n = read(), m = read(); k = read();
	Init(m + k + 5);

	For (i, 1, m) {
		int u = read(), v = read();
		G[u].push_back(v);
		G[v].push_back(u);
	}

	For (i, 1, n) if (!dfn[i]) Tarjan(i, 0);
	printf ("%lld\n", ans);
    return 0;
}


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

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

    int ones = n % 10;
    n /= 10;
    int tens = n % 10;
    n/= 10;
    int hundreds = n % 10;

    if (ones > tens) {
        tens++;
    }
    if (tens <= hundreds) {
        cout << hundreds << hundreds << hundreds << endl;
    } else {
        hundreds++;
        cout << hundreds << hundreds << hundreds << endl;
    }
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    scanf("%d", &n);
    for(int i = 0; i <= n / 4; i++) {
        for(int j = 0; j <= n / 7; j++) {
            if(4 * i + 7 * j == n) {
                printf("Yes\n");
                return 0;
            }
        }
    }
    printf("No\n");
    return 0;
}

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

using namespace std;

int main()
{
    string s;

   // int c=1;

    cin>>s;

    int v[26]={0};

    for(int i=0;i<4;i++)
    {
        v[s[i]-'A']++;//)if(s[i]==s[i+1] || s[i]==s[i+2] || s[i]==s[i+3])
           // c=1;

        //else
           // c=0;

    }

    sort(v,v+26);

    if(v[25]==2 && v[24]==2)

        cout<<"Yes\n";
    else
        cout<<"No\n";

    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <cmath>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int mod = 1000000007;

int main() {
    ios::sync_with_stdio(false);
    int n, v[102] = {}, z = 0;
    ll W, w[102] = {};
    vector<int> a, b, c, d;
    cin >> n >> W >> w[0] >> v[0];
    a.push_back(v[0]);
    for (int i = 1; i < n; i++) {
        cin >> w[i] >> v[i];
        if (w[i] == w[0]) a.push_back(v[i]);
        else if (w[i] == w[0] + 1) b.push_back(v[i]);
        else if (w[i] == w[0] + 2) c.push_back(v[i]);
        else d.push_back(v[i]);
    }
    sort(a.begin(), a.end()); reverse(a.begin(), a.end());
    sort(b.begin(), b.end()); reverse(b.begin(), b.end());
    sort(c.begin(), c.end()); reverse(c.begin(), c.end());
    sort(d.begin(), d.end()); reverse(d.begin(), d.end());
    for (int i = 0; i <= a.size(); i++) {
        for (int j = 0; j <= b.size(); j++) {
            for (int k = 0; k <= c.size(); k++) {
                for (int l = 0; l <= d.size(); l++) {
                    if (w[0] * i + (w[0] + 1) * j + (w[0] + 2) * k + (w[0] + 3) * l <= W) {
                        int x = 0;
                        for (int m = 0; m < i; m++) x += a[m];
                        for (int m = 0; m < j; m++) x += b[m];
                        for (int m = 0; m < k; m++) x += c[m];
                        for (int m = 0; m < l; m++) x += d[m];
                        z = max(z, x);
                    }
                }
            }
        }
    }
    cout << z;
    /*
     a=1 w: 1
     b=2 w+1: 7 6
     c=1 w+2: 10
     d=5 w+3: 7 6 5 5 4
     a+b+c+d=n
     int z = 0
     (a+1)(b+1)(c+1)(d+1)
     for(i=0;i<=a;i++)
     for(j=0;j<=b;j++)
     for(k)
     for(l) {
        if(w*i+(w+1)*j+(w+2)*k+(w+3)*l<=W){
            int x = sum of value
            z = max(z, x);
        }
     }
     cout << z;
     */
}


Measured memory_bytes: 256
#pragma GCC optimize ("O2")
#pragma GCC target ("avx2")
#include<bits/stdc++.h>

using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

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


	int N, K;
	cin >> N >> K;
	int P[5000], C[5000];
	rep(i, N) {
		cin >> P[i];
		P[i]--;
	}
	rep(i, N) {
		cin >> C[i];
	}

	ll kotae = -2e18;
	int yatta[5000] = {};
	rep(i, N) if (!yatta[i]) {
		ll ruiseki[20000];
		int L = 0;
		ruiseki[0] = 0;
		int j = i;
		while (!yatta[j]) {
			yatta[j] = 1;
			ruiseki[L + 1] = ruiseki[L] + C[j];
			L++;
			j = P[j];
		}
		ll hue = ruiseki[L];
		for (int j = L + 1; j <= L + L + L; j++) {
			ruiseki[j] = ruiseki[j - L] + hue;
		}
		ll amari = K % L;
		ll wari = K / L;

		if (hue > 0) {
			rep1(j, L) {
				ll hajimari = ruiseki[j - 1];
				ll saidai = -2e18;
				rep(k, amari) {
					chmax(saidai, ruiseki[j + k]);
				}
				chmax(kotae, hue* wari + saidai - hajimari);
			}
			if (wari > 0) {
				rep1(j, L) {
					ll hajimari = ruiseki[j - 1];
					ll saidai = -2e18;
					rep(k, L) {
						chmax(saidai, ruiseki[j + k]);
					}
					chmax(kotae, hue * (wari - 1) + saidai - hajimari);
				}
			}
		}
		else {
			rep1(j, L) {
				ll hajimari = ruiseki[j - 1];
				ll saidai = -2e18;
				rep(k, min(K, L)) {
					chmax(saidai, ruiseki[j + k]);
				}
				chmax(kotae, saidai - hajimari);
			}
		}
	}

	co(kotae);


	Would you please return 0;
}

Measured memory_bytes: 3840
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(), v.rend()

ll lcm(ll n, ll m) {
    return n*m/__gcd(n, m);
}

int main() {
    int n, m;
    cin >> n >> m;
    string s, t;
    cin >> s >> t;
    ll l = lcm(n, m);
    int N = n/__gcd(n, m), M = m/__gcd(n, m);
    bool flag = true;
    for (int k = 0; k < __gcd(n, m); k++) {
        if (s[k*N] != t[k*M]) flag = false;
    }

    if (flag) cout << l << endl;
    else cout << -1 << endl;

    return 0;
}

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

#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int64 i = 0;i < (n);i++)
#define FOR(i, a, b) for(int64 i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second

using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
using int64 = int_fast64_t;
using uint64 = uint_fast64_t;
using PII = pair<int32, int32>;
using PLL = pair<int64, int64>;

const double eps = 1e-10;

template<typename A, typename B>inline void chmin(A &a, B b){if(a > b) a = b;}
template<typename A, typename B>inline void chmax(A &a, B b){if(a < b) a = b;}

template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
	return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value!=0>::type
fill_v(U &u,const V... v){u=U(v...);}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value==0>::type
fill_v(U &u,const V... v){
	for(auto &e:u) fill_v<T>(e,v...);
}

int main(void){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int64 H[2], M[2], K;
	REP(i, 2) cin >> H[i] >> M[i];
	cin >> K;
	int64 minute = (H[1] - H[0]) * 60 + (M[1] - M[0]);
	cout << max((int64)0, minute-K) << endl;
}


Measured memory_bytes: 3636
import sys
input = sys.stdin.readline

def solve(N):
    res = 0
    flg = 0
    for n in reversed(N):
        if flg == 2:
            if n >= 5:
                flg = 1
            else:
                flg = 0
        m = flg + n
        if m == 5:
            res += 5
            flg = 2
        elif m < 5:
            res += m
            flg = 0
        else:
            res += (10 - m)
            flg = 1
    return res + flg%2


N = list(map(int, input().strip()))
print(solve(N))

# N = 1
# q = 0
# while True:
#     p = solve(list(map(int, str(N))))
#     if abs(p-q) > 1:
#         print(N, "OK")
#         exit()
#     q = p
#     N += 1

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

using namespace std;

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

static const double EPS = 1e-8;

int main(){
  int total_cards;
  int continuous_range;
  while(~scanf("%d %d",&total_cards,&continuous_range)){
    if(total_cards == 0) break;
    int cards[101];
    for(int card_idx=0;card_idx<total_cards;card_idx++){
      scanf("%d",cards + card_idx);
    }

    int org_max = 0;
    for(int start=0;start + continuous_range<=total_cards;start++){
      int sum = 1;
      for(int cr=0;cr<continuous_range;cr++){
	sum *= cards[start+cr];
      }
      org_max = max(sum,org_max);
    }
    int next_max = 0;
    for(int from_idx=0;from_idx<total_cards;from_idx++){
      for(int to_idx=from_idx+1;to_idx<total_cards;to_idx++){
	swap(cards[from_idx],cards[to_idx]);
	for(int start=0;start + continuous_range<=total_cards;start++){
	  int sum = 1;
	  for(int cr=0;cr<continuous_range;cr++){
	    sum *= cards[start+cr];
	  }
	  next_max = max(sum,next_max);
	}
	swap(cards[from_idx],cards[to_idx]);
      }
    }

    if(next_max - org_max >= 0){
      printf("%d\n",next_max - org_max);
    }
    else{
      printf("NO GAME\n");
    }

  }
}

Measured memory_bytes: 1188
#include <bits/stdc++.h>
using namespace std;
int main() {
    ios_base::sync_with_stdio(false); cin.tie(0);
    int n; cin >> n;
    vector<int> data(2 * n);
    for (auto &v : data)
        cin >> v;
    sort(data.begin(), data.end());
    long long ans = 0;
    for (int i = 0 ; i < 2 * n ; i += 2)
        ans += data[i];
    cout << ans << '\n';
}


Measured memory_bytes: 256
n = int(input())
a = []
f = [False]*n
for _ in range(n):
    a.append(int(input()))
cnt = 0
i = 0
while(True):
    if f[i]:
        cnt = -1
        break
    if i == 1:
        break
    f[i]=True
    cnt += 1
    i = a[i]-1
print(cnt)

Measured memory_bytes: 7852
//
//  main.cpp
//  adsfdsgsg
//
//  Created by h3037175 on 2017/07/31.
//  Copyright ?? 2017??´ h3037175. All rights reserved.
//

#include <iostream>
#include <cstdio>
#include <math.h>
#include<algorithm>
#include <utility>
#define nan -100000
using namespace std;
int main() {
    bool bo=false;
    int a,c[6]={1,5,10,50,100,500},sum=0;
    for(int i=0;i<6;i++){
        cin>>a;
        sum+=a*c[i];
        if(sum>=1000){
            bo=true;
            cout<<"1"<<endl;
            break;
        }
    }
    if(bo==false){
        cout<<"0"<<endl;
    }
    return 0;
}

Measured memory_bytes: 3124
import sys
from operator import itemgetter

sys.setrecursionlimit(10**9)
input = sys.stdin.readline

def ii(): return int(input())
def mi(): return map(int, input().split())
def lmi(): return list(map(int, input().split()))
def iif(n): return [int(input()) for _ in range(n)]
def lmif(n): return [list(map(int, input().split())) for _ in range(n)]
def ss(): return input().split()

def main():
    mod = 1000000007
    
    n, k = mi()
    A = lmi()

    for i in range(k, n):
        if A[i] > A[i-k]:
            print("Yes")
        else:
            print("No")
            
    return

main()


Measured memory_bytes: 33364
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <queue>
#include <tuple>
#include <cstring>

#define INF 100000000

using namespace std;

int main()
{

    int a, b;
    cin >> a >> b;
    if (a == b)
        cout << "Draw\n";
    else if (a == 1)
        cout << "Alice\n";
    else if (b == 1)
        cout << "Bob\n";
    else if (a > b)
        cout << "Alice\n";
    else
        cout << "Bob\n";

    return 0;
}


Measured memory_bytes: 256
import java.io.*;
import java.util.Scanner;
import java.util.Arrays;
import java.util.ArrayList;

public class Main{

    public static void main(String[] args){
        //START

        Scanner sc=new Scanner(System.in);
        long N=sc.nextLong();

        long i=0;
        long tmpI=0;
        long tmpJ=0;

        double rootN=Math.sqrt(N);
        //System.out.println(rootN);

        for(i=1;i<=(long)rootN;i++){
            if(N%i==0){
                tmpI=i;
                tmpJ=N/i;
            }
            //System.out.println(i+" "+tmpI+" "+tmpJ);
            if(i==(long)rootN){
                System.out.println(tmpI+tmpJ-2);
            }
        }

        //END
    }
}



Measured memory_bytes: 23892
#include<bits/stdc++.h>
#define LLI long long int
#define pii pair<int,int>
#define fst first
#define sec second
#define ULTRA 2134567890
#define de(x) if(x!=0 && MODE==x)
#define MODE 1
using namespace std;

int main()
{
    int i,j;
    string s;

    cin>>s;
    if( s == "ABC")
        printf("ARC\n");
    else
        printf("ABC\n");

    return 0;
}

//
//          ___ ___  __________  __________
//         /////\  \/\   ______\/\\\\\\\\\\\  Code by ~Ice Tea~ of
//        //// \ \  \ \  \_____/\ \\\\_____/      New Empire of CHSH ...
//       ////   \ \  \ \  \      \ \\\\\\\\\\\
//      ////__   \ \  \ \  \      \ \\\\_____/
//     ///////\   \ \  \ \  \______\ \\\\_______   ________
//    ////____/    \ \__\ \___   ___\ \\\\\\\\\\\ _\  ___  \_
//   /__/           \/__/\/__/\  \__/\ \\\\_____//\  .\_/\_  \
//                           \ \  \   \ \\\\\\\\\\\\  \_\/_\  \
// ... with the AC Power of   \ \  \   \ \\\\_____/ \   _____  \
//   The Great Tsundere Doggy. \ \  \   \ \\\\     \ \  \  \ \  \
//                              \ \__\   \ \\\\\\\\\\ \__\  \ \__\
//                               \/__/    \/________/\/__/   \/__/
//


Measured memory_bytes: 3628
Scanf.scanf "%d" (fun n ->
    let xyh = Array.init n (fun _ -> Scanf.scanf " %d %d %d" (fun x y h -> h, x, y)) in
    Array.sort compare xyh;

    let check cx cy =
        let h, x, y = xyh.(n - 1) in

        let ih = abs (cx - x) + abs (cy - y) + h in
        if Array.for_all (fun (h, x, y) -> max (ih - abs (cx - x) - abs (cy - y)) 0 = h) xyh then (
            Printf.printf "%d %d %d\n" cx cy ih;
            false
        ) else true
    in

    let rec loop_cy cy =
        let rec loop_cx cx =
            if cx > 100 then loop_cy (cy + 1) else 
                if check cx cy then loop_cx (cx + 1)
        in
        loop_cx 0
    in
    loop_cy 0 
)

Measured memory_bytes: 4832
import itertools
import math

K = int(input())
nums = range(1, K + 1)
comb = itertools.combinations_with_replacement(nums, 3)
ans = 0

for v in comb:
    n1 = math.gcd(v[0], v[1])
    n2 = math.gcd(n1, v[2])
    l = len(list(set(v)))
    if l == 3:
        ans += 6 * n2
    elif l == 2:
        ans += 3 * n2
    elif l == 1:
        ans += n2
print(ans)


Measured memory_bytes: 9064
k = int(input())
num = {0:[0,1],1:[0,1,2],2:[1,2,3],3:[2,3,4],4:[3,4,5],5:[4,5,6],6:[5,6,7],7:[6,7,8],8:[7,8,9],9:[8,9]}
lun = [[1,2,3,4,5,6,7,8,9]]
lun_len = sum([len(l) for l in lun])
while lun_len < k:
    new_lun=[]
    for l in lun[-1]:
        for n in num[int(str(l)[-1])]:
            a=int(str(l)+str(n))
            new_lun.append(a)
    lun.append(new_lun)
    lun_len = sum([len(l) for l in lun])

for l in lun:
    if len(l)>k:
        print(l[k-1])
    else:
        k-=len(l)

Measured memory_bytes: 11072
import sys
import math

sys.setrecursionlimit(10000)
INF = float('inf')


def inp():
    return int(input())


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


def inls():
    return input().split()


def Yesif(cond):
    print('Yes' if cond else 'No')


def YESIF(cond):
    print('YES' if cond else 'NO')


def yesif(cond):
    print('yes' if cond else 'no')



a, b, t = inl()
print(t // a * b)



Measured memory_bytes: 3060
#include <cassert>
#include <cstdio>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>

using namespace std;
using lint = long long;
constexpr int MOD = 1000000007, INF = 1111111111;

template <class T>
ostream &operator<<(ostream &os, const vector<T> &vec) {
	for (const auto &e : vec) os << e << (&e == &vec.back() ? "" : " ");
	return os;
}

template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
	os << p.first << " " << p.second;
	return os;
}

template <class T1, class T2>
ostream &operator<<(ostream &os, const map<T1, T2> &mp) {
	for (const auto &e : mp) os << "[" << e << "] ";
	return os;
}

#ifdef _DEBUG
template <class T>
void dump(const char* str, T &&h) { cerr << str << " = " << h << "\n"; };
template <class Head, class... Tail>
void dump(const char* str, Head &&h, Tail &&... t) {
	while (*str != ',') cerr << *str++; cerr << " = " << h << "\n";
	dump(str + (*(str + 1) == ' ' ? 2 : 1), t...);
}
#define DMP(...) dump(#__VA_ARGS__, __VA_ARGS__)
#else 
#define DMP(...) ((void)0)
#endif

int main() {

	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	int N;
	cin >> N;

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

	long double sum = .0;
	for (int i = 0; i < N; i++) {
		sum += 1.0 / A[i];
	}

	cout << setprecision(40);
	cout << 1.0 / sum << "\n";


	return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
 using namespace std;
#define INF 1000000000
#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
typedef long long LL;
LL N,M,K;
LL kai[300011];
LL rkai[300011];
int MOD=1e9+7;

LL inverse();

inline LL inverse(LL a, LL m){
  LL b = m, u = 1, v = 0;
  while (b) {
    LL t = a / b;
    swap(a -= t * b, b);
    swap(u -= t * v, v);
  }
  return (u % m + m) % m;
}


void init(){
   LL now=1;
   kai[0]=1;
   REP(i,300001){
       kai[i+1]=kai[i]*(i+1);
       kai[i+1]%=MOD;
   }
   REP(i,300001){
       rkai[i]=inverse(kai[i],MOD);
   }
}

LL kata(LL n,LL k){
   LL ans=kai[n+k]*(n-k+1);
   ans%=MOD;
   ans*=rkai[k];
   ans%=MOD;
   ans*=rkai[n+1];
   ans%=MOD;
   return ans;
}

LL sol(LL x,LL y,LL a,LL b){
   LL ans=1;
   ans*=kai[x+y];
   ans*=rkai[x];
   ans%=MOD;
   ans*=rkai[y];
   ans%=MOD;
   ans*=kata(x-a,a);
   ans%=MOD;
   ans*=kata(y-b,b);
   ans%=MOD;
   return ans;
}
//8c3=56,2=112,

int main(){
    cin>>N>>M>>K;
    init();
    LL ans=0;
    REP(i,K+1){
        LL NN=N+2*i;
        LL MM=M+2*(K-i);
        ans+=sol(NN,MM,i,K-i);
        ans%=MOD;
    }
    cout<<ans<<endl;
    
    return 0;
}

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

void solve(int N, int K, vector<int> h)
{
    int res = 0;
    for (int i = 0; i < N; i++)
    {
        if (h.at(i) >= K)
            res++;
    }
    cout << res << endl;
}

int main()
{
    int N;
    cin >> N;
    int K;
    cin >> K;
    vector<int> h(N);
    for(int i = 0; i < N; i++) {
        cin >> h.at(i);
    }
    solve(N, K, move(h));
    return 0;
}


Measured memory_bytes: 3632
r,c=map(int,input().split())
mod=10**9+7
g=[]
for _ in range(r):
  g.append(input())
dp=[[0 for j in range(c)] for i in range(r)]
dp[0][0]=1
for i in range(r):
  for j in range(c):
    if g[i][j]=='.':
        if i>0:
            dp[i][j]+=dp[i-1][j]%mod
        if j>0:
            dp[i][j]+=dp[i][j-1]%mod


print(dp[-1][-1]%mod)
      


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

int N, M;
vector<vector<int>> rel;
vector<int> visited;
int ans = 0;


bool check(){
    for(int &i:visited)
        if(!i) return false;
    return true;
}

void solve(int s){
    visited[s] = 1;
    for(int i=0; i<N; i++){
        if(rel[s][i] == 1 && !visited[i]){
            solve(i);
        }
    }
    if(check()) ans++;
    visited[s] = 0;
}

int main() {
    cin >> N >> M;
    visited.resize(N);
    rel.resize(N);
    for(vector<int> &v:rel)
        v.resize(N);
    
    for(int i=0; i<M; i++){
        int a, b; cin >> a >> b;
        a--; b--;
        rel[a][b] = rel[b][a] = 1;
    }
    solve(0);
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Collections;
using System.Collections.Specialized;
using System.Linq;
using System.Text;
using System.IO;
using System.Reflection;
using static System.Math;
using System.Numerics;
static class Program{
	const int mod=(int)1e9+7;
	static void Main(){
		Sc sc=new Sc();
		var t=sc.S;
		int n=t.Length;
		bool b=true;StringBuilder sb=new StringBuilder();
		int g=1;
		for(int i = 0;i<n-1;i++) {
			if(i<n/2){
				if(t[i]!=t[n-i-2]){
					b=false;
					break;
				}
			}
			sb.Append(g.ToString()+" "+(i+2).ToString()+"\n");
			if(i<n/2&&t[i]=='1'){g=i+2;}

		}
		if(t[n-1]=='1'||t[0]=='0'){b=false;}
		if(!b){Console.WriteLine("{0}",-1);}
		else{Console.Write(sb);}
	}
}

public class Sc{
	public int I{get{return int.Parse(Console.ReadLine());}}
	public long L{get{return long.Parse(Console.ReadLine());}}
	public double D{get{return double.Parse(Console.ReadLine());}}
	public string S{get{return Console.ReadLine();}}
	public int[] Ia{get{return Array.ConvertAll(Console.ReadLine().Split(),int.Parse);}}
	public long[] La{get{return Array.ConvertAll(Console.ReadLine().Split(),long.Parse);}}
	public double[] Da{get{return Array.ConvertAll(Console.ReadLine().Split(),double.Parse);}}
	public string[] Sa{get{return Console.ReadLine().Split();}}
	public object[] Oa{get{return Console.ReadLine().Split();}}
	public int[] Ia2{get{return Array.ConvertAll(("0 "+Console.ReadLine()+" 0").Split(),int.Parse);}}
	public int[] Ia3(int a){return Array.ConvertAll((a.ToString()+" "+Console.ReadLine()).Split(),int.Parse);}
	public int[] Ia3(bool a,int b,bool c,int d){return Array.ConvertAll(((a?b.ToString()+" ":"")+Console.ReadLine()+(c?" "+d.ToString():"")).Split(),int.Parse);}
	public long[] La2{get{return Array.ConvertAll(("0 "+Console.ReadLine()+" 0").Split(),long.Parse);}}
	public long[] La3(int a){return Array.ConvertAll((a.ToString()+" "+Console.ReadLine()).Split(),long.Parse);}
	public long[] La3(bool a,int b,bool c,int d){return Array.ConvertAll(((a?b.ToString()+" ":"")+Console.ReadLine()+(c?" "+d.ToString():"")).Split(),long.Parse);}
	public T[] Arr<T>(int n,Func<T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f();}return a;}
	public T[] Arr<T>(int n,Func<int,T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f(i);}return a;}
	public T[] Arr<T>(int n,Func<string[],T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f(Console.ReadLine().Split());}return a;}
	public T[] Arr<T>(int n,Func<int,string[],T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f(i,Console.ReadLine().Split());}return a;}
}


Measured memory_bytes: 21208
/*Function Template*/
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int mod = 1000000007;
const ll MOD = 1000000000000000001;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define ALL(a)  (a).begin(),(a).end()
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);


ll Len(ll n) {
  ll s=0;
  while(n!=0) s++, n/=10;
  return s;
}


ll Sint(ll n) {
  ll m=0,s=0,a=n;
  while(a!=0) s++, a/=10;
  for(ll i=s-1;i>=0;i--) m+=n/((ll)pow(10,i))-(n/((ll)pow(10,i+1)))*10;
  return m;
}


ll Svec(vector<ll> v){
  ll n=0;
  for(ll i=0;i<v.size();i++) n+=v[i];
  return n;
}


ll GCD(ll a,ll b){
  ll r,tmp;
/*自然数 a > b を確認・入替*/
  if(a<b){
    tmp=a,a=b,b=tmp;
  }
/*ユークリッドの互除法*/
  r=a%b;
  while(r!=0){
    a=b,b=r,r=a%b;
  }
  return b;
}


ll LCM(ll a,ll b){
  ll c=a,d=b,r,tmp;
/*自然数 a > b を確認・入替*/
  if(a<b){
    tmp=a,a=b,b=tmp;
  }
/*ユークリッドの互除法*/
  r=a%b;
  while(r!=0){
    a=b,b=r,r=a%b;
  }
  return c/b*d;
}


ll Factorial(ll n){
  ll m=1;
  while(n>=1) m*=n,n--;
  return m;
}

vector<pair<char,ll>> runlength(string s,vector<pair<char,ll>> p){
  ll x=1;
  if(s.size()==1){
    p.push_back(pair<char,ll>(s[0],1));
    return p;
  }
  for(ll i=0;i<s.size()-1;i++){
    if(s[i]==s[i+1]){
      x++;
      if(i==s.size()-2){
        p.push_back(pair<char,ll>(s[i],x));
      }
    }else{
      p.push_back(pair<char,ll>(s[i],x));
      x=1;
      if(i==s.size()-2){
        p.push_back(pair<char,ll>(s[s.size()-1],x));
      }
    }
  }
  return p;
}



/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
int main() {
  IOS;
  ll n;
  cin>>n;
  cout<<(ll)pow(n,2)<<endl;
}

Measured memory_bytes: 256
local n, m = io.read("*n", "*n")
if n == 1 then
  if m == 1 then
    print(1)
  else
    print(m - 2)
  end
elseif n == 2 then
  print(0)
else
  if m == 1 then
    print(n - 2)
  elseif m == 2 then
    print(0)
  else
    print((n - 2) * (m - 2))
  end
end


Measured memory_bytes: 888
import java.util.*;
public class Main{
        public static void main(String[] args){
                Scanner sc = new Scanner(System.in);
                String s = sc.next();
                if(s.equals("A")) System.out.println("T");
                if(s.equals("T")) System.out.println("A");
                if(s.equals("C")) System.out.println("G");
                if(s.equals("G")) System.out.println("C");
        }
}//0=48
 //a=97 a -> +26 = 123
//鶏になれ

Measured memory_bytes: 35632
using System;
using System.Collections.Generic;

namespace ConsoleApp1
{
    class ABC179F
    {
        // https://atcoder.jp/contests/abc179/tasks/abc179_f

        static int[] X = new int[200001];
        static int[] Y = new int[200001];
        static int minX;
        static int minY;
        static long N;

        static void Main(string[] args)
        {
            var items = Console.ReadLine().Split();
            N = Int32.Parse(items[0]);
            long Q = Int64.Parse(items[1]);

            long sum = N * N - (N * 4) + 4;
            minX = (int)N;
            minY = (int)N;

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

            for (int i = 0; i < Q; i++)
            {
                items = Console.ReadLine().Split();
                int Q1 = Int32.Parse(items[0]);
                int Q2 = Int32.Parse(items[1]);

                if (Q1 == 1)
                {
                    sum -= reverseCol(Q2);
                }
                else
                {
                    sum -= reverseRow(Q2);
                }
            }

            Console.WriteLine(sum);
        }

        static int reverseCol(int x)
        {
            int count = Math.Max(Y[x] - 2, 0);

            if (x < minX)
            {
                count = Math.Max(minY - 2, 0);

                for (int i = x; i < minX; i++)
                {
                    Y[i] = minY;
                }

                minX = x;
            }

            return count;
        }

        static int reverseRow(int y)
        {
            int count = Math.Max(X[y] - 2, 0);

            if (y < minY)
            {
                count = Math.Max(minX - 2, 0);

                for (int i = y; i < minY; i++)
                {
                    X[i] = minX;
                }

                minY = y;
            }

            return count;
        }
    }
}


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

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

    bool judge=true;

    for(int i=0; i<s.size(); i++){
        if(s[i]!=t[i]){
            judge=false;
        }
    }

    cout<<(judge==true ? "Yes" : "No")<<endl;
}

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

#define rep(i,z) for(int i = 0; i<(int)(z); i++)
#define rep1(i,z) for(int i = 1; i<=(int)(z); i++)
 
using namespace std;

typedef long long ll;
const ll MOD=1e9+7;
using pear = pair<int,int>;



int main(){
    ll x,ans; cin>>x;
    ans = 1000*(x/500); x = x%500;
    ans += 5*(x/5);
    cout<<ans<<endl;

}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,a,b) for(ll i=ll(a);i<ll(b);i++)
#define irep(i,a,b) for(ll i=ll(a);i>=ll(b);i--)
#define pb push_back
#define mp make_pair
#define F .first
#define S .second 
using ll=long long;
using ld=long double;
using namespace std;
const ll mod=1e9+7;

main(){
    ll a,b,ans=0;
    cin>>a>>b;
    ll f=a;
    bool p=false;
    if(a&1)f++;
    ll g=b-f+1;
    if(g%2==0)p=true;
    ll h=g/2;
    if(p){
        if(h%2==0){
            if(a&1)ans=a;
            else ans=0;
        }
        else{
            if(a&1)ans=a^1;
            else ans=1;
        }
    }
    else{
        if(h%2==0){
            if(a&1)ans=(a^b);
            else ans=b;
        }
        else{
            if(a&1)ans=(a^b)^1;
            else ans=b^1;
        }
    }
    cout<<ans;
}




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


int main() {
  int a, b, c;
  cin >> a >> b >> c;
  set<int> s;
  s.insert(a);
  s.insert(b);
  s.insert(c);
  cout << s.size() << endl;
  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <iomanip>
using namespace std;
#define reps(i,s,n) for(int i = s; i < n; i++)
#define rep(i,n) reps(i,0,n)
#define fi first
#define se second
#define mp make_pair
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;

ll N,M,H,W,K,A,B;
string S;
string alpha = "abcdefghijklmnopqrstuvwxyz";
string ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

const int MOD = (1e+9)+7;

int main() {
    cin>>N>>K;
    ll ones;
    stack<ll> sta;
    rep(i,N+1){
        ll d = N/(i+1)-N/(i+2);
        //if(sta.size()) if(d == sta.top()) continue;
        if(d == 0){
            ones = N/(i+1);
            break;
        }
        sta.push(d);
    }
    ll gs = sta.size();
    vec group(gs+ones+1,0);
    reps(i,1,gs+ones+1) {
        if(i<=ones) {
            group.at(i) = 1;
        }else {
            group.at(i) = sta.top();
            sta.pop();
        }
    }
    mat dp(K+1,vec(gs+ones+1,0));//1-indexed
    reps(i,1,gs+ones+1) dp[1][i] = (dp[1][i-1] + group.at(i))%MOD;
    reps(i,2,K+1){
        reps(j,1,gs+ones+1){
            dp[i][j] = (dp[i][j-1] + group.at(j) * dp[i-1][gs+ones+1-j])%MOD;
            if(dp[i][j]<0) {
                cout<<"error"<<endl;
                return 0;
            }
        }
    }
    //cout<<gs<<' '<<ones<<endl;
    /*rep(i,K+1){
        rep(j,gs+ones+1) cout<<dp[i][j]<<' ';
        cout<<endl;
    }*/
    cout<<dp[K][gs+ones]<<endl;
}

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

int main() {
    int N;
    cin >> N;
    vector<int> cnt(100001);
    for (int i = 0; i < N; i++) {
        int a;
        cin >> a;
        cnt[a]++;
    }
    int res = 0;
    for (int i = 1; i < 100000; i++)
        res = max(res, cnt[i - 1] + cnt[i] + cnt[i + 1]);

    cout << res << endl;
    return 0;
}

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

#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
const ll INF = 1e9;

ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }

int main() {
  ll n, res;
  cin >> n;
  vector<ll> a(n), l(n + 1), r(n + 1);

  rep(i, n) cin >> a[i];

  for (int i = 0; i < n; ++i) l[i + 1] = gcd(a[i], l[i]);
  for (int i = n - 1; i >= 0; --i) r[i] = gcd(a[i], r[i + 1]);

  for (int i = 0; i < n; ++i) res = max(res, gcd(l[i], r[i + 1]));

  cout << res << endl;
  return 0;
}


Measured memory_bytes: 2560
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define INF (1e9)+7
int main( )
{
	ll n,k;cin>>n>>k;
	ll a[n],dp[n];
	for(int i=0;i<n;i++)cin>>a[i];
	for(int i=0;i<n;i++)dp[i]=INF;
	dp[0]=0;
	for(ll i=0;i<n;i++){
		for(ll j=i+1;j<=i+k;j++){
			if(j<n) dp[j]=min(dp[j],abs(a[i]-a[j])+dp[i]);
		}
	}
	cout<<dp[n-1];
}

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

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define irep(i,a,n) for(int i = a;i < (int)(n);i++)
using namespace std;
typedef long long ll;

int main(){
    int K, X;
    cin >> K >> X;

    int start = max(-1000000,X-K+1);
    int end = min(1000000,X+K-1);

    for(int i = start;i <= end;i++){
        cout << i << " ";
    }
}

Measured memory_bytes: 256
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		String s = sc.next();
		
		char s1 = s.charAt(0);
		char s2 = s.charAt(1);
		char s3 = s.charAt(2);
		
		if(s1 != s2 && s1 != s3 && s2 != s3) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
}

Measured memory_bytes: 21204
#include <stdio.h>

int main(void){
	char number[1001];
	char *np;
	int i,sum;
	np = number;

	while(1){
		scanf("%s", number);
		if(number[0] == '0'){
			return 0;
		}

		i = 0;
		sum = 0;

		while(1){
			sum += *(np+i) - '0';
			i++;
			if(*(np+i) == '\0' || i > 1001){
				break;
			}
		}
		printf("%d\n", sum);
	}

	return 0;
}

Measured memory_bytes: 536
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define __ ios_base::sync_with_stdio(0);cin.tie(0);
#define fi first
#define se second
#define pb push_back
#define all(x) x.begin(),x.end()
#define forn(i,a,n) for(int i=a; i < n; i++)
typedef long long int lli;
typedef long double Double;
typedef pair<lli,lli> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
const int mod = 1e9+7;
const int maxn = 1e5+5;

int main(){__
	int n;
	cin >> n;
	vector<string> v = {"AC","WA", "TLE","RE"};
	vector<int> cont(4);
	for(int i=0;i < n; i++){
		string s;
		cin >> s;
		for(int j=0; j < 4; j++){
			if(s == v[j]){
				cont[j]++;
				break;
			}
		}
	}
	for(int i=0; i < 4; i++){
		cout << v[i] << " x " << cont[i] << endl;
	}
}


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

int main(){
    int n, x, t;
    cin >> n >> x >> t;
    int ans = 0;
    if(n%x==0){
        ans = t* (n/x);
    }else{
        ans = t*(n/x +1);
    }
    cout << ans << endl;
    return 0;
}

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

const int mod = 1000000007;
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const { return pow(mod-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

int main() {
	int s;
	cin >> s;
	vector<mint> cnt(s+1,0);
	cnt[0]=1;
	for(int n = 1;n <= s;n++) {
		if (n >= 3) {
			cnt[n] = cnt[n-1]+cnt[n-3];
		}
	}

	cout << cnt[s] << endl;
	return 0;
}

Measured memory_bytes: 3616
import java.io.File;
import java.io.IOException;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.List;
import java.util.Scanner;

public class Main {
 
	public static void main(String[] args) throws IOException {
		//File file = new File("input.txt");
		//Scanner in = new Scanner(file);
		
		Scanner in = new Scanner(System.in);
		
		int A = in.nextInt();
		int B = in.nextInt();
		int C = in.nextInt();
		int AB = A % B;
		
		for(int i = 1; i <= B; i++){
			if(AB * i % B == C){
				System.out.println("YES");
				return;
			}
		}
		System.out.println("NO");
	}
}


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

int main(void){
    int n, w = 0, r = 0, ans;
    string s;
    cin >> n >> s;
    for(int i = 0; i < n; i++){
        if(s[i] == 'R') r++;
    }
    ans = r;
    for(int i = 0; i < n; i++){
        ans = min(max(w, r), ans);
        if(s[i] == 'W') w++;
        else r--;
    }
    ans = min(max(w, r), ans);
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 3692
w = int(input().rstrip())
n = int(input().rstrip())

amida = [i for i in range(w)]

for i in range(n):
    a = input().rstrip().split(",")
    number = [int(i) - 1 for i in a]
    amida[number[0]], amida[number[1]] = amida[number[1]], amida[number[0]]

for i in amida:
    print(i + 1)

Measured memory_bytes: 5600
import java.util.Scanner;

public class Main {

	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		String[] c = new String[3];
		for (int i = 0; i < 3; i++)
			c[i] = sc.next();
		sc.close();

		StringBuilder s = new StringBuilder();
		for (int i = 0; i < 3; i++)
			s.append(c[i].charAt(i));
		System.out.println(s);
	}
}

Measured memory_bytes: 20564
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  long long H,W;
  cin>>H>>W;
  if(H==1||W==1){
    cout<<1<<endl;
  }
  else if(H*W%2==1){
    cout<<(H*W+1)/2<<endl;
  }
  else{
    cout<<H*W/2<<endl;
  }
}

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

int main() {
	int a, b, c,ans=0,tmp1;
	cin >> a >> b >> c;
	vector<int> n = { a,b,c }, tmp = { a,b,c };
	sort(n.begin(), n.end());
	sort(tmp.begin(), tmp.end());
	ans = n.at(2) - n.at(1);
	tmp.at(0) += ans;
	tmp.at(1) += ans;
	tmp1 = (tmp.at(2) - tmp.at(0)) / 2;
	ans += tmp1;
	tmp.at(0) += tmp1 * 2;
	if (tmp.at(0) == tmp.at(1) && tmp.at(0) == tmp.at(2)) {
		cout << ans << endl;
	}
	else if (tmp.at(0) + 2 == tmp.at(2)) {
		cout << ans + 1 << endl;
	}
	else if (tmp.at(0) + 1 == tmp.at(2)) {
		cout << ans + 2 << endl;
	}
}

Measured memory_bytes: 3600
package main

import (
	"bufio"
	"fmt"
	"io"
	"log"
	"os"

	"strconv"
	"strings"
)

func Run(in io.Reader, out io.Writer) error {
	sc := bufio.NewScanner(in)
	sc.Scan()
	txt := sc.Text()
	l := strings.Split(txt, " ")
	a, _ := strconv.ParseInt(l[0], 0, 64)
	b, _ := strconv.ParseInt(l[1], 0, 64)

	if (a*b)%2 == 0 {
		fmt.Fprint(out, "Even\n")
	} else {
		fmt.Fprint(out, "Odd\n")
	}

	return nil
}

func main() {
	err := Run(os.Stdin, os.Stdout)

	if err != nil {
		log.Fatal(err)
	}
}


Measured memory_bytes: 640
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func readInt() int {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return i
}

func readString() string {
	sc.Scan()
	return sc.Text()
}

func readFloat64() float64 {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return float64(i)
}

func main() {
	sc.Split(bufio.ScanWords)
	l := readFloat64()

	k := l / 3.0
	fmt.Printf("%.12f", k*k*k)
}


Measured memory_bytes: 640
n,y = map(int, input().split())

for i in range(min(y//10000, n)+1):
    total = y - i * 10000
    for j in range(min(total//5000, n-i)+1):
        left = total - j * 5000
        if (left // 1000) == (n - i - j) and left % 1000 == 0:
            print("{} {} {}".format(i,j,n-i-j))
            exit()

print("-1 -1 -1")

Measured memory_bytes: 3060
import java.util.Scanner;


public class Main {


	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		
		int[] num = new int[52];
		String[] mark = new String[52];

		int[] s = new int[14];
		int[] h = new int[14];
		int[] c = new int[14];
		int[] d = new int[14];

		for(int i=1;i<=13;i++){
			s[i]=i;
			h[i]=i;
			c[i]=i;
			d[i]=i;
		}


		for(int i=0;i<n;i++){
			mark[i]=scan.next();
			num[i]=scan.nextInt();
		}

		for(int i=0;i<n;i++){
			if(mark[i].equals("S")) s[num[i]] = 0;
			if(mark[i].equals("H")) h[num[i]] = 0;
			if(mark[i].equals("C")) c[num[i]] = 0;
			if(mark[i].equals("D")) d[num[i]] = 0;
		}


		for(int i=1;i<=13;i++){
			if(s[i] !=0 )System.out.println("S "+s[i]);
		}
		for(int i=1;i<=13;i++){
			if(h[i] !=0 )System.out.println("H "+h[i]);
		}
		for(int i=1;i<=13;i++){
			if(c[i] !=0 )System.out.println("C "+c[i]);
		}
		for(int i=1;i<=13;i++){
			if(d[i] !=0 )System.out.println("D "+d[i]);
		}
	}

}

Measured memory_bytes: 26172
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, n) for (int i = (int)(n); i >= 0; i--)
#define REP(i, m, n) for (int i = (int)(m); i <= (int)(n); i++)
#define all(v) v.begin(), v.end()
typedef long long ll;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const long long INF = 1LL << 60;

int main(){
  int n, x, t;
  cin >> n >> x >> t;

  cout << (n + x - 1) / x * t << endl;

  return 0;
}


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

int main(){
  long long ans=0;
  int N,K;
  cin>>N>>K;
  vector<int> H(N);
  for(int i=0;i<N;i++){
    cin>>H.at(i);
  }
  sort(H.begin(),H.end());
  for(int i=0;i<N-K;i++){ans+=H.at(i);}
  cout<<ans;
}

Measured memory_bytes: 1152
#include <vector>
#include <iostream>
#include <string>

using namespace std;

int main()
{
  int r, D;
  vector<int> X(10);
  cin >> r >> D;
  int x;
  cin >> x;

  for(int i = 0;i < 10;++i)
  {
    int nextx = 0;
    nextx = r*x - D;
    X[i] = nextx;
    x = nextx;
  }

  for(int k = 0;k < X.size();k++)
  {
    cout << X[k] << endl;
  }

  return 0;
}

Measured memory_bytes: 256
import sys

class Node:
    __slots__ = ['key', 'left', 'right']
    def __init__(self, key):
        self.key = key
        self.left = self.right = None

root = None

def insert(key):
    global root
    x, y = root, None
    while x is not None: x, y = x.left if key < x.key else x.right, x
    if y is None: root = Node(key)
    elif key < y.key: y.left = Node(key)
    else: y.right = Node(key)

def inorder(node):
    return inorder(node.left) + f' {node.key}' + inorder(node.right) if node else ''
def preorder(node):
    return f' {node.key}' + preorder(node.left) + preorder(node.right) if node else ''

input()
for e in sys.stdin:
    if e[0] == 'i': insert(int(e[7:]))
    else: print(inorder(root)); print(preorder(root))


Measured memory_bytes: 63328
#include <bits/stdc++.h>
typedef long long ll;
#define  rep(i,a,b)for(long long i=a;i<b;++i)
#define  rrep(i,a,b)for(int i=a;i>=b;--i)
#define  yesno(flag)if(flag)cout<<"Yes"<<endl; else cout<<"No"<<endl;
using namespace std;
const ll INF=100000000000000LL;
const ll r197=1000000007;
typedef pair<ll,ll>P;
typedef pair<int,P>Pa;
bool Inframe(int a,int b,int c,int d,int h,int w){
	if(a+b>=0&&a+b<h&&c+d>=0&&c+d<w)return true;
	return false;
}
ll mypow(ll x,int m){
	if(m==0)return 1;
	if(m%2==0){
		int x2=mypow(x,m/2);
		return x2*x2;
	}else{
		int x2=mypow(x,m/2);
		return x2*x2*x;
	}
}
int n;

int main() {
	cin>>n;
	cout<<n*n<<endl;

	return 0;
}


Measured memory_bytes: 256
/**
*    created: 09.07.2020 00:49:06
**/
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// using bint = boost::multiprecision::cpp_int;
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pcnt(bit) __builtin_popcountll(bit)
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;}
const long double pi = acos(-1.0);
const int MAX = 1000010;
const int INF = 1LL << 60;
const int MOD = 1000000007;
// const int MOD = 998244353;

signed main() {

    cin.tie(0);
    ios_base::sync_with_stdio(false);

    string a, b;
    cin >> a >> b;
    int n = a.size();
    int m = b.size();
    rep(i,n+m) {
        if (i % 2 == 0) cout << a[i/2];
        else cout << b[i/2];
    }
    cout << endl;
    return 0;
}

Measured memory_bytes: 3660
#include<stdio.h>
int main(void){
	int alice=0,bob=0;

	scanf("%d %d",&alice,&bob);

	if(alice==bob){
	 printf("Draw\n");
	}else if(alice == 1){
		printf("Alice\n");
	}else if(bob == 1){
		printf("Bob\n");
	}else if(alice < bob){
		printf("Bob\n");
	}else if(alice >bob){
		printf("Alice\n");
	}

	return 0;
}

Measured memory_bytes: 128
/*input
3 4
1 2 3

*/ 
#include <iostream>
#include <bits/stdc++.h>
#include <math.h> 
    
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define gc getchar_unlocked
#define fo(i,n) for(ll i=0;i<n;i++)
#define Fo(i,k,n) for(ll i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define int long long
#define si(x)   scanf("%d",&x)
#define sl(x)   scanf("%lld",&x)
#define ss(s)   scanf("%s",s)
#define pi(x)   printf("%d\n",x)
#define pl(x)   printf("%lld\n",x)
#define ps(s)   printf("%s\n",s)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
#define ms(a,x) memset(a, x, sizeof(a));
#define endl "\n"
typedef pair<int, int>  pii;
typedef vector<int>     vi;
typedef vector<pii>     vpii;
typedef vector<vi>      vvi;
int mpow(int base, int exp); 
void ipgraph(int m);
void dfs(int u, int par);
const int mod = 1000000007;
const int N = 1000000001;
const int MAX = 1e5+1;

int32_t main() {
    IOS;
	string s;cin>>s;
	if(s=="ABC")cout<<"ARC"<<endl;
	else cout<<"ABC"<<endl;
	return 0;
}






Measured memory_bytes: 3608
#include<bits/stdc++.h>
#define int long long
#define endl "\n"
using namespace std;

int32_t main(){

    int n;  cin>>n;
    vector<int> w(n,0);
    int sum1 = 0 , sum2 = 0;
    for(int x=0;x<n;x++){
        cin>>w[x];
        sum2+=w[x];
    }

    int ans = INT16_MAX;

    for(int x=0;x<n;x++){
        sum1+=w[x] , sum2-=w[x];
        int val = abs(sum2-sum1);
        ans = min(ans , val);
    }

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

Measured memory_bytes: 256