akhauriyash/Code-Regression huggingface dataset:
//
#include<bits/stdc++.h>
using namespace std;

int main(int argc, char* argv[]) {
	int x, y, c , t;
	cin >> x >> y;
	t = (y - 2*x)/2;
	c = x-t;
	
	if (c >= 0 && t >= 0 && c+t==x && 2*c+4*t==y) {
		cout << "Yes" << endl;
	} else {
		cout << "No" << endl;
	}
	return 0;
}

Measured memory_bytes: 3628
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,c;
	cin>>a>>b>>c;
	int ans=0;
	
	while(1)
	{
		 if(a%2!=0 || b%2!=0 || c%2!=0)
		{
			break;
		}
		if(a==b && b==c && a==c)
		{
		ans=-1;
		break;
		}
		
		int a1 = b+c;
		int b1 = a+c;
		int c1 = a+b;
		
			ans++;		
			
			a=a1/2;
			b=b1/2;
			c=c1/2;			
	}
	cout<<ans;	
}


Measured memory_bytes: 3580
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <stdlib.h>
#include <string.h>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <stdio.h>
#include <tuple>
#include <bitset>
#include <cfloat>
#include <fstream>
#include <limits.h>
#include <list>
#include <math.h>
#include <random>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <numeric>
#include <utility>
#include <sstream>

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;
}

using namespace std;
#define int long long
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repr(i,n) for(ll i=n;i>=0;i--)
#define P pair<ll, ll>
#define sz(x) (ll)x.size()
#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define VE vector<ll>
#define COUT(x) cout<<(x)<<endl
#define MA map<ll,ll>
#define SE set<ll>
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,VE,greater<ll>>
#define COUT(x) cout<<(x)<<endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define EPS (1e-10)
ll gcd(ll a, ll b) {
	if (a < b)swap(a, b);
	if (b == 0) return a;
	unsigned r;
	while ((r = a % b)) {
		a = b;
		b = r;
	}
	return b;
}
ll lcm(ll a, ll b) {
	ll g = gcd(a, b);
	return a / g * b;
}
bool prime(ll n) {
	for (ll i = 2; i <= sqrt(n); i++) {
		if (n%i == 0)return false;
	}
	return n != 1;
}
map<ll, ll> prime_factor(ll n) {
	map<ll, ll> ret;
	for (ll i = 2; i * i <= n; i++) {
		while (n % i == 0) {
			ret[i]++;
			n /= i;
		}
	}
	if (n != 1) ret[n] = 1;
	return ret;
}

//const long long MOD = 1000000007;
const long long MOD = 998244353;
const long long INF = 1LL << 60;



const long double PI = 3.14159265359;
const int MAX_N = 100010;


signed main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int n, k, s; cin >> n >> k >> s;
	if (s == 1000000000) {
		rep(i, k) {
			cout << s << " ";
		}
		rep(i, n - k) {
			cout << MOD << " ";
		}
	}
	else {
		rep(i, k) {
			cout << s << " ";
		}
		rep(i, n - k) {
			cout << s + 1 << " ";
		}
	}
	return 0;
}

Measured memory_bytes: 1280
#include<iostream>
#include<math.h>
#include<string>
using namespace std;

#define rep(i,n) for(i=0;i<=N;i++)
int i=0;
int main(){
    int N;
    cin>>N;
    rep(i,N){
        int sum=0;
        sum=(int)(i*1.08);
        if(sum==N){
            cout<<i;
            return 0;
        }else{
            ;
        }
    }
    cout<<":(";
    return 0;
}


Measured memory_bytes: 3596
#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() {
    int n, m;
    cin >> n >> m;
    int ans = n * (n-1) / 2 + m * (m-1) / 2;
    cout << ans << endl;
}

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

using namespace std;

int main(){
    int e;
    while(cin >> e && e > 0){
        int min;
        min = 1000000;
        for(int y=0; y<=1000; y++){
            for(int z=0; z<=100; z++){
                int m, x;
                m = e - y*y + y - z*z*z + z;
                x = e - y*y - z*z*z;
                if(min > m && x >= 0 ){
                    min = m;
                }
            }
        }
        cout << min << endl;
    }
}

Measured memory_bytes: 3024
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N=200005;
int n;
LL a[N],sum[N],v;
int x[5]={0};
LL calc(int i){
	return sum[x[i]]-sum[x[i-1]];
}
LL llabs(LL x){
	return x<0?-x:x;
}
bool cmp(int a,int b){
	return calc(a)<calc(b);
}
bool cmp2(int a,int b){
	return calc(a)>calc(b);
}
void move(int id,int d){
	if (d==1){
		if (x[id+1]-x[id]>1)
			x[id]++;
	}
	else {
		if (x[id]-x[id-1]>1)
			x[id]--;
	}
}
LL trys(){
	LL ans=1e17;
	int y[5];
	for (int i=0;i<5;i++)
		y[i]=x[i];
	for (int i=1;i<=20;i++){
		int id[5]={0,1,2,3,4};
		sort(id+1,id+5,cmp);
		ans=min(ans,llabs(calc(id[1])-calc(id[4])));
		int r=rand()%6;
		if (r==0){
			LL val=calc(1);
			if (val>v)
				move(1,-1);
			else
				move(1,1);
		}
		if (r==1){
			LL val=calc(4);
			if (val>v)
				move(3,1);
			else
				move(3,-1);
		}
		if (r>1){
			r-=2;
			int k=r&1?2:3;
			r/=2;
			LL val=calc(k);
			if (r){
				if (val>v)
					move(k-1,1);
				else
					move(k-1,-1);
			}
			else {
				if (val>v)
					move(k,-1);
				else
					move(k,1);
			}
		}
	}
	for (int i=0;i<5;i++)
		x[i]=y[i];
	return ans;
}
LL solve(){
	for (int i=1;i<=n;i++)
		sum[i]=sum[i-1]+a[i];
	v=sum[n]/4;
	for (int i=1;i<=3;i++){
		x[i]=x[i-1]+1;
		while (x[i]<n+i-4&&sum[x[i]]-sum[x[i-1]]<=v)
			x[i]++;
	}
	x[4]=n;
	LL ans=1e17;
	for (int xxxx=1;xxxx<=n*4;xxxx++){
		ans=min(ans,trys());
		int id[5]={0,1,2,3,4};
		sort(id+1,id+5,cmp);
		ans=min(ans,llabs(calc(id[1])-calc(id[4])));
		int j=1;
		while (j<=4&&(id[j]==1||x[id[j]-1]-x[id[j]-2]==1))
			j++;
		if (j>4)
			break;
		x[id[j]-1]--;
	}
	return ans;
}
LL solve2(){
	for (int i=1;i<=n;i++)
		sum[i]=sum[i-1]+a[i];
	v=sum[n]/4;
	for (int i=1;i<=3;i++){
		x[i]=x[i-1]+1;
		while (x[i]<n+i-4&&sum[x[i+1]]-sum[x[i]]<=v)
			x[i]++;
	}
	x[4]=n;
	LL ans=1e17;
	for (int xxxx=1;xxxx<=n*4;xxxx++){
		int id[5]={0,1,2,3,4};
		sort(id+1,id+5,cmp2);
		ans=min(ans,llabs(calc(id[1])-calc(id[4])));
		int j=1;
		while (j<=4&&(id[j]==1||x[id[j]-1]-x[id[j]-2]==1))
			j++;
		if (j>4)
			break;
		x[id[j]-1]--;
	}
	return ans;
}
int main(){
	srand(19260817);
	scanf("%d",&n);
	for (int i=1;i<=n;i++)
		scanf("%lld",&a[i]);
	LL ans=1e17;
	ans=min(ans,solve());
	for (int i=1;i<=n/2;i++)
		swap(a[i],a[n-i+1]);
	ans=min(ans,solve());
	ans=min(ans,solve2());
	for (int i=1;i<=n/2;i++)
		swap(a[i],a[n-i+1]);
	ans=min(ans,solve2());
	printf("%lld",ans);
	return 0;
}

