akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file  
#include <ext/pb_ds/tree_policy.hpp>  
#include <functional> // for less  
using namespace         std;
#define                 int long long
#define                 double long double
#define                 pb push_back
#define                 mp make_pair
#define st(arr,a)       memset(arr,a,sizeof arr)
#define                 nl cout<<'\n'
#define bitcount(x)     __builtin_popcountll(x)
const int MOD = 1000000007ll;
#define forn(i,a,b)     for(int i=a;i<=b;i++)
#define rfor(i,a,b)     for(int i=a;i>=b;i--)
#define all(x)          x.begin() , x.end()
#define pi pair<int,int>
#define X first
#define Y second
#define N 101415
#define  vi vector<int>
#define  v  vector
#define die exit(0)
#define alln(arr) arr+1 , arr+1+n
using namespace __gnu_pbds;  
typedef tree<int, null_type, less<int>, rb_tree_tag,  
            tree_order_statistics_node_update> oset; 

int n,m,k,arr[N];
string s;
void solve()
{
    oset dc[30];
    cin>>n;
    cin>>s;
    n = s.size();
    s = '.'+s;
    forn(i,1,n)
    {
        dc[s[i]-'a'].insert(i);
    }
    int q;
    cin>>q;
    while(q--)
    {
        int a,b,c;char x;
        cin>>a>>b;
        if(a == 1)
        {
            cin>>x;
            c = x-'a';
            dc[s[b]-'a'].erase(b);
            dc[c].insert(b);
            s[b] = x;
        }
        else
        {
            cin>>c;
            c++;
            int ans = 0;
            forn(i,0,25)
            {
                int p = dc[i].order_of_key(c) - dc[i].order_of_key(b);
                if(p == 0);else ans++;
            }
            cout<<ans;nl;
        }
    }
}


signed main() 
{
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); 
    int t = 1;
    //cin>>t;
    forn(i,1,t)
    {
        solve();
        nl;
    }



    return 0;

}

//       clang++ c.cpp ; ./a.out < a.txt ;  


Measured memory_bytes: 32100
#include <bits/stdc++.h>
using namespace std;
struct _I { _I() {cin.tie(0);ios::sync_with_stdio(false);}} __I;
typedef long long ll;
typedef vector<ll> vll;
#define rep(i, n) for(int i = 0; i < (n); i++)

int main()
{
    int n; cin >> n;
    vll s(n);
    rep(i, n) {
        int a; cin >> a;
        s[i] = a + (i==0 ? 0 : s[i-1]);
    }

    ll ans[2] = {0, 0};
    ll change[2] = {0, 0};
    rep(i, n) {
        rep(j, 2) {
            ll sum = s[i]+change[j];
            bool positive = ((i+j)%2==0);
            if (sum == 0 || (sum < 0 && positive) || (sum > 0 && !positive)) {
                ll d = (positive ? 1 : -1) - sum;
                change[j] += d;
                ans[j] += abs(d);
            }
        }
    }
    
    cout << min(ans[0], ans[1]) << endl;
}


Measured memory_bytes: 1024
#include <iostream>
#include <vector>
#include <bitset>
#include <utility>
#include <string>
#include <queue>
#include <stack>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
 
using namespace std;
typedef long long ll;
 
int main(){
  int A,B,M;
  cin >> A >> B >> M;
  vector<int> a(A),b(B);
  for(int i=0;i<A;i++) cin >> a[i];
  for(int i=0;i<B;i++) cin >> b[i];
  
  int ans;
  ans=*min_element(a.begin(),a.end())
    +*min_element(b.begin(),b.end());

  int x,y,c;
  for(int i=0;i<M;i++){
    cin >> x >> y >> c;
    ans=min(ans,a[x-1]+b[y-1]-c);
  }

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


Measured memory_bytes: 1024
#include<bits/stdc++.h>
#define INF 9223372036854775807LL
#define inf 1000000007
#define SYOU(x) setprecision(x+1)
#define abs(x,y) (max(x,y)-min(x,y))
#define lol long long
#define mp make_pair
#define fi first
#define se second
using namespace std;
lol a,b,x,y;
lol i[100001];
signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    lol c,d=0,e=0,f=0,g=1,h=0;
    cin >>a;
    cout <<3*a*a<<'\n';
    return (0);
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int total = 0;
		for(int i = 0 ; i < 3; i++) {
			int num = sc.nextInt();

			if(num == 5 || num == 7) {
				total += num;
			}else {
				System.out.println("NO");
				return;
			}
		}

		if(total == 17) {
			System.out.println("YES");
		}else {
			System.out.println("NO");
		}
	}
}


Measured memory_bytes: 21972
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
 
using namespace __gnu_pbds;
using namespace std;
 
typedef   long long int ll;
typedef unsigned long long int sll;
typedef  double ld;
#define A 1000000007ll
#define B 998244353ll
#define C 1000000000000000000ll
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define pb push_back
#define mxe(v) *max_element(v.begin(),v.end())
#define mne(v) *min_element(v.begin(),v.end())
#define bs binary_search
#define lb lower_bound
#define ub upper_bound
#define ve vector
#define br break
#define PI 3.1415926535
 
int main() 
{
    FAST;
    ll n,m;
    cin>>n>>m;
    double a[n];
    double sum=0;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        sum+=a[i];
    }
    sum=sum/(4.0*m);
    ll x=0;
    for(int i=0;i<n;i++)
        if(a[i]>=sum)
            x++;
    if(x>=m)
        cout<<"Yes";
    else
        cout<<"No";
    return 0;
}

Measured memory_bytes: 256
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<utility>
#include<vector>
#include<queue>
#include<functional>
#include<map>
#include<set>
#include<cstring>
#include<string>
#include<stack>
#include<math.h>
#include<stdlib.h>
using namespace std;
#define int long long
typedef pair<int, int> pii;
typedef pair<int, pii > piii;
typedef pair<double, double> pdd;
typedef pair<int, char> pic;
typedef priority_queue<pii, vector<pii>, greater<pii> > RPQ;
#define mk make_pair
#define INF (1 << 30)
#define INFL (1ll << 60ll)
#define mod 1000000007

