akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>
#include <fstream>
#include <bitset>
#include <time.h>
#include <tuple>

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<ll> V;
typedef complex<double> Point;

#define PI acos(-1.0)
#define EPS 1e-10
const ll INF = (1LL << 60) - 1;
const ll MOD = 1e9 + 7;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,N) for(int i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()) )
#define fi first
#define se second
#define N_SIZE (1LL << 20)
#define NIL -1
#define MAX_N 100100 * 3

int n;
vector<pair<string, int>> lis[10010];
map<pair<string, int>, int> msi;

void solve(int key,int cnt) {
	rep(i, lis[key].size()) {
		rep(j, cnt)cout << ".";
		cout << lis[key][i].first << endl;
		int nkey = lis[key][i].second;
		solve(nkey, cnt + 1);
	}
}

int main() {
	cin >> n;
	rep(i, n) {
		int num;
		string s;
		cin >> num >> s;
		lis[num].push_back({ s,i + 1 });
		msi[{s, i}] = i + 1;
		//if (s == "I")cout << msi[s] << endl;
	}
	solve(0, 0);
}

Measured memory_bytes: 3648
#include <stdio.h>
int main(){
  int N;
  int count = 0;
  int S[100] ={1,2,3,4,5,6,7,8,9};
  scanf("%d",&N);
  if(N > 82)printf("No");
  else{
  for(int i = 0;i<9;i++){
    if(N%S[i] == 0 && N/S[i] <=9)count++;
   }
  if(count > 0)printf("Yes");
  else printf("No");
  }
}

Measured memory_bytes: 128
# ==================== mod 10**9+7    
mod=10**9+7

def mul(a, b):
    return ((a % mod) * (b % mod)) % mod


n,m=map(int,input().split())

if n==1 and m==1:
    print(2)
elif n==2 and m==1:
    print(2)
elif n==1 and m==2:
    print(2)
elif n==2 and m==2:
    print(8)
elif n+2<=m:
    print(0)
elif n+1==m:
    k=1
    for i in range(1,n):
        k=mul(k,i+1)
    for i in range(1,m):
        k=mul(k,i+1)
    print(k)
elif n==m:
    k=1
    for i in range(1,n):
        k=mul(k,i+1)
    for i in range(1,m):
        k=mul(k,i+1)
    k=mul(k,2)
    print(k)
elif n==m+1:
    k=1
    for i in range(1,n):
        k=mul(k,i+1)
    for i in range(1,m):
        k=mul(k,i+1)
    print(k)
elif n>=m+2:
    print(0)

Measured memory_bytes: 3188
#include<iostream>
using namespace std;
static const int N=100;
int main(){
	int M[N][N];
	int n,u,k,v;
	int i,j;
	cin >> n;


	for(i=0;i<n;i++){

		for(j=0;j<n;j++){
			M[i][j]=0;
		}

	}


	for(i=0;i<n;i++){
		cin >> u >> k;
		u=u-1;

		for(j=0;j<k;j++){
			cin >> v;
			v=v-1;
			M[u][v]=1;
		}

	}


	for(i=0;i<n;i++){

		for(j=0;j<n;j++){
			if(j)cout << " ";
			cout << M[i][j];
		}

		cout << endl;

	}


	return 0;

}


Measured memory_bytes: 3140
#include <stdio.h>
#include <ctype.h>

int main() {
    char s1[15], s2[15], s3[15];

    scanf("%s %s %s", s1, s2, s3);

    printf("%c%c%c", toupper(s1[0]), toupper(s2[0]), toupper(s3[0]));
    return 0;
}

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

using namespace std;


int main(){

    int X;
    cin >> X;

    int ans = 1;

    for(int b = 2; b < X; b++){
         int r = b;

         for(int p = 2; pow(b, p) <= X; p++){
               r *= b;
               ans = max(ans, r);
              }
        }

    
    cout << ans;


    return 0;
}

Measured memory_bytes: 640
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        String a = sc.nextLine();
        String b = sc.nextLine();
        String c = sc.nextLine();
        
        String buf = "";
        
        for (int i = 0; i < n; i++) {
            char tmp = a.charAt(i);
            if (b.charAt(i) == c.charAt(i))
                tmp = b.charAt(i);
            buf += tmp;
        }

        int cnt = 0;

        for (int i = 0; i < n; i++) {
            if (buf.charAt(i) != a.charAt(i))
                cnt++;
            if (buf.charAt(i) != b.charAt(i))
                cnt++;
            if (buf.charAt(i) != c.charAt(i))
                cnt++;
        }

        System.out.println(cnt);
    }
}

Measured memory_bytes: 21972
#include <cstdio>
#include <iostream>
#include <vector>
#include <array>
#include <algorithm>
using namespace std;

struct atcoderpair {
    long long A;
    long long B;
};

int main(){
    int N, M;

    cin >> N >> M;

    vector<atcoderpair> xs;

    atcoderpair a;

    int A, B;
    for(int i=0; i<N; i++){
        cin >> a.A >> a.B; 
        xs.push_back(a);
    }

    sort(xs.begin(), xs.end(), [](const atcoderpair& x, const atcoderpair& y){return x.A < y.A;});

    long long sum = 0;
    int j = 0;
    while(M > 0){
        if((M - xs[j].B) > 0){
            sum += (long long)(xs[j].A * xs[j].B);
        }else{
            sum +=  (long long)(xs[j].A * M);
        }
        M -= xs[j].B;
        j++;
    }
    
    cout << sum << endl;

    return 0;
}


Measured memory_bytes: 2420
#include <iostream>
#include <bitset>
#include <iomanip>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <algorithm>
#include <sstream>

using namespace std;

#define ll long long
#define vecll vector<long long>
#define vec2ll vector<vector<long long>>
#define vecbool vector<bool>
#define vecpairll vector<pair<long long,long long>>
#define forll(s,a,b) for(long long s = a;s < b;s++)
#define forllde(s,a) for(long long s = a;s >= 0;s--)

int main()
{
	ll x,ans=0;
	string s = "NG";

	cin >> x;

	ll buf = 100;

	while (buf < x)
	{
		buf *= 1.01;
		ans++;
	}


	cout << ans;

}


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

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

Measured memory_bytes: 3704
A,B,C = map(int,input().split())
k = int(input())


lis = [A,B,C]
max_num = max(A,B,C)

lis.remove(max_num)

rui = 2 ** k

nibai = max_num * rui


a = lis[0]
b = lis[1]
print(a + b + nibai)

