akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define uni(e) e.erase(unique(e.begin(),e.end()),e.end())
#define double long double
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; }
int INF=1e10;
int MOD=1e9+7;
signed main(){
int a,b,c,d;
cin>>a>>b>>c>>d;
bool e=1;
rep(i,110){
if(c>0&&a<=0){
e=0;
  break;
}
  c-=b;
  a-=d;
}
if(e)
  cout<<"Yes";
else
  cout<<"No";
}

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

int main() {
	int A[5][4][11],n;
	for (int i = 1; i <= 4; i++)
		for (int j = 1; j <= 3; j++)
			for (int k = 1; k <= 10; k++)A[i][j][k] = 0;

	cin >> n;
	for (int i = 0; i < n; i++) {
		int b, f, r, v;
		cin >> b >> f >> r >> v;
		A[b][f][r] += v;
	}

			for (int f = 1; f <= 4; f++) {
				if (f> 1)cout << "####################\n";
				for (int b = 1; b <= 3; b++) {
				for (int r = 1; r <= 10; r++) {
				cout << " " << A[f][b][r];
			}
			cout << endl;
		}
	}
	return 0;
}

Measured memory_bytes: 3060
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using static MyIO;


public class A
{
	public static void Main()
	{
		int N = GetInt();
		int K = GetInt();
		int max = N - K + 1;
		Console.WriteLine((K == 1) ? 0 : max - 1);
	}
}


public static class MyIO
{
	private static string[] args = null;
	private static int num = -1;
	private static int used = -1;

	private static string getArg()
	{
		if(used == num)
		{
			args = Console.ReadLine().Split(' ');
			num = args.Length;
			used = 0;
		}
		return args[used++];
	}

	public static int GetInt(){ return int.Parse(getArg()); }
	public static long GetLong(){ return long.Parse(getArg()); }
	public static double GetDouble(){ return double.Parse(getArg()); }
	public static string GetString(){ return getArg(); }
}

Measured memory_bytes: 13140
N, A, B = map(int, input().split())
S = input()

now = 0
overseas = 0

for c in S:
    if c == "a":
        if now < A + B:
            print("Yes")
            now += 1
        else:
            print("No")
    if c == "b":
        overseas += 1
        if now < A + B and overseas <= B:
            print("Yes")
            now += 1
        else:
            print("No")
    if c == "c":
        print("No")


Measured memory_bytes: 4016
#include<iostream>
#include<vector>
using ll = long long;

int main(){
    int A, B, C, X, Y;
    std::cin >> A >> B >> C >> X >> Y;
    
    ll min_cost = 0;
    int A1useC = 1, B1useC = 1, C1useC = 1;
    ll A1piece, B1piece, AB1piece;
    if(A > 2 * C){
        A1piece = 2 * C;
    }else{
        A1piece = A;
        A1useC = 0;
    }
    if(B > 2 * C){
        B1piece = 2 * C;
    }else{
        B1piece = B;
        B1useC = 0;
    }
    if(A + B > 2 * C){
        AB1piece = 2 * C;
    }else{
        AB1piece = A + B;
        C1useC = 0;
    }


    int xymin = std::min(X, Y);
    min_cost += xymin * AB1piece;
    if(X > Y){
        min_cost += (X - xymin) * A1piece;
    }else if(X < Y){
        min_cost += (Y - xymin) * B1piece;
    }

    std::cout << min_cost << std::endl;
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
 
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
 
#define start_routine() int begtime = clock();
#define end_routine() int endtime = clock(); cerr << endl << "Time elapsed: " << (endtime - begtime)*1000/CLOCKS_PER_SEC << " ms"; return 0
#define speed() cin.tie(0), cout.tie(0), ios_base::sync_with_stdio(false)
// #define exit(a, b) return cout << a, b;
 
// debugger
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#define debug(stuff) cout << #stuff << ": " << stuff <<endl
#define debugc(stuff) cout << #stuff << ": "; for(auto x: stuff) cout << x << " "; cout << endl;
// 
 
#define loop(i,a,b) for(ll i=a;i<b;i++)
#define all(v) v.begin(), v.end() 
 
#define print(stuff) cout << stuff << endl
#define printc(stuff) for(auto x: stuff) cout << x << " "; cout << endl;
#define printPrec(stuff) cout << fixed << setprecision(15) << stuff << endl;
#define len length
#define ret0 return 0
#define ret return 
 
 
#define ll long long
#define ld long double
#define fi first
#define endl '\n'
#define se second
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define fill(ar, x) memset(ar, x, sizeof ar)
 
#define vl vector<ll> 
#define sl set<ll>
#define pll pair<ll, ll>
#define mll map<ll, ll> 
#define pq priority_queue<ll>
 
// typedef tree<ll,null_type,less<ll>,rb_tree_tag,
// tree_order_statistics_node_update> indexed_set;
 
#define inf (long long int) 1e18
#define eps 0.000001
#define mod 1000000007
#define mod1 998244353
#define MAXN (ll)2e5+5
#define N (1ll<<10)

void solve(){
    string s;
    cin>>s;
    reverse(all(s));
    ll n = s.len();
    ll a[n];
    ll ten[n];
    ten[0] = 1;
    loop(i,1,n){
        ten[i] = (ten[i-1] * 10)%2019;
    }
    for(ll i=0; i<n; i++){
        a[i] = ((s[i]-'0') * ten[i])%2019; 
    }
    ll ps[n];
    ps[0] = a[0];
    loop(i,1,n){
        ps[i] = (ps[i-1] + a[i])%2019;
    }
    // printc(ps);
    ll ans = 0;
    ll f[2019] = {0};

    for(ll i=0; i<n; i++){
        f[ps[i]]++;
    }

    ll x[2019] = {0};
    for(ll i=0; i<n; i++){
        x[ps[i]]++;
        ll val1 = 0, val2 = 0;
        if(i > 0) val1 = ps[i-1];
        ans += f[val1] - x[val1];
    }

    print(ans);
}
 
int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
  
 
    ll t = 1;
    // cin>>t;
    while(t--){
        solve();
    }
        
   
}


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

int GCD(int a, int b) {
    if (a > b) swap(a, b);
    if (b%a == 0) return a;
    return GCD(b%a, a); 
}
int main() {
    int N;
    cin >> N;
    int A[N+1];
    for (int i = 1; i <= N; i++) cin >> A[i];
    int result = A[1];
    for (int i = 2; i <= N; i++) result = GCD(result, A[i]);
    cout << result << endl;
}

