akhauriyash/Code-Regression huggingface dataset:
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
int main(){
  random_device rnd;
  mt19937 mt(rnd());
  int D;
  cin >> D;
  vector<int> c(26);
  for (int i = 0; i < 26; i++){
    cin >> c[i];
  }
  vector<vector<int>> s(D, vector<int>(26));
  for (int i = 0; i < D; i++){
    for (int j = 0; j < 26; j++){
      cin >> s[i][j];
    }
  }
  vector<int> last(26, -1);
  for (int i = 0; i < D; i++){
    int t = min(8, D - i);
    vector<vector<int>> L(26, vector<int>(t, 0));
    for (int j = 0; j < 26; j++){
      for (int k = 0; k < t; k++){
        L[j][k] = c[j] * (i + k - last[j]);
      }
    }
    int mx = 0;
    int a = 0;
    vector<int> best(t);
    vector<vector<int>> L2 = L;
    for (int j = 0; j < 30000; j++){
      vector<int> next(t, 0);
      if (j < 15000){
        for (int k = 0; k < t; k++){
          next[k] = mt() % 26;
        }
      } else if (j < 28000){
        next = best;
        for (int k = 0; k < 3; k++){
          int pos = mt() % t;
          int upd = mt() % 26;
          next[pos] = upd;
        }
      } else {
        next = best;
        for (int k = 0; k < 2; k++){
          int pos = mt() % t;
          int upd = mt() % 26;
          next[pos] = upd;
        }
      }
      int diff = 0;
      for (int k = 0; k < t; k++){
        diff += s[i + k][next[k]];
        for (int l = k; l < t; l++){
          diff += L2[next[k]][l] - (l - k) * c[next[k]];
          L2[next[k]][l] = (l - k) * c[next[k]];
        }
      }
      if (diff > mx){
        mx = diff;
        best = next;
      }
      for (int k = 0; k < t; k++){
        if (L2[next[k]].back() != L[next[k]].back()){
          L2[next[k]] = L[next[k]];
        }
      }
    }
    cout << best[0] + 1 << endl;
    last[best[0]] = i;
  }
}

Measured memory_bytes: 3712
#include <bits/stdc++.h>
//#define DEBUG
#define REP(i, nn ) for(int i = 0 ; i < (int) nn; i++)
#define deb(x) std::cerr << #x << " " << x << endl;
#define debl(x) std::cerr << #x << " " << x << " ";
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
//const ll LINF = 1001002003004005006ll;
//const int INF = 1001001001;
template<typename... T>
void read(T& ... a){
    ((cin >> a),...);
}
template<typename... T>
void write(T... a){
    ((cout << a << "\n"),...);
}

template<typename... T>
void write_space(T... a){
    ((cout << a << " "),...);
}
// constexpr int MOD = 1e9 + 7;
constexpr int mxN = 300;
double dp[mxN][mxN][mxN];
void solve(){
    int n;
    read(n);
    vi c(3);
    REP(i,n){
        int a;
        read(a);
        c[a-1]++;
    }
    double p = 1.0 / n;
    for(int k = 0 ; k <= n ; k++){
        for(int j = 0; j <= n; j++){
            for(int i = 0 ; i <= n ; i++){
                int d = i + j + k;
                if( d == 0 ) continue;
                if( d > n) break;
                // we must pick a plate
                dp[i][j][k] = 1;
                if( i > 0 ){
                    // p * i prob that the next pick is 1-plate
                    //result in increase empty plate
                    dp[i][j][k] += dp[i-1][j][k] * p * i;
                }
                if( j > 0 ){
                    // p * j prob that the next pick is 2-plate
                    // result in increase 1-plate
                    dp[i][j][k] += dp[i+1][j-1][k] * p * j ;
                }
                if( k > 0){
                    // p * k prob that the next pick is 3-plate
                    // result in increase 2-plate
                    dp[i][j][k] += dp[i][j+1][k-1] * p * k;
                }
                // cannot forget that we might pick empty plate 
                //
                //which will not change the result 
                int empty_plate = n - d;
                double p_empty = p * empty_plate;
                dp[i][j][k] = dp[i][j][k] / ( 1 - p_empty); 
                // debl(i) debl(j) deb(k);
                // deb(dp[i][j][k]);
            }
        }
    }
    cout << fixed << setprecision(15) <<  dp[c[0]][c[1]][c[2]] << endl;
}

int main()
{
    //making data IO Fast
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(NULL);
    /****************************/
    solve();
    return 0;
}



Measured memory_bytes: 110880
loop do
    n, x = gets.split.map(&:to_i)
    break if n == 0 && x == 0
    
    answerCount = 0
    (1..(n - 2)).each do |a|
        ((a + 1)..(n - 1)).each do |b|
            ((b + 1)..n).each do |c|
                if a + b + c == x
                    answerCount += 1
                end
            end
        end
    end
    puts answerCount
end

Measured memory_bytes: 8632
/**
 *    author:  FromDihPout
 *    created: 2020-08-29
**/

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

const int MOD = 1000000007;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    long long n, k;
    cin >> n >> k;
    
    vector<int> pref(n+1);
    for (int i = 1; i <= n; i++) {
        pref[i] = pref[i-1] + i;
        pref[i] %= MOD;
    }
    
    long long ans = 0;
    for (int i = k; i <= n + 1; i++) {
        if (i < n + 1) {
            ans += (pref[n] - pref[n-i]) - pref[i-1] + 1;
        }
        else {
            ans++;
        }
        ans = ((ans % MOD) + MOD) % MOD;
    }
    cout << ans << '\n';
    
    return 0;
}


Measured memory_bytes: 3996
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

tin=lambda : map(int, input().split())
lin=lambda : list(tin())
mod=1000000007

#+++++

def main():
	#a = int(input())
	h, w = tin()
	#s = input()
	if h==1 and w==1:
		return 1
	elif h==1 or w == 1:
		return max(h,w)-2
	else:
		return h*w + 4 - 2*h -2*w
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Measured memory_bytes: 61988
N = int(input())
a = list(map(int, input().split()))
sum = sum(a)
x = 0
y = sum
min_d = float('inf')
for i in range(N-1):
  x += a[i]
  y -= a[i]
  if abs(x-y) < min_d:
    min_d = abs(x-y)
print(min_d)


Measured memory_bytes: 23800
#include<bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define pll pair<long long, long long>
#define pci pair<char, int>
#define pic pair<int, char>
#define plvl pair<long long, vector<long long> >
#define pcvc pair<char, vector<char> >


