akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
using namespace std;

int main() {
    int hp, N;
    cin >> hp >> N;
    
    int tmp, S = 0;
    for(int i=0; i<N; i++) {
        cin >> tmp;
        S += tmp;
    }

    cout << ((S>=hp) ? "Yes" : "No") << endl;
    return 0;
}

Measured memory_bytes: 256
#include<cstdio>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int a,b,c,d,flg;
	scanf("%d %d %d %d",&a,&b,&c,&d);
	while(1)	{
		c=c-b;
		if(c<=0)	{
			flg=1;
			break;
		}
		a=a-d;
		if(a<=0)	{
			flg=0;
			break;
		}
	}
	if(flg==1)	printf("Yes\n");
	else printf("No\n");	
	return 0;
}

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

int main() {
  long long n,k,count=0,ans=0;
  cin>>n>>k;
  long long a[100010];
  for(int i=0;i<100010;i++){
    a[i]=0;
  }
  for(int i=0;i<n;i++){
    long long l,t;
    cin>>l>>t;
    a[l]+=t;
  }
  for(int i=1;i<100010;i++){
    count+=a[i];
    ans++;
    if(count>=k)break;
  }
  cout<<ans<<endl;
}


Measured memory_bytes: 1152
import sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def I(): return int(sys.stdin.readline().rstrip())
N = I()
A = LI()[::-1]
B = LI()[::-1]
ans = 0
for i in range(N):
    b = B[i]
    a = A[i]
    ans += min(a,b)
    b -= a
    if b<=0:
        continue
    a2 = A[i+1]
    ans += min(a2,b)
    A[i+1] = a2-(min(a2,b))
print(ans)


Measured memory_bytes: 18468
#include <bits/stdc++.h>
#include<cmath>
#define N 100005
#define A 1000005
#define MOD 998244353 //1000000007 // //100000000
#define INF 1000000000000000000
#define ll long long
//#define M_PI 3.141592653589793238463

using namespace std;

#define pii pair<ll, ll>
#define piii pair<ll, pii>
#define ft first
#define sd second
#define pb push_back
#define rep(i, n) for(ll i = 0; i < n; i++)
#define repr(i, n) for(ll i = n-1; i >= 0; i--)
#define itr(it, x) for(auto it = x.begin(); it != x.end(); it++)
#define mem(a, b) memset(a, (ll)b, sizeof(a))
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(), v.rend()
#define edge(v, x, y) v[x].pb(y); v[y].pb(x);
#define popcount __builtin_popcount
#define ANS(s) {cout << s << "\n"; return;}

//~~~~~~fancy print~~~~~~~//
#define printpii(a) cout << a.ft << " " << a.sd << endl;
#define printpiii(a) cout << a.ft << " " << a.sd.ft << " " << a.sd.sd << endl;
#define print(a, n) rep(i, n) cout << a[i] << " "; cout << endl;
#define printv(v) for(auto x: v)cout << x << " "; cout << endl;
#define printm(a, n, m) rep(i, n) { rep(j, m) cout << a[i][j] << "\t"; cout << endl;}

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

void fast(){ios_base::sync_with_stdio(false);cin.tie(0);cout << setprecision(12) << fixed;}

bool cmp(pair <string, pii> a, pair <string, pii> b)
{
    if(a.ft == b.ft) return a.sd > b.sd;
    return a.ft < b.ft;
}
void solve(){
    ll n;
    cin >> n;
    if(n < 100) ANS(0);
    ll dp[n+1]; mem(dp, -1);
    dp[0] = 0;
    ll c[] = {100, 101, 102, 103, 104, 105};
    rep(i, n)
    {
        rep(j, 6)
        {
            if(dp[i] != -1 && i+c[j] <= n)
                dp[i+c[j]] = 0;
        }
    }

    cout << dp[n]+1;
}
main(){
    /*#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif*/
    fast();
    ll t = 1; //cin >> t;
    while(t--){
        solve();
    }
}


Measured memory_bytes: 1024
# -*- coding: utf-8 -*-
# 整数の入力
#a = int(input())
# スペース区切りの整数の入力
p, q, r = map(int, input().split())
# 文字列の入力
#s = input()
if p>=q and r>=q:
	a=q
	if p>r:
		b=r
	else:
		b=p

elif q>=p and r>=p:
	a=p
	if q>r:
		b=r
	else:
		b=q
		
else:
	a=r
	if q>p:
		b=p
	else:
		b=q


# 出力
print("{}".format(a+b))