Measured memory_bytes: 3060
#include <stdio.h>
#include <math.h>
const double eps=1e-9;
double ABS(double n){return n>=0?n:-n;}
bool same(double a,double b){return ABS(a-b)<eps;}
struct point{
	double x;
	double y;
	point(){}
	point(double a,double b){x=a;y=b;}
	point operator +(const point &a){return point(x+a.x,y+a.y);}
	point operator -(const point &a){return point(x-a.x,y-a.y);}
	point operator *(const double &a){return point(x*a,y*a);}
	point operator /(const double &a){return point(x/a,y/a);}
	void operator =(const point &a){x=a.x;y=a.y;}
	void operator +=(const point &a){x+=a.x;y+=a.y;}
	void operator -=(const point &a){x-=a.x;y-=a.y;}
	void operator *=(const double &a){x*=a;y*=a;}
	void operator /=(const double &a){x/=a;y/=a;}
	bool operator <(const point &a){return x<a.x||(same(x,a.x)&&y<a.y);}
	bool operator ==(const point &a){return same(x,a.x)&&same(y,a.y);}
	double length(){return sqrt(x*x+y*y);}
	void in(){scanf("%lf%lf",&x,&y);}
	void out(){printf("%.20lf %.20lf\n",x,y);}
};
struct segment{
	point a;
	point b;
	segment(){}
	segment(point x,point y){a=x;b=y;}
};
struct line{
	double A;
	double B;
	double C;
	line(){}
	line(double a,double b,double c){A=a;B=b;C=c;}
	line(point a,point b){
		A=a.y-b.y;
		B=b.x-a.x;
		C=A*a.x+B*a.y;
	}
	line(double a,double b,point p){
		A=a;
		B=b;
		C=A*p.x+B*p.y;
	}
	line(segment s){
		A=s.a.y-s.b.y;
		B=s.b.x-s.a.x;
		C=A*s.a.x+B*s.a.y;
	}
};
double dist(point a,point b){return (a-b).length();}
double dot(point a,point b){return a.x*b.x+a.y*b.y;}
double cross(point a,point b){return a.x*b.y-b.x*a.y;}
//angle only returns positive value
double angle(point a,point b){return acos(dot(a,b)/(a.length()*b.length()));}
double area(point a,point b,point c){return ABS(cross(b-a,c-a));}
double distancetoline(point a,line b){return (b.A*a.x+b.B*a.y-b.C)/sqrt(b.A*b.A+b.B*b.B);}
bool parallel(line a,line b){return same(a.A*b.B,b.A*a.B);}
bool vertical(line a,line b){return ABS(a.A*b.A+a.B*b.B)<=eps;}
point intersect(line a,line b){
	double x,y,det;
	x=(a.C*b.B-b.C*a.B);
	y=(a.A*b.C-b.A*a.C);
	det=(a.A*b.B-b.A*a.B);
	return point(x,y)/det;
}
/*
bool intersect(segment a,segment b){}
point intersect(segment a,segment b){}
*/
point projection(point a,line b){return intersect(line(b.B,-b.A,a),b);}
point reflection(point a,line b){return projection(a,b)*2-a;}
bool online(point p,line l){return ABS(l.A*p.x+l.B*p.y-l.C)<eps;}
bool between(point a,point b,point c){
	if((a.x-b.x<=eps&&b.x-c.x<=eps)||(eps>=b.x-a.x&&eps>=c.x-b.x))
	if((a.y-b.y<=eps&&b.y-c.y<=eps)||(eps>=b.y-a.y&&eps>=c.y-b.y))
	return true;
	return false;
}
bool onseg(point p,segment s){return online(p,line(s))&&between(s.a,p,s.b);}
void solve(){
	line a,b;
	point x,y;
	x.in();
	y.in();
	a=line(x,y);
	x.in();
	y.in();
	b=line(x,y);
	if(parallel(a,b))printf("2\n");
	else if(vertical(a,b))printf("1\n");
	else printf("0\n");
	return ;
}
int main(){
	int t;
	scanf("%d",&t);
	while(t--)solve();
}


Measured memory_bytes: 2760
//in progress
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define fr(i,a,b) for(int i = (int)(a); i <= (int)(b); i++)
#define forn(i,n) for(int i =0; i < (int)(n); i++)
#define rfr(i,a,b) for(int i = (int)(a); i >= (int)(b); i--)
#define PI 3.14159265
int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  //freopen("a.in", "r", stdin);
  //freopen("a.out", "w", stdout);
  int a,b,c;
  string s;
  cin>>a>>b>>c;
  cout<<((a*b)/2)<<"\n";
  return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

using namespace std;

int main(){
	int a,b,c,count = 0;
	scanf("%d %d %d",&a,&b,&c);
	for(int i = a; i <= b; i++){
		if(c%i == 0) count++;
	}
	printf("%d\n",count);
}



Measured memory_bytes: 2764
import sys
readline = sys.stdin.readline

A,B,C,D = readline().rstrip()

for i in range(2 ** 3):
  cal = bin(i)[2:].zfill(3).replace("0","-").replace("1","+")
  f = A + cal[0] + B + cal[1] + C + cal[2] + D
  if eval(f) == 7:
    print(f + "=7")
    break


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

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

            string str = Console.ReadLine();

            string[] str2 = str.Split(' ');

            int W = int.Parse(str2[0]);
            int H = int.Parse(str2[1]);
            int x = int.Parse(str2[2]);
            int y = int.Parse(str2[3]);
            int r = int.Parse(str2[4]);

            if (x < 0 || x > W || x+r > W || x-r < 0)
            {
                Console.WriteLine("No");
            }

            else if (y < 0 || y > H || y+r > H || y-r < 0)
            {
                Console.WriteLine("No");
            }

            else
            {
                Console.WriteLine("Yes");
            }

        }
    }
}



Measured memory_bytes: 17936
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
#define LL long long
const LL inf = 1e17;
int N;
vector<LL> A;
vector<LL> B;
vector<LL> rest;
LL need;
int ans = 0;
int main() {
	cin >> N;
	for (int i = 0; i < N; i++) {
		LL tmp;
		cin >> tmp;
		A.push_back(tmp);
	}
	for (int i = 0; i < N; i++) {
		LL tmp;
		cin >> tmp;
		B.push_back(tmp);
	}
	for (int i = 0; i < N; i++) {
		if (A[i] - B[i] < 0) need += B[i] - A[i], ans++;
		if (A[i] - B[i] > 0) rest.push_back(A[i] - B[i]);
	}
	if (need == 0) {
		cout << 0 << endl;
		return 0;
	}
	sort(rest.rbegin(), rest.rend());
	for (int i = 0; i < rest.size(); i++) {
		need -= rest[i];
		if (need <= 0) {
			cout << ans + i + 1 << endl;
			return 0;
		}
	}
	cout << -1 << endl;
	return 0;
}

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