int N;
char S[220][220];
vector<int> G[220];
int d[220][220];

signed main(){
    cin >> N;
    for(int i = 0; i < N; i++){
        for(int j = 0; j < N; j++){
            cin >> S[i][j];
            if(S[i][j] == '1'){
                G[i].push_back(j);
            }
        }
    }
    memset(d, -1, sizeof(d));
    for(int i = 0; i < N; i++){
        queue<int > que;
        que.push(i);
        d[i][i] = 1;
        while(!que.empty()){
            int cur = que.front();
            que.pop();
            for(int j = 0; j < (int)G[cur].size(); j++){
                int to = G[cur][j];
                if(d[i][to] < 0){
                    d[i][to] = d[i][cur] + 1;
                    que.push(to);
                }
            }
        }
    }
    int ans = -1;
    for(int i = 0; i < N; i++){
        bool flag = true;
        int ma = -1;
        for(int j = 0; j < N; j++){
            for(int k = 0; k < N; k++){
                if(S[j][k] == '1'){
                    if(!(d[i][j] == d[i][k] + 1 || d[i][j] + 1 == d[i][k])){
                        flag = false;
                    }
                }
            }
            ma = max(ma, d[i][j]);
        }
        if(flag){
            ans = max(ans, ma);
        }
    }
    if(ans < 0){
        printf("-1\n");
    }
    else {
        cout << ans << endl;
    }



    return 0;
}

/*

*/

Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
int main(void) {
    std::ios::sync_with_stdio(false);
    cin.tie(0);
    int n, x;
    while(cin >> n) {
        int tot = 1, ans = 1;
        for(int i = 1; i <= n; ++i) {
            cin >> x;
            if(!(x & 1)) ans <<= 1;
            tot *= 3;
        }
        cout << tot - ans << endl;
    }
}


Measured memory_bytes: 256
#include<stdio.h>
#include<string.h>

int main(void){
  char s[120];
  int len,i,cnt;
  
  scanf("%s",&s);
  len = strlen(s);
  i = 0;
  cnt = 0;
  
  while(i < len-i-1){
    if(s[i] != s[len-i-1]){
      cnt++;
    }
    i++;
  }
  
  printf("%d",cnt);
  return 0;
}

Measured memory_bytes: 128
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <list>
#include <utility>
#include <tuple>
#include <cstdio>
#include <set>
#include <queue>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <cctype>
#include <cmath>
#include <limits>
#include <iomanip>
#define _GLIBCXX_DEBUG
#define rep(i,n) for(int i=0;i<(n);++i)
using namespace std;
const long long INF = 1LL << 60;
typedef long long ll;
int main() {
    int N;
    cin >> N;
    vector<int> a(N+1);
    for(int i=1;i<=N;i++){
        cin >> a[i];
    }
    bool frg = false;
    int num;
    int cnt;
    for(int i=0;i<=N;i++){
        if(i==0){
            num=1;
        }
        else{
            num = a[num];
            cnt++;
            if(num==2){
                frg = true;
                break;
            }
        }
    }
    if(frg){
        cout << cnt << endl;
    }
    else{
        cout << -1 << endl;
    }
}

Measured memory_bytes: 3784
#include<iostream>
#include<algorithm>
#include<bitset>
#include<cmath>
#include<complex>
#include<deque>
#include<functional>
#include<iomanip>
#include<iostream>
#include<iterator>
#include<map>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<vector>

using namespace std;
typedef long long int ll;


ll N;
string S;
ll r[4005],g[4005],b[4005];
int main(){
    cin>>N;
    cin>>S;
    for(int i=0;i<N;++i){
        if(S[i]=='R')r[i]++;
        else if(S[i]=='G')g[i]++;
        else if(S[i]=='B')b[i]++;
        if(i!=0){
            r[i]+=r[i-1];
            g[i]+=g[i-1];
            b[i]+=b[i-1];
        }
    }
    ll ans=0LL;
    for(int i=0;i<N-2;++i){
        for(int j=i+1;j<N-1;++j){
            string s="";
            s+=S[i];
            s+=S[j];
            sort(s.begin(),s.end());
            if(s=="BG")ans+=r[N-1]-r[j];
            else if(s=="BR")ans+=g[N-1]-g[j];
            else if(s=="GR") ans+=b[N-1]-b[j];
            if(s[0]!=s[1]&&2*j-i<=N-1){
                s+=S[2*j-i];
                sort(s.begin(),s.end());
                if(s=="BGR")ans--;
            }
        }
    }

   cout<<ans<<endl;

}

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

int main() {
  int N;
  int num = 0;
  cin >> N;
  
  for(int i = 0; i < N; i++){
    int r, l;
    cin >> r >> l;
    num += l - r + 1;
  }
  cout << num << endl;
}

Measured memory_bytes: 3604
#include<bits/stdc++.h> 
  
using namespace std; 
  
// Returns (a * b) % mod 
int main()
{ 
   int n,m;
   cin>>n>>m;int cnt=0;
   if(n>=2)
   {
   	n=n*(n-1);
   	n=n/2;cnt=cnt+n;

   }
   if(m>=2)
   {
   	m=m*(m-1);
   	m=m/2;
   	cnt=cnt+m;
   }
   cout<<cnt<<endl;
    
} 

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

typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

using namespace std;

#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i <= b; i++)
#define all(a)  begin((a)),end((a))
#define uniq(c) (c).erase(unique(all((c))), end((c)))
#define each(i, map) for (auto& i : map)

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

    for (int i = A; i <= B; i++) {
        if (i % K == 0) {
            cout << "OK" << endl;
            return 0;
        }
    }

    cout << "NG" << endl;
}

