akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file 
#include <ext/pb_ds/tree_policy.hpp> 
#include <functional> // for less 
#define pb push_back
#define For(i,s,e) for (ll i=(s); i<(e); i++)
#define Debug_array(a,n) for (ll i=(0); i<(n); i++) cout<<a[i]<<" "
#define Foe(i,s,e) for (ll i=(s); i<=(e); i++)
#define Fod(i,s,e) for (ll i=(s)-1; i>=(e); i--)
#define pii pair<ll,ll>
#define fi first
#define se second
#define endl "\n"
#define mp make_pair
#define big_prime 15486277
#define bigger_prime 179424697
#define biggest_prime 32416188691
//#define random_shuffle(indices.begin(), indices.end());
//std::random_device rd;
//std::mt19937 g(rd());
//std::shuffle(v.begin(), v.end(), g);
using namespace __gnu_pbds; 
using namespace std;
template <class T> ostream& operator << (ostream &os, const vector<T> &v) { for (T i : v) os << i << ' '; return os; }
template <class T> ostream& operator << (ostream &os, const set<T> &v) { for (T i : v) os << i << ' '; return os; }
template <class T, class S> ostream& operator << (ostream &os, const pair<T, S> &v) { os << v.first << ' ' << v.second; return os; }
// template <class T, class S> ostream& operator << (ostream &os, const unordered_map<T, S> &v) { for (auto i : v) os << '(' << i.first << "=>" << i.second << ')' << ' '; return os; }
 
#ifndef ONLINE_JUDGE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <class Arg1> void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 << endl; }
    template <class Arg1, class... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args) {
        const char* sep = strchr(names + 1, ',');
        cerr.write(names, sep - names) << " : " << arg1 << "  ";
        __f(sep + 1, args...);
    }
#else
#define trace(...) 0
#define _CRT_SECURE_NO_WARNINGS
#endif // ifndef ONLINE_JUDGE


typedef long long ll;
typedef tree<ll, null_type, less<ll>, rb_tree_tag,tree_order_statistics_node_update> ordered_set; 

#define Mod 1000000007
#define MAX 5002

multiset<ll,greater<ll> > done;
multiset<ll> s;
int main(){
	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
	
	ll n;cin>>n;
	;For(i,0,(1<<n)) {
		ll x;cin>>x;
		s.insert(-1*x);
	}

	done.insert((*s.begin())*-1);
	s.erase(s.begin());

	while(s.size()>0){
		vector<ll> temp;
		for(ll x:done){
			multiset<ll>::iterator it1 = s.upper_bound(-1*x);
			if(it1==s.end()){
				cout<<"No"<<endl;
				return 0;
			}
			temp.pb(-1*(*it1));
			s.erase(it1);
			if(s.size()==0) break;
		}
		for(ll x:temp)
			done.insert(x);
	}
	cout<<"Yes"<<endl;































	
}

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

using namespace std;

int main() {
  size_t n;
  cin >> n;
  vector<int> L(n);
  for (size_t i = 0; i < n; ++i) {
    cin >> L[i];
  }
  sort(L.begin(), L.end());
  size_t result = 0;
  for (size_t a = 0; a < n; ++a) {
    for (size_t b = a + 1; b < n; ++b) {
      auto it = lower_bound(L.begin(), L.end(), L[a] + L[b]);
      result += it - (L.begin() + b + 1);
    }
  }
  cout << result;
}


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

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

  vector<int> A(N);

  rep(i, 0, N) cin >> A.at(i);

  sort(A.begin(), A.end());
  cout << A.back()-A.front() << endl;
}


Measured memory_bytes: 256
A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))
A3 = list(map(int, input().split()))
N = int(input())
B = [int(input()) for _ in range(N)]

con1 = A1[0] in B and A1[1] in B and A1[2] in B
con2 = A2[0] in B and A2[1] in B and A2[2] in B
con3 = A3[0] in B and A3[1] in B and A3[2] in B
con4 = A1[0] in B and A2[0] in B and A3[0] in B
con5 = A1[1] in B and A2[1] in B and A3[1] in B
con6 = A1[2] in B and A2[2] in B and A3[2] in B
con7 = A1[0] in B and A2[1] in B and A3[2] in B
con8 = A1[2] in B and A2[1] in B and A3[0] in B

if (con1 or con2 or con3 or con4 or con5 or con6 or con7 or con8):
    print("Yes")
else:
    print("No")


Measured memory_bytes: 3064
package main

import (
	"fmt"
	"sort"
)

func main() {
	var n int
	fmt.Scan(&n)
	as := make([]int, n)
	for i := range as {
		fmt.Scan(&as[i])
	}
	sort.Ints(as)
	fmt.Println(as[len(as)-1] - as[0])
}


Measured memory_bytes: 512
while True:
    H, W = map(int, input().split())

    if H == W == 0:
        break
    cnt = 0
    for i in range(H):
        str = ""
        for j in range(W):
            if ((~j)^i)&1:
                str+="#"
            else:
                str+="."
        print(str)
    print()


Measured memory_bytes: 5612
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<stack>
#include<unordered_set>
#include<cmath>
#include<tuple>
#include<numeric>
#include<iterator>
#include<set>
#include<unordered_map>
#include<map>
#include<queue>
#include<cstring>
#include<stdio.h>
#include<fstream>


#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define foru(i , a , b) for(ll i = a ; i < b ; i++)
#define ford(i , a , b) for(ll i = a ; i >= b ; i--)
#define dbg(a) cerr << #a << ": " << a << "\n";
#define ain(a , n) for(ll i = 0 ; i < n ; i++) cin >> a[i]
#define aout(a , n) for(ll i = 0 ; i < n ; i++) cout << a[i] << " "
#define M 1000000007
#define mp make_pair
#define mt make_tuple
#define cend cout << "\n"
#define all(x) x.begin() , x.end()
#define aout2(a , n , m) for(ll i = 0 ; i < n ; i++){for(ll j = 0 ; j < m ; j++){cout << a[i][j] << " ";} cout << endl;}
#define ain2(a , n , m) for(ll i = 0 ; i < n ; i++){for(ll j = 0 ; j < m ; j++){cin >> a[i][j];}}
#define ff first
#define ss second

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector <int> vi;
typedef vector <ll> vll;
typedef vector <char> vch;
typedef vector <string> vs;

/*----------------------------- # --- MATH ALGORITHMS --- # -----------------------------*/