int main() {
    int A, B, C;
    cin >> A >> B >> C;

    A *= 100;
    B *= 10;

    if((A + B + C)%4 == 0)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;

    return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<set>
#include<string>
#include<map>
#include<string.h>
#include<complex>
#include<math.h>
#include<queue>
#include <functional>
#include<time.h>
#include <stack>
#include<iomanip>
using namespace std;
#define rep(i,a,n) for(int i=(a);i<(n);i++)
#define ll long long
#define llint long long int
#define reverse(v)  reverse(v.begin(), v.end());
#define Yes(ans) if(ans)cout<<"Yes"<<endl; else cout<<"No"<<endl;
#define YES(ans) if(ans)cout<<"YES"<<endl; else cout<<"NO"<<endl;
#define hei(a) vector<a>
#define whei(a) vector<vector<a>>
#define UF  UnionFind 
#define Pint pair<int,int>
#define keta(a)  fixed << setprecision(a)
constexpr auto INF = 100000000000;
constexpr auto mod = 1000000007;
//辞書順はnext_permutation( begin( v ), end( v ) );やで！
struct edge { int to, cost; };

//sは初めの点、vは頂点size、dは最短距離を求める(初期化はINF),Gは有向グラフ
void dijkdtra(int s, int v, vector<int>& d, whei(edge)& G) {
	priority_queue<Pint, vector<Pint>, greater<Pint>> que;//firstが距離、secondが頂点
	d[s] = 0;//スタートの距離はもちろんzero
	que.push(Pint(0, s));
	while (!que.empty()) {
		Pint p = que.top();
		que.pop();
		int V = p.second;
		if (d[V] < p.first)continue;
		for (int i = 0; i < G[V].size(); i++) {
			edge e = G[V][i];
			if (d[e.to] > d[V] + e.cost) {
				d[e.to] = d[V] + e.cost;
				que.push(Pint(d[e.to], e.to));
			}
		}
	}
}

int main() {
	int n;
	cin >> n;
	map<llint, llint> S;
	hei(llint) a(n),t(n);
	rep(i, 0, n) {
		cin >>a[i];
		t[i] = a[i];
		S[a[i]]++;
	}
	ll ans = 0;
	sort(t.begin(), t.end());
	t.push_back(-1);
	llint x = 1;
	rep(i, 0, n) {
		if (t[i] == t[i + 1])x++;
		else {
			ans += x * (x - 1) / 2;
			x = 1;
		}
	}
	rep(i, 0, n) {
		cout << ans - S[a[i]] + 1 << endl;
	}
	return 0;
}

Measured memory_bytes: 14208
#include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;

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

    bool find(int x,int y){
        return root(x)==root(y);
    }

    int root(int x){
        return data[x]<0 ? x : data[x]=root(data[x]);
    }

    int size(int x){
        return -data[root(x)];
    }
};

int main(){
    int n,q;
    scanf("%d %d",&n,&q);
    UnionFind uf(n);
    for(int i=0;i<q;i++){
        int c,x,y;
        scanf("%d %d %d",&c,&x,&y);
        if(c!=0){
            if(uf.find(x,y)){
                printf("%d\n",1);
            }else{
                printf("%d\n",0);
            }
        }else{
            uf.unite(x,y);
        }
    }
    return 0;
}

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

int main() {

  int i=0;
  string ans;
  char s[11];
  ans="Yes";

  cin >> s;
  while(s[i]!='\0') {
    if(s[i]!=104) {
      ans="No";
      break;
    }
    i++;

    if(s[i]!=105) {
      ans="No";
      break;
    }
    i++;
  }
  
  cout << ans << endl;

  return 0;
}

Measured memory_bytes: 256
def resolve():
    '''
    code here
    '''
    N = int(input())
    ps = [int(item) for item in input().split()]


    temp_cnt = 0
    res = 0
    for i, item in enumerate(ps):
        if item == i+1:
            temp_cnt += 1
        else:
            if temp_cnt == 1:
                res += 1
                temp_cnt = 0

        if temp_cnt == 2:
            res += 1
            temp_cnt = 0
    else:
        if temp_cnt == 1:
            res += 1

    print(res)

if __name__ == "__main__":
    resolve()


Measured memory_bytes: 20048
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy, copy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
#import numpy as np
#from decimal import *

N = INT()
a = LIST()

A = Counter(a)
#print(A)
ans = 0
for x in A:
	if x > A[x]:
		ans += A[x]
	else:
		ans += A[x] - x

print(ans)



Measured memory_bytes: 19852
#include<cstdio>
#include<cmath>
#include<climits>
#include<cfloat>
#include<algorithm>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<utility>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<unordered_set>
#include<unordered_map>
#include<set>
#include<map>
#include<list>

using namespace std;
typedef long long ll;

#define in(s) cin >> s
#define out(s) cout << s << endl
#define rep(i,n) for(int i=0; i<n; i++)
#define rept(i,a,b) for(int i=a; i<b; i++)
#define pcnt __builtin_popcount
#define pcntll(x) __builtin_popcountll(x)
#define DMAX DBL_MAX;
#define IMIN INT_MIN;
#define IMAX INT_MAX;

const ll MOD = 1e9+7;
//const ll MOD = 998244353;
const ll MAX = 3e5+1;
const ll INF = 1e20;

signed main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);

    string N;
    in(N);
    int n = N.size();
    char c = N[n-1];
    if (c == '3') out("bon");
    else if (c == '0' || c == '1' || c == '6' || c == '8') out("pon");
    else out("hon");


    return 0;
}


Measured memory_bytes: 3596
#include<algorithm>
#include<bitset>
#include<cmath>
#include<complex>
#include<deque>
#include<functional>
#include<iomanip>
#include<iostream>
#include<iterator>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<vector>
#include<chrono>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define FOR(i,x,n) for(int i=x; i<(n); i++)
#define vint(a,n) vint a(n); rep(i, n) cin >> a[i];
#define vll(a,n) vll a(n); rep(i, n) cin >> a[i];
#define ALL(n) begin(n),end(n)
#define RALL(n) rbegin(n),rend(n)
#define MOD (1000000007)
#define INF (2e9)
#define INFL (2e18)

