akhauriyash/Code-Regression huggingface dataset:
#define _CRT_SECURE_NO_WARNINGS
//#define _USE_MATH_DEFINES
#include<stdio.h>
//#include<stdlib.h>
//#include<math.h>
#include<string.h>
//#include<time.h>
#define P(type,x) fprintf(stdout,"%"#type"\n",x)
const char code[77] = { "0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ `abcdefghijklmnopqrstuvwxyz" };

int main() {
	int n;
	char a[2],b[2];
	char encode[77];
	for (; fscanf(stdin, "%d", &n), n; puts("")) {
		getchar();
		memset(encode, 0, sizeof(encode));
		strncpy(encode, code, 76);
		while (n--) fscanf(stdin, "%c%*c%c", &a[0], &b[0]),getchar(), encode[a[0] - '0'] = b[0];
		fscanf(stdin, "%d", &n),getchar();
		while (n--) fscanf(stdin, "%c", &a[0]), getchar(), printf("%c",encode[a[0]-'0']);
	}
	return 0;
}

Measured memory_bytes: 596
#include<stdio.h>

int a[101];
int book[100];

int main(){
    int n,m;
    scanf("%d%d",&n,&m);
    for(int i=0;i<2*m;i++){
        scanf("%d",&a[i]);
        book[a[i]]++;
    }

    for(int i=1;i<=n;i++){
        printf("%d\n",book[i]);
    }

}


Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n,s=0,i,j;
    scanf("%d",&n);
    for (i=1;i<=n;i++)
	{
		for(j=2;j<=10;j++)
		{
			if(pow(i,j)>n)
				break;
			if(pow(i,j)<=n)
			{
				int t=pow(i,j);
				s=max(s,t);
 
			}
		}
	}
    printf("%d",s);
    return 0;
}

Measured memory_bytes: 256
//ABC137 A - +-x
//20190905

using System;
using System.Linq;
using static System.Math;
using System.Collections;
using System.Collections.Generic;


namespace A
{
    class Program
    {
        static void Main(string[] args)
        {
            var INPUT = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int A,B;
            A = INPUT[0];
            B = INPUT[1];

            int SUM, SUB, MULT;
            SUM = A+B;
            SUB = A-B;
            MULT = A*B;

            int ANS = Max(SUM,SUB);
            

            Console.WriteLine(Max(A*B,ANS));

        }
    }
}


Measured memory_bytes: 13396
N=int(input())
x = []
y = []
for i in range(N):
    x1,y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)

import itertools
import math
l=range(0,N)
distance=[]
for v in itertools.permutations(l,N):
    summary=0
    for w in range(len(v)-1):
        tmp=math.sqrt((x[v[w]]-x[v[w+1]])**2+(y[v[w]]-y[v[w+1]])**2)
        summary+=tmp
    distance.append(summary)

print('{:.7f}'.format(sum(distance)/math.factorial(N)))

Measured memory_bytes: 4400
n, k = map(int, input().split())
teleporter = list(map(int, input().split()))
loop = [0]
checked = [False] * n
checked[0] = True
next_teleporter = teleporter[0] - 1

while not checked[next_teleporter]:
    checked[next_teleporter] = True
    loop.append(next_teleporter)
    next_teleporter = teleporter[next_teleporter] - 1

if next_teleporter == loop[0] - 1:
    index = k % len(loop)
    print(loop[index] + 1)
else:
    for i in range(len(loop)):
        if next_teleporter == loop[i]:
            s = i
            break
    if s > k:
        print(loop[k] + 1)
    else:
        loop = loop[s:]
        index = (k - s) % len(loop)
        print(loop[index] + 1)


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

#pragma warning(disable:4996)
using namespace std;

const int X=100000;
vector<long long int> divisor(long long int n) {
	vector<long long int> res;
	for (long long int i = 1; i * i <= n; ++i) {
		if (n % i == 0) {
			res.push_back(i);
			if (i * i != n) res.push_back(n / i);
		}
	}
	sort(begin(res), end(res));
	return res;
}
int main() {
	int H,W;cin>>H>>W;
	vector<long long int>ys(H),xs(W);
	vector<pair<long long int,int>>ps;
	for (int i = 0; i < H; ++i) {
		int a;cin>>a;
		ps.push_back(make_pair(a,0));
	}
	for (int i = 0; i < W; ++i) {
		int b;cin>>b;
		ps.push_back(make_pair(b,1));
	}

	sort(ps.begin(),ps.end());
	long long int answer=0;
	long long int use_y=0;
	long long int use_x=0;
	for (auto p : ps) {
		if (p.second) {
			answer+=(H-use_y)*p.first;
			use_x++;
		}
		else {
			answer+=(W-use_x)*p.first;
			use_y++;
		}
	}
	cout<<answer<<endl;
	return 0;
}



Measured memory_bytes: 8584
#  --*-coding:utf-8-*--


def f(poss):
    lastPos = (0, 0, 0)

    for pos in poss:
        t = pos[0] - lastPos[0]
        d = abs(pos[1] - lastPos[1]) + abs(pos[2] - lastPos[2])
        lastPos = pos

        if t < d or (t-d)%2 != 0:
            return False

    return True



def main():
    n = int(input())
    poss = [tuple(map(int, input().split())) for i in range(n)]

    print('Yes' if f(poss) else 'No')


if __name__ == '__main__':
    main()


Measured memory_bytes: 17324
import collections

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

dic = collections.Counter(A)

tmp1,tmp2 = 0,0
for a in A[::-1]:
    if dic[a] >= 2 and tmp1 == 0:
        tmp1 = a
        dic[a] -= 2

    if dic[a] >=2:
        tmp2 = a
        break
ans = tmp1*tmp2

print(ans)


Measured memory_bytes: 18728
#include<bits/stdc++.h>
/*
g++ -std=c++11 -Wall -g -fsanitize=undefined -D_GLIBCXX_DEBUG dpmatome/c.cpp
*/
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define SZ(x) ((int)(x).size())
#define INF (1e16)
typedef long long ll;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);//おまじないでcin, cout早くする
    int N;
    cin >> N;
    int m[N][3];
    rep(i, N){
        rep(j, 3){
            cin >> m[i][j];
        }
    }

    ll dp[N][3];
    dp[0][0] = m[0][0];
    dp[0][1] = m[0][1];
    dp[0][2] = m[0][2];
    for(int i = 1; i < N; i++){
        dp[i][0] = max(dp[i - 1][1] + m[i][0], dp[i - 1][2] + m[i][0]);
        dp[i][1] = max(dp[i - 1][0] + m[i][1], dp[i - 1][2] + m[i][1]);
        dp[i][2] = max(dp[i - 1][0] + m[i][2], dp[i - 1][1] + m[i][2]);
    }

    cout << max(max(dp[N - 1][0], dp[N - 1][1]), dp[N - 1][2]) << "\n";
    return 0;
}

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