Measured memory_bytes: 3328
import math
a, b, c, d = map(int, input().split())

taka = math.ceil(c/b)
ao = math.ceil(a/d)

is_true = True
if taka < ao:
    is_true = True
elif taka > ao:
    is_true = False
else:
    if b > d:
        is_true = False

if is_true:
    print('Yes')
else:
    print('No')


Measured memory_bytes: 9212
#include<algorithm>
#include<cmath>
#include<iostream>
#include<map>
#include<vector>
using namespace std;
int main(){
    int R; cin >> R;
    if(R < 1200)
        cout << "ABC" << endl;
    else if(R < 2800)
        cout << "ARC" << endl;
    else
        cout << "AGC" << endl;
}

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

using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<string> vs;
using pll = pair<ll, ll>;
using vl = vector<ll>;
using vll = vector<vl>;
using vpll = vector<pll>;
struct Edge {
	ll to;
	ll cost;
};
using Graph = vector<vector<Edge>>;

#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
/***** define constant start *******/
const ll MOD = 1000000007;
const double PI = 2.0 * asin(1.0);
const ll INF = 1L<<60;
string abc = "abcdefghijklmnopqrstuvwxyz";
string ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const ll MAX = 10000000;
/****** define constant end ********/
/****** define variable start ******/
ll a, v, b, w, t;
/******* define variable end *******/
int solve() {
	cin >> a >> v >> b >> w >> t;
	if(a < b){
		if(a + t * v >= b + t * w){
			cout <<"YES" << endl;
		}else{
			cout <<"NO" << endl;
		}
	}else{
		if(a - t * v <= b - t * w){
			cout << "YES" << endl;
		}else{
			cout <<"NO" << endl;
		}
	}
	return 0;
}

int main() {
	//clock_t start = clock();
	cout << std::fixed << std::setprecision(10);
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int end_solve = solve();
	/*
	clock_t end = clock();
	const double time = static_cast<double>(end - start) / CLOCKS_PER_SEC *
	1000.0; printf("time %lf[ms]\n", time);
	*/

	return end_solve;
}


Measured memory_bytes: 3652
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <stack>
#include <numeric>
#include <algorithm>
#include <stdio.h>
#include <bitset>
#include <complex>
#include <iomanip>
#include <math.h>
using namespace std;
#define MM 1000000000
#define MOD MM+7
#define pi pair<int32,int32>
#define pl pair<int64,int64>
#define chmax(a,b) (a<b ? a=b:0)
#define chmin(a,b) (a>b ? a=b:0)
const long double PI = acos(-1);
const long long INF = 1e15;
int dx[8] = {-1,0,1,0,-1,-1,1,1};
int dy[8] = {0,-1,0,1,-1,1,1,-1};
template<typename T>
T GCD(T u,T v){
    return v ? GCD(v,u%v) : u;
}
template<typename T>
T LCM(T x,T y){
    return x*y/(T)GCD(x,y);
}
int main(){
    long long n; cin >> n;
    long long a[n+1],b[n+1];
    fill(a,a+n+1,0);
    fill(b,b+n+1,0);
    for(int i = 1; i <= n; i++){
        cin >> a[i];
    }
    int m = 0;
    vector<int> v(0);
    for(int i = n; i >= 2; i--){
        int num = 0;
        for(int j = i; j <= n; j += i){
            num += b[j];
        }
        if (a[i] != num % 2){
            v.push_back(i);
            b[i] = 1;
        } else {
            b[i] = 0;
        }
    }
    int c = 0;
    for(int i = 2; i <= n; i++){
        c += b[i];
    }
    if (c % 2 != a[1]){
        v.push_back(1);
    }
    cout << v.size() << endl;
    for(int i = 0; i < v.size(); i++){
        cout << v[i] << " ";
    }
    cout << endl;
}
  



Measured memory_bytes: 4472
#pragma GCC optimize(2)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <fstream>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <map>
#include <set>

using namespace std;

typedef long long ll;

int T,A,B,C,D;

ll n,ans;
ll f[105][105][105][2];