Measured memory_bytes: 3608
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <queue>
#include <stack>
#include <cstdlib>
#include <map>
#include <iomanip>
#include <set>
#include <stdio.h>
#include <ctype.h>
#include <random>
#include <string.h>
#include <cmath>
#include <unordered_map>
#include <cstdio>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long ll;

ll gcd(ll x, ll y) {
	if (y == 0)return x;
	return gcd(y, x%y);
}
ll lcm(ll x, ll y) {
	return x / gcd(x, y)*y;
}
ll kai(ll x, ll y, ll m) {
	ll res = 1;
	for (ll i = x - y + 1; i <= x; i++) {
		res *= i; res %= m;
	}
	return res;
}
ll mod_pow(ll x, ll y, ll m) {
	ll res = 1;
	while (y > 0) {
		if (y & 1) {
			res = res * x % m;
		}
		x = x * x % m;
		y >>= 1;
	}
	return res;
}

ll comb(ll x, ll y, ll m) {
	if (y > x)return 0;
	return kai(x, y, m) * mod_pow(kai(y, y, m), m - 2, m) % m;
}

string s, t;
int ans;

signed main() {
	cin >> s >> t;
	for (int i = 0; i < (int)s.size(); i++)if (s[i] != t[i])ans++;
	cout << ans << endl;
}

Measured memory_bytes: 3892
#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  long long sum = 0;
  vector<long long>A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
    sum += A.at(i);
  }
  
  long long half = 0;
  long long d1,d2;
  for (int i = 0; i < N; i++) {
    half += A.at(i);
    if (half*2 == sum){
      cout << 0 << endl;
      return 0;
    }
    else if (half*2 > sum){
      d1 = half*2 - sum;
      d2 = sum - half*2 + A.at(i)*2;
      cout << min(d1,d2) << endl;
      return 0;
    }
  }
}
      

Measured memory_bytes: 4836
use std::cmp::max;

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

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $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, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        n: usize,
        a: [usize; n],
    }
    let mut l = vec![0; n];
    let mut r = vec![0; n + 1];
    for i in 0..n - 1 {
        l[i + 1] = gcd(&a[i], &l[i]);
        r[n - i - 1] = gcd(&a[n - 1 - i], &r[n - i]);
    }
    let mut ans = 0;
    for i in 0..n {
        ans = max(ans, gcd(&l[i], &r[i + 1]))
    }
    println!("{}", ans);
}

// O(log(N))
fn gcd(a: &usize, b: &usize) -> usize {
    if *a == 0 {return *b}
    if *b == 0 {return *a}
    let (mut x, mut y) = if a < b { (*b, *a) } else { (*a, *b) };
    let mut r = x % y;
    while r != 0 {
        x = y;
        y = r;
        r = x % y;
    }
    y
}


Measured memory_bytes: 6396
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

s=list(input().rstrip())
for i in range(len(s)):
    if s[i]=="A":
        st=i
        break
for i in range(len(s)):
    if s[i]=="Z":
        stop=i
print(stop-st+1)

Measured memory_bytes: 5220
//templates
#include <iostream>
#include <algorithm>
#include <string>
#include <numeric>
#include <vector>
#include <unordered_map>
#include <map>
#include <cmath>
#include <iomanip>
#include <bitset>
#include <sstream>
#include <queue>
#define rep(i,n) for(int i = 0; i < (n); i++)
#define ALL(x) (x).begin(),(x).end()
#define sort_key(struct_name,key_name) [](const struct_name &x, const struct_name &y){return x.key_name < y.key_name;}
#define pb(x) push_back(x)
typedef long long ll;
const long long MOD = 1e9 + 7;
using namespace std;

//main
int main(){
    int N; cin >> N;
    string S; cin >> S;
    int c = 0;
    for(int i=1; i<N; i++){
        if(S[i]==S[i-1]) c += 1;
    }
    cout << N-c << endl;
}


Measured memory_bytes: 512
import collections

N=int(input())
s=[[] for _ in range(N)]

for i in range(N):
    s[i]=input()

p=101
ha=[0]*N
for i in range(N):
    for j in range(len(s[i])):
        ha[i]+=pow(p,(ord(s[i][j])-ord("a")))
c=collections.Counter(ha)

ans=0
for n in c.values():
    ans+=(n*(n-1))//2
print(ans)

Measured memory_bytes: 83104
import java.util.Scanner;
public class Main {
	public static int GCD(int a,int b) {
		int c;
		while(a%b!=0) {
			c = a%b;
			a = b;
			b = c;
		}
		return b;
	}
	public static int LCM(int a,int b) {
		return a/GCD(a,b)*b;
	}
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int x,y;    //变量
		while(in.hasNext()) {
			x = in.nextInt();
			y = in.nextInt();
			System.out.println(GCD(x,y)+" "+LCM(x,y));
		}
		in.close();
	}
}


Measured memory_bytes: 26088
#include<iostream>
#include <algorithm>
#include<vector>
#include<map>
#include <set>
#include<string>
#include <queue>
#include <stack>
#include <random>
#define INF 1000000001
#include<iostream>
#include<vector>
using ll = long long;

int main()
{    

    int N, M;
    std::cin >> N >> M ;
    bool edge[N][N];
    for(int i = 0; i < N; ++i){
        for(int j = 0; j < N; ++j){
            edge[i][j] = false;
        }
    }

    for(int i = 0; i < M; ++i){
        int from, to;
        std::cin >> from >> to;
        edge[from - 1][to-1] = true;
        edge[to-1][from-1] = true;
    }


    int node[N];
    for(int i = 0; i < N; ++i){
        node[i] = i;
    }

    int cnt = 0;
    do{
        if(node[0] != 0) break;
        // for(int k = 0; k < N; ++k){
        //     std::cout << node[k];
        // }
        // std::cout << "\n";

        bool fail = false;
        for(int i = 0; i < N-1; ++i){
            if(!edge[node[i]][node[i+1]]){
                fail = true;
                break;
            }
        }
        if(!fail){
             cnt++;
             
        }
    }while(std::next_permutation(node, node + N));
    
   
   std::cout << cnt << std::endl;
   return 0;
    
}



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