int main(void) {
	int n,max;
	cin >> n;
	for (int i = 1; i <= 9; i++) {
		if (n % i == 0 && n / i < 10) {
			cout << "Yes" << endl;
			return 0;
		}
	}
	cout << "No" << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(n); ++i)

int N;
long long K;
vector<int> A, B;
vector<int> dp, nxt, same[200200];

void print_result(int piv) {
    if (piv == -1) return;
    while (piv < N) {
        if (nxt[piv] <= N) {
            piv = nxt[piv];
            continue;
        } else {
            cout << A[piv++] << endl;
        }
    }
}

int main() {

    cin >> N >> K;

    A.resize(N);
    REP(i, N) cin >> A[i];

    // B : Aを2回繰り返した配列
    REP(i, 2 * N) B.emplace_back(A[i % N]);

    // same[i] : 数iが格納されているindexのvector
    REP(i, 2 * N) same[B[i]].emplace_back(i);

    // nxt[i] : Bの中で, B[i]と同じ数が次に現れるindexの次のindex
    nxt.resize(N);
    REP(i, N) nxt[i] = same[B[i]][(int)(upper_bound(same[B[i]].begin(), same[B[i]].end(), i) - same[B[i]].begin())] + 1;

    int cur = 0;
    while (true) {
        if (nxt[cur] > N) {         // 数列を跨ぐとき
            dp.emplace_back(cur);
        }
        if (nxt[cur] % N == 0) {    // 1巡終了
            dp.emplace_back(-1);    // 数列sが空
            break;
        }
        cur = nxt[cur] % N;
    }

    print_result(dp[(K - 1) % (int)dp.size()]);

}


Measured memory_bytes: 17392
#include<bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> P;
typedef long long ll;
#define rep(i,a,n) for(int i=a;i<n;i++)
#define rrep(i,n,a) for(int i=n;i>=a;i--)
#define FOR(i,n) for(int i=0;i<n;i++)
#define all(s) s.begin(),s.end()
#define lla(s) s.rbegin(),s.rend()
#define pcnt(b) __builtin_popcount(b)
const int MOD = 1e9 + 7;
//const int MOD = 998244353;
const ll INF = 1e18;

signed main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n,ans=0;
    cin>>n;
    vector<int>a(n),b(n);
    rep(i,0,n){
        cin>>a[i]>>b[i];
    }
    int tmp = 0;
    rrep(i,n-1,0){
        a[i]+=tmp;
        ans+=(b[i]-(a[i]%b[i]))%b[i];
        tmp+=(b[i]-(a[i]%b[i]))%b[i];
    }
    cout<<ans<<endl;
}


Measured memory_bytes: 1920
#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
// #include <atcoder/all>

using boost::multiprecision::cpp_int;
using namespace std;
// using namespace atcoder;

#if __has_include("print.hpp")
  #include "print.hpp"
#endif

#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define MOD 1000000007

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

typedef long long ll;
typedef pair<ll, ll> p;

struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%MOD+MOD)%MOD){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= MOD) x -= MOD;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += MOD-a.x) >= MOD) x -= MOD;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= MOD; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime MOD
  mint inv() const { return pow(MOD-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> v(n+3, -1);
  v[1] = 1;

  ll res = 0;
  for (int i = 2; i < n+1; ++i) {
    for (int j = 0; j < n+1; j+=i) {
      if(v[j] == -1) v[j] = i;
    }
  }

  for (int i = 1; i < n; ++i) {
    ll tmp1 = i;
    ll tmp2 = 1;
    map<int, int> mp;
    if(tmp1 == 1) res += 1;
    else{
      ll tmp = 1;
      while(true){
        // cout << tmp1 << ' ' << tmp2 << endl;
        // if(tmp1 != tmp2) res += 2;
        // else res += 1;
        mp[v[tmp1]]++;
        tmp2 = tmp1 / v[tmp1];
        tmp1 /= v[tmp1];
        if(tmp1 == 1) break;
      }
      for(auto a : mp){
        tmp *= (a.second + 1);
      }
      res += tmp;
    }
  }

  cout << res << endl;
}


Measured memory_bytes: 7132
from collections import defaultdict
from itertools import permutations

n, c = map(int, input().split())
d = [list(map(int, input().split())) for _ in range(c)]
cmat = [list(map(int, input().split())) for _ in range(n)]

dcnt = [defaultdict(int) for _ in range(3)]
for i, ci in enumerate(cmat, 1):
    for j, cij in enumerate(ci, 1):
        mod = (i + j) % 3
        dcnt[mod][cij - 1] += 1

ans = 10 ** 9
for color in permutations(range(c), 3):
    if len(set(color)) == 3:
        tmp = 0
        for i, cnt in enumerate(dcnt):
            tmp += sum(d[k][color[i]] * cnt[k] for k in cnt)
        ans = min(ans, tmp)
print(ans)


Measured memory_bytes: 11944
n = int(input())
S = input()

cnt = n//2
f = 0
if n%2 == 1:
    f = 1
else:
    for i in range(cnt):
        if S[i] == S[cnt+i]:
            pass
        else:
            f = 1
            break

if f == 0:
    print('Yes')
else:
    print('No')

Measured memory_bytes: 3060
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for _ in range(N)]
def dp2(ini, i, j): return [[ini]*i for _ in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for _ in range(j)] for _ in range(k)]
#import bisect #bisect.bisect_left(B, a)
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from itertools import accumulate #list(accumulate(A))

N, M = mi()
C = li()

'''
# 二次元DP
dp = dp2(float('inf'), N+1, M+1)
dp[0][0] = 0
for i in range(1, M+1):
    for j in range(N+1):
        #if j == 0:
            #dp[i][j] = 0
        dp[i][j] = min(dp[i-1][j], dp[i][j])
        c = C[i-1]
        if j+c <= N:
            dp[i][j+c] = min(dp[i][j]+1, dp[i-1][j+c])
#print(dp)
print(dp[M][N])
'''