template <class T> T gcd(T a , T b){ while(a != 0){T temp = a; a = b % a; b = temp;}return b;}
template <class T> T egcd(T a , T b , T &x , T &y){T gcd , xt , yt;if(a == 0){gcd = b;x = 0 , y = 1;}else {gcd = egcd(b % a , a , xt , yt);x = yt - (b/a)*xt; y = xt;}return gcd;}
template <class T> T expo(T base , T exp , T mod){T res = 1;base = base % mod;while (exp > 0){if (exp & 1)res = (res*base) % mod;exp = exp>>1;base = (base*base) % mod;}return res;}
template <class T> T modinv(T a , T mod){T x , y; egcd<T>(a , mod , x , y);while(x < 0) x += mod; while(x >= mod) x -= mod; return x;}
template <class T> T modinvfermat(T a , T mod){return expo<T>(a , mod - 2 , mod);}
template <class T> bool rev(T a , T b){return a > b;}
template <class T> ll maxpower(T a , T b){ll ans = 0;while(a > 0 && a % b == 0){ans++;a /= b;}return ans;}


/*----------------------------- # --- MAIN CODE --- # -----------------------------*/

int main(){
    fastio;
#ifndef ONLINE_JUDGE
    freopen("testcase.txt" , "r" , stdin);
    freopen("error.txt" , "w" , stderr);
    freopen("output.txt" , "w" , stdout);
#endif
    double r;cin>>r;
    cout << 2* 3.14159265*r;
//    ll n; cin >> n; ll a[n];
//    ll cnt[n]; memset(cnt , 0 , sizeof(cnt));
//    foru(i , 0 , n - 1){
//        cin >> a[i]; a[i]--; cnt[a[i]]++;
//    }
//    foru(i , 0 , n) cout << cnt[i] << endl;
}
























Measured memory_bytes: 3804
n = int(input())
s = input()

rgb = [[], [], []]

for i, c in enumerate(s):
    rgb[(c > 'G') + (c > 'B')].append(i)

exclude = 0
for i in rgb[0]:
    for j in rgb[1]:
        ii = min(i, j)
        jj = max(i, j)
        d = jj - ii
        if ii - d >= 0 and ii - d in rgb[2]:
            exclude += 1
        if jj + d < n and jj + d in rgb[2]:
            exclude += 1
        if not d % 2 and ii + d // 2 in rgb[2]:
            exclude += 1

summ = len(rgb[0]) * len(rgb[1]) * len(rgb[2])
print(summ - exclude)

Measured memory_bytes: 70092
#include <bits/stdc++.h>
using namespace std;
//#define int long long
#define io  ios_base::sync_with_stdio(false), cin.tie(NULL),cout.tie(NULL)
int mod=1e9+7;const int N=55;
int power(int a,int b,int m=mod)
{
	if(b==0)	return 1;
	if(b==1)	return a;
	int res=power(a,b/2,m);
	res=(res*res)%m;
	if(b&1)	res=(res*a)%m;
	return res;
}
int modinv(int a,int m=mod){ return power(a,m-2,m);}
int add(int a,int b,int m=mod){	return (a+b)%m;}
int sub(int a,int b,int m=mod){	return (a-b+m)%m;}
int mul(int a,int b,int m=mod){	return (a*b)%m;}
int dx[]={1,0,-1,0};
int dy[]={0,1,0,-1};
bool chk(int x,int y,int n,int m)
{
    return x>=0 && x<n && y>=0 && y<m;
}
int32_t main()
{
    string s,t;
    cin>>s>>t;
    bool fg=true;
    for(int i=0;i<s.length();i++)
        if(s[i]!=t[i])
        fg=false;
    if(fg)
        cout<<"Yes";
    else
        cout<<"No";
}


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

int main() {
  int N;
  cin >> N;
  map<int,int> A;
  for (int i = 0; i < N; i++) {
    int x;
    cin >> x;
    A[x] += 1;
  }
  int p = N-A.size();
  cout << N-(p+1)/2*2 << endl;
}

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

int main(){
    int H,W;
    cin >> H >> W;
    vector<vector<string>> s(H,vector<string>(W));
    int i,j;
    int h=0;
    int g=0;
    char t;

    for(i=0;i<H;i++){
        for(j=0;j<W;j++){
            cin >> s.at(i).at(j);
            if(s.at(i).at(j)=="snuke"){
                h=j;
                g=i+1;
            }
        }
    }
    t='A'+h;
    cout << t << g << endl;

    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define inline __inline__ __attribute__((always_inline))
const int N = 1e5 + 5, INF = 0x3f3f3f3f, M = N << 1;
const ll LNF = 0x3f3f3f3f3f3f3f3f;

pii a[N];

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i].first, a[i].second = i;
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) cout << a[i].second << ' ';
  cout << endl;
}

Measured memory_bytes: 1664
import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		
		int n=in.nextInt(),A[]=new int[n];
		for(int i=0;i<n;i++) A[i]=Integer.parseInt(in.next());
		
		int q=in.nextInt(),cnt=0;
		for(int i=0;i<q;i++) {
			if(binarySearch(A,Integer.parseInt(in.next())))cnt++;
		}
		System.out.println(cnt);
	}
	
	static boolean binarySearch(int[] A,int q) {
		int L=0,R=A.length-1;
		while(R>=L) {
			int M=(L+R)/2;
			if(A[M]==q)return true;
			else if(A[M]<q)L=M+1;
			else R=M-1;
		}
		return false;
	}

}



Measured memory_bytes: 69564
#include <stdio.h>
#include <algorithm>
#define rep(i,st,ed) for (int i=st;i<=ed;++i)
using namespace std;
int main(void) {
	int x,y,n; scanf("%d%d%d",&n,&x,&y);
	if (abs(x-y)%2) puts("Borys");
	else puts("Alice");
	return 0;
}

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

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

  vector<vector<int>> x(n, vector<int>(d));

  for(int i = 0; i < n; i++){
    for(int j = 0; j < d; j++){
      cin >> x[i][j];
    }
  }

  int cnt = 0;

  for(int i = 0; i < n; i++){
    for(int j = i+1; j < n; j++){
      int sum = 0;
      for(int k = 0; k < d; k++){
        int dum = abs(x[i][k] - x[j][k]);
        sum += (dum*dum);
      }

      for(int k = 0; k <= sum; k++){
        if(sum == k*k){
          cnt++;
        }
      }
    }
  }

  cout << cnt << endl;

  return 0;

}


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

int main() {
        int N;
        long long LL[86];
        LL[0] = 2;
        LL[1] = 1;

        for (int i = 2; i <= 86; i++) {
                LL[i] = LL[i - 1] + LL[i - 2];
        }
        cin >> N;
        cout << LL[N] << endl;
}


