akhauriyash/Code-Regression huggingface dataset:
#include <iostream> 
#include <string> 
#include <vector> 

using namespace std;

int ceil(int a){
    if(a%10 ==0){
        return a;
    } else {
        return int(a/10)*10 + 10;
    }
}

int main(){
    int input[5];
    vector<int> ceils(5);
    vector<int> sums(5);

    for(int i=0; i < 5; i++){
        cin >> input[i];
        ceils.at(i) = ceil(input[i]);
    }

    int all_sum = 0;
    for(int i=0; i < 5; i++){
        all_sum += ceils.at(i);
    }

    int min_sum = 100000000;
    for(int i=0; i < 5; i++){
        sums.at(i) = all_sum - ceils.at(i) + input[i];
        if(min_sum > sums.at(i)){
            min_sum = sums.at(i);
        }
    }
    cout << min_sum << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define mod 998244353 
int32_t main()
{
 	int n,m;
 	cin>>n>>m;
 	if(n<m)
 		cout<<0;
 	else
 		cout<<10;
}

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

using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;
using pll = pair<ll,ll>;

#define INF (1LL << 60)
#define MOD 1000000007
#define PI 3.14159265358979323846

#define REP(i,m,n) for(ll (i)=(m),(i_len)=(n);(i)<(i_len);++(i))
#define FORR(i,v) for(auto (i):v)
#define ALL(x) (x).begin(), (x).end()
#define PR(x) cout << (x) << endl
#define PS(x) cout << (x) << " "
#define SZ(x) ((ll)(x).size())
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define REV(x) reverse(ALL((x)))
#define ASC(x) sort(ALL((x)))
#define DESC(x) ASC((x)); REV((x))
#define pb push_back
#define eb emplace_back

int main()
{
    ll N;
    cin >> N;
    vec b(N+1, 0);
    REP(i,1,N+1) cin >> b[i];

    bool f = true;
    ll s = N, k;
    vec a;
    while(s > 0) {
        k = s;
        while(k > 0 && b[k] != k) --k;
        if(k == 0) {
            f = false;
            break;
        }
        b.erase(b.begin() + k);
        --s;
        a.pb(k);
    }
    if(f) {
        REV(a);
        FORR(x,a) PR(x);
    }
    else {
        PR(-1);
    }

    return 0;
}

/*



*/

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

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 1e5 + 10;
int arr[N][3];
int dp[N][3];
int n;

int f(int id, int t){
    if(id >= n) return 0;
    if(t == -1){
        dp[id][0] = f(id+1,1) + arr[id][0];
        dp[id][1] = f(id+1,2) + arr[id][1];
        dp[id][2] = f(id+1,3) + arr[id][2];
        return max3(dp[id][0], dp[id][1], dp[id][2]);
    }
    if(dp[id][t] != -1) return dp[id][t];
    if(t == 1){
        dp[id][t] = f(id+1,2) + arr[id][1];
        dp[id][t] = max(dp[id][t], f(id+1,3) + arr[id][2]);
        return dp[id][t];
    }
    if(t == 2){
        dp[id][t] = f(id+1,1) + arr[id][0];
        dp[id][t] = max(dp[id][t], f(id+1,3) + arr[id][2]);
        return dp[id][t];
    }
    if(t == 3){
        dp[id][t] = f(id+1,2) + arr[id][1];
        dp[id][t] = max(dp[id][t], f(id+1,1) + arr[id][0]);
        return dp[id][t];
    }
}

int main()
{
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    for(i = 0; i < n; i++){
        cin>>arr[i][0]>>arr[i][1]>>arr[i][2];
    }
    mem(dp,-1);
    cout << f(0,-1) << endl;
    return 0;
}


Measured memory_bytes: 7296
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x).size()
#define F first
#define S second
#define forn(i, n) for (int i = 0; i < (int)n; i++)
#define pb push_back
#define fastIO ios::sync_with_stdio(0), cin.tie(0);
#define endl '\n'
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int, int> pii;
int main() {
#ifdef LOCAL
    // freopen("in.txt", "r", stdin);
    // freopen("out.txt", "w", stdout);
#else
    fastIO;
#endif
    int n, k;
    cin >> n >> k;
    int arr[n];
    forn(i, n) cin >> arr[i];
    sort(arr, arr + n);
    int sum = 0;
    for (int i = n - 1; i >= n - k; i--) {
        sum += arr[i];
    }
    cout << sum << endl;
    return 0;
}

Measured memory_bytes: 384
mul [] = 1
mul (a:as) = a * (mul as)

takeSub r = map tail $ takeWhile (\ a -> '.' == (head a)) r
dropSub r = dropWhile (\ a -> '.' == (head a)) r

func op r = op $ calc2 $ takeSub r

calc2 [] = []
calc2 ("+":r) = (func sum r):(calc2 $ dropSub r)
calc2 ("*":r) = (func mul r):(calc2 $ dropSub r)
calc2 (n:r) = (read n):(calc2 r)

calc1 ("+":r) = func sum r
calc1 ("*":r) = func mul r

calc1 (n:_) = read n :: Int

ans ("0":_) = []
ans (n:ns) =
  let n'= read n :: Int
      d = take n' ns
      r = drop n' ns
      a = calc1 d
  in
    a:(ans r)

main = do
  c <- getContents
  let i = lines c
      o = ans i
  mapM_ print o



Measured memory_bytes: 4300
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;

#define F first
#define S second
#define pb push_back
#define eb emplace_back
#define PI 3.14159265359
#define sz(c) (int)c.size()
#define len(c) (int)c.length()
#define hcf(a, b) __gcd(a, b)
#define all(c) c.begin(), c.end()
#define vint vector<int>
#define vll vector<ll>
#define vpint vector<pair<int, int>>
#define vpll vector<pair<ll, ll>>
#define tr(con, it) \
    for (auto it = con.begin(); it != con.end(); it++)
#define fr(it, a, b) \
    for (int it = (a); it < (b); it++)
#define present(con, ele) (con.find(ele) != con.end())
#define cpresent(con, ele) (find(all(con), ele) != con.end())
#define maximum(a, b, c) (a > b ? (a > c ? a : c) : (b > c ? b : c))
#define minimum(a, b, c) (a < b ? (a < c ? a : c) : (b < c ? b : c))
typedef long long ll;
typedef long double lf;
typedef unsigned long long lu;
const ll mod = 1e9 + 7;
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll a, b, c;
    cin>>a>>b>>c;
    c=min(c,b-1);
    cout<<((a*c)/b)-a*(c/b)<<endl;
    return 0;
}