using namespace std;

const int mod = 1e9 + 7;

ll gcd(ll a, ll b) {
	if(b == 0) {
		return a;
	}
	return gcd(b, a % b);
}

template <typename T>
void show1(vector<T> dp) {
	for(auto d : dp) {
		cout << d << " ";
	}
	cout << endl;
}

template <typename T>
void show2(vector<vector<T> > dp) {
	for(auto d : dp) {
		for(auto dd : d) {
			cout << dd << " ";
		}
		cout << endl;
	}
}

void executeCode() {
	ll x, n;
	cin >> x >> n;
	set<int> st;
	for(int i = 0 ; i < n ; i++) {
		int x;
		cin >> x;
		st.insert(x);
	}
	int mind = INT_MAX;
	int ans = -2;
	for(int i = -2; i <= 102 ; i++) {
		if(st.find(i) == st.end() && abs(x - i) < mind) {
			ans = i;
			mind = abs(x - i);
		}
	}
	cout << ans;
	return;
}

int main() {
	ios::sync_with_stdio(false);
    cin.tie(nullptr);
	int tt = 1;
	// cin >> tt;
	while(tt--) {
		executeCode();	
	}
	return 0;
}

Measured memory_bytes: 3632
N, M = map(int, input().split())

pairs = [[] for _ in range(N)]  # pairs[i]:i+1と直接つながっている部屋のリスト
for _ in range(M):
    input_list = list(map(int, input().split()))
    pairs[input_list[0] - 1].append(input_list[1] - 1)
    pairs[input_list[1] - 1].append(input_list[0] - 1)

ans = [0] * (N - 1)
n_ans = 0   # ansを埋めた回数 -> N-1になったら終了
done = [True] + [False] * (N - 1) # 探索済リスト
todo = [0]

while n_ans < N - 1:
    for n in todo:
        for m in pairs[n]:
            if not done[m]:
                done[m] = True
                ans[m - 1] = n + 1
                n_ans += 1
                todo.append(m)

print('Yes')
print(*ans, sep='\n')

Measured memory_bytes: 39816
n,m,x=map(int,input().split())
arr=[[0 for i in range(m+1)] for j in range(n)]
b=[0]*18
ans=-1
flag=1
for i in range(n):
    arr[i]=list(map(int,input().split()))
for i in range(2**n):
    b=[0]*18
    for j in range(n):
        flag=1
        if (1& i>>j):
            for s in range(m+1):
                b[s]= b[s]+arr[j][s]
        for y in range(1,m+1):
            if(b[y]<x):
                flag=0
                
        if flag :
            if ans==-1 or ans>b[0]:
                ans=b[0]
print(ans)


Measured memory_bytes: 9236
#include<bits/stdc++.h>
//ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
//clock_t start=clock();clock_t end=clock();cout<<(double)(end-start)/CLOCKS_PER_SEC<<endl;
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int ui;
typedef pair<int,int> pii;
typedef pair<pii,int> ppii;
typedef pair<int,pii> pipi;
typedef pair<ll,ll> pll;
typedef pair<pll,ll> ppll;
typedef pair<ll,pll> plpl;
typedef tuple<ll,ll,ll> tl;
typedef pair<double,double> pdd;
typedef vector<vector<ll>> mat;
ll mod=1000000007;
ll mod2=998244353;
ll mod3=1000003;
ll mod4=998244853;
ll mod5=1000000009;
ll inf=1LL<<60;
double pi=3.141592653589793238462643383279L;
double eps=1e-14;
#define rep(i,m,n) for(ll i=m;i<n;i++)
#define rrep(i,n,m) for(ll i=n;i>=m;i--)
#define srep(itr,st) for(auto itr=st.begin();itr!=st.end();itr++)
#define mrep(itr,mp) for(auto itr=mp.begin();itr!=mp.end();itr++)
#define Max(a,b) a=max(a,b)
#define Min(a,b) a=min(a,b)
int dh[4]={1,-1,0,0};
int dw[4]={0,0,1,-1};
int ddh[8]={-1,-1,-1,0,0,1,1,1};
int ddw[8]={-1,0,1,-1,1,-1,0,1};
ll gcd(ll a,ll b){
    if(a<b)swap(a,b);
    if(b==0)return a;
    if(a%b==0)return b;
    return gcd(b,a%b);
}
ll lcm(ll a,ll b){
    ll c=gcd(a,b);
    return a*b/c;
}
ll Pow(ll n,ll k){
    ll ret=1;
    ll now=n;
    while(k>0){
        if(k&1)ret*=now;
        now*=now;
        k/=2;
    }
    return ret;
}
ll beki(ll n,ll k,ll md){
  ll ret=1;
  ll now=n;
    now%=md;
  while(k>0){
    if(k%2==1){
      ret*=now;
      ret%=md;
    }
    now*=now;
    now%=md;
    k/=2;
  }
  return ret;
}
ll gyaku(ll n,ll md){
  return beki(n,md-2,md);
}
ll popcount(ll n){
    ll ret=0;
    ll u=n;
    while(u>0){
        ret+=u%2;
        u/=2;
        
    }
    return ret;
}


int main(){
    ios::sync_with_stdio(false);cin.tie(0);
    ll x;cin>>x;
    ll ans=(x/11)*2;
    x%=11;
    if(x>0&&x<=6)ans++;
    if(x>=7)ans+=2;
    cout<<ans<<endl;
}





Measured memory_bytes: 384
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<cstdio>
#include<cmath>
#include<numeric>
#define repp(i,a,b) for(int i=(int)a;i<(int)b;++i)
#define repm(i,a,b) for(int i=(int)a;i>(int)b;--i)
using ll=long long;
static const ll mod = 1e9 + 7;
static const ll INF = 1LL << 50;
using namespace std;