Measured memory_bytes: 256
#import <stdio.h>
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
int main() {
    int n, a, b;
    scanf("%d %d %d ", &n, &a, &b);
    char s[1000001];
    scanf("%s", s);
    int totalcount = 0;
    int bcount = 0;
    rep(i, n) {
        switch (s[i]) {
        case 'a':
            if (totalcount < a + b) {
                totalcount++;
                puts("Yes");
                break;
            }
        case 'b':
            bcount++;
            if (totalcount < a + b && bcount <= b) {
                totalcount++;
                puts("Yes");
                break;
            }
        default:
            puts("No");
            break;
        }
    }
}


Measured memory_bytes: 7884
h, w = gets.split(" ").map(&:to_i)
c = []
10.times do |i|
  c << gets.split(" ").map(&:to_i)
end
a = []
h.times do |i|
  a << gets.split(" ").map(&:to_i)
end

# 1に到達する最短経路を出す
def dijkstra start, min_point, fixed, c
  # p "[call] #{start}, #{min_point}, #{fixed}"
  remaining = (0..9).to_a - fixed
  if remaining.count == 0 then
    return min_point
  end
  # p (0..9).map{|i| [c[i][start] + min_point[start], min_point[i]]}
  new_min_point = (0..9).map{|i| [c[i][start] + min_point[start], min_point[i]].min}
  next_amount = Float::INFINITY
  next_index = nil
  remaining.each do |i|
    if new_min_point[i] < next_amount then
      next_amount = new_min_point[i]
      next_index = i
    end
  end
  dijkstra next_index, new_min_point, (fixed + [next_index]), c
end

ans_map = dijkstra(1, [Float::INFINITY, 0] + [Float::INFINITY]*8, [], c)
ans = 0
a.each do |a_raw|
  a_raw.each do |a_item|
    if a_item == -1 then
      next
    end

    ans += ans_map[a_item]
  end
end

puts ans


Measured memory_bytes: 2556
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.io.InputStream;

/**
 * @author khokharnikunj8
 */

public class Main {
    public static void main(String[] args) {
        new Thread(null, new Runnable() {
            public void run() {
                new Main().solve();
            }
        }, "1", 1 << 26).start();
    }

    void solve() {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        ScanReader in = new ScanReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        ACoffee solver = new ACoffee();
        solver.solve(1, in, out);
        out.close();
    }

    static class ACoffee {
        public void solve(int testNumber, ScanReader in, PrintWriter out) {
            String s = in.scanString();
            if (s.charAt(2) == s.charAt(3) && s.charAt(4) == s.charAt(5)) out.println("Yes");
            else out.println("No");
        }

    }

    static class ScanReader {
        private byte[] buf = new byte[4 * 1024];
        private int index;
        private BufferedInputStream in;
        private int total;

        public ScanReader(InputStream inputStream) {
            in = new BufferedInputStream(inputStream);
        }

        private int scan() {
            if (index >= total) {
                index = 0;
                try {
                    total = in.read(buf);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (total <= 0) return -1;
            }
            return buf[index++];
        }

        public String scanString() {
            int c = scan();
            if (c == -1) return null;
            while (isWhiteSpace(c)) c = scan();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = scan();
            } while (!isWhiteSpace(c));
            return res.toString();
        }

        private boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1) return true;
            else return false;
        }

    }
}



Measured memory_bytes: 23508
#自分以下をまず食べてしまう
#その後小さいほうから食べる
import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split( )))
a.sort()
a_sm =[]
sm = 0
for i in range(n):
    sm += a[i]
    a_sm.append(sm)
mn = 0
tmp = a[0]
for i in range(1,n):
    if tmp*2 >= a[i]:
        tmp+=a[i]
    else:
        tmp = a_sm[i]
        mn = i
print(n-mn)

Measured memory_bytes: 59900
import itertools
import numpy as np

mNMX = map(int, input().split())
lNMX = list(mNMX)

mBook = [map(int, input().split()) for i in range(lNMX[0])]
lBook = [list(mBook[i]) for i in range(lNMX[0])]
nBook = np.array(lBook)
mPrice = 10 ** 8

for i in range(0, lNMX[0]):
    combi = itertools.combinations(range(0, lNMX[0]), i + 1)
    for c in combi:
        cBook = nBook[c, :]
        sBook = np.sum(cBook, axis = 0)
        comp = [0 if i >= lNMX[2] else -1 for i in sBook[1:]]
        if(sum(comp) == 0):
            mPrice = sBook[0] if sBook[0] < mPrice else mPrice
    
print(mPrice if mPrice <= 12 * 10 ** 5 else -1)

Measured memory_bytes: 27308
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(n);++i)

using namespace std;

bitset<4> input_layer() {
  bitset<4> layer;
  REP(j,2) {
    layer <<= 2;
    string str;
    cin>>str;
    REP(k,2) {
      switch (str[k]) {
        case '#':
          layer.set(k);
          break;
        case '.':
          layer.reset(k);
      }
    }
  }
  return layer;
}

int main() {
  while(1) {
    int h,n;
    cin>>h>>n;
    if(!h) break;
    vector<bitset<4>> tower;
    REP(i,h) {
      tower.push_back(input_layer());
    }
    vector<array<bitset<4>, 2>> cubes;
    REP(i,n) {
      array<bitset<4>, 2> cube;
      cube[0] = input_layer();
      cube[1] = input_layer();
      if ((cube[0].to_ulong() & 0xA) == 0 && (cube[1].to_ulong() & 0xA) == 0) {
        cube[0] <<= 1;
        cube[1] <<= 1;
      }
      if ((cube[0].to_ulong() & 0xC) == 0 && (cube[1].to_ulong() & 0xC) == 0) {
        cube[0] <<= 2;
        cube[1] <<= 2;
      }
      if (cube[0] == 0) {
        cube[0] = cube[1];
        cube[1] = 0;
      }
      cubes.push_back(cube);
    }
    int res = 0;
    REP(i,1<<(2*n)) {
      auto tmp = tower;
      bool ok = true;
      int score = 0;
      REP(j,n) {
        auto cube = cubes[j];
        tmp.emplace_back();
        tmp.emplace_back();
        int shift = (i>>(2*j)) & 0b11;
        uint64_t mask[] = {0, 0x5, 0x3, 0x7};
        if ((cube[0].to_ulong() & mask[shift]) != 0 || (cube[1].to_ulong() & mask[shift]) != 0) {
          ok = false;
          break;
        }
        h = tmp.size();
        size_t k = h-2;
        auto cl = cube[0] >> shift;
        auto ch = cube[1] >> shift;
        for (; k > 0; --k) {
          if ((cl & tmp[k-1]) != 0 || (ch & tmp[k]) != 0) break;
        }
        tmp[k] |= cl;
        tmp[k+1] |= ch;
        while (k < tmp.size() && tmp[k] == 0xF) {
          tmp.erase(begin(tmp)+k);
          ++score;
        }
        while (k+1 < tmp.size() && tmp[k+1] == 0xF) {
          tmp.erase(begin(tmp)+k+1);
          ++score;
        }
        while (!tmp.empty() && tmp.back() == 0) tmp.pop_back();
      }
      if (ok) res = max(res, score);
    }
    cout << res << endl;
  }
  return 0;
}

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