Measured memory_bytes: 3612
#include <bits/stdc++.h>
#define WHOLE(v) (v).begin(), (v).end()
#define REV_WHOLE(v) (v).rbegin(), (v).rend()
using i64 = int64_t;
using namespace std;
template<class F>auto recursive(F f){return[f](auto...a){return f(f,a...);};}
template<class T>using rev_priority_queue=priority_queue<T,vector<T>,greater<T>>;
template<class T>using vector2d=vector<vector<T>>;
struct fixprec{int p;fixprec(int p):p(p){}};
ostream&operator<<(ostream&o,fixprec f){return o<<fixed<<setprecision(f.p);}
int main() {
    int N, M;
    cin >> N >> M;
    for(int i = 0; i < M; i++) {
        int l = i + 1, r = 2 * M + 1 - i;
        if(N % 2 == 0 && i >= M / 2) {
            r--;
        }
        cout << l << " " << r << endl;
    }
    return 0;
}

Measured memory_bytes: 3608
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <memory.h>
#include <math.h>

using namespace std;
typedef long long LL;
const int maxn = 100005;

LL a[maxn],t[maxn];int n,cnt,m,ans;
int prm[maxn],tot,is[maxn],ord[maxn];

void predo(int n) {
	for (int i=2;i<=n;i++)
	{
		if (!is[i]) prm[++tot]=i;
		for (int j=1;j<=tot;j++)
		{
			int num=prm[j]*i;
			if (num>n) break;
			if (i%prm[j]) is[num]=1;
			else {is[num]=1;break;}
		}
	}
}
void solve(LL n)
{
	LL u=1ll,v=1ll;
	for (int i=1;i<=tot;i++)
	if (n%prm[i]==0) {
		int cnt=0,x=prm[i];
		while (n%x==0) n/=x,++cnt;
		cnt%=3;
		if (cnt==1) u*=x,v*=x*x;
		if (cnt==2) u*=x*x,v*=x;
	}
	LL n_=sqrt(n);
	if (n_*n_==n) u*=n,v*=n_;
	else if (n>(int)1e5) {ans++;return ;}
	else {u*=n;v*=n*n;}
	if (u==1) ++cnt;
	else {t[++m]=min(u,v);a[m]=v;}
}

bool comp(int x,int y) {return t[x]<t[y];}
int main()
{
	#ifdef Amberframe
		freopen("agc003d.in","r",stdin);
		freopen("agc003d.out","w",stdout);
	#endif
	scanf("%d",&n);predo((int)2200);
	for (int i=1;i<=n;i++) scanf("%lld",&a[i]);
	for (int i=1;i<=n;i++) solve(a[i]);
	for (int i=1;i<=m;i++) ord[i]=i;
	sort(ord+1,ord+m+1,comp);
	
	for (int i=1;i<=m;)
	{
		int pos=i,c1=0,c2=0;
		while (pos<=n&&t[ord[pos]]==t[ord[i]]) {
			a[ord[pos]]==a[ord[i]]?c1++:c2++;++pos;
		}
		ans+=max(c1,c2);i=pos;
	}
	printf("%d",ans+(cnt?1:0));
	return 0;
}

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

using ll = long long;

#define dump(x) cerr << #x << "=" << x << endl
#define dump2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define dump3(x, y, z)                                                     \
  cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z \
       << endl
#define check(s) cerr << s << endl

#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define unique(v) v.erase(unique(v.begin(), v.end()), v.end());

vector<int> dx = {0, 1, 0, -1};
vector<int> dy = {1, 0, -1, 0};

const ll LINF = 2e18;
const int INF = 1e9;

void solve(ll A, ll B, ll K) {
  ll r = A - K;
  if (r >= 0) {
    cout << r << " " << B << endl;
  } else {
    if (B + r >= 0) {
      cout << 0 << " " << B + r << endl;
    } else {
      cout << "0 0" << endl;
      ;
    }
  }
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  ll A;
  scanf("%lld", &A);
  ll B;
  scanf("%lld", &B);
  ll K;
  scanf("%lld", &K);
  solve(A, B, K);
  return 0;
}


Measured memory_bytes: 3636
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int (i)=0;i<(n);i++)
#define REP(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
#define MOD 1000000007
#define fcout cout << fixed << setprecision(15)
#define int long long
#define yorn(f) puts((f)?"Yes":"No")
#define YORN(f) puts((f)?"YES":"NO")
typedef long long ll;
typedef pair<int, int> P;
int gcd(int a,int b){return b?gcd(b,a%b):a;};
int lcm(int a,int b){return a/gcd(a,b)*b;};
int mod(int a,int b){return (a+b-1)/b;};
template<typename A, size_t N, typename T>
void Fill(A(&array)[N],const T &val){std::fill((T*)array,(T*)(array+N),val);}
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;};