# 1次元DP
dp = [float('inf') for i in range(N+1)]
dp[0] = 0

for i in range(M):
    for j in range(N+1):
        c = C[i]
        if j+c <= N:
            dp[j+c] = min(dp[j]+1, dp[j+c])

print(dp[N])


Measured memory_bytes: 7660
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define REP(i, n) for(int i = 0; i < (n); ++i)
typedef long long ll;
const ll MOD = 1000000007;
using namespace std;

int n;

int dfs(ll t){//上の桁の数がt
    if(t > n) return 0;
    int cnt = 0;
    bool has3=false, has5=false, has7=false;
    ll s = t;
    while(s){
        if(s%10 == 3) has3 = true;
        if(s%10 == 5) has5 = true;
        if(s%10 == 7) has7 = true;
        s /= 10;
    }
    if(has3 && has5 && has7) cnt = 1;
    cnt += dfs(t*10 + 3);
    cnt += dfs(t*10 + 5);
    cnt += dfs(t*10 + 7);
    return cnt;
}

int main(){
    cin >> n;
    cout << dfs(0) << "\n";
    return 0;
}

Measured memory_bytes: 256
## coding: UTF-8
X = int(input())

a = [-500 + i for i in range(1001)]
b = [-500 + i for i in range(1001)]

A = -1000
B = -1000
for i in range(1001):
    for j in range(1001):
        #print('a[i]:{}, b[j]:{}'.format(a[i], b[j]))
        #print(a[i] ** 5)
        #print(b[j] ** 5)
        #print(a[i] ** 5 - b[j] ** 5)
        if(a[i] ** 5 - b[j] ** 5 == X):
            A = a[i]
            B = b[j]
print('{} {}'.format(A, B))

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

# define x first
# define y second
# define mp make_pair
// everything goes according to my plan
# define pb push_back
# define sz(a) (int)(a.size())
# define vec vector
// shimkenttin kyzdary, dzyn, dzyn, dzyn...
# define y1    Y_U_NO_y1
# define left  Y_U_NO_left
# define right Y_U_NO_right

# ifdef Local
# define debug(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
# else
# define debug(...) (__VA_ARGS__)
# define cerr if(0)cout
# endif

using namespace std;

typedef pair <int, int> pii;
typedef long long ll;
typedef long double ld;

const int Mod = (int)1e9 + 7;
const int MX = 1073741822;
const ll MXLL = 4e18;
const int Sz = 1110111;
// a pinch of soul
inline void Read_rap () {
  ios_base :: sync_with_stdio(0);
  cin.tie(0); cout.tie(0);
}
inline void randomizer3000 () {
  unsigned int seed;
  asm ("rdtsc" : "=A"(seed));
  srand (seed);
}
void files (string problem) {
  if (fopen ((problem + ".in").c_str(),"r")) {
    freopen ((problem + ".in").c_str(),"r",stdin);
    freopen ((problem + ".out").c_str(),"w",stdout);
  }
}
void localInput(const char in[] = "s") {
  if (fopen (in, "r")) {
    freopen (in, "r", stdin);
  }
  else
    cerr << "Warning: Input file not found" << endl;
}

int main()
{
  # ifdef Local
    //localInput();
  # endif
  Read_rap();
  int n;
  cin >> n;
  int a[n];;
  for (int i = 0; i < n; i++)
    cin >> a[i];
  int sum = accumulate (a, a + n, 0);

  int mn = 0;
  for (int i = 0; i < n; i++) {
    if (abs (a[mn] * n - sum) > abs (a[i] * n - sum))
      mn = i;
  }
  cout << mn;



  return 0;
}






// Coded by Z..

Measured memory_bytes: 256
// AOJ 3059 Shuffle 2
// 2019.4.2 bal4u

#include <stdio.h>
#include <stdlib.h>

// 高速文字表示
#if 1
#define pc(c) putchar_unlocked(c)
#else
#define pc(c) putchar(c)
#endif
void outs(char *s) { while (*s) pc(*s++); }

char ans[2000010], b[2000010];

int main()
{
	int q, i;
	long long n, k, d;
	long long d2, diff;

	scanf("%lld%d%lld%lld", &n, &q, &k, &d);
	k--, d--;

	d2 = d;  for (i = 0; i < q; i++) d2 = (d2 << 1) % n;
	diff = (k - d2) % n;
	if (diff < 0) diff += n;
	for (i = q-1; i >= 0 && diff; i--) b[i] = diff & 1, diff >>= 1;
	if (diff) { outs("-1\n"); return 0; }

	for (i = 0; i < q; i++) {
		d2 = d << 1;
		if (b[i]) d2++;
		d2 %= n;
		ans[i] = (d2 & 1) ^ (d != (d2 >> 1));
		d = d2;
	}
	for (i = q - 1; i >= 0; i--) pc('0' + ans[i]), pc('\n');
	return 0;
}



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

#define      pb    push_back
#define      ff    first
#define      ss    second
#define      ll    long long int
#define      endl  "\n"
#define      FASTIO        ios_base::sync_with_stdio(false);cin.tie(NULL);//cout.tie(NULL);
#define      TEST    ll t ; cin >> t ; while( t -- )
#define      pii     pair < int , int >

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

#define sc(a) scanf("%d",&a)
#define sc2(a,b) scanf("%d%d",&a,&b)
#define sc3(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define sc4(a,b,c,d) scanf("%d%d%d%d",&a,&b,&c,&d)

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

const ll Max = 10e18 ;
const int SIZE = 2 * 10e5 ;

int  main (  ) {

    FASTIO ;

    char  ch ;
    cin >> ch ;

    if( ch >= 'A' && ch <= 'Z') cout << "A" ;
    else  cout << "a" ;


    return  0 ;
}


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

using namespace std;
typedef long long int LL;
typedef long long int ll;
typedef pair<long long int, long long int> pii;
typedef pair<double, double> pdd;

#define SORT(c) sort((c).begin(),(c).end())
#define BACKSORT(c) sort((c).begin(),(c).end(),std::greater<LL>())
#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define SP << " " <<

LL mod = 1000000007;

struct st{
  int idx;
  string str;
  int p;
};