using namespace std;

using int64 = long long;
const int mod = 1e9 + 7;

const int64 infll = (1LL << 62) - 1;
const int inf = (1 << 30) - 1;

struct IoSetup {
  IoSetup() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
    cerr << fixed << setprecision(10);
  }
} iosetup;


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

template< typename T1, typename T2 >
istream &operator>>(istream &is, pair< T1, T2 > &p) {
  is >> p.first >> p.second;
  return is;
}

template< typename T >
ostream &operator<<(ostream &os, const vector< T > &v) {
  for(int i = 0; i < (int) v.size(); i++) {
    os << v[i] << (i + 1 != v.size() ? " " : "");
  }
  return os;
}

template< typename T >
istream &operator>>(istream &is, vector< T > &v) {
  for(T &in : v) is >> in;
  return is;
}

template< typename T1, typename T2 >
inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }

template< typename T1, typename T2 >
inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

template< typename T = int64 >
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 V >
typename enable_if< is_class< T >::value == 0 >::type fill_v(T &t, const V &v) {
  t = v;
}

template< typename T, typename V >
typename enable_if< is_class< T >::value != 0 >::type fill_v(T &t, const V &v) {
  for(auto &e : t) fill_v(e, v);
}


int main() {
  string S;
  cin >> S;
  for(auto &c : S) c -= '0';
  int x = S[0] * 10 + S[1];
  int y = S[2] * 10 + S[3];

  bool tapu, tapi;

  tapu = 1 <= x && x <= 12;
  tapi = 1 <= y && y <= 12;

  if(tapu && tapi) cout << "AMBIGUOUS" << endl;
  else if(tapu) cout << "MMYY" << endl;
  else if(tapi) cout << "YYMM" << endl;
  else cout << "NA" << endl;
}


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

int main(){

 string a,b,c;
 cin >> a >> b >> c;

 int A, B, C;
  A = a.size()-1;
  B = b.size()-1;
  C = c.size()-1;
  
  if(a.at(A)==b.at(0)&& b.at(B)==c.at(0))
 	cout << "YES" <<endl;
  else
    cout <<"NO" <<endl;
}

Measured memory_bytes: 3580
double n,p[333][333][333];c[4];double f(i,j,k){return~i&~j&~k?p[i][j][k]?:(p[i][j][k]=(i*f(i-1,j,k)+j*f(i+1,j-1,k)+k*f(i,j+1,k-1)+n)/(i+j+k)):0;}main(){for(***p=1;~scanf("%d",c);)!n?n=*c:c[*c]++;printf("%.9f",f(c[1],c[2],c[3])-1);}

Measured memory_bytes: 260096
#include<cstdio>
#include<algorithm>
using namespace std;

int arr[100];
int main(){
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;i++)
        scanf("%d",&arr[i]);
    int ans = 0;
    sort(arr,arr+n);
    for(int i=0;i<n;i++){
        ans += arr[i];
    }
    ans -= arr[n-1]/2;
    printf("%d\n",ans);
    return 0;
}


Measured memory_bytes: 128
#include<bits/stdc++.h>
#define dbug printf("I am here\n");
#define Fast ios_base::sync_with_stdio(false); cin.tie(0);
#define vs            v.size()
#define ss            s.size()
#define sot(v)        sort(v.begin(),v.end())
#define rev(v)        reverse(v.begin(),v.end())
#define ii            pair<int, int>
#define int           long long
#define ull           unsigned long long
#define pb            push_back
#define mpp           make_pair
#define Okay          0
#define pi            3.14159

const int inf = 1e6;
const int cont = 1e18;
using namespace std;

void solve(){
    int n;
    cin>>n;
    int cnt = 0;
    int sum = 0;
    for(int i =1; ;i++){
        sum+=i;
        cnt++;
        if(sum >= n)break;
    }
    cout<<cnt<<endl;

}

int32_t main(){
   Fast;

   solve();
    return Okay;
}



Measured memory_bytes: 3648
import java.util.*;

public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	String c1 = sc.next();
    	String c2 = sc.next();
    	String c3 = sc.next();

    	System.out.println(c1.substring(0, 1) + c2.substring(1, 2) + c3.substring(2, 3));
    }
}

Measured memory_bytes: 20820
#include <stdio.h>
int main (void){
	int i, j, k;
	int a[100];
	for(i = 0; i < 3; i++){
		scanf("%d", &a[i]);
	}
	for(i = 0; i < 3; i++){
		for(j = i + 1; j < 3; j++){
			if (a[i] > a[j]){
				k = a[i];
				a[i] = a[j];
				a[j] = k;
			}
		}
	}
	printf("%d %d %d\n", a[0], a[1], a[2]);
	return 0;
}



Measured memory_bytes: 2016
#include <stdio.h>

int main(void) {
  int a[20][20], i, j, m, n, max = 0, t;

  scanf("%d %d", &m, &n);
  for (i = 0; i < m; i++)
    for (j = 0; j < n; j++)
      scanf("%d", &a[i][j]);

  for (j = 0; j < n; j++)
    max += a[0][j];
  
  for (i = 1; i < m; i++) {
    t = 0;
    for (j = 0; j < n; j++)
      t += a[i][j];
    if (t > max) max = t;
  }
  printf("%d\n", max);

  return 0;
}

Measured memory_bytes: 600
using System;
using System.Linq;
using System.Collections.Generic;

public class Test
{
	public static void Main()
	{
        int n = int.Parse(Console.ReadLine());
        int[] button = new int[n+1];

        for(int i = 0 ; i < n ; i++){
            button[i] = int.Parse(Console.ReadLine());
        }

        int ans = 0;
        bool can = false;
        
        int currentButton = 0;
        while(n > 0){
            if(currentButton == 1){
                can = true;
                break;
            } else {
                currentButton = button[currentButton] -1;
            }
            n--;
            ans++;
        }

        if(can){
            Console.WriteLine(ans);
        } else {
            Console.WriteLine("-1");
        }
    }                                                                                                                                                                       
}

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

using namespace std;

#define pii pair<int,int>
#define ll long long
#define s second
#define f first

string s,t;
int idx,dp[3005][3005];
size_t n,m;

