akhauriyash/Code-Regression huggingface dataset:
/*
confirm 0LL and 1LL
confirm cornercases such as 0
confirm times of cin < 10^6
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Vec = vector<ll>;
using VecP = vector<P>;
using VecB = vector<bool>;
using VecC = vector<char>;
using VecS = vector<string>;
using VecVec = vector<Vec>;
using Tree = vector<VecP>;
#define REP(i, m, n) for(ll (i) = (m); (i) < (n); ++(i))
#define REPN(i, m, n) for(ll (i) = (m); (i) <= (n); ++(i))
#define REPR(i, m, n) for(ll (i) = (m)-1; (i) >= (n); --(i))
#define REPNR(i, m, n) for(ll (i) = (m); (i) >= (n); --(i))
#define rep(i, n) REP(i, 0, n)
#define repn(i, n) REPN(i, 1, n)
#define repr(i, n) REPR(i, n, 0)
#define repnr(i, n) REPNR(i, n, 1)
#define all(s) (s).begin(), (s).end()
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fs first
#define sc second
template <typename T>
bool chmax(T &a, const T& b){if(a < b){a = b; return true;} return false;}
template <typename T>
bool chmin(T &a, const T& b){if(a > b){a = b; return true;} return false;}
template <typename T>
void co(const T n){cout << n << endl;}
template <typename T>
void cosp(const T n){cout << n << ' ';}
void coVec(const Vec &v){for(ll i : v) cosp(i); cout << endl;}
void sonic(){ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);}
void setp(const ll n){cout << fixed << setprecision(n);}
const ll INF = 1e9+1;
const ll LINF = 1e18+1;
const ll MOD = 1e9+7;
//const ll MOD = 998244353;
const double PI = acos(-1);
const double EPS = 1e-9;

ll gcd(ll a, ll b){
	if(!b) return a;
	return gcd(b, a%b);
}

int main(void){
	ll n, m;
	cin >> n >> m;
	Vec a(n);
	rep(i, n) cin >> a[i];

	ll t = 1;
	rep(i, n){
		t = t/gcd(t, a[i])*a[i];
		if(t/2 > m){
			co(0);
			return 0;
		}
	}
	rep(i, n){
		if(t/a[i]%2 == 0){
			co(0);
			return 0;
		}
	}

	co(m/(t/2)-m/t);

	return 0;
}


Measured memory_bytes: 1024
#include<stdio.h>

int main(){
	int a,b;
	int n;
	int ans=0;
	scanf("%d",&n);
	for(int i=1;i<=9;i++){
		for(int j=0;j<=9;j++){
			if(i*j==n){
				ans=1;
			}
		}
		
	}
if(ans){
	printf("Yes\n");
}else{
	printf("No\n");
}
}


Measured memory_bytes: 128
#include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define endl '\n'
#define Endl '\n'
#define fi first
#define ii pair<int,int>
#define iil pair<ll,ll>
#define se second
#define ld long double
#define mod 1000000007
#define popcount __builtin_popcountll
#define x0 zxcxzcsacasd
#define x1 ghfghujfgfg
#define y0 olkjhdnncvcv
#define y1 bhvgrewm345345435
#define debug(x) std::cerr<<#x<<": "<<(x)<<'\n'
#define all(x) x.begin(), x.end()
using namespace std;
int n, q;
struct Segment_tree{
	int tree[1<<20];
	int lazy[1<<20];
	void build(int pos, int l, int r){
		if(l == r){
			tree[pos] = 1;
			return;
		}
		int md = (l + r)/2;
		build(2*pos, l, md);
		build(2*pos + 1, md + 1, r);
		tree[pos] = 1;
	}
	void push(int pos, int l, int r){
		if(lazy[pos]==0)return;
		tree[pos] = max(tree[pos], lazy[pos]);
		if(l!=r){
			lazy[2 * pos] = max(lazy[2 * pos], lazy[pos]);
			lazy[2 * pos + 1] = max(lazy[2 * pos + 1], lazy[pos]);
		}
		lazy[pos] = 0;
	}
	void update(int pos, int l, int r, int s, int e, int v){
		if(l > e || s > r)return;
		push(pos, l, r);
		if(l >= s && r <= e){
			tree[pos] = max(tree[pos], v);
			if(l!=r){
				lazy[2 * pos] = max(lazy[2 * pos], v);
				lazy[2 * pos + 1] = max(lazy[2 * pos + 1], v);
			}
			return;
		}
		int md = (l + r)/2;
		update(2*pos, l, md, s, e, v);
		update(2*pos + 1, md + 1, r, s, e, v);
		tree[pos] = max(tree[2*pos], tree[2*pos + 1]);
	}
	int query(int pos, int l, int r, int tar){
		push(pos, l, r);
		if(l == r && l == tar){
			return tree[pos];
		}
		int md = (l + r)/2;
		if(tar >= l && tar <= md)return query(2 * pos, l, md, tar);
		else return query(2 * pos + 1, md + 1, r, tar);
	}
}Xs, Ys;
int main(){
	scanf("%d%d", &n, &q);
	ll black = 1ll * (n - 2) * (n - 2);
	Xs.build(1, 1, n);
	Ys.build(1, 1, n);
	while(q--){
		int t, x;
		scanf("%d%d", &t, &x);
		x = n - x + 1;
		if(t == 1){
			int idx = Ys.query(1, 1, n, x);
			int diff = n - idx - 1;
			black-=diff;
			Xs.update(1, 1, n, idx, n, x);
			continue;
		}
		int idx = Xs.query(1, 1, n, x);
		int diff = n - idx - 1;
		black-=diff;
		Ys.update(1, 1, n, idx, n, x);
	}
	cout<<black<<endl;
}


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

#define ln '\n'
#define REP(i, n) for(int i = 0; i < (int)(n); ++i)
#define FOR(i, a, b) for(int i = (a); i <= (int)(b); ++i)
#define FORR(i, a, b) for(int i = (a); i >= (int)(b); --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;
typedef vector<P> VP;
typedef vector<PL> VPL;
typedef vector<string> VS;

int coin_cnt(int n, int k) {
    int res = 0;
    while(n < k) {
        n *= 2;
        res++;
    }
    return res;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, k;
    cin >> n >> k;
    double ans = 0;
    FOR(i, 1, n) {
        int temp = (int)pow(2, coin_cnt(i, k));
        ans += 1 / (double)temp;
    }
    ans /= n;
    cout << fixed << setprecision(10) << ans << ln;
    return 0;
}


Measured memory_bytes: 256
/*
 * @Author: Kaizyn
 * @Date: 2020-03-12 10:12:16
 * @LastEditors: Kaizyn
 * @LastEditTime: 2020-03-12 10:32:54
 * @FilePath: \Code\atcoder\abc158E_4.cpp
 */
#include <bits/stdc++.h>

// #define DEBUG

using namespace std;