int main() {
	int n;
	cin >> n;
	vector<string>s(n);
	vector<int>p(n);
	vector <int>t(n);
	iota(t.begin(), t.end(), 0);//0,1,2...と初期化される
	repp(i, 0, n) {
		cin >> s[i] >> p[i];
	}
	sort(t.begin(), t.end(), [&](int x, int y) {//ラムダ式、sortの第三引数の練習
		if (s[x] == s[y])return p[x] > p[y];
		return s[x] < s[y];
		});
	for (auto i : t)cout << i + 1 << endl;//範囲ベースfor文
	return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
#include <string.h>
int main(void)
{
  char s[12], ans[12]={0};
  int j, i = 0;
  scanf("%s", s);

  for(j = 0; j < strlen(s); j++){
    if(s[j] == '0'){
      ans[i] = '0'; 
      i++;
    }else if(s[j] == '1'){
      ans[i] = '1';
      i++;
    }else if(i != 0){
      ans[i-1] = 0;
       i--;
    }
  }
  printf("%s\n", ans);
  
  return 0;
}

Measured memory_bytes: 128
N = int(input())

AB = []
sum = 0
for i in range(N):
    a, b = [int(i) for i in input().split()]
    sum -= b
    AB.append(a+b)

AB.sort(reverse=True)

count = 0
for _ in range(N//2):
    count += AB.pop(0)
    AB.pop(0)
if N%2 == 1:
    count += AB.pop(0)

print(count + sum)


Measured memory_bytes: 7388
#include<bits/stdc++.h>
using namespace std;using int32=int_fast32_t;using uint32=uint_fast32_t;using int64=int_fast64_t;using uint64=uint_fast64_t;using pi=pair<int32,int32>;using pll=pair<int64,int64>;using vi=vector<int32>;using vvi=vector<vector<int32>>;using vll=vector<int64>;using ll=int64;using ull=uint64;
#define all(x) x.begin(),x.end()
inline ll read(){ll x=0,f=1;char c=getchar();while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}while(c>='0'&&c<='9')x=x*10+c-'0',c=getchar();return x*f;}
void Main(){
    int N = read();
    vector<int> P(N);
    for(auto &p:P) p = read();
    P[max_element(all(P))-P.begin()] /= 2;
    int ans = accumulate(all(P), 0);
    printf("%d\n", ans);
}
int main(){cin.tie(nullptr);ios::sync_with_stdio(false);Main();return 0;}

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

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int min,max;
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        
        min = Math.min(a,b);
        max = Math.max(a,b);
        min = Math.min(c,min);
        max = Math.max(c,max);
        
        System.out.println(String.format("%d %d",min,max));
    }

}



Measured memory_bytes: 26264
// In the name of god
#include <bits/stdc++.h>
#pragma GCC optimize("02")
using namespace std;
using ll =long long ;
const ll maxn=1e5+5,inf=1e18+5;
ll n,m,t,a[maxn],ans;
vector <ll> v;
bool b;
string s;
int main(){
	ios::sync_with_stdio(false) , cin.tie(0) , cout.tie(0);
	cin>>s;
	if(s=="ABC")cout<<"ARC";
	else cout<<"ABC";
}


Measured memory_bytes: 3640
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <numeric>
#include <string>
#include <cmath>
#include <iomanip>
#include <queue>
#include <list>
#include <stack>
#include <cctype>
#include <cmath>

using namespace std;

/* typedef */

typedef long long ll;

/* constant */
const int NIL = -1;
const int INF = 1 << 30;
const int MAX = 250;
const int mod = 1000000007;
const double pi = 3.141592653589;
/* global variables */
vector<int> H(MAX+1, 0);
int n;

/* function */
void printAns(int ind);
int parent(int ind);
int leftChild(int ind);
int rightChild(int ind);

/* main */
int main(){

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

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

}

void printAns(int ind) {
    cout << "node " << ind << ": ";
    cout << "key = " << H[ind] << ", ";
    int p, l, r;
    p = parent(ind);
    l = leftChild(ind);
    r = rightChild(ind);
    if (p > 0)
        cout << "parent key = " << H[p] << ", ";
    if (l <= n)
        cout << "left key = " << H[l] << ", ";
    if (r <= n)
        cout << "right key = " << H[r] << ", ";
    cout << '\n';
}

int parent(int ind) {
    int p = ind / 2;
    return p;
}

int leftChild(int ind) {
    return ind * 2;
}

int rightChild(int ind) {
    return ind * 2 + 1;
}