#define int long long

#define rep(i,s,n) for(int i = s;i<n;i++)
#define repe(i,s,n) for(int i = s;i<=n;i++)
#define rrep(i,s,n) for(int i = (n)-1;i>=(s);i--)
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define fi first
#define se second
#define chmin(a,b) a=min((a),(b))
#define chmax(a,b) a=max((a),(b))
typedef long long ll;
typedef pair<int,int>pint;
typedef vector<int>vint;
typedef vector<pint>vpint;
typedef pair<pint,int> P1;
typedef pair<int,pint> P2;
typedef pair<pint,pint> PP;
static const ll maxLL = (ll)1 << 62;
const ll MOD=1000000007;
const ll INF=1e18;

int X,Y;
    
signed main(){
    cin.tie(0);
	ios::sync_with_stdio(false);
    cin>>X>>Y;
    cout<<X+Y/2<<endl;
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    return 0;
}

Measured memory_bytes: 764
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <climits>
#include <cstdlib>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define DEBUG 1
using namespace std;
constexpr int kMod = 1000000007;
typedef long long LL;

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

int main() {
  int N; cin >> N;
  vector<LL> a(N); cin >> a;

  set<int> b;
  for (int i = N; i > 0; --i) {
    LL cnt = 0;
    for (int j = 2; i * j <= N; ++j) {
      if (b.count(i * j)) ++cnt;
    }
    cnt %= 2;
    if (cnt != a[i-1]) {
      b.insert(i);
    }
  }

  if (b.size() == 0) cout << 0 << endl;
  else {
    cout << b.size() << endl;
    for (int x : b) cout << x << " ";
    cout << endl;
  }
}


Measured memory_bytes: 10392
#include <bits/stdc++.h>
#define repr(i,from,to) for(int (i)=(from);(i)<(to);(i)++)
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
// const bool debug=true;
const bool debug=false;
#define DEBUG if(debug==true)
#define vprint(x) for(auto a:(x)) cout << x << endl;
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const ll MOD = 1000000007;
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) { a = b; return true;}
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) { a = b; return true;}
    return false;
}
int main(void) {
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n,a,b;cin>>n>>a>>b;
    if (n+1<a+b||n>a*b) {
        cout << -1 << endl;
        return 0;
    }

    bool flg = a > b;
    ll mx = max(a,b), mn=min(a,b);
    vector<ll> resv;
    rep(i,mx) {
        resv.push_back(mx-i);
    }
    if (mn==1) {
        if (flg) reverse(begin(resv), end(resv));
        rep(i,resv.size()) {
            cout << resv[i];
            cout << (i==resv.size()-1 ? "\n" : " ");
        }
        return 0;
        
    }
    ll base = mx;
    ll n_splt = (n-mx) / (mn-1);
    ll res = (n-mx) % (mn-1);
    ll cnt = 0;
    while(cnt<mn-1) {
        ll tmp = n_splt;
        if (cnt<res) tmp++;
        base += tmp;
        DEBUG{
            cout << base << endl;
        }
        rep(i,tmp) {
            if (base-i<=n) {
                resv.push_back(base-i);
            }
        }
        cnt++;
    }
    if(flg) {
        reverse(begin(resv), end(resv));
    }
    rep(i,resv.size()) {
        cout << resv[i];
        cout << (i==resv.size()-1 ? "\n" : " ");
    }
    return 0;
}


Measured memory_bytes: 6384
import java.util.Scanner;

// https://atcoder.jp/contests/abc165/tasks/abc165_a
public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ

		Scanner sc = new Scanner(System.in);
		int k = sc.nextInt();
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();


		for(int i=a;i<=b;i++) {
			if(i%k==0) {
				System.out.println("OK");
				return;
			}
		}
		System.out.println("NG");


	}
}


Measured memory_bytes: 27040
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;

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

	int n, k;
	cin >> n >> k;

	vector<bool> check(10, false);
	int x;
	for (int i = 0; i < k; ++i) {
		cin >> x;
		check[x] = true;
	}

	string answer, target;
	target = to_string(n);
	int len = target.length(), index;
	int minVal = 11;
	bool found = false;
	for (int i = 0; i < 10; ++i) {
		if (check[i]) continue;
		minVal = i;
		break;
	}

	bool over = false;
	for (int i = 0; i < len; ) {
		if (!over) {
			found = false;
			for (int j = 0; j < 10; ++j) {
				if (check[j] || target[i] > j + '0') continue;
				found = true;
				index = j;
				break;
			}
			if (!found) {
				answer.push_back(minVal + '0');
				answer.push_back(minVal + '0');
				i += 2;
				continue;
			}
			else {
				answer.push_back(index + '0');
				if (index + '0' > target[i])
					over = true;
			}
		}
		else {
			answer.push_back(minVal + '0');
		}
		i++;
	}

	cout << answer;
}

Measured memory_bytes: 256
import java.util.*;
import java.io.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n;
        int i=0;
        
        try{
            n = scan.nextInt();
            int j=n-1;
            int[] a = new int[n];
            int[] b = new int[n];
            for(i=0; i<n; i++){
                a[i] = scan.nextInt();
                b[j] = a[i];
                j--;
            }
            scan.close();
            for(j=0; j<n-1; j++){
                System.out.printf("%d ", b[j]);
            }
            System.out.printf("%d", b[n-1]);
            System.out.printf("\n");
        }catch(NumberFormatException e){
            System.out.println(e);
        }
    }
}


Measured memory_bytes: 26648
// Daniel Grzegorzewski
// while (clock()<=69*CLOCKS_PER_SEC)
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
// #pragma GCC target ("avx2")
// #pragma GCC optimization ("O3")
// #pragma GCC optimization ("unroll-loops")
 
#define MP make_pair
#define PB push_back
#define ST first
#define ND second
#define int long long
 
using namespace __gnu_pbds;
using namespace std;
 
template <typename T>
using ordered_set =
    tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
 