const int N = 2e5+7;
const int P = 1e4+7;
const int MOD = 1e9+7;
const double eps = 1e-7;
const int INF = 0x3f3f3f3f;
typedef pair<int, int> pii;

int n, p;
int cnt[P], val[N];
char s[N];

signed main()
{
    ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
    cin >> n >> p >> (s+1);
    if (p == 2 || p == 5) {
        long long res = 0;
        for (int i = n; i; --i) {
            if ((s[i]-'0')%p == 0) res += i;
        }
        cout << res << endl;
        return 0;
    }
    // s[i, j] === 0 %p
    // (s[i, n]-s[j+1, n])/10^(n-j+1) === 0 %p
    // s[i, n] === s[j+1, n] %p
    long long res = 0;
    for (int i = n, cur = 0, base = 1; i; --i) {
        ++cnt[cur];
        cur = (cur+(s[i]-'0')*base)%p;
        res += cnt[cur];
        base = base*10%p;
    }
    cout << res << endl;
    return 0;
}

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

#define      ll     long long int

int main()
{
    int n, i, j, k, s = 0;
    cin >> n;
    map<int, int> mp;
    map<int, int>::iterator it;
    for (i = 1; i <= n; i++) {
        cin >> j;
        mp[j]++;
    }
    for (it = mp.begin(); it != mp.end(); it++) {
        j = (*it).first;
        k = (*it).second;
        if (j == k) continue;
        else if (j > k) {
            s += k;
        }
        else {
            s += (k - j);
        }
    }
    cout << s << '\n';
    return 0;
}



Measured memory_bytes: 4736
def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [input().split() for _ in range(n)]
def s4(n):return [[x for x in s] for s in s2(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]
def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]
def p0(b,yes="Yes",no="No"): print(yes if b else no)
# from sys import setrecursionlimit
# setrecursionlimit(1000000)
from collections import Counter,deque,defaultdict
# import itertools
# import math
# import networkx as nx
# from bisect import bisect_left,bisect_right
# from heapq import heapify,heappush,heappop
n,k=n1()

if k%2==1:
    a=n//k
    print(a**3)
else:
    a=(n-k//2)//k+1
    b=(n-k)//k+1
    ans=a**3+b**3
    print(ans)

Measured memory_bytes: 3440
#include<cstdio>
#include<algorithm>
#include<functional>
#include<iostream>
#include<string>
#include<vector>
#define F1 first.first
#define F2 first.second
#define F3 second
using namespace std;
typedef pair<string,int> pp;
int main(void)
{
	int i,j,k,num[1001],n,cnt=0;
	string c;
	vector<pp> s;
	while(cin>>c>>n) {
		s.push_back(pp(c,n));
		cnt++;
	}
	sort(s.begin(),s.end());
	for(i=0;i<cnt;i++) {
		if(!i) cout<<s[i].first<<endl<<s[i].second;
		if(i>0) {
			if(s[i-1].first==s[i].first) cout<<" "<<s[i].second;
			else cout<<endl<<s[i].first<<endl<<s[i].second;
		}
	}
	cout<<endl;
}
	
	
	

Measured memory_bytes: 3148
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    n=I()
    s=I()
    
    if s==n:
        print(n+1)
    elif s>n:
        print(-1)
    else:
        #nをb進法にして，桁和を計算
        def calc(b,n):
            temp=0
            while n!=0:
                temp+=n%b
                n=n//b
            return temp
        
        ans=1000000000000
        N=1000000
        
        #まずはbを10**6程度まで探索
        for b in range(2,N):
            if calc(b,n)==s:
                ans=b
                break
            
        if ans!=1000000000000:
            print(ans)
            
        #もし，b>10**6で，うまく表現できるならばそれは2桁となる，b>10**6より，上位桁は最高でも10**6程度(max_n=10**11だから)
        else:
            #a1が上位の桁,a0が下位の桁
            for a1 in range(1,N):
                a0=s-a1
                if a0<0:
                    break
                if (n-a0)%a1==0:
                    b=(n-a0)//a1
                    if b>1000000 and a0<b and a1<b:
                        ans=min(ans,b)
                        
            if ans!=1000000000000:
                print(ans)
            else:
                print(-1)
        
        
    
    
    
    
    
    
            
    
        

main()


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

typedef long long int llint;

int main()
{
  string str;
  cin>> str;

  str[0] = '2';
  str[1] = '0';
  str[2] = '1';
  str[3] = '8';

  cout<< str <<endl;

  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <iomanip>
using namespace std;
#define reps(i,s,n) for(int i = s; i < n; i++)
#define rep(i,n) reps(i,0,n)
#define fi first
#define se second
#define mp make_pair
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;

ll N,M,H,W,K,A,B;
string S;
string alpha = "abcdefghijklmnopqrstuvwxyz";
string ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";


int main() {
    ll C;
    cin>>A>>B>>C;
    cout<<min(B/A,C)<<endl;
}

Measured memory_bytes: 256
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <stack>
#include <queue>
#include <vector>
#include <list>
#include <map>

#define ST_ARR_LEN(array) (sizeof(array)/sizeof(*array))

typedef std::stack<int> IntStack;
typedef std::queue<int> IntQueue;
typedef std::vector<int> IntVector;
typedef std::list<int> IntList;

using namespace std;
  
int main(){
  int N, M;
  cin >> N >> M;
  int A[N];
  for(int i=0;i<N;i++){
    cin >> A[i];
  }

  int sum = 0;
  for(int i=0;i<N;i++){
    sum += A[i];
  }
  int count = 0;
  for(int i=0;i<N;i++){
    if(A[i] >= (float)sum/(4.0*(float)M)){
      count++;
    }
  }
  
  string ans = "No";
  if(count >= M){
    ans = "Yes";
  }
  
  
  cout << ans << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using VI = vector<int>;
using VL = vector<ll>;
using loop = int;
template<class T> using PQ = priority_queue<T, vector<T>, greater<T>>;
#define FOR(i,a,n) for(loop (i)=(a);(i)<(n);++(i))
#define eFOR(i,a,n) for(loop (i)=(a);(i)<=(n);++(i))
#define rFOR(i,a,n) for(loop (i)=(n)-1;(i)>=(a);--(i))
#define erFOR(i,a,n) for(loop (i)=(n);(i)>=(a);--(i))
#define each(i, a) for(auto &i : a)
#define SORT(i) sort((i).begin(),(i).end())
#define rSORT(i,a) sort((i).begin(),(i).end(),(a))
#define all(i) (i).begin(),(i).end()
#define out(y,x) ((y) < 0 || h <= (y) || (x) < 0 || w <= (x))
#define line cout << "------------------------\n" 
#define ENDL(i,n) ((i) == (n) - 1 ? "\n" : " ")
#define stop system("pause") //comment out this on AOJ.
constexpr ll INF = 1000000000;
constexpr ll LLINF = 1LL << 60;
constexpr ll mod = 1000000007;
constexpr ll MOD = 998244353;
constexpr ld eps = 1e-10;
constexpr ld pi = 3.1415926535897932;
template<class T>inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; }return false; }
template<class T>inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; }return false; }
inline void init() { cin.tie(nullptr); cout.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(15); }
template<class T>inline istream& operator>>(istream& is, vector<T>& v) { for (auto& elemnt : v)is >> elemnt; return is; }
template<class T, class U>inline istream& operator>>(istream& is, pair<T, U>& p) { is >> p.first >> p.second; return is; }
template<class T>inline vector<T> vec(size_t a) { return vector<T>(a); }
template<class T>inline vector<T> defvec(T def, size_t a) { return vector<T>(a, def); }
template<class T, class... Ts>inline auto vec(size_t a, Ts... ts) { return vector<decltype(vec<T>(ts...))>(a, vec<T>(ts...)); }
template<class T, class... Ts>inline auto defvec(T def, size_t a, Ts... ts) { return vector<decltype(defvec<T>(def, ts...))>(a, defvec<T>(def, ts...)); }