signed main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    
    int n;
    cin >> n;
    int a[n];
    rep(i, n) cin >> a[i];
    int sum[n] = {};
    sum[0] = a[0];
    REP(i, 1, n) {
        sum[i] = sum[i-1] + a[i];
    }

    int ans = LLONG_MAX;
    REP(i, 0, n-1) {
        int d1 = sum[i];
        int d2 = sum[n - 1] - sum[i];
        chmin(ans, abs(d1-d2));
        //cout << abs(d1 - d2) << endl;
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 3328
//I am so vegetable
//#define err
#pragma GCC optimize(2)
#include <bits/stdc++.h>
#define FIO ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define pb push_back
#define in insert
#define er erase
#define ct count
#define ep empty
#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 _sfor(p,st) for(auto &p:st)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9+7;
const double eps = 1e-6;
const double pi = acos(-1.0);
ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
ll qpow(ll x, ll y) { ll ans = 1; for (; y > 0; y >>= 1) { if (y & 1)ans *= x; x *= x; }return ans; }
ll qpow(ll x, ll y, int MOD) { ll ans = 1; for (; y > 0; y >>= 1) { if (y & 1)ans = ans*x%MOD; x = x*x%MOD; }return ans; }
void exgcd(ll a,ll b,ll &x,ll &y){
    if(!b){x=1;y=0;return;}
    exgcd(b,a%b,x,y);
    ll X=x;
    x=y; y=X-a/b*y;
}
ll inv(ll x, int mod = MOD) { return qpow(x, mod - 2,mod); }
ll m_m(ll a){ return (a%MOD+MOD)%MOD; }


signed main() {
    //ifstream cin("E:\\acm dream\\in.in");
	//ofstream cout("E:\\acm dream\\out.out");
	FIO;
    #ifdef err
	double be = clock();
    #endif

    ll x,k,d;cin>>x>>k>>d;
    if(x<0)x=-x;
    if(!x)cout<<(k%2?d:0);
    else if(x/d>=k)cout<<abs(x-k*d);
    else{
        k-=x/d;x-=x/d*d;
        if(k%2==0)cout<<x;
        else cout<<abs(d-x);
    }
    
    #ifdef err
	double en = clock();
    cout<<"time: "<<fixed<<setprecision(8)<<en-be;
    #endif
	return 0;
}

Measured memory_bytes: 3668
#include <cassert>
#include <cstdio>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <numeric>
#include <algorithm>

using namespace std;
using lint = long long;
constexpr int MOD = 1000000007, INF = 1010101010;
constexpr lint LINF = 1LL << 60;

#ifdef _DEBUG
#include "../../library/library/debug_template.cpp"
#define DMP(...) dump(#__VA_ARGS__, __VA_ARGS__)
#else 
#define DMP(...) ((void)0)
#endif

struct init {
	init() {
		cin.tie(nullptr); ios::sync_with_stdio(false);
		cout << fixed << setprecision(10);
	}
} init_;

int main() {

	int X, Y;
	cin >> X >> Y;

	if (Y & 1) {
		cout << "No" << "\n";
		return 0;
	}

	if (Y > 4 * X || Y < 2 * X) {
		cout << "No" << "\n";
		return 0;
	}

	cout << "Yes" << "\n";

	return 0;
}



Measured memory_bytes: 3652
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep1(i, n) for (ll i = 1; i < (ll)(n); i++)
const ll mo = 1000000007;
const ll INF = 1LL << 60; //MAX 9223372036854775807
ll ans = 0;

int main()
{
string n;
cin >> n;
int len=(int)(n.length());
rep(i,len)
if(n[i]=='x')ans++;
if(ans<8)cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}

Measured memory_bytes: 256
#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
use std::io::{Write, BufWriter};
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, [ $t:tt ]) => {{
        let len = read_value!($next, usize);
        (0..len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    }};

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn solve() {
    let out = std::io::stdout();
    let mut out = BufWriter::new(out.lock());
    macro_rules! puts {
        ($($format:tt)*) => (write!(out,$($format)*).unwrap());
    }
    input!(s: chars);
    let mut s = s;
    s.sort();
    puts!("{}\n", if s[0] == s[1] && s[1] != s[2] && s[2] == s[3] { "Yes" } else { "No" });
}

fn main() {
    // In order to avoid potential stack overflow, spawn a new thread.
    let stack_size = 104_857_600; // 100 MB
    let thd = std::thread::Builder::new().stack_size(stack_size);
    thd.spawn(|| solve()).unwrap().join().unwrap();
}


Measured memory_bytes: 8572
#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>

#include<bits/stdc++.h>
#define fr first
#define sc second
#define vec vector
#define ms multiset
#define pb push_back
#define pll pair<ll,ll>
#define pdd pair<ld, ld>
#define pq priority_queue
#define umap unordered_map
#define uset unordered_set
#define pii pair<int, int>
#define forn(i,n) for(int i =1;i<= (n);++i)
#define fast cin.tie(0);cout.tie(0);cin.sync_with_stdio(0);cout.sync_with_stdio(0);
using namespace std;
using namespace __gnu_pbds;
typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>ordset;
typedef string str;
typedef long long ll;
typedef long double ld;
typedef unsigned int uint;
const int inf = 1e9+7;
const int nmax = 500005;
const ll linf = LLONG_MAX;
const ll mod = 1000000007;

int n, a, b;

int main(){
    fast;
    cin >> a >> b;
    if(a > b)swap(a,b);
    forn(i,b){
        cout << a;
    }
}


Measured memory_bytes: 256
#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int n,m,p;
int x[111];
int main(void){
  while(cin >> n >> m >> p){
    if(!n) break;
    int c = 0;
    for(int i = 0; i < n; i++){
      cin >> x[i];
      c += x[i];
    }
    c *= 100-p;
    cout << ((x[m-1])?c/x[m-1]:0) << endl;
  }
}

Measured memory_bytes: 1160
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <limits>
typedef long long ll;
#define REP(i,n)   for(int i=0; i<(int)(n); ++i)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); ++i)

#define in cin
#define out cout
#define pb push_back
using namespace std;

int main(){
	bool a[30] = { false };
	int b;
	REP(i, 28) { in >> b; a[b - 1] = true; }
	REP(i, 30)if (!a[i])out << i + 1 << endl;
}

Measured memory_bytes: 3072
#include<iostream>
#include<queue>
#include<vector>
#include<algorithm>
using namespace std;
int main() {
	int n;
	int number[201] = { 0 };
	cin >> n;
	for (int i = 0; i < n; i++) cin >> number[i];
	int cnt = 0;
	while (1) {
		bool hn = true;
		for (int i = 0; i < n; i++) {
			if (number[i] % 2 == 1) hn = false;
		}
		if (hn==true) {
			for (int i = 0; i < n; i++) {
				number[i] = number[i] / 2;
			}
			cnt++;
		}
		else break;
	}
	cout << cnt << endl;
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define fi first
#define se second
#define pb(x) push_back(x)
#define mp make_pair
#define sz(x) ((int)(x).size())
#define endl "\n"
#define fastio ios_base::sync_with_stdio(false); cin.tie(nullptr);
#define all(x) x.begin(),x.end()
#define y1 omg
#define INF 1000000010
#define FOR(x, n) for(int x=0; x<n; x++)
#define ini(x, n) memset(x, n, sizeof(x));
#define MOD ((int)1e9 + 7)
#define atoi(x) ((x)-'0')
#define int ll
#define double long double
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef pair<int, ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;

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

const int MAX = 2e5, mod = 998244353;
int n, k, a, b, dp[MAX], sum[MAX];
vii v;

int getSum(int a, int b) {
	if (b < 0) return 0;
	a = max(a, 0LL);
	if (a == 0) return sum[b];
	return (sum[b] - sum[a - 1]) % mod;
}

signed main() {
	fastio;
	cin >> n >> k;
	FOR(i, k) {
		cin >> a >> b;
		v.pb(mp(a, b));
	}
	dp[0] = sum[0] = 1;
	for (int i = 1; i < n; i++) {
		FOR(j, k) {
			dp[i] += getSum(i - v[j].se, i - v[j].fi);
			dp[i] %= mod;
		}
		sum[i] = (sum[i - 1] + dp[i]) % mod;
	}
	cout << (dp[n - 1] % mod + mod) % mod;
}	

Measured memory_bytes: 6772
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include <stdlib.h>
#include <string.h>

typedef unsigned long long int uint64;
typedef long long int          int64;
 
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)>(0)?(a):-(a))