//X.find_by_order(k); - zwraca iterator na k-ty element (numeracja od zerowego)
//X.order_of_key(k); - zwraca liczbę elementów ostro mniejszych niż k
 
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<PII> VII;
typedef long long LL;
 
void init_ios() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
}
 
const int N = (int)1e5 + 3;
 
int n, a[N], b[N], res;
 
signed main() {
  init_ios();
  cin >> n;
  for (int i = 1; i <= n+1; ++i)
    cin >> a[i];
  for (int i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    b[i] += x;
    int k = min(a[i], b[i]);
    a[i] -= k;
    res += k;
    b[i] -= k;
    k = min(a[i+1], b[i]);
    res += k;
    a[i+1] -= k;
  }
  cout<<res<<"\n";
}

Measured memory_bytes: 1792
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
	int ans = 0;
	string S;
	cin >> S;
	for (int k = 0; k < S.size(); k++) {
		for (int i = k; S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T'; i++) {
			ans = max(ans, i+1 - k);
		}
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 256
import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.regex : regex;
import std.container;
import std.bigint;
import std.ascii;


void main()
{
  int n, m;
  readf("%s %s\n", &n, &m);
  auto d = (n * (n-1))/2 + (m * (m-1))/2;
  d.writeln;
}


Measured memory_bytes: 256
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define speed                   \
  ios_base::sync_with_stdio(0); \
  cin.tie(0);                   \
  cout.tie(0);
#define oprecision    \
  cout.precision(30); \
  cerr.precision(7);
#define ll long long
#define ld long double
#define ss string
#define pii pair<int, int>
#define pll pair<ll, ll>
#define forn(n) for (int i = 1; i <= n; i++)
#define forlr(l, r) \
  for (int i = l; (l > r ? i >= r : i <= r); (l > r ? i-- : i++))
#define pb push_back
#define pc builtin_popcount
#define pcll builtin_popcountll
#define mp make_pair
#define mt make_tuple
#define F first
#define S second
using namespace std;
int n, m, ans, d[500005];
vector<int> g[500005];
bitset<500005> w;
stack<int> t;
void dfs(int v) {
  w[v] = 1;
  for (auto to : g[v])
    if (!w[to]) dfs(to);
  t.push(v);
}
int main() {
  speed;
  oprecision;
  // code
  cin >> n >> m;
  forn(m) {
    int u, v;
    cin >> u >> v;
    g[u].pb(v);
  }
  forn(n) if (!w[i]) dfs(i);
  while (t.size()) {
    int v = t.top();
    t.pop();
    for (auto to : g[v]) {
      d[to] = max(d[to], d[v] + 1);
    }
  }
  forn(n) ans = max(ans, d[i]);
  cout << ans;
  // endl
#ifndef ONLINE_JUDGE
  cerr << "\nTime elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif
  return 0;
}

Measured memory_bytes: 18048
macro_rules! input {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input!{$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")
    };
}

fn main() {
    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! {next,
        r: f64,
    }
    println!("{}", 2.0*std::f64::consts::PI*r);

}


Measured memory_bytes: 2232
#include <stdio.h>
#include <vector>
#include <map>
#include <algorithm>

using namespace std;

void dfs(int par, int v, const vector<vector<int>> &edges, const map<pair<int, int>, int> &length, vector<int> &color) {
    for (int child : edges[v]) {
        if (child != par) {
            pair<int, int> key = {min(v, child), max(v, child)};
            int val = length.at(key);
            if (val % 2 == 0) {
                color[child] = color[v];
            } else {
                color[child] = color[v] ^ 1;
            }
            dfs(v, child, edges, length, color);
        }
    }
}

int main() {
    int nVertices;
    scanf("%d", &nVertices);
    vector<vector<int>> edges(nVertices + 1, vector<int>());
    map<pair<int, int>, int> length;
    for (int i = 0; i < nVertices - 1; ++i) {
        int u, v, l;
        scanf("%d %d %d", &u, &v, &l);
        edges[u].push_back(v);
        edges[v].push_back(u);
        if (u > v) {
            int temp = u;
            u = v;
            v = temp;
        }
        length[{u, v}] = l;
    }
    vector<int> color(nVertices + 1);
    dfs(0, 1, edges, length, color);
    for (int i = 1; i < nVertices + 1; ++i) {
        printf("%d\n", color[i]);
    }

    return 0;
}


Measured memory_bytes: 17152
#include <iostream>

typedef long long ll;
using namespace std;
ll gcd(ll a, ll b)
{
  if( a < b ) 
  {
    a ^= b;
    b ^= a;
    a ^= b;
  }
  return b ? gcd(b, a % b) : a;
}

ll lcm(ll a, ll b)
{
  return a * b / gcd(a, b);
}

int main()
{
  int a, b;
  cin >> a >> b;
  cout << lcm(a, b) << endl;
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
 
#define int long long
#define ull unsigned long long
#define ld long double
#define rep(a) rep1(i,a)
#define rep1(i,a) rep2(i,0,a)
#define rep2(i,b,a) for(int i=(b); i<((int)(a)); i++)
#define rep3(i,b,a) for(int i=(b); i>=((int)(a)); i--)
#define all(a) a.begin(),a.end()
#define pii pair<int,int>
#define pb push_back
#define mp make_pair
#define sz(a) ((int)a.size())
#define pow2(x) (1ll<<(x))
#define print0(a) cout << (a) << ' '
#define print1(a) cout << (a) << '\n'
#define print2(a,b) cout << (a) << ' ',print1(b)
#define print3(a,b,c) cout << (a) << ' ',print2(b,c)
#define print4(a,b,c,d) cout << (a) << ' ',print3(b,c,d)
#ifdef i_am_noob
#define debug(a) print2(#a,a)
#else
#define debug(a) 
#endif
#define ordered_set tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>
 
using namespace std;
using namespace __gnu_pbds;
 
const int Mod=1000000007,Mod2=998244353;
const int MOD=Mod2;
 
inline int add(int a, int b){return (a+b>=MOD?a+b-MOD:a+b);}
inline int sub(int a, int b){return (a+MOD-b>=MOD?a-b:a+MOD-b);}
int Pow(int a, int b){
	if(!b) return 1;
	int tmp=Pow(a*a%MOD,b>>1);
	return (b&1?tmp*a%MOD:tmp);
}
inline int inverse(int n){return Pow(n,MOD-2);}
 
const int maxn=100005;
//i_am_noob
int n,k;

int dgts(int n, int k){return (n?dgts(n/k,k)+1:0);}
 
signed main(){
	ios_base::sync_with_stdio(0),cin.tie(0);
	cin >> n >> k;
	print1(dgts(n,k));
	return 0;
}

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

#define ll long long
#define PII pair < int , int >
const int _ = 1e5 + 7;
ll fa[_] , sz[_] , N , M , Q;
vector < PII > to0 , to1;

int find(int x){return fa[x] == x ? x : (fa[x] = find(fa[x]));}
void merge(int p , int q){if((p = find(p)) == (q = find(q))) return; fa[p] = q; sz[q] += sz[p];}

signed main(){
	ios::sync_with_stdio(0);
	cin >> N >> M >> Q;
	for(int i = 1 ; i <= N ; ++i) sz[fa[i] = i] = 1;
	for(int i = 1 ; i <= Q ; ++i){
		int A , B , C; cin >> A >> B >> C; ++A; ++B;
		if(C == 0) to0.push_back(PII(A , B));
		else to1.push_back(PII(A , B));
	}
	for(auto t : to0) merge(t.first , t.second);
	for(auto t : to1) if(find(t.first) == find(t.second)){puts("No"); return 0;}
	ll mn = 0 , mx = 0 , cnt = 0; bool flg = 1;
	for(int i = 1 ; i <= N ; ++i) if(find(i) == i){++cnt; mn += sz[i] - 1; mx += sz[i] - 1;}
	for(int i = 1 ; i <= N ; ++i) if(fa[i] == i) sz[i] = 1; else sz[i] = 0;
	for(auto t : to1) merge(t.first , t.second);
	for(int i = 1 ; i <= N ; ++i)
		if(fa[i] == i && sz[i] == 2 && cnt == 2){puts("No"); return 0;}
		else if(sz[i] >= 2) flg = 0;
	mn += cnt - flg; if(M < mn){puts("No"); return 0;}
	mx += cnt * (cnt - 1) / 2; if(M > mx){puts("No"); return 0;}
	puts("Yes"); return 0;
}


Measured memory_bytes: 2936
import java.util.*;

public class Main{

    void solve(){
	Scanner sc = new Scanner(System.in);

	int n = sc.nextInt();
	while(n--!=0){
	    String line = sc.next();
	    char[] c = line.toCharArray();

	    boolean consec = false;
	    boolean lf = true, rf = true;
	    char last = 'a';
	    for(int i=0; i<c.length; i++){
		if(c[i]==last) consec = true;
		last = c[i];
		if((i%2==0 && c[i]=='R') || (i%2!=0 && c[i]=='L')) lf = false;	
		if((i%2==0 && c[i]=='L') || (i%2!=0 && c[i]=='R')) rf = false;
	    }

	    if(!consec && (lf || rf)) System.out.println("Yes");
	    else System.out.println("No");
	}
    }

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

Measured memory_bytes: 13000
//#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
const long long INF= 1e+18+1;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll> >vvl;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> T;
const ll MOD=1000000007LL;
string abc="abcdefghijklmnopqrstuvwxyz";
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int main(){
  ll n;cin>>n;
  vl a(n),b(n);
  rep(i,n)cin>>a[i];
  rep(i,n)cin>>b[i];
  vector<bool>vec(n,true);
  vec[0]=false;
  vec[n-1]=false;
  vector<bool>vec1(n,true);
  vector<bool>vec2(n,true);
  vec1[0]=false;
  vec2[n-1]=false;
  rep(i,n-1){
    if(a[i+1]!=a[i]){
      vec[i+1]=false;
      vec1[i+1]=false;
    }
  }
  for(ll i=n-2;i>=0;i--){
    if(b[i+1]!=b[i]){
      vec[i]=false;
      vec2[i]=false;
    }
  }
  //rep(i,n){
    //cout<<vec[i]<<" "<<vec1[i]<<" "<<vec2[i]<<endl;
  //}
  rep(i,n){
    if(vec1[i]==false){
      if(a[i]>b[i]){
        cout<<0<<endl;
        return 0;
      }
    }
    if(vec2[i]==false){
      if(a[i]<b[i]){
        cout<<0<<endl;
        return 0;
      }
    }
    if(a[n-1]!=b[0]){
      cout<<0<<endl;
      return 0;
    }
  }
  ll ans=1;
  rep(i,n){
    if(vec[i]){
      ans*=min(a[i],b[i]);
      ans%=MOD;
    }
  }
  cout<<ans<<endl;
}

Measured memory_bytes: 1792
#include<bits/stdc++.h>
using namespace std;
 
int main()
{
    int t;
    cin>>t;
	map<string, int> mp; 

    while(t--)
    {
		int op, v;
		string k;

      	cin>>op;

		if(op==0)
		{
			cin>>k>>v;
			mp[k] =  v;
		}
        else
		{
			cin>>k;
			cout<< mp[k]<<endl;
		}
    }
    return 0;
}


Measured memory_bytes: 27828
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define ull unsigned long long
#define pb push_back
#define pp pop_back
#define pi pair<ll,ll>
#define pii pair<int,int>
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    ll n,i,j,k,l,m,b,t,sum,sum1,flag,max1,min1,tmp;
    cin>>n;
    ll a[n+1][3];
    for(i=1;i<=n;i++){
        for(j=1;j<=2;j++){
            cin>>a[i][j];
        }
    }flag=0;
    for(i=1;i<=n-2;i++){
        for(j=1;j<=1;j++){
            if(a[i][j]==a[i][j+1] and a[i+1][j]==a[i+1][j+1] and a[i+2][j]==a[i+2][j+1]){
                flag=1;
                break;
            }
        }
    }
    if(flag==1){
        cout<<"Yes\n";
    }else{
        cout<<"No\n";
    }
}



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

#include <math.h>
#include <stdlib.h>


#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;

template<class T> inline bool chmin(T &a, T b) { if(a > b){ a = b; return true; } return false; }
template<class T> inline bool chmax(T &a, T b) { if(a < b){ a = b; return true; } return false; }

//INT_MAX	2,147,483,647 = 2*1.0e9

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    
    int N; cin >> N;
    set<int> st;
    for(int i = 0; i < N; i++){
        int a; cin >> a;
        st.insert(a);
    }

    cout << st.size() << endl;

    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<(b);i++)
#define erep(i,a,b) for(int i=a;i<=(int)(b);i++)
#define per(i,a,b) for(int i=(b)-1;i>(a);i--)
#define eper(i,a,b) for(int i=((int)(a));i>=b;i--)
#define pb push_back
#define mp make_pair
#define INF (1<<30)-1
#define MOD 1000000007
using namespace std;
typedef long long ll;
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a/gcd(a, b)*b;}