using matrix = vector<VL>;
int n;
matrix mul(matrix& a, matrix& b) {
    matrix ret = vec<ll>(n, n);
    FOR(i, 0, n)FOR(j, 0, n)FOR(k, 0, n) {
        (ret[i][j] += a[i][k] * b[k][j] % mod) %= mod;
    }
    return ret;
}

matrix matpow(matrix& a, ll k) {
    matrix ret = vec<ll>(n, n);
    FOR(i, 0, n)ret[i][i] = 1;
    for (; 0 < k; k >>= 1) {
        if (k & 1)ret = mul(ret, a);
        a = mul(a, a);
    }
    return ret;
}

int main() {
    init();
    
    ll k; cin >> n >> k;
    matrix a = vec<ll>(n, n); cin >> a;
    a = matpow(a, k);
    ll ans = 0;
    FOR(i, 0, n)FOR(j, 0, n)(ans += a[i][j]) %= mod;
    cout << ans << "\n";
}

Measured memory_bytes: 384
#include <vector>
#include <iostream>
#include <cmath>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <fstream>
#include <unistd.h>
#include <string.h>
#include <string>
#include <numeric>
#include <queue>
#include <deque>
#include <sstream>
#include <iomanip>
#include <set>
#include <stack>
#include <cassert>
#include <functional>
#include <random>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<vvl> vvvl;
typedef vector<vvvl> vvvvl;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<bool> vb;
typedef vector<vector<bool>> vvb;
typedef vector<vvb> vvvb;
typedef vector<vvvb> vvvvb;
typedef vector<string> vs;
typedef vector<vs> vvs;
typedef vector<vvs> vvvs;
typedef vector<char> vc;
typedef vector<vector<char>> vvc;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<vvd> vvvd;
typedef long double LD;
typedef vector<LD> vld;
typedef vector<pair<LD, LD>> vpld;
typedef pair<ll, ll> PL;
typedef vector<PL> vpl;
typedef vector<vector<PL>> vvpl;
typedef vector<vvpl> vvvpl;
typedef pair<ll, PL> TL;
typedef vector<TL> vtl;
typedef vector<vtl> vvtl;
typedef long double ld;
typedef vector<ld> vld;
const ll LINF = 1e17;
const double pi = 3.1415926535897932;
const string endstr = "\n";
#define FOR(i, a, b) for(ll i = (a); i < b; i++)
#define RFOR(i, a, b) for(ll i = (a); i > b; i--)
#define rep(i, n) for(ll i = 0; i < n; i++)
#define rrep(i, n) for(ll i = n-1; i > -1; i--)
#define FORMAP(it, m) for(auto it = m.begin(); it != m.end(); it++)
#define ff first
#define ss second
#define pb push_back
#define epb emplace_back
#define ALL(X) (X).begin(),(X).end()

template <typename T> T gcd(T a, T b) {return (a == 0) ? b : gcd(b%a, a);}
template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b;}

bool p_comp_fs(const PL p1, const PL p2){ return p1.first < p2.first;};
bool p_comp_fg(const PL p1, const PL p2){ return p1.first > p2.first;};
bool p_comp_ss(const PL p1, const PL p2){ return p1.second < p2.second;};
bool p_comp_sg(const PL p1, const PL p2){ return p1.second > p2.second;};
template <typename T>
vector<T> uniquen(vector<T> vec /* copy */){
    sort(ALL(vec)); vec.erase(unique(vec.begin(), vec.end()), vec.end()); return vec;
}

inline ll popcnt(ll x){return __builtin_popcountll((unsigned long long)x);};
template<class T> bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; }
//friend bool operator<(const tpl& lhs, const tpl& rhs){
//    return std::tie(lhs.l, lhs.r) < std::tie(rhs.l, rhs.r);
//}

bool bit(ll st, ll b){return ((st>>b)&1) == 1;}


int main(){
#ifdef __DEBUG_LOCAL__
    ifstream file("../../../../../in.txt"); if(file.is_open()) cin.rdbuf(file.rdbuf());
#endif
    ios_base::sync_with_stdio(false); cin.tie(nullptr);
    
    ll N; cin >> N;
    vl A(N); rep(i, N) {cin >> A[i]; A[i]--;}
    ll ans = 0;
    rep(i, N){
        if(i == A[A[i]]) ans++;
    }
    cout << ans/2 << endstr;
    return 0;
}


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

int main(int argc, char const *argv[])
{
    int n,num;
    cin >> n;
    int cards[4][13] = {};
    char s;
    for (int i = 0; i < n; ++i)
    {
        cin >> s >> num;
        if(s=='S') cards[0][num-1] = 1;
        if(s=='H') cards[1][num-1] = 1;
        if(s=='C') cards[2][num-1] = 1;
        if(s=='D') cards[3][num-1] = 1;
    }
    for (int i = 0; i < 4; ++i)
    {
        for (int j = 0; j < 13; ++j)
        {
            if(i==0 && cards[i][j]==0) cout << "S " << j+1 << endl;
            if(i==1 && cards[i][j]==0) cout << "H " << j+1 << endl;
            if(i==2 && cards[i][j]==0) cout << "C " << j+1 << endl;
            if(i==3 && cards[i][j]==0) cout << "D " << j+1 << endl;
        }
    }

    return 0;
}

Measured memory_bytes: 1160
using System;
using System.Collections.Generic;
using System.Linq;

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            //[summary]B - Bite Eating
            var line = ReadLine();
            int N = line[0];
            int L = line[1];

            var apples = new List<int>();

            for(int i = 0; i < N; i++)
            {
                apples.Add(L + i);
            }

            int min = int.MaxValue;
            int sum = apples.Sum();
            int ans = 0;

            foreach(var a in apples)
            {
                if (Math.Abs(a) < min)
                {
                    min = Math.Abs(a);
                    ans = sum - a;
                }
            }

            Console.WriteLine(ans);
        }

        static List<int> ReadLine()
        {
            var line = Console.ReadLine();
            var arr = line.Split(' ');

            return arr.Select(x => int.Parse(x)).ToList();
        }
    }
}