Measured memory_bytes: 3108
#include<iostream>
#include <bits/stdc++.h>
using namespace std;
int main()
{  
    vector<char> a(4) ;
    for(int i=0;i<4;i++) cin >> a.at(i)  ;
 
    int ans = 0 ;
  
  for(int i=0;i<4;i++){
    if(a.at(i)=='+')
         ans ++ ;
      else
         ans -- ;
     }

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



Measured memory_bytes: 256
//#include <bits/stdc++.h>
//#include <stdio.h>
#include<iostream>
#include<cstdio>
#include<bitset>
#include<algorithm>
#include<vector>
#include<list>
#include<queue>
#include<stack>
#include<string>
#include<string.h>
#include<cmath>
#include<utility>
#include<functional>
#include<map>
#include<set>
#include<cctype>
#include<fstream>


#define FOR(i, a, b) for( int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for( int i=(a);i>=(b);i--)
#define LFOR(i, a, b) for( long long int i=(a);i<=(b);i++)
#define LRFOR(i, a, b) for(long long int i=(a);i>=(b);i--)
#define MOD 1000000007
#define INF 1000000000 //2000000000
#define LLINF 1000000000000000000 //9000000000000000000
#define PI 3.14159265358979
#define MAXI 7500000

using namespace std;
typedef long long int ll;
typedef pair< long long int, long long  int> P;
typedef string::const_iterator State;

int dy[5] = { 0,0,1,-1,0 };
int dx[5] = { 1,-1,0,0 ,0 };




int main(void) {

	long long int n, m;
	long long int a[100001];
	long long int count = 0;
	long long int now;

	cin >> n >> m;
	FOR(i, 1, n) {
		cin >> a[i];
	}
	vector<long long int> dp(n, 0);
	dp[0] = a[1];
	dp[0] %= m;
	FOR(i, 1, n-1) {
		dp[i] = dp[i - 1] + a[i+1];
		dp[i] %= m;

	}
	sort(dp.begin(), dp.end());
	now = 1;
	if (n != 1) {
		FOR(i, 0, n - 2) {
			if (dp[i] == dp[i + 1]) {
				now++;
			}
			else {
				count += (now)*(now - 1) / 2;
				if (dp[i] == 0) {
					count += now;
				}
				now = 1;
			}
		}
		count += (now)*(now - 1) / 2;
	}
	else {
		if (a[1] % m == 0) {
			count++;
		}
	}
	
	

	cout << count << endl;

	return 0;
}

Measured memory_bytes: 1792
#include<bits/stdc++.h>
#define ull unsigned long long
#define ll int64_t 
#define f(i,s,e) for(i=s;i<e;++i)
#define endl << "\n"
#define sp << " "
#define INF INFINITY
#define mset(a,b) memset(a,b,sizeof(a))
#define mod 1000000007
#define mp(a,b) make_pair(a,b)
#define F first
#define S second
#define all(x) x.begin(),x.end()
#define crap ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define PI 3.14159265358979323846264338327950288419716939937510
#define pb(a) push_back(a)
#define pf(a) push_front(a)
using namespace std;

int main()
{
	crap;
	ll i,j,k,n;
	cin >> n;
	vector <ll> arr(n);
	f(i,0,n)
		cin >> arr[i];
	vector <ll> ans(n);
	ll x = arr[0];
	f(i,1,n)
	{
		x = (x^arr[i]) ;
	}
	f(i,0,n)
	{
		ans[i] = (x^arr[i]) ;
 	}
 	f(i,0,n)
 		cout << ans[i] sp;
 	cout endl ;
	return 0;
}

Measured memory_bytes: 6332
from collections import defaultdict
from math import gcd

MOD = 1000000007
N = int(input())
zeros = 0
bads = defaultdict(lambda: [0, 0])
for _ in range(N):
    x, y = map(int, input().split())
    # 両方ゼロの時の例外処理
    if x == 0 and y == 0:
        zeros += 1
        continue
    # 180度回転
    if y < 0 or (y == 0 and x < 0):
        x, y = -x, -y
    g = gcd(x, y)
    x, y = x // g, y // g
    if x > 0:
        bads[(x, y)][0] += 1
    else:
        bads[(y, -x)][1] += 1

ans = 1
for k, l in bads.values():
    ans *= (pow(2, k, MOD) - 1) + (pow(2, l, MOD) - 1) + 1
    ans %= MOD
print((ans + zeros - 1) % MOD)


Measured memory_bytes: 60676
import std.stdio;
import std.algorithm;
import std.string;
import std.range;
import std.array;
import std.conv;
import std.complex;
import std.math;
import std.ascii;
import std.bigint;
import std.container;
import std.typecons;

auto readInts() {
	return array(map!(to!int)(readln().strip().split()));
}
auto readInt() {
	return readInts()[0];
}
auto readLongs() {
	return array(map!(to!long)(readln().strip().split()));
}
auto readLong() {
	return readLongs()[0];
}

void readlnTo(T...)(ref T t) {
    auto s = readln().split();
    assert(s.length == t.length);
    foreach(ref ti; t) {
        ti = s[0].to!(typeof(ti));
        s = s[1..$];
    }
}

const real eps = 1e-10;

void main(){
    auto n = readInt();
    auto l = readInts();
    l.sort();
    long ans;
    foreach(i; iota(n)) {
        ans += l[i*2];
    }
    writeln(ans);
}



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

#define MAX_N 200000
vector<int> node[MAX_N];
int addVal[MAX_N] = {};

// ---------------------------------------
// 深さ優先探索でノードの先をチェックする
// ---------------------------------------
void dfs(int _target, int _startPoint = -1)
{
	for (auto &e : node[_target])
	{
		if (_startPoint != e)
		{
			addVal[e] += addVal[_target];
			dfs(e, _target);
		}
	}
}

int main()
{
	const int MAX_Q = 200000;
	int n, q;
	cin >> n >> q;


	for (int i = 0; i < n - 1; i++)
	{
		int _a, _b;
		cin >> _a >> _b;
		_a -= 1;
		_b -= 1;
		node[_a].push_back(_b);
		node[_b].push_back(_a);
	}

	for (int i = 0; i < q; i++)
	{
		int _p, _x;
		cin >> _p >> _x;
		addVal[_p - 1] += _x;
	}



	dfs(0);

	for (int i = 0; i < n; i++)
		cout << addVal[i] << " ";
	


	return 0;
}



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

namespace Main
{
    class Program
    {
        static void Main(string[] args)
        {
            //ここから
            //int n=Readint();
            //string[] str = Console.ReadLine().Split(' ');

            int n = Readint();
            string s = Console.ReadLine();

            if (s.Length <= n) Console.WriteLine(s);
            else
            {
                for(int i = 0; i < n; i++) { Console.Write(s[i]); }
                Console.WriteLine("...");
            }

            //ここまで
        }

        
        static int Readint()
        {
            return int.Parse(Console.ReadLine());
        }

        static long Readlong()
        {
            return long.Parse(Console.ReadLine());
        }

        static int Min(int a,int b)
        {
            if (a < b) return a;
            return b;
        }

        static int Max(int a, int b)
        {
            if (a > b) return a;
            return b;
        }
        

    }

}


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

int main()
{
  int n,k;
  cin >> n >> k;
  int a[k][2];
  for(int i=0;i<k;i++){
    cin >> a[i][0] >> a[i][1];
    int p=min(a[i][0],n+1-a[i][0]);
    int q=min(a[i][1],n+1-a[i][1]);
    p=min(p,q);
    cout << (p%3==0?3:p%3) << endl;
  }
  return 0;
}


Measured memory_bytes: 3076
#pragma region Macros
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i, n) for(int i=(n); i>=0; --i)
#define FOR(i, n, m) for(int i=(m), i##_len=(n); i<i##_len; ++i)
#define EACH(i, v) for(const auto& i : v)
#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
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; }
template<class Value>using vec = vector< Value >;
using ll = long long;
using P = pair< long long, long long >;
#define fi first
#define se second
#define el endl
#pragma endregion

void Main();

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

void Main(){
    int N;
    cin >> N;
    vec<int> T(N);
    ll sum = 0;
    REP(i, N){
        cin >> T[i];
        sum += T[i];
    }
    int M;
    cin >> M;
    REP(i, M){
        int P, X;
        cin >> P >> X;
        P--;
        cout << sum-T[P]+X << el;
    }
}



Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 1; i <= n; i++)
const int mo = 1e9 + 7;
int n, a[3][101];
int ret=0;
void solve()
{
    rep(i,n)a[1][i]+=a[1][i-1];
    rep(i,n)a[2][i]+=max(a[1][i],a[2][i-1]);
    ret=a[2][n];
}
main()
{
    cin.tie(0);
    ios::sync_with_stdio(0);
    cin>>n;
    rep(i,n)cin>>a[1][i];
    rep(i,n)cin>>a[2][i];
    solve();
    cout<<ret<<endl;
    return 0;
}

Measured memory_bytes: 256
#include <stdio.h>