int sx, sy, gx, gy;
string ans;
int main() {
 ios::sync_with_stdio ( false );
 cin.tie ( 0 );
    cin >> sx >> sy >> gx >> gy;
    int x = sx, y = sy;
    while (y < gy) {
        ans += "U";
        y++;
    }
    while (x < gx) {
        ans += "R";
        x++;
    }
    while (y > sy) {
        ans += "D";
        y--;
    }
    while (x > sx) {
        ans += "L";
        x--;
    }

    ans += "L";
    x--;
    while (y < gy) {
        ans += "U";
        y++;
    }
    ans += "U";
    y++;
    while (x < gx) {
        ans += "R";
        x++;
    }
    ans += "D";
    y--;

    ans += "R";
    x++;
    while (y > sy) {
        ans += "D";
        y--;
    }
    ans += "D";
    y--;
    while (x > sx) {
        ans += "L";
        x--;
    }
    ans += "U";
    y++;

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


Measured memory_bytes: 256
from sys import stdin
def main():
    #入力
    readline=stdin.readline
    n=int(readline())
    s=readline().strip()
    ans=s.count("R")*s.count("G")*s.count("B")

    for i in range(n):
        for j in range(i+1,n):
            k=2*j-i
            if k>=n: break
            x=s[i]
            y=s[j]
            z=s[k]
            if x!=y and y!=z and z!=x:
                ans-=1

    print(ans)

if __name__=="__main__":
    main()

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

using namespace std;

#define pos first
#define health second

struct BIT {
    vector<long long> tree;
    BIT(int n) : tree(n + 2){}

    void upd(int p , long long v) {
        for (int i = ++p ;i < tree.size() ; i += i & -i)
            tree[i] += v;
    }

    long long get(int p) {
        long long sum = 0;
        for (int i = ++p; i ; i -= i & -i)
            sum += tree[i];
        return sum;
    }

    long long query(int l , int r) {
        if (r < l) return 0;
        return get(r) - get(l - 1);
    }
};

int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#ifndef ONLINE_JUDGE
    freopen("input.in" , "r" , stdin);
#endif
    int n , D , A;
    cin >> n >> D >> A;

    map<long long , int> NEW;

    vector<pair<int , int> > mon(n);
    for (int i = 0 ;i < n ;i++) {
        cin >> mon[i].pos >> mon[i].health;
        NEW[mon[i].pos];
        NEW[mon[i].pos + 2ll * D];
    }

    int sz = 0;
    for (auto &p : NEW)
        p.second = sz++;

    BIT bit(sz);

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

    long long ans = 0;
    for (int i = 0 ;i < n ;i++) {
        long long damage = bit.query(NEW[mon[i].pos] , sz);
        if (damage >= mon[i].health) continue;
        int rem = mon[i].health - damage;
        int need = (rem + A - 1) / A;
        ans += need;
        bit.upd(NEW[mon[i].pos + 2ll * D] , need * 1ll * A);
    }

    cout << ans;
}