Measured memory_bytes: 13396
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  long long int a,b;
  cin>>a>>b;
  if(a<=0&&b>=0){
    cout<<"Zero"<<endl;
    return 0;
  }
  if(a>0){
    cout<<"Positive"<<endl;
    return 0;
  }
  if((b-a)%2==1){
    cout<<"Positive"<<endl;
    return 0;
  }
  cout<<"Negative"<<endl;
}

Measured memory_bytes: 256
h,m,M=60;P(s){printf("0%d:%02d:%02d\n",s/M/M,s/M%M,s%M);}main(s){for(;scanf("%d%d%d",&h,&m,&s)+h*3;P(s*3))P(s=7200-h*M*M-m*M-s);}

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

int alp[27];
int main() {
	int H, W; cin >> H >> W;
	for(int i=0; i<H; ++i){
	    string S;
	    cin >> S;
	    for(int j=0; j<W; ++j) ++alp[S[j]-'a'];
	}
	if(H%2<1 && W%2<1){
	    for(int i=0; i<26; ++i){
	        if(alp[i]%4>0){
	            cout << "No" << endl;
	            return 0;
	        }
	    }
	    cout << "Yes" << endl;
	}
	else if(H%2>0 && W%2>0){
	    int odd=0, not4=0;
	    for(int i=0; i<26; ++i){
	        if(alp[i]%4>0){
	            if(alp[i]%2>0) ++odd;
	            else ++not4;
	        }
	    }
	    cout << (odd==1 && not4*2<H+W ? "Yes" : "No") << endl;
	}
	else{
	    int mx=(H%2<1 ? H : W)/2, now=0;
	    for(int i=0; i<26; ++i){
	        if(alp[i]%4>0){
	            if(alp[i]%2>0){
	                cout << "No" << endl;
	                return 0;
	            }
	            else ++now;
	        }
	    }
	    cout << (now<=mx ? "Yes" : "No") << endl;
	}
	return 0;
}


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

int main()
{
    int i,n,c=1,p=0;
    cin>>n;
    int a[n+2];
    for(i=0; i<n; i++)
    {
        cin>>a[i];
    }
    for(i=0; i<n; i++)
    {
        if(a[i]==c)
        {
          c++;
        //cout<<a[i]<<endl;
        }
    }
if(c==1)
{
    cout<<-1<<endl;
}
else
    cout<<n-c+1<<endl;


}


Measured memory_bytes: 1024
#include<cmath>
#include<math.h>
#include<ctype.h>
#include<algorithm>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cerrno>
#include<cfloat>
#include<ciso646>
#include<climits>
#include<clocale>
#include<complex>
#include<csetjmp>
#include<csignal>
#include<cstdarg>
#include<cstddef>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<ctime>
#include<cwchar>
#include<cwctype>
#include<deque>
#include<exception>
#include<fstream>
#include<functional>
#include<iomanip>
#include<ios>
#include<iosfwd>
#include<iostream>
#include<istream>
#include<iterator>
#include<limits>
#include<list>
#include<locale>
#include<map>
#include<memory>
#include<new>
#include<numeric>
#include<ostream>
#include<queue>
#include<set>
#include<sstream>
#include<stack>
#include<stdexcept>
#include<streambuf>
#include<string>
#include<typeinfo>
#include<utility>
#include<valarray>
#include<vector>
#include<string.h>
#include<stdlib.h>
#include<stdio.h>
using namespace std;
int n;
long long ans,f[20][20];
char s[40];
string s1,s2;
int main()
{
	scanf("%d",&n);
	scanf("%s",&s);
	for (int mask=0;mask<(1<<n);mask++)
	{
		s1="";
		s2="";
		int l1=0,l2=0;
		for (int i=n-1;i>=0;i--)
		{
			if (mask&(1<<i))
			{
				s1.push_back(s[i]);
				l1++;
			}
			else
			{
				s2.push_back(s[i]);
				l2++;
			}
		}
		memset(f,0,sizeof(f));
		f[0][0]=1;
		for (int i=0;i<n;i++)
		{
			for (int j=0;j<=i && j<l1;j++)
			{
				if (s[n+i]==s1[j])
				{
					f[j+1][i-j]+=f[j][i-j];
				}
			}
			for (int j=0;j<=i && j<l2;j++)
			{
				if (s[n+i]==s2[j])
				{
					f[i-j][j+1]+=f[i-j][j];
				}
			}
		}
		ans+=f[l1][l2];
	}
	printf("%lld\n",ans);
    return 0;
}

Measured memory_bytes: 384
from collections import deque
n=int(input())

A=list(map(int,input().split()))

x=[]

