akhauriyash/Code-Regression huggingface dataset:
package main

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

const size = 1000000
var reader = bufio.NewReaderSize(os.Stdin,size)
func NextLine() string {
  var line,buffer []byte
  var isPrefix bool = true
  var err error
  for ;isPrefix; {
    line,isPrefix,err = reader.ReadLine()
    if err != nil { panic(err) }
    buffer = append(buffer,line...)
  }
  return string(buffer)
}
func NextStringArray() []string {
  return strings.Split(NextLine()," ")
}
func NextIntArray() []int {
  var s []string = NextStringArray()
  var n int = len(s)
  var a []int = make([]int,n)
  for i:=0;i<n;i++ {
    a[i],_ = strconv.Atoi(s[i])
  }
  return a
}

func main() {
  var n,m int
  var a,b []int
  n,_ = strconv.Atoi(NextLine())
  a = NextIntArray()
  if n%2 == 0 {
    m = n/2
    b = make([]int,m)
    for i:=0;i<n;i++ {
      if a[i]%2 != 1 {
        fmt.Println(0)
        os.Exit(0)
      }
      b[(a[i]-1)/2]++
    }
    for i:=0;i<m;i++ {
      if b[i] != 2 {
        fmt.Println(0)
        os.Exit(0)
      }
    }
  } else {
    m = (n-1)/2
    b = make([]int,m+1)
    for i:=0;i<n;i++ {
      if a[i]%2 != 0 {
        fmt.Println(0)
        os.Exit(0)
      }
      b[a[i]/2]++
    }
    if b[0] != 1 {
      fmt.Println(0)
      os.Exit(0)
    }
    for i:=1;i<m+1;i++ {
      if b[i] != 2 {
        fmt.Println(0)
        os.Exit(0)
      }
    }
  }
  const mod int64 = 1000000007
  var ans int64 = 1
  for i:=0;i<m;i++ {
    ans = (ans*2)%mod
  }
  fmt.Println(ans)
}

Measured memory_bytes: 4864
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>

using namespace std;



int main(){

    double p=3.141592653589793238;

    double a,b,h,m;

    cin >> a >> b >> h >> m;

    double x1,x2,y1,y2,t1,t2;

    t1=(h+m/60)*p/6;
    t2=(m/60)*2*p;

    x1=a*cos(t1);
    x2=a*cos(t2);
    y1=b*sin(t1);
    y2=b*sin(t2);

    double l;

    //l=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));

    l=sqrt(a*a+b*b-2*a*b*cos(t2-t1));

    printf("%0.12f",l);


    

}

Measured memory_bytes: 4216
#C - Christmas Eve
N,K = map(int,input().split())
h = [int(input()) for _  in range(N)]
h = sorted(h, reverse = True)

diff = 10**9
for i in range(N-K+1):
    a = h[i]-h[i+K-1]
    if diff > a:
        diff = a
    if diff == 0:
        break
print(diff)

Measured memory_bytes: 14176
s = input()
s1 = [s[0], s[1], s[2], s[3]]
s2 = [s[5], s[6]]

t1 = int(''.join(s1))
t2 = int(''.join(s2))

if t1 > 2019:
    print('TBD')

elif t1 == 2019 and t2 > 4:
    print('TBD')

else:
    print('Heisei')


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

unordered_map<string, int> freq;
int n;
string temp;

set<string> strset;
int curr_max = 0;
vector<string> ans;

void max_self(int &a, int b) { a=max(a,b); }

int main()
{
    cin >> n;

    for(int i = 0; i < n; i++) {
        cin >> temp;
        if(!strset.count(temp)) {
            strset.insert(temp);
            freq[temp]=0;
        }
        max_self(curr_max, ++freq[temp]);
    }

    for(string x : strset) {
        if(freq[x]==curr_max)
            ans.push_back(x);
    }

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

    for( string x : ans)
        cout << x << endl;
        
    return 0;
        
}

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

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  vector<int64_t> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  int64_t res = 1000;
  for (int i = 0; i < N - 1; i++) {
    if (A[i] < A[i + 1]) {
      res += (res / A[i]) * (A[i + 1] - A[i]);
    }
  }
  cout << res << '\n';
  return 0;
}


Measured memory_bytes: 3596
#include <bits/stdc++.h>
using namespace std;
 
int main(){
  int N, M;
  cin >> N >> M;
 
  vector<int> vec(M*2);
  for (int i = 0; i < M*2; i++){
    cin >> vec.at(i);
  }
 
 for (int i = 1; i <= N; i++){ 
   int sum = 0;
   for (int j = 0; j < M*2; j++){
    if (vec.at(j) == i){
      sum++;
    }
    }
     cout << sum << endl;
   }
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include<math.h>
#include<algorithm> 
#define rep(i,n) for (int i = 0; i < (n) ; ++i)
using namespace std;
using ll = long long ;
using P = pair<int, int> ;
#define PI 3.14159265358979323846264338327950
#define INF 1e18
#define mod 1000000007

int main () {
    ll n ;
    cin >> n ;
    vector<ll> a (n) ;
    rep(i, n) cin >> a[i] ;
    vector<ll> b = a ;
    ll tot = 0 ;
    rep(i, n) tot += a[i] ;
    rep(i, n){
        if(i == 0) continue ;
        a[i] += a[i - 1] ;
    }
    ll ans = 0 ;
    rep(i, n){
        ans += b[i] * ((tot - a[i])%mod) ;
        ans %= mod ;
    }
    cout << ans << endl ;
}

Measured memory_bytes: 6396
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n) FOR(i, 0, n)
#define whole(x) (x).begin(),(x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
using ll = long long;
using P = pair<int, int>;
const int mod = 1000000007;


int main(){
    ll n;
    cin >> n;
    vector<ll> a(n);
    rep(i, n) cin >> a[i];
    map<ll, ll> mp;
    ll sum = 0;
    rep(i, n) {
        ll v = a[i];
        sum += mp[v];
        mp[v]++;
        //cout << sum << endl;
    }
    
    rep(i, n) {
        ll ans = 0;
        ll v = a[i];
        ans = sum-(mp[v]-1);
        cout << ans << endl;
    }
    
    return 0;
}


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

namespace CsAtCoderSubmitExam
{
    class BeginnerContest157
    {
        // C - Guess The Number
        class SC
        {
            public int S;
            public int C;
            public SC(int s, int c)
            {
                S = s;
                C = c;
            }

            public override string ToString()
            {
                return $"S:{S}, C:{C}";
            }
        }