typedef long long ll;
typedef unsigned int ui;
typedef unsigned long long ull;
using vint=vector<int>;
using vll=vector<ll>;
using vbool=vector<bool>;
template<class T>using arr=vector<vector<T>>;
template<class T>int popcount(T &a){int c=0; rep(i, 8*(int)sizeof(a)){if((a>>i)&1) c++;} return c;}
template<class T>void pr(T x){cout << x << endl;}
template<class T>void prvec(vector<T>& a){rep(i, a.size()-1){cout << a[i] << " ";} pr(a[a.size()-1]);}
template<class T>void prarr(arr<T>& a){rep(i, a.size()) if(a[i].empty()) pr(""); else prvec(a[i]);}
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; }

int main()
{
    string s; cin >> s;
    int n = s.size();
    int k; cin >> k;

    vint a(n);
    rep(i, n){
        a[i] = (26 - (s[i] - 'a'))%26;
    }
    // prvec(a);

    // rep(i, n-1) a[i+1] += a[i];

    rep(i, n){
        if(a[i]<=k){
            s[i] = 'a';
            k -= a[i];
        }
    }

    k %= 26;
    s[n-1] += k;

    pr(s);
    return 0;}

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

using namespace std;
#define int long long

const int INF = 200000000007;


  
signed main(){
    int n,m,k,r;
    cin>>n>>m;
    vector<int> s[m];
    for(int i=0;i<m;i++){
        cin>>k;
        for(int j=0;j<k;j++){
            cin>>r;
            s[i].push_back(r);
        }
    }
    int p[m],l=0;
    for(int i=0;i<m;i++)cin>>p[i];
    int ans=0,c=1;
    for(int i=0;i<n;i++)c*=2;
  
    for(int i=0;i<c;i++){
       
        for(int j=0;j<m;j++){
            l=0;
            for(int e=0;e<s[j].size();e++){
            if(i&(1<<(s[j][e]-1)))l++;
            }
            
            if(!p[j]==l%2)break;
            if(j==m-1)ans++;
        }
        
    }
    cout<<ans;
   
    

    
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
template<class S,class T> ostream& operator<<(ostream& o,const pair<S,T> &p){return o<<"("<<p.fs<<","<<p.sc<<")";}
template<class T> ostream& operator<<(ostream& o,const vector<T> &vc){o<<"sz = "<<vc.size()<<endl<<"[";for(const T& v:vc) o<<v<<",";o<<"]";return o;}
int N;
double inf=1e18;
double x[1002],y[1002],r[1002];
double d[1002];
bool used[1002];
double yosupot(double x,double y){return sqrt(x*x+y*y);}
int main(){
	cin>>x[0]>>y[0]>>x[1]>>y[1];
	cin>>N;
	rep(i,N){
		cin>>x[i+2]>>y[i+2]>>r[i+2];
	}
	N+=2;
	rep(i,N) d[i]=inf;
	d[0]=0;
	rep(i,N){
		int v=-1;
		rep(j,N) if(!used[j]&&(v==-1||d[v]>d[j])) v=j;
		used[v]=1;
		rep(u,N){
			double dist=max(0.0,yosupot(x[v]-x[u],y[v]-y[u])-r[v]-r[u]);
			chmin(d[u],d[v]+dist);
		}
	}
	printf("%.12f\n",d[1]);
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define INF 1e8;
typedef long long ll;
ll mod = 998244353;
long long fast_exp(long long a, long long b)
{
    if(b == 0)
	   return 1;
    else
    {
	   long long res = 1;
	   res = fast_exp(a,b/2);
	   res = (res*res)%mod;
	   if(b%2 == 1)
		  res = (res*a)%mod;
	   return res;
 
    }
}
const ll N = 1e6;




int main()
{
	//ios_base::sync_with_stdio(false);
	//cin.tie(NULL);
	int n;
	cin>>n;
	int b[n+1];
	for(int i = 1; i<n ; i++)
		cin>>b[i];
	int sum = 0;
	sum += b[1];
	sum +=b[n-1];
	for(int i = 2; i<n ; i++)
	{
		sum += min(b[i-1],b[i]);
	}

	cout<<sum<<endl;

	return 0;
	
}

Measured memory_bytes: 256
open Core

let n = Scanf.scanf "%d" Fn.id

let a = List.init n (fun _ -> Scanf.scanf " %d" Fn.id)

let rec count i = if i mod 2 = 0 then 1 + count (i / 2) else 0

let m = a |> List.map ~f:count |> List.fold ~f:Int.min ~init:Int.max_value

let () = Printf.printf "%d\n" m


Measured memory_bytes: 13584
#include <stdio.h>

int main(int argc, char const *argv[])
{
	int a, b;

	scanf("%d %d", &a, &b);

	if(a<b) 
		printf("a < b\n");
	else if(a>b)
		printf("a > b\n");
	else
		printf("a == b\n");

	return 0;
}


Measured memory_bytes: 2140
#include <iostream> 
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <queue>
#include <set>
#include <stack>
#include <cstring>

#define mp make_pair
#define s second
#define f first
#define ll long long
using namespace std;
int n, m = 3, mat[100003][3];
ll dp[100003][3], ans;

int main () {
ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
	
	cin >> n;
	
	for (int i=0; i<n; i++) {
		for (int j=0; j<m; j++) {
			cin >> mat[i][j];
			if (i == 0) dp[i][j] = mat[i][j];
			ans = max(ans, dp[i][j]);
		}
	}
	
	for (int i=1; i<n; i++) {
		for (int j=0; j<m; j++) {
			for (int k=0; k<m; k++) {
				if (k == j) continue;
				dp[i][j] = max(dp[i][j], dp[i-1][k] + mat[i][j]);
			}
		ans = max(ans, dp[i][j]);
		}
	}
	
	cout << ans;
return 0;	
}




Measured memory_bytes: 3840
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>

using namespace std;

int main(){
	long long a[3];
	cin >> a[0] >> a[1] >> a[2];
	if(a[0]%2==0||a[1]%2==0||a[2]%2==0){
		cout << 0 << endl;
	}else{
		sort(a,a+3);
		cout << a[0]*a[1] <<endl;
	}
	return 0;
}

Measured memory_bytes: 256
n,q=map(int,input().split())
s=input()
a=[0]*(n)
for i in range(n-1):
  a[i+1]=a[i]
  if s[i]=='A' and s[i+1]=='C':
    a[i+1]+=1
for i in range(q):
  l,r=map(int,input().split())
  print(a[r-1]-a[l-1])

Measured memory_bytes: 6132
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const double pi=3.141592653589793;
typedef unsigned long long ull;
typedef long double ldouble;
const ll INF=1e18;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
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; }

// union by size + path having
class UnionFind {
public:

    //素集合の要素の親（木構造の根）を配列*3で保持している．初期状態では頂点間の辺は存在せず，孤立した状態のため，自分自身を根として初期化している（par: parent の略）．
    vector <ll> par;

    // 各集合（木）の大きさ．根をたどるとその木の大きさが返されるように実装されている．この配列を用意しておくとある頂点の連結成分の大きさを簡単に求められる
    vector <ll> siz;

    // Constructor
    UnionFind(ll sz_): par(sz_), siz(sz_, 1LL) {
        for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
    }
    void init(ll sz_) {
        par.resize(sz_);
        siz.assign(sz_, 1LL);  // resize だとなぜか初期化されなかった
        for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
    }

    // Member Function
    // Find
    ll root(ll x) { // 根の検索
        while (par[x] != x) {
            x = par[x] = par[par[x]]; // x の親の親を x の親とする
        }
        return x;
    }

    // Union(Unite, Merge)
    bool merge(ll x, ll y) {
        x = root(x);
        y = root(y);
        if (x == y) return false;
        // merge technique（データ構造をマージするテク．小を大にくっつける）
        if (siz[x] < siz[y]) swap(x, y);
        siz[x] += siz[y];
        par[y] = x;
        return true;
    }

    bool issame(ll x, ll y) { // 連結判定
        return root(x) == root(y);
    }

    ll size(ll x) { // 素集合のサイズ
        return siz[root(x)];
    }
};
struct edge {int u, v, cost;};

bool comp(const edge& e1, const edge& e2) {
    return e1.cost < e2.cost;
}


// ------------------------------------------------------------
// クラスカル法 O(|E|log|V|) 連結成分に属しているかどうかをUnionFindで検索
// MAX_V MAX_E　を設定し直すこと
// ------------------------------------------------------------



int main(){
    int V, E, s, t, c;
    cin >> V >> E;
    vector<edge> es(E);
    rep(i, E){
        cin >> s >> t >> c;
        s--; t--;
        es.at(i) = (edge){s, t, c};
    }
    UnionFind uf(V);
    sort(es.begin(), es.begin() + E, comp); 
    int mst_sum = 0;
    vector<edge> ms;
    rep(i, E){
        edge e = es[i];
        if(!uf.issame(e.u, e.v)){
            uf.merge(e.u, e.v);
            ms.push_back(e);
            mst_sum += e.cost;
        }
    }
    int cnt = 0, res_sum = 0;
    rep(i, V-1){
        uf.init(V);
        int sum = 0;
        for(auto& e : es){
            if(!uf.issame(e.u, e.v) && (ms[i].u != e.u || ms[i].v != e.v)){
                uf.merge(e.u, e.v);
                sum += e.cost;
            }
        }
        if(sum != mst_sum){
            cnt++;
            res_sum += ms[i].cost;
        }
    }
    cout << cnt << " " << res_sum << endl;
}


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

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define Max(x,y,z) max(x,max(y,z))
#define Min(x,y,z) min(x,min(y,z))
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define trace1(x)                cerr<<#x<<": "<<x<<endl
#define trace2(x, y)             cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define trace3(x, y, z)          cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define trace4(a, b, c, d)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define trace5(a, b, c, d, e)    cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
#define trace6(a, b, c, d, e, f) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<long long, long long> pll;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef pair<ll,ll> ii;
typedef vector<pair<ll,ll> > vii;
typedef vector<long long> vll;
typedef vector<vll> vvll;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<pair<long long,long long> > vpll;
typedef vector<bool> vb;
typedef vector<vb> vvb;

#define PI 3.141592653589793
#define mod 1000000007
#define M 1000006
# define N 100005
template<typename T> T gcd(T a,T b) { if(a==0) return b; return gcd(b%a,a); }
template<typename T> T pow(T a,T b, ll m){T ans=1; while(b>0){ if(b%2==1) ans=(ans*a)%m; b/=2; a=(a*a)%m; } return ans%m; }

ll cf[N];
bool vis[N];
void sieve(int n)
{
	 vis[0]=1,vis[1]=1;
	for(int i=2;i<n;i++)
	{
		if(!vis[i])
		{
			for(int j=2*i;j<n;j+=i)
				vis[j]=1;
		}
	}
}

int main()
{
	IOS;
	int q;
	cin >> q;
	memset(vis,false,sizeof vis);
	sieve(N);
	ll ans=0;
	for(int i=0;i<N;i++)
	{
		if(!vis[i] && !vis[(i+1)/2])
			ans++;
		cf[i]=ans;
	}
	int l,r;
	while(q--)
	{
		cin >> l >> r;
		cout << cf[r]-cf[l-1]<<"\n";
	}
	
}

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

#define int long long

int32_t main(){
	int n , m , k ;
	cin >> n >> m >> k;
	int a[n+1] = {} ;
	for(int i = 0 ; i < n ; i++){
		cin >> a[i+1] ;
	}
	int b[m+1] = {} ;
	for(int i = 0 ; i < m ; i++){
		cin >> b[i+1] ;
	}
	for(int i = 1 ; i < m ; i++){
		b[i] += b[i-1] ;
	}
	int sum = 0 ;
	int val = 0 ;
	for(int i = 0 ; i <= n ; i++){
		sum += a[i] ;
		int rem = k - sum ;
		if(rem < 0) break ;
		int lo = 1 , hi = m ;
		int ans = 0 ;
		while(lo <= hi){
			int mid = (lo + hi) / 2 ;
			if(b[mid] <= rem){
				ans = mid ;
				lo = mid + 1 ;
			} else {
				hi = mid - 1 ;
			}
		}
		val = max(val , i + ans) ;
	}
	cout << val ; 
	return 0 ;
}



Measured memory_bytes: 6752
//#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
const long long INF= 1e+18+1;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll> >vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
const ll MOD=1000000007LL;
string abc="abcdefghijklmnopqrstuvwxyz";
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int main(){
  string s;cin>>s;
  ll ans=INF;
  rep(i,26){
    char c=abc[i];
    ll part=0;
    ll count=0;
    rep(j,s.size()){
      if(s[j]==c)count=0;
      else count++;
      part=max(part,count);
    }
    ans=min(ans,part);
  }
  cout<<ans<<endl;
}
    

Measured memory_bytes: 256
#include <vector>
#include <map>
#include <set>
#include <sstream>
#include <algorithm>
#include <bitset>
#include <utility>
#include <iostream>
#include <cmath>
#include <deque>
#include <string>
#include <time.h>
#include <stack>

#define pii pair<ll,ll>
#define X first
#define Y second
#define mp make_pair

typedef int ll;
using namespace std;
#define MAXN 30000
#define MOD 1000000007
#define N 1048576
ll n, x, k, z, m, pos, q, ans_v, y;


ll b[200500];
ll a[200500];
vector<ll> prs;
bool is_p(ll x) {
    for (int i = 2; i < x; i++) {
        if (x % i == 0) {
            return false;
        }
    }
    return true;
}

set<ll> f;
int main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    /*for (int i = 2; i <= 1000; i++) {
        if (is_p(i)) {
            prs.push_back(i);
        }
    }
    cout << prs.size() << endl;
    cin >> n;
    for (int i = 0; i < 200000; i++) {

    }*/
    cin >> n >> m;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    ll x = 0;
    ll p = 1;
    ll ans1 = 0;
    for (int i = 0; i + 1 < n; i++) {
        if (a[i+1] > a[i]) {
            p++;
        } else {
            if (p >= m) {
                ans1++;
            }
            p = 1;
        }
    }
    if (p >= m) {
        ans1++;
    }
    //cout << ans1 << endl;
    for (int i = 1; i < m; i++) {
        f.insert(a[i]);
    }
    ll ans = 1;
    for (int i = m; i < n; i++) {
        int b = *(f.begin());
        int c = *(prev(f.end()));
        if (b >= a[i-m] && c <= a[i]) {
        } else {
            ans++;
        }
        f.erase(a[i-m+1]);
        f.insert(a[i]);
    }
    cout << ans - max(0, ans1 - 1) << endl;

    return 0;
}