void get_N (int64 *n)
{
  int cnt;
  
  cnt = scanf("%lld", n);

  return;
}

void get_NK (int64 *n, int64 *k)
{
  int cnt;
  
  cnt = scanf("%lld %lld", n, k);

  return;
}

void get_N1234 (int64 *n1, int64 *n2, int64 *n3, int64 *n4)
{
  int cnt;

  if (n2 == NULL) {
    cnt = scanf("%lld", n1);
    return;
  }
  if (n3 == NULL) {
    cnt = scanf("%lld %lld", n1, n2);
    return;
  }
  if (n4 == NULL) {
    cnt = scanf("%lld %lld %lld", n1, n2, n3);
    return;
  }
  cnt = scanf("%lld %lld %lld %lld", n1, n2, n3, n4);
  return;
}

void omit_LF (void)
{
  char c;
  int  cnt;
  
  cnt = scanf("%c", &c);
  return;
}

char *get_S (int64 n)
{
  char *buf;
  int  i;
  int  cnt;

  buf = malloc((size_t)(n * sizeof(char)));
  if (buf == NULL) {
    return NULL;
  }

  cnt = scanf("%s", buf);

  return buf;
}

char *get_SN (int64 max, int64 *size)
{
  char *buf;
  int  i;
  int  n;
  int  cnt;

  buf = malloc((size_t)(max * sizeof(char)));
  if (buf == NULL) {
    return NULL;
  }

  cnt = scanf("%s", buf);

  n = strlen(buf);

  *size = n;
  
  return buf;
}

int64 *get_NSeq (int64 n)
{
  int64 *buf;
  int64 i;

  buf = malloc((size_t)(n * sizeof(int64)));
  for (i=0; i<n; i++) {
    get_N(&buf[i]);
  }

  return buf;
}

typedef struct _tmp_t {
  int64    a;
  int64    b;
} tmp_t;

typedef int64 simple_t;

int compare_simple(const void *a, const void *b)
{
  simple_t *x;
  simple_t *y;

  x = (simple_t *)a;
  y = (simple_t *)b;

  if (x > y) return 1;
  if (y < x) return -1;

  return 0;
}
void qsort_simple (simple_t *array, int size)
{
  qsort(array, size, sizeof(simple_t), compare_simple);
}

int compare_a(const void *a, const void *b)
{
  tmp_t *x;
  tmp_t *y;

  x = (tmp_t *)a;
  y = (tmp_t *)b;

  if (x->a > y->a) return 1;
  if (x->a < y->a) return -1;

  return 0;
}

int compare_b(const void *a, const void *b)
{
  tmp_t *x;
  tmp_t *y;

  x = (tmp_t *)a;
  y = (tmp_t *)b;

  if (x->b > y->b) return 1;
  if (x->b < y->b) return -1;

  return 0;
}

void qsort_a (tmp_t *array, int size)
{
  qsort(array, size, sizeof(tmp_t), compare_a);
}

void qsort_b (tmp_t *array, int size)
{
  qsort(array, size, sizeof(tmp_t), compare_b);
}

int main()
{
  int64 R;
  double pi=3.14159;
  double L;

  get_N(&R);

  L = pi*R*2;


  printf("%lf", L);
  return 0;
}



Measured memory_bytes: 1732
#include <math.h>

#include <algorithm>
#include <array>
#include <bitset>
#include <iomanip>
#include <iostream>
#include <queue>
#include <sstream>
#include <vector>

using namespace std;
using Graph = vector<vector<int>>;

using ll = long long;
typedef pair<ll, ll> P_ll;
typedef pair<int, int> P;

const ll INF_ll = 1e17;
const int INF = 1e8;

int main() {
  int N;
  cin >> N;
  for (int i = 0; i < 10; i++) {
    int resi = N - 1000;
    if (resi <= 0) {
      cout << abs(resi) << endl;
      return 0;
    }
    N = resi;
  }

  return 0;
}

Measured memory_bytes: 3620
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define f first
#define s second
using namespace std;
	
int main(){
   int n; cin >> n;
   vector<int> vec;
   for(int i = 0,t; i < n; i++){
   	cin >> t; vec.pb(t);
   }
   int cnt = 0;
   for(int i = 0; i < n-2; i++){
   	for(int j = i+1; j < n-1; j++){
   		for(int k = j+1; k < n; k++){
   			vector<int> temp; temp.pb(vec[i]); temp.pb(vec[j]); temp.pb(vec[k]); sort(temp.begin(),temp.end());
   			int a = temp[0], b = temp[1], c = temp[2];
   			if(a != b && a != c && b != c && a + b > c){
   				cnt++;
   			}
   		}
   	}
   }	
   cout << cnt << endl;				
	return 0;
}
















Measured memory_bytes: 3636
#include<cmath>
#include<algorithm>
#include<iostream>
#include<vector>
#include<climits>
#include<cfloat>

using namespace std;

double EPS = 1e-10;
const double PI = acos(-1);

double add(double a, double b){
  if(abs(a+b) < EPS * (abs(a)+abs(b)))return 0;
  return a+b;
}

struct point{
  double x, y;
  point(){x=y=0;}
  point(double x,double y) : x(x) , y(y){}

  point operator - (point p){
    return point(add(x,-p.x), add(y,-p.y));
  }
};

double cross(point a, point b) {return (a.x * b.y - a.y * b.x);}

int is_parallel(point a1, point a2, point b1, point b2) {
  return cross(a1-a2, b1-b2)==0.0 ;
}

int main(void){

  point a,b,c,d;
  int n;
  cin >> n;

  while(n--){
    cin >> a.x >> a.y >> b.x >> b.y;
    cin >> c.x >> c.y >> d.x >> d.y;
    if(is_parallel(a,b,c,d))cout << "YES" << endl;
    else cout << "NO" << endl;
  }

  return 0;
}

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