Measured memory_bytes: 640
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=0;(i)<(n);i++)
#define INF 1001001001
#define LLINF 1001001001001001001
#define MOD 1000000007
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; }
#define ALL(v) v.begin(), v.end()
typedef long long ll;


int main(){

int a ,b;
cin >> a >> b;

if(9<a or 9<b)cout << -1 << endl;
else cout << a*b << endl;



return 0;
}



Measured memory_bytes: 256
require 'prime'

n, m = gets.strip.split.map(&:to_i)
MOD = 10**9+7

dims = m.prime_division.map(&:last)

def power(n, k)
  return 1 if k.zero?
  if k.even?
    power(n, k/2)**2 %MOD
  else
    n*power(n, (k-1)/2)**2 %MOD
  end
end

maximum = n+(dims.max || 0)
@factor = [1,1]
(2..maximum).each do |i|
  @factor[i] = @factor[i-1] * i
  @factor[i] %= MOD
end

@ifactor = [1,1]
@ifactor[maximum] = power(@factor[maximum], MOD-2)
(maximum-1).downto(2).each do |i|
  @ifactor[i] = @ifactor[i+1]*(i+1)
  @ifactor[i] %= MOD
end

result=1
dims.each do |d|
  # (n+d)C(d)
  comb = (@factor[n+d-1]*(@ifactor[n-1]*@ifactor[d]%MOD)%MOD)
  result *= comb
  result %= MOD
#p [n, d, comb, @factor[n+d-1], @ifactor[n-1], @ifactor[d]]
end

p result



Measured memory_bytes: 3660
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
k = int(input())

x = min(a, b, c, d, e)
y = max(a, b, c, d, e)
if (y - x) <= k:
    print('Yay!')
else:
    print(':(')


Measured memory_bytes: 3060
using System;
using System.Collections.Generic;
using static Assistant.Input;
using System.Linq;
using Assistant;

namespace ABC150B
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = ReadInt;
            var S = Console.ReadLine();

            string match = "ABC";
            int count = 0;
            for (int i = 0; i <= S.Length - 3; i++)
            {
                string a = S.Substring(i, 3);
                if (match == a) count++;
            }
            Console.WriteLine(count);



        }


    }


}

namespace Assistant
{
    static class Input
    {
        static List<string> line = new List<string>();
        static int index = 0;
        static String ReadNext()
        {
            if (line.Count <= index) line.AddRange(Console.ReadLine().Split());
            return line[index++];
        }
        public static int ReadInt => int.Parse(ReadNext());
        public static long ReadLong => long.Parse(ReadNext());
        public static int[] ReadInts => Console.ReadLine().Split().Select(int.Parse).ToArray();
        public static long[] NextLongs => Console.ReadLine().Split().Select(long.Parse).ToArray();
    }

    static class Debug
    {
        //drawmap
        //drawarray
    }
}


Measured memory_bytes: 11220
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <limits.h>
#include <queue>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
#define REP(i, n) for(int i=0; i<n; i++)
const int MAX_N  = 100100;
const ll MOD = 1e9+7;

ll T[MAX_N];
ll A[MAX_N];
ll H[MAX_N];
int main(){
    int N;
    cin >> N;
    REP(i,N){
        ll t;
        cin >> t;
        T[i] = t;
    }
    REP(i,N){
        ll a;
        cin >> a;
        A[i] = a;
    }

    bool valid = true;
    ll last = T[0];
    H[0] = T[0];
    for(int i = 1; i < N; i++){
        ll h = T[i];
        if(h > last) H[i] = h;
        last = h;
    }

    last = A[N-1];
    if(H[N-1] != 0 && H[N-1] != A[N-1]) valid = false;
    else H[N-1] = A[N-1];
    for(int i = N-2; i >= 0; i--){
        ll h = A[i];
        //if(h > last){
        //    if(H[i] != 0 && H[i] != h) valid = false;
        //    else H[i] = h;
        //}
        if(H[i] > 0){
            if(h < H[i]) valid = false;
            if(h > last && h != H[i]) valid = false;
        }
        if(h > last){
            H[i] = h;
        }
        last = h;
    }

    if(!valid){
        cout << 0 << endl;
        return 0;
    }

    ll ans = 1;
    REP(i,N){
        if(H[i] == 0){
            ans *= min(A[i], T[i]);
            ans %= MOD;
        }
    }

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


Measured memory_bytes: 2560
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int H = scanner.nextInt();
        int W = scanner.nextInt();
        scanner.nextLine();//Tricky

        String[][] S = new String[W][H];

        for (int i = 0; i < H; i++) {
            String[] inputArray = scanner.nextLine().split("");
            for (int j = 0; j < W; j++) {
                S[j][i] = inputArray[j];
            }
        }

        for (int i = 0; i < H; i++) {
            for (int j = 0; j < W; j++) {
                if ("#".equals(S[j][i])) {
                    System.out.print(S[j][i]);
                    continue;
                }
                System.out.print(getBombCount(S, j, i));
            }
            System.out.println();
        }
    }

    private static int getBombCount(String[][] S, int i, int j) {
        int count = 0;
        if (isEuqls(S, i-1, j-1)) count++;
        if (isEuqls(S, i, j-1)) count++;
        if (isEuqls(S, i+1, j-1)) count++;
        if (isEuqls(S, i-1, j)) count++;
        if (isEuqls(S, i+1, j)) count++;
        if (isEuqls(S, i-1, j+1)) count++;
        if (isEuqls(S, i, j+1)) count++;
        if (isEuqls(S, i+1, j+1)) count++;
        return count;
    }

    private static boolean isEuqls(String[][] S, int i, int j) {
        try {
            return "#".equals(S[i][j]);
        } catch (Exception e) {
            return false;
        }
    }
}

Measured memory_bytes: 24404
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
typedef pair<ll,double> P;
typedef tuple<ll,ll,ll> T;
const long long INF = 1LL<<60;
const int MOD = 1000000000+7;
#define rev(s) (string((s).rbegin(), (s).rend()))
template < typename T > inline string toString( const T &a ) { ostringstream oss; oss << a; return oss.str(); };
// cout << fixed << setprecision(10) << ans << endl; 有効桁数指定
// *min_element(c + l, c + r) *max_element(c + l, c + r) 配列の中のmin-max
// int dx[8]={1,1,0,-1,-1,-1,0,1};
// int dy[8]={0,1,1,1,0,-1,-1,-1};
// int dx[4]={1,0,-1,0};
// int dy[4]={0,1,0,-1};
// ~ は、-1の時だけfalse