int main()
{
	scanf("%d",&T);
	while (T--)
	{
		scanf("%lld%d%d%d%d",&n,&A,&B,&C,&D);
		ans = 1e18;
		for (ll c2 = 0,v2 = 1;;c2++,v2 *= 2)
		{
			for (ll c3 = 0,v3 = v2;;c3++,v3 *= 3)
			{
				for (ll c5 = 0,v5 = v3;;c5++,v5 *= 5)
				{
					ll neg = (n % v5 - v5) % v5,pos = n % v5;
					f[c2][c3][c5][0] = f[c2][c3][c5][1] = 1e18;
					if (!pos)
						f[c2][c3][c5][0] = f[c2][c3][c5][1] = 0;
					if (c2)
					{
						f[c2][c3][c5][0] = min(f[c2][c3][c5][0],f[c2 - 1][c3][c5][0] + pos / (v5 / 2));
						f[c2][c3][c5][1] = min(f[c2][c3][c5][1],f[c2 - 1][c3][c5][1] - neg / (v5 / 2));
					}
					if (c3)
					{
						f[c2][c3][c5][0] = min(f[c2][c3][c5][0],f[c2][c3 - 1][c5][0] + pos / (v5 / 3));
						f[c2][c3][c5][1] = min(f[c2][c3][c5][1],f[c2][c3 - 1][c5][1] - neg / (v5 / 3));
					}
					if (c5)
					{
						f[c2][c3][c5][0] = min(f[c2][c3][c5][0],f[c2][c3][c5 - 1][0] + pos / (v5 / 5));
						f[c2][c3][c5][1] = min(f[c2][c3][c5][1],f[c2][c3][c5 - 1][1] - neg / (v5 / 5));
					}
					f[c2][c3][c5][0] = min(f[c2][c3][c5][0],f[c2][c3][c5][1] + 1);
					f[c2][c3][c5][1] = min(f[c2][c3][c5][1],f[c2][c3][c5][0] + 1);
				//	cout << c2 << ' '<< c3 << ' ' << c5 << ' ' << f[c2][c3][c5][0] << ' '<< f[c2][c3][c5][1] << endl;
					if (n / v5 + f[c2][c3][c5][0] <= 2e18 / D)
						ans = min(ans,(n / v5 + f[c2][c3][c5][0]) * D + c2 * A + c3 * B + c5 * C);
					if (v5 > n)
						break;
				}
				if (v3 > n)
					break;
			}
			if (v2 > n)
				break;
		}
		printf("%lld\n",ans);
	}
	return 0;
}

Measured memory_bytes: 5936
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <iomanip>
#include <vector>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <map>
#include <queue>
#define rep(i,n) for (int i=0;i<(n);i++)

using namespace std;
//
//int main() {
//	long long a, b, x;
//	cin >> a >> b >> x;
//	long long ans = 0;
//	long long d = 10;
//
//	for (int i = 0;i < 10;i++) {
//		if (x < a * pow(10, i) + b * (i + 1)) {
//			d = i;
//			break;
//		}
//	}
//
//	x -= b * d;
//	ans = min(x / a,(long long)pow(10,9));
//
//	
//	cout << ans << endl;
//
//	return 0;
//}

int main() {
	int r;
	cin >> r;
	cout << r * r << endl;

	return 0;
}

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

string t[21];
int w,h;

void dfs(int x,int y){
int dx[4] = {1,-1, 0, 0};
int dy[4] = {0, 0, 1, -1};


	if(((x<0||y<0)||x>=h||y>=w)||t[x][y]!='.') return;
	t[x][y]='@';	
	rep(k,4){
	dfs(x+dx[k],y+dy[k]);
}
return;
}


int main(void){
	int sx=-1,sy=-1,cnt;
	
while(true){
scanf("%d %d/n",&w,&h);
if(!w&&!h) {break;}
rep(i,h){
cin >> t[i];
}

rep(i,h)rep(j,w){

	if(t[i][j]=='@'){	
	sx =i;
	sy =j;

t[i][j]='.';
	}

}

dfs(sx,sy);

cnt =0;

rep(i,h)rep(j,w)if(t[i][j]=='@') cnt++;	

cout<<cnt<<endl;;


}

return 0;
}

Measured memory_bytes: 1248
import java.util.Scanner;

public class Main {
	public static void main(String args[]){
		Scanner in = new Scanner(System.in);
		while(in.hasNext()){
			try{
				int d = in.nextInt();
				int x = 600 - d;
				int S = 0;
				while(x > 0){
					S = S + x * x * d;
					x = x - d;
				}
				System.out.println(S);		
			}catch(Exception e){
				System.exit(0);
			}
		}
	}
}

Measured memory_bytes: 17176
#include<iostream>
using namespace std;
int main(){
  int i;
  string s;
  cin>>s;
  int a[s.size()];
  for(i=0;i<s.size();i++){
    a[i]=s[i]-'0';
  }
  int u=0;
  for(i=1;i<s.size();i++){
    if(a[i]+a[i-1]!=1){
      u++;
      //cout<<i<<" ";
      if(a[i])
        a[i]=0;
      else
        a[i]=1;
    }
  }
  cout<<u;
  return 0;
}

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

using namespace std;
typedef long long ll;

#define rep(i, N) for (int i = 0; i < (int)N; i++)
const ll MOD = pow(10,9)+7;
const ll LLINF = pow(2,61)-1;
const int INF = pow(2,30)-1;


int main() {
  string S; cin >> S;
  map<char, int> dir;
  rep(i, S.size()) dir[S[i]]++;
  string result = "Yes";
  if (dir['S']&&!dir['N']) result = "No";
  if (dir['N']&&!dir['S']) result = "No";
  if (dir['E']&&!dir['W']) result = "No";
  if (dir['W']&&!dir['E']) result = "No";
  cout << result << endl;
  return 0;
}

Measured memory_bytes: 256
import java.util.Arrays;
import java.util.Scanner;
import java.util.TreeMap;

/**
 * Roadwork
 */
public class Main {