int main(){
  int a, b;
  char op;
  while(scanf("%d %c %d", &a, &op, &b) && op != '?'){
    if(op == '+') a += b;
    else if(op == '-') a -= b;
    else if(op == '*') a *= b;
    else if(op == '/') a /= b;
    printf("%d\n", a);
  }
  return 0;
}

Measured memory_bytes: 600
#include <stdio.h>

int main(){
    int n = 0;
    int num = 0;
    int i = 0;
    int min = 1000000;
    int max = -1000000;
    long sum = 0;
    
    scanf("%d",&n);
    
    for (i;i<n;i++){
        scanf("%d",&num);
        if(min > num){
            min = num;
        }
        
        if(max < num){
            max = num;
        }
        
        sum = sum + num;
    }
    
    printf("%d %d %ld\n",min,max,sum);
    
    return 0;
}


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

int main()
{
    int n; cin>>n;
    vector<string> a(n);
    int res=0;
    for(auto& s: a) {
        cin>>s;
        for(int i=0; i+1u<s.size(); ++i)
            res+=s[i]=='A'&&s[i+1]=='B';
    }

    int endA=0, beginB=0, both=0;
    for(int i=0; i<n; ++i) {
        if (a[i][0]=='B') {
            (a[i].back()=='A' ? both : beginB)++;
        }
        else if (a[i].back()=='A') {
            endA++;
        }
    }

    if (both>0) {
        res+=both-1;
        if (endA>0) { ++res; --endA; }
        if (beginB>0) { ++res; --beginB; }
    }
    res+=min(endA, beginB);
    cout<<res<<endl;
}


Measured memory_bytes: 768
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <cmath>
#include <tuple>
#include <queue>
#include <bitset>
#include <set>
#include <map>
#include <list>

using ll = long long;
using ld = long double;
using namespace std;
const int INF = 1e9+100;
const ll INF64 = 7e18l;
const int mod = 1000000007;
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define ALL(a) (a).begin(), (a).end()
#define FIN ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);


int main(){
    FIN;
    ll n; cin >> n;
    if(n == 1){cout << 1 << endl; return 0;}
    map<ll,ll> a;

    for(ll cur=2;cur<=n;cur++){
        ll cur2 = cur;
        for(ll i=2;i*i<=cur2;i++){
            int num = 0;
            if(cur2 % i == 0){
                while(cur2 % i == 0){
                    cur2 /= i;
                    a[i]++;
                }
            }
        }
        if(cur2 != 1) a[cur2]++;
    }

    ll ans = 1;
    map<ll,ll>::iterator it;
    for(it=a.begin();it!=a.end();it++){
        ans *= it->second + 1;
        ans %= mod;
    }

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


Measured memory_bytes: 3672
//的場梨沙★担当
//結城晴★副担当
//日野茜★副担当
#include <vector>
#include <list>
#include <map>
#include <climits>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string.h>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
#include <random>
#include <cctype>
#include <complex>
#include <regex>
#include <unordered_map>
#include <string>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <stdio.h>


using namespace std;

int main(void) {
    int N;
    cin>>N;
    vector<int>A(N);
    for(int i=0;i<N;i++)cin>>A[i];
    sort(A.begin(),A.end());
    int ans=0;
    ans=A[N-1]-A[0];

    cout<<ans<<endl;
}


Measured memory_bytes: 256
#include <stdio.h>
long long max(long long a,long long b){return a>b?a:b;}
int main(void){
    long long n,c;
    scanf("%lld%lld",&n,&c);
    long long x[n],v[n],sum[n];
    for (int i=0; i<n; i++){
        scanf("%lld%lld",&x[i],&v[i]);
        if (i==0){
            sum[i]=v[i];
        } else {
            sum[i]=sum[i-1]+v[i];
        }
    }
    long long a1[n+1],a2[n+1],b1[n+1],b2[n+1];
    a1[0]=0;
    a2[0]=0;
    for (int i=0; i<n; i++){
        a1[i+1]=max(a1[i],sum[i]-x[i]);
        a2[i+1]=max(a2[i],sum[i]-x[i]-x[i]);
    }

    for (int i=n-1; i>=0; i--){
        if (i==n-1){
            sum[i]=v[i];
        } else {
            sum[i]=sum[i+1]+v[i];
        }
    }
    b1[0]=0;
    b2[0]=0;
    for (int i=0; i<n; i++){
        b1[i+1]=max(b1[i],sum[n-1-i]-(c-x[n-1-i]));
        b2[i+1]=max(b2[i],sum[n-1-i]-(c-x[n-1-i])-(c-x[n-1-i]));
    }

    long long ans=0;
    for (int i=0; i<n+1; i++){
        ans=max(ans,b1[i]+a2[n-i]);
        ans=max(ans,b2[i]+a1[n-i]);
    }
    printf("%lld\n",ans);
    return 0;
}


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


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

if(a < b)
{
cout << "a < b" << endl;
}
if(a == b)
{
cout << "a == b" << endl;
}
if(a > b)
{
cout << "a > b" << endl;
}

return 0;
}


Measured memory_bytes: 3084
#include <stdio.h>
 
int main(){
	int a,b,c,n;
	scanf("%d", &a);
	scanf("%d", &b);
	scanf("%d", &c);
	n=c-a+b;
	if(n>0){
		printf("%d",n);
	}else{
		printf("0");
	}
	return 0;
}

Measured memory_bytes: 128
// 26
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define fors(_, x, n, s) for (int _ = x; _ < n; _ += s)
#define forn(_, x, n) fors(_, x, n, 1)
#define rep(_, n) forn(_, 0, n)
#define forrs(_, x, n, s) for (int _ = x; _ > n; _ -= s)
#define forrn(_, x, n) forrs(_, x, n, 1)
#define rrep(_, n) forrn(_, n - 1, -1)
#define fi first
#define se second
#define pb push_back
#define pairii pair<int, int>
#define all(x) x.begin(), x.end()
#define lli __int128_t
#define li long long int
#define ld long double
#ifdef LOCAL
#define debug(e) cerr << "\033[48;5;196m\033[38;5;15m" << e << "\033[0m";
#else
#define debug(e)
#endif
// 4
template <class A, class B>
ostream &operator<<(ostream &os, pair<A, B> &p) {
  return os << "(" << p.fi << " " << p.se << ")";
}
// 8
template <class T>
ostream &operator<<(ostream &os, vector<T> &v) {
  rep(i, (int)v.size()) os << setw(7) << left << v[i];
  return os << endl;
}
// 5
template <class A, class B>
ostream &operator<<(ostream &os, map<A, B> &m) {
  for (auto &kv : m) os << kv;
  return os;
}
auto f(int stones, vector<int>& isWinning, vector<int>& a) -> bool {
  if (stones == 0) return 0;
  if (stones < 0) return 1;
  if (isWinning[stones] != -1) return isWinning[stones];
  for (int& x : a) {
    if (!f(stones - x, isWinning, a)) {
      isWinning[stones] = 1;
    }
  }
  if (isWinning[stones] == -1) isWinning[stones] = 0;
  return isWinning[stones];
};