for i in range(n//2,n):
    if A[i]==1:
        x.append(i+1)

x=deque(x)



for i in reversed(range(0,n//2)):
    A[i]=A[i]*2-sum(A[i::i+1])
    A[i]%=2
    if A[i]==1:
        x.appendleft(i+1)
        
print(len(x))
if len(x)!=0:
    print(*x)

Measured memory_bytes: 70364
#include <iostream>
#include<algorithm>
#include<string>
#include <cmath>
#include <vector>
#include <map>
#include <cstdio>
#pragma region Macros
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<=n;i++)
#define int long long
#define all(x) (x).begin(),(x).end()
#define swap(a,b) (a += b,b = a - b,a -= b)
#define CEIL(a,b) ((a+b-1)/b)
int GCD(int a, int b) // assuming a,b >= 1
{
	if (a < b)
		swap(a, b);
	if (b == 0)
		return a;
	if (a % b == 0)
		return b;
	return GCD(b, a % b);
}
int LCM(int a, int b) // assuming a,b >= 1
{
	return  a * b / GCD(a, b);
}
inline bool BETWEEN(int x, int min,int max) {
	if (min <= x && x <= max)
		return true;
	else
		return false;
}
using namespace std;
#pragma endregion
signed main() {
	int A,B,C,D;
	cin >> A >> B >> C >>D;
	cout << min({ A,B }) + min({ C,D }) << endl;
}

Measured memory_bytes: 256
x, y = map(int,input().split())
#ls = list(map(int,input().split()))
#r = int(input())
#s = input()
#x, y = input().split()

ls = [4,6,9,11]

if (ls.count(x) == 1 and ls.count(y) == 1) or (x == 2 and y == 2) or (ls.count(x) != 1 and x != 2 and y != 2 and ls.count(y) != 1):
  print("Yes")
else:
  print("No")

Measured memory_bytes: 3060
N=int(input())
A=[int(x) for x in input().split()]
st=0
j=-1
ans=0
for i in range(N):
  while j<N-1:
    if not st&A[j+1]:
      st|=A[j+1]
      j+=1
    else:
      break
  g=j-i+1
  ans+=g
  st-=A[i]
print(ans)

Measured memory_bytes: 24584
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;

ll dp[3001][3001][4], a[3001][3001];

int main() {
    ll r,c,items, x , y, v, maxi = 0;
    cin >> r >> c >> items;
    while(items--) {
    	cin >> x >> y >> v;
    	a[x-1][y-1]=v;
    }
    for(int i=0;i<r;i++) for(int j=0;j<c;j++) {
        for(int k=2;k>=0;k--) {
            dp[i][j][k+1]=max(dp[i][j][k+1],dp[i][j][k]+a[i][j]);
        }
        for(int k=0;k<4;k++) {
            if(j+1!=c) dp[i][j+1][k]=max(dp[i][j+1][k],dp[i][j][k]);
            if(i+1!=r) dp[i+1][j][0]=max(dp[i+1][j][0],dp[i][j][k]);
        }
    }
    for(int i=0;i<r;i++) for(int j=0;j<c;j++) for(int k=0;k<4;k++) maxi=max(maxi,dp[i][j][k]);
    cout << maxi;
	return 0;
}

Measured memory_bytes: 355196
import java.util.*;

public class Main {
  public static void main(String[] args) throws Exception {
    Scanner sc = new Scanner(System.in);
    int moneyA = sc.nextInt();
    int moneyB = sc.nextInt();
    int target = sc.nextInt();
    String result = moneyA+moneyB >= target ? "Yes" : "No" ;
    System.out.println(result);
    }
}


Measured memory_bytes: 21844
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<type_traits>
#include<math.h>
using namespace std;
typedef long long ll;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define repi(i,a,b) for(int i = (int)(a); i < (int)(b); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

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 ans=0,cnt0=0,cnt1=0;
string S;

int main(){
    cin>>S;
    rep(i,S.length()){
        if(S[i]=='1'){
            cnt1++;
        }
        else{
            cnt0++;
        }
    }
    out(min(cnt0,cnt1)*2);
}


Measured memory_bytes: 512
/*
ID:yaoxinw1
TASK:xxxx
LANG:C++
*/
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <utility>
#include <valarray>
#include <vector>
using namespace std;
vector<int>mp[100005];
bool vis[100005];
int dist[2][100005];
void dfs(int now,int dis[])
{
	vis[now]=true;
	for(int i=0;i<mp[now].size();i++)
	{
		if(vis[mp[now][i]])
		continue;
		dis[mp[now][i]]=dis[now]+1;
		dfs(mp[now][i],dis);
	}
}
int main()
{
	memset(vis,0,sizeof vis);
	int n;
	scanf("%d",&n);
	for(int i=0;i<n-1;i++)
	{
		int a,b;
		scanf("%d%d",&a,&b);
		mp[a].push_back(b);
		mp[b].push_back(a);
	}
	dfs(1,dist[0]);
	memset(vis,0,sizeof vis);
	dfs(n,dist[1]);
	int c1=0,c2=0;
	for(int i=1;i<=n;i++)
	{
		if(dist[0][i]<=dist[1][i])
		c1++;
		else
		c2++;
	}
	if(c1>c2)
	{
		cout<<"Fennec"<<endl;
	}
	else
	{
		cout<<"Snuke"<<endl;
	}
	return 0;
}

Measured memory_bytes: 11264
#include <bits/stdc++.h>
#include <algorithm>
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;


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

	int n;
	cin >> n;
	vector<int> v(n);
	forn(i, 0, n)cin >> v[i];
	sort(v.rbegin(), v.rend());
	int a = 0, b = 0;
	forn(i, 0, n){
		if(i&1)b += v[i];
		else a += v[i];
	}

	cout << a-b << endl;

}




Measured memory_bytes: 3628
#include <algorithm>
#include <fstream>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>

#include <cmath>
#include <climits>
#include <queue>

using namespace std;
using ll = long long;
int main() {
    ll a, b; cin >> a >> b;
    ll index = a + (4 - a % 4);
    ll index2 = b - b % 4;

    ll ans = 0;
    for(ll i = a; i < index; ++i){
        ans ^= i;
    }

    for(ll i = index2; i <= b; ++i){
        ans ^= i;
    }

    cout << ans << endl;
}

Measured memory_bytes: 256
n=int(input())
lo=0 
ans=":("
hi=n+4 
while lo<=hi: 
    mi=(lo+hi)>>1 
    if int(mi*(1.08))==n:
        ans=mi 
        break 
    elif mi*(1.08)>n:
        hi=mi-1 
    else:
        lo=mi+1 
print(ans)

Measured memory_bytes: 38256
//#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <vector>
#include <map>
#include <queue>

using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<n;++i)
#define mod (ll)(1e9+7)
#define FIX(a) ((a)%mod+mod)%mod
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()
#define INF 1000000000 //1e9
#define LLINF 2000000000000000000LL //2e18
#define fi first
#define se second
#define pb push_back
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n;
    cin >> n;
    ll ans = 0;
    for(ll i=1;i<=n;i++){
        if(i%3>0&&i%5>0){
            ans+=i;
        }
    }
    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 3652
#include <iostream>
#include <vector>

using namespace std;

int a[50], b[50], c[50], d[50];

int dfs(int depth, int N, int M, int Q, vector<int>* A) {
  if (depth == N) {
    int ret = 0;
    for (int i = 0; i < Q; ++i) {
      if ((*A)[b[i] - 1] - (*A)[a[i] - 1] == c[i]) {
        ret += d[i];
      }
    }
    return ret;
  }
  int ret = 0;
  for (int i = A->empty() ? 1 : A->back(); i <= M; ++i) {
    A->push_back(i);
    ret = max(ret, dfs(depth + 1, N, M, Q, A));
    A->pop_back();
  }
  return ret;
}

int main() {
  int N, M, Q;
  cin >> N >> M >> Q;
  for (int i = 0; i < Q; ++i) {
    cin >> a[i] >> b[i] >> c[i] >> d[i];
  }
  vector<int> A;
  cout << dfs(0, N, M, Q, &A) << endl;
}

Measured memory_bytes: 3624
a=int(input())
b=int(input())
c=int(input())
n=int(input())
ans=0
for i in range(a+1):
  for j in range(b+1):
    if 500*i+100*j>n:
      break
    else:
      if(n-500*i-100*j)%50==0 and (n-500*i-100*j)//50<=c:
        ans+=1
  if 500*i>n:
    break
print(ans)

Measured memory_bytes: 3064
#![allow(non_snake_case, unused_imports)]

// Input
macro_rules! input { (source = $s:expr, $($r:tt)*) => { let mut iter = $s.split_whitespace(); let mut next = || { iter.next().unwrap() }; input_inner!{next, $($r)*} }; ($($r:tt)*) => { let stdin = std::io::stdin(); let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock())); let mut next = move || -> String{ bytes.by_ref().map(|r|r.unwrap() as char).skip_while(|c|c.is_whitespace()).take_while(|c|!c.is_whitespace()).collect() }; input_inner!{next, $($r)*} }; }
macro_rules! input_inner { ($next:expr) => {}; ($next:expr, ) => {}; ($next:expr, $var:ident : $t:tt $($r:tt)*) => { let $var = read_value!($next, $t); input_inner!{$next $($r)*} };}
macro_rules! read_value { ($next:expr, ( $($t:tt),* )) => { ( $(read_value!($next, $t)),* ) }; ($next:expr, [ $t:tt ; $len:expr ]) => { (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>() }; ($next:expr, chars) => { read_value!($next, String).chars().collect::<Vec<char>>() }; ($next:expr, bytes) => { read_value!($next, String).into_bytes() }; ($next:expr, usize1) => { read_value!($next, usize) - 1 }; ($next:expr, $t:ty) => { $next().parse::<$t>().expect("Parse error") }; }

// Module
use std::cmp::{min,max};
use std::collections::{HashSet,HashMap,BTreeMap,VecDeque};

// Functions

// Main
fn main(){
    input!{
        A: i64,
        B: i64,
    }
    let x:u64 = format!("{}{}",A,B).parse().unwrap();
    let y:u64 = (x as f64).sqrt() as u64;
    println!("{}", if x==y*y{"Yes"}else{"No"});
}

Measured memory_bytes: 4352
import sys
import math
 
a,b=map(int, input().split())
 
probablity = 0.0
 
for i in range(a):
  ceil = math.ceil(math.log2(b / (i + 1)))
  if(ceil < 0):
    ceil = 0
    
  probablity = probablity + 1 / (a * 2 ** ceil)
  
print(probablity)

Measured memory_bytes: 3060
#include <bits/stdc++.h>
#if LOCAL
#include "../cout.hpp"
#endif
using namespace std;

#define forn(i,n) for (unsigned i = 0; i < n; ++i)
#define foreach(a) for (auto it = a.begin(); it != a.end(); ++it)
#define foreach_r(a) for (auto it = a.rbegin(); it != a.rend(); ++it)

typedef long long ll;
typedef unsigned long long ull;

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

    string s;
    cin >> s;

    bool ok = false;
    foreach(s) {
	if (*it == '9') ok = true;
    }
    cout << (ok ? "Yes" : "No") << endl;
}