        static void Main(string[] args)
        {
            var nm = Console.ReadLine().Split(' ');
            var N = int.Parse(nm[0]);
            var M = int.Parse(nm[1]);
            var SCs = new List<SC>();
            for (var i = 0; i < M; i++)
            {
                var sc = Console.ReadLine().Split(' ');
                SCs.Add(new SC(int.Parse(sc[0]), int.Parse(sc[1])));
            }

            var min = (int)Math.Pow(10, N - 1);
            min = (min == 1) ? 0 : min;
            var max = (int)Math.Pow(10, N) - 1;

            var ans = -1;
            for (var i = min; i <= max; i++)
            {
                var aok = true;
                foreach (var sc in SCs)
                {
                    var colS = GetColS(i, sc.S, N);
                    if (colS != sc.C)
                    {
                        aok = false;
                        break;
                    }
                }
                if (aok)
                {
                    ans = i;
                    break;
                }
            }
            Console.WriteLine(ans);
        }

        private static int GetColS(int value, int s, int N)
        {
            var ret = -1;
            var i = 0;
            for (var p = (int)Math.Pow(10, N - 1); 1 <= p; p = p / 10)
            {
                i++;
                if (i == s)
                {
                    ret = (value / p) % 10;
                    break;
                }
            }
            return ret;
        }
    }
}

Measured memory_bytes: 13268
#include <stdio.h>

int main(void)
{
	int H, W, i, t, a=0;

	while (1)
	{
		scanf("%d %d", &H, &W);

		if (H == 0 && W == 0)break;

		for (i = 1; i <= H; i++) 
		{
			if (i%2!=0)
			{
				for (t = 0; t < W; t++)
				{
					a = a + 1;

					if (a % 2 != 0)
					{
						printf("#");
					}
					else
					{
						printf(".");
					}
				}
				a = 0;
			}
			else
			{
				for (t = 0; t < W; t++)
				{
					a = a + 1;
					if (a % 2 != 0)
					{
						printf(".");
					}
					else
					{
						printf("#");
					}
				}
				a = 0;
			}
			printf("\n");
		}
		printf("\n");
	}
	return 0;
}


Measured memory_bytes: 2044
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <map>
#include <numeric>
using namespace std;

const int MOD = 1000000007;
typedef long long ll;


int main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N,cnt=0;
  string S;
  cin>>N>>S;
  for(int i=0;i<N;i++){
    if(S[i]=='R')cnt++;
  }
  if(cnt>N-cnt){
    cout<<"Yes"<<endl;
  }else{
    cout<<"No"<<endl;
  }
}


Measured memory_bytes: 256
#include<stdio.h>
int main(void){
    int n,a,ki;
    scanf("%d",&n);
    for(a=0;n>0;n--){
        scanf("%d",&a);
        if(a%2==1){ki++;}
    }
    if(ki%2==0){printf("YES\n");}else{printf("NO\n");}
    return 0;
}

Measured memory_bytes: 128
from collections import deque


def main():
    input()  # n
    coming = [int(x) for x in input().split()]
    coming.sort()
    coming = deque(coming)

    edges = deque()
    new = coming.pop()
    edges.append(new)
    ans = 0
    while coming:
        ans += edges.popleft()
        new = coming.pop()
        edges.append(new)
        edges.append(new)
    print(ans)


if __name__ == '__main__':
    main()


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

int main() {
	while(1){
		int dp[17][17] = {0};
		int n, a, b, x, y;
		cin >> a >> b;
		if(a == 0 && b == 0)break;
		cin >> n;
		int lock[17][17] = {0};
		for(int i = 0; i < n; i++){
			cin >> x >> y;
			lock[x][y] = 1;
		}
		dp[1][0] = 1;
		for(int i = 1; i <= b; i++){
			for(int j = 1; j <= a; j++){
				if(lock[j][i] == 0){
					dp[j][i] = dp[j - 1][i] + dp[j][i - 1];
				}
			}
		}
	
		cout << dp[a][b] << endl;
	}
	return 0;
}

Measured memory_bytes: 1160
#include <algorithm>
#include <boost/optional.hpp>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define REP(i, n) for(int i = 0, i##_MACRO = (n); i < i##_MACRO; i++)
#define RANGE(i, a, b) for(int i = (a), i##_MACRO = (b); i < i##_MACRO; i++)
#define EACH(e, a) for(auto&& e : a)
#define ALL(a) std::begin(a), std::end(a)
#define RALL(a) std::rbegin(a), std::rend(a)
#define FILL(a, n) memset((a), n, sizeof(a))
#define FILLZ(a) FILL(a, 0)
#define INT(x) (static_cast<int>(x))
#define PRECISION(x) std::fixed << std::setprecision(x)

using namespace std;

using ll = long long;
using VI = std::vector<int>;
using VI2D = std::vector<vector<int>>;
using VLL = std::vector<long long>;
using VLL2D = std::vector<vector<long long>>;

constexpr int INF = 2e9;
constexpr double EPS = 1e-10;
constexpr double PI = acos(-1.0);

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

template <typename T>
constexpr int sign(T x) {
	return x < 0 ? -1 : x > 0 ? 1 : 0;
}

template <>
constexpr int sign(double x) {
	return x < -EPS ? -1 : x > EPS ? 1 : 0;
}

template <typename T, typename U>
constexpr void chmax(T& m, U x) {
	m = max(m, x);
}

template <typename T, typename U>
constexpr void chmin(T& m, U x) {
	m = min(m, x);
}

template <typename T>
constexpr T square(T x) {
	return x * x;
}

int main() {
	int n;
	cin >> n;
	VI2D f(n, VI(10));
	VLL2D p(n, VLL(10));
	REP(i, n) {
		REP(j, 10) { cin >> f[i][j]; }
	}
	REP(i, n) {
		REP(j, 10 + 1) { cin >> p[i][j]; }
	}

	int result = -INF;
	for(int i = 1; i < (1 << 10); i++) {
		VI count(n, 0);
		REP(j, 10) {
			if(i & (1 << j)) {
				REP(k, n) { count[k] += f[k][j]; }
			}
		}
		int tmp = 0;
		REP(j, n) { tmp += p[j][count[j]]; }
		chmax(result, tmp);
	}

	cout << result << endl;
	return 0;
}