Measured memory_bytes: 10368
gets
colors_map = gets.split.map { |a| [a.to_i / 400, 8].min }.each_with_object(Array.new(9, 0)) do |rank, arr|
  if rank == 8
    arr[rank] += 1
  else
    arr[rank] = 1
  end
end

max = colors_map.inject(:+)
min = [colors_map[0..7].inject(:+), 1].max
puts "#{min} #{max}"


Measured memory_bytes: 1788
#include <iostream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main(){
 
  stack <int> sa;
  string m;
  int cnt=0,result=0,high=0,tmp=0,h[20000],i;
  vector <int> amo;
 
  cin>>m;
  for(i=m.size()-1;i!=-1;i--){
    if(m[i]=='\\') tmp++;
    if(m[i]=='/') tmp--;
    high=max(high,tmp);
    h[i]=high;
  }
 
  for(i=0;i<m.size();i++){
    if(m[i]=='\\'){
      sa.push(i);
    } else if(m[i]=='/' && !sa.empty()) {
      cnt+=i-sa.top();
      sa.pop();
      if(sa.empty()){
        amo.push_back(cnt);
        result+=cnt;
        cnt=0;
      }
    }
    if(i<m.size()-1) if(h[i+1]-h[i]) sa.pop();
  }
  if(amo.empty()) cout<<"0"<<endl<<"0"<<endl;
  else{
    cout<<result<<endl<<amo.size()<<" ";
    for(i=0;i<amo.size()-1;i++) cout<<amo[i]<<" ";
    cout<<amo[amo.size()-1]<<endl;
  }
  return 0;
 
}