Measured memory_bytes: 256
used[9];
 
inline int dfs(int step, int s)
{
    int i, res;
 
    if (!step) return (s == 0);
    if (s < 0) return (0);
    if (s > (step * (step + 1)) / 2 * 9) return (0);
     
    res = 0;
    for (i = 0; i <= 9; ++i){
        if (!used[i]){
            used[i] = 1;
            res += dfs(step - 1, s - (i * step));
            used[i] = 0;
        }
    }
    return (res);
}
 
main(n, v)
{
 
    while (~scanf("%d %d", &n, &v)){
        printf("%d\n", dfs(n, v));
    }
    return (0);
}

Measured memory_bytes: 600
D, G = map(int, input().split())
PC = [list(map(int, input().split())) for _ in range(D)]

answer = float('inf')
# bit全検索
for bit in range(2 ** D):
    score = 0
    count = 0
    remain = set(range(D))
    for i in range(D):
        if (bit >> i) & 1:
            # フラグが立っている時、その問題を全て解く
            score += PC[i][1] + PC[i][0]*100*(i+1)
            count += PC[i][0]
            remain -= {i}
    
    if score < G :
        use = max(remain)
        # nは難問解くか
        n = min(-(-(G-score)//((use+1)*100)), PC[use][0])
        count += n
        score += n * (use+1) * 100
    if score >= G:
        answer = min(answer, count)

print(answer)

Measured memory_bytes: 3188
import numpy as np
def solve():
    N = int(input())
    A = np.array(list(map(int, input().split())),dtype=np.int64)
    Q = int(input())
    BC = np.array([list(map(int, input().split())) for _ in range(Q)])

    nums = np.zeros(max(A.max(), BC.max())+1)
    sm = np.sum(A, dtype=np.int64)
    for i in A:
        nums[i]+=1

    for b,c in BC:
        sm += nums[b]*(c-b)
        nums[c] +=nums[b]
        nums[b] = 0
        print(int(sm))








if __name__ == "__main__":
    solve()

Measured memory_bytes: 47904
#include <bits/stdc++.h>
#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 INF 999999999
#define ll long long
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;


int main(){
  int n,action,d,x;
  deque<int> v;
  scanf("%d",&n);
  REP(i,n){
    scanf("%d",&action);
    switch(action){
      case 0:
        scanf("%d %d",&d, &x);
        if(d){
          v.push_back(x);
        }
        else{
          v.push_front(x);
        }
        break;
      case 1:
        scanf("%d",&x);
        printf("%d\n",v[x]);
        break;
      case 2:
        scanf("%d",&d);
        if(d){
          v.pop_back();
        }
        else{
          v.pop_front();
        }
      break;

    }
  }
}


Measured memory_bytes: 4536
#include <cmath>
#include <cstring>
#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int a,b;
int main()
{
	scanf("%d%d",&a,&b);
	a=a-b;
	if (a<0)a=0;
	printf("%d",a);
}

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

int main(){
string S;
  cin>>S;
  
  int i;
  for(i=2; i<S.size(); i+=2){ // 偶文字列であるには、S.size()を2ずつ減らす
    int G=(S.size()-i)/2; // Sの中間の開始位置
   if(S.substr(0, G)==S.substr(G, G)){break;}
  } // S[0]～S[G-1]までの文字列と、S[G]～S[G+G-1]までの文字列が同じならbreak
  cout<<S.size()-i; // break成立時のiを引くと条件を満たす文字列の長さになる
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    cin>>s;
    int i;
    for(i=0;i<s.length();i++){
        if((s[0]=='0' && s[1]=='0' && s[2]=='0') || (s[1]=='0' && s[2]=='0' && s[3]=='0')){
            cout<<"Yes"<<endl;
            break;
        }
        else if((s[0]=='1' && s[1]=='1' && s[2]=='1') || (s[1]=='1' && s[2]=='1' && s[3]=='1')){
            cout<<"Yes"<<endl;
            break;
        }
        else if((s[0]=='2' && s[1]=='2' && s[2]=='2') || (s[1]=='2' && s[2]=='2' && s[3]=='2')){
            cout<<"Yes"<<endl;
            break;
        }
        else if((s[0]=='3' && s[1]=='3' && s[2]=='3') || (s[1]=='3' && s[2]=='3' && s[3]=='3')){
            cout<<"Yes"<<endl;
            break;
        }
        else if((s[0]=='4' && s[1]=='4' && s[2]=='4') || (s[1]=='4' && s[2]=='4' && s[3]=='4')){
            cout<<"Yes"<<endl;
            break;
        }
        else if((s[0]=='5' && s[1]=='5' && s[2]=='5') || (s[1]=='5' && s[2]=='5' && s[3]=='5')){
            cout<<"Yes"<<endl;
            break;
        }
         else if((s[0]=='6' && s[1]=='6' && s[2]=='6') || (s[1]=='6' && s[2]=='6' && s[3]=='6')){
            cout<<"Yes"<<endl;
            break;
        }
         else if((s[0]=='7' && s[1]=='7' && s[2]=='7') || (s[1]=='7' && s[2]=='7' && s[3]=='7')){
            cout<<"Yes"<<endl;
            break;
        }
        else if((s[0]=='8' && s[1]=='8' && s[2]=='8') || (s[1]=='8' && s[2]=='8' && s[3]=='8')){
            cout<<"Yes"<<endl;
            break;
        }
        else if((s[0]=='9' && s[1]=='9' && s[2]=='9') || (s[1]=='9' && s[2]=='9' && s[3]=='9')){
            cout<<"Yes"<<endl;
            break;
        }
        else{
            cout<<"No"<<endl;
            break;
        }
    }
    return 0;
}


Measured memory_bytes: 256
fn main() {
    proconio::input! {
        n: i64,
        k: i64,
    }
    // min: 0+1+...+(k-1)
    // max: (N-k+1)+..+(N-1)+N
    // count= max-min+1= k*(n-k+1)+1
    // answer is Σcount
    let mut ans:i64 = 0;
    (k..=(n+1)).for_each(|x| {
        ans = (ans + x*(n-x+1)+1) % (10i64.pow(9) + 7)
    });
    
   println!("{}", ans);
}

Measured memory_bytes: 2128
#include <iostream>
#include <vector>
#include <algorithm> // sort
#include <map> // pair
using namespace std;

int main()
{
  int N,M;
  cin >> N >> M;
  vector<pair<long long, long long> > pairs(N);
  for(int i=0; i<N; i++){
      int tmp1,tmp2;
      cin >> tmp1 >> tmp2;
      pairs[i].first = tmp1;
      pairs[i].second = tmp2;
  };

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

long long pay = 0;
long long total = 0;
for(int i=0; i < N; i++){
  long long buf = pairs[i].second;
  for(long long j=0; j<buf; j++){
    total++;
    pay += pairs[i].first;
    if(total == M) break;
  }
  if(total == M) break;
}
cout << pay << endl;

return 0;
};

Measured memory_bytes: 1792
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0, i##_len = (n); i < i##_len; ++i)
#define rep2(i, x, n) for(int i = x, i##_len = (n); i < i##_len; ++i)
#define all(n) begin(n), end(n)
using ll = long long;
using P = pair<int, int>;
using vi = vector<int>;
using vl = vector<ll>;
using vs = vector<string>;
using vc = vector<char>;
using vb = vector<bool>;
vi dir = {-1, 0, 1, 0, -1, -1, 1, 1, -1};

int main() {
  int n, m;
  cin >> n >> m;
  cout << (n == m ? "Yes" : "No") << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
long long int mod = 1e9+7;
int dx[4] = {0,1,0,-1};
int dy[4] = {1,0,-1,0};
//////////////////////////////////



int main(){
    int n, k; cin >> n >> k;
    vector<vector<long long>> c(2001, vector<long long>(2001, 0));
    c[0][0] = 1;
    for(int i=0; i<2000; i++){
        c[i][0] = 1;
    }

    for(int i=1; i<2000; i++) {
        for(int j=1; j<=i; j++) {
            c[i][j] = (c[i-1][j] + c[i-1][j-1])%mod;
        }
    }

    for(int i=1; i<=k; i++) {
        cout << (c[n-k+1][i] * c[k-1][i-1])%mod << endl;
    }

    return 0;
}

// EOF



Measured memory_bytes: 31616
n = int(raw_input())
def gb(s):
	bal = 0
	m = 0
	for l in s: 
		bal += 1 if l == '(' else -1
		m = min(m, bal)
	return (bal,m)


adds, dels = [], []
for _ in range(n):
	e = gb(raw_input())
	if e[0] >= 0:
		adds.append(e)
	else:
		dels.append(e)
adds.sort(key = lambda x: (-x[1], -x[0]))
dels.sort(key = lambda x: (x[1] - x[0], -x[0]))
def f(adds, dels):
	s = 0
	for aa,bb in adds:

		if s + aa < 0:
			return False
		if s + bb < 0:
			return False
		s += aa
		

	for aa,bb in dels:

		if s + aa < 0:
			return False
		if s + bb < 0:
			return False
		s += aa
	return s == 0

print 'Yes' if f(adds, dels) else 'No'

Measured memory_bytes: 180820
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0;i<(n);i++)
#define N 105
#define INF 1000000000
typedef long long ll;
#define ALL(v) (v).begin(),(v).end()
#define SZ(x) int(x.size())
#define IN(a) cin>>(a)
#define OUT(a) cout<<(a)<<endl
typedef pair<int,int> P;
const int MAX = 1000005;
const int MOD = 1000000007;
int main(){
    int n,k;
    cin>>n>>k;
    vector<int>a(n);
    REP(i,n)cin>>a[i];
    vector<ll>sum(n+1);
    REP(i,n)sum[i+1]=sum[i]+a[i];
    vector<ll>x(n*(n+1)/2);
    int p=0;
    for(int i=1;i<=n;i++){
        for(int j=0;j<i;j++){
            x[p++]=(ll)sum[i]-sum[j];
        }
    }
    ll t=1LL<<40;
    ll ans=0;
    while(t>0){
        int cnt=0;
        vector<ll>tmp;
        for(int i=0;i<max(p,k);i++){
            if((ll)x[i]&t){
                cnt++;
                tmp.push_back(x[i]);
            }
        }
        if(cnt>=k){
            ans+=t;
            if(cnt<p){
                REP(i,cnt)x[i]=tmp[i];
                p=cnt;
            }
        }
        if(t==1)break;
        t=t>>1;
    }
    OUT(ans);
    return 0;
}

Measured memory_bytes: 5372
#include<iostream>
#include<vector>
#include<string>
#include<cstdlib>
#include<cstring>
#include<queue>
#include<cmath>
//#include<>
using namespace std;

#define rep(i, n) for(int i=0;i<(int)(n);i++)
#define REPS(i, n) for(int i=1;i<=(int)(n);i++)
#define RREP(i, n) for(int i=(int)n-1;i>=0;i--)
#define RREPS(i, n) for(int i=(int)n;i>0;i--)
#define ALL(a) a.begin(), a.end()
#define RALL(a) a.rbegin(), a.rend()
#define pb push_back
#define eb emplace_back
#define X first
#define Y second

typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef pair<int,string> pis;

int n, m;

int check(string s, string t){ // s \in t
	rep(i, (int)t.size() - (int)s.size() + 1){
		if(t.substr(i, s.size()) == s) return 1;
	}
	return 0;
}

string dp[1<<10][15];
vector<vector<string> > nxt;
vector<string> str;

pis dfs(int st,int last){
	if(!(st^(1<<last)))return pis(str[last].size(),str[last]);
	if(dp[st][last].size())return pis(dp[st][last].size(),dp[st][last]);
	pis re; re.first=1123;
	int n=nxt.size(),st2=st^(1<<last);
	rep(i,n)if(st2>>i&1){
		pis tmp=dfs(st2, i);
		tmp.X+=nxt[i][last].size();
		tmp.Y+=nxt[i][last];
		re=min(re,tmp);
	}
	dp[st][last]=re.Y;
	return re;
}

int main(){
	ios::sync_with_stdio(false);
	while(cin >> n){
		if(!n)break;
		fill(dp[0],dp[0]+(15<<10),"");
		str.clear();
		vector<string> str_(n);
		rep(i,n)
			cin>>str_[i];
		int f=0;
		rep(i,n){
			f=0;
			rep(j,n)if(i!=j && check(str_[i],str_[j])){
				if(str_[i] != str_[j] || i < j) f=1;
			}
			if(!f)str.pb(str_[i]);
		}
		int m=str.size();
//rep(i,n)cout<<str_[i]<<",";cout<<endl;
		nxt.clear(); nxt=vector<vector<string> >(m,vector<string>(m));
		rep(i,m)rep(j,m)if(i!=j){
			nxt[i][j]=str[j];
			rep(k,str[i].size())
				if(str[i].substr(k)==str[j].substr(0,str[i].size()-k)){
					nxt[i][j]=str[j].substr(str[i].size()-k); break;
				}
	//if(!j)cout<<endl;
			//cout<<nxt[i][j]<<",";
		}

		pis re;re.X=1123;
		rep(i,m)
			re=min(re,dfs((1<<m)-1,i));
		cout<<re.Y<<endl;
		
	}
	return 0;
}

Measured memory_bytes: 1832
#include<bits/stdc++.h>
#define int long long
#define mod 1e18+10
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
using namespace std;
int n,a[100005];

int32_t main() {
	cin>>n;
	int i;
	for(i=0;i<n;i++)cin>>a[i];
	sort(a,a+n);
	int m=n/2;
	cout<<a[m]-a[m-1];
	
}


Measured memory_bytes: 1024
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, a, b) for(int i = a; i < b; i++)
#define  all(x) (x).begin(),(x).end()     // 昇順ソート
#define  rall(v) (v).rbegin(), (v).rend() // 降順ソート
#define  FastIO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
typedef long long ll;
typedef long long int lli;
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return true; } return false; }

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