// 3
void _main(int tc) {
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  rep(i, n) cin >> a[i];

  vector<int> isWinning(k + 1, -1);

  cout << (f(k, isWinning, a) ? "First" : "Second") << endl;

  // vector<bool> isWinning(k + 1);
  // rep(stones, k + 1) {
  //   for (int &x : a) {
  //     if (stones - x >= 0 && !isWinning[stones - x]) isWinning[stones] =
  //     true;
  //   }
  // }
  // cout << (isWinning[k] ? "First" : "Second") << endl;
}
// 7
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  _main(0), exit(0);
  int tc;
  cin >> tc;
  rep(i, tc) _main(i + 1);
}

Measured memory_bytes: 6912
#include <cmath>
#include <iostream>

using namespace std;

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

    int sum = 0;
    for (int i = 1, min = abs(l); i < n; i++) {
        if (min > abs(l + i)) {
            min = abs(l + i);
            sum += l + i - 1;
        } else {
            sum += l + i;
        }
    }

    cout << sum << endl;
}


Measured memory_bytes: 256
#define S scanf
d[1001],c;
main(w,n,i,C,W,b){
  for(;S("%d",&w),w;printf("Case %d:\n%d\n%d\n",++c,d[w],b),bzero(d,4004))
      for(S("%d",&n);n--;)
          for(i=w,S("%d,%d",&C,&W);i>=W;i--)
              d[i]=fmax(d[i],d[i-W]+C),b=d[i]-d[w]?b:i;
}

Measured memory_bytes: 0
N = int(input())
S = input()

penals1 = []
tmp1 = 0
penals2 = []
tmp2 = 0

# 半分まで準備
N_even = (N % 2 == 0)
half_N = N // 2 if N_even else (N-1) // 2 

if N == 1:
    min_val = 0
else:
    for i in range(half_N):
        if S[i] == "#":
            tmp1 += 1
        penals1.append(tmp1)

        if S[N-1-i] == ".":
            tmp2 += 1
        penals2.append(tmp2)

    if N_even:
        min_val = penals1[half_N-1] + penals2[half_N-1] 

        j = 1
        for i in range(half_N, N):
            if S[i] == "#":
                tmp1 += 1
            #penals1.append(tmp1)
            val1 = tmp1 + penals2[half_N-1-j]

            if S[N-1-i] == ".":
                tmp2 += 1
            #penals2.append(tmp2)
            val2 = penals1[half_N-1-j] + tmp2

            min_val = min(min_val, val1, val2)
            j += 1

    else:
        first = True
        j = 0

        # N = (N-1) // 2 + (N-1) // 2 + 1
        for i in range(half_N, N):
            if S[i] == "#":
                tmp1 += 1
            val1 = tmp1 + penals2[half_N-1-j]

            if S[N-1-i] == ".":
                tmp2 += 1
            val2 = penals1[half_N-1-j] + tmp2

            if first:
                min_val = min(val1, val2)
                first = False
            else:
                min_val = min(min_val, val1, val2)
            j += 1

    if S[N-1] == "#":
        tmp1 += 1
    if S[0] == ".":
        tmp2 += 1

    min_val = min(tmp1, tmp2, min_val)
print(min_val)

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

const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<(n);++i)
#define REPR(i,n) for(int i=n;i>=0;i--)
#define ALL(v) (v.begin(),v.end())
#define COUT(x) cout<<(x)<<endl

int count(vector<int> v){
    int n = v.size();
    vector<int> x(n);
    REP(i,n){x[i]=i+1;}
    int itr = 0;
    do{
        if(x==v)break;
        itr++;
    }while(next_permutation(x.begin(),x.end()));
    
    return itr;
}

int main(){
    int n;
    cin >> n;
    vector<int> p(n);
    vector<int> q(n);
    REP(i,n){cin>>p[i];}
    REP(i,n){cin>>q[i];}
    cout << abs(count(p)-count(q)) << endl;
    return 0;
}  


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define piii pair<int,pii>
#define pll pair<ll,ll>
#define plii pair<ll,pii>
#define vi vector<int>
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define SORT(x) sort(x.begin(), x.end())
#define GSORT(x) sort(x.begin(), x.end(), greater<int>())
#define mx 100001
#define eps 0.00000000001
#define mod 1000000007
#define pi acos(-1)
#define inf 100000000
#define loop(i,b,n) for(int i=b;i<n;++i)
#define rev_loop(i,b,n) for(int i=b;i>=n;--i)
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;
int main()
{
    fio;
    int t;
    cin>>t;
    pair<string,int> p1[4];

        p1[0].ff = "AC";
        p1[0].ss =  0;
        p1[1].ff = "WA";
        p1[1].ss =  0;
        p1[2].ff = "TLE";
        p1[2].ss =  0;
        p1[3].ff = "RE";
        p1[3].ss =  0;

    while(t--){
            string s1;
    cin>>s1;
    if(s1=="AC")
        p1[0].ss++;
    else if(s1=="WA")
        p1[1].ss++;
     else if(s1=="TLE")
        p1[2].ss++;
         else if(s1=="RE")
        p1[3].ss++;

    }
    loop(i,0,4)
    {
        cout<<p1[i].ff<<" x "<<p1[i].ss<<endl;
    }
    return 0;
}



Measured memory_bytes: 3648
/// @pSaurabh

#include <bits/stdc++.h>

using namespace std;

#define read(a, n) for(int i = 0; i < n; i++) cin >> a[i];
#define print(a, n) for(int i = 0; i < n; i++) cout << a[i] << " ";

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

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

struct item{
	ll wt;
	ll val;
};

bool comp(item i, item j){
	return i.wt < j.wt;
}