Measured memory_bytes: 3336
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<stack>
using namespace std;
typedef long long ll;
ll MOD = 1e9+7;
#define rep(i,n) for(int i = 0; i < (n); ++i)
int main() {
    int a, b, c;
    cin >> a >> b >> c;
    if ( a == b + c || b == a + c || c == a + b ) cout << "Yes" << endl;
    else                                          cout << "No" << endl;
    return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(int argc, const char * argv[]) {
    int a,b;
    char op;
    while(1){
    scanf("%d %c %d",&a,&op,&b);
        if(op=='+')
            printf("%d\n",a+b);
        else if(op=='-')
            printf("%d\n",a-b);
        else if(op=='*')
            printf("%d\n",a*b);
        else if(op=='/')
            printf("%d\n",a/b);
        else if(op=='?')
            break;
        
    }

    return 0;
}

Measured memory_bytes: 600
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <map>
#include <list>
#include <stack>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <queue>
#define pye cout << "yes" << endl
#define pno cout << "no" << endl
#define pYe cout << "Yes" << endl
#define pNo cout << "No" << endl
#define pYE cout << "YES" << endl
#define pNO cout << "NO" << endl
#define prin(num) cout << num << endl
#define max(a, b) ((a)>(b) ? (a):(b))
#define min(a, b) ((a)<(b) ? (a):(b))
#define INF 100000000000
#define MOD 1000000007LL
#define MAX 200005
#define NIL -1
#define WHITE 0
#define BLACK 1
#define mp make_pair
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef map<ll, ll> Map;
typedef pair<ll, P> Edge;


int main() {
    ll N, x;
    cin >> N >> x;
    ll i, a[101];
    for(i=1; i<=N; i++) {
        cin >> a[i];
    }
    sort(a+1, a+N+1);
    ll s[101]={0};
    
    for(i=1; i<=N; i++) {
        s[i]=s[i-1]+a[i];
    }
    
    for(i=1; i<=N; i++) {
        if(x==s[i]) {
            prin(i);
            return 0;
        }else if(x<s[i] || i==N) {
            prin(i-1);
            return 0;
        }
    }
    
}


Measured memory_bytes: 256
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <string>
#include <utility>

using namespace std;

int main() {
int a,b;
char op;
cin >> a >> op >> b;
if(op=='+'){
  cout << a+b << endl;
}
else{
  cout << a-b << endl;
}

  return 0;
}


Measured memory_bytes: 256
n, m = map(int, input().split())
a_list = list(map(int, input().split()))
a_list = sorted(a_list)

cnt = 0

for i in range(n):
    if a_list[i] >= sum(a_list)/(4*m):
        cnt += 1

if cnt >= m:
    print('Yes')
else:
    print('No')

Measured memory_bytes: 9004
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int a,b,c;
	cin>>a>>b>>c;
	int d=0;
	d=max(a,max(b,c));
	if(d==a+b)
	cout<<"Yes"<<endl;
	else if(d==b+c)
	cout<<"Yes"<<endl;
		else if(d==a+c)
	cout<<"Yes"<<endl;
	else
	cout<<"No"<<endl;
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(void){
    int K;
    string S;
    cin >> K >> S;
    int N=S.size();
    if(N<=K){
        cout << S << endl;
    }else{
        cout << S.substr(0,K)+"..." << endl;
    }
}

Measured memory_bytes: 3632
#include "bits/stdc++.h"
using namespace std;

//#define int long long
#define DBG 1
#define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define rep(idx,a,b) for(int idx=(a);idx<(b);idx++)
#define rrep(idx,a,b) for(int idx=(b)-1;idx>=(a);idx--)
#define each(it,c) for(auto it=(c).begin();it!=(c).end();it++)
#define all(c) c.begin(),c.end()
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9 + 7);