Measured memory_bytes: 3064
#include<bits/stdc++.h>
#define rep(i,N) for(int i=0;i<(N);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 1e12;
const int inf = 1e9;
typedef long long ll;
typedef pair<ll,int> P;
int main(){
    int n;
    cin>>n;
    vector<int> v(n,0);
    rep(i,n) cin>>v[i];
    sort(v.begin(),v.end());
    int sum=0;
    rep(i,n-1) sum+=v[i];
    if(sum>v[n-1]){
        cout<<"Yes"<<endl;
    }
    else{
        cout<<"No"<<endl;
    }
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main(){
  int n; cin>>n;
  vector<int> l(n);
  for(int i=0; i<n; i++) cin>>l.at(i);
  sort(l.begin(), l.end());
  int a=0;
  for(int i=0; i<n-1; i++)
    a+=l.at(i);
  if(l.at(n-1) < a)
    cout<<"Yes";
  else
    cout<<"No";
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int a,b,x,y,c;
int checks,pa,pb;
int main(){
    cin>>a>>b>>c>>x>>y;
    pa=x;pb=y;
    if(c*2<a+b){
        checks+=c*min(x,y)*2;
        pa-=min(x,y);
        pb-=min(x,y);
    }

    if(c*2>a&&pa>0){
        checks+=a*pa;
        pa=0;
    }

    if(c*2>b&&pb>0){
        checks+=b*pb;
        pb=0;
    }
    if(pb>0||pa>0){
        checks+=c*max(pa,pb)*2;
    }
    cout<<checks<<endl;





}


Measured memory_bytes: 256
#include<iostream>
#include<cstdlib>
using namespace std;
int main(void){
	int a,b,c,d;
	cin>>a>>b>>c>>d;
	if(abs(a-c)<=d||(abs(a-b)<=d&&abs(b-c)<=d)){
		cout<<"Yes"<<endl;
	}
	else{
		cout<<"No"<<endl;
	}
	return 0;
}


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

using namespace std;


int main() {
	int x, y, a, b, c;
	cin >> x >> y >> a >> b >> c;

	vector<int> first(a);

	for (int i = 0; i < a; i++) {
		cin >> first[i];
	}

	vector<int> second(b);

	for (int i = 0; i < b; i++) {
		cin >> second[i];
	}

	vector<int> third(c);

	for (int i = 0; i < c; i++) {
		cin >> third[i];
	}

	sort(first.rbegin(), first.rend());
	sort(second.rbegin(), second.rend());
	sort(third.rbegin(), third.rend());

	vector<int> res;

	for (int i = 0; i < min(x, a); i++) res.push_back(first[i]);

	for (int i = 0; i < min(y, b); i++) res.push_back(second[i]);

	for (int i = 0; i < min(x + y, c); i++) res.push_back(third[i]);

	long long sum = 0;

	sort(res.rbegin(), res.rend());

	for (int i = 0; i < x + y; i++) {
		sum += res[i];
	}

	cout << sum << endl;
}

Measured memory_bytes: 3572
#include <iostream>
#include <cstdio>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <stdlib.h>
#include <functional>
#include <string>
#include <list>
#include <fstream>
#include <iomanip>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
#include <random>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <chrono>
#define rep(i,s,n) for(int i = (s); (n) > i; i++)
#define REP(i,n) rep(i,0,n)
#define RANGE(x,a,b) ((a) <= (x) && (x) <= (b))
#define DUPLE(a,b,c,d) (RANGE(a,c,d) || RANGE(b,c,d) || RANGE(c,a,b) || RANGE(d,a,b))
#define INCLU(a,b,c,d) (RANGE(a,c,d) && (b,c,d))
#define PW(x) ((x)*(x))
#define ALL(x) (x).begin(), (x).end()
#define MODU 1000000007
#define bitcheck(a,b)   ((a >> b) & 1)
#define bitset(a,b)      ( a |= (1 << b))
#define bitunset(a,b)    (a &= ~(1 << b))
#define MP(a,b) make_pair((a),(b))
#define Manh(a,b) (abs((a).first-(b).first) + abs((a).second - ((b).second))
#define pritnf printf
#define scnaf scanf
#define itn int

#include <nmmintrin.h>
#ifdef _MSC_VER

#define __builtin_popcount _mm_popcnt_u32
#define __builtin_popcountll _mm_popcnt_u64
#endif
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
template<typename A, size_t N, typename T>
void Fill(A(&array)[N], const T &val) {
	std::fill((T*)array, (T*)(array + N), val);
}

int main() {

	int a, b, c, ans;
	cin >> a;

	cout << a/3 << endl;
	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<vector>
#include<algorithm>
#include<tuple>
#include<utility>

using namespace std;

typedef long long int64;

int main(void){
    int64 X,A;
    cin>>X>>A;
    if(X>=A) cout<<1;
    cout<<0<<endl;
    return 0;
}

Measured memory_bytes: 256
from collections import Counter
import numpy as np
N = int(input())
A = np.array(input().split(), dtype=int)
cum_sum = np.cumsum(A)
res = Counter(cum_sum)
ans = 0
for k, v in res.items():
  if k == 0:
    ans += v + v * (v - 1) // 2 # nC2
  else:
    ans += v * (v - 1) // 2 # nC2
print(ans)

Measured memory_bytes: 39356
#include <stdio.h>
//#include <math.h>
#define MIN(x,y) (((x) > (y)) ? (y) : (x))
#define ABS(x) ((x) >= 0 ? (x) : (-(x)))
#define PI 3.14159265
int main() {
  int r;
  scanf("%d", &r);
  printf("%lf", 2.0 * (double)r * PI);
  return 0;
}

Measured memory_bytes: 2212
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main()
{
  vector<vector<int>> A(3, vector<int>(3));
  rep (i, 3) {
    rep (j, 3) {
      cin >> A.at(i).at(j);
    }
  }
  // rep(i, 3)
  // {
  //   rep(j, 3)
  //   {
  //     int N;
  //     cout << A[i][j] << endl;
  //   }
  // }
  int N;
  cin >> N;
  rep(i, N) {
    int b;
    cin >> b;
    rep(i, 3) {
      rep(j, 3) {
        if (A.at(i).at(j) == b) {
          A[i][j] = -1;
        }
      }
    }
  }
  bool bingo = false;
  rep(i, 3)
  {
    if (A[i][0] == A[i][1] && A[i][1] == A[i][2] && A[i][2] == A[i][0]) {
      bingo = true;
    }
    if (A[0][i] == A[1][i] && A[1][i] == A[2][i] && A[2][i] == A[0][i]) {
      bingo = true;
    }
  }
  if (A[0][0] == A[1][1] && A[0][0] == A[2][2] && A[1][1] == A[2][2])
  {
    bingo = true;
  }
  if (A[0][2] == A[1][1] && A[1][1] == A[2][0] && A[2][0] == A[0][2])
  {
    bingo = true;
  }
  if (bingo) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define push(x) st[++top] = x;

typedef long long ll;

inline ll read()
{
    ll w = 0, t = 1;
    char ch = getchar();
    while (ch > '9' || ch < '0') { if (ch == '-') t = -1; ch = getchar(); }
    while (ch >= '0' && ch <= '9') { w = (w << 3) + (w << 1) + (ch ^ 48); ch = getchar(); }
    return w * t;
}

const int maxn = 1e5 + 5;

int n, m, top = 0;
ll st[maxn], f[maxn], de[maxn];//de差分

// inline int binary_search(int rest)
// {
//     int l = 1, r = top, pos = 0;
//     while (l < r) 
//     {
//         int mid = (l + r) >> 1;
//         if (rest > st[mid]) l = mid + 1, pos = mid;
//         else r = mid - 1;
//         //printf("$rest%d %d %d %d\n", rest, l, r, mid);
//     }
//     return pos;
// }

void count(ll rest, ll F) 
{
    if (!rest) return;
    // int last = binary_search(rest);
    // printf("$%d\n", last);
    int last = std::upper_bound(st + 1, st + top + 1, rest) - st - 1;
    if (last)
    {
        f[last] += rest / st[last] * F;
        count(rest % st[last], F); //(a[i] % a[i - 1]) % a[last]; 
    }

    else de[1] += F, de[rest + 1] -= F; 
}

int main()
{
    n = read();
    m = read();
    push(n);
    for (int i = 1; i <= m; i++)
    {
        ll input = read();
        while (input <= st[top]) top--; //去除无效操作
        push(input);
    }
    f[top] = 1;
    for (int i = top; i >= 2; i--)
    {
        f[i - 1] += st[i] / st[i - 1] * f[i];
        count(st[i] % st[i - 1], f[i]);
    }
    de[1] += f[1];
    de[st[1] + 1] -= f[1];
    for (int i = 1; i <= n; i++) 
    {
        de[i] += de[i - 1];
        printf("%lld\n", de[i]);
    }
    return 0;
}

Measured memory_bytes: 6084
#include <cstdio> 
#include <iostream> 
#include <algorithm> 
using namespace std;
const int MOD=1e9+7;
inline int mul(int a,int b)
{return 1LL*a*b%MOD;}
inline int add(int a,int b)
{a+=b;return a>=MOD?a-MOD:a;}
inline int sub(int a,int b)
{a-=b;return a<0?a+MOD:a;}
int p2(int b)
{
	int a=2,ans=1;
	for(;b;b>>=1,a=mul(a,a))
		if(b&1)ans=mul(ans,a);
	return ans;
}
const int Q=1<<8;
int cmp[Q],a[Q];
struct dt{
	int f,g;
	dt(){}
	dt(int mus,int no)
	{f=mus,g=no;}
};
dt Gans(int l,int r,int lim)
{
	int mn=MOD,ct=0;
	for(int i=l;i<=r;i++)
		if(a[i]==mn)++ct;
		else if(a[i]<mn)ct=1,mn=a[i];
	if(ct==r-l+1)return dt(sub(p2(ct),2),p2(mn-lim));
	int p0=1,p1=1;
	for(int lst=0,i=l;i<=r+1;i++)
		if(lst&&(a[i]==mn||i>r)){
			dt now=Gans(lst,i-1,mn);
			lst=0;
			p0=mul(p0,add(now.f,mul(now.g,2)));
			p1=mul(p1,now.g);
		}
		else if((!lst)&&a[i]>mn)lst=i;
	p0=sub(p0,p1);
	return dt(add(mul(p0,p2(ct)),mul(p1,sub(p2(ct),2))),mul(p1,p2(mn-lim)));
}
int main()
{
	int n;
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
		scanf("%d",&a[i]);
	dt als=Gans(1,n,0);
	printf("%d",add(als.f,als.g));
	return 0;
}

Measured memory_bytes: 256
var GET=(function(){function f(s){return new g(s);}function g(s){this._s=s.trim().split("\n");this._y=0;}g.prototype.a=function(f){var s=this._s, y=this._y, r;if(typeof s[y]==="string")s[y]=s[y].split(" ").reverse();r=s[y].pop();if(!s[y].length)this._y++;return f?r:+r;};g.prototype.l=function(f){var s=this._s[this._y++].split(" ");return f?s:s.map(a=>+a);};g.prototype.m=function(n,f){var r=this._s.slice(this._y,this._y+=n).map(a=>a.split(" "));return f?r:r.map(a=>a.map(a=>+a));};g.prototype.r=function(n,f){var r=this._s.slice(this._y,this._y+=n);return f?r:r.map(a=>+a);};return f;})();
var o=GET(require("fs").readFileSync("/dev/stdin","utf8"));
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill(0).map(x=>{return "+v+";})";while(--l)r="Array(a["+l+"]).fill(0).map(x=>"+r+")";return eval(r);}

console.log(main());
function main(){
  var s = o.a(1);
  var t = o.a(1);
  var ans = 0;
  if(s[0] === t[0])ans++;
  if(s[1] === t[1])ans++;
  if(s[2] === t[2])ans++;
  return ans;
}

Measured memory_bytes: 22076
#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int N;
    cin >> N;
    vector<int> d(N);
    for(int i=0;i<N;i++)cin >> d.at(i);
    sort(d.begin(),d.end());
    cout << d.at(N/2)-d.at(N/2-1) << endl;    
}

Measured memory_bytes: 640
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <bitset>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;

typedef long int				int32;
typedef unsigned long int		uint32;
typedef long long int			int64;
typedef unsigned long long int  uint64;
typedef pair<int, int>			PII;
typedef vector<int>				VI;
typedef vector<long long>		VLL;
typedef vector<string>			VS;
typedef vector<PII>				VII;
typedef vector<VI>				VVI;

#define MEM(a, b)				memset(a, (b), sizeof(a))
#define calctime				std::cout << setprecision(5) << fixed << "Time to completed program: " << (double)(clock() - start)/(CLOCKS_PER_SEC) << "s.\n";
#define FOR(i, j, k, in)		for (int i = (j); i < (k); i += (in))
#define FORW(i, j, k, in)		for (int i = (j); i <= (k); i += (in))
#define RFOR(i, j, k, in)		for (int i = (j); i >= (k); i -= (in))
#define RFORW(i, j, k, in)		for (int i = (j); i > (k); i -= (in))
#define aint64(cont)			cont.begin(), cont.end()
#define raint64(cont)			cont.end(), cont.begin()
#define sz(cont)				int((cont).size())
#define PB						push_back
#define MP						make_pair
#define EPS						1e-9
#define MOD						1000000007
#define PI						3.1415926535897932384626433832795
#define Ff						first
#define Ss						second
#define FastIO					ios_base::sync_with_stdio(false); std::cin.tie(NULL); std::cout.tie(NULL);
#define fileIO(name)			ifstream iFs(name".inp"); ofstream oFs(name".out");
#define fileio(name)			ifstream cin(name".inp"); ofstream cout(name".out");
#define endl					'\n'

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

int main() {
	FastIO;

	int n; cin >> n;
	int64 dp[100000 + 6] = { };
	int a[100000 + 6] = {}; FOR(i, 0, n, 1) cin >> a[i], dp[i] = LLONG_MAX;
	dp[0] = 0;
	FOR(i, 0, n - 1, 1) {
		dp[i + 1] = min(dp[i + 1], dp[i] + abs(a[i] - a[i + 1]));
		dp[i + 2] = min(dp[i + 2], dp[i] + abs(a[i] - a[i + 2]));
	}

	cout << dp[n - 1] << endl;

	//calctime
	return 0;
}

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

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

    vector<pair<int, int>> w(n);
    int a, b;
    for (auto i = 0; i < n; i++) {
        cin >> a >> b;
        w[i] = make_pair(b, a);
    }
    sort(w.begin(), w.end());

    int time = 0;
    for (auto i = 0; i < n; i++) {
        time += w[i].second;
        if(time > w[i].first) {
            cout << "No" << endl;
            return 0;
        }
    }

    cout << ("Yes") << endl;
    return 0;
}

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

typedef long long lint;
typedef pair<int, int> P;
#define REP(i, x, n) for(int i = x ; i < n ; ++i)
#define rep(i, n) REP(i, 0, n)
#define repr(i, n) for(int i = n - 1 ; i >= 0 ; --i)
#define ALL(x) (x).begin(), (x).end()
#define SORT(x) sort(ALL(x))

const int IINF = 1e9 + 10;
const lint LLINF = (lint)1e18 + 10;
const lint MOD = (lint)1e9 + 7;
const int dx4[] = {1, 0, -1, 0}, dy4[] = {0, 1, 0, -1};
const int dx8[] = {1, 1, 0, -1, -1, -1, 0, 1}, dy8[] = {0, -1, -1, -1, 0, 1, 1, 1};

int main(){
    string s;
    cin >> s;
    int ans = IINF;
    rep(i, s.size() - 2){
        int tmp = 0;
        rep(j, 3){
            tmp *= 10;
            tmp += s[i + j] - '0';
        }
        ans = min(ans, abs(753 - tmp));
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<vector>
#include<functional>
#include<string>
#include<cmath>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<cstdio>
using namespace std;
using ll = long long;
int main(){
  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  int sum = 0;
  for(int i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sort(a.rbegin(), a.rend());
  for(int i = 0; i < m; i++){
    if(a[i] < (double)sum/(4 * m)){
      cout << "No\n";
      return 0;
    }else{
      continue;
    }
  }
  cout << "Yes\n";
  return 0;
}

Measured memory_bytes: 256
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;


public class Main {
    String s;
    int N;
    private void solve() {
        s = next();
        N = s.length();

        int ans = 0;
        int len = 0;
        for(int i = 0;i < N;i++) {
            if (s.charAt(i) != 'A' && s.charAt(i) != 'C' && s.charAt(i) != 'G' && s.charAt(i) != 'T') {
                len = 0;
            } else {
                len++;
            }

            ans = Math.max(ans, len);
        }

        out.println(ans);
    }

    public static void main(String[] args) {
        out.flush();
        new Main().solve();
        out.close();
    }

    /* Input */
    private static final InputStream in = System.in;
    private static final PrintWriter out = new PrintWriter(System.out);
    private final byte[] buffer = new byte[4096];
    private int p = 0;
    private int buflen = 0;

    private boolean hasNextByte() {
        if (p < buflen)
            return true;
        p = 0;
        try {
            buflen = in.read(buffer);
        } catch (IOException e) {
            e.printStackTrace();
        }
        if (buflen <= 0)
            return false;
        return true;
    }

    public boolean hasNext() {
        while (hasNextByte() && !isPrint(buffer[p])) {
            p++;
        }
        return hasNextByte();
    }

    private boolean isPrint(int ch) {
        if (ch >= '!' && ch <= '~')
            return true;
        return false;
    }

    private int nextByte() {
        if (!hasNextByte())
            return -1;
        return buffer[p++];
    }

    public String next() {
        if (!hasNext())
            throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = -1;
        while (isPrint((b = nextByte()))) {
            sb.appendCodePoint(b);
        }
        return sb.toString();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}


Measured memory_bytes: 22740
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define repone(i,n) for(int i=1;i<(int)(n);++i)
#define repo(i,o,n) for(int i=o;i<(int)(n);++i)
#define Rep(j,n) for(int j=0;j<(int)(n);++j)
#define Repo(j,o,n) for(int j=o;j<(int)(n);++j)
#define Repone(j,n) for(int j=1;j<(int)(n);++j)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define int long long
#define pb(a) push_back(a)
#define eraser(v,i) (v).erase(v.begin()+(i))
#define pbpair(a,b) push_back(make_pair(a,b))
#define MOD 1000000007
#define INF 9223372036854775807
#define pairint pair<int,int>
signed main()
{
int x=0,y=0,z=0,w=0,n=0,m=0,a=0,b=0;
string s;
std::cin >> s;
rep(i,s.size()){
  if(s[i]=='A'||s[i]=='C'||s[i]=='G'||s[i]=='T')x++;
  else if(y<x){
    y=x;
    x=0;
  }
}
std::cout << ((y>x)?y:x) << '\n';
return 0;
}


Measured memory_bytes: 256
import java.util.*;
public class Main{
	public static void main(String args[]){
		Stack<Integer> stack = new Stack<Integer>();
		Scanner sc = new Scanner(System.in);
		Set<String> ops = new HashSet<String>();
		ops.add("-");
		ops.add("+");
		ops.add("*");
		while(sc.hasNext()){
			String[] line = sc.nextLine().split(" ");
			for(int i=0;i<line.length;i++){
				String t =line[i];
				if(!ops.contains(t)){
					int val = Integer.parseInt(t);
					stack.push(val);
				}else{
					int val1 =stack.pop();
					int val2 = stack.pop();
					if(t.equals("+")){
						stack.push(val2+val1);
					}else if(t.equals("-")){
						stack.push(val2-val1);
					}else{
						stack.push(val2*val1);
					}
				}
			}
			System.out.println(stack.peek());
		}
	}

}

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

int main() {
  int N,Z=0;
  cin>>N;
  vector<int> p(N);
  for(int i=0;i<N;i++){
    cin>>p[i];
  }
  sort(p.begin(), p.end());
  p.push_back(10000);
  for(int i=0;i<N;i++){
    for(int k=i+1;k<N;k++){
      int A=p[i]+p[k];
      int b=lower_bound(p.begin(),p.end(),A)-p.begin();
      Z+=b-k-1;
    }
  }
  cout<<Z<<endl;
}

Measured memory_bytes: 3552
N = int(input())
cmin = 10**5
for x in range(1,N):
    y = str(N-x)
    x = str(x)
    cnt = 0
    for i in range(len(x)):
        cnt += int(x[i])
    for j in range(len(y)):
        cnt += int(y[j])
    cmin = min(cmin,cnt)
print(cmin)

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

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string s, t;
  while(cin >> s >> t) {
    int c = 0;
    for(int i = 0; i < 3; ++i) if(s[i] == t[i]) ++c;
    cout << c << '\n';
  }
  return 0;
}


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

#define FOR(i, a, b) for(int i=(a); i<(b); i++)
#define RFOR(i, a, b) for(int i=(a); i>=(b); i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, n, 0)
#define CEIL(n, m) ceil(n/pow(10.0, m))*pow(10.0, m)
#define FLOOR(n, m) floor(n/pow(10.0, m))*pow(10.0, m)
#define ROUND(n, m) round(n/pow(10.0, m))*pow(10.0, m)
#define ALL(x) (x).begin(),(x).end()
#define SORT(x) sort((x).begin(),(x).end())
#define RSORT(x) sort((x).begin(),(x).end(),greater<int>())
#define SZ(x) ((int)(x).size())
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );
#define llong long long
#define dump(x)  cout << #x << " = " << (x) << endl;
#define debug(x) cout << #x << " = " << (x) " (L" << __LINE__ << ") " << __FILE__ << endl;

void solve()
{
  llong ans=1e18;

  int n; cin >> n;
  llong sum=0;
  vector<int> a(n);
  REP(i, n) {
    cin >> a[i];
    sum += a[i];
  }

  llong lsum=0;
  for (int i=0; i<n-1; i++) {
    lsum += a[i];
    llong tmp = sum - lsum;
    ans = min(ans, abs(lsum-tmp));
  }

  cout << ans << endl;
}

int main()
{
  solve();
  return 0;
}


Measured memory_bytes: 1024
/*
Author: Deep Chaklasiya
*/

#include <bits/stdc++.h>
using namespace std;
#define int         long long
#define double      long double
#define pb          push_back
#define pf          push_front
#define pii         pair<int,int>
#define vi          vector<int>
#define vii         vector<pii>
#define piiii       pair<pii,pii>
#define viiii       vector<pair<pii,pii>>
#define mi          map<int,int>
#define mii         map<pii,int>
#define piii           pair<int,pair<int,int> >
#define all(a)      (a).begin(),(a).end()
#define rall(a)     (a).rbegin(),(a).rend()
#define x           first
#define y           second
#define sz(x)       (int)x.size()
#define endl        '\n'
#define hell        998244353
#define PI          3.141592653589
#define bs(v,n)     binary_search(all((v)),(n))
#define lb(v,n)     lower_bound(all((v)),(n))
#define ub(v,n)     upper_bound(all((v)),(n))
#define fo(i,l,u)   for(i=l;i<u;i++)
#define rfo(i,l,u)  for(i=l;i>=u;i--)
#define allfo(s)    for(auto it=(s).begin();it!=(s).end();it++)
#define _init(b)     memset(b,-1,sizeof(b))
#define _init0(b)     memset(b,0,sizeof(b))
#define MOD         1000000007
#define ef else if
template<class A,class B>ostream&operator<<(ostream&out,const pair<A,B>&a){return out<<"("<<a.first<<","<<a.second<<")";}
template<class A>ostream&operator<<(ostream&out,const vector<A>&a){for(const A &it:a)out<<it<<" ";return out;}
template<class A,class B>istream&operator>>(istream&in,pair<A,B>&a){return in>>a.first>>a.second;}
template<class A>istream&operator>>(istream&in,vector<A>&a){for(A &i:a)in>>i;return in;}

signed main()
{
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int a,b,c;
    cin>>a>>b>>c;
    if(a==b) cout<<c;
    else if(b==c) cout<<a;
    else cout<<b;
    return 0;
}


Measured memory_bytes: 256
#pragma region

#ifdef LOCAL
#define debug cout
#else
#define debug \
    if (0) cout
#endif

#include <bits/stdc++.h>
using namespace std;
using ii = pair<int, int>;
using ll = long long;

template <typename T>
ostream& operator<<(ostream& os, vector<T> v) {
    os << "[ ";
    for (auto e : v) os << e << " ";
    return os << "]";
}

template <typename T, typename V>
ostream& operator<<(ostream& os, set<T, V> v) {
    os << "{ ";
    for (auto e : v) os << e << " ";
    return os << "}";
}

template <typename T, typename V, typename S>
ostream& operator<<(ostream& os, map<T, V, S> v) {
    os << "{ ";
    for (auto e : v) os << e << " ";
    return os << "}";
}

template <typename T, typename V>
ostream& operator<<(ostream& os, pair<T, V> x) {
    return os << "( " << x.first << ", " << x.second << " )";
}

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

template <typename T, typename V>
istream& operator>>(istream& is, pair<T, V>& x) {
    return is >> x.first >> x.second;
}

void solve();

int main() {
#ifdef LOCAL
    freopen("data.txt", "r", stdin);
#else
    ios_base::sync_with_stdio(0);
    cin.tie(0);
#endif
    solve();
}

#pragma endregion

void solve() {
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    cin >> a;
    vector<vector<ll>> dp(2, vector<ll>(k + 1, 0));
    const ll MOD = 1e9 + 7;
    for (int i = 0; i < n; ++i) {
        dp[i & 1][0] = 1;
        for (int t = 1; t <= a[i]; ++t) {
            dp[i & 1][t] = (dp[i & 1][t - 1] + dp[i & 1 ^ 1][t]) % MOD;
        }
        for (int t = a[i] + 1; t <= k; ++t) {
            if (i == 0)
                dp[i & 1][t] = 0;
            else {
                dp[i & 1][t] = dp[i & 1][t - 1];
                dp[i & 1][t] -= dp[i & 1 ^ 1][t - a[i] - 1];
                dp[i & 1][t] %= MOD;
                if (dp[i & 1][t] < 0) dp[i & 1][t] += MOD;
                dp[i & 1][t] += dp[i & 1 ^ 1][t];
                dp[i & 1][t] %= MOD;
            }
        }
        debug << "dp[" << i << "] " << dp[i & 1] << "\n";
    }
    cout << dp[(n - 1) & 1][k] << "\n";
}

Measured memory_bytes: 2560
o = input()
e = input()
ans = ""
if len(o)-len(e) == 1:
    e += "."
    for o_, e_ in zip(o,e):
        ans += o_ + e_
    print(ans[:-1])
else:
    
    for o_,e_ in zip(o,e):
        ans += o_ + e_
    print(ans)    

Measured memory_bytes: 3060
// Why I am so dumb? :c
#include <bits/stdc++.h>

#define pb push_back
#define mp make_pair

#define all(x) (x).begin(), (x).end()

#define fi first
#define se second

using namespace std;

typedef long long ll;

int fenw[200005];

char s[200005];

int n;

int f(int x) {
	return x & -x;
}

void fenwUpd(int ps, int x) {
	for (int i = ps; i <= n; i += f(i)) {
		fenw[i] += x;		
	}	
}

int prefSum(int ps) {
	int ret = 0;

	for (int i = ps; i > 0; i -= f(i)) {
		ret += fenw[i];
	}

	return ret;
}

int segSum(int l, int r) {
	if (l > r) {
		return 0;
	}

	return prefSum(r) - prefSum(l - 1);
}

void solve() {                   
	scanf("%s", s + 1);

	for (n = 1; s[n]; ++n);

	--n;

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

    stack<int> st;

    for (int i = 1; i <= n; ++i) {
		if (s[i] == 'S') {
			st.push(i);
		}    	
		else if (!st.empty()) {
			int p = st.top();
			st.pop();

			if (segSum(p + 1, i - 1) == 0) {
				fenwUpd(i, -1);
				fenwUpd(p, -1);	
			}
		}
    }    

    printf("%d\n", prefSum(n));
}

int main() {    
    int tt = 1;

    while (tt--) {
        solve();
    }

    return 0;
}

Measured memory_bytes: 1664
package main

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

func main() {
	sc := NewScanner()

	a := sc.ReadInt()
	b := sc.ReadInt()
	c := sc.ReadInt()
	d := sc.ReadInt()

	for {
		c -= b
		if c <= 0 {
			fmt.Println("Yes")
			break
		}
		a -= d
		if a <= 0 {
			fmt.Println("No")
			break
		}
	}
}

// util
// *   math/simple

func Abs(x int) int {
	if x >= 0 {
		return x
	}
	return -x
}

func Min(values ...int) int {
	if len(values) == 0 {
		panic("no values")
	}
	min := values[0]
	for _, v := range values {
		if v < min {
			min = v
		}
	}
	return min
}

func Max(values ...int) int {
	if len(values) == 0 {
		panic("no values")
	}
	max := values[0]
	for _, v := range values {
		if v > max {
			max = v
		}
	}
	return max
}

func Pow(base int, exponent uint) int {
	answer := 1
	for i := uint(0); i < exponent; i++ {
		answer *= base
	}
	return answer
}

// *   io

type Scanner struct {
	bufScanner *bufio.Scanner
}

func NewScanner() *Scanner {
	bufSc := bufio.NewScanner(os.Stdin)
	bufSc.Split(bufio.ScanWords)
	bufSc.Buffer(nil, 100000000)
	return &Scanner{bufSc}
}

func (sc *Scanner) ReadString() string {
	bufSc := sc.bufScanner
	bufSc.Scan()
	return bufSc.Text()
}

func (sc *Scanner) ReadInt() int {
	bufSc := sc.bufScanner
	bufSc.Scan()
	text := bufSc.Text()

	num, err := strconv.Atoi(text)
	if err != nil {
		panic(err)
	}
	return num
}


Measured memory_bytes: 1760
import java.util.*;

public class Main {
	// public static void printArray(int[] a) {
	// 	for (int i = 0; i < a.length; i++) {
	// 		System.out.print(a[i] + ", ");
	// 	}
	// 	System.out.println();
	// }

	// public static<T> void printArrayT(T[] a) {
	// 	for (int i = 0; i < a.length; i++) {
	// 		System.out.print(a[i] + ", ");
	// 	}
	// 	System.out.println();
	// }

	// public static class Triple implements Comparable<Triple> {
	// 	public int A, B, C;
	// 	Triple(int A, int B, int C) {
	// 		this.A = A;
	// 		this.B = B;
	// 		this.C = C;
	// 	}

	// 	@Override
	// 	public String toString() {
	// 		return String.format("(%d, %d, %d)", A, B, C);
	// 	}

	// 	@Override
	// 	public int compareTo(Triple o) {
	// 		int a = this.A - o.A;
	// 		if (a != 0) return a;
	// 		int b = this.B - o.B;
	// 		if (b != 0) return b;
	// 		return this.C - o.C;
	// 	}
	// }

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] A = new int[N];
		for (int i = 0; i < N; i++) {
			A[i] = sc.nextInt();
		}
		int color = 0;
		TreeMap<Integer, Integer> map = new TreeMap<>();
		for (int i = N - 1; i >= 0; i--) {
			int value = A[i];
			Map.Entry<Integer, Integer> entry = map.ceilingEntry(value + 1);
			if (entry != null) {
				if (entry.getValue() == 1) {
					map.remove(entry.getKey());
				} else {
					map.put(entry.getKey(), entry.getValue() - 1);
				}
			} else {
				color++;
			}
			if (map.containsKey(value)) {
				map.put(value, map.get(value) + 1);
			} else {
				map.put(value, 1);
			}
	}
		System.out.println(color);
	}
}


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

#define rep(i, N) for (int i = 0; i < N; i++)

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

    int A[N];
    rep(i, N)
    {
        int k;
        cin >> k;
        A[k - 1] = i + 1;
    }

    rep(i, N) cout << A[i] << " ";
    cout << endl;
}

Measured memory_bytes: 1152
#include<iostream>
#include<vector>
#include<queue>
#include<cmath>
#include<algorithm>
using namespace std;
using Graph = vector<vector<int>>;

const int INF = 1e9;
typedef long long ll;

int AB[10][10];

int main(){
    int N; cin >> N;
    int d = 1;
    for(int i = 1; i <= N; ++i){
        if(i >= d * 10) d *= 10;
        AB[i/d][i%10] += 1;
    }
    int ans = 0;
    for(int i = 1;i < 10;++i)
        ans += AB[i][i] * AB[i][i];
    for(int i = 1;i < 10;++i){
        for(int j = 1;j < 10;++j){
            if(i != j)
                ans += AB[i][j] * AB[j][i];
        }
    }
    cout << ans;
}


Measured memory_bytes: 256
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <cassert>
#include <cfloat>
#include <complex>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>

using namespace std;

#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define rep(i, n) for (ll i = 0; i < (n); ++i)

using ll = long long;
using ull = unsigned long long;
using P = pair<ll, ll>;
using vll = vector<ll>;
using vP = vector<P>;
using vvll = vector<vector<ll>>;
using vvP = vector<vector<P>>;

const ll INF = 1LL << 32;

ll getq(multiset<ll, greater<ll>>& q, ll t) {
  ll ret = 0;
  ll cnt = 0;
  for (auto itr = q.begin(); cnt < t; itr++) {
    ret += *itr;
    cnt++;
  }
  return ret;
}

int main() {
  ll n, w;

  cin >> n >> w;

  vll ws(n);
  vll vs(n);

  multiset<ll, greater<ll>> q[4];

  ll tw, tv;
  cin >> tw >> tv;
  ll w0 = tw;
  q[0].insert(tv);
  for (ll i = 1; i < n; i++) {
    cin >> tw >> tv;
    bool chk = false;
    for (ll j = 0; j < 4; j++) {
      if (tw == w0 + j) {
        q[j].insert(tv);
        chk = true;
        break;
      }
    }  // j
    assert(chk);
  }  // i

  ll ans = 0;
  for (ll i = 0; i <= n; i++) {
    if (i > (ll)q[0].size()) continue;
    for (ll j = 0; j <= n; j++) {
      if (j > (ll)q[1].size()) continue;
      for (ll k = 0; k <= n; k++) {
        if (k > (ll)q[2].size()) continue;
        for (ll l = 0; l <= n; l++) {
          if (l > (ll)q[3].size()) continue;
          ll wt = w0 * i + (w0 + 1) * j + (w0 + 2) * k + (w0 + 3) * l;
          if (wt <= w) {
            ll tmp = 0;
            tmp += getq(q[0], i);
            tmp += getq(q[1], j);
            tmp += getq(q[2], k);
            tmp += getq(q[3], l);
            chmax(ans, tmp);
          }
        }
      }
    }
  }

  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define FOR(i,start,end) for(int i=start;i<=end;i++)
const int INF = 1001001001;
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define Sort(a) sort(a.begin(), a.end())
#define Rort(a) sort(a.rbegin(), a.rend())
typedef long long ll;
const ll MOD=1000000007;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T>auto MAX(const T& a) { return *max_element(a.begin(),a.end()); }
template<class T>auto MIN(const T& a) { return *min_element(a.begin(),a.end()); }
template<class T, class U>U SUM(const T& a, const U& v) { return accumulate(a.begin(),a.end(), v); }
template<class T, class U>U COUNT(const T& a, const U& v) { return count(a.begin(),a.end(), v); }
template<class T, class U>int LOWER(const T& a, const U& v) { return lower_bound(a.begin(),a.end(), v) - a.begin(); }
template<class T, class U>int UPPER(const T& a, const U& v) { return upper_bound(a.begin(),a.end(), v) - a.begin(); }
int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
int LCM(int a, int b) { int g = GCD(a, b); return a / g * b; }
//---------------------------------------------------------------------------------------------------
typedef pair<int,int> P;

int main(void){
    // Your code here!
    int n,h; cin >> n >> h;
    vector<int> a(n),b(n);
    rep(i,n) cin >> a[i] >> b[i];
    Rort(a);
    Rort(b);
    ll ans = 0;
    int ma = MAX(a);
    rep(i,n) {
        if (h <= 0) {
            cout << ans << endl;
            return 0;
        }
        if (b[i] < ma) break;
        ans++;
        h-= b[i];
    }
    ans += (h + a[0] -1)/a[0];
    cout << ans << endl;
}


Measured memory_bytes: 4024
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL<<62
#define inf 1000000007

int main() {
	string s;
	ll k;
	cin>>s>>k;
	set<string>ans;
	for(ll i=0;i<s.size();i++){
		string t;
		for(ll j=0;j<k;j++){
			if(j+i==s.size()){
				break;
			}
			t+=s[j+i];
			ans.insert(t);
		}
	}
	auto itr=ans.begin();
	for(ll i=0;i<k-1;i++){
		itr++;
	}
	cout << *itr;
	// your code goes here
	return 0;
}

Measured memory_bytes: 1664
#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <queue>
#include <limits>
#include <algorithm>
#include <string>
#include <set>
#include <map>
using namespace std;


int main()
{
	int32_t N, M;
	cin >> N >> M;

	int32_t left = 0, right = N - 1;
	for (int32_t i = 0; i < M; i++) {
		int32_t l, r;
		cin >> l >> r;
		l--;
		r--;
		left = max(left, l);
		right = min(right, r);
	}
	int32_t res = right - left;
	if (res < 0)
		res = 0;
	else
		res++;

	cout << res << endl;

	return 0;
}


Measured memory_bytes: 256
#include <cassert>
#include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <cstdint>
#include <cmath>
#include <complex>
#include <chrono>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#include <random>
#include <memory>
#include <utility>
#include <limits>
#include "limits.h"
 
#define rep(i, a, b) for (long long (i) = (a); (i) < (b); (i)++)
#define all(i) i.begin(), i.end()
#define debug(...) std::cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)

void debug_out(){std::cerr<<std::endl;}

template<typename Head,typename... Tail>
void debug_out(Head h,Tail... t){
  std::cerr<<" "<<h;
  debug_out(t...);
}
 
template <typename T1, typename T2>
std::ostream& operator<<(std::ostream& os, std::pair<T1, T2> pa) {
  return os << pa.first << " " << pa.second;
}
 
template <typename T>
std::ostream& operator<<(std::ostream& os, std::vector<T> vec) {
  for (int i = 0; i < vec.size(); i++)os << vec[i] << (i + 1 == vec.size() ? "" : " ");
  return os;
}
 
template<typename T1,typename T2>
inline bool chmax(T1& a,T2 b){return a<b && (a=b,true);}
 
template<typename T1,typename T2>
inline bool chmin(T1& a,T2 b){return a>b && (a=b,true);}
 
long long pow_mod(long long a, long long b, long long mod=-1) {
  if(b==0)return 1;
  if ((a == 0)||(mod!=-1&&(a+mod)%mod==0)) {
    return 0;
  }
  long long x = 1;
  while (b > 0) {
    if (b & 1) {
      x = (mod!=-1)?(x * a) % mod:x*a;
    }
    a = (mod!=-1)?(a * a) % mod:a*a;
    b >>= 1;
  }
  return x;
}

// const long long MOD = 998244353;
const long long MOD = 1e9 + 7;

using ll = long long;
using P=std::pair<long long,long long>;

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

  ll n,m;
  std::cin>>n>>m;

  if(n==m){
    std::cout<<"Yes\n";
  }else{
    std::cout<<"No\n";
  }

  return 0;
}


Measured memory_bytes: 256
package main

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

var sc = bufio.NewScanner(os.Stdin)

func readInt() int {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return i
}

func main() {
	sc.Split(bufio.ScanWords)
	n, k, q := readInt(), readInt(), readInt()

	a := make(map[int]int, n+1)
	for i := 1; i <= q; i++ {
		ans := readInt()
		a[ans]++
	}

	for i := 1; i <= n; i++ {
		if a[i]-q+k > 0 {
			fmt.Println("Yes")
		} else {
			fmt.Println("No")
		}
	}
}


Measured memory_bytes: 5248
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<bitset>
#include<stdlib.h>
#include<cassert>
#include<time.h>
#include<bitset>
using namespace std;
const long long mod=1000000007;
const long long inf=mod*mod;
const long long d2=(mod+1)/2;
const double EPS=1e-6;
const double PI=acos(-1.0);
int ABS(int a){return max(a,-a);}
long long ABS(long long a){return max(a,-a);}

int main(){
	int a,b,c;scanf("%d%d%d",&a,&b,&c);
	printf("%d\n",(a-b)%c);
}


Measured memory_bytes: 128
package main

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

func nextInt(sc *bufio.Scanner) int {
	sc.Scan()
	t, _ := strconv.Atoi(sc.Text())
	return t
}

func main() {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	N := nextInt(sc)
	a := make([][3]int, N)
	for i := range a {
		a[i][0] = nextInt(sc)
		a[i][1] = nextInt(sc)
		a[i][2] = nextInt(sc)
	}
	// fmt.Println("N", N, "a", a)
	dp := make([][3]int, N+2) // DPテーブル
	// 0-indexed
	// i-1日目までの最大幸福度をdp[i]としたとき、
	// i日目までの最大幸福度dp[i+1]を求めたい
	// 初期値は0で良い
	// 遷移方向は以下の通り
	// dp[i][0] => dp[i+1][1] or dp[i+1][2]
	// dp[i][1] => dp[i+1][0] or dp[i+1][2]
	// dp[i][2] => dp[i+1][0] or dp[i+1][1]
	for i := 0; i < N; i++ {
		dp[i+1][0] = max(dp[i][1]+a[i][0], dp[i][2]+a[i][0])
		dp[i+1][1] = max(dp[i][0]+a[i][1], dp[i][2]+a[i][1])
		dp[i+1][2] = max(dp[i][1]+a[i][2], dp[i][0]+a[i][2])
	}
	// fmt.Println("dp", dp)
	fmt.Println(max(dp[N][0], max(dp[N][1], dp[N][2])))
}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}


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