Measured memory_bytes: 33032
#include<bits/stdc++.h>
#define pi acos(-1)
#define mx 1000000000
#define mod 1000000009
#define pii pair<int,int>
#define psi pair<string,int>
#define vi vector<int>
typedef long long ll;
using namespace std;
void fastio()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}

int main()
{
#ifndef ONLINE_JUDGE
    freopen("inputf.txt", "r", stdin);
    freopen("outputf.txt", "w", stdout);
#endif
    fastio();
    int i,j,t,n,m;
    //cin>>t;
    //while(t--){
     cin>>n>>m;
     if(n==m)cout<<"Yes"<<endl;
     else cout<<"No"<<endl;
    //}
 return 0;
}


Measured memory_bytes: 3660
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace Tasks
{
    public class E
    {
        static void Main(string[] args)
        {
            var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            Console.SetOut(sw);
            Solve();
            Console.Out.Flush();
        }

        public static void Solve()
        {
            var N = Scanner.Scan<string>();
            var dp = new long[N.Length + 1][].Select(x => new long[2]).ToArray();
            dp[0][1] = 1;
            for (var i = 0; i < N.Length; i++)
            {
                var x = N[i] - '0';
                dp[i + 1][0] = Math.Min(dp[i][0] + x, dp[i][1] + (10 - x));
                dp[i + 1][1] = Math.Min(dp[i][0] + x + 1, dp[i][1] + (10 - x) - 1);
            }
            Console.WriteLine(dp[N.Length][0]);
        }

        public static class Scanner
        {
            private static Queue<string> queue = new Queue<string>();
            public static T Next<T>()
            {
                if (!queue.Any()) foreach (var item in Console.ReadLine().Trim().Split(" ")) queue.Enqueue(item);
                return (T)Convert.ChangeType(queue.Dequeue(), typeof(T));
            }
            public static T Scan<T>() => Next<T>();
            public static (T1, T2) Scan<T1, T2>() => (Next<T1>(), Next<T2>());
            public static (T1, T2, T3) Scan<T1, T2, T3>() => (Next<T1>(), Next<T2>(), Next<T3>());
            public static (T1, T2, T3, T4) Scan<T1, T2, T3, T4>() => (Next<T1>(), Next<T2>(), Next<T3>(), Next<T4>());
            public static (T1, T2, T3, T4, T5) Scan<T1, T2, T3, T4, T5>() => (Next<T1>(), Next<T2>(), Next<T3>(), Next<T4>(), Next<T5>());
            public static IEnumerable<T> ScanEnumerable<T>() => Console.ReadLine().Trim().Split(" ").Select(x => (T)Convert.ChangeType(x, typeof(T)));
        }
    }
}