int xcomp(st& a, st& b) {
	if(a.str == b.str){
    return a.p > b.p;
  }else{
    return a.str < b.str;
  }
}

#define XSORT(c) sort((c).begin(),(c).end(),xcomp)

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

  LL N;
  cin >> N;
  vector<st> sss(N);
  REP(i, N)
  {
    string s;
    LL pp;
    cin >> s >> pp;
    auto b = st();
    b.idx = i;
    b.str = s;
    b.p = pp;
    sss[i] = b;
  }

  XSORT(sss);

  REP(i,N)
  {
    cout << sss[i].idx+1 << endl;
  }
}


Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
#include <algorithm>
#include <set>
using namespace std;

int main()
{
    int h,w;
    cin >> h >> w;
    vector<string> s(h);
    int i;
    for(i = 0;i < h;++i){
        cin >> s.at(i);
    }
    for(i = 0;i < h;++i){
        cout << s.at(i) << endl;
        cout << s.at(i) << endl;
    }
    return 0;
}

Measured memory_bytes: 256
#include <stdio.h>

#define N 200000
#define INF 0x3f3f3f3f3f3f3f3fLL

long long llabs(long long n) {
	return n < 0 ? -n : n;
}

int main() {
	static int aa[N];
	int n, i;
	long long snukesum, raccoonsum, min;

	scanf("%d", &n);
	raccoonsum = 0;
	for (i = 0; i < n; i++) {
		scanf("%d", &aa[i]);
		raccoonsum += aa[i];
	}
	snukesum = 0;
	min = INF;
	for (i = 0; i < n - 1; i++) {
		long long diff;

		snukesum += aa[i];
		raccoonsum -= aa[i];
		diff = llabs(snukesum - raccoonsum);
		if (min > diff)
			min = diff;
	}
	printf("%lld\n", min);
	return 0;
}


Measured memory_bytes: 896
#include <iostream>

using namespace std;

int N, M, a[100005], b[100005];

int c[100005];

int main(void) {

	cin >> N >> M;

	for (int i = 1; i <= M; i++) {
		cin >> a[i] >> b[i];
	}

	for (int i = 1; i <= M; i++) {
		c[a[i]]++; c[b[i]]++;
	}

	int ans = 1;

	for (int i = 1; i <= N; i++) {
		if (c[i] % 2 == 1) { ans = 0; }
	}

	if (ans == 1) { cout << "YES" << endl; }
	else { cout << "NO" << endl; }

	//system("pause");
	return 0;
}

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

signed main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int &i : a) cin >> i;
  long long ans = 0;
  int max_tall = a[0];
  for (int i = 1; i < n; i++) {
    if (a[i] < max_tall) {
      ans += max_tall - a[i];
    } else {
      max_tall = a[i];
    }
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 4044
using System;

class Program
{
	static void Main(string[] args)
	{
		int a, b;

		string[] s = Console.ReadLine().Split(' ');

		// int a = int.Parse(Console.ReadLine());

		a = int.Parse(s[0]);
		b = int.Parse(s[1]);

		if (a == b)
		{
			Console.WriteLine("a == b");
		}
		else if (a > b)
		{
			Console.WriteLine("a > b");
		}
		else
		{
			Console.WriteLine("a < b");
		}

		//Console.WriteLine("");


	}
}

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

#define REP(i, start, count) for(int i=(start); i<(int)(count); ++i)
#define rep(i, count) REP(i, 0, count)
#define ALLOF(c) (c).begin(), (c).end()

typedef long long ll;
typedef unsigned long long ull;

constexpr ll MOD = 1000000007;

int N, K;


int main(void) {


    cin >> N >> K;

    ll ans = 0;
    
    ll l = 0, r = 0;
    for(int i = 0; i < K; ++i) {
        l = (l + i);
        r = (r + N - i);
    }

    for(int i = K; i <= N + 1; ++i) {
        ans = (r - l + 1 + ans) % MOD;
        l = (l + i);
        r = (r + N - i);
    }

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

Measured memory_bytes: 3632
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) {
    	FastScanner sc = new FastScanner(System.in);
    	String str = sc.nextToken();
    	char[] s = str.toCharArray();
    	boolean flag = true, existC = false;
    	if(s.length < 4 || s.length > 10 || s[0] != 'A')
    		flag = false;
    	for(int i = 1; i < s.length && flag; ++i) {
    		if(s[i] <= 'z' && s[i] >= 'a')
    			continue;
    		else if(s[i] == 'C') {
    			if(!existC && i > 1 && i < s.length-1)
    				existC = true;
    			else
    				flag = false;
    		} else {
				flag = false;
			}
    	}
    	if(flag && existC)
    		System.out.println("AC");
    	else
    		System.out.println("WA");
    }
}

class FastScanner {
    BufferedReader br;
    StringTokenizer st;
    boolean hasNext;

    public FastScanner(InputStream is) {
        br = new BufferedReader(new InputStreamReader(is));
        hasNext = true;
    }

    public String nextToken() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(br.readLine());
            } catch (Exception e) {
                hasNext = false;
                return "##";
            }
        }
        return st.nextToken();
    }

    String next = null;
    public boolean hasNext(){
        next = nextToken();
        return hasNext;
    }

    public int nextInt() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Integer.parseInt(more);
    }

    public long nextLong() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Long.parseLong(more);
    }

    public double nextDouble() {
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return Double.parseDouble(more);
    }

    public String nextString(){
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return more;
    }

    public char nextChar(){
        if (next == null){
            hasNext();
        }
        String more = next;
        next = null;
        return more.charAt(0);
    }
}

Measured memory_bytes: 22612
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);

		String str = sc.next();
		char[] alpha = new char[128];
		for(int i = 0; i < str.length(); i++){
			alpha[str.charAt(i)]++;
		}

		if((alpha['N'] != 0 && alpha['S'] == 0) || (alpha['S'] != 0 && alpha['N'] == 0) || (alpha['E'] != 0 && alpha['W'] == 0) ||(alpha['W'] != 0 && alpha['E'] == 0)){
			System.out.println("No");
		}
		else{
			System.out.println("Yes");
		}
	}

}


Measured memory_bytes: 27024
N = int(input())
A = list(map(int, input().split()))
X = [0]* N
for i in range(N):
    X[A[i]-1] += 1
answer = 0
for i in range(N):
    x = X[i]
    answer += x*(x-1)/2