int main(){
  cin >> s >> t;
  n=s.size();m=t.size();
  for (int i=0; i<=n; i++)
   {
     for (int j=0; j<=m; j++)
     {
       if (i == 0 || j == 0)
         dp[i][j] = 0;

       else if (s[i-1] == t[j-1])
         dp[i][j] = dp[i-1][j-1] + 1;

       else
         dp[i][j] = max(dp[i-1][j], dp[i][j-1]);
     }
   }
  idx=dp[n][m];
  string res(idx,' ');
  int i=n,j=m;
  while(i>0 && j>0){
    if(s[i-1]==t[j-1]){
        res[idx-1]=s[i-1];
        --i;--j;--idx;
    }
    else if(dp[i-1][j]>dp[i][j-1]){
        --i;
    }
    else{
     --j;
    }
  }
  cout << res;
  return 0;
}


Measured memory_bytes: 35456
// Standard I/O
#include <iostream>
#include <sstream>
#include <cstdio>
// Standard Library
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cmath>
// Template Class
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
// Container Control
#include <algorithm>

using namespace std;

#define rep( i, n ) for( int i = 0; i < n; ++i )
#define irep( i, n ) for( int i = n-1; i >= 0; --i )
#define reep( i, s, n ) for ( int i = s; i < n; ++i )
#define ireep( i, n, s ) for ( int i = n-1; i >= s; --i )
#define foreach(itr, x) for( typeof(x.begin()) itr = x.begin(); itr != x.end(); ++itr)

#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
#define all( v ) v.begin(), v.end()
#define fs first
#define sc second
#define vc vector

// for visualizer.html
double SCALE = 1.0;
double OFFSET_X = 0.0;
double OFFSET_Y = 0.0;
#define LINE(x,y,a,b) cerr << "line(" << SCALE*(x) + OFFSET_X << ","	\
	<< SCALE*(y) + OFFSET_Y << ","										\
	<< SCALE*(a) + OFFSET_X << ","										\
	<< SCALE*(b) + OFFSET_Y << ")" << endl;
#define CIRCLE(x,y,r) cerr << "circle(" << SCALE*(x) + OFFSET_X << ","	\
	<< SCALE*(y) + OFFSET_Y << ","										\
	<< SCALE*(r) << ")" << endl;

typedef long long ll;
typedef complex<double> Point;

typedef pair<int, int> pii;
typedef pair<int, pii> ipii;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector< vector<int> > vii;
typedef vector< vector<double> > vdd;

typedef vector<int>::iterator vi_itr;

const int IINF = 1 << 28;
const int MOD = 1e9+7;
const double INF = 1e30;
const double EPS = 1e-10;
const double PI = acos(-1.0);

// Direction : L U R D
const int dx[] = { -1, 0, 1, 0};
const int dy[] = { 0, -1, 0, 1 };

struct UnionFind
{
	vi root;

	UnionFind ( int N ){
		root.resize(N);
		rep(i, N) root[i] = i;
	}

	int check_root ( int x )
	{
		if( root[x] == x ) return x;
		return root[x] = check_root(root[x]);
	}
	
	void unite ( int x, int y )
	{
		int root_x = check_root(x), root_y = check_root(y);

		if( root_x == root_y ) return;
		root[root_y] = root_x;
	}
	
	bool check ( int x, int y  )
	{
		int root_x = check_root(x), root_y = check_root(y);

		return root_x == root_y;
	}
};  

int n, m;
int p[100000];
pii op[100000];

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

    rep(i, n) cin >> p[i];
    rep(i, m) {
        cin >> op[i].fs >> op[i].sc;
        --op[i].fs;
        --op[i].sc;
    }

    UnionFind uf = UnionFind(n);
    rep(i, m) uf.unite(op[i].fs, op[i].sc);

    int ans = 0;
    rep(i, n) {
        int num = p[i]-1;
        if ( uf.check(num, i) ) {
            ++ans;
        }
    }

    cout << ans << endl;
}


Measured memory_bytes: 1792
#include <bits/stdc++.h>
#define pb push_back
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

vector<int> g[200005] = {};
int n, m, a, b;

void dfs(int p) {
    for(int x : g[p]) {
        if(x == n) {
            puts("POSSIBLE");
            exit(0);
        }
    }
}

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

    scanf("%d %d", &n, &m);
    for(int i = 0; i < m; ++i) {
        scanf("%d %d", &a, &b);
        g[a].pb(b); g[b].pb(a);
    }

    for(int x : g[1]) dfs(x);

    puts("IMPOSSIBLE");
}