typedef long long ll;

int cou;
int m;
ll g[1000000];

int setg(int n){
    int ret=0;
    bool flg=true;
    for(int i=2;i<1000000;i++){
        g[i]=3*g[i-1]+1;
        if(g[i]>=n&&flg){
            ret=i-1;
            flg=false;
            break;
        }
    }
    return ret;
}

void insertsort(vector<int> &v,int n, int h){
    for(int i=0;i<h;i++){

        for(int j=i+h;j<n;j+=h){
            for(int k=j;k>=h;k-=h){
                if(v[k]<v[k-h])swap(v[k],v[k-h]);
                else break;
                cou++;
            }
        }

    }
}

void shell(vector<int> &v,int n){
    cou=0;
    for(int i=m;i>=1;i--){
        insertsort(v,n,g[i]);
    }
}

int main(){
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    vector<int> vc(n);
    for(int i=0;i<n;i++)cin >> vc[i];

    g[1]=1;
    m=setg(n);
    shell(vc,n);

    cout << m << endl;
    for(int i=m;i>=1;i--)cout << g[i] << (i!=1?" ":"\n");
    cout << cou << endl;
    for(int i=0;i<n;i++){
        cout << vc[i] << endl;
    }

}



Measured memory_bytes: 6784
#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<bitset>
#include<vector>
#include<deque>
#include<queue>
#include<map>
#include<set>
#include<stack>
#include<cmath>
#include<iomanip>
#include <functional>
using namespace std;
typedef long long ll;
const int mod = 1000000007;
const int INF = 1 << 28;
const double EPS = 1e-10;
//cout << fixed << std::setprecision(9)
//memset(a, 0, sizeof(a));
//--------------------------

char c;

int main()
{
	cin >> c;
	if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') {
		cout << "vowel" << endl;
	}
	else {
		cout << "consonant" << endl;
	}

	return 0;
}


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

using namespace std;

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

#define rep(i,n) for(int i=0;i<(n);++i)
#define repi(i,a,b) for(int i=int(a);i<(b);i++)
#define repr(i,b,a) for(int i=int(b);i>=(a);i--)
#define all(x) x.begin(),x.end()

const ll mod = 1e9+7;
const ll INF = 1e9;

ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
bool valid(int lx,int ux,int ly,int uy,int x,int y){
	return lx<=x&&x<ux&&ly<=y&&y<uy; 
}
ll power(ll x,ll p){
	if(p==0)return 1;
	ll res=power(x*x%mod,p/2);
	if(p%2==1)res=res*x%mod;
	return res;
}

int main()
{
	while(1){
		int n,x;
		cin>>n>>x;
		if(n==0&&x==0)break;
		int cnt=0;
		repi(i,1,n+1)repi(j,i+1,n+1)repi(k,j+1,n+1) if(i+j+k==x)cnt++;
		cout<<cnt<<endl;
	}
return 0;
}


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

int f(int x, int y, int z) { return x * x + y * y + z * z + x * y + y * z + z * x; }

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

  vector<int> r(n + 1);
  for (int x = 1; f(x, 1, 1) <= n; x++) {
    for (int y = 1; f(x, y, 1) <= n; y++) {
      for (int z = 1; f(x, y, z) <= n; z++) {
        r[f(x, y, z)]++;
      }
    }
  }

  for (int i = 1; i <= n; i++) cout << r[i] << endl;
}


Measured memory_bytes: 3556
#include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<cmath>
#include<tuple>
#include<string>
#include<chrono>
#include<functional>
#include<iterator>
#include<random>
#include<unordered_set>
#include<array>
#include<map>
#include<iomanip>
#include<assert.h>
#include<bitset>
#include<stack>
#include<memory>
using namespace std;
typedef long long int llint;
typedef long double lldo;
#define mp make_pair
#define mt make_tuple
#define pub push_back
#define puf push_front
#define pob pop_back
#define pof pop_front
#define fir first
#define sec second
#define res resize
#define ins insert
#define era erase
/*
cout<<setprecision(20);
cin.tie(0);
ios::sync_with_stdio(false);
*/
const llint mod=1000000007;
const llint big=2.19e15+1;
const long double pai=3.141592653589793238462643383279502884197;
const long double eps=1e-15;
template <class T,class U>bool mineq(T& a,U b){if(a>b){a=b;return true;}return false;}
template <class T,class U>bool maxeq(T& a,U b){if(a<b){a=b;return true;}return false;}
llint gcd(llint a,llint b){if(a%b==0){return b;}else return gcd(b,a%b);}
llint lcm(llint a,llint b){if(a==0){return b;}return a/gcd(a,b)*b;}
template<class T> void SO(T& ve){sort(ve.begin(),ve.end());}
template<class T> void REV(T& ve){reverse(ve.begin(),ve.end());}
template<class T>llint LBI(vector<T>&ar,T in){return lower_bound(ar.begin(),ar.end(),in)-ar.begin();}
template<class T>llint UBI(vector<T>&ar,T in){return upper_bound(ar.begin(),ar.end(),in)-ar.begin();}
int main(void){
	int i,n,m;cin>>n>>m;
	vector<int>x(n);
	vector<int>y(m);
	for(i=0;i<n;i++){cin>>x[i];}
	for(i=0;i<m;i++){cin>>y[i];}
	vector<int>L;L.reserve(n);
	vector<int>R;R.reserve(n);
	for(i=0;i<n;i++){
		int ter=LBI(y,x[i]);
		if(ter==0||ter==m){continue;}
		L.pub(x[i]-y[LBI(y,x[i])-1]);
		R.pub(y[LBI(y,x[i])]-x[i]);
	}
	n=L.size();
	vector<int>sL=L;
	SO(sL);
	vector<pair<int,int>>dis(n);
	for(i=0;i<n;i++){dis[i]=mp(R[i],-LBI(sL,L[i]));}//Lを座圧した
	SO(dis);
	dis.erase(unique(dis.begin(),dis.end()),dis.end());
	n=dis.size();
	static llint seg[262144]={0};
	for(i=0;i<n;i++){
		int bas=131072-dis[i].sec;
		llint gen=1;//自分の分
		while(bas>1){if(bas%2==1){gen+=seg[bas-1];}bas/=2;}
		gen%=mod;
		bas=131072-dis[i].sec;
		while(bas>1){seg[bas]+=gen;seg[bas]%=mod;bas/=2;}
	}
	int bas=262000;
	llint ans=1;
	while(bas>1){if(bas%2==1){ans+=seg[bas-1];}bas/=2;}
	ans%=mod;
	cout<<ans<<endl;
	return 0;
}