[print(int(answer+1-X[A[i]-1])) for i in range(N)]

Measured memory_bytes: 26268
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define in insert
#define PI 3.1415926535897932384626433832795
#define F first
#define S second
#define aLL(str) (str).begin(), (str).end()
#define IOS                  \
	ios::sync_with_stdio(0); \
	cin.tie(0);              \
	cout.tie(0)
#define ll long long
#define ld long double
#define lcm(a, b) (a * b) / __gcd(a, b)
#define flu(i, a, b) for (ll i = a; i < b; i++)
#define blu(i, a, b) for (ll i = a; i >= b; i--)
#define upper(s) transform(s.begin(), s.end(), s.begin(), ::toupper)
#define lower(s) transform(s.begin(), s.end(), s.begin(), ::tolower)
#define Unique(X) (X).erase(unique(all(X)), (X).end())
#define all(v) v.begin(), v.end()
typedef vector<ll> vl;
typedef map<ll, ll> ml;
typedef vector<string> vs;
typedef vector<vector<int>> vvi;
char e = '\n';
ll MOD = 1e9 + 7;
ll i, j, le;
int main()
{
	IOS;
	int t;
	//cin >> t;
	t=1;
	while (t--)
	{
		ll n;
		cin>>n;
		flu(i,0,n)cout<<"ACL";
	}
}


Measured memory_bytes: 3592
using System;

namespace ITP1_1_A
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] strs=Console.ReadLine().Split(' ');
            int a = int.Parse(strs[0]);
            int b = int.Parse(strs[1]);
            Console.WriteLine("{0} {1}", a * b, (a + b) << 1);
        }
    }
}

Measured memory_bytes: 9008
import sys
import math

#https://atcoder.jp/contests/agc008/submissions/15248942
sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

A,B = inm()

if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")

Measured memory_bytes: 9092
N,X,Y = map(int,input().split())
X -= 1
Y -= 1
aggre= [0] * (N - 1)

for i in range(N):
  for j in range(N):
    if i == j:
      continue
    dist = min(abs(j - i),abs(X - i) + abs(Y - j) + 1,abs(Y - i) + abs(X - j) + 1)
    #if dist >= N // 2:
      #print("dist i j",dist,i,j)
    aggre[dist - 1] += 1
    