Measured memory_bytes: 3628
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i=0; i<(int)n; i++)
#define REPR(i, n) for(int i=(int)n-1; i>=0; i--)
#define FOR(i, m, n) for(int i=(int)m; i<(int)n; i++)
#define FORR(i, m, n) for(int i=(int)m-1; i>=(int)n; i--)
#define ALL(x) (x).begin(), (x).end()
#define ASC(v) sort(ALL(v));
#define DESC(v) sort(ALL(v), greater<int>());
#define UNIQ(a) sort(ALL(a));(a).resize(unique(ALL(a)) - a.begin());
#define PRINTD(x, d) cout << fixed << setprecision(d) << x << "\n";
#define DEBUG(x) cout<<#x<<": "<<x<<"\n"
typedef long long ll;
const double PI = acos(-1);
ll lcm(ll a, ll b) { return a / __gcd(a, b) * b; }
bool isprime(int x){ int i; if(x<2)return 0; else if(x==2) return 1; if(x%2==0) return 0; for(i=3; i*i<=x; i+=2) if(x%i==0) return 0; return 1; }
int digsum(int n) { int r=0; while(n>0) { r+=n%10; n/=10; } return r; }
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 (a>b) { a = b; return 1; } return 0; }



void solve(long long X, long long Y, long long Z){
	ll a = Y;
	ll b = X;
	ll c = a;
	a = Z;
	cout << a << " " << b << " " << c << "\n";
}