vector<string> v;
int idx = 0;
int solve() {
	char b = v[idx].back();
	if (b == '+') {
		int ret = 0;
		int i = idx;
		idx++;
		while (v[i].size() < v[idx].size()) {
			ret += solve();
			idx++;
		}
		idx--;
		return ret;
	}
	else if (b == '*') {
		int ret = 1;
		int i = idx;
		idx++;
		while (v[i].size() < v[idx].size()) {
			ret *= solve();
			idx++;
		}
		idx--;
		return ret;
	}
	else {
		return b - '0';
	}
}

signed main() {
	for (int n; cin >> n&&n;) {
		idx = 0;
		v = vector<string>();
		rep(i, 0, n) {
			string s; cin >> s;
			v.emplace_back(s);
		}
		v.emplace_back("0");
		cout << solve() << endl;
	}
	return 0;
}

Measured memory_bytes: 3204
#include<bits/stdc++.h>
#include<iostream>
using namespace std;
int a[100005],b[100005];
int main()
{
	ios::sync_with_stdio(0);cin.tie(0);
	int n,m;
	cin>>n>>m;
	long long maxn=-1,minn=1e5+1,sum;
	for(int i=0;i<m;i++)
	{
		cin>>a[i]>>b[i];
		if(a[i]>maxn)maxn=a[i];
		if(b[i]<minn)minn=b[i];
	}
	sum=minn-maxn+1;
	if(sum<=0)cout<<0;
	else cout<<sum;
}

Measured memory_bytes: 1024
N = int(input())
A = [int(x) for x in input().split()]
B = [0] * (N + 1)
for i in range(N):
  B[A[i]] = i + 1
L = list(range(N + 2))
R = list(range(N + 2))
cnt = 0
for i in range(N, 0, -1):
  l = L[B[i]]
  r = R[B[i]]
  cnt += i * (B[i] - l + 1) * (r - B[i] + 1)
  L[r + 1] = l
  R[l - 1] = r
print(cnt)

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

int main(){
    int R,G,B,N,count=0;
    cin>>R>>G>>B>>N;
    for(int i=0;i<=N/R;i++){
        for(int j=0;j<=N/G;j++){
            int b=N-(i*R+j*G);
            if(b<0){
                break;
            }
            else if(b%B==0){
                 count++;
             }
            
        }
    }
cout<<count<<endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main() {
  int a,b,c;
  cin >> a >> b >> c;
  if(a + b == c || b + c == a || c + a == b) {
    cout << "Yes" << endl;
  }else {
    cout << "No" << endl;
  }
}

Measured memory_bytes: 256
#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <set>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <utility>
#define REP(i,A) for(int i=0;i<A;i++)

using namespace std;
using ll = long long int;
using ld = long double;
using vl = vector<ll>;
using vd = vector<ld>;
using pi = pair<int, int>;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);

	int H, W;
	cin >> H >> W;

	queue<pi> a;
	int flag[1002][1002];

	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) {
			char x; cin >> x;
			if (x == '#') {
				a.push(make_pair(i, j));
				flag[i][j] = 0;
			}else{
              flag[i][j]=-1;
            }
		}
	}

	while (!a.empty()) {
		int i = a.front().first;
		int j = a.front().second;
		a.pop();
		if (i != 1) {
			if (flag[i - 1][j] == -1) {
				flag[i - 1][j] = flag[i][j] + 1;
				a.push(make_pair(i - 1, j));
			}
		}
		if (i != H) {
			if (flag[i + 1][j] == -1) {
				flag[i + 1][j] = flag[i][j] + 1;
				a.push(make_pair(i + 1, j));
			}
		}
		if (j != 1) {
			if (flag[i][j-1] == -1) {
				flag[i][j-1] = flag[i][j] + 1;
				a.push(make_pair(i, j-1));
			}
		}
		if (j != W) {
			if (flag[i][j+1] == -1) {
				flag[i][j+1] = flag[i][j] + 1;
				a.push(make_pair(i, j+1));
			}
		}
	}
	int cnt = 0;
	for (int i = 1; i <= H; i++) {
		for (int j = 1; j <= W; j++) {
			cnt = max(cnt, flag[i][j]);
			
		}
	}

	cout << cnt;
	
return 0;
}

Measured memory_bytes: 12432
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define ALL(v) v.begin(),v.end()
using ll = long long;
using pii = pair<int,int>;
using vi = vector<int>;
using vs = vector<string>;
using vb = vector<bool>;
using vll = vector<long long>;
using vpii = vector<pair<int,int>>;
using vivi = vector<vector<int>>;
using vbvb = vector<vector<bool>>;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
const int mod = 1000000007;
const int inf = 1001001001;



int main(void) {
  int n;
  cin >> n;
  vi a(n);
  
  rep(i,n) cin >> a[i];
  int cnt =0;
  int cn = 0;
  rep(i,n){
    if(i+1==a[i]) {
      cnt++; 
    }
  }
  rep(i,n-1){
    if(a[i]==i+1 && a[i+1]==i+2){
      cnt--;
      i++;
    }
  }
  cout << cnt << endl;
   
}




Measured memory_bytes: 640
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<math.h>
#include<map>
#include<iomanip>
#include<numeric>
#define rep(i,n) for(int i=0;i<n;++i)
#define mod 1000000007
using namespace std;
int main(){
    int n;  cin>>n;
    bool b[52];
    vector<int> num(n);
    vector<char> kind(n);
    rep(i,52){
        if(i<n) cin>>kind[i]>>num[i];

        b[i]=false;
    }

    rep(i,n){
        if(kind[i]=='S')    b[num[i]-1]=true;
        else if(kind[i]=='H')   b[num[i]+12]=true;
        else if(kind[i]=='C')   b[num[i]+25]=true;
        else if(kind[i]=='D')   b[num[i]+38]=true;
    }

    
    rep(i,52){
        if(!b[i]){
            if(i<13)    cout<<"S "<<(i%13)+1<<endl;
            else if(i>=13&&i<26)    cout<<"H "<<(i%13)+1<<endl;
            else if(i>=26&&i<39)    cout<<"C "<<(i%13)+1<<endl;
            else if(i>=39)    cout<<"D "<<(i%13)+1<<endl;
        }
    }
}