#ans = [i // 2 for i in aggre]
for a in aggre:
  print(a // 2)

Measured memory_bytes: 52444
#include <stdio.h>
int main() {
	int a, b, c;
	scanf("%d%d%d", &a, &b, &c);

	for (int i = 1; i < b + c; i++)
	{
		if ((a * i)%b == c)
		{
			printf("YES");
			return 0;
		}
	}
	printf("NO");
	return 0;
}

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

#define ln                '\n'
#define all(dat)           dat.begin(), dat.end()
#define loop(i, to)        for (int i = 0; i < to; ++i)
#define cont(i, to)        for (int i = 1; i <= to; ++i)
#define circ(i, fm, to)    for (int i = fm; i <= to; ++i)
#define foreach(i, dat)    for (__typeof(dat.begin()) i = dat.begin(); i != dat.end(); ++i)

typedef long long          num;

using namespace std;

const int nsz = 3e3, mod = 1e9 + 7;
int n, dp[nsz + 5][nsz + 5], pre[nsz + 5][nsz + 5], ans;
string s;

int inline upd(int &a, int b) {
    (a += b) && a >= mod && (a -= mod);
}

int inline modulo(int a) {
    return (a % mod + mod) % mod;
}

int inline qry(int i, int l, int r) {
    return modulo(pre[i][r] - pre[i][l - 1]);
}

int main() {
    ios::sync_with_stdio(0);
    cin >> n >> s;
    s = "  " + s;
    dp[1][1] = 1;
    cont (i, n) {
        pre[1][i] = pre[1][i - 1] + dp[1][i];
    }
    circ (i, 2, n) {
        cont (j, i) {
            dp[i][j] = (s[i] == '<') ? qry(i - 1, 1, j - 1) : qry(i - 1, j, n);
        }
        cont (j, n) {
            pre[i][j] = modulo(pre[i][j - 1] + dp[i][j]);
        }
    }
    cont (i, n) {
        upd(ans, dp[n][i]);
    }
    cout << ans << ln;
}

Measured memory_bytes: 70784
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<stdarg.h>
#include<malloc.h>

int main()
{
	char str[1024];
	int i;

	gets(str);
	for(i=0; i<1000; i++){
		if(str[i] == 'a' && str[i+1] == 'p' && str[i+2] == 'p' && str[i+3] == 'l' && str[i+4] == 'e'){
			str[i] = 'p'; str[i+1] = 'e'; str[i+2] = 'a'; str[i+3] = 'c'; str[i+4] = 'h';
		} else if(str[i] == 'p' && str[i+1] == 'e' && str[i+2] == 'a' && str[i+3] == 'c' && str[i+4] == 'h'){
			str[i] = 'a'; str[i+1] = 'p'; str[i+2] = 'p'; str[i+3] = 'l'; str[i+4] = 'e';
		}
	}
	printf("%s\n", str);
	return 0;
}

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

int main() {
  int k;
  cin >> k;
  int x[32] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51};
  cout << x[k-1] << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define ULL unsigned long long
#define mp make_pair
#define pb push_back
#define pii pair<int,int>
#define pll pair<LL,LL>
#define x first
#define y second
#define pi acosl(-1)
#define sqr(x) ((x)*(x))
#define pdd pair<double,double>
#define MEMS(x) memset(x,-1,sizeof(x))
#define MEM(x) memset(x,0,sizeof(x))
#define less Less
#define EPS 1e-4
#define arg ARG
#define cpdd const pdd
#define rank Rank
#define MXN 200005

int main(){
    char c[1005];
    scanf("%s",c+1);
    vector<int> v[26];
    for(int i = 0;i<26;i++) v[i].pb(0);
    for(int i = 1;c[i]!=0;i++){
        v[c[i]-'a'].pb(i);
    }
    int n=strlen(c+1);
    for(int i = 0;i<26;i++)v[i].pb(n+1);
    int ans=105;
    for(int i = 0;i<26;i++){
        int Max=0;
        for(int j = 0;j<v[i].size()-1;j++){
            Max=max(Max,v[i][j+1]-v[i][j]-1);
        }
        ans=min(ans,Max);
    } 
    printf("%d\n",ans);
}
/*

23847657 
23458792534

102334155
111111111 
111111111
*/

Measured memory_bytes: 256
//is there any case of -1 or any special corner cases ?
#include<bits/stdc++.h>
using namespace std;
#define int long long int 
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define vi vector<int>
#define pi pair<int,int>
#define all(v) v.begin(),v.end()
#define zeros(arr) memset(arr,0,sizeof(arr));
#define precise(num)  cout<<fixed; cout << std::setprecision(num)
#define nl cout<<"\n";
#define test int t;cin>>t;while(t--) 
const int maxx  = 1e6+1 , limit = 9*1e18 , MOD=1e9+7;

#define boost  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define endl '\n';

int32_t main(){
    boost;
    
    int  n ;
    cin>>n;
    int a[n+1];
    
    int cn[maxx];
    
    zeros(cn);
    for(int i =0 ; i < n ; i++ ){
        cin>>a[i];
        cn[a[i]]++;


    }
    // if(cn[1] ){
    //     cout<<0<<endl;
    //     return 0;
    // }
    
    int res = 0;
    for(int i= 0 ; i < n ; i ++ ){
        int num  = a[i];
        bool flg=false;
        cn[a[i]]--;
        for(int j = 1; j*j <= num ; j++  ){
            if(num%j == 0 ){
                int pre = num/j;
                if(cn[pre] || cn[j]){
                    flg=true;
                }
            }
            
        }
        cn[a[i]]++;
        if(!flg)res++;
    }
    cout<<res<<endl;
}

Measured memory_bytes: 13028
using System;
using System.Collections.Generic;
using System.Linq;
using static Atcoder;
using System.Threading.Tasks;
using System.ComponentModel;

public class Hello
{

    public static void Main()
    {
        int[] num = SpRead(' ').Select(a => int.Parse(a)).ToArray();
        int x = num[0];
        int y = num[1];
        int[] n = new int[3];
        bool[,] log = new bool[x, y];
        for (int i = 0; i < num[2]; i++)
        {
            n = SpRead(' ').Select(a => int.Parse(a)).ToArray();
            if (n[2] == 1)
            {
                for (int j = 0; j < n[0]; j++)
                {
                    for (int k = 0; k < y; k++)
                    {
                        log[j, k] = true;
                    }
                }
            }
            else if (n[2] == 2)
            {
                for (int j = n[0]; j < x; j++)
                {
                    for (int k = 0; k < y; k++) log[j, k] = true;
                }
            }
            else if (n[2] == 3)
            {
                for (int j = 0; j < n[1]; j++)
                {
                    for (int k = 0; k < x; k++) log[k, j] = true;
                }
            }
            else if (n[2] == 4)
            {
                for (int j = n[1]; j < y; j++)
                {
                    for (int k = 0; k < x; k++)
                    {
                        log[k, j] = true;
                    }
                }
            }

        }
        int count = 0;
        for (int i = 0; i < x; i++)
        {
            for (int j = 0; j < y; j++)
            {
                if (log[i, j]) count++;
            }
        }
        Console.WriteLine(x*y-count);
    }
}



public class Atcoder
{
    static void Swap<T>(ref T a, ref T b)
    {
        var t = a;
        a = b;
        b = t;
    }
    public static int LCM(int a, int b)
    {
        int c = a * b;
        if (a < b) Swap(ref a, ref b);
        int d = a % b;
        while (d != 0)
        {
            a = b;
            b = d;
            d = a % b;
        }
        return c / b;
    }
    public static string strReverce(string s)
    {
        return new string(s.Reverse().ToArray());
    }
    public static int Cin()
    {
        return int.Parse(Console.ReadLine());
    }
    public static bool IsPrime(int n)
    {
        if (n < 2) return false;
        if (n == 2) return true;
        if (n % 2 == 0) return false;

        //double sqrtNum = Math.Sqrt(n);
        for (int i = 3; i < n; i += 2)
        {
            if (n % i == 0) return false;
        }
        return true;
    }
    public static string[] SpRead(char c)
    {
        return Console.ReadLine().Split(c);
    }
}


Measured memory_bytes: 13376
import Data.List
main=getLine>>=putStr.unwords.map show.q 0.group
q _[]=[]
q 0(g:s)=q(length g)s
q n(g:s)=replicate(n-1)0++(a+m-b):(b+n-a):replicate(m-1)0++q 0 s where
  [a,b] = map(`div`2)[n+1,m+1]
  m=length g

Measured memory_bytes: 8444
N = int(input())
S = input()

r = 0
g = 0
b = 0

for i in range(N):
  if S[i] == "R":
    r += 1
  elif S[i]== "G":
    g += 1
  else:
    b += 1
         
a = 0         
         
for i in range(N):
  for j in range(i+1,N):
    k = 2*j - i
    if k < N:
      if S[i] != S[j] and S[i] != S[k] and S[j] != S[k]:
        a += 1
      
print(r*g*b - a)

Measured memory_bytes: 9220
#include <iostream>
#include <queue>
#include <utility>
#include <algorithm>
#include <string>

using namespace std;

int main () {
  cin.tie(0);
  string s;
  cin >> s;
  
  int odd[2] = {};
  int even[2] = {};
  
  for (int i = 0; i < (int)s.length(); i++) {
    if (i % 2 == 0) {
      if (s[i] == '0') {
        even[0]++;
      } else {
        even[1]++;
      }
    } else {
      if (s[i] == '0') {
        odd[0]++;
      } else {
        odd[1]++;
      }
    }
  }
  
  if (odd[0] + even[1] > odd[1] + even[0]) {
    cout << ((int)s.length())-odd[0]-even[1] << "\n";
  } else {
    cout << ((int)s.length())-odd[1]-even[0] << "\n";
  }
}

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

#define INF 1234567890
#define ll long long
#define MOD 998244353

int A, B, C, D;
ll dp[3030][3030];

int main()
{
	scanf("%d %d %d %d", &A, &B, &C, &D);
	for(int i=A; i<=C; i++)
		for(int j=B; j<=D; j++)
		{
			if (i == A && j == B)
			{
				dp[i][j] = 1;
				continue;
			}
			dp[i][j] = dp[i-1][j]*j + dp[i][j-1]*i - dp[i-1][j-1]*(i-1)*(j-1);
			dp[i][j] %= MOD;
		}
	ll res = dp[C][D];
	res += MOD; res %= MOD;
	printf("%lld\n", res);
	return 0;
}

Measured memory_bytes: 74824
#include <bits/stdc++.h>
#define FOR(i,b,e) for (common_type_t<decltype(b),decltype(e)> i = (b), i ## __end = (e); i < i ## __end; ++ i)
#define rep(i,n)   FOR (i, size_t{}, n)
#define ALL(x)     begin (x), end (x)
using namespace std;
using ll = int64_t;
constexpr ll inf = 2e18;
constexpr size_t invalid = ~0ull;

inline auto operator << (ostream & out, const vector <ll> & v) -> decltype (auto)
{
  out << '[';
  auto ite = begin (v);
  auto last = end (v);
  if (ite != last) out << * ite ++;
  while (ite != last) out << ", " << * ite ++;
  out << ']';
  return out;
}

auto main () -> int
{
  cin.tie (nullptr);
  ios::sync_with_stdio (false);

  size_t n;
  cin >> n;
  vector <ll> p (n), q (n);
  rep (i, n) cin >> p [i];
  rep (i, n) cin >> q [i];

  if (q < p) p.swap (q);

  ll p_i = 0;
  ll q_i = 0;

  vector <ll> v (n);
  iota (ALL (v), 1);
  ll i = 1;
  do
  {
    if (p_i == 0 && p == v) p_i = i;
    if (q_i == 0 && q == v) q_i = i;
    ++ i;
  } while (next_permutation (ALL (v)));

  cout << q_i - p_i << endl;
}


Measured memory_bytes: 256
n = int(input())
x_li = list(map(int,input().split()))
x_li.sort()
res = []
for x in range(x_li[0],x_li[-1]+1):
    ans = 0
    for y in x_li:
        ans+=(x-y)**2
    res.append(ans)
print(min(res))

Measured memory_bytes: 3060
#include<iostream>
#include<algorithm>
#include<math.h>
#include<cstdio>
#include<ctype.h>
#include<stdio.h>
#include<set>
#include<vector>
#include<map>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<numeric>
#include<string>
using namespace std;
typedef long long ll;

ll ds(ll digit) {
	ll res = 0;
	while (digit!=0) {
		res += digit % 10;
		digit /= 10;
	}
	return res;
}
ll MOD = 1000000007;
int main() {
	string S;
	cin>>S;
	ll cnt = 0;
	for (ll i = 0; i+1<S.size();++i) {
		if (S[i]=='A'&&S[i+1]=='C')
        {++cnt;}
	}
	if (cnt > 0)
		cout << "Yes" << endl;
	else
	cout << "No" << endl;}



Measured memory_bytes: 256
#include<iostream>
#include<vector>
#include<list>
#include<string>
#include<algorithm>
#include<map>
#include<cmath>
#include<set>
using namespace std;
int main() {
	int n, s;
	while (cin >> n >> s&&n != 0 && s != 0) {
		int r[20000];
		for (int i = 0; i < n; i++) cin >> r[i];
		sort(r, r + n);
		reverse(r, r + n);
		int sum = 0;
		for (int i = 0; i < n; i++) {
			if (r[i]*2<=s) break;
			for (int j = i+1; j < n; j++) {
				if (r[i] + r[j] > s) {
					sum++;
				}
				else break;
			}
		}
		cout << sum << endl;
	}
}

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

int main()
{
	int n, m;
	cin >> n >> m;
	vector<vector<int>> ss(m);
	for (auto &&s : ss)
	{
		int k;
		cin >> k;
		for (int i = 0; i < k; i++)
		{
			int x;
			cin >> x;

			x--;
			s.emplace_back(x);
		}
	}
	vector<int> ps(m);
	for (auto &&p : ps)
	{
		cin >> p;
	}

	int ans = 0;

	for (int S = 0; S < (1 << n); S++)
	{
		vector<int> qs(m, 0);
		for (int i = 0; i < m; i++)
		{
			for (auto &&x : ss[i])
			{
				if (S & (1 << x))
				{
					qs[i]++;
				}
			}
		}

		bool f = true;
		for (int i = 0; i < m; i++)
		{
			f &= (ps[i] == (qs[i] % 2));
		}

		if (f)
		{
			ans++;
		}
	}

	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main(){
    int n,k;
    cin>>n>>k;
    vector<int> l(n);
    for(int i = 0; i < n; i++)
        cin>>l[i];
    sort(l.begin(),l.end(),greater<int>());
    int sum = 0;
    for(int i = 0; i < k; i++)
        sum += l[i];
    cout<<sum;
}

Measured memory_bytes: 256
/*
If you want to aim high, aim high
Don't let that studying and grades consume you
Just live life young
******************************
What do you think? What do you think?
1st on Billboard, what do you think of it
Next is a Grammy, what do you think of it
However you think, I’m sorry, but shit, I have no fcking interest
*******************************
I'm standing on top of my Monopoly board
That means I'm on top of my game and it don't stop
til my hip don't hop anymore
https://www.a2oj.com/Ladder16.html
*******************************
Shining through the city with a little funk and soul
*******************************
300iq as writer = Sad!
*/
import java.util.*;
import java.io.*;
import java.math.*;

   public class Main
   {
      public static void main(String hi[]) throws Exception
      {
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         String input = infile.readLine();
         if(input.charAt(input.length()-1) == 's')
            input += 'e';
         System.out.println(input+"s");
      }
   }

Measured memory_bytes: 36352
n = int(input())
ans=0

if n == 1:
  print(0)
  quit()

for i in range(1, n):
  #余り、商がiになるmを求める。mが整数で、余りより大きければ答えに加える。
  #iは単調増加、mは単調減少だから、mが余りより小さくなったら打ち切る。
  temp=n-i
  syou=temp/i
  if syou>i:
    if syou.is_integer():
      ans+=int(syou)
  else:
    break
print(ans)

Measured memory_bytes: 9120
//BISMILLAHIR RAHMANIR RAHIM
//RHYTHM_086_NS_01
//ALAN_IS_ON....



#include <bits/stdc++.h>

//define

#define                boost_                         ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define                iter_(i,n)                     for (int i = 0; i < int(n); i++)
#define                for_n(i, n)                    for (int i = 1; i <= int(n); i++)
#define                pb                             push_back
#define                mp                             make_pair
#define                itr                            ::iterator
#define                s_sort(s)                      sort(s.begin(),s.end())
#define                n_sort(a)                      sort(a,a+n)
#define                thank_you                      return 0
#define                thanks                         return
#define                pii                            pair<int,int>
#define                precise_impact                 cout<<setprecision(10)<<fixed;

using namespace std;

//data type
typedef long long int ll;
typedef unsigned long long int ulli;
typedef double db;


//constants
#define PI acos(-1.00)
#define MOD 1000000007

ll bigmod(ll a,ll b){
    if(b==0){
        return 1;
    }
    ll tm=bigmod(a,b/2);
    tm=(tm*tm)%MOD;
    if(b%2==1)
        tm=(tm*a)%MOD;
    return tm;

}
int egcd(int a,int b,int &x,int &y){
    if(a==0){
        x=0;
        y=1;
        return b;
    }
    int x1,y1;
    int d=egcd(b%a,a,x1,y1);
    x=y1-(b/a)*x1;
    y=x1;
    return d;
}

void solve();


int main()
{
    boost_;
    precise_impact;
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    //Here we go...
    int t=1;
    //cin>>t;
    while(t--)
        solve();

    thank_you;
}


void solve()
{
    int n,m;
    cin>>n>>m;
    if(n==m)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;


}



Measured memory_bytes: 3612
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> P;
typedef pair<int,int> Pi;
#define rep(i,n) for(ll i=0;i<n;i++)
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define fi first
#define se second
#define endl "\n"

template<typename T> inline bool chmax(T &a, T b){if(a<b){a=b;return true;}return false;}
template<typename T> inline bool chmin(T &a, T b){if(a>b){a=b;return true;}return false;}
template<typename T> ostream& operator<<(ostream& s,const complex<T>& d) {return s<<"("<<d.real()<<", "<<d.imag()<< ")";}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const pair<T1,T2>& d) {return s<<"("<<d.first<<", "<<d.second<<")";}
template<typename T> ostream& operator<<(ostream& s, const vector<T>& d){int len=d.size();rep(i,len){s<<d[i];if(i<len-1) s<<" ";}return s;}
template<typename T> ostream& operator<<(ostream& s,const vector<vector<T>>& d){int len=d.size();rep(i,len){s<<d[i]<<endl;}return s;}
template<typename T> ostream& operator<<(ostream& s,const set<T>& v){s<<"{ ";for(auto itr=v.begin();itr!=v.end();++itr) {if (itr!=v.begin()) {s<< ", ";}s<<(*itr);}s<<" }";return s;}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const map<T1,T2>& m){s<<"{"<<endl;for(auto itr=m.begin();itr!=m.end();++itr){s<<" "<<(*itr).first<<" : "<<(*itr).second<<endl;}s<<"}"<<endl;return s;}