    public static void main(String[] args) throws Exception {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            int Q = sc.nextInt();

            int[][] W = new int[N][3];
            for (int i = 0; i < N; i++) {
                W[i][0] = sc.nextInt();
                W[i][1] = sc.nextInt();
                W[i][2] = sc.nextInt();
            }

            Arrays.sort(W, (o1, o2) -> Integer.compare(o1[2], o2[2]));

            TreeMap<Integer, Integer> D = new TreeMap<>();
            for (int i = 0; i < Q; i++) {
                D.put(sc.nextInt(), i);
            }

            int[] A = new int[Q];
            Arrays.fill(A, -1);

            for (int i = 0; i < N; i++) {
                int s = W[i][0];
                int t = W[i][1];
                int x = W[i][2];

                while (true) {
                    Integer key = D.ceilingKey(s - x);
                    if (key == null) {
                        break;
                    }

                    if (key >= t - x) {
                        break;
                    }

                    A[D.get(key)] = x;
                    D.remove(key);
                }
            }

            StringBuilder ans = new StringBuilder();
            for (int a : A) {
                ans.append(a).append("\n");
            }

            System.out.print(ans.toString());
        }
    }

}


Measured memory_bytes: 184116
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n)  for(long long i=0;i<(long long)(n);i++)
#define REP(i,k,n) for(long long i=k;i<(long long)(n);i++)
#define all(a) a.begin(),a.end()
#define eb emplace_back
#define pb push_back
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define chmin(x,y) if(x>y)x=y
#define chmax(x,y) if(x<y)x=y
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef tuple<ll,ll,ll,ll> PPP;
typedef priority_queue<ll> PQ;
typedef priority_queue<ll,vector<ll>,greater<ll>> SPQ;
using vi=vector<ll>;
using vvi=vector<vector<ll>>;
using vc=vector<char>;
using vvc=vector<vector<char>>;
const ll inf=100100100100;
const int Inf=1001001001;
const int mod=1000000007;
const double pi=3.141592653589793;

int main(){
    int n;cin>>n;
    vector<tuple<string,int,int>> v;
    rep(i,n){
        string s;
        int a;
        cin>>s>>a;
        v.eb(s,-a,i+1);
    }
    sort(all(v));
    rep(i,n){
        cout<<get<2>(v[i])<<endl;
    }
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <string>
#include <vector>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/graph_utility.hpp>
#include <utility>
#include <boost/foreach.hpp>
#include <cmath>

template <typename T> class Mod {
  T m;
  void __swap(T *a, T *b) {
    T tmp;

    tmp = *a;
    *a = *b;
    *b = tmp;
  }
  T __modinv(T a) {
    T b = m, u = 1, v = 0;
    while (b) {
      T t = a / b;
      a -= t * b; __swap(&a, &b);
      u -= t * v; __swap(&u, &v);
    }
    u %= m;
    if (u < 0) {
      u += m;
    }
    return u;
  }
public:
  Mod(T param) {
    m = param;
  }
  T plus(T a, T b) {
    // O(1)
    a %= m;
    b %= m;
    return (a + b) % m;
  }
  T minus(T a, T b) {
    // O(1)
    T ret;
    a %= m;
    b %= m;
    ret = a - b;
    if (ret < 0) {
      return ret + m;
    }
    return ret;
  }
  T mul(T a, T b) {
    // O(1)
    a %= m;
    b %= m;
    return (a * b) % m;
  }
  T div(T a, T b) {
    // O( max(log(a), log(b)) ) (?)
    T ret;

    a = a % m;
    ret = a * __modinv(b) % m;

    return ret;
  }
};

Mod<long long int> md(1000000000 + 7);
long long int x, y, ans = 0;

void func2(long long int pat1, long long int pat2);

void func1(long long int X, long long int Y) {
  long long int pat1, pat2;

  pat1 = X / 2;  
  if (X - (pat1 * 2) == 1) {
    pat2 = 1;
  }
  else {
    pat2 = 0;
  }

  for (; 0 <= pat1; pat1--, pat2 += 2) {
    if ((pat1 * 2 + pat2 * 1 == X) && (pat1 * 1 + pat2 * 2 == Y)) {
      // TODO
      func2(pat1, pat2);
    }
  }
}

void func2(long long int pat1, long long int pat2) {
  long long int tmp = 1;

  for (long long int i = (pat1 + pat2); i >= (pat1 + pat2 - pat1 + 1); i--) {
    tmp = md.mul(tmp, i);
  }
  for (long long int i = 1; i <= pat1; i++) {
    tmp = md.div(tmp, i);
  }

  ans = tmp;
}

int main() {
  std::cin >> x >> y;

  func1(x, y);

  std::cout << ans << std::endl;

  return 0;
}

Measured memory_bytes: 3636
#include<iostream>
using namespace std;
int main()
{
	int blow,hit;
	int a[4];
	int b[4];
while(cin>>a[0]>>a[1]>>a[2]>>a[3]>>b[0]>>b[1]>>b[2]>>b[3])
{	
	hit=0;
	blow=0;
	for(int i=0;i<4;i++)
	{
		if(a[i]==b[i])
		{
			hit++;
		}
		for(int j=0;j<4;j++)
		{
			if(a[j]==b[i]&&j!=i)
			{
			blow++;
			}
		}
	}
	cout<<hit<<" "<<blow<<endl;
}
return 0;
}

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

int main(){
string S;
  cin>>S;
  
  for(int i=0; i<26; i++){
   char ans='a'+ i; // 'a'にiを足してchar型のansに入れると文字'a'自体に足してくれる
   bool flag=true;
    for(int j=0; j<S.size(); j++){
     if(ans==S[j]){flag=false;} 
    }
   if(flag){cout<<ans; return 0;}  // ansはchar型なので'a'+ iを文字に変換してくれる
  }
  
 cout<<"None";
}

Measured memory_bytes: 512
h1=Hash.new(0)
max=""
arr=gets.chomp.split(nil)
arr.each do |item|
    h1[item]+=1
    max=item if (item.length>max.length)
end
h2=h1.sort{|a,b|a[1]<=>b[1]}.reverse!
puts "#{h2[0][0]} #{max}"

Measured memory_bytes: 6100
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.Console;

class Program
{
    static void Main()
    {
        var NMC = ReadLine().Split().Select(int.Parse).ToArray();
        var N = NMC[0];
        var M = NMC[1];
        var C = NMC[2];
        var B = ReadLine().Split().Select(int.Parse).ToArray();
        var A = new int[N, M];
        for (int i = 0; i < N; i++)
        {
            var l = ReadLine().Split().Select(int.Parse).ToArray();

            for (int j = 0; j < M; j++)
            {
                A[i, j] = l[j];
            }
        }

        var c = 0;
        for (int i = 0; i < N; i++)
        {
            var s = C;
            for (int j = 0; j < M; j++)
            {
                s += A[i,j] * B[j];
            }
            if (s > 0) c++;
        }

        WriteLine(c);
    }
}



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

#define ll long long
#define uint unsigned int
#define vi vector<int>
#define pii pair<int,int>

#define for0(i,n) for(int i=0; i<(n); i++)
#define for1(i,n) for(int i=1; i<=(n); i++)
#define from(i,a,b) for(int i=(a); i<=(b); i++)
#define forr(i,a,b) for(int i=(a); i>=(b); i--)

#define PB push_back
#define MP make_pair
#define FI first
#define SE second

#define all(x) (x).begin(),(x).end()
#define len(x) (int)(x).size()

#define safe_map unordered_map<long long, int, custom_hash>

#define CLK clock_t clk = clock();//Start of main
#define OCLK cerr << "Time (in ms): " << (double)(clock() - clk) * 1000.0 / CLOCKS_PER_SEC << '\n';//End of main

void amax(int& x, int y){if(x<y)x=y;}
void amin(int& x, int y){if(x>y)x=y;}
int gcd(int a, int b){if(b){return gcd(b,a%b);}return a;}

struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {  // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};






int main(){
	ios_base::sync_with_stdio(false);cin.tie(NULL);
    int n; cin >>n;
  	string s;
  	map<char, int> mp;
  	for0(i,n){
      cin>>s;
      mp[s[0]]++;
    }
  	cout<<"AC x "<<mp['A']<<"\nWA x "<<mp['W']<<"\nTLE x "<<mp['T']<<"\nRE x "<<mp['R']<<'\n';
}




Measured memory_bytes: 3628
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <cmath>
#include <iomanip>
#include <set>
#include <sstream>
#include <queue>
using namespace std;
typedef long long ll;

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

  vector<int> a(n);
  int ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    ans += a[i] - 1;
  }

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

Measured memory_bytes: 3192
import java.util.*;
public class Main {
	public static void main(String [] args) {
		Scanner s = new Scanner(System.in);
		while (s.hasNext()) {
			int d = s.nextInt();
			int ans = 0;
			for (int i=d;i<=600-d;i+=d) {
				ans += d * i * i;
			}
			System.out.println(ans);
		}
	}

}



Measured memory_bytes: 25768
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
li = rl()
cnt = 0
while all([i % 2 == 0 for i in li]):
    li = [i // 2 for i in li]
    cnt += 1
print(cnt)














Measured memory_bytes: 27140
#include<bits/stdc++.h>
#define watch(x) cout << (#x) << " is " << (x) << endl
typedef long long ll;
using namespace std;
int static fast = [](){
  ios::sync_with_stdio(false);
  cin.tie(0); cout.tie(0); return 0;
}();

int main() {
    string s;
    cin >> s;
    string s2;
    int ans = 0;
    for(char c: s) {
        if (!s2.empty() && s2.back() != c) {
            ans += 2;
            s2.pop_back();
        } else {
            s2 += c;
        }
    }
    cout << ans << endl;
    return 0;
}




Measured memory_bytes: 592
// Package main provides
//
// File:  main.go
// Author: ymiyamoto
//
// Created on Sat Aug 31 20:21:29 2019
//
package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)

	ans := 0.0
	for i := 0; i < n; i++ {
		var a float64
		fmt.Scan(&a)
		ans += 1.0 / a
	}
	fmt.Println(1 / ans)
}