Measured memory_bytes: 4608
/*https://atcoder.jp/contests/abc172/tasks/abc172_b*/
#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s,t;
	cin>>s;
	cin>>t;
	int count=0;
	if(s!=t)
	{
		for(int i=0;i<s.length();i++)
		{
		   if(s[i]!=t[i])
		   count++;
		}
	}
	cout<<count;
}

Measured memory_bytes: 3904
#include <iostream>
#include <algorithm>
#include <set>
#include <functional>
#include <list>
#include <bitset>
#include <numeric>
#include <utility>
#include <cmath>
#include <vector>
#include <queue>
#include <string>
#include <map>
#include <deque>

#define INF 1e9
#define MOD 1000000007
#define ll long long
using namespace std;
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
typedef unsigned long long ull;
typedef pair<ll, ll> pr;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    vector<int>cnt(5,0),cnt2(5,0);
    int a,b;
    for(int i=0;i<3;i++){
        cin>>a>>b;
        cnt[a]++;cnt[b]++;
    }
    for(int i=1;i<=4;i++){
        cnt2[cnt[i]]++;
    }

    if(cnt2[1]==2&&cnt2[2]==2){
        cout<<"YES"<<endl;
    }
    else{
        cout<<"NO"<<endl;
    }
    return 0;
}

Measured memory_bytes: 256
#include "bits/stdc++.h"
#define ll long long
#define mk make_pair
#define pb push_back
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pil pair<int,ll>
#define pli pair<ll,int>
using namespace std;
const int MAXN=1e5+9;
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	string s,t;
	cin>>s>>t;
	int n=s.size();
	if(t.substr(0,n)==s)
	{
		cout<<"Yes"<<endl;
		return 0;
	}
	cout<<"No"<<endl;
	return 0;
}

Measured memory_bytes: 3608
#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <set>
#include <utility>
#include <cstdlib>
#include <queue>
#include <stack>
#include <iomanip>
#include <cstdio>
#include <map>
#include <list>

using namespace std;

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

#define _upgrade ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define rep(i,x) for(ll i = 0; i < (ll)(x); i++)
#define all(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
#define pb push_back

template<class T1, class T2> void chmin(T1 &a, T2 b){if(a>b)a=b;}
template<class T1, class T2> void chmax(T1 &a, T2 b){if(a<b)a=b;}

//ll gcd(ll a, ll b){return b?gcd(b,a%b):a;}
//ll lcm(ll x, ll y) {return x / gcd(x, y) * y;}

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

const ll MOD = 1e9 + 7;
const ll INF = 1e9;
const long double PI = 3.14159265358979323846;







// ****************************************CODE***************************************//
//





const ll MAX = 4005;

ll Com[MAX][MAX];

void COMcalc(){
        Com[0][0] = 1;
        for(int i = 0; i <= MAX-5; i++){
                for(int j = 0; j <= i; j++){
                        Com[i+1][j] = (Com[i+1][j] + Com[i][j]) % MOD;
                        Com[i+1][j+1] = (Com[i+1][j+1] + Com[i][j]) % MOD;
                }
        }
}

ll comb(int n, int k){
        return Com[n][k];
}
ll f2(int n, int k){
        return comb(n+k-1,k-1);
}
ll f(int n, int k){
        if(n < k) return 0;
        if(n == 0 && k == 0) return 1;
        if(k < 1) return 0;
        return f2(n-k,k);
}



int main(){
        COMcalc();
        ll n, k;
        cin >> n >> k;
        for(int i = 1; i <= k; i++){
                ll blue = f(k,i);
                ll red = f2(n-k-(i-1),i+1);
                /*ll red = 0;
                {
                        red += f(n-k,i-1);
                        red %= MOD;
                        red += f(n-k,i);
                        red %= MOD;
                        red += f(n-k,i);
                        red %= MOD;
                        red += f(n-k,i+1);
                        red %= MOD;
                }*/
                ll ans = blue * red % MOD;
                cout << ans << endl;
        }
        return 0;
}










Measured memory_bytes: 123648
package main

import (
	"fmt"
	"strconv"
)

func main() {
	var n float64
	fmt.Scan(&n)
	a := (n / 3.0) * 100000
	b := (a * a * a) / (100000 * 100000 * 100000)
	fmt.Println(strconv.FormatFloat(b, 'f', 12, 64))
}


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

#define ld long double
#define ll long long
#define ALL(a)  (a).begin(),(a).end()
#define ALLR(a)  (a).rbegin(),(a).rend()
#define spa << " " <<
#define MP make_pair
ll MOD = 1e9+7;
//ll MOD = 998244353;
ll INF = 1e18;
void chmin(ll &a,ll b){if(a>b)a=b;}
void chmax(ll &a,ll b){if(a<b)a=b;}
void pmod(ll &a,ll b){a=(a+b)%MOD;}
void qmod(ll &a,ll b){a=(a*b)%MOD;}
void ans1(bool x){if(x) cout<<"Yes"<<endl;else cout<<"No"<<endl;}
void ans2(bool x){if(x) cout<<"YES"<<endl;else cout<<"NO"<<endl;}
void ans3(bool x){if(x) cout<<"Yay!"<<endl;else cout<<":("<<endl;}
void ans(bool x,ll y,ll z){if(x)cout<<y<<endl;else cout<<z<<endl;}
void anss(bool x,string y,string z){if(x)cout<<y<<endl;else cout<<z<<endl;}   
ll gcd(ll x,ll y){ll r;while((r=x%y)!=0){x=y;y=r;}return y;}

struct UnionFind {
  vector<int> data;
  UnionFind(int size) : data(size, -1) { }
  bool unionset(int x, int y) {
    x = root(x); y = root(y);
    if (x != y) {
      if (data[y] < data[x]) swap(x, y);
      data[x] += data[y]; data[y] = x;
    }
    return x != y;
  }
  bool findset(int x, int y) {
    return root(x) == root(y);
  }
  int root(int x) {
    return data[x] < 0 ? x : data[x] = root(data[x]);
  }
  int size(int x) {
    return -data[root(x)];
  }
};