const ll mod=1e9+7;
const ll inf=1e17;
const int INF=1e9;
const double PI=acos(-1);
const double EPS=1e-10;

int main(){
	cin.tie(0);ios::sync_with_stdio(false);
	ll n;
	cin>>n;
	ll keta=to_string(n).size();
	ll ans=0;
	auto dfs=[&](auto &dfs,int d,string now)->void{
		set<char> cnt;
		rep(i,now.size()) cnt.insert(now[i]);
		if(cnt.size()==3 && stoll(now)<=n){
			ans++;
		}
		if(d==keta) return;
		dfs(dfs,d+1,now+char(7+'0'));
		dfs(dfs,d+1,now+char(5+'0'));
		dfs(dfs,d+1,now+char(3+'0'));
	};
	dfs(dfs,0,"");
	cout<<ans<<endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pii pair<int,int>
#define pll pair<ll,ll>
#define rep(n) for(int i=0;i<n;i+=1)
#define prarr(a,n) rep(n) cout<<a[i]<<endl printf("%s\n"," " );
#define sc(a) scanf("%d",&a);
#define scl(a) scanf("%lld",&a);
#define scf(a) ascanf("%f",&a);
#define ff first
#define ss second
#define pu push_back
#define inf 1000000001
#define MOD 1000000007 
#define INF 100000000000001
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n;
    int c[51],v[51];
    cin>>n;
    rep(n)
    {
    	cin>>c[i];
    }
    int ans=0;
    rep(n) 
    {
    	cin>>v[i];
    	if(c[i]>v[i]) ans+=c[i]-v[i];
    }
    cout<<ans<<endl;
    return 0;

}
    

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