ll dp[100005][2];

int main() {
    string s;cin>>s;
    int n = s.size();
    // dp[1][1]=2;
    // dp[2][0]=2;
    dp[0][1] = 1;
    rep(i,n) {
        dp[i+1][0] += dp[i][0] * 3;
        dp[i+1][0] %= MOD;
        if(s[i]=='1') {
            dp[i+1][0] += dp[i][1];
            dp[i+1][0] %= MOD;
            dp[i+1][1] += dp[i][1] * 2;
            dp[i+1][1] %= MOD;
        } else {
            dp[i+1][1] += dp[i][1];
            dp[i+1][1] %= MOD;
        }
    }
    cout << (dp[n][0] + dp[n][1]) % MOD <<endl;
}

Measured memory_bytes: 5312
H,W,D = [ int(it) for it in input().split() ]
li = [ [ int(it)-1 for it in input().split() ] for i in range(H) ]

pos = [0]*(H*W)
for h in range(H):
  for w in range(W):
    pos[li[h][w]]=(h,w)
    
di = [0]*(H*W)
for i in range(H*W):
  if (D<=i):
    sx,sy=pos[i-D]
    gx,gy=pos[i]
    di[i]=di[i-D]+abs(sx-gx)+abs(sy-gy)
    
Q = int(input())
for i in range(Q):
  l,q=[ int(it)-1 for it in input().split() ]
  print ( di[q]-di[l] )


Measured memory_bytes: 17892
n,d=map(int,input().split())
x=[list(map(int,input().split()))for i in range(n)]
sqrt={ii**2 for ii in range(200)}
ans=0
for i in range(n):
        for j in range(i+1,n):
                sum=0
                for k in range(d):
                        sum+=(x[i][k]-x[j][k])**2
                if sum in sqrt:
                        ans+=1
print(ans)


Measured memory_bytes: 3060
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <queue>
#include <vector>
#include <cmath>
#include <stack>
#include <map>
#include <set>
#define pi acos(-1)
#define LL long long
#define INF 0x3f3f3f3f
using namespace std;
typedef pair<int, int> P;
const int maxn = 1e5 + 5;

struct edge
{
    int a, b;
    double len;
}fenc[maxn];
struct Point
{
    int x, y;
}p[maxn];
double cal(int a, int b)
{
    double x = p[a].x*1.0 - p[b].x*1.0;
    double y = p[a].y*1.0 - p[b].y*1.0;
    return sqrt(x*x + y*y);
}
int cmp(edge a, edge b)
{
    if (a.len > b.len) return 1;
    return 0;
}
int ret[maxn];
int find(int a)
{
    if (ret[a] == -1) return a;
    return ret[a] = find(ret[a]);
}
int main(void)
{
//	freopen("C:\\Users\\wave\\Desktop\\NULL.exe\\NULL\\in.txt","r", stdin);
    int n, m, i, j, k, a, b;
    double ans;
    while (cin >> n >> m)
    {
        for (i = 1; i <= n; i++)
            scanf("%d %d", &p[i].x, &p[i].y);
        for (i = 1; i <= m; i++){
            scanf("%d %d", &a, &b);
            fenc[i].a = a;
            fenc[i].b = b;
            fenc[i].len = cal(a, b);
        }
        sort(fenc+1, fenc+1+m, cmp);
        memset(ret, -1, sizeof(ret));
        ans = 0;
        for (i = 1; i <= m; i++){
            int x = find(fenc[i].a);
            int y = find(fenc[i].b);
            if (x == y)
                ans += fenc[i].len;
            else ret[x] = y;
        }
        printf("%.3f\n", ans);
    }

    return 0;
}

Measured memory_bytes: 2192
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
using P = pair<int,int>;
using pq = priority_queue<int>;
typedef long long ll;
typedef long double ld;
#define pi 3.14159265358979

int  main()
{
	int n; cin >> n;
	vector<int> a(n);
	int f = 0;
	int w = 0;
	rep(i, n)
	{
		cin >> a[i];
		if (a[i] % 4 == 0)
			f++;
		else if (a[i] % 2 == 0)
			w++;
	}

	int sum = f + (w / 2);
	if (f >= n/2)
		cout << "Yes" << endl;
	else if (w == n)
		cout << "Yes" << endl;
	else if (f >= (n-w+1)/2)
	{
		cout << "Yes" << endl;
	}
	else
		cout << "No" << endl;
	return 0;
}

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

int main() {
    int cnt[26] = { 0 };
    for(char ch; cin >> ch; ) {
        if(isalpha(ch)) {
            if(isupper(ch)) ch = tolower(ch);
            cnt[ch - 'a']++;
        }
    }
    for(int i = 0; i < 26; i++) {
        cout << (char)('a' + i) << " : " << cnt[i] << endl;
    }
}


Measured memory_bytes: 3092
//g++ -std=c++14 test.cpp -o test.out

#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <cassert>
#include <algorithm>
#include <functional>
#include <iostream>
#include <iomanip>
#include <vector>
#include <queue>
#include <map> 
#include <utility>
#include <limits.h>
#include <bitset>
#include <set>
using namespace std;
 
#define LL long long int
const LL INF = (1LL<<60);
const int INF_INT = 2147483647-1e6-1;
const LL mod = 1000000007ll;
const int mod_int = 1000000007;

string S;

LL ans = INF;

void solve(){
	int N = S.size();
	for(char al='a';al<='z';al++){
		LL counter = 0;
		for(int i=0;i<N;){
			int j=i;
			while(S[j]!=al && j<N) j++;
			counter = max(counter,(LL)(j-i));
			i = j+1;
		}
		ans = min(ans,counter);
	}
}
 
int main(){
    cin >> S;
 
    solve();

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

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

int main() {
	vector<int> vec(3); int n; cin >> n;
	auto f_pow = [](int& temp) { temp = pow(temp, 2); };
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 3; j++) cin >> vec[j];
		sort(vec.begin(), vec.end());
		for_each(vec.begin(), vec.end(), f_pow);
		if (vec[0] + vec[1] == vec[2]) cout << "YES" << endl;
		else cout << "NO" << endl;
	}
	return 0;
}


Measured memory_bytes: 3052
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int R=sc.nextInt();
		sc.close();
		if(R<1200) {
			System.out.println("ABC");
		}
		else if(R>=1200&&R<2800) {
			System.out.println("ARC");
		}
		else {
			System.out.println("AGC");
		}
	}
}