Measured memory_bytes: 12016
#include<bits/stdc++.h>
using namespace std;
char a,b;
int main()
{
    cin>>a>>b;
    if(a=='A'&&b=='A')cout<<"="<<endl;
    if(a=='A'&&b=='B')cout<<"<"<<endl;
    if(a=='A'&&b=='C')cout<<"<"<<endl;
    if(a=='A'&&b=='D')cout<<"<"<<endl;
    if(a=='A'&&b=='E')cout<<"<"<<endl;
    if(a=='A'&&b=='F')cout<<"<"<<endl;
    if(a=='B'&&b=='A')cout<<">"<<endl;
    if(a=='B'&&b=='B')cout<<"="<<endl;
    if(a=='B'&&b=='C')cout<<"<"<<endl;
    if(a=='B'&&b=='D')cout<<"<"<<endl;
    if(a=='B'&&b=='E')cout<<"<"<<endl;
    if(a=='B'&&b=='F')cout<<"<"<<endl;
    if(a=='C'&&b=='A')cout<<">"<<endl;
    if(a=='C'&&b=='B')cout<<">"<<endl;
    if(a=='C'&&b=='C')cout<<"="<<endl;
    if(a=='C'&&b=='D')cout<<"<"<<endl;
    if(a=='C'&&b=='E')cout<<"<"<<endl;
    if(a=='C'&&b=='F')cout<<"<"<<endl;
    if(a=='D'&&b=='A')cout<<">"<<endl;
    if(a=='D'&&b=='B')cout<<">"<<endl;
    if(a=='D'&&b=='C')cout<<">"<<endl;
    if(a=='D'&&b=='D')cout<<"="<<endl;
    if(a=='D'&&b=='E')cout<<"<"<<endl;
    if(a=='D'&&b=='F')cout<<"<"<<endl;
    if(a=='E'&&b=='A')cout<<">"<<endl;
    if(a=='E'&&b=='B')cout<<">"<<endl;
    if(a=='E'&&b=='C')cout<<">"<<endl;
    if(a=='E'&&b=='D')cout<<">"<<endl;
    if(a=='E'&&b=='E')cout<<"="<<endl;
    if(a=='E'&&b=='F')cout<<"<"<<endl;
    if(a=='F'&&b=='A')cout<<">"<<endl;
    if(a=='F'&&b=='B')cout<<">"<<endl;
    if(a=='F'&&b=='C')cout<<">"<<endl;
    if(a=='F'&&b=='D')cout<<">"<<endl;
    if(a=='F'&&b=='E')cout<<">"<<endl;
    if(a=='F'&&b=='F')cout<<"="<<endl;
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <map>
#include <cstdio>
#include <cstring>
#include <math.h>
#include <bitset>
#include <time.h>
#include <set>
#include <algorithm>
#define MAXN 100000
#define ll long long
using namespace std;

int A[MAXN+2];
ll cumul[MAXN+2];

ll left_max[MAXN+2];
ll right_max[MAXN+2];

// B,W,B,B,W

int main() {
    int N,K;
    cin>>N>>K;
    for(int i=1;i<=N;i++)
        cin>>A[i];
    
    cumul[0]=0;
    for(int i=1;i<=N;i++)
        cumul[i]=cumul[i-1]+A[i];
    
    left_max[0]=0;
    for(int i=1;i<=N;i++) {
        left_max[i]=left_max[i-1]+max(A[i],0);
    }
    
    right_max[N+1]=0;
    for(int i=N;i>=1;i--) {
        right_max[i]=right_max[i+1]+max(A[i],0);
    }
    
    
    
    ll ans=0;
    
    for(int i=1;i+K-1<=N;i++) {
        // i to i+K-1
        ans=max(ans, left_max[i-1]+right_max[i+K]);
        ans=max(ans, left_max[i-1]+right_max[i+K]+cumul[i+K-1]-cumul[i-1]);
    }
    
    cout << ans << endl;
    
}

Measured memory_bytes: 3072
import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        while (true) {
            int n = sc.nextInt();
            int m = sc.nextInt();
            if ((n | m) == 0)
                break;
            double f[][] = new double[n][n];
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n; j++) {
                    f[i][j] = sc.nextDouble();
                }
            }
            double dp[][] = new double[m + 1][n]; // dp[i][j] :
            // i回目にj番目の肥料を与えた時に得られる最大の成長度
            // dp[i][j] =
            // Max(dp[i-1][k]*f[k][j](0<=k<=n-1))
            Arrays.fill(dp[1], 1.0);
            for (int i = 1; i < m; i++) {
                for (int j = 0; j < n; j++) {
                    double max = 0;
                    for (int k = 0; k < n; k++) {
                        max = Math.max(max, dp[i][k] * f[k][j]);
                    }
                    dp[i + 1][j] = max;
                }
            }
            double ans = 0;
            for (int i = 0; i < n; i++) {
                ans = Math.max(ans, dp[m][i]);
            }
            System.out.printf("%.2f\n", ans);

        }
    }
}

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

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef pair<int, int> ii;
typedef map<int, int> MPII;
typedef set<int> SETI;

const int mxN = 2e5;
const ld pi = 4.0 * atanl(1.0);
const int iinf = 1e9 + 10;
const int inf = 1e18 + iinf + 10;
const int mod = 1000000007;
const ld prec = .000001;

#define F first
#define S second
#define pb push_back
#define mp make_pair
#define all(c) c.begin(), c.end()
#define rall(c) c.end(), c.begin()

int n, m, t, a[mxN];

void fast() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); }

int main() {
  fast();
  cin >> n;
  vector<ii> v;

  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    v.pb(mp(x, i + 1));
  }

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

  for (auto x : v) {
    cout << x.S << " ";
  }

  return 0;
}



Measured memory_bytes: 4264
#include <stdio.h>

int main() {
	int n,k,i;
	char s[50];
	scanf("%d", &n);
	scanf("%d", &k);
	for(i=0;i<=n;i++) scanf("%c", &s[i]);
	switch (s[k]) {
	case 'A':s[k] = 'a';
		break;
	case 'B':s[k] = 'b';
		break;
	case 'C':s[k] = 'c';
		break;
	}
	for (i = 0; i<=n; i++) printf("%c", s[i]);
}

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

string ALP = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string alp = "abcdefghijklmnopqrstuvwxyz";
void Yes() {cout << "Yes" << endl;}
void No() {cout << "No" << endl;}
void YES() {cout << "YES" << endl;}
void NO() {cout << "NO" << endl;}
void neg() {cout << -1 << endl;}

int main() {
  int n;
  cin >> n;
  vector<int> p(n), minp(n);
  for (int i = 0; i < n; i++) cin >> p.at(i);
  int m = n + 1;
  for (int i = 0; i < n; i++) {
    m = min(m, p.at(i));
    minp.at(i) = m;
  }
  int cnt = 1;
  for (int i = 1; i < n; i++) {
    if (p.at(i) <= minp.at(i - 1)) cnt++;
  }
  cout << cnt << endl;
}

Measured memory_bytes: 1792
#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
 
#define FI(z,n) for(int j=z; j<=n; j++)
#define FL(z,n) for(l j=z; j<=n; j++)
 
#define inf 10000000000
#define mod 1000000007
 
void In_Out(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
 
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
        freopen("error.txt", "w", stderr);
    #endif
}
 
 
int main(){
 
    // In_Out();
 
    ll n;
    cin >> n;

    ll h[n];
    ll dp[n];

    for(ll i=0; i<n; i++){
        cin >> h[i];
    }

    dp[0] = 0;
    dp[1] = abs(h[0] - h[1]);

    for(ll i=2; i<n; i++){

        ll op1 = dp[i-1] + abs(h[i] - h[i-1]);
        ll op2 = dp[i-2] + abs(h[i] - h[i-2]);
        
        dp[i] = min(op1, op2);
    }

    cout << dp[n-1];
}

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

int main() {
  int n;
  	cin>>n;
  int sum=n;
  if(sum==7){
    cout<<"Yes"<<endl;
  }
  else{
  for(int i=0;i<n;i++){
  sum-=4;
    if(sum%7==0){
      cout<<"Yes"<<endl;
      break;
    }
    if(sum<0){
       cout<<"No"<<endl;
      break;
    }
  }
  
}
}

Measured memory_bytes: 256
import Data.Ratio

main = do
  (n:m:_) <- getLine >>= return . (map read) . words :: IO [Integer]

  let
    s = m*1900 + (n-m)*100
    a = s % (2^m - 1)
    b = (2^m - 1) % (2^m)

  print $ numerator ((a*b) / ((1-b)^2))


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