#define rep(i,n) for(int (i)=0; (i)<(int)(n); (i)++)
#define all(x) (x).begin(), (x).end()
#define SQR(x) (x)*(x)
#define CEIL(a,b) ((a)+(b)-1) /(b)

using ll = long long;
const int INF = 1001001001;

void sort_second(vector<pair<ll, ll>> &A, int N); //A:array of pair, N:size of array

int main() {
    int H, N, a, b;
    cin >> H >> N;
    vector<int> dp(H+10000+10, INF);
    dp[0] = 0;
    rep(i, N) {
        cin >> a >> b;
        rep(j, H+1) {
            dp[j+a] = min(dp[j+a], dp[j] + b);
        }
    }
    int ans = INF;
    rep(i, 10000) ans = min(ans, dp[i+H]);
    cout << ans << endl;
}

void sort_second(vector<pair<ll, ll>> &A, int N) {
    rep(i, N) swap(A.at(i).first, A.at(i).second);
    sort(all(A));
    rep(i, N) swap(A.at(i).first, A.at(i).second);
}

Measured memory_bytes: 384
#include <algorithm>
#include <bitset>
#include <boost/multiprecision/cpp_int.hpp>
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <set>
#include <numeric>
#include <sstream>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
#include<iomanip>
#include <cmath>
#define _USE_MATH_DEFINES
namespace mp = boost::multiprecision;
using namespace std;
using ull = unsigned long long;
using ld = long double;
using lll = boost::multiprecision::cpp_int;
using ll = long long;
#define FOR(i, N) for(ll i = 0; i < N; ++i)

#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
int main(){
  ll N, M;
  cin>>N>>M;
  vector<ll> A(M);
  ll sum=0;
  FOR(i,M){
    cin>>A[i];
    sum+=A[i];
  }
  cout<<std::max(-1ll,N-sum)<<endl;
}

Measured memory_bytes: 3176