Measured memory_bytes: 512
#include <bits/stdc++.h>
#define INF 1000000007
#define rep(i, N) for(ll i = 0; i < N; i++)
#define rep2(i, j, k) for(ll i = j; i < k; i++)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define print(x) cout << x << "\n"
#define print2(x, y) cout << x << " " << y << "\n"
#define printv(vec) rep(lp, vec.size()) cout << vec[lp] << " "; print(""); 
#define ALL(v) v.begin(), v.end()
#define SUM(v) accumulate(ALL(v), 0)
#define MAX(v) *max_element(ALL(v))
#define MIN(v) *min_element(ALL(v))
#define SORT(v) sort(ALL(v))
#define REV(v) reverse(ALL(v))
typedef long long ll;
using namespace std;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vs = vector<string>;

const int mod = 1000000007;
class mint {
public:
    ll x;
    mint(ll x = 0) : x((x % mod + mod) % mod) {}
    mint operator-() const { 
      return mint(-x);
    }
    mint& operator+=(const mint& a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator-=(const mint& a) {
        if ((x += mod - a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator*=(const  mint& a) {
        (x *= a.x) %= mod;
        return *this;
    }
    mint operator+(const mint& a) const {
        mint res(*this);
        return res += a;
    }
    mint operator-(const mint& a) const {
        mint res(*this);
        return res -= a;
    }
    mint operator*(const mint& a) const {
        mint res(*this);
        return res *= a;
    }
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t >> 1);
        a *= a;
        if (t & 1) a *= *this;
        return a;
    }
    mint inv() const {
        return pow(mod - 2);
    }
    mint& operator/=(const mint& a) {
        return (*this) *= a.inv();
    }
    mint operator/(const mint& a) const {
        mint res(*this);
        return res /= a;
    }
    friend ostream& operator<<(ostream& os, const mint& m){
        os << m.x;
        return os;
    }
};

ll modpow(ll a, ll n){
	ll res = 1;
	while (n > 0) {
		if (n & 1) res = res * a % mod;
		a = a * a % mod;
		n >>= 1;
	}
	return res;
}

void Main(){
	
	ll N, Q;
	string S;
	cin >> N >> S >> Q;

	vector<set<ll>> v(26);
	rep(i, N) v[S[i] - 'a'].insert(i);

	rep(i, Q){
		
		ll in1;
		cin >> in1;
		
		if(in1 == 1){
			ll in2;
			char in3;
			cin >> in2 >> in3;
			in2 -= 1;
			v[S[in2] - 'a'].erase(in2);
			S[in2] = in3;
			v[in3 - 'a'].insert(in2);
		}
		
		else{
			ll in2, in3;
			cin >> in2 >> in3;
			in2 -= 1;
			in3 -= 1;
			ll ans = 0;
			rep(j, 26){
				auto itr = v[j].lower_bound(in2);
				if(itr == v[j].end()) continue;
				if(*itr <= in3) ans += 1;
			}
			print(ans);
		}
	
	}		

}

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





Measured memory_bytes: 27236
/*
　　こんにちは。あたしはｶｳｶﾞｰﾙ。
　　redcoderになるためAtCoderを巡る旅をしてます。

　　　 　 ＿_
　　　 ヽ|＿_|ノ　　　　ﾓｫ
　　　　||‘‐‘||ﾚ　　_)_, ―‐ 、
　　　　/(Ｙ (ヽ＿ /・ ヽ　　 ￣ヽ
　　　　∠ ＿ ゝ　 ｀^ヽ ﾉ.::::_(ノヽ
　　　　 _/ヽ　 　　  /ヽ￣￣/ヽ
*/

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define dump(x)  cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define POSSIBLE(n) cout << ((n) ? "POSSIBLE" : "IMPOSSIBLE"  ) << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible"  ) << endl

#define rep(i, n) REP(i, 0, n)                              // 0, 1, ..., n-1
#define REP(i, x, n) for(int i = x; i < n; i++)             // x, x + 1, ..., n-1
#define FOREACH(x,a) for(auto& (x) : (a) )

#define ALL(v) (v).begin() , (v).end()
#define RALL(v) (v).rbegin(), (v).rend()

#define COUT(x) cout << (x) << endl

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; }

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