Measured memory_bytes: 21588
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define stoi stoll
using pii=pair<int,int>;
using vi = vector<int>;
using vvi = vector<vi>;
#define all(c) begin(c),end(c)
#define rall(c) rbegin(c),rend(c)
#define fore(x,c) for(auto &&x:c)
#define rep(i,a,n) for(int i=a,i##len=(int)(n);i<i##len;++i)
#define rrep(i, a, n) for(int i=(int)(n-1);i>=a;--i)
#define sz(c) ((int)c.size())
#define contains(c,x) (c.find(x)!=end(c))
#define inseg(l,x,r) ((l)<=(x)&&(x)<(r))
#define dump(...)
#define pb push_back
#define _ 0
const signed INF_=1001001001; const long long INF=1001001001001001001LL;
const int DX[9]={0,1,0,-1,1,1,-1,-1,0},DY[9]={-1,0,1,0,-1,1,1,-1,0};
template<class T> ostream& operator<<(ostream &os,const vector<T> &v) {
    for (auto i = begin(v); i != end(v); i++) os<<*i<<(i==end(v)-1?"":" ");return os;}
template<class T> istream& operator>>(istream &is,vector<T> &v) {
    for (auto i = begin(v); i != end(v); i++) is>>*i;return is;}
template<class T,class U> istream& operator>>(istream &is, pair<T,U> &p) {
    is>>p.first>>p.second;return is;}
template<class T, class U> bool chmax(T &a,const U &b){return a<b?a=b,1:0;}
template<class T, class U> bool chmin(T &a,const U &b){return a>b?a=b,1:0;}
template <class T> void psum(T& c) {partial_sum(begin(c), end(c), begin(c));}
template<class T> using heap=priority_queue<T,vector<T>,greater<T>>;
struct before_main_function {
    before_main_function() {
        cin.tie(nullptr); ios::sync_with_stdio(0);
        cout << setprecision(15) << fixed;
        // #define endl "\n"
    }
} before_main_function;
//------------------8<------------------------------------8<--------------------

signed main() {
    int A, B;
    string S;
    cin >> A >> B >> S;
    bool ok = S[A] == '-';
    rep(i, 0, A) {
        ok &= ('0' <= S[i] && S[i] <= '9');
    }
    rep(i, 0, B) {
        ok &= ('0' <= S[i + A + 1] && S[i + A + 1] <= '9');
    }
    cout << (ok ? "Yes" : "No") << endl;
    return (0^_^0);
}



Measured memory_bytes: 256
#include<bits/stdc++.h>
#define REP(i,n) for(int i=0,i##_len=int(n);i<i##_len;++i)
#define rep(i,a,b) for(int i=int(a);i<int(b);++i)
#define All(x) (x).begin(),(x).end()
#define rAll(x) (x).rbegin(),(x).rend()
using namespace std;
using ll = long long;

int main(){
    int N;cin>>N;
    vector<char> S(N);
    REP(i,N) cin>>S[i];
    map<char,int> mp;
    REP(i,N) mp[S[i]]++;
    if(mp.size()==3) cout<<"Three"<<endl;
    else cout<<"Four"<<endl;
}


Measured memory_bytes: 256
package main

import (
	"fmt"
	//"math"
	//"strings"
)

func main() {
	var a,b int
	fmt.Scan(&a,&b)

	for i:=0;i<20;i++{
		if(i *(a-1) +1 >= b){
			fmt.Print(i)
			return
		}
	}
}

Measured memory_bytes: 512
package main

import "fmt"

func main() {
	var N int
	fmt.Scanf("%d", &N)

	prime := make(map[int]int)
	if N == 1 {
		fmt.Println(0)
		return
	}
	for i := 2; i*i <= N; i++ {
		for N%i == 0 {
			N /= i
			prime[i]++
		}
	}
	if N != 1 {
		prime[N]++
	}
	count := 0
	for _, vv := range prime {
		if vv == 1 {
			count++
			continue
		}
		v := vv
		for i := 1; i < vv; i++ {
			v -= i
			if v >= 0 {
				count++
			} else {
				break
			}
		}
	}
	fmt.Println(count)
}


Measured memory_bytes: 1836
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
int main()
{
	int t;
     t=1;
	while(t--)
	{
       string s;
       cin>>s;
       int sum=0;
       for(int i=0;i<s.size();i++)
       {
       	sum=sum+(s[i]-'0');
       	if(sum%9==0)
       	{
       		sum=0;
       	}
       }
       if(sum%9==0)
       {
       	cout<<"Yes"<<endl;
       }
       else
       {
       	cout<<"No"<<endl;
       }

	}
}

Measured memory_bytes: 3720
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception {
	    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

	    String line = br.readLine();
	    double r = Double.parseDouble(line);

	    double area = Math.PI * r * r;
	    double length = 2 * Math.PI * r;

	    System.out.println(String.format("%.6f", area) + " " + String.format("%.6f", length));

	}
}

Measured memory_bytes: 24736
#include <cstdio>

int n,a[1000000],b[1000000],m;

int main()
{
    scanf("%d",&n);
    for(int i=0;i<n;i++)
        scanf("%d",&a[i]);
    for(int i=0;i<n;i++)
    {
        b[n+m]=a[i];
        if(m==0) m++;
        else if(m>0) m=(-m);
        else m=-(m)+1;
    }
    if(n%2==1)
    for(int i=n-n/2;i<2*n-n/2;i++)
        printf("%d ", b[i]);
    else
    for(int i=2*n-n/2;i>=n-n/2+1;i--)
        printf("%d ", b[i]);
}


Measured memory_bytes: 7040
import java.util.Scanner;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		if( n<=52 ){
			int a[][] = new int[4][13];
			for( int i=0; i<4; i++ ){
				for( int j=0; j<13; j++ ){
					a[i][j] = 0;
				}
			}
			String pic;
			int rank;
			for( int i=0; i<n; i++ ){
				pic = sc.next();
				rank = sc.nextInt();
				if(pic.equals("S")){
					a[0][rank-1] = 1;
				} else if(pic.equals("H")){
					a[1][rank-1] = 1;
				} else if(pic.equals("C")){
					a[2][rank-1] = 1;
				} else if(pic.equals("D")){
					a[3][rank-1] = 1;
				} else{
				}
			}
			for( int i=0; i<4; i++ ){
				for( int j=0; j<13; j++ ){
					if( a[i][j] == 0 ){
						switch (i){
							case 0: System.out.print( "S " ); break;
							case 1: System.out.print( "H " ); break;
							case 2: System.out.print( "C " ); break;
							case 3: System.out.print( "D " ); break;
						}
						System.out.println( (j+1) );
					}
				}
			}
		}
	}
}