Measured memory_bytes: 3136
#include<iostream>
#include<string.h>
#include<ctype.h>
#include<string>
#include<math.h>
#define pi 3.141592653589
#include<iomanip>
using namespace std;
#include<algorithm>
#define rep(i,a,n) for(int i=a;i<n;i++)
 
 
 
int main(){
    
    int a,b,c;
    
    cin>>a>>b>>c;
    rep(i,1,100){
        if((a*i)%b==c){
            cout<<"YES"<<endl;
            return 0;
        }
    }
    cout<<"NO"<<endl;
    
    return 0;
}

Measured memory_bytes: 256
package main

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

var stdin = bufio.NewScanner(os.Stdin)

func main() {
	stdin.Split(bufio.ScanWords)
	var S string

	S = nextStr()
	r := regexp.MustCompile(`(hi)+`)
	if r.MatchString(S) {
		if len(r.ReplaceAll([]byte(S), []byte(""))) == 0 {
			fmt.Println("Yes")
			os.Exit(0)
		}
	}
	fmt.Println("No")

}

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

func nextStr() string {
	stdin.Scan()
	i := stdin.Text()
	// if err != nil {
	// 	panic(err)
	// }
	return i
}


Measured memory_bytes: 640
#include <stdio.h>
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 1000000000

template <typename T,typename U>
struct compressor{
	vector<pair<T,U>> v;
	void add(T x,U y){
		v.emplace_back(x,y);
	}
	
	void compress(){
		
		sort(v.begin(),v.end());
		
		vector<pair<T,U>> t;
		rep(i,v.size()){
			if(t.size()!=0 && t.back().first == v[i].first){
				t.back().second = func(t.back().second,v[i].second);
			}
			else{
				t.push_back(v[i]);
			}
		}
		swap(v,t);
		
	}

	U func(U a,U b){
		return a+b;
	}

	int size(){
		return v.size();
	}
	
	U get(int p){
		return v[p].second;
	}
	
	U operator[] (T &x){
		auto it = lower_bound(v.begin(),v.end(),make_pair(x,0));
		if(it==v.end() || it->first!=x){
			if(it!=v.begin()){
				it--;
			}
		}
		if(it==v.end() || it->first!=x){
			return 0;
		}
		else return it->second;
	}
};

bool f = false;
compressor<pair<string,string>,int> get(string S){
	int N = S.size();
	compressor<pair<string,string>,int> C;
	for(int i=0;i<(1<<N);i++){
		string s="",t="";
		for(int j=0;j<N;j++){
			if((i>>j)&1)s+=S[j];
			else t+=S[j];
		}
		reverse(t.begin(),t.end());
		if(f)swap(s,t);
		C.add(make_pair(s,t),1);
	}
	f=true;
	C.compress();
	return C;
}
 
int main(){
	
	int N;
	cin>>N;
	
	string S;
	cin>>S;
	
	compressor<pair<string,string>,int> C0 = get(S.substr(0,N)),C1 = get(S.substr(N));
	
	long long ans = 0;
 
	for(auto a:C0.v){
		ans += (long long)a.second * C1[a.first];
	}
	
	cout<<ans<<endl;
	
	return 0;
}

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

int main() {
  int A,B,C;
  
  cin >> A >> B >> C;
  
  if(A == B && B == C ){
    cout << "No" << endl;
  }
  
  else if(A != B && B != C && A != C){
    cout << "No" <<endl;
  }
  
  else{
  cout << "Yes" << endl;
  }
    
  
 
  return 0;
}

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

Measured memory_bytes: 596
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>
#include <fstream>
#include <bitset>
#include <time.h>
#include <tuple>
#include <iomanip>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef vector<ll> V;
typedef complex<double> Point;

#define PI acos(-1.0)
#define EPS 1e-10
const ll INF = 1e12;
const ll MOD = 1e9 + 7;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,N) for(int i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()) )
#define fi first
#define se second
#define N_SIZE (1LL << 20)
#define NIL -1

ll sq(ll num) { return num*num; }
ll mod_pow(ll x, ll n) {
	if (n == 0)return 1;
	if (n == 1)return x%MOD;
	ll res = sq(mod_pow(x, n / 2));
	res %= MOD;
	if (n % 2 == 1) {
		res *= x;
		res %= MOD;
	}
	return res;
}
ll mod_add(ll a, ll b) { return (a + b) % MOD; }
ll mod_sub(ll a, ll b) { return (a - b + MOD) % MOD; }
ll mod_mul(ll a, ll b) { return a*b % MOD; }

ll n;
ll a[100100];
ll dp[2][1001000];
map<ll, ll> id;
bool used[1001000];

vector<int> prime;
bool is_prime[1001000];

int sieve(int n) {//n以下の素数の数を返す
	int p = 0;
	for (int i = 0; i <= n; i++)is_prime[i] = 1;
	is_prime[0] = is_prime[1] = 0;
	for (int i = 2; i <= n; i++) {
		if (is_prime[i]) {
			prime.push_back(i);
			id[i] = prime.size() - 1;
			for (int j = 2 * i; j <= n; j += i)is_prime[j] = 0;
		}
	}
	return p;
}

int main() {
	sieve(1001000);
	cin >> n;
	rep(i, n)cin >> a[i];
	if (!is_prime[a[0]])cout << 0 << endl;
	else {
		dp[0][0] = 1;
		FOR(i, 1, n) {
			if (is_prime[a[i]]) {
				if (i > 1 && a[i] > a[i - 2])dp[0][i] = (dp[0][i] + dp[1][i - 1]) % MOD;
				if (a[i] > a[i - 1])dp[0][i] = (dp[0][i] + dp[0][i - 1]) % MOD;
				if (is_prime[a[i - 1]])dp[1][i] = (dp[1][i] + dp[0][i - 1]) % MOD;
			}
			else {
				if (is_prime[a[i - 1]])dp[1][i] = (dp[1][i] + dp[0][i - 1]) % MOD;
			}
		}
		cout << mod_add(dp[0][n - 1], dp[1][n - 1]) << endl;
	}
}


Measured memory_bytes: 11536
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define IO std::ios::sync_with_stdio(false);std::cin.tie(0)
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define per(i,a,b) for(int i=a;i>=b;i--)
#define mset(s,_) memset(s,_,sizeof s)
#define fi first
#define se second
#define pb push_back
#define pii pair<int,int>
#define mk make_pair
using namespace std;
int a[200010];
int main(){
	ll a;
	long double b;
	cin>>a>>b;
	cout<<(long long)(a*b)<<'\n';
}



Measured memory_bytes: 3724