int main(){
    ll n, k, q;
    cin >> n >> k >> q;
    vector<ll> a(n+1, q);
    rep(i,q){
        ll ai;
        cin >> ai;
        a[ai]--;
    }
    rep(i,n){
        if (k - a[i+1] <= 0){
            cout << "No" << endl;
        }else{
            cout << "Yes" << endl;
        }
    }
}

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

int main() {
  ll a,b,c,d;
  cin >> a >> b >> c >> d;
  ll max=-1000000000000000000;
  if (max<a*c) max=a*c;
  if (max<b*c) max=b*c;
  if (max<a*d) max=a*d;
  if (max<b*d) max=b*d;
  cout << max;
  return 0;
}


Measured memory_bytes: 3632
#include <iostream>
using namespace std;
 
int main() {

  int N,T,A,ans;
  ans = 0;
  cin >>N >>T >>A;
  double deg[N];
  for(int i=0;i<N;i++){
    cin >>deg[i];
    deg[i]=A-T+0.006*deg[i];
      if(deg[i]<0){
        deg[i] = -deg[i];
      }  
      
      if(deg[i] < deg[ans]){
        ans=i;
      }  
  }  
  ans++;
  cout << ans;
  return 0;
}

Measured memory_bytes: 256
/*input
12345678 87654321 12345678 87654321
123456789
*/
#include "bits/stdc++.h"
using namespace std;
#define ll long long int
ll mod=(ll)1e9+7;
int main()
{
	ll q,h,s,d,n;
	cin>>q>>h>>s>>d>>n;
	q*=4,h*=2;
	s=min(s,min(q,h));
	ll ans=0;
	if(s*2>d)ans=d*(n/2);
	else 
		{
				ans=s*n;
				n=0;
		}
	n%=2;
	ans+=n*s;
	cout<<ans<<endl;
}

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