int main(){
    long long X;
    scanf("%lld",&X);
    long long Y;
    scanf("%lld",&Y);
    long long Z;
    scanf("%lld",&Z);
    solve(X, Y, Z);
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdint>
#include <queue>

int const MAXN = 2e5;
int64_t const MOD = 1e9+7;

std::vector<int> G[MAXN];
int N;

int64_t inv[MAXN+1];
int64_t fact[MAXN+1];
int64_t ifact[MAXN+1];

void init(int n) {
  fact[0] = ifact[0] = fact[1] = ifact[1] = inv[1] = 1;
  for(int64_t i = 2; i <= n; ++i) {
    fact[i] = fact[i-1]*i%MOD;
    inv[i] = (MOD/i)*(MOD - inv[MOD%i])%MOD;
    ifact[i] = ifact[i-1]*inv[i]%MOD;
  }
}

int64_t nn[MAXN];
int64_t dp1[MAXN];

void dfs1(int v, int p) {
  int64_t num = 0, val = 1;
  for(auto e: G[v]) {
    if(e == p) continue;
    dfs1(e, v);
    num += nn[e];
    val = val*dp1[e]%MOD;
    val = val*ifact[nn[e]]%MOD;
  }
  dp1[v] = val*fact[num]%MOD;
  nn[v] = num + 1;
}

void dfs2(int v, int p) {
  for(auto e: G[v]) {
    if(e == p) continue;
    int64_t tmp = dp1[v]*nn[e]%MOD;
    dp1[e] = tmp*inv[N-nn[e]]%MOD;
    dfs2(e, v);
  }
}

int main() {
  std::cin >> N;
  init(std::max(2, N));
  for(int i = 0; i < N-1; ++i) {
    int a, b;
    std::cin >> a >> b; --a; --b;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  dfs1(0, -1);
  dfs2(0, -1);
  for(int i = 0; i < N; ++i) std::cout << dp1[i] << std::endl;
  return 0;
}


Measured memory_bytes: 21760
#include<bits/stdc++.h>
#define REP(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
typedef long long int ll;
const ll MOD = 1000000007;

int t(int i) {
  while (i % 10 != 0) ++i;
  return i;
}

int main() {
  int n, s = 0, mt = -1;
  REP(i, 5) {
    cin >> n;
    s += t(n);
    mt = max(t(n) - n, mt);
  }
  cout << s - mt << endl;
  return 0;
}

Measured memory_bytes: 256
import numpy as np
a, b, x = map(int, input().split())
if x >= a*a*b/2:
    l = 2*b - 2*x/(a**2)
    print(np.rad2deg(np.arccos(a/np.sqrt(l**2 + a**2))))
else:
    l = 2*x/(a*b)
    print(np.rad2deg(np.arcsin(b/np.sqrt(l**2 + b**2))))

Measured memory_bytes: 20648
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF 1e9;
using namespace std;
using ll = long long;
int main() {
    int a , b , c , count = 0;
    cin >> a >> b >> c;
    int K;
    cin >> K;
    for(int i = 0; i < 7; i++){
        if(a < b){
            break;
        }
        else{
            b *= 2;
            count++;
        }
    }
    for(int i = 0; i < 7; i++){
        if(b < c){
            break;
        }
        else{
            c *= 2;
            count++;
        }
    }
    if(count <= K){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
}

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

template <typename T>
T euqlid(T a, T b){
    if(a < b){
        int x = a;
        a = b;
        b = x;
    }
    T q, r;
    q = b;
    r = a % b;
    if(r) return euqlid(q, r);
    else return q;
}

int main(){
    long long a, b, c, d;
    cin >> a >> b >> c >> d;
    long long new_b, new_a;
    a--;
    new_b = b / c + b / d - b / (c * d / euqlid(c,d));
    new_a = a / c + a / d - a / (c * d / euqlid(c,d));
    cout << (b - a) - (new_b - new_a) << endl;
    return 0;
}

Measured memory_bytes: 3592
#include<cstdio>
#include<iostream>
#include<cmath>
using namespace std;
int main(){
    int a,b,C;
    double rad,S,L,h;
    cin >> a >> b >> C;
    rad = C * acos(-1) / 180;
    S = a * b * sin(rad) / 2;
    printf("%f\n",S);
    L = a + b + sqrt(pow(b,2) + pow(a,2) - 2 * a * b * cos(rad));
    printf("%f\n",L);
    h = b * sin(rad);
    printf("%f\n",h);
    
    return 0;
}


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

int main() {
  int N, K, count = 0;
  cin >> N >> K;
  vector<int> vec(N);

  for (int i = 0; i < N; i++) {
    cin >> vec.at(i);
    if (vec.at(i) >= K) {
      count++;
    }
  }
  cout << count << endl;
}


Measured memory_bytes: 640
#include <stdio.h>

int main(){
    char S[3];
    char T[3];
    int i,cnt=0;
    scanf("%s",&S);
    scanf("%s",&T);
    for(i=0;i<3;i++){
        if(S[i] == T[i]) cnt++;
    }
    printf("%d\n",cnt);
    return 0;
}

Measured memory_bytes: 128
A = int(input())
B = int(input())
C = int(input())
X = int(input())
L = 0

for i in range(A+1):
    for j in range(B+1):
        for k in range(C+1):
            if 500*(i)+100*(j)+50*(k) == X:
                L += 1

print(L)

Measured memory_bytes: 3060
s = input()

even = []
odd = []
for i, j in enumerate(s):
    if i % 2 == 0:
        odd.append(j)
    else:
        even.append(j)

ans = 'No'
count = 0
for i in odd:
    if i == 'R' or i == 'U' or i == 'D':
        count+=1


count2 = 0
for i in even:
    if i == 'L' or i == 'U' or i == 'D':
        count2 +=1


if count == len(odd) and count2 == len(even):
    ans = 'Yes'


print(ans)

Measured memory_bytes: 3064
def nyu():
    N = int(input())
    L = list(map(int,input().split()))
    L.sort()

    return N,L

def check(N,L):
    sum =0 

    for n in range(N-1):
        sum += L[n]
    if sum > L[N-1]:
        print("Yes")
    else:
        print("No")
    



N,L =nyu()
check(N,L)







Measured memory_bytes: 2940
#include <bits/stdc++.h>
#include <cstring>
#include <limits>
using namespace std;
#define ll long long int
#define lli long long int
#define fw(i, s, e) for (ll i = s; i < e; ++i)
#define fe(i, s, e) for (ll i = s; i <= e; ++i)
#define fb(i, e, s) for (ll i = e; i > s; --i)
#define L(T)  \
    ll T;     \
    cin >> T; \
    while (T--)
#define FASTIO                   \
    ios::sync_with_stdio(false); \
    cin.tie(nullptr);            \
    cout.tie(nullptr);
#define mem(a, i) memset(a, i, sizeof(a))
#define ld long double
#define endl "\n"
#define in(P) \
    ll P;     \
    cin >> P;
int main()
{
    FASTIO
    in(n);
    ll a[n + 90];
    fe(i, 1, n)
    {
        cin >> a[i];
    }
    sort(a + 1, a + 1 + n);
    if (n == 1)
    {
        cout << 0 << endl;
    }
    else if (n == 2)
    {
        cout << a[2] << endl;
    }
    else if (n > 2)

    {
        ll s = 0;
        fb(i, n - 1, n / 2)
        {
            s += (2 * a[i]);
        }
        if (n % 2)
        {
            s -= a[(n / 2) + 1];
        }
        cout << s + a[n] << endl;
    }
    return 0;
}

Measured memory_bytes: 5180
#include <bits/stdc++.h>
using namespace std;
template<class t> inline t read(t &x){
	x=0;char c=getchar();bool f=0;
	while(!isdigit(c)) f|=c=='-',c=getchar();
	while(isdigit(c)) x=(x<<1)+(x<<3)+(c^48),c=getchar();
	if(f) x=-x;return  x;
}
template<class t> inline void write(t x){
	if(x<0){putchar('-'),write(-x);}
	else{if(x>9)write(x/10);putchar('0'+x%10);}
}

signed main(){
	int x,y,z;
	read(x);read(y);read(z);
	if(x+y+z<=21) puts("win");
	else puts("bust");
}

Measured memory_bytes: 256
import sys
import math

n,q = map(int, input().split())
s = input()

left = [0] * n

for i in range(n):
    if i:
        if s[i-1:i+1] == 'AC':
            left[i] = left[i - 1] + 1
        else:
            left[i] = left[i - 1] 
for i in range(q):
    l, r = map(int, input().split())
    print(left[r - 1] - left[l - 1])


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

int main (void) {
  int N, X;
  cin >> N >> X;
  vector<int> L(N);
  for (int i = 0; i < N; i++)
    cin >> L[i];

  vector<int> D(N + 1);
  for (int i = 0; i < N; i++)
    D[i + 1] = D[i] + L[i];

  int ans = 0;
  for (const auto& d : D) {
    if (d <= X)
      ans++;
  }
  cout << ans << endl;

  return 0;
}


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

PY = [tuple([i] + list(map(int,input().split(' ')))) for i in range(1,M+1)]
sorted1_PY = sorted(PY,key=lambda x:(x[1],x[2]))


prefecture = None
number = 1
sorted2_PY = []
for b,c,d in sorted1_PY:
  if  c!= prefecture:
    number = 1
    sorted2_PY.append((number,b,c,d))
    prefecture = c
  else:
    number += 1
    sorted2_PY.append((number,b,c,d))
    prefecrure = c

sorted3_PY = sorted(sorted2_PY,key=lambda x:x[1])

for a,b,c,d in sorted3_PY:
  prefecture = c
  number =  a
  print((str(c).rjust(6, '0') + (str(a).rjust(6, '0'))))
  

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

using namespace std;

#define U unsigned
#define L long
#define LL long long 
#define LLU long long unsigned
#define rarr(arr, n) for(int aab = 0; aab < n; aab++){cin >> arr[aab];}
#define parr(arr, n) for(int aab = 0; aab < n; aab++){cout << arr[aab] << " ";}
#define swap(a, b, tip) tip tempswap = a;a = b;b = tempswap;
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define debug(x) cout << #x << " = " << x << "\n";

#define freopen freopen("in.txt", "r", stdin);freopen("out.txt", "w", stdout);
	
int main(){
	unsigned long long int n, sum = 0;

	cin >> n;

	for(int i = 1; i <= n; i++){
		for(int j = 1; j <= n; j++){
			for(int k = 1; k <= n; k++){
				sum += __gcd(__gcd(i, j), k);
			}
		}
	}
	cout << sum;
}

Measured memory_bytes: 3640
#include <iostream>
#include <cstdio>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <utility>
#include <stack>
#include <queue>
#include <sstream>
#include <fstream>
#include <float.h>
#include <cmath>
#include <cstring>

using namespace std;

#define FOR(i,n) for(i=0;i<n;++i)
#define INF 1e9

int i,j,a,b,c,n,m,x,y,z;

int main(void){
    int poker[14]={0,13,1,2,3,4,5,6,7,8,9,10,11,12};
    cin>>a>>b;
    if(poker[a]>poker[b])cout<<"Alice";
    else if(poker[a]<poker[b])cout<<"Bob";
    else cout<<"Draw";
    
    return 0;
    
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <cstdlib>
#include <cstring>

using namespace std;

#pragma GCC oprimize("Ofast")
#define rep(i,a,b) for(__typeof(b)i=a;i<b;++i)

typedef long long ll;
typedef vector<ll> vl;

const ll inf = 100000000000;

ll n,k;
ll mem[100010];
vl l;


ll dp(ll at)
{
	if(at>n-1)return inf;
	if(at==n-1)return 0;
	if(mem[at]!=-1)return mem[at];
	ll ans = inf;
    rep(i,1,k+1)
	    ans = min(ans,abs(l[at]-l[at+i])+dp(at+i));
	return mem[at] = ans;
}


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

    memset(mem,-1,sizeof(mem));

	cin >> n >> k;
	l.resize(n);
	rep(i,0,n)
	{
		cin >> l[i];
	}
	cout << dp(0);
	return 0;
}


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

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

int main() {
    int n,k; cin >> n >> k;
    vector<int> a(n);
    vector<int> b(n,0);
    REP(i, n){cin >> a[i];}
    REP(i, n){
        b[a[i] - 1] ++;
    }
    sort(b.begin(), b.end());
    int ans = 0;
    int nz, nm;
    REP(i, n){
        if(b[i] != 0){
            nz = i;
            break;
        }
    }
    nm = n - nz;
    while(nm > k){
        ans += b[nz];
        nz ++;
        nm = n - nz;
    }
    cout << ans;
}

Measured memory_bytes: 1792
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<string>
#include<stack>
#include<cstdio>
#include<cmath>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
typedef pair<int,P> P1;

#define fr first
#define sc second
#define mp make_pair
#define pb push_back
#define rep(i,x) for(int i=0;i<x;i++)
#define rep1(i,x) for(int i=1;i<=x;i++)
#define rrep(i,x) for(int i=x-1;i>=0;i--)
#define rrep1(i,x) for(int i=x;i>0;i--)
#define sor(v) sort(v.begin(),v.end())
#define rev(s) reverse(s.begin(),s.end())
#define lb(vec,a) lower_bound(vec.begin(),vec.end(),a)
#define ub(vec,a) upper_bound(vec.begin(),vec.end(),a)
#define uniq(vec) vec.erase(unique(vec.begin(),vec.end()),vec.end())
#define mp1(a,b,c) P1(a,P(b,c))

const int INF=1000000000;
const int dir_4[4][2]={{1,0},{0,1},{-1,0},{0,-1}};
const int dir_8[8][2]={{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1},{0,-1},{1,-1}};

int main(){
	int n;
	scanf("%d",&n);
	
	int k = 0;
	vector<int> vec[102];
	if(n%2 == 0){
		for(int i = 1 ; n+1-i > i ; i ++){
			vec[k].pb(i);
			vec[k].pb(n+1-i);
			k ++;
		}
	}
	else {
		for(int i = 1 ; n-i > i ; i ++){
			vec[k].pb(i);
			vec[k].pb(n-i);
			k ++;
		}
		vec[k].pb(n);
		k ++;
	}
	
	vector<pair<int,int>> ret;
	rep(i,k){
		if(k == 2 && i == 1)break;
		for(int s: vec[i])for(int t: vec[(i+1)%k]){
			ret.pb(pair<int,int>(s,t));
		}
	}
	cout << ret.size() << endl;
	for(pair<int,int> p: ret){
		printf("%d %d\n",p.fr,p.sc);
	}
}



Measured memory_bytes: 256
N = int(input())
abc = [[int(x) for x in input().split()] for _ in range(N)]
dp = [0,0,0] * N

for i in range(N):
  if i == 0:
    dp[0] = abc[0]
    continue

  dp[i] = [abc[i][0]+max(dp[i-1][1],dp[i-1][2]), \
           abc[i][1]+max(dp[i-1][0],dp[i-1][2]), \
           abc[i][2]+max(dp[i-1][0],dp[i-1][1])]
  
print(max(dp[N-1]))

Measured memory_bytes: 45684
#include <bits/stdc++.h>
 
#define f(i,a,b) for( ll i = a; i < b ; i++ ) 
#define af(i,a,b) for( ll i = a; i >= b ; i--)
#define rep(i,a,b,k) for(ll i = a; i < b ; i+= k )
#define arep(i,a,b,k) for( ll i = a; i >= b ; i-= k)
#define ones(x) (ll) __builtin_popcount(x)
#define fs first
#define sc second
#define pb push_back
#define po pop_back
#define mp make_pair  
#define sz(a) (ll) a.size()
#define all(a) a.begin(), a.end()
#define sor(a) sort( a.begin(), a.end() )
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL)
#define ller ios::sync_with_stdio(false);cin.tsie(nullptr);cout.tie(nullptr)
 #define watch(x) cout<<(#x)<<" is " <<x<<"\n"

#define PI 3.1415926535
using namespace std;
typedef long long ll;
typedef long double ld; 
typedef pair<ll,ll> ii ;
typedef vector<ll>  vi ;
typedef vector<ii> vii ;
const ll mod = 1e9 + 7;
const ll MAX = 1e6+7;
const ll inf = 1e18+1;

ll binpow(ll a,ll b,ll m){
    a%=m;
    ll res =1;
    while(b>0){
        if(b&1) res=res*a%m;
        a=a*a%m;
        b>>=1;
    }
    return res;
}
ll fact[MAX+5];
ll invmod(ll n){
    return binpow(n,mod-2,mod);
}
ll combi(ll n ,ll k){
    ll arriba = fact[n]%mod;
    ll abajo = (fact[n-k]*fact[k])%mod;
    return (arriba*invmod(abajo))%mod;
}
void factpre(){
    fact[0]=1;
    f(i,1,MAX){
        fact[i]=(i*fact[i-1])%mod;
    }
}
int main(){
 fastio;
 factpre();
 ll x,y,aux;
 cin>>x>>y;
 if((x+y)%3!=0){cout<<"0\n";return 0;}
 aux =(x+y)/3;
 if(2*min(x,y)<max(x,y)){cout<<"0\n";return 0;}
 x-=aux,y-=aux;
 ll a = x+y;
 cout<<combi(a,x)<<"\n";
 return 0; 
}

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

#define ll long long
#define ld long double
#define pb push_back
#define eb emplace_back
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()

#define int long long
using namespace std;
const int INF = 2e18;
const int MOD = 1e9 + 7;
const int MB = 60;
const int maxN = 3001;

int dp[maxN][maxN];

void solve() {
	int n;
	cin >> n;
	string s;
	cin >> s;
	
	dp[1][1] = 1;
	vector<int> pref(n + 1), suff(n + 1);
	pref[1] = suff[1] = 1;
	for (int i = 2; i <= n; i++) {
		for (int j = 1; j <= i; j++) {
			if (s[i - 2] == '<') {
				dp[i][j] += pref[j - 1];
			}
			else {
				dp[i][j] += suff[j];
			}
			dp[i][j] %= MOD;
		}
		for (int j = 1; j <= n; j++) {
			pref[j] = (pref[j - 1] + dp[i][j]) % MOD;
		}
		for (int j = n; j > 0; j--) {
			suff[j] = ((j == n ? 0 : suff[j + 1]) + dp[i][j]) % MOD;
		}
	}
	int ans = 0;
	for (int i = 1; i <= n; i++) {
		ans += dp[n][i];
		ans %= MOD;
	}

	cout << ans;
}

signed main() {
	/*
	freopen("search.in", "r", stdin);
	freopen("search.out", "w", stdout);
	*/
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	cout << fixed;
	cout.precision(12);
	solve();
}


Measured memory_bytes: 68992
#include<stdio.h>
int a[100];
int j,n;
void output()
{
    int i;
    printf("%d",a[0]);
    for(i=1;i<n;i++)
    {
        printf(" %d",a[i]);
    }
    printf("\n");
}
int main()
{
    int i;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    output();
    for(i=1;i<n;i++)
    {
        int key=a[i];
        j=i-1;
        while(j>=0&&a[j]>key)
        {
            a[j+1]=a[j];
            j--;
        }
        a[j+1]=key;
        output();
    }
    return 0;
}


Measured memory_bytes: 2040
import java.util.*;

public class Main {
    public static void main(String[] args) {
        //コード
        Scanner scanner = new Scanner(System.in);
        Integer N = Integer.parseInt(scanner.next());

        Integer[] X = new Integer[N];
        for(int i = 0; i < N; i++) {
            X[i] = Integer.parseInt(scanner.next());
        }


        Integer all = Integer.MAX_VALUE;
        for (int i = 1; i < 100; i++) {
            Integer ans = 0;
            for (int j = 0; j < X.length; j++) {
                ans += Math.abs((X[j]  - i) )* Math.abs((X[j]  - i));
            }
            all = Math.min(all, ans);
        }
        System.out.println(all);
    }
}


Measured memory_bytes: 21588
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++)
#define repr(i, n) for (ll i = n; i >= 0; i--)
#define pb push_back
#define COUT(x) cout << (x) << endl
#define COUTF(x) cout << setprecision(15) << (x) << endl
#define ENDL cout << endl
#define DF(x) x.erase(x.begin())  // 先頭文字削除
#define ALL(x) x.begin(), x.end()
#define SORT(x) sort(ALL(x))
#define REVERSE(x) reverse(ALL(x))
#define init() \
  cin.tie(0);  \
  ios::sync_with_stdio(false)
#define debug(x) cerr << "[debug] " << #x << ": " << x << endl;
#define debugV(v)                       \
  cerr << "[debugV] " << #v << ":";     \
  rep(i, v.size()) cerr << " " << v[i]; \
  cerr << endl;
using namespace std;
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using P = pair<ll, ll>;
constexpr ll INF = 0x3f3f3f3f3f3f3f3f;
constexpr ld PI = 3.141592653589793238462643383279;
ll get_digit(ll x) {
  return to_string(x).size();
}

ll gcd(ll x, ll y) {
  return y ? gcd(y, x % y) : x;
}

ll lcm(ll a, ll b) {
  return a / gcd(a, b) * b;
}

vector<P> factorize(ll n) {
  vector<P> result;
  for (ll i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      result.pb({i, 0});
      while (n % i == 0) {
        n /= i;
        result.back().second++;
      }
    }
  }
  if (n != 1) {
    result.pb({n, 1});
  }
  return result;
}