#define int long long
using namespace std;
#define rep(i, n) for(int i=0;i<(n);++i)
typedef pair<int, int> pii;
const int INF = 1l << 60;
#define u_b upper_bound
#define l_b lower_bound


signed main() {
    int N;
    cin >> N;
    double ans = 0;
    rep(i, N) {
        int a;
        cin >> a;
        ans += 1. / a;
    }
    ans = 1 / ans;
    cout << fixed;
    cout << setprecision(10);
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 256
def main():
    s = input().rstrip()
    if len(s) % 2 != 0:
        print("No")
    else:
        f = True
        for i in range(0, len(s), 2):
            if s[i] != "h" or s[i+1] != "i":
                f = False
        if f:
            print("Yes")
        else:
            print("No")

if __name__ == "__main__":
    main()

Measured memory_bytes: 3060
#include<bits/stdc++.h>
#define FAST_IO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
string a,b;
int main()
{
    cin>>a>>b;
    if(a==b)
    {
        cout<<"Yes\n";
        return 0;
    }
    if(a.size()!=b.size())
    {
        cout<<"No\n";
        return 0;
    }
    int n=a.size()+2;
    while(n--)
    {
        rotate(a.begin(),a.begin()+1,a.end());
        if(a==b)
        {
             cout<<"Yes\n";
             return 0;
        }
           
    }
    cout<<"No\n";
}


Measured memory_bytes: 256
import sys
input = sys.stdin.buffer.readline

#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

def main():
	n=II()
	A=LI()
	A.append(0)

	L=[]
	R=[]

	f=0
	now=200
	i=0
	while i<n+1:
		if f==0:
			if A[i]<=now:
				now=A[i]
				i+=1
			else:
				L.append(now)
				f=1
		else:
			if A[i]>=now:
				now=A[i]
				i+=1
			else:
				R.append(now)
				f=0

	#print(L,R)

	ans=1000

	for i,j in zip(L,R):
		q,r=divmod(ans,i)
		ans=q*j+r
	print(ans)





















if __name__ == "__main__":
	main()


Measured memory_bytes: 62176
#include "bits/stdc++.h"

using namespace std;

typedef long double ld;
typedef long long ll;

#define sz(x) (int)(x).size()
#define pb push_back
#define mp make_pair
#define f first
#define s second

template<typename T, typename U> bool ckmin(T &a, U b){ return b < a ? a = b, true : false; }
template<typename T, typename U> bool ckmax(T &a, U b){ return b > a ? a = b, true : false; }

int n = 0; string s;
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cin >> s;
    if(s == "RRR"){
        cout << 3;
    }
    else if(s == "RRS" || s == "SRR") cout << "2";
    else if(s == "RSS" || s == "RSR" || s == "SSR" || s == "SRS") cout << 1;
    else cout << 0;
    return 0;
}