Measured memory_bytes: 18260
# include <stdio.h>
# include <bits/stdc++.h>
using namespace std;
# define fi cin
# define fo cout
# define x first
# define y second
# define ll long long
# define IOS ios_base :: sync_with_stdio(0);cin.tie(0)
# define p(v) cerr << #v << " = " << v << '\n'
# define p2(v) cerr << #v << " = " << (complex < int > (v.x,v.y)) << '\n'
# define vi vector < int >
# define vll vector < ll >
# define pii pair < int , int >
# define mp make_pair
int main(void)
{
    #ifdef CF
    freopen("input","r",stdin);
    #endif // CF
    srand(time(0));
    fo << fixed << setprecision(7);
    cerr << fixed << setprecision(7);
    int l,r;
    int n;
    fi>>n>>l>>r;
    static int s[1 << 20];
    for (int i = 1;i <= n;++i)
        fi>>s[i];
    sort(s + 1,s + 1 + n);
    fo << n - (lower_bound(s + 1,s + 1 + n,r) - lower_bound(s + 1,s + 1 + n,l)) << '\n';
    return 0;
}

Measured memory_bytes: 256
cat<<EOF>Source.cpp
#include <iostream>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;

int max(int a,int b){
	return a>b?a:b;
}
int x[100000],y[100000],x_mod_k[100000],x_div_k[100000];
char s[100000][2];
int n,k;

void add(int*cnt,int x,int t){
	if((x_div_k[x]&1)==0){
		if(t==0){
			cnt[0]++;
			cnt[k-x_mod_k[x]]--;
		}
		else{
			cnt[k-x_mod_k[x]]++;
		}
	}
	else{
		if(t==0){
			cnt[k-x_mod_k[x]]++;
		}
		else{
			cnt[0]++;
			cnt[k-x_mod_k[x]]--;
		}
	}
}
int ans[2000];
int main(){
	scanf("%d%d",&n,&k);
	rep(i,n){
		scanf("%d%d%s",&x[i],&y[i],s[i]);
		x_mod_k[i]=y[i]%k;
		x_div_k[i]=y[i]/k;
	}
	int Max=0;
	#pragma omp parallel for num_threads(20)
	rep(i,k){
		int cnt[max(n,k)];
		rep(j,max(n,k))cnt[j]=0;
		rep(j,n){
			if(s[j][0]=='B'){
				if(((x[j]+i)/k)%2==0){
					add(cnt,j,0);
				}
				else{
					add(cnt,j,1);
				}
			}
			else{
				if(((x[j]+i)/k)%2==0){
					add(cnt,j,1);
				}
				else{
					add(cnt,j,0);
				}
			}
		}
		rep(j,k){
			if(j)cnt[j]+=cnt[j-1];
			ans[i]=max(ans[i],max(cnt[j],n-cnt[j]));
		}
	}
	rep(i,k)Max=max(Max,ans[i]);
	cout<<Max<<endl;
}
EOF
g++ -O3 Source.cpp -o Source -fopenmp -std=c++11
./Source

Measured memory_bytes: 46444
import math
N, D = map(int,input().split())
x = [0]*N
y = x[:]
for i in range(N):
    x[i], y[i] = map(int,input().split())

def dist(x,y):
    return math.sqrt(x*x+y*y)

ans = 0
for i in range(N):
    if dist(x[i],y[i]) <= D:
        ans += 1

print(ans)


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

using namespace std;

int main()
{
    double x1, y1, x2, y2, x3, y3, x4, y4;
     
    while (cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4) {
        if (x4 < x1 || x2 < x3 || y2 < y3 || y4 < y1) {
            cout << "NO" << endl;
        } else {
            cout << "YES" << endl;
        }
    }    
    return 0;
}

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

using namespace std;

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define all(x) (x).begin(), (x).end() 
#define MOD 1000000007

typedef long long ll;
typedef pair <int, int> ii;
typedef pair <ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef long double ld;

long long INF=LLONG_MAX;

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    //freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
	int a,b; cin >> a >> b;
	if(b==1){
		cout << 0 << endl;
		return 0;
	}
	int ptr = 1;
	b -= a;
	while(b>0){
		b -= a-1;
		ptr++;
	}
	cout << ptr << endl;
}	


Measured memory_bytes: 256
#include<stdio.h>
int main(){
    int x[10];
    scanf("%d%d%d%d%d",&x[0],&x[1],&x[2],&x[3],&x[4]);
    int i;
    for(i=0;i<5;i++){
        if(x[i]==0){
            printf("%d\n",i+1);
            break;
        }
        //printf("ok");
    }
    return 0;
}

Measured memory_bytes: 1688
// D - Cake 123
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rp(i,n) for(int i=0;i<(n);++i)

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

	vector<ll> A(X), B(Y), C(Z);
	rp(i,X) cin>>A[i];
	rp(i,Y) cin>>B[i];
	rp(i,Z) cin>>C[i];
	sort(A.rbegin(), A.rend());
	sort(B.rbegin(), B.rend());
	sort(C.rbegin(), C.rend());

	vector<ll> ABC;
	rp(a,X){
		if(a+1>K) break;// K data generated
		rp(b,Y){
			if((a+1)*(b+1)>K) break;// K data generated
			rp(c,Z){
				if((a+1)*(b+1)*(c+1)>K) break;// K data generated
				ABC.push_back(A[a]+B[b]+C[c]);
			}
		}
	}

	sort(ABC.rbegin(), ABC.rend());
	rp(i,K) cout<<ABC[i]<<"\n";
}

Measured memory_bytes: 1404
#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define x first
#define y second
using namespace std;
int L,n,nans,ans[70][3];
void pb(int a,int b,int c)
{
	ans[nans][0]=a;
	ans[nans][1]=b;
	ans[nans][2]=c;
	nans++;
}
int main()
{
	cin>>L;
	n=1;
	int cap=2;
	while (cap<=L) n++,cap*=2;
	int dig=1;
	for (int i=n;i>1;i--)
	{
		pb(i-1,i,0);
		pb(i-1,i,dig);
		dig*=2;
	}
	cap/=2;
	L-=cap;
	int v=cap;
	for (int i=2;i<=n;i++)
	{
		cap/=2;
		if (L>=cap)
		{
			pb(1,i,v);
			L-=cap;
			v+=cap;
		}
	}
	cout<<n<<" "<<nans<<endl;
	for (int i=0;i<nans;i++)
	{
		cout<<ans[i][0]<<" "<<ans[i][1]<<" "<<ans[i][2];
		if (i!=nans-1) cout<<endl;
	}
    return 0;
}