    int n, a, b; cin >> n >> a >> b;
    if(b - a - 1 & 1) cout << "Alice" << endl;
    else cout << "Borys" << endl;
}


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

int cnt[10];

int main(){
    int a, b;
    for (int i = 0; i < 3; ++ i){
        scanf("%d%d", &a, &b);
        ++ cnt[a], ++ cnt[b];
    }
    int ans = 0;
    for (int i = 1; i <= 4; ++ i){
        ans += cnt[i] & 1;
    }
    puts(ans <= 2 ? "YES" : "NO");
    return 0;
}

Measured memory_bytes: 256
#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctype.h>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>

using namespace std;

#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define lengthof(x) (sizeof(x) / sizeof(*(x)))
#define FILL(ptr, value) FILL_((ptr), sizeof(ptr)/sizeof(value), (value))
template <typename T>
void FILL_(void * ptr, size_t size, T value){
  std::fill((T*)ptr, (T*)ptr+size, value);
}
//4方向ベクトル→↑←↓
int dx[] ={1,0,-1,0};
int dy[] ={0,-1,0,1};
int N;//宝石の数
int M;//ロボットに与えた命令の個数
int main()
{
  int x,y;
  while(cin>>N,N){
    int juery[30][30];
    int px = 10;
    int py = 10;
    int ans = N;
    for(int i = 0;i <=20;i++){
      for(int j = 0;j <=20;j++){
	juery[i][j]=0;
      }
    }
    for(int i = 0;i <N;i++){
    cin>>x>>y;
    juery[y][x] = 1;
    }
    cin>>M;//命令の数
    char order;
    for(int j = 0;j <M;j++){
      cin>>order;
      cin >>x;//移動距離
      if(order=='N'){
        for(int i =0; i <x;i++){
	  py +=1;
	  if(juery[py][px]==1){
	    // cout <<juery[py][px]<<endl;
	    //cout <<"get"<<endl;
	    juery[py][px]=0;
	    ans--;
	  }
	}
      }else if(order=='E'){
	for(int i = 0;i <x;i++){
	  px +=1;
	  if(juery[py][px]==1){
	    // cout <<juery[py][px]<<endl;
	    // cout <<"get"<<endl;
	    juery[py][px]=0;
	    ans--;
	  }
	}
      }else if(order=='S'){
	for(int i = 0;i <x;i++){
	  py -=1;
	  if(juery[py][px]==1){
	    // cout <<juery[py][px]<<endl;
	    juery[py][px]=0;	    
	    ans--;
	  }
	}
      }else if(order=='W'){
	for(int i = 0;i <x;i++){
	  px -=1;
	  if(juery[py][px]==1){
	    juery[py][px]=0;
	    ans--;
	  }
	}
      }
    }
    if(ans!=0){
      cout <<"No"<<endl;
    }else{
      cout <<"Yes"<<endl;
    }
  }
    
  return 0;
}