struct edge{
  ll p;
  ll q;
  ll t;
};
bool compare(struct edge x, struct edge y) {
    return x.t < y.t;
}

int main(){
  ll i,j,o;
  ll res=0,res1=0,res2=INF,buf=0,buf1=0,buf2=0,buf3=0,buf4=0;
  bool judge = true;
  ll n;cin>>n;
  vector<pair<ll,ll>> x(n),y(n);
  for(i=0;i<n;i++){
    cin>>buf;
    x[i]={buf,i};
    cin>>buf;
    y[i]={buf,i};
  }
  sort(ALL(x));
  sort(ALL(y));
  vector<struct edge> g(2*n-2);
  for(i=0;i<n-1;i++){
    g[i].t=x[i+1].first-x[i].first;
    g[i].p=x[i].second;
    g[i].q=x[i+1].second;
  }
  for(i=0;i<n-1;i++){
    g[i+n-1].t=y[i+1].first-y[i].first;
    g[i+n-1].p=y[i].second;
    g[i+n-1].q=y[i+1].second;
  }
  sort(ALL(g),compare);
  UnionFind tree(n);
  for(i=0;i<2*n-1;i++){
    if(!tree.findset(g[i].p,g[i].q)){
      tree.unionset(g[i].p,g[i].q);
      res+=g[i].t;
      //cout<<res spa g[i].p spa g[i].q<<endl;
    }
  }
  cout<<res<<endl;
  return 0;
}

Measured memory_bytes: 8576
(defun count-happy-people (s)
  (labels ((inner (s &optional (cnt 0))
             (cond
               ((null (cdr s)) cnt)
               ((char-equal
                 (first s)
                 (second s))
                (inner (rest s) (1+ cnt)))
               (t
                (inner (rest s) cnt)))))
    (inner s)))

(defun solve (n k s)
  (let ((start (count-happy-people s)))
    (min (+ start (* k 2))
         (1- n))))


(defun main ()
  (let ((n (read))
        (k (read))
        (s (concatenate 'list (read-line))))
    (format t "~a~%" (solve n k s))))

(main)


Measured memory_bytes: 27188
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
	int a[200005];
	long long sum = 0, n, i, t;
	scanf("%lld%lld",&n,&t);
	for(i = 0; i < n; i++)
		scanf("%d",&a[i]);
	for(i = 0; i < n; i++)
	{
		if(i == 0&&n == 1)
		{
			sum = sum + t;
			continue;
		}
		if(i > 0)
		{
		    if((a[i]-a[i-1])>=t)
		    	sum += t;
     		else
	     		sum += (a[i]-a[i-1]);
	    }
	}
	if(i != 1)
	sum = sum + t;
	printf("%lld\n",sum);
}

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

int main(){
	double a,b,x;	cin>>a>>b>>x;
	const double PI=3.14159265358979323846;
	double ans;

	if(x*2>=a*a*b){
	double left=a*a*b-x;
	// left=a*a*len/2
	double len=(left*2)/(a*a);
	ans=atan2(len,a)*180.0/PI;
	printf("%.8lf\n",ans);

	}else{
		double y=(x*2)/(a*b);
		ans=atan2(y,b)*180.0/PI;
		printf("%.8lf\n",90-ans);
	}

	return 0;
}


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

// typedef
// -----------------------------------------------------------------------------
typedef long long ll;
typedef long double ld;

// container util
// -----------------------------------------------------------------------------
#define ALL(c)  (c).begin(),(c).end()
#define SZ(c) ((ll)(c).size())
#define MAX(c) *max_element(ALL(c))
#define MIN(c) *min_element(ALL(c))
#define SORT(c) sort((c).begin(),(c).end())

// repetition
// -----------------------------------------------------------------------------
#define FOR(i, a, b) for(int i= (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)

// constant
// -----------------------------------------------------------------------------
const int INF = 1e9;
const int MOD = 1e9 + 7;
const double EPS = 1e-9;
const double PI = acos(-1.0);

// debug
// -----------------------------------------------------------------------------
#define DUMP(x)  cerr << #x << " = " << (x) << endl


int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(15);
    REP(i, 5) {
        int x; cin >> x;
        if(x == 0) {
            cout << i + 1 << "\n";
            break;
        }
    }
}

Measured memory_bytes: 3612
#include <iostream>
using namespace std;
int main(void){
    
    int a,b;
    cin>>a>>b;
    if(a!=1&&b!=1){
    if(a<b){
        cout<<"Bob"<<endl;
    }
    else if(a>b){
        cout<<"Alice"<<endl;
    }
    else {
        cout<<"Draw"<<endl;
    }
    }
    else {
        
        if(a==1&&b==1){
            cout<<"Draw"<<endl;
        }
        else if(a==1){
            cout<<"Alice"<<endl;
        }
        else if(b==1){
            cout<<"Bob"<<endl;
        }
        
    }
    
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
typedef long long int ll;
using namespace std;
const ll mod=1e18+7;
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}



int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    string s;
    cin>>s;
    if(s=="Sunny"){cout<<"Cloudy"<<endl;}
    else if (s=="Cloudy")cout<<"Rainy"<<endl;
    else cout<<"Sunny"<<endl;
    return 0;
    }


Measured memory_bytes: 256
<?php

$kw = array('the', 'this', 'that');
while (TRUE) {
    $s = rtrim(fgets(STDIN));
    if (feof(STDIN)) {
        break;
    }
    for ($i = 0; $i < 26; $i++) {
        $words = explode(' ', str_replace('.', '', $s));
        foreach ($kw as $v) {
            if (in_array($v, $words)) {
                echo $s . PHP_EOL;
                continue 3;
            }
        }
        for ($j = 0; $j < strlen($s); $j++) {
            if ($s[$j] < 'a' || $s[$j] > 'z') {
                continue;
            }
            if ($s[$j] === 'z') {
                $s[$j] = 'a';
            } else {
                $s[$j] = chr(ord($s[$j]) + 1);
            }
        }
    }
}