vll divisor(ll n) {
  vll ret;
  for (ll i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  SORT(ret);
  return (ret);
}

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

signed main() {
  init();
  ll N;
  cin >> N;
  if (N < 1000) {
    COUT("ABC");
  } else {
    COUT("ABD");
  }
  return 0;
}

Measured memory_bytes: 256
import java.util.Scanner;

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

		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		//String s = sc.next();
		String s = "Christmas";
		for(int i = 25 ; i > n ; i--) {
			s += " Eve";
		}

		System.out.println(s);

	}
}



Measured memory_bytes: 38444
// Solid <candgenesis>
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define fs first
#define sc second
#define task "tst"
using namespace std;
const ll base = 7;
const ll N = 3e6 + 9;
const ll mod = 1e9 + 7;
typedef pair<ll,ll> LL;

string s;
ll n,k,gt[N],ans = 0,i;
ll bpow(ll a,ll b){
    if (b == 0) return 1;
    ll t = bpow(a,b/2);
    if (b%2 == 0) return (t%mod * t%mod)%mod;
    return (t%mod * t%mod * a%mod)%mod;
}
ll rev(ll n){
    return bpow(n,mod - 2);
}
ll C(ll k,ll n){
    return (gt[n]*rev((gt[k]*gt[n - k])%mod))%mod;
}
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0), cout.tie(0);
    if (fopen(task".inp", "r")){
        freopen(task".inp", "r", stdin);
        //freopen(task".out", "w", stdout);
    }
    cin>>k>>s; n = s.size();
    gt[0] = 1;
    for (i = 1;i < 2000009;i++) gt[i] = (gt[i - 1]*i)%mod;
    //cout<<C(2,2); return 0;
    for (i = n;i <= n + k;i++){
        //cout<<(bpow(26,n + k - i)*bpow(25,i - n))%mod * C(n - 1,i - 1)<<"\n";
        ans += (bpow(26,n + k - i)*bpow(25,i - n))%mod * C(n - 1,i - 1);
        ans %= mod;
    }
    cout<<ans;
}