int main(){
	// fast();

	ll n, w;
	cin >> n >> w;

	item a[n + 1];
	for(int i = 1; i <= n; i++){
		cin >> a[i].wt >> a[i].val;
	}

	ll dp[n + 1][w + 1];

	for(ll i = 0; i <= n; i++){
		for(ll j = 0; j <= w; j++){
			if(i == 0 || j == 0){
				dp[i][j] = 0;
				continue;
			}

			if(a[i].wt <= j){
				// cout << "Exec1 ";
				dp[i][j] = max(dp[i - 1][j], a[i].val + dp[i - 1][j - a[i].wt]);
				// cout << dp[i][j] << "\n";
			}
			else{
				// cout << "Exec2 ";
				dp[i][j] = dp[i - 1][j];
				// cout << dp[i][j] << "\n";
			}
		}
	}

	// for(int i = 0; i <= n; i++){
	// 	for(int j = 0; j <= w; j++){
	// 		cout << dp[i][j] << "\t";
	// 	}
	// 	cout << "\n";
	// }

	cout << dp[n][w];

	return 0;
}


Measured memory_bytes: 79104
#include<cstdio>
int N,X;
int main()
{
  scanf(" %d %d",&N,&X);
  int l=X-N+1,r=X+N-1;
  if(l<-1000000)l=-1000000;
  if(r>1000000)r=1000000;
  for(int i=l;i<=r;++i)printf("%d ",i);
  return 0;
}

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

typedef unsigned long long ull;
const ull x = 1000000007;

bool contains(string str, string pre){
    int slen = str.length(), plen = pre.length();
    if(slen < plen) return false;
    ull target = 0;
    for(int i = 0; i < plen; i++){
        target = target * x + pre[i];
    }
    ull tmp = 1;
    for(int i = 0; i < plen; i++)   tmp *= x;
    ull val = 0;
    for(int i = 0; i < plen; i++)   val = val*x + str[i];
    for(int i = plen; i <= slen; i++){
        if(val == target)   return true;
        if(i < slen)    val = val * x - str[i-plen]*tmp + str[i];
    }
    return false;
}

int f(string s, string t){
    int k = min(s.length(), t.length()), slen = s.length();
    int ret = 0;
    ull a = 0, b = 0, tmp = 1;
    for(int i = 1; i <= k; i++){
        a = a + s[slen-i]*tmp;
        b = b*x + t[i-1];
        if(a == b)  ret = i;
        tmp *= x;
    }
    return t.length()-ret;
}

int dp[15][1<<15];

int main(){
    int n;
    while(cin >> n, n){
        vector<string> v(n);
        for(int i = 0; i < n; i++)  cin >> v[i];
        vector<string> s;
        for(int i = 0; i < n; i++){
            bool tmp = false;
            for(int j = 0; j < n; j++){
                if(i == j)    continue;
                tmp |= contains(v[j], v[i]);
            }
            if(!tmp)    s.push_back(v[i]);
        }
        n = s.size();
        memset(dp, 0x7F, sizeof(dp));
        for(int i = 0; i < n; i++)  dp[i][1<<i] = s[i].length();
        for(int b = 0; b < 1<<n; b++){
            for(int i = 0; i < n; i++){
                if(dp[i][b] == 1<<30)   continue;
                for(int j = 0; j < n; j++){
                    if((b>>j)&1)    continue;
                    dp[j][b|(1<<j)] = min(dp[j][b|(1<<j)], dp[i][b] + f(s[i], s[j]));
                }
            }
        }
        int ans = 1<<30;
        for(int i = 0; i < n; i++){
            ans = min(ans, dp[i][(1<<n)-1]);
        }
        cout << ans << endl;
    }
    return 0;
}



Measured memory_bytes: 4972
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys  # {{{
import os
import time
import re
from pydoc import help
import string
import math
from operator import itemgetter
from collections import Counter
from collections import deque
from collections import defaultdict as dd
import fractions
from heapq import heappop, heappush, heapify
import array
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy as dcopy
import itertools
# }}}

# pre-defined{{{
sys.setrecursionlimit(10**7)
INF = 10**20
GOSA = 1.0 / 10**10
MOD = 10**9+7
ALPHABETS = [chr(i) for i in range(ord('a'), ord('z')+1)]  # can also use string module
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def DP(N, M, first): return [[first] * M for n in range(N)]
def DP3(N, M, L, first): return [[[first] * L for n in range(M)] for _ in range(N)]
from inspect import currentframe
# }}}

def solve():
    s = input()
    if s == "ABC":
        print("ARC")
    else:
        print("ABC")

    return 0

if __name__ == "__main__":# {{{
    solve()

# vim: set foldmethod=marker: }}}


Measured memory_bytes: 93796
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(I,A,B) for(ll I = (A); I < (B); ++I)
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin()) //ai>=v  x is sorted
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin()) //ai>v  x is sorted
#define NUM(x,v) (POSU(x,v)-POSL(x,v))  //x is sorted
#define SORT(x) (sort(x.begin(),x.end())) // 0 2 2 3 4 5 8 9
#define REV(x) (reverse(x.begin(),x.end())) //reverse
#define TO(x,t,f) ((x)?(t):(f))
#define CLR(mat) memset(mat, 0, sizeof(mat))
#define FILV(x,a) fill(x.begin(),x.end(),a)
#define FILA(ar,N,a) fill(ar,ar+N,a)
#define NEXTP(x) next_permutation(x.begin(),x.end())
ll gcd(ll a,ll b){if(a<b)swap(a,b);if(a%b==0)return b;else return gcd(b,a%b);}
ll lcm(ll a,ll b){ll c=gcd(a,b);return ((a/c)*(b/c)*c);}//saisyo kobaisu
#define pb push_back
#define pri(aa) cout<<(aa)<<endl

const ll INF=1e9+7;
const ll N = 102;
ll a,b,c,d,e,f;
double noudo=0;
bool dp[31][3001];
ll anss,answ;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin>>a>>b>>c>>d>>e>>f;
	answ=a*100;
	anss=0;
	dp[0][0]=true;
	FOR(i,0,f/100+1){
		FOR(j,0,f+1){
			if(dp[i][j]==true){
				if(j+c<=f)dp[i][j+c]=true;
				if(j+d<=f)dp[i][j+d]=true;
				if(i+a<=f/100)dp[i+a][j]=true;
				if(i+b<=f/100)dp[i+b][j]=true;
			}
		}
	}
	FOR(i,1,f/100+1){
		FOR(j,0,f+1){
			if(dp[i][j]==true&&(i*100.0+j<=f)&&(j<=e*i)){
				if(noudo<(double)j*100.0/(double)(i*100.0+j)){
					noudo=(double)j*100.0/(double)(i*100.0+j);
					answ=i*100;
					anss=j;
				}
			}
		}
	}
	cout<<answ+anss<<" "<<anss<<endl;
	return 0;
}