Measured memory_bytes: 77260
#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int p=0;
    int a;
    cin>>a;
    for(int i=0;i<a;i++){
        int b,c;
        cin>>b>>c;
        p+=c-b;
    }
    cout<<p+a<<endl;
}


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

typedef long long ll;

const int INF = 1e9;
const int MOD = 1e9+7;
const ll LLINF = 1e18;

#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define ANS(n) cout << (n) << endl

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define FORR(i,a,b) for(int i=(a);i>=(b);i--)

#define ALL(obj) (obj).begin(),(obj).end()

#define pii pair<int,int>

#define pb(a) push_back(a)
#define mp make_pair

int main()
{
	int n;
	cin >> n;
	int a[n];
	int cost[n+1];	//cost[i] = |a[i] - a[i-1]|, cost[0] = |a[0]|, cost[n] = |a[n-1]|
	FOR(i,0,n){
		cin >> a[i];
		if(i==0){
			cost[0] = abs(a[0]);
		}else{
			cost[i] = abs(a[i] - a[i-1]);
		}
	}
	cost[n] = abs(a[n-1]);
	ll costSum=0;
	FOR(i,0,n+1)
		costSum += cost[i];
	FOR(i,0,n){
		ll ans = costSum-cost[i]-cost[i+1];
		if(i==0){
			ans += abs(a[1]);
		}else if(i==n-1){
			ans += abs(a[n-2]);
		}else{
			ans += abs(a[i+1] - a[i-1]);
		}
		ANS(ans);
	}
	return 0;
}


Measured memory_bytes: 2048
#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<unordered_map>
#include<algorithm>
#include<bitset>
using namespace std;

typedef long long ll;	

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

#define  MAX 100 
int dp[2][MAX+10],a[2][MAX+10];

int main(){
	int n;
	cin>>n;
	for(int i=0;i<2;i++){
		for(int j=0;j<n;j++){
			cin>>a[i][j];
		}
	}
	dp[0][0]=a[0][0];
	dp[1][0]=a[0][0]+a[1][0];
	for(int j=1;j<n;j++){
		chmax(dp[0][j],dp[0][j-1]+a[0][j]);
		chmax(dp[1][j],max(dp[0][j],dp[1][j-1])+a[1][j]);
	}
	cout<<dp[1][n-1]<<endl;
	return 0;
}

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

using namespace std;

int main(){
	int n, cp = 0, cq = 0; cin >> n;
	bool isSame;
	vector<int> p(n), q(n);
	vector<int> a(n), b(n);
	iota(a.begin(), a.end(), 1);
	iota(b.begin(), b.end(), 1);
	for(int i = 0; i < n; ++i) cin >> p[i];
	for(int i = 0; i < n; ++i) cin >> q[i];
	do{
		cp++;
		isSame = true;
		for(int i = 0; i < n; ++i) if(a[i] != p[i]){
			isSame = false;
			break;
		}
		if(isSame) break;
	}while(next_permutation(a.begin(), a.end()));
	do{
		cq++;
		isSame = true;
		for(int i = 0; i < n; ++i) if(b[i] != q[i]){
			isSame = false;
			break;
		}
		if(isSame) break;
	}while(next_permutation(b.begin(), b.end()));
	cout << abs(cp - cq) << endl;
}

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

namespace ABC114A
{
	class Program
	{
		static void Main(string[] args)
		{
            int x;
            x = int.Parse(Console.ReadLine());

			if (x == 3 || x == 5 || x == 7)
				Console.WriteLine("YES");
			else
				Console.WriteLine("NO");

			Console.ReadKey();
		}
	}
}


Measured memory_bytes: 13140
package main

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

func main() {
	N := ReadInt()
	s := ""
	base := 1
	for N != 0 {
		if N%(base*2) != 0 {
			s = "1" + s
			N -= base
		} else {
			s = "0" + s
		}
		base *= -2
	}
	if s == "" {
		s = "0"
	}
	fmt.Println(s)
}

var reader = bufio.NewReader(os.Stdin)

func Scan(a ...interface{}) {
	if _, err := fmt.Fscan(reader, a...); err != nil {
		panic(err)
	}
}
func ReadInt() (i int)       { Scan(&i); return }
func ReadString() (s string) { Scan(&s); return }
func ReadInts(n int) []int {
	v := make([]int, n)
	for i := 0; i < n; i++ {
		Scan(&v[i])
	}
	return v
}


Measured memory_bytes: 1844
#include<stdio.h>

int IsPrime(int p);

int main()
{
  int i,n;
  int p;
  int ans = 0;
  scanf("%d",&n);

  for(i = 0;i < n;i++){
    scanf("%d",&p);
    if(IsPrime(p) == 1){
      ans++;
    }
  }

  printf("%d\n",ans);
  return 0;
}

int IsPrime(int p)
{
  int i;

  if(p == 2 || p == 3) return 1;
  
  for(i = 2;i*i <= p;i++){
    if(p % i == 0) return 0;
  }
  return 1;
}



Measured memory_bytes: 2676