Measured memory_bytes: 256
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int h = sc.nextInt();
		int w = sc.nextInt();
		char[][] map = new char[h][w];
		for (int i = 0; i < h; i++) {
			map[i] = sc.next().toCharArray();
		}
		find(map, h, w);
		show(map, h, w);
	}

	private static void show(char[][] map, int h, int w) {
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < h; i++) {
			for (int j = 0; j < w; j++) {
				sb.append(map[i][j]);
			}
			sb.append("\n");
		}
		System.out.print(sb);
	}

	private static void find(char[][] map, int h, int w) {
		int[] dw = { -1, 0, 1, -1, 1, -1, 0, 1 };
		int[] dh = { 1, 1, 1, 0, 0, -1, -1, -1 };
		int ww, hh;
		char cnt = '0';
		for (int i = 0; i < h; i++) {
			for (int j = 0; j < w; j++) {
				if (map[i][j] == '#')
					continue;
				cnt = '0';
				for (int k = 0; k < 8; k++) {
					ww = dw[k] + j;
					hh = dh[k] + i;
					if (ww >= 0 && ww < w && hh >= 0 && hh < h) {
						if (map[hh][ww] == '#') {
							cnt++;
						}
					}
				}
				map[i][j] = cnt;
			}
		}
	}
}


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

int main() {
  int x, y;
  char op;

  while(true) {
    cin >> x >> op >> y;

    if(op == '+') {
      cout << x + y << endl;
    } else if(op == '-') {
      cout << x - y << endl;
    } else if(op == '*') {
      cout << x * y << endl;
    } else if(op == '/') {
      cout << x / y << endl;
    } else {
      break;
    }
  }
}

Measured memory_bytes: 3064
#include <algorithm>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;

typedef unsigned long long ul;
typedef long long ll;
typedef pair<ul, ul> P;
map<int, int> dp;
#define REP(i, n) for (int i = 0; i < n; i++)
ul H, W;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll K, A, B;
  cin >> K >> A >> B;
  if (B - A <= 2) {
    cout << K + 1 << endl;
    return 0;
  }
  if (K < A + 1) {
    cout << K + 1 << endl;
    return 0;
  }
  if ((K - A + 1) % 2 == 0) {
    cout << ((K - A + 1) / 2 * (B - A)) + A << endl;
  } else {
    cout << (K - A) / 2 * (B - A) + 1 + A << endl;
  }

  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(x) ((x).begin()),((x).end())
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimization ("unroll-loops")
#define usecppio ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using pii = pair<int, int>;
#define int ll
int dp[6030];
bool took[6030][3030];
int n, t, a[3030], b[3030];

inline void copy_took(int cur, int bef)
{
	memcpy(took[cur],took[bef],sizeof(took[cur]));
}
int32_t main()
{
	usecppio
	cin >> n >> t;
	for (int i = 1; i<=n; i++)
		cin >> a[i] >> b[i];
	for (int time = 0; time<=t+3000; time++)
	{
		if (time>0)
		{
			if (dp[time-1] > dp[time])
			{
				dp[time] = dp[time-1];
				copy_took(time,time-1);
			}
		}
		for (int ds = 1; ds<=n; ds++)
		{
			if (a[ds] > time) continue;
			if (time-a[ds] >= t) continue;
			if (took[time-a[ds]][ds]) continue;
			int u = b[ds] + dp[time-a[ds]];
			if (u > dp[time])
			{
				copy_took(time, time-a[ds]);
				dp[time] = u;
				took[time][ds] = 1;
			}
		}
	}
	int mm = 0;
	for (int i = 0; i<=t+3000; i++)
	{
		mm = max(mm, dp[i]);
	}
	cout << mm;
}

Measured memory_bytes: 18176
/**
 *   created: 01 September 2019  17:13:12
**/
#include<bits/stdc++.h>
using namespace std;

typedef vector<int> vi;
typedef pair<int , int> pii;
typedef vector< pair<int , int> > vii;
typedef long long ll;
typedef vector<long long> vl;
typedef pair<long long , long long> pll;
typedef vector< pair<long long , long long> > vll;

#define PB push_back
#define PPB pop_back
#define all(c) c.begin(),c.end()
#define rep(i,a,b) for(int i = (int)(a); i < (int)(b); i++)
#define rrep(i,a,b) for(int i = (int)(a-1); i>=(int)(b); i--)
#define INFLL 2000000000000000007
#define INF 2000000007
#define MOD 1000000007


#define TRACE

#ifdef TRACE
#define trace1(x)                cerr << #x << ": " << x << endl;
#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
#define trace6(a, b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;

#else

#define trace1(x)
#define trace2(x, y)
#define trace3(x, y, z)
#define trace4(a, b, c, d)
#define trace5(a, b, c, d, e)
#define trace6(a, b, c, d, e, f)

#endif


void optimizeIO()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
}

//                                        //AUTHOR: Kaushalesh Shukla

//=========================================================================================================

int main()
{
	optimizeIO();
	int tt=1;
	//cin>>tt;
	while(tt--){
		string s;
		cin>>s;
		string t;
		cin>>t;
		int res=0;
		rep(i,0,3)
			if(s[i]==t[i])
				res++;
		cout<<res;
	}
	return 0;
}


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

#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define RFOR(i,b,a) for(int i = (b) - 1; i >= (a); i--)
#define ITER(it, a) for(typeof(a.begin()) it = a.begin(); it != a.end(); it++)
#define FILL(a, value) memset(a, value, sizeof(a))

#define SZ(a) (int) a.size()
#define ALL(a) a.begin(),a.end()
#define PB push_back
#define MP make_pair

typedef long long LL;
typedef vector<int> VI;
typedef pair<int, int> PII;

const double PI = acos(-1.0);
const LL INF = 1000 * 1000 * 1000 + 7;
const LL LINF = INF * (LL)INF;

const int MOD = 998244353;

const int MAX = 10010;

int DP[MAX][MAX];

char buf[MAX];
int A[MAX];
int B[MAX];

LL F[MAX];

LL bpow(LL a, LL b)
{
	LL res = 1;
	while(b)
	{
		if (b & 1) res = (res * a) % MOD;
		b /= 2;
		a = (a * a) % MOD;
	}

	return res;
}

LL inv(LL a)
{
	return bpow(a, MOD - 2);
}