Measured memory_bytes: 384
#include <bits/stdc++.h>
using namespace std;
typedef long long lint;
typedef vector<lint> vlint;

#define inf 1e+9
#define endl "\n"
#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 all(x) (x).begin(), (x).end()

#define pb push_back
#define eb emplace_back
#define Size(c) (int)(c).size()

#define lb(c, x) distance((c).begin(), lower_bound(all(c), (x)))
#define ub(c, x) distance((c).begin(), upper_bound(all(c), (x)))

template <class T> using pq = priority_queue<T>;
template <class T> using pqg = priority_queue<T, vector<T>, greater<T>>;

template <class T, class S> inline bool chmax(T &a, S b) {
    if(a < b) {a = b;return 1;} return 0;
}
template <class T, class S> inline bool chmin(T &a, S b) {
    if(a > b) {a = b;return 1;} return 0;
}
template <class T>
void line(vector<T> &x){for (auto&& xi : x) cin >> xi;}

inline void IN(void){ return;}

template <typename First, typename... Rest>
void IN(First& first, Rest&... rest){ cin >> first; IN(rest...); return;}

#define INT(...) int __VA_ARGS__; IN (__VA_ARGS__)
#define LINT(...) lint __VA_ARGS__; IN (__VA_ARGS__)
#define STR(...) string __VA_ARGS__; IN(__VA_ARGS__)

template <class T> void UNIQUE(vector<T> &x) {
    sort(all(x)); x.erase(unique(all(x)), x.end());
}
template <class T> void print_vec(T first, T end){
    for (auto i = first; i < end - 1; i++) cout << *i << " ";
    cout << *(end-1) << endl;
}
template <class T> void print(T a){ cout << a << endl;};
vector<string> Yes = {"No", "Yes"};
vector<string> YES = {"NO", "YES"};

lint popcount(lint n){
    int res = 0;
    for (int i = 0; i < 32; ++i){
        if (n & (1 << i)) res++;
    }
    return res;
};



int main(){
    INT(n);
    vlint ans(n+1, 0); lint cnt;
    rep1(x, sqrt(n)+1){
        rep1(y, sqrt(n)+1){
            rep1(z, sqrt(n)+1){
                cnt = x*x + y*y + z*z + x*y + y*z + z*x;
                if (cnt > n) break;
                ans[cnt] ++;
            }
        }
    }
    rep1(i, n+1){
        print(ans[i]);
    }
}


Measured memory_bytes: 3676
#include<iostream>

using namespace std;

int main() {
  int a, b, c;
  cin >> a >> b >> c;
  if(a == b && a == c) cout << '1' << endl;
  else if((a == b || b == c || a==c) || (b == c && a != b)) cout << '2' << endl;
  else cout << '3' << endl;
}


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

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

	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);

	int groupA[7] = {1,3,5,7,8,10,12};
	int groupB[4] = {4,6,9,11};
	int groupC[1] = {2};

	int x,y;
	cin >> x >> y;

	int xGroup, yGroup;
	for (int i = 0; i < 7; ++i)
	{
		if (x == groupA[i]) xGroup = 1;
		if (y == groupA[i]) yGroup = 1;
	}

	for (int i = 0; i < 4; ++i)
	{
		if (x == groupB[i]) xGroup = 2;
		if (y == groupB[i]) yGroup = 2;
	}

	if (x == groupC[0]) xGroup = 3;
	if (y == groupC[0]) yGroup = 3;

	if (xGroup == yGroup) cout << "Yes";
	else cout << "No";

	return 0;

}

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

int main() {
	string s;
	cin>>s;
	int ans=0;
	for(long int i=0;i<s.length();i++)
	{
	    ans=(ans+s[i]-'0')%9;
	}
	if(ans==0)
	cout<<"Yes"<<endl;
	else
	cout<<"No"<<endl;
	return 0;
}


Measured memory_bytes: 3752
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef vector<pii> vii;
#define sz(c) (int)(c).size()
#define ALL(c) (c).begin(), (c).end()

void solve (int n)
{
    int x;
    cin >> x;
    assert(n >= 2);
    assert(1 <= x && x <= 2 * n - 1);

    if (x == 1 || x == 2 * n - 1)
    {
        cout << "No" << endl;
        return;
    }

    vi ans(2 * n - 1);

    if (n == 2)
    {
        assert(x == 2);
        iota(ALL(ans), 1);
    }
    else
    {
        ans[n - 1] = x;
        ans[n] = x + 1;
        ans[n - 2] = x - 1;
        if (x + 1 != 2 * n - 1)
            ans[n - 3] = x + 2;
        else
        {
            assert(x - 1 != 1);
            ans[n + 1] = x - 2;
        }
    }

    vector<char> used(2 * n);
    for (int x : ans)
        used[x] = 1;

    int h = 1;
    for (int i = 0; i < sz(ans); i++)
    if (ans[i] == 0)
    {
        while (h < sz(used) && used[h])
            h++;

        assert(h != sz(used));
        ans[i] = h;
        used[h] = 1;
    }

    cout << "Yes" << endl;
    for (int i = 0; i < 2 * n - 1; i++)
        cout << ans[i] << '\n';
}

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

    int n;
    while (cin >> n)
        solve(n);
}


Measured memory_bytes: 2560
#include<bits/stdc++.h>
using namespace std;
#define ALL(v) (v).begin(),(v).end()
#define REP(i,p,n) for(int i=p;i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define SZ(x) ((int)(x).size())
#define INF 999999999
typedef long long int Int;
using ll = long long;
using VI = vector<int>;
int gcd(Int a, Int b) {
  return b != 0 ? gcd(b, a % b) : a;
}
int lcm(Int a, Int b) {
  return a / gcd(a, b)*b;
}
int main(){
  int n;
  cin >> n;
  vector<double> a;
  rep(i,n){
    double x;cin >> x;
    a.push_back(x);
  }
  while(a.size()>=2){
    sort(a.begin(), a.end(), std::greater<int>() );
    double x=a.back();
    a.pop_back();
    double y=a.back();
    a.pop_back();
    x = (x+y)/2;
    a.push_back(x);
  }
  for(int i=0;i<a.size();i++) cout << a.at(i) << endl;
}


Measured memory_bytes: 256