template <typename T> inline void rd(T& x) {
	int si = 1; char c = getchar(); x = 0;
	while(!isdigit(c)) si = c == '-' ? -1 : si, c = getchar();
	while(isdigit(c)) x = x * 10 + c - 48, c = getchar();
	x *= si;
}
template <typename T, typename... Args>
inline void rd(T& x, Args&... args) { rd(x); rd(args...); }
#define fi first
#define se second
#define mkp std::make_pair
typedef long long ll;
typedef double ff;
typedef std::pair <int, int> pii;
const int kN = 2e5 + 5, kInf = 0x3f3f3f3f;
const ll kMod = 998244353, kInfLL = 0x3f3f3f3f3f3f3f3fLL;

int cover[kN], ans, n, q, buc[kN], a[kN];

void Add(int x) {
	++buc[x];
	if(x - buc[x] + 1 > 0) {
		if(!cover[x - buc[x] + 1]) --ans;
		++cover[x - buc[x] + 1];
	}
}
void Del(int x) {
	if(x - buc[x] + 1 > 0) {
		--cover[x - buc[x] + 1];
		if(!cover[x - buc[x] + 1]) ++ans;
	}
	--buc[x];
}

int main() { 
	int T = 1; //rd(T);
	while(T--) {
		rd(n, q); ans = n;
		for(int i = 1; i <= n; ++i) {
			rd(a[i]); Add(a[i]);
		}
		while(q--) {
			int x, y; rd(x, y);
			Del(a[x]); Add(y); a[x] = y;
			printf("%d\n", ans);
		}
	} return 0;
}


Measured memory_bytes: 6012
a1,a2,a3=map(int,input().split())
b1,b2,b3=map(int,input().split())
c1,c2,c3=map(int,input().split())
l=[[0]*3 for _ in range(3)]
n=int(input())
for _ in range(n):
    b=int(input())
    if a1==b:
        l[0][0]=1
    elif a2==b:
        l[0][1]=1
    elif a3==b:
        l[0][2]=1
    elif b1==b:
        l[1][0]=1
    elif b2==b:
        l[1][1]=1
    elif b3==b:
        l[1][2]=1
    elif c1==b:
        l[2][0]=1
    elif c2==b:
        l[2][1]=1
    elif c3==b:
        l[2][2]=1
if l[0]==[1,1,1] or l[1]==[1,1,1] or l[2]==[1,1,1]:
    print('Yes')
elif l[0][0]==1 and l[1][0]==1 and l[2][0]==1 or l[0][1]==1 and l[1][1]==1 and l[2][1]==1 or l[0][2]==1 and l[1][2]==1 and l[2][2]==1:
    print('Yes')
elif l[0][0]==1 and l[1][1]==1 and l[2][2]==1 or l[0][2]==1 and l[1][1] and l[2][0]==1:
    print('Yes')
else:
    print('No')

Measured memory_bytes: 3316