int main()
{
	//freopen("in.txt", "r", stdin);
	//ios::sync_with_stdio(false); cin.tie(0);

	F[0] = 1;
	FOR (i, 1, MAX)
	{
		F[i] = (F[i-1] * (LL)i) % MOD;
	}

	scanf("%s", buf);
	int n = strlen(buf);
	FOR (i, 0, n)
	{
		A[i] = buf[i] - '0';
	}

	scanf("%s", buf);
	FOR (i, 0, n)
	{
		B[i] = buf[i] - '0';
	}

	int x, y;
	x = y = 0;
	FOR (i, 0, n)
	{
		if (A[i] == 1 && B[i] == 1) x++;
		if (A[i] == 0 && B[i] == 1) y++;
	}

	DP[0][0] = 1;
	FOR (i, 0, x+1)
	{
		FOR (j, 0, y+1)
		{
			if (i == 0 && j == 0) continue;
			LL cur = 0;
			if (j)
			{
				LL c = j * j;
				c *= DP[i][j-1];
				cur += c;
			}

			if (i && j)
			{
				LL c = j;
				c *= DP[i-1][j];
				cur += c;
			}

			DP[i][j] = cur % MOD;
		}
	}

	LL C = 1;
	LL C2 = 1;

	LL N = x + y;

	LL res = 0;
	FOR (i, 0, x+1)
	{
		LL cur = DP[x - i][y];
		cur*= F[x - i];
		cur %= MOD;
		cur *= F[i];
		cur %= MOD;
		cur *= F[i];
		cur %= MOD;
		cur *= C;
		cur %= MOD;
		cur *= C2;
		res = (res + cur) % MOD;

		C = (C * (N - i)) % MOD;
		C = (C * inv(i + 1)) % MOD;

		C2 = (C2 * (x - i)) % MOD;
		C2 = (C2 * inv(i+1)) % MOD;
	}

	cout<<res<<endl;


}


Measured memory_bytes: 389760
S=list(map(int,input()))

p=0
q=0
if S[0]==1:
    if 0<=S[1] and S[1]<=2:
        p=1

if S[0]==0:
    if 1<=S[1] and S[1]<=9:
        p=1

if S[2]==1:
    if 0<=S[3] and S[3]<=2:
        q=1

if S[2]==0:
    if 1<=S[3] and S[3]<=9:
        q=1

if p==0 and q==1:
    print("YYMM")
elif p==1 and q==0:
    print("MMYY")

elif p==1 and q==1:
    print("AMBIGUOUS")
else:
    print("NA")

Measured memory_bytes: 3064
#include"bits/stdc++.h"
using namespace std;
typedef long long ll;
const ll MOD = (ll)(1e9+7);
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for(int (i)=0; (i)<(int)(n); (i)++)
int dx[4]={ 1,0,-1,0 };
int dy[4]={ 0,1,0,-1 };

string S;