Measured memory_bytes: 1152
#include <bits/stdc++.h>
using namespace std;
int main()
{
    vector<int> A(3);
    cin >> A[0] >> A[1] >> A[2];
    sort(A.begin(),A.end());

    int count = 0;
    //cout << A[0]<< endl;
    
    if (((A[2] - A[0])%2 + (A[2] -A[1]) % 2)% 2 != 0)
    {
        A[2] = A[2] * 1;
        count = 2;
    }
    


    //cout << A[0] << endl;
    /*
    if ((A[2] - A[1]) % 2 == 1)
    {
        A[1] = A[1] -1;
        count++;
    }
    */
    cout << (A[2] * 2 - A[0] - A[1]) / 2 + count << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;;
#define ll long long
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;
ll digsum(ll n, ll b){
    ll ans = 0;
    while(n!=0){
        ans += n%b;
        n /= b;
    }
    return ans;
}
int main(){
    ll n , s; cin >> n >> s;
    ll ans = 0;
    FOR(i,2,sqrt(n)+1){
        if(digsum(n,i)== s){
            ans = i;
            break;
        }
    }
    if(ans==0){
        FOR(i,1,sqrt(n)){
            if(s-i >= 0 &&  s-i<(double)n/(i+1) && n%i == (s-i)%i){
                if((n-(s-i))/i>1){
                ans = (n-(s-i))/i;
                }
            }
        }
    }
    if(ans == 0 && n==s){
        ans = n+1;
    }
    if(ans==0){
        cout << -1 << endl;
    }else{
        cout << ans << endl;
    }


}

Measured memory_bytes: 256
using System;

class SumOf4Integers {
    static void Main(string[] args)
    {
        string s;

        while ((s = Console.ReadLine()) != null){
            int n = int.Parse(s);
            int ans = 0;

            for (int i = 0; i < 10; i++) {
                for (int j = 0; j < 10; j++) {
                    for (int k = 0; k < 10; k++) {
                        for (int l = 0; l < 10; l++) {
                            if (i + j + k + l == n) ans++;
                        }
                    }
                }
            }
            Console.WriteLine(ans);
        }
    }
}

Measured memory_bytes: 8972
/**
 *  author:   TakeruOkuyama
 *  created:  2020-04-15 11:17:28
**/
#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>;

const int MOD = 1000000007;
const int INF = 999999999;

int main(){
    int N;
    cin >> N;
    vector<int> A(N + 1, 0);
    vector<int> B(N);
    vector<int> C(N - 1);
    rep(i , N){
        cin >> A[i];
        A[i]--;
    }
    rep(i , N){
        cin >> B[i];
    }
    rep(i , N - 1){
        cin >> C[i];
    }
    int ans = 0;
    int bef = -2;
    rep(i, N){
        ans += B[A[i]];
        if(A[i] + 1 == A[i + 1]){
            ans += C[A[i]];
        }

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

/**
 * g++ code.cpp
 * ./a.out
 * shift + ctrl + i
**/ 

Measured memory_bytes: 256
#include <iostream>
#include <math.h>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <string>

typedef long long int ll;
typedef unsigned long long int ull;

using namespace std;

int main()
{
  ll N, w = 0, m = 0;
  string S;

  cin >> N >> S;

  for (int i = 0; i < N; i++)
  {
    if (S[i] == '.')
      w++;
  }
  m = w;
  for (int i; i < N; i++)
  {
    if (S[i] == '.')
    {
      w--;
    }
    else
    {
      w++;
    }
    if (m > w)
    {
      m = w;
    }
  }

  cout << m << endl;

  return 0;
}


Measured memory_bytes: 640
#include<bits/stdc++.h>
#include <vector>
#include <algorithm>
using namespace std;
using UL = unsigned int;
using ULL = unsigned long long;
using LL = long long;

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




int main() {
  int n; scanf("%d",&n);

  int ans;
  if (n>=30)   printf("Yes");
  else printf("No");

  return 0;
}



Measured memory_bytes: 3824
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean isThree = false;
        int count = 0;
        int d1,d2;
        for (int i=0; i<n; i++) {
            d1 = sc.nextInt();
            d2 = sc.nextInt();
            if (d1 == d2) {
                count++;
                if (count == 3) {
                    isThree = true;
                }
            } else {
                count = 0;
            }
        }
        System.out.print(isThree ? "Yes" : "No");
    }
}


Measured memory_bytes: 35952
/* ****revpro**** */
// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
#include<bits/stdc++.h>
#define ll          long long
#define pb          push_back
#define endl     '\n'
#define pii         pair<ll,ll>
#define vi          vector<ll>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (ll)x.size()
#define hell        1000000007
#define rep(i,a,b)  for(ll i=a;i<b;i++)
#define repr(i,a,b) for(ll i=b-1;i>=a;i--)    
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define mp          make_pair
#define present(c,x) ((c).find(x) != (c).end())
#define cpresent(c,x) (find(all(c),x) != (c).end())
#define mii      map<ll,ll>
using namespace std;
 
#define TIME        cerr << "\nTime elapsed: " << setprecision(5) <<1000.0 * clock() / CLOCKS_PER_SEC << "ms\n";
#define FAST ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define N  100005
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;  
#define ordered_set tree<double, null_type,less<double>, rb_tree_tag,tree_order_statistics_node_update> 
void solve()
{
  ll n;
  cin>>n;
  ll f=0;
  while(n)
  {
    if((n%10)==7) f=1;
    n/=10;
  }
  if(f) cout<<"Yes\n";
  else cout<<"No\n";
}
signed main()
{
  
    /***********************************/
    unsigned seed = std::chrono::system_clock::now().time_since_epoch().count();
    mt19937_64 generator (seed);
    /***********************************/
 
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS=1;
//  cin>>TESTS;
  while(TESTS--)
  {
    solve();
  
  }
  TIME
  return 0;
}

Measured memory_bytes: 3800
N, Y = [int(i) for i in input().split()]
Y //= 1000

for i in range(N+1):
    for j in range(N-i+1):
        k = N - (i + j)
        if Y - (10*i + 5*j) == k:
            print(i, j, k)
            quit()

print(-1, -1, -1) 

Measured memory_bytes: 3060
//
//  main.cpp
//  CoderTest
//
//  Created by yuya on 2019/07/25.
//  Copyright © 2019 yuya. All rights reserved.
//

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


int main()
{
    int N, K;
    string S;
    cin >> N >> K;
    cin >> S;
    
    int hpy = 0;
    
    for(int i=0;i<N-1;i++)
    {
        if(S[i] == S[i+1]) hpy++;
    }
    
    if(S[0] == S[N-1])
    {
        hpy  = min(hpy + 2 * K, N - 1);
    }
    else
    {
        // とりあえず場合分けなし
        hpy  = min(hpy + 2 * K, N - 1);
    }
    
    cout << hpy << endl;
    
    return 0;
}


Measured memory_bytes: 512
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ABC070A___Palindromic_Number
{
    class Program
    {
        static void Main(string[] args)
        {

            string input = Console.ReadLine();
            char[] num = input.ToCharArray();

            string result = "No";

            if (num[0] == num[2])
            {
                result = "Yes";
            }

            Console.WriteLine(result);
        }
    }
}


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

#define rep(i,f,n) for (long long (i) =(f);(i)<(n);(i)++)
typedef  long long ll;

using namespace std;

int main(){
    int n;
    cin >>n;
    int m[300001];
    int c[300001];
    int *pt=c;
    rep(i,0,n){
        cin>>m[i];
        rep(h,0,m[i]){
            cin>>*pt;
            pt++;
        }
    }
    ll ans;
    priority_queue <int>x;
    pt--;
    for (int i=n-1;i>=0;i--){
        rep(h,0,m[i]){
            x.push(*pt);
            pt--;
        }
        ans+=x.top();
        x.pop();
    }
    cout<<ans<<endl;
    return 0;
}


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

int main() {
  int W, a, b;
  cin >> W >> a >> b;
  if(b+W < a) {
    cout << a - b - W;
  }
  else if(a+W < b) {
    cout << b - a - W;
  }
  else {
    cout << "0";
  }
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
using Int = long long;
Int K;
string s;
vector<vector<vector<vector<Int>>>>memo;
template<typename Head, typename Value> auto vectors(const Head &head, const Value &v) { return vector<Value>(head, v); }
template<typename Head, typename... Tail> auto vectors(Head x, Tail... tail) { auto inner = vectors(tail...); return vector<decltype(inner)>(x, inner); }
Int rec(int idx, int cnt, int num, bool tight){
    Int res = 0;
    if(idx + 1  == s.size()){
        //if(tight) cout << "tight" << endl;
        return (cnt + (num != 0) == K);
    }
    if(memo[idx][num][cnt][tight] != -1) return memo[idx][num][cnt][tight];
    if(tight){
        int lim = s[idx + 1] - '0';
        //cout << lim << endl;
        for(int i = 0; i <= lim; ++i){
            res += rec(idx + 1, cnt + (num != 0),i, tight && lim == i);
        }
    } else {
        for(int i = 0; i <= 9; ++i){
            res += rec(idx + 1, cnt + (num != 0),i, false);
        }
    }
    return memo[idx][num][cnt][tight] = res;
}
int main(){
    cin >> s;
    cin >> K;
    Int res = 0;
    memo = vectors(s.size(),10,s.size() + 10,2,-1LL);
    for(int i = 0; i <= s.front() - '0'; ++i){
        int num = s.front() - '0';
        res += rec(0,0,i, num == i);
    }
    cout << res << endl;
}


Measured memory_bytes: 6400
l = input()
l += "_"
stack1 = []
stack2 = []
A = 0
for i in range(len(l)):
    if l[i] == "\\":
        stack1.append(i)
    elif l[i] == "/" and stack1:
        b = stack1.pop()
        a = i - b
        A += a
        while stack2 and stack2[-1][0] > b:
            a += stack2.pop()[1]
        stack2.append([b, a])
print(A)
print(len(stack2), *(i[1] for i in stack2))


Measured memory_bytes: 6376
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <vector>

using namespace std;

int main() {
  int k, x;
  cin >> k >> x;
  for (int i = x-k+1; i <= x+k-1; i++) {
    cout << i << " ";
  }
  cout << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧  
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     
　　　　／　　　＼　 　  |　|     
　　　 /　　 /￣￣￣￣/　　|  
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿  
　 　　　＼/＿＿＿＿/　（u　⊃  
---------------------------------------------------------------------------------------------------*/










int N, Q, A[101010], X[101010];
set<int> AS;
//---------------------------------------------------------------------------------------------------
ll B[101010];
void init() {
    B[0] = A[0];
    rep(i, 1, N) B[i] = B[i - 1] + A[i];
}
ll get(int L, int R) {
    ll res = B[R];
    if (L) res -= B[L - 1];
    return res;
}
//---------------------------------------------------------------------------------------------------
pair<int, int> f(int x, int len) {
    int lft = lower_bound(A, A + N, x - len) - A;
    int rht = upper_bound(A, A + N, x + len) - A - 1;
    return { lft, rht };
}
//---------------------------------------------------------------------------------------------------
ll takasm[101010];
void pre() {
    rep(i, 0, N) {
        if (N % 2 == 1 and i % 2 == 0) takasm[i] = A[i];
        if (N % 2 == 0 and i % 2 == 1) takasm[i] = A[i];
    }
    rep(i, 1, N) takasm[i] += takasm[i - 1];
}
//---------------------------------------------------------------------------------------------------
ll solve(int x) {
    int ng = -1, ok = inf;
    while (ng + 1 != ok) {
        int md = (ng + ok) / 2;
        auto p = f(x, md);
        if (p.first > p.second) {
            ng = md;
            continue;
        }

        int len = p.second - p.first + 1;
        if (N - 1 <= p.second + len) ok = md;
        else ng = md;
    }

    int L, R;
    tie(L, R) = f(x, ok);
    int turn = R - L + 1;

    //printf("[%d %d %d]\n", ok, L, R);

    int taka = N - R - 1;
    int aoki = turn;

    if (taka != aoki) {
        R--;
        aoki--;
        turn--;
    }

    //if (taka != aoki) printf("%d %d %d\n", x, taka, aoki);
    

    ll res = get(R + 1, N - 1);
    if (L) res += takasm[L - 1];
    return res;
}
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> N >> Q;
    rep(i, 0, N) cin >> A[i];
    rep(i, 0, Q) cin >> X[i];
    rep(i, 0, N) AS.insert(A[i]);
    init();
    pre();
    rep(i, 0, Q) printf("%lld\n", solve(X[i]));
}

Measured memory_bytes: 8832
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String ans = "No";
        for (int i = 1; i < 10; i++) {
            for (int j = 1; j < 10; j++) {
                if (i * j == n) {
                    ans = "Yes";
                }
            }
        }

        System.out.println(ans);
    }
}


Measured memory_bytes: 23764
#include <bits/stdc++.h>
using namespace std;
void debug() {cout<<endl;}
template<typename T,typename... Args>
void debug(T x,Args... args) {cout<<x<<" ";debug(args...);}
#define forn(i,a,b) for(int i=a;i<b;++i)
#define pb push_back
#define F first
#define S second
#define endl "\n"
typedef long long ll;
typedef pair<int, int> pii;

const int N = 1e5+5;
const int M = 1e9+7;
vector<int> g[N];

pii dfs(int u, int p) {
    int w = 1, b = 1;
    for (auto &v : g[u]) {
        if (v != p) {
            pii x = dfs(v, u);
            int tot = (x.F + x.S) % M;
            w = (1ll * w * tot) % M;
            b = (1ll * b * x.F) % M;
        }
    }
    return {w, b};
}

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    
    int n;
    cin >> n;
    forn(i, 0, n-1) {
        int u, v;
        cin >> u >> v;
        u--, v--;
        g[u].pb(v);
        g[v].pb(u);
    }
    
    pii x = dfs(0, -1);
    int ans = (x.F + x.S) % M;
    
    cout << ans << endl;
}


Measured memory_bytes: 16012