#define rep(i,s,n) for (int i = (int)s; i < (int)n; i++)
#define ll long long
#define ld long double
#define pb push_back
#define eb emplace_back
#define All(x) x.begin(), x.end()
#define Range(x, i, j) x.begin() + i, x.begin() + j
#define lbidx(x, y) lower_bound(x.begin(), x.end(), y) - x.begin()
#define ubidx(x, y) upper_bound(x.begin(), x.end(), y) - x.begin()
#define llbidx(x, y, z) lower_bound(x.begin(), x.end(), z) - lower_bound(x.begin(), x.end(), y) // 二要素間の距離
#define deg2rad(deg) ((((double)deg)/((double)360)*2*M_PI))
#define rad2deg(rad) ((((double)rad)/(double)2/M_PI)*(double)360)
#define Find(set, element) set.find(element) != set.end()
#define Decimal(x) printf("%.10f\n", x) // 小数点を10桁まで表示
// debug用
#define PrintVec(x) for (auto elementPrintVec: x) { cout << elementPrintVec << " "; } cout << "\n";
#define debug(x) cerr << #x << ": " << (x) << "\n";
#define endl "\n"
// gcj print用
#define Case(x) printf("Case #%d: ", x);

typedef pair<int, int> PI;
typedef pair<ll, ll> PLL;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<vector<vector<int>>> vvvi;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef vector<vector<vector<int>>> vvvl;
typedef vector<PI> vpi;
typedef vector<vector<PI>> vvpi;
typedef vector<vector<vector<PI>>> vvvpi;
typedef vector<PLL> vpl;
typedef vector<vector<PLL>> vvpl;
typedef vector<vector<vector<PLL>>> vvvpl;

int POWINT(int x, int n) {
  int ret = 1;
  while (n > 0) {
    if (n & 1) ret *= x;
    x *= x;
    n >>= 1;
  }
  return ret;
};

ll POWLL(ll x, int n) {
  ll ret = 1;
  while (n > 0) {
    if (n & 1) ret *= x;
    x *= x;
    n >>= 1;
  }
  return ret;
};

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

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

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

  int A, B, C, D;
  cin >> A >> B >> C >> D;


  int t = (A + D - 1) / D;
  int a = (C + B - 1) / B;

  if (a <= t) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }



  return 0;
};


Measured memory_bytes: 3648
#include<bits/stdc++.h>
using namespace std;
#define ld long double
#define ll long long
#define rem 1000000007
 
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<ll, ll> pii;
#define v(x) vector<x>
#define pb(x) push_back(x)
#define ppb() pop_back()
#define mp(x,y) make_pair(x,y)
#define mii map<ll,ll>
#define umii unordered_map<ll,ll>
#define mxheap priority_queue<ll> // Max Heap
#define mnheap priority_queue<ll,vi,greater<ll> > // Min Heap
#define da(type,arr,size) type *arr = new type[n] // Dynamically allocated array
 
 
#define f(i,n) for(ll i=0;i<(n);i++)
#define fa(i,a,b) for(ll i=(a);i<(b);i++)
#define far(i,a,b) for(ll i=(a);i>(b);i--)
#define T ll t; cin>>t; while(t--)
#define ff first
#define ss second
#define mem(a,b) memset(a,b,sizeof(a))
#define sz size()
 
#define setbits(x) __builtin_popcountll(x) // Total set bits in a number
#define zerobits(x) __builtin_ctzll(x) // This will tell me number of zeroes till first set bit
#define all(c) (c).begin(),(c).end()
#define setp(x,y) fixed<<setprecision(y)<<x
#define fast ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
#define INF 2e18
 
 
ll mod(ll n) {
	return n > 0 ? n : -1 * n;
}
ld dist(ll x1, ll y1, ll x2, ll y2) {
	ld ans = round(pow(mod(x2 - x1), 2)) + round(pow(mod(y2 - y1), 2));
	ans = sqrt(ans);
	return ans;
}
 
ld dist(pii a, pii b) {
	ld ans = round(pow(mod(b.ff - a.ff), 2)) + round(pow(mod(b.ss - a.ss), 2));
	ans = sqrt(ans);
	return ans;
}
umii isPrime;
void SieveOfEratosthenes(ll n)
{
	bool prime[n + 1];
	memset(prime, true, sizeof(prime));
 
	for (int p = 2; p * p <= n; p++)
	{
		if (prime[p] == true)
		{
			for (ll i = p * p; i <= n; i += p)
				prime[i] = false;
		}
	}
	for (ll p = 2; p <= n; p++)
		if (prime[p])
			isPrime[p] = 1;
}
int *dp;
ll maxCompositeSummands(ll n) {
	if (n == 2 || n == 1 || n == 3) {
		return INT_MIN;
	}
	if (dp[n] != -1) {
		return dp[n];
	}
	ll mexx = INT_MIN;
	for (ll i = 4; i <= n; i++) {
		if (!isPrime[i]) {
			mexx = max(mexx, maxCompositeSummands(n - i));
		}
	}
	return dp[n] = mexx == INT_MIN ? mexx : mexx + 1;
}
int main() {
	fast
	ll r;
	cin >> r;
	long double pi = 3.141592653;
	long double ans = 2 * pi * r;
	cout << ans << endl;
 
}

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

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

    int sum = B[0] + B[N-2];
    for(int i=0; i<N-2; i++){
        sum += min(B[i], B[i+1]);
    }
    cout << sum << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int n,a[200001],x[200001],sum[200001];
int main(){
    ios::sync_with_stdio(0);
    cin>>n;
    sum[0]=0;
    x[0]=0;
    for (int i=1;i<=n;i++){
        cin>>a[i];
        sum[i]=sum[i-1]+a[i];
        if (i==1) x[i]=a[i];
        else x[i]=x[i-1]^a[i];
        //cout<<sum[i]<<" "<<x[i]<<"\n";
    }
    
    long long ans=0;
    int l=1 ,r=1;
    while (l<=n){
        while (r+1<=n && (x[r+1]^x[l-1])==sum[r+1]-sum[l-1])
            r++;
        //cout<<l<<" "<<r<<"\n";
        ans+=r-l+1;
        l++;
    }
    cout<<ans<<"\n";
    return 0;
}

Measured memory_bytes: 2560
#include <bits/stdc++.h>
using namespace std;
 
int main() {
	
	ios_base::sync_with_stdio(false); 
    cin.tie(NULL);    
    
	 long long n,i,j,k,sum=0,count=0,ans=0,x,y,l,r,m;
     cin>>n;
     x=100;
     while(x<n)
     {
        x=x+x/100;
        count++;
     }
     cout<<count;
}

Measured memory_bytes: 3652
#include <iostream>

using namespace std;

#define MAX 100000

int parent(int i) { return i / 2; }
int left(int i) { return 2 * i; }
int right(int i) { return 2 * i + 1; }