signed main(){
    cin >> S;
    if(S.size()%2 == 1){
        cout << "No" << endl;
        return 0;
    }
    rep(i, S.size()){
        if(i%2 == 0 && S[i] != 'h'){
            cout << "No" << endl;
            return 0;
        }
        if(i%2 == 1 && S[i] != 'i'){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <regex>
#include <numeric>

using namespace std;


/*--- Macro ---*/
#define rep(i, n) for(int i=0; i<(int)n; i++)
#define rep1(i, n) for(int i=1; i<(int)n; i++)
#define mp make_pair
#define pb push_back


/*---  Type ---*/
typedef long long ll;


/*--- Constants ---*/
template <typename T> const T INF = numeric_limits<T>::max() / 10;
const int MOD = (int)1e9 + 7;


// Floating
const double EPS = 1e-11;
#define EQ0(x) (abs(x) < EPS)
#define EQ(x, y) (abs(a-b) < EPS)

// -------------------------------------------------------------------------------------

int main() {
  int a, b;
  cin >> a >> b;
  cout << (a + b) % 24 << endl;

  return 0;
}

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

namespace ConsoleApp3
{
    class Program
    {
        static void Main(string[] args)
        {
            var primes = Primes(100010);

            var X = int.Parse(Console.ReadLine());

            var prime = primes.SkipWhile(x => x < X).First();

            Console.WriteLine(prime);
        }
        static IEnumerable<int> Primes(int maxnum)
        {
            int[] sieve = Enumerable.Range(0, maxnum + 1).ToArray();
            sieve[1] = 0;  // 0 : 素数ではない
            int squareroot = (int)Math.Sqrt(maxnum);
            for (int i = 2; i <= squareroot; i++)
            {
                if (sieve[i] <= 0)
                    continue;
                for (int n = i * 2; n <= maxnum; n += i)
                    sieve[n] = 0;
            }
            return sieve.Where(n => n > 0);
        }
    }
}


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

using namespace std;

#define debug(n) cerr << #n << ':' << n << endl;
#define dline    cerr << __LINE__ << endl;

using ll = long long;
using ull = unsigned long long;
template<class T, class U> using P = pair<T,U>;
template<class T> using Heap = priority_queue<T>;
template<class T> using heaP = priority_queue<T,vector<T>,greater<T>>;
template<class T,class U> using umap = unordered_map<T,U>;
template<class T> using uset = unordered_set<T>;

template<class T>
bool ChangeMax(T&a,const T&b){
  if(a >= b) return false;
  a = b;    return true;
}

template<class T>
bool ChangeMin(T&a,const T&b){
  if(a <= b) return false;
  a = b;    return true;  
}

template<class T, size_t N, class U>
void Fill(T (&a)[N], const U&v){
    fill((U*)a,(U*)(a+N),v);
}

template<class T>
istream& operator >> (istream&is, vector<T>&v){
  for(auto&e:v)is >> e;
  return is;
}

template<long long mod>
class modint{
private:
  long long num;
  long long extgcd(long long a, long long b, long long&x, long long&y)const {
    long long d = a;
    if(b != 0){d = extgcd(b, a%b, y, x);  y -= (a/b) * x;}
    else{x = 1; y = 0;}
    return d;
  }
  long long modinverse()const{
    long long x, y;
    extgcd(num, mod, x, y);
    return (mod + x%mod)%mod;
  }
public:
  modint():num(0){}
  modint(const long long x):num((x < 0?(x+mod):x)%mod ){}
  friend modint operator+(const modint&a, const modint&b)
  {    return modint(a.num + b.num);  }
  friend modint operator-(const modint&a, const modint&b)
  {    return modint(a.num - b.num);  }
  friend modint operator*(const modint&a, const modint&b)
  {    return modint(a.num * b.num);  }
  friend modint operator/(const modint&a, const modint&b)
  {    return modint(a*b.modinverse());  }
  modint& operator+=(const modint&b)
  {    return (*this) = (*this) + b;  }
  modint& operator-=(const modint&b)
  {    return (*this) = (*this) - b;  }
  modint& operator*=(const modint&b)
  {    return (*this) = (*this) * b;  }
  modint& operator/=(const modint&b)
  {    return (*this) = (*this) / b;  }
  modint& operator++()
  {    (*this)+=1; return (*this);  }
  modint& operator--()
  {    (*this)-=1; return (*this);  }
  modint operator++(int){
    modint tmp(*this);
    ++(*this);
    return tmp;
  }
  modint operator--(int){
    modint tmp(*this);
    --(*this);
    return tmp;
  }    
  modint pow(unsigned long long i){
    if(i == 0) return 1;
    if(i & 1){
      return (*this) * (this->pow(i-1));
    }
    modint<mod>hpow = (this->pow(i>>1));
    return hpow * hpow;
  }
  friend ostream& operator<<(ostream&os, const modint&a){
    os << a.num;
    return os;
  }
  friend istream& operator>>(istream&is, modint&a){
    long long x; is >> x;
    a = x;
    return is;
  }
};

using mint =  modint<1000000007>;

int main(){
  ll x; cin >> x;
  ll ans = 0;
  x -= 1;
  ans += (x / 11)*2;
  x %= 11;
  if(x > 0){
    ans++;
    x -= 5;    
  } else ans++;
  if(x > 0){
    ans++;
  }
  cout << ans << endl;
  
}


Measured memory_bytes: 3564
#include <stdio.h>
#include<math.h>
#include<bitset>
#include<string>
#include<iostream>
#include<vector>
#include<string.h>
#include<algorithm>
using namespace std;


int main()
{
    int n;
    cin>>n;
    cout<<pow(n,3)<<endl;
    return 0;
}


Measured memory_bytes: 256
x,y,a,b,c=map(int,input().split())
p=list(map(int,input().split()))
q=list(map(int,input().split()))
r=list(map(int,input().split()))

p.sort(reverse=True)
q.sort(reverse=True)

xy = p[:x] + q[:y] + r
xy.sort(reverse=True)
print(sum(xy[:(x+y)]))

Measured memory_bytes: 29428
//
//  main.cpp
//  ABC174A

#include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
    int x;
    cin>>x;
    if(x>=30){
        cout<<"Yes"<<endl;
    }else{
        cout<<"No"<<endl;
    }
    return 0;
}


Measured memory_bytes: 3060
from collections import *
from itertools import *
from bisect import *
from heapq import *
import copy
import math
from fractions import gcd
import sys
#input = sys.stdin.readline


#


#XY=[list(map(int,input().split())) for i in range(N)]

#H,Y=map(int,input().split())
#print(H*Y//2)
K=int(input())
print([1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51][K-1])


Measured memory_bytes: 65132
#include<bits/stdc++.h>
using namespace std;
struct rev
{
	int num;
	int flag;
}a[100][100];
int main()
{
	int n,x;
	for(int i=0;i<3;i++)
	for(int j=0;j<3;j++)
	{
		cin>>a[i][j].num;
	 } 
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>x;
		for(int i=0;i<3;i++)
	    for(int j=0;j<3;j++)
	    if(a[i][j].num==x)
	    a[i][j].flag=1;
	}
	int num1=0,num2=0,num3=0,num4=0;
	for(int i=0;i<3;i++)
	{
		if(a[i][0].flag==1&&a[i][1].flag==1&&a[i][2].flag==1)
		num1++;
		if(a[0][i].flag==1&&a[1][i].flag==1&&a[2][i].flag==1)
		num2++;
		if(a[i][i].flag==1)
		num3++;//3才成立
		if(a[2-i][i].flag==1)
		num4++;//4才成立 
	}
	if(num1>0||num2>0||num3==3||num4==3)
	cout<<"Yes";
	else
	cout<<"No";
	return 0;
 } 

Measured memory_bytes: 256
//Life is inherently meaningless unless you find something which gives it meaning
 

#include<bits/stdc++.h>
using namespace std;
 
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define ll long long
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define rep(i,n) for(i=0;i<n;i++)
#define forn(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define for1(i, n) for (ll i = 1; i <= (ll)(n); ++i)
#define ford(i, n) for (ll i = (ll)(n) - 1; i >= 0; --i)
#define fore(i, a, b) for (ll i = (ll)(a); i <= (ll)(b); ++i)
#define fora(it,x) for(auto it:x)
#define PI 3.14159265
#define sync ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define endl "\n"
 
typedef pair<ll, ll> pii;
typedef vector<ll> vi;
typedef vector<pii> vpi;
typedef vector<vi> vvi;
typedef long long i64;
typedef vector<i64> vi64;
typedef vector<vi64> vvi64;
typedef pair<i64, i64> pi64;
typedef long double ld;
 
template<class T> bool uin(T &a, T b) { return a > b ? (a = b, true) : false; }
template<class T> bool uax(T &a, T b) { return a < b ? (a = b, true) : false; }

ll l[12],r[12],dp[2*100002],pre[2*100002],m=998244353;
int main(){
    ll n,k;
    cin>>n>>k;
    forn(i,k) cin>>l[i]>>r[i];
    dp[1]=1;
    pre[1]=1;
    for(ll i=2;i<=n;i++){
        for(ll j=0;j<k;j++){
            ll cl=max((ll)1,i-r[j]);
            ll cr=(i-l[j]);
            if(cl>cr) continue;
            dp[i]=(dp[i]+pre[cr]-pre[cl-1]+m)%m;
        }
        pre[i]=(pre[i-1]+dp[i])%m;
    }
    cout<<dp[n];
}

Measured memory_bytes: 6692
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define _GLIBCXX_DEBUG
#define rep(i, a, b) for(int i = a; i < b; i++)
#define ALL(v) v.begin(), v.end()

int main(){
    int k,x; cin >> k >> x;
    if(k*500 >= x) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define p_b push_back
#define pl pair<ll,ll>
#define m_p make_pair
#define MOD 1000000007
#define F(i,a,b) for(i=a;i<b;i++)
#define RF(i,a,b) for(i=a;i>=b;i--)
#define nfs ios_base::sync_with_stdio(false);cin.tie(NULL)


int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n;
    cin >> n;
    cout << n*n*n << endl;
    

    return 0;

}


Measured memory_bytes: 256