Measured memory_bytes: 19836
#include "bits/stdc++.h"
using namespace std;
#define REP(i, n) for(ll i = 0;i < n;i++)
#define ll long long
#define MOD 1000000007
using vi = vector<int>; // intの1次元の型に vi という別名をつける
using vvi = vector<vi>; // intの2次元の型に vvi という別名をつける

int n,k,x,y;

int main(){
  int ans=0;
  cin >> n;
  
  vector<pair<string, pair<int, int>>> p(n);
  string s;
  int score;
  REP(i,n){
    cin>>s;
    cin>>score;
    p[i]=make_pair(s,make_pair(-score,i+1));
  }
  
  sort(p.begin(), p.end());
  
  
  
  REP(i,n){
  	cout<<p[i].second.second<<endl;
  }

  return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
#include <math.h>

double to_deg(double r)
{
    return r * 180.0 / (atan(1.0) * 4.0);
}

int main()
{
    int a;
    int b;
    int x;
    scanf("%d %d %d", &a, &b, &x);

    double h = (double)x / (double)(a * a);
    if (h * 2 > b)
    {
        double t = to_deg(atan(((double) b - h) * 2. / (double) a));
        printf("%lf", t);
        return 0;
    }
    else
    {
        double d = (double)x / (double)a;
        double j = d / (double)b * 2.;
        double t = to_deg(atan((double)b / j));

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

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

static const int N = 100;

int main(){
    int n, p[N+1], m[N+1][N+1];
    
    cin >> n;
    for(int i=1;i<=n;i++){
        cin >> p[i-1] >> p[i];
    }
    
    for(int i=1;i<=n;i++) m[i][i]=0;
    for(int l=2;l<=n;l++){
        for(int i=1;i<=n-l+1;i++){
            int j = i+l-1;
            m[i][j] = (1 << 21);
            for(int k=i;k<=j-1;k++){
                m[i][j] = min(m[i][j], m[i][k]+m[k+1][j]+p[i-1]*p[k]*p[j]);
            }
        }
    }
    
    cout << m[1][n] << endl;
    
    return 0;
}


Measured memory_bytes: 3140
#include<bits/stdc++.h>
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) \
  for (ll i = static_cast<int>(a); i < static_cast<int>(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, ) (__VA_ARGS__)  // NOLINT
#define chmax(x, a)  do { x = max(x, a); } while(0)
#define chmin(x, a)  do { x = min(x, a); } while(0)

using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair<ll,ll> PLL;

void solve() {
  ll x,k,d;
  cin >> x >> k >> d;
  if (x < 0)
    x *= -1;

  ll t = min(k, (x - d + d - 1)/ d);
  k -= t;
  x -= d * t;

  ll ans;
  if ((k % 2) == 0) {
    ans = x;
  } else {
    ans = abs(x-d);
  }
  cout << ans << endl;
}

int main() {
  //ll T;
  //cin >> T;
  //rep(_,T)
    solve();
  return 0;
}


Measured memory_bytes: 3608
s = gets.chop

flag = 1

for i in 0..s.length-1 do

  if i % 2 == 0 && s[i] == 'L' then
    flag = 0
  end

  if i % 2 == 1 && s[i] == 'R' then
    flag = 0
  end

end


if flag == 1 then
  puts "Yes"
else
  puts "No"
end


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

const int N = 3e5 + 9;

int32_t main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int n; cin >> n;
	cout << 360 / __gcd(360, n) << '\n';
    return 0;
}

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

int main(){
  long long n;
  int cnt=0;
  cin>>n;
  int flag=1;
  for(int i=1;i<=n;i++){
    for(int j=1;j<=n;j++){
      if(i*j<n) cnt++;
      if(i*j>=n) break;
    }
  }
  cout<<cnt<<endl;
  return 0;
}


Measured memory_bytes: 3668
/*
@Author
   Sujeet Kushwaha
*/
 
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
 
#define ll long long int
#define fast ios_base::sync_with_stdio(false)
#define fast_input cin.tie(NULL)
#define fast_output cout.tie(NULL)
#define vi vector<long long int> 
#define vp vector<pair<long long int ,long long int>>
#define pb push_back
#define mp make_pair
#define pp pop_back
#define iter vector<int>::iterator
#define pa pair<long long int ,long long int> 
#define f(a,b) for(int a=0;a<b;a++)
#define mod 1000000007
#define F first
#define S second
#define endl "\n"
#define sett set<long long int>
#define um unordered_map<ll,ll>
#define ordered_set tree<pa, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> 
ll mul(ll a,ll b)
{
	if(a>mod)
	 a-=mod;
	if(b>mod)
	 b-=mod;
	return (a%mod*b%mod)%mod;
}
ll add(ll a,ll b)
{
	ll res=a+b;
	if(res>=mod)
	{
      res-=mod;
	}
	return res;
}
// // ll sub(ll a,ll b)
// // {
// // 	ll res=a-b;
// // 	if(res<0)
// // 	 res+=mod;
// // 	return res;
// // }
ll powmod(ll a, ll b)
{
    ll res = 1;
    while (b) {
        if (b&1) {
            res =mul(res,a);
        }
        b >>= 1;
        a=mul(a,a);
    }
 
    return res;
}
 
// ll modinv(ll a)
// {
//     return powmod(a, mod - 2);
// }
//  unordered_map<ll,ll>facti;
//  ll fact(ll n)
//  {
// 	if(n==0)return 1;
// 	if(n<=1)return 1;
// 	if(facti[n]!=0)return facti[n];
// 	return facti[n]=mul(n,fact(n-1));
//  }
//   ll ncr(ll n,ll r)
//   {
//         ll h=fact(n);
// 	ll v=fact(r);
// 	ll j=fact(n-r);
// 	v=mul(v,j);
// 	v=powmod(v,mod-2);
// 	return mul(h,v);
//  }
// int fastread(){
//     int x=0;
//     int c = getchar_unlocked();
//     while(c<48)
//         c = getchar_unlocked();
//     while(c>=48){
//         x = x*10 + (c - 48);
//         c = getchar_unlocked();
//     }
//     return x;
// }

void solve()
{
  ll n;
  cin>>n;
  string s;
  cin>>s;
  ll c=0;
  for(int i=0;i<n;i++)
  {
    if(s.substr(i,3)=="ABC")
      c++;
  }
  cout<<c;
}
int main() {
	fast;
	fast_input;
	fast_output;
	
	  solve();
	return 0;
}

Measured memory_bytes: 256
A, B = map(int, input().split())  #数字

import math
x = math.ceil(A / 0.08)
#print(x)

y = math.ceil(B / 0.1)
#print(y)

if x == y:
    print(int(x))
    exit()

if y < x:
#    print("y < x")
    while y < x:
        y += 1
        z = y * 0.1
    if z >= B + 1:
        print(-1)
        exit()
    else:
        print(int(x))
        exit()

if y > x:
#    print("y > x")
    while y > x:
        x += 1
        z = x * 0.08
    if z >= A + 1:
        print(-1)
        exit()
    else:
        print(int(y))
        exit()

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

using namespace std;

#define LL long long
#define DD double
#define Pb push_back
#define Bp pop_back
#define Pf push_front
#define Fp pop_front
#define Ub upper_bound
#define Lb lower_bound
#define In insert
#define All(x) x.begin(), x.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define fast ios_base::sync_with_stdio(0);cin.tie(0)
#define X first
#define Y second
#define mx1 10
#define mx2 110
#define mx3 1010
#define mx4 10010
#define mx5 100010
#define mx6 1000010

typedef vector<LL> Vl;
typedef vector<DD> Vd;
typedef vector<bool> Vb;
typedef vector<Vl> VVl;
typedef pair<LL, LL> Pll;
typedef pair<DD, DD> Pdd;
typedef vector<Pll> Vpl;
typedef vector<Pdd> Vpd;
typedef queue<LL> Ql;
typedef stack<LL> Sl;
typedef deque<LL> Dl;

LL _set(LL N, LL pos) {return N = N | (1 << pos);}
LL _reset(LL N, LL pos) {return N = N & ~(1 << pos);}
bool _check(LL N, LL pos) {return (bool)(N & (1 << pos));}
bool _upper(char a) {return a >= 'A' && a <= 'Z';}
bool _lower(char a) {return a >= 'a' && a <= 'z';}
bool _digit(char a) {return a >= '0' && a <= '9';}

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

///**************************DONE****************************///

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

    for(LL i = 1; i <= 3500; i++){
        for(LL j = 1; j <= 3500; j++){

            if(4 * i * j - n * i - n * j <= 0)
                continue;

            LL x = 4 * i * j - n * i - n * j, y = n * i * j;
            if(y % x == 0)
                return cout << y / x << ' ' << i << ' ' << j << '\n', 0;
        }
    }
    return 0;
}


Measured memory_bytes: 3628
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class MainClass
{
	public const long Giri = 1000000007;

	public static void Main(string[] args)
	{
		var p = Input().ToInt();
		int n = p[0];
		int i = p[1];
		Console.WriteLine(n - i + 1);
		
	}
	
	static long GCD(long a, long b)
	{
		var v = new[] { a, b };
		while (v[1] != 0) { v = new[] { v[1], v[0] % v[1] }; }
		return v[0];
	}
	public static string[] Input() { return Console.ReadLine().Split(' '); }
	public static int Clamp(int val, int max, int min = 0) { return Math.Min(max, Math.Max(min, val)); }
}

public static class Smarter
{
	public static int ToInt(this string str) { return int.Parse(str); }
	public static long ToLong(this string str) { return long.Parse(str); }
	public static int[] ToInt(this string[] str)
	{
		int[] r = new int[str.Length];
		for(int i = 0; i < str.Length; i++) r[i] = str[i].ToInt();
		return r;
	 }
	
}

Measured memory_bytes: 13140
#include <bits/stdc++.h>
using namespace std;
const int N = 32;
int n, m, k, a;
int loved[N];
int main()
{
	cin >> n >> m;
	for(int i = 0; i < n; i++) {
		cin >> k;
		while (k--)
		{
			cin >> a;
			loved[a]++;
		}
	}
	int ans = 0;
	for(int i = 1; i<=m; i++)
		ans+=(loved[i]==n);
cout << ans << endl;
}

Measured memory_bytes: 256
#include<iostream>
#include<map>
#include<set>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<limits>
#include<sstream> 
#include<unordered_map>      

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef int itn;
typedef vector<int> vi;
typedef vector<ll> vl;

const int inf = numeric_limits<int>::max() >> 2;
const ll linf = numeric_limits<ll>::max() >> 2;
const ull ulinf = numeric_limits<ull>::max() >> 2;
const double pi = acos(-1);
const int dx[4]={1,0,-1,0};
const int dy[4]={0,1,0,-1};
const int dx8[8]={-1,0,1,-1,1,-1,0,1};
const int dy8[8]={-1,-1,-1,0,0,1,1,1};

#define p_queue(i) priority_queue<i> 
#define rp_queue(i) priority_queue<i, vector<i>, greater<i>> 
#define umap(i,j) unordered_map<i,j>
#define P(p) cout<<(p)<<endl
#define PS(p) cout<<(p)<< " "
#define IN cin >> 
#define rep(i,m,n) for(int i = (m); i < (int)(n); i++)
#define rrep(i,m,n) for(int i = (m-1); i >= (int)(n); i--)
#define inrep(n,a) for(int i = 0; i < (int)(n); i++)cin >> a[i];
#define mod(i) ((i)%(ll)(1e9 + 7))
#define divm(a,b) (mod(a * modpow((ll)b,(ll)(1e9+5))))
#define rsort(a,b,c) sort(a, b, greater<c>())
#define vsort(v) sort(v.begin(), v.end())
#define rvsort(v,c) sort(v.begin(), v.end(), greater<c>()) 
#define ft first
#define sd second
#define pb push_back
#define it insert
#define sz(x) ((int)(x).size())
#define lb(a,n,k) (lower_bound(a,a+n,k) - a) 
#define vlb(a,k)  (lower_bound(a.begin(),a.end(),k) - a.begin())
#define ub(a,n,k) (upper_bound(a,a+n,k) - a) 
#define vub(a,k)  (upper_bound(a.begin(),a.end(),k) - a.begin())
#define YES cout<<"YES"<< endl
#define NO cout<<"NO"<<endl
#define Yes cout<<"Yes"<<endl
#define No cout<<"No"<<endl  
#define yes cout<<"yes"<<endl
#define no cout<<"no"<<endl
#define ret return

ll modpow(ll i,ll j){ ll tmp=1; while(j){ if(j%2)tmp=mod(tmp*i);i=mod(i*i);j/=2;}return tmp;}
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }

vector<string> split(const string &str, char sep){
    vector<string> v;
    stringstream ss(str);
    string buffer;
    while( getline(ss, buffer, sep) ) {
        v.push_back(buffer);
    }
    return v;
}

//ll ncr[100][100];
//ll nCr(int n, int r){if(n==r) ret ncr[n][r] = 1; if(r==0) ret ncr[n][r] = 1; if(r==1) ret ncr[n][r] = n;if(ncr[n][r]) ret ncr[n][r]; ret ncr[n][r] = nCr(n-1,r) + nCr(n-1,r-1);}

//ll npr[100][100]={};
//ll nPr(int n,int r){if(npr[n][r])ret npr[n][r];if(r==0)ret npr[n][r] = 1;if(r==1)ret npr[n][r] = n;ret npr[n][r] = n * nPr(n-1,r-1);}

//ll nHr(int n,int r){ret nCr(n+r-1,r);}

///////////////////////////////////////////////////////////////////////////



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

    if(a+2 >= b){
        P(1+k);
        ret 0;
    }
    
    ll ans = 1;
    k -= a-1;
    ans = a;
    while(k > 1){
        k -= 2;
        ans -= a;
        ans += b;
    }
    P(ans + k);
    /*
    
    
    ll ans = 1;
   
    ll n = k/(a+2);
    k -= (a+2)*n;

    PS(n);P(k);
    ans += n*b;
    P(ans);
    
    P(ans + k);*/
	return  0;
}   

Measured memory_bytes: 256
n,m=map(int,input().split())
py=[list(map(int,input().split()))+[i] for i in range(m)]

py.sort(key=lambda x: (x[0],x[1]))
_dict = {}

ans=[]
for i in range(m):
    if not py[i][0] in _dict:
        _dict[py[i][0]]=1
    else:
        _dict[py[i][0]]+=1
    p="0"*(6-len(str(py[i][0])))+str(py[i][0])
    y="0"*(6-len(str(_dict[py[i][0]])))+str(_dict[py[i][0]])
    ans.append([p+y,py[i][2]])

ans.sort(key=lambda x: x[1])
for i in range(m):
    print(ans[i][0])

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

int main()
{
	int a,b,c;
	cin >> a >> b >> c;
	if(a + b >= c - 1){
		cout << b + c << "\n";
	}else{
		cout << a + b * 2 + 1 << "\n";
	}

	return 0;
}


Measured memory_bytes: 256