Measured memory_bytes: 6672
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#include <functional>
#include <map>
#include <iomanip>
#include <math.h> 
#include <stack>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <tuple>
#include <cctype>
#include <ctype.h>
#include <set>
#include <sstream>
#include <time.h>
#include <numeric>
using namespace std;
//#define int long long
#define rep(i,s,n) for(int i = s;i<n;i++)
#define repe(i,s,n) for(int i = s;i<=n;i++)
#define rrep(i,s,n) for(int i = (n)-1;i>=(s);i--)
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define fi first
#define se second
#define chmin(a,b) a=min((a),(b))
#define chmax(a,b) a=max((a),(b))
#define l1 list[index]
#define l2 list[index - 1]
#define l3 list[index + 1]
#define iif(i,j) ((i<0 && j<0) || (i>0 && j>0)) ? true : false 
typedef long long ll;
typedef pair<int, int>pint;
typedef vector<int>vint;
typedef vector<pint>vpint;
typedef pair<pint, int> P1;
typedef pair<int, pint> P2;
typedef pair<pint, pint> PP;
static const ll maxLL = (ll)1 << 62;
const ll MOD = 1000000007;
const ll INF = 1e18;
const double PI = 3.14159265359;
int ca[12] = { 31,28,31,30,31,30,31,31,30,31,30,31 };



signed main() {
	int a, b;

	cin >> a >> b;

	a--; b--;

	cout << a * b << endl;





	return 0;
}

Measured memory_bytes: 256
N = int(input())
v = list(int(i) for i in input().split())
v.sort(reverse=True)
ans = 0
for i in range(N-2):
    ans += v[i] / 2**(i+1)
Ans = ans + (v[-1] + v[N-2]) / 2**(N-1)
print(Ans)

Measured memory_bytes: 3060
N = int(input())
cs = [0]*N
for i in range(1,130):
    for j in range(1,130):
        for k in range(1,130):
            temp = i**2 + j**2 + k**2 + i*j + j*k + k*i
            if temp <= N and temp > 0:
                cs[temp-1] += 1
for i in range(N):
    print(cs[i])


Measured memory_bytes: 9140
#include <iostream>
#include <vector>
#include "unordered_map"
#include "map"
#include <cmath>
#include <climits>
#include "queue"
#include "tuple"
#include <algorithm>
#include <iomanip>
#include "sstream"
#include <math.h>

using ll=long long;
using ull=unsigned long long;
using ld=long double;
using namespace std;

//const double PI = M_PI;

template <typename T>
inline void printQueue(queue<T>&oq){queue<T>q(oq);int qCount=q.size();for(int i=0;i<qCount;++i){T qe=q.front();q.pop();
        cout<<qe;if(i!=qCount-1){cout << ", ";}q.push(qe);}cout << endl;}

template<typename T>
inline void PV(vector<T> v){int vc=v.size();for(int i=0;i<vc;++i){cout << v[i];if(i!=vc-1){cout<<", ";}}cout << endl;}

inline double round( double val )
{
    if( val < 0 ) return ceil(val - 0.5);
    return floor(val + 0.5);
}

int main() {
//    freopen("../input.txt","r",stdin);
//    freopen("../output.txt","w",stdout);
    ull r;
    cin >> r;
    ull g;
    cin >> g;
    ull b;
    cin >> b;
    int n = r * 100 + g * 10 + b;
    if(n % 4 == 0) {
        cout << "YES";
    }
    else {
        cout << "NO";
    }
}


Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
  int i,n,a[110],A=0,B=0;
  cin>>n;
  for(i=0; i<n; i++) cin>>a[i];
  sort(a,a+n);
  for(i=0; i<n; i++)
  {
    if(i%2==0)
    {
      A=A+a[i];
    }else{
      B=B+a[i];
    }
  }
  if(A>B) cout<<A-B<<endl;
  if(A<B) cout<<B-A<<endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;
int INF = 1000000009;
const int mod = 1000000007;
struct mint
{
  ll x;
  mint(ll x = 0) : x((x % mod + mod) % mod) {}
  mint operator-() const { return mint(-x); }
  mint &operator+=(const mint a)
  {
    if ((x += a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator-=(const mint a)
  {
    if ((x += mod - a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator*=(const mint a)
  {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const
  {
    mint res(*this);
    return res += a;
  }
  mint operator-(const mint a) const
  {
    mint res(*this);
    return res -= a;
  }
  mint operator*(const mint a) const
  {
    mint res(*this);
    return res *= a;
  }
  mint pow(ll t) const
  {
    if (!t)
      return 1;
    mint a = pow(t >> 1);
    a *= a;
    if (t & 1)
      a *= *this;
    return a;
  }
  mint inv() const
  {

    return pow(mod - 2);
  }
  mint &operator/=(const mint a)
  {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const
  {
    mint res(*this);
    return res /= a;
  }
};
int main()
{
  int n;
  cin >> n;
  mint ans = 1;
  rep(i,n){
    ans *= (i + 1);
  }
  cout << ans.x << endl;
}

Measured memory_bytes: 256
#include <stdio.h>
int linearsearch(int A[],int n,int key){
  int i=0;
  A[n]=key;
  while(A[i]!=key)i++;
  return i!=n;
}
int main(){
  int i,n,A[10001],q,key,sum=0;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
  }
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&key);
    if(linearsearch(A,n,key))sum++;
  }
  printf("%d\n",sum);
  return 0;
}

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

using namespace std;

vector<int> dua, tiga, enam;

int main() {
  int n;
  scanf("%d", &n);
  for (int i = 2; i <= 30000; ++i) {
    if ((i % 6) == 0)
      enam.push_back(i);
    else if ((i % 2) == 0)
      dua.push_back(i);
    else if ((i % 3) == 0)
      tiga.push_back(i);
  }
  if (n == 3) {
    puts("2 5 63");
  }
  else if (n == 4) {
    puts("2 5 20 63");
  }
  else {
    int a = 2, b = 2;
    int na = dua.size(), nb = tiga.size();
    n -= a + b;
    int k = min(n, nb - b) / 2;
    b += k * 2;
    n -= 2 * k;
    k = min(n, na - a) / 2;
    a += 2 * k;
    n -= 2 * k;
    for (int i = 0; i < a; ++i)
      printf("%d ", dua[i]);
    for (int j = 0; j < b; ++j)
      printf("%d ", tiga[j]);
    for (int i = 0; i < n; ++i)
      printf("%d ", enam[i]);
    printf("\n");
  }
  return 0;
}

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

void solve()
{
	int n;
	cin >> n;
	while (n != 0)
	{
		if (n % 10 == 7)
		{
			cout << "Yes\n";
			return;
		}
		n = n / 10;
	}
	cout << "No\n";
	return;
}
int main()
{
	solve();





	return 0;
}

Measured memory_bytes: 3636