Measured memory_bytes: 3632
#include <iostream>
using namespace std;
int N;
int A[100005];
int B[100005];
long long SA,SB,disp;
int main(){
    cin >> N;
    for(int i = 1;i <= N;i++){
        cin >> A[i];
        SA += A[i];
    }
    for(int i = 1;i <= N;i++){
        cin >> B[i];
        SB += B[i];
        if(A[i] <= B[i]){
            disp += (B[i] - A[i]) / 2;
        }
        else{
            disp -= (A[i] - B[i]);
        }
    }
    if(disp >= 0){
        cout << "Yes";
    }
    else{
        cout << "No";
    }
    return 0;
}


Measured memory_bytes: 384
/*

Author : AllKilled
Date   : 202001186 20:20:00 UTC+8

Website: https://atcoder.jp/contests/keyence2020
Contest: Keyence Programming Contest 2020.
Problem: Task B.
Result :

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

typedef long long LL;
typedef pair<LL, LL> PLL;

const int S = 1e9;
const LL MAXN = 1e6+7;

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

LL n;
vector<PLL> f;

int main()
{
    cin >> n;
    for (LL x, l, i = 0; i < n; ++i) {
        cin >> x >> l;
        f.push_back({x-l, x+l});
    }
    sort(f.begin(), f.end(), [](PLL a, PLL b) {
        return a.second < b.second || (a.second == b.second && a.first < b.first);
    });
    LL ans = 0, r = f[0].first - 1;
    for (auto &u : f) {
        if (u.first >= r) {
            ans += 1;
            r = u.second;
        }
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 2420
import java.util.*; 
import java.lang.*; 


public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
                
                int N = scan.nextInt();
                ArrayList<Long> a = new ArrayList<>(); 
                for(int i=0; i<N;i++){
                    long A1 = scan.nextLong();
                    if(A1==0){
                        System.out.println(0);
                        System.exit(0);
                    }
                    a.add(A1);
                }
                long ans = 1;
                for(int i=0; i<N;i++){
                    long q = (long)Math.pow(10,18)/(long)a.get(i);
                    if(ans<=q){
                    ans = ans * a.get(i);
                    }else{
                         System.out.println(-1);
                        System.exit(0);
                    }
                } 
                if((long)Math.pow(10,18)<ans){
                        System.out.println(-1);
                        System.exit(0);
                    }
                System.out.println(ans);
                
        }
}

Measured memory_bytes: 60804
def solve():
    s_arr = input().replace('><', '> <').split()
    ans = 0
    
    for s in s_arr:
        left = s.count('<')
        right = len(s) - left
        if left < right:
            left -= 1
            ans += left * (left + 1) // 2 + right * (right + 1) // 2
        else:
            right -= 1
            ans += left * (left + 1) // 2 + right * (right + 1) // 2
    
    print(ans)

if __name__ == '__main__':
    solve()

Measured memory_bytes: 12464