int main()
{
    int H, i, A[MAX+1]; // 1-オリジンのため +1 する

    cin >> H;
    for (i = 1; i <= H; i++) cin >> A[i];

    for (i = 1; i <= H; i++) {
        cout << "node " << i << ": key = " << A[i] << ", ";
        if (parent(i) >= 1) cout << "parent key = " << A[parent(i)] << ", ";
        if (left(i) <= H) cout << "left key = " << A[left(i)] << ", ";
        if (right(i) <= H) cout << "right key = " << A[right(i)] << ", ";
        cout << endl;
    }

    return 0;
}


Measured memory_bytes: 3124
#include<stdio.h>
int main()
{
				int a,b;
				scanf("%d %d",&a,&b);
				if(1<=a<=16 & 1<=b<=16)
				{
								if(a>8 | b>8)
								{
												printf("\n:(");
								}
								else
								printf("\nYay!");
				}
}

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

using namespace std;

int main() {
    vector<int> a(3);
    for (int i = 0; i < 3; i++)cin >> a[i];
    int k;
    cin >> k;
    sort(a.begin(), a.end());
    for (int i = 0; i < k; i++) {
        a[2] *= 2;
    }
    cout << a[0] + a[1] + a[2];
    return 0;
}

Measured memory_bytes: 256
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main(){
    int k,a,b;
    cin >> k>>a>>b;
    if(k*(b/k)>=a){
        cout<< "OK"<<endl;
    }
    else{
        cout << "NG"<<endl;
    }
}

Measured memory_bytes: 3132
#include <bits/stdc++.h>
using namespace std;
 
int main(){

  int N;
  cin >> N;
  vector<int> boss(N-1);
  vector<int> ans(N);
  
  for(int i=0; i<N-1; i++){
    cin >> boss.at(i);
    ans.at(boss.at(i)-1)++;
  }
  
  for(int i=0; i<N; i++){
    cout << ans.at(i) << endl;
  }
}

Measured memory_bytes: 4800
/* h  t  t  p :  /  / geom . w e b . fc 2 . c o m / geometry / circle-3points . h  t  m  l */
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr=(input.trim()).split("\n");
var n=Arr.shift()-0;
for(i=0;i<n;i++){
   var arr=Arr.shift().split(" ").map(Number);
   (function(x1, y1, x2, y2, x3, y3){
      var d1 = x1*x1+y1*y1;
      var d2 = x2*x2+y2*y2;
      var d3 = x3*x3+y3*y3;
      var u = 0.5/(x1*y2-x2*y1+x2*y3-x3*y2+x3*y1-x1*y3);
      var a = u*(d1*y2-d2*y1+d2*y3-d3*y2+d3*y1-d1*y3);
      var b = u*(x1*d2-x2*d1+x2*d3-x3*d2+x3*d1-x1*d3);
      var r = Math.sqrt((a-x1)*(a-x1)+(b-y1)*(b-y1));
      console.log(a.toFixed(3)+" "+b.toFixed(3)+" "+r.toFixed(3));
   }).apply(null,arr);
}

Measured memory_bytes: 7636
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for(int i = 0; i < n; i++)
#define all(a) a.begin(), a.end()
#define P pair<int, int>
#define F first
#define S second
#define mod 1000000007
#define INF 9000000000000000000
signed main(void) {
    int d,n;cin>>d>>n;
    int D[d];rep(i,d)cin>>D[i];
    tuple<int,int,int>V[n];
    rep(i,n){
        int a,b,c;
        cin>>a>>b>>c;
        V[i]=make_tuple(a,b,c);
    }
    vector<vector<int>>dp(d,vector<int>(n,-INF));
    vector<int>Day[d];
    rep(i,d){
        rep(j,n){
            int a,b,c;
            tie(a,b,c)=V[j];
            if(a<=D[i]&&D[i]<=b)Day[i].push_back(c);
        }
    }
    rep(i,n)dp[0][i]=0;
    rep(i,d-1){
        rep(j,Day[i].size()){
            rep(k,Day[i+1].size()){
                dp[i+1][k]=max(dp[i+1][k],dp[i][j]+abs(Day[i+1][k]-Day[i][j]));
            }
        }
    }
    int ans=-INF;
    rep(i,n)ans=max(ans,dp[d-1][i]);
    cout<<ans<<endl;
    
    
    
}


Measured memory_bytes: 3424
import java.util.*;
import java.text.DecimalFormat;

public class Main
{
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int a = 0, total = 0;

		for (int i = 1; i <= 3; i++)
		{
			a = sc.nextInt();
			total += a;
		}

		if (total < 22)
			System.out.println("win");
		else
			System.out.println("bust");
	}
}

Measured memory_bytes: 23764
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;

int n;
int x[10];
int y[10];

double dist(int i, int j) {
  double dx = x[i] - x[j];
  double dy = y[i] - y[j];
  return pow(dx * dx + dy * dy, 0.5);
}

int main() {
  cin >> n;
  for (size_t i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  double sum = 0;
  for (size_t i = 0; i < n - 1; i++) {
    for (size_t j = i + 1; j < n; j++) {
      sum += dist(i, j) * 2 / n;
    }
  }

  cout << fixed << setprecision(10) << sum << endl;
  return 0;
}

Measured memory_bytes: 888
#include<bits/stdc++.h>
using namespace std;
using ll  = long long;
using vl  = vector<ll>;
using vi  = vector<int>;
#define _GLIBCXX_DEBUG
#define IO_STREAM cin.tie(0);ios::sync_with_stdio(false)
#define all(x) x.begin(),x.end()
#define rep(i,sta,end) for(int i=sta;i<end;++i)
#define lcm(a,b) (a)/__gcd((a),(b))*(b)
#define pb push_back
const ll INF = 1000000000000000;
const ll MOD = 1000000007;
const double PI = acos(-1);
//||
#define DBG(a,b,c,d) //cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<endl
//DBG("","","","");

int main(){
	IO_STREAM;
	int N;	cin>>N;
	rep(i,1,10){
		if(N%i==0&&(N/i)<10){
			cout<<"Yes"<<endl;
			return 0;
		}
	}
	cout<<"No"<<endl;
	return 0;
}


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

using namespace std;

int main(){
    int s;
    cin >> s;
    vector<int> lis;
    lis.push_back(s);
    bool stop = true;
    while (stop){
        if (s%2==0) s = s/2;
        else s = 3*s+1;
        int result = *find(lis.begin(),lis.end(),s);
        if (result == *lis.end()) lis.push_back(s);
        else stop = false;
    }
    cout << lis.size()+1 << endl;
    
}

Measured memory_bytes: 256