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

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    int a, b;
    cin >> a >> b;
    
    int cur = 1, ans = 0;
    while (cur < b) {
        cur = cur-1 + a;
        ans++;
    }
    cout << ans << endl;
}


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

int main()
{
    int n;
    cin >> n;
    vector<int> p(n);
    vector<int> q(n);
    for(int i=0; i<n; i++) cin >> p[i];
    for(int i=0; i<n; i++) cin >> q[i];
    auto v = p;
    sort(v.begin(), v.end());
    int a = 0;
    int b = 0;
    int count = 0;
    do{
        bool pt = true;
        for(int i=0; i<n; i++){
            if(p[i] != v[i]){
                pt = false;
                break;
            }
        }
        if(pt) a = count;
        
        bool qt = true;
        for(int i=0; i<n; i++){
            if(q[i] != v[i]){
                qt = false;
                break;
            }
        }
        if(qt) b = count;
        count++;
    }while(next_permutation(v.begin(), v.end()));
    
    cout << abs(a-b) << endl;
    return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(){
    char s[110];
    int flag=0;
    scanf("%s",&s);
    for(int i=0;i<=100;i+=2){
        if(flag==1){
            break;
        }
        if(s[i]=='L'){
            printf("No");
            flag=1;
        }
    }
    for(int i=1;i<=99;i+=2){
        if(flag==1){
            break;
        }
        if(s[i]=='R'){
            printf("No");
            flag=1;
        }
    }
    if(flag==0){
        printf("Yes");
    }
    return 0;
}


Measured memory_bytes: 128
'''
自宅用PCでの解答
'''
import math
#import numpy as np
import itertools
import queue
import bisect
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)
mod = 10**9+7
# mod = 998244353
dir = [(-1,0),(0,-1),(1,0),(0,1)]
alp = "abcdefghijklmnopqrstuvwxyz"
INF = 1<<32-1
# INF = 10**18

def main():
    n = int(ipt())
    wrds = []
    hq = []
    usd = set()
    for i in range(n):
        s,c = input().split()
        c = int(c)
        wrds.append((s,c))
        hpq.heappush(hq,(c,s,1))

    while hq:
        hc,hs,hp = hpq.heappop(hq)
        usd.add((hs,hp))
        ls = len(hs)
        if hs == hs[::-1]:
            print(hc)
            exit()
        for si,ci in wrds:
            lsi = len(si)
            if lsi > ls:
                if hp == 1:
                    wt = si[::-1]
#                    print(wt)
                    if hs == wt[:ls:] and not (wt[ls::],-1) in usd:
                        hpq.heappush(hq,(hc+ci,wt[ls::],-1))
                else:
                    if hs == si[:ls:] and not (si[ls::],1) in usd:
                        hpq.heappush(hq,(hc+ci,si[ls::],1))
            else:
                if hp == 1:
                    wt = si[::-1]
                    if wt == hs[:lsi:] and not (hs[lsi::],1) in usd:
                        hpq.heappush(hq,(hc+ci,hs[lsi::],1))
                else:
                    if si == hs[:lsi:] and not (hs[lsi::],-1) in usd:
                        hpq.heappush(hq,(hc+ci,hs[lsi::],-1))
#        print(hq)

    print(-1)


    return None

if __name__ == '__main__':
    main()


Measured memory_bytes: 9820
#include<cmath>
#include<queue>
#include<vector>
#include<iostream>

#define	mp	make_pair
#define	pb	push_back

using namespace std;

typedef	vector<int>			vi;
typedef	pair<double,int>	pdi;

const int inf=1000000000;
int n,id[1000],x[1000],y[1000];
double adj[1000][1000];

bool Dijkstra(int s,int g,int *path)
{
	double d[1000];
	bool visited[1000];
	for(int i=0;i<n;i++)	d[i]=inf,visited[i]=false,path[i]=-1;
	d[s]=0;
	priority_queue<pdi> pq;	pq.push(mp(0,s));
	while(!pq.empty()){
		pdi a=pq.top();	pq.pop();
		double dis=-a.first;
		int u=a.second;
//		if(visited[u])	continue;
		if(u==g)	return true;
		visited[u]=true;
		for(int v=0;v<n;v++){
			if(visited[v])	continue;
			if(dis+adj[u][v]<d[v]){
				d[v]=dis+adj[u][v];
				pq.push(mp(-d[v],v));
				path[v]=u;
			}
		}
	}
	return false;
}

void showPath(int s,int now,int *path,int *id)
{
	if(now==s){ cout<<id[s]; return; }
	showPath(s,path[now],path,id);
	cout<<' '<<id[now];
}

int main()
{
	for(;cin>>n,n;){
		for(int i=0;i<n;i++)	cin>>id[i]>>x[i]>>y[i];

		for(int i=0;i<n;i++)for(int j=0;j<n;j++)	adj[i][j]=(i==j?0:inf);
		for(int i=0;i<n;i++)for(int j=0;j<n;j++){
			int xx=x[i]-x[j],yy=y[i]-y[j];
			if(xx*xx+yy*yy<=50*50)	adj[i][j]=sqrt(xx*xx+yy*yy);
		}

		int m;	cin>>m;
		while(m--){
			int sid,gid;	cin>>sid>>gid;
			int s,g;
			for(int i=0;i<n;i++){
				if(id[i]==sid)	s=i;
				if(id[i]==gid)	g=i;
			}

			int path[1000];
			if(Dijkstra(s,g,path)){
				showPath(s,g,path,id);
				cout<<endl;
			}
			else	cout<<"NA"<<endl;
		}
	}

	return 0;
}

Measured memory_bytes: 0
#include<stdio.h>
int main(void){
  char *s="python3 -c\""
"n,*a=map(int,open(0).read().split())\n"
"d={}\n"
"for i in a:d[i]=d.get(i,0)+1\n"
"print(sum(d[i]-i*(d[i]>=i)for i in d))\n"
"\"";
  system(s);
  return 0;
}            

Measured memory_bytes: 18180
import java.util.Arrays;
import java.util.Scanner;

public class Main {
	
	public static class Chara implements Comparable<Chara>{
		String name;
		int points;
		
		public Chara(String name, int points) {
			super();
			this.name = name;
			this.points = points;
		}

		@Override
		public int compareTo(Chara o) {
			if(this.points == o.points){
				return this.name.compareTo(o.name);
			}else{
				return this.points - o.points;
			}
		}
		
		
	}
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		while(true){
			final int n = sc.nextInt();
			
			if(n == 0){
				break;
			}
			
			boolean[][] data = new boolean[n][30];
			Chara[] charas = new Chara[n];
			
			for(int i = 0; i < n; i++){
				String name = sc.next();
				
				final int num = sc.nextInt();
				
				for(int j = 0; j < num; j++){
					data[i][sc.nextInt()] = true ;
				}
				
				charas[i] = new Chara(name, 0);
			}
			
			for(int i = 0; i < 30; i++){
				int count = n + 1;
				
				for(boolean[] array : data){
					if(array[i]){
						count--;
					}
				}
				
				if(count == n + 1){
					continue;
				}
				
				for(int j = 0; j < n; j++){
					if(data[j][i]){
						charas[j].points += count;
					}
				}
			}
			
			Arrays.sort(charas);
			
			System.out.println(charas[0].points + " " + charas[0].name);
		}
		
		sc.close();
	}
}

Measured memory_bytes: 12000
h,n= map(int, input().split())
p = [list(map(int, input().split())) for _ in range(n)] 
m = 10**4
dp = [0]*(h+m+1)
for i in range(m+1,h+m+1):
  dp[i] = min(dp[i-a] + b for a,b in p)
print(dp[h+m])

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

#define rep(i, a, b) for (ll i = (a); i < (b); i++)
typedef uint64_t ull;
typedef int64_t ll;
typedef std::pair<ll, ll> PLL;

using namespace std;

signed main() {
  char c;
  cin>>c;
  switch(c) {
    case 'A': cout<<'T'<<endl; break;
    case 'T': cout<<'A'<<endl; break;
    case 'C': cout<<'G'<<endl; break;
    case 'G': cout<<'C'<<endl; break;
  }
  return 0;
}


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

struct fruit {
	string name;  // 名前
	int price; // 価格
};

int main() {

	int i, j, k = 0;
	int n, m;
	string s, s2;
	int b, c;
	int flag = 0;
	while (std::cin >> n) {

		vector<fruit> fruits(n);
		vector<fruit> fruits2(n);
		for (i = 0; i < n; i++) {
			std::cin >> fruits.at(i).name >> fruits.at(i).price;
			fruits2.at(i).name = fruits.at(i).name;
			fruits2.at(i).price = fruits.at(i).price;
		}

		sort(fruits.begin(), fruits.end(),
			[](const fruit& x, const fruit& y) {if (x.name == y.name) { return x.price > y.price; }
			else return x.name < y.name; });

		for (i = 0; i < n; i++) {
			s = fruits.at(i).name;
			c = fruits.at(i).price;
			for (j = 0; j < n; j++) {
				s2 = fruits2.at(j).name;
				b = fruits2.at(j).price;
				if (s2 == s && b == c) { std::cout << j + 1 << std::endl; break; }
			}
		}
	}
}


Measured memory_bytes: 256
import sys
sys.setrecursionlimit(10**5+100)
MOD = 10**9+7

H, W = list(map(int, input().split()))
a = [input() for _ in range(H)]

dp = [[-1]*W for _ in range(H)]
def rec(h, w):
    if dp[h][w]!=-1:
        return dp[h][w]
    else:
        dp[h][w] = 0
        if h<H-1:
            if a[h+1][w]!='#':
                dp[h][w] = rec(h+1, w)%MOD
        if w<W-1:
            if a[h][w+1]!='#':
                dp[h][w] += rec(h, w+1)%MOD
        if h==H-1 and w==W-1:
            dp[h][w] = 1
        return dp[h][w]%MOD

print(rec(0,0))    

Measured memory_bytes: 100824
#include <iostream>
#include <numeric>
 
#define repd(i,a,b); for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
 
 
using namespace std;
int main() {
  int a,b,k;
  int count=0;
  int ans=0;
  cin >> a >> b >> k;
   
  for(int j=a; j>=1; j--){
    if(a%j == 0 && b%j == 0){
      count++;
    if(count == k){
      ans = j;
    }
    }
    }
  cout << ans;
 return 0;
}

Measured memory_bytes: 256
D, G = map(int, input().split())
p = [0] * D
c = [0] * D
for i in range(D):
    p[i], c[i] = map(int, input().split())
    
cnt_min = sum(p)

for i in range(2**D):
    flg = [False] * D
    cnt = 0
    score = 0
    for j in range(D):
        if i & (1 << D-1-j):
            flg[j] = True
            cnt += p[j]
            score += p[j]*(j+1)*100 + c[j]
    
    if score >= G:
        if cnt < cnt_min:
            cnt_min = cnt
    else:
        for j in reversed(range(D)):
            if flg[j]:
                continue
            for k in range(p[j]-1):
                cnt += 1
                score += (j+1)*100
                if score >= G:
                    if cnt < cnt_min:
                        cnt_min = cnt
                        break                        
            break
print(cnt_min)

Measured memory_bytes: 3188
N = int(input())
S = sorted(list(map(int,input().split())),reverse=True)
kokoti = 0
if N == 1:
    print(0)
elif N==2:
    print(max(S))
else:
    kokoti += max(S)
    for x in range (1,N-1):
        if x%2 == 1:
            kokoti += S[x//2 + 1]
        else:
            kokoti += S[x//2]
    print(kokoti)



Measured memory_bytes: 31548
"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const S = arg[0].split("");
    let answer = 0;
    let temp = 0;
    
    if(S[0] === "R") {
        temp++;
        answer = Math.max(answer, temp);
    }
    
    for(let i=1; i<S.length; i++) {
        if(S[i] === "R") {
            temp++;
        }  else {
            temp = 0;
        }
        
        answer = Math.max(answer, temp);
    }
    
    if(temp === 0 && S[2] === "R") {
        temp++;
        answer = Math.max(answer, temp);
    }
    
    console.log(answer);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));

Measured memory_bytes: 29648
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int n;
    while(cin>>n)
    {
        int cnt=0;
        for(int i=0;i<n;i++)
        {
            int a;
            cin>>a;
            while(a%2==0)
            {
                a=a/2;
                cnt++;
            }
        }
        cout<<cnt<<endl;
    }
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, l, r) for (int i = l; i <= (int)(r); i++)
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define MOD (int) (2019)
#define INF (int) 2e9
#define LLINF (ll) 2e18

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

int d[200005];

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

    map<int, int> m;

    m[0]++;
    d[n-1] = (int)(s[n-1]-'0');
    m[d[n-1]]++;
    for (int i = n-2; i >=0; i--){
        d[i] = (d[i+1] + modpow(10, n-i-1) * (int)(s[i]-'0'))%MOD;
        m[d[i]]++;
    }

    ll ans = 0;
    for (auto mm : m){
        ans += (ll) mm.second * (mm.second-1)/2;
    }
    
    cout << ans << endl;
    // printf("%d\n", N);
    return 0;
}

Measured memory_bytes: 4492
module DoublyChainedTree = struct
  let nil = -1

  type t = {
    mutable parent : int;
    mutable child : int;
    mutable bro : int;
    mutable depth : int;
  }

  let make () = { parent = nil; child = nil; bro = nil; depth = nil }
end

module T = DoublyChainedTree

let () =
  let n = Scanf.scanf "%d " (fun i -> i) in
  let t = Array.init n (fun _ -> T.make ()) in
  for _ = 0 to n - 1 do
    Scanf.scanf "%d %d " (fun id k ->
      let left_child = ref 0 in
      for j = 0 to k - 1 do
        Scanf.scanf "%d " (fun c ->
          t.(c).T.parent <- id;
          if j = 0 then t.(id).T.child <- c else t.(!left_child).T.bro <- c;
          left_child := c)
      done)
  done;
  let rec search_root i =
    if i = n then T.nil
    else if t.(i).T.parent = T.nil then i
    else search_root (i + 1)
  in
  let root = search_root 0 in
  let rec set_depth i p =
    t.(i).T.depth <- p;
    if t.(i).T.bro <> T.nil then set_depth t.(i).T.bro p;
    if t.(i).T.child <> T.nil then set_depth t.(i).T.child (p + 1);
  in
  set_depth root 0;
  let print_node i =
    Printf.printf "node %d: parent = %d, depth = %d, " i t.(i).T.parent t.(i).T.depth;
    print_string (if t.(i).T.parent = T.nil then "root, " else if t.(i).T.child = T.nil then "leaf, " else "internal node, ");
    print_string "[";
    let rec print_children c =
      if c <> T.nil then begin
        if c <> t.(i).T.child then print_string ", ";
        print_int c;
        print_children t.(c).T.bro
      end
    in
    print_children t.(i).T.child;
    print_endline "]"
  in
  let rec print i =
    if i < n then (print_node i; print (i + 1))
  in
  print 0

Measured memory_bytes: 13216
#include <cstdio>
#include <cstdlib>
#include <cstring>

struct Node {
  int key;
  Node* prev;
  Node* next;
};

Node* nil;

Node* listSearch(int key) {
  Node* cur = nil->next;
  while (cur != nil && cur->key != key) {
    cur = cur->next;
  }
  return cur;
}

void init() {
  nil = (Node *)malloc(sizeof(Node));
  nil->prev = nil;
  nil->next = nil;
}

void printList() {
  Node* cur = nil->next;
  int index = 0;
  while (cur != nil) {
    if (index) printf(" ");
    printf("%d", cur->key);
    index++;
    cur = cur->next;
  }
  printf("\n");
}

void deleteNode(Node* t) {
  if (t == nil) return;
  t->prev->next = t->next;
  t->next->prev = t->prev;
  free(t);
}

void deleteFirst() {
  deleteNode(nil->next);
}

void deleteLast() {
  deleteNode(nil->prev);
}

void deleteKey(int key) {
  deleteNode(listSearch(key));
}

void insert(int key) {
  Node* node = (Node *)malloc(sizeof(Node));
  node->key = key;
  node->next = nil->next;
  nil->next->prev = node;
  nil->next = node;
  node->prev = nil;
}

int main() {
  int i, num, val;
  char command[20];
  scanf("%d", &num);
  init();
  for (i = 0; i < num; i++) {
    scanf("%s %d", command, &val);
    if (command[0] == 'i') {
      insert(val);
    } else if (command[0] == 'd') {
      if (strlen(command) > 6) {
        if( command[6] == 'F') {
          deleteFirst();
        } else {
          deleteLast();
        }
      } else {
        deleteKey(val);
      }
    }
  }
  printList();
  return 0;
}



Measured memory_bytes: 33824
#include<iostream>
using namespace std;
int main(){
    int n, cnt = 0;
    cin >> n;
    int a[n];
    for(int i = 0; i < n; i++){
        cin >> a[i];
    }
    for(int i = 0; i < n; i++){
        int minj = i;
        for(int j = i; j < n; j++){
            if(a[j] < a[minj]){
                minj = j;
            }
        }
        if(i != minj)cnt++;
        swap(a[i],a[minj]);
    }
    for(int i = 0; i < n; i++){
        if(i == n-1)cout << a[i] << endl;
        else cout << a[i] << " ";
    }
    cout << cnt << endl;
    return 0;
}


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

using namespace std;
using ll = long long;

void remax (int &x, int y)
{
    x = max(x, y);
}

void solve(istream &cin = std::cin, ostream &cout = std::cout)
{
    auto solve_test = [&] ()
    {
        string s;
        if (!(cin >> s))
            return false;

        const int max_len = 4;
        const int n = int(s.size());
        vector<vector<int>> best(n + 1, vector<int>(max_len + 1, -1));

        best[0][0] = 0;
        for (int i = 0; i < n; i++)
        for (int cur_len = 0; cur_len <= max_len; cur_len++)
        if (best[i][cur_len] != -1)
        for (int next_len = 1; next_len <= max_len && i + next_len <= n; next_len++)
        if (next_len != cur_len || s.substr(i - cur_len, cur_len) != s.substr(i, next_len))
            remax(best[i + next_len][next_len], 1 + best[i][cur_len]);

        int ans = 0;
        for (int i = 0; i <= max_len; i++)
            remax(ans, best[n][i]);
        cout << ans << endl;

        return true;
    };

    while (solve_test());
}


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

	cout << fixed;

#ifdef LOCAL
	auto st = clock();

	ifstream fin("input.txt");

	solve(fin);

	cout << "clock: " << setprecision(4) << (clock() - st) / (double) CLOCKS_PER_SEC << endl;
#else
	solve();
#endif

	return 0;
}


Measured memory_bytes: 11920
h, w = map(int, input().split())
A = []
for _ in range(h):
    a = list(map(int, input().split()))
    A.append(a)
Operation = []
count = 0
for i in range(h):
    for j in range(w-1):
        if A[i][j] % 2 == 0:
            continue
        else:
            A[i][j] = A[i][j] - 1
            A[i][j+1] = A[i][j+1] + 1
            count += 1
            operation = [i+1, j+1, i+1, j+2]
            operation = [str(x) for x in operation]
            Operation.append(operation)
    if i == h-1:
        continue
    for j in range(w):
        if A[i][j] % 2 == 0:
            continue
        else:
            A[i][j] = A[i][j] - 1
            A[i+1][j] = A[i+1][j] + 1
            count += 1
            operation = [i+1, j+1, i+2, j+1]
            operation = [str(x) for x in operation]
            Operation.append(operation)
print(count)
for operation in Operation:
    print(' '.join(operation))

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

int n;
int a[6005];
int sz[6005];
int dp[6005][6005][2];
vector<int> adj[100005];
int dp1[6005][2];

void ddp(int node, int fa)
{
	//cout<<"AT "<<node<<endl;
	sz[node]=1;
	for(int i=0; i<=n; i++)
	{
		dp[node][i][0]=10000000000000;
		dp[node][i][1]=10000000000000;
	}
	if(a[node]>0) dp[node][0][0]=a[node];
	else dp[node][0][1]=a[node];
	for(auto i:adj[node])
	{
		if(i==fa) continue;
		ddp(i, node);
		for(int j=0; j<=n; j++)
		{
			dp1[j][0]=10000000000000;
			dp1[j][1]=10000000000000;
		}
		for(int sn=0; sn<sz[node]; sn++)
		{
			for(int si=0; si<sz[i]; si++)
			{
				dp1[sn+si][0]=min(dp1[sn+si][0], dp[node][sn][0]+dp[i][si][0]);
				dp1[sn+si][1]=min(dp1[sn+si][1], min(dp[node][sn][1]+dp[i][si][1], min(dp[node][sn][0]+dp[i][si][1], dp[node][sn][1]+dp[i][si][0])));
				if(dp[i][si][1]<0)
				{
					dp1[sn+si+1][0]=min(dp1[sn+si+1][0], dp[node][sn][0]);
					dp1[sn+si+1][1]=min(dp1[sn+si+1][1], dp[node][sn][1]);
				}
				if(dp[i][si][0]<10000000000000)
				{
					dp1[sn+si+1][0]=min(dp1[sn+si+1][0], dp[node][sn][0]);
					dp1[sn+si+1][1]=min(dp1[sn+si+1][1], dp[node][sn][1]);
				}
			}
		}
		for(int j=0; j<=n; j++)
		{
			dp[node][j][0]=dp1[j][0];
			dp[node][j][1]=dp1[j][1];
		}
		sz[node]+=sz[i];
	}
}

signed main()
{
	cin>>n;
	for(int i=1; i<=n; i++)
	{
		cin>>a[i];
	}
	for(int i=1; i<n; i++)
	{
		int u, v;
		cin>>u>>v;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}
	ddp(1, 1);
	for(int i=0; i<=n; i++)
	{
		if(dp[1][i][0]<10000000000000||dp[1][i][1]<0)
		{
			//cout<<dp[1][i][0]<<" "<<dp[1][i][1]<<endl;
			cout<<i;
			return 0;
		}
	}
}

Measured memory_bytes: 474240
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main(){
    char arr[10005];
    int a,b,c,i,n;
    cin>>n;
    scanf("%s",arr);
    for(i = 0;i < strlen(arr);i++){
        arr[i] = arr[i]+n;
        if(arr[i]>'Z'){
            arr[i] = arr[i]-26;
        }
        cout<<arr[i];
    }
}
//SUN, MON, TUE, WED, THU, FRI, or SAT.


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

using namespace std;
typedef long long ll;

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    string s,t;
    cin >> s >> t;
    int n=s.size();
    int m=t.size();
    int res=n;
    for(int i=0;i+m-1<n;i++)
    {
        int c=0;
        for(int j=0;j<m;j++) c+=(s[i+j]!=t[j]);
        res=min(res,c);
    }
    cout << res << "\n";
    return 0;
}


Measured memory_bytes: 3640
def f(t, _ans, length):
    for _ in range(length):
        t += length
        _ans += 1

        if t >= n:
            print(_ans)
            exit()

    return _ans

h = int(input())
w = int(input())
n = int(input())
t = 0
ans = 0

if h > w:
    f1, f2 = h, w
else:
    f1, f2 = w, h

ans = f(t, ans, f1)
f(t, ans, f2)


Measured memory_bytes: 3060
from collections import Counter
N, K = map(int, input().split())
C = Counter(list(map(int, input().split())))
li = []
for k, v in C.items():
    li.append([k, v])
li = sorted(li, key=lambda x:x[1])
cnt = 0
for i in range(len(li)-K):
    cnt += li[i][1]
print(cnt)

Measured memory_bytes: 45720
l,r=map(int,input().split())
if r-l+1>=2019:
  print(0)
  exit()
else:
  l=l%2019
  r=r%2019
  
  if l>=r:
    r+=2019
ans=10000000
for i in range(l,r+1):
  for j in range(i+1,r+1):
    ans=min(ans,(i*j)%2019)
print(ans)

Measured memory_bytes: 3060
#include<iostream>
#include<string>
#include<fstream>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cmath>
#include<string.h>

typedef long long int ll;
using namespace std;

int main(void)
{
	int a, b, c;
	cin >> a >> b >> c;
	int i;
	int num = 0;
	for (i = a; i <= b; i++)
	{
		if (c%i == 0)
		{
			num++;
		}
	}
	cout << num << endl;
	return 0;
}


Measured memory_bytes: 3108
list = [4,1,4,1,2,1,2,1]

readlines.each{|line|
  arr = line.split.map(&:to_i)
  min = 1.0 / 0.0
  it = ""
  8.times{|j|
    list.push(list.shift)
    sum = 0
    8.times{|i|
      sum += arr[i] - list[i] if arr[i] > list[i]
    }
    if min > sum
      min = sum
      it = list.join("")
    elsif min == sum
      it = list.join("") if it > list.join("")
    end
  }
  puts it.split("").join(" ")
}

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

int main()
{
	int l, r, k;
	while (~scanf("%d %d %d", &l, &r, &k))
	{
		if (2 * k >= (r - l + 1))
		{
			for (int i = l; i <= r; ++i)
			{
				printf("%d\n", i);
			}
		}
		else
		{
			for (int i = l; i <= l + k - 1; ++i)
			{
				printf("%d\n", i);
			}
			for (int i = r - k + 1; i <= r; ++i)
			{
				printf("%d\n", i);
			}
		}
	}
	return 0;
}

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

using namespace std;
using ll = long long;
using ld = long double;

const int MOD = 1e9 + 7;
const int MX = 2e5 + 5;
const ll INF = 1e18;
const ld PI = acos((ld) -1);

int main () {
	string s;
	cin >> s;
	int cur  = 0;
	for (int i = 0; i < (int) s.size(); i++) {
		cur += s[i] - '0';
		cur %= 9;
	}

	if (cur == 0) cout << "Yes" << '\n';
	else cout << "No" << '\n';
}


Measured memory_bytes: 3716
import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val N = sc.nextInt()
    val M = sc.nextInt()
    val C = sc.nextInt()

    var total = 0

    val bLst = mutableListOf<Int>()
    for (i in 0 until M) {
        bLst.add(sc.nextInt())
    }

    val aLst = mutableListOf<MutableList<Int>>()
    for (i in 0 until N) {
        val tmpLst = mutableListOf<Int>()
        for (j in 0 until M) {
            tmpLst.add(sc.nextInt())
        }
        aLst.add(tmpLst)
    }

    for (i in aLst) {
        var tmp = 0
        for (j in 0 until M) {
            tmp += (bLst[j] * i[j])
        }
        tmp += C

        if (tmp > 0) {
            total++
        }
    }

    println(total)
}

Measured memory_bytes: 31272
#include <stdio.h>
int main(){
  int W,H,x,y,r;
  scanf("%d%d%d%d%d",&W,&H,&x,&y,&r);

  if(x>=r && x<=W-r && y>=r && y<=H-r) printf("Yes\n");
  else printf("No\n");

  return 0;
}

Measured memory_bytes: 584
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N=Integer.parseInt(sc.next());
int[] a=new int[N];
long sum=0;
for(int i=0;i<N;i++){
    a[i]=Integer.parseInt(sc.next());
        sum+=a[i];
        }
Arrays.sort(a);
System.out.println(a[0]+" "+a[N-1]+" "+sum);
}
}


Measured memory_bytes: 41716
#include<iostream>
#define FOR(i,a,b) for(int i=(a);i<(b);++i) 
#define REP(i,n) FOR(i,0,n)
#define EACH(x,a) for(auto& (x):(a))
#define ALL(obj) (obj).begin(),(obj).end()
#define Yes(n) cout<<((n)?"Yes":"No")<<endl;
using namespace std;
using ll=long long;
const int INF=1e9;
const ll LINF=1e18;
int gcd(int a,int b){return b?gcd(b,a%b):a;}





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

  int a[5];
  int k;
  bool yay=true;
  REP(i,5) cin>>a[i];
  cin>>k;

  if(a[4]-a[0]>k) yay=false;

  if(yay) cout<<"Yay!";
  else cout<<":(";
  return 0;
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		String S = sc.next();
		String[] SSplit = S.split("");
		int res = 0;
		for (int i = 0; i < SSplit.length / 2; i++) {
			if (!SSplit[i].equals(SSplit[SSplit.length - i - 1])) {
				res++;
			}
		}
		System.out.print(res);
	}
}


Measured memory_bytes: 21712
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
    static PrintWriter out;

    public static void main(String[] args) throws IOException {
        out = new PrintWriter(new OutputStreamWriter(System.out));
        CF_Reader in = new CF_Reader();

        String word = in.next();
        out.println((word.charAt(2) == word.charAt(3) && word.charAt(4) == word.charAt(5)) ? "Yes" : "No");

        out.close();
    }


    static class CF_Reader {
        BufferedReader br;
        StringTokenizer st;

        public CF_Reader() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine().trim());
            return st.nextToken();
        }

        long nextLong() throws IOException {
            return Long.parseLong(next());
        }

        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }

        char nextCharacter() throws IOException {
            return next().charAt(0);
        }

        String nextLine() throws IOException {
            return br.readLine().trim();
        }
    }
}


Measured memory_bytes: 21204
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <numeric>
#include <chrono>
#include <bitset>
#include <tuple>
#include <queue>
#include <map>
#include <cstring>
#include <cassert>
using namespace std;

const int N = 2e5 + 10, mod = 1e9 + 7;


int main() {
    // ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int tc = 1; 
    // scanf("%d", &tc);
    for(int cn = 1; cn <= tc; cn++) {
        int k; cin >> k;
        string s; cin >> s;
        if(s.size() <= k) cout << s;
        else {
            cout << s.substr(0, k) + "...";
        }
    }  
    return 0;
}

Measured memory_bytes: 3576
x, n = map(int, input().split())
if n == 0:
  print(x)
  exit()
a = list(map(int, input().split()))
b = list(range(102))
result = list(set(b) - set(a))
r = sorted(result)
min_ = 10**9
min_idx = -1
for i in range(len(r)):
  if abs(r[i]-x) < min_:
    min_ = abs(r[i]-x)
    min_idx = i
print(r[min_idx])




Measured memory_bytes: 9208
l = input()
MOD = 10**9 + 7
n = len(l)

a = 1
b = 2
for i in range(1,n):
    if l[i] == '0':
        a,b = 3*a,b
    else:
        a,b = 3*a+b,2*b
    a %=MOD
    b %=MOD

print((a+b)%MOD)

Measured memory_bytes: 39664
#include <bits/stdc++.h>
#include <algorithm>
#include <functional>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define DEBUG
#define PI 3.141592653589793238462643383279

#define _GLIBCXX_DEBUG
#ifdef DEBUG
#define s(...) show(__VA_ARGS__);
#define sl(...) show(__VA_ARGS__);cout<<endl;
#else
#define s(...)
#define sl(...)
#endif
void show() {}
template <class Head,class... Args>void show(Head t,Args... args){std::cout<<t<<" ";show(args...);}
#define REP(i, n) for(ll i = 0; i < n; i++)
#define REPR(i, n) for(ll i = n; i >= 0; i--)
#define FOR(i, m, n) for(ll i = m; i < n; i++)
#define REP1(i, n) for(ll i = 1; i <= n; i++)
#define REPR1(i, n) for(ll i = n; i >= 1; i--)
#define FOR1(i, m, n) for(ll i = m; i <= n; i++)
const ld INF = 1e9+123;
#define VEC(type,A,N) vector<type> A(N+10)
#define VECi(type,A,N,i) vector<type> A(N+10,i)
#define VEC2(type,A,N,M) vector<vector<type>> A(N+10,vector<type>(M+10))
#define VEC2i(type,A,N,M,i) vector<vector<type>> A(N+10,vector<type>(M+10,i))
#define ALL(v) v.begin(), v.end()
ll frac(ll k){
    int s = 1;
    for (ll i=1; i<=k; ++i)s *= i;
    return s;
}
ll gcd(ll a, ll b){
   if (a%b==0)return(b);
   else return(gcd(b, a%b));
}
ll lcm(ll a,ll b){
    return a*b/gcd(a,b);
}
ll antidiv(ll N,ll C,ll D){
    return N-floor(N/C)-floor(N/D)+floor(N/lcm(C,D));
}
vector<ll> yakusuu(ll N){
    vector<ll> ret;
    for (ll i = 1; i * i <= N; i++) {
        if (N % i == 0) {
            ret.push_back(i);
            if (i * i != N) ret.push_back(N / i);
        }
    }
    sort(ret.begin(), ret.end());
    return ret;
}

int main(){
    ll N,M;
    cin>>N>>M;
    cout<<abs((N-2)*(M-2));
    
    //cout<<fixed<<setprecision(32)<<m;
    //sort(ALL(C),[](auto& a, auto& b) {return a[2] < b[2];});
    //if(equal(D.begin(), D.end()-1, K.begin()))cout<<"Yes";else cout<<"No";
    cout<<endl;
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <complex>
#include <vector>
#include <string>
#include <sstream>
#include <cmath>
using namespace std;
typedef complex<double> P;

const double eps = 1e-8;

bool equals(double a, double b) {
  return abs(a-b) < eps;
}

struct C {
  P o;
  double r;
  C() {}
  C(P o, double r) : o(o), r(r) {}
};

int isIntersect(C a, C b) {
  double x = a.o.real() - b.o.real();
  double y = a.o.imag() - b.o.imag();
  double s = a.r + b.r;
  double d = x*x + y*y;
  s *= s;
  if(equals(d, s)) return 1;
  if(d > s) return 0;
  double r = abs(a.r - b.r);
  r *= r;
  if(equals(d, r)) return -1;
  if(d > r) return 2;
  return -2;
}

bool isIn(C c, P p) {
  return abs(c.o - p) < c.r + eps;
}


vector<P> getCrossP(C c1, C c2) {
  vector<P> v;
  int cp = isIntersect(c1,c2);
  if(cp == 0 || cp == -2) return v;
  
  double ll = norm(c1.o - c2.o);
  double A = ( c1.r * c1.r - c2.r * c2.r + ll ) / ( 2.0 * ll );
  P base = c2.o - c1.o;

  if(abs(cp) == 1) {
    v.push_back(c1.o + A*base);
  } else {
    P n(-base.imag(), base.real());
    n /= abs(n);
    double h = sqrt(c1.r * c1.r - A*A*ll);
    v.push_back(c1.o + A*base + h*n);
    v.push_back(c1.o + A*base - h*n);
  }
  return v;
}

int N;
vector<P> ps;

int main() {
  while(cin >> N && N) {
    ps.resize(N);
    for(int i = 0; i < N; ++i) {
      string s;
      cin >> s;
      replace(s.begin(), s.end(), ',', ' ');
      stringstream ss(s);
      ss >> ps[i].real() >> ps[i].imag();
    }
    vector<P> ps2;
    for(int i = 0; i < N; ++i) {
      for(int j = i+1; j < N; ++j) {
        vector<P> v = getCrossP(C(ps[i], 1.0), C(ps[j], 1.0));
        for(int k = 0; k < v.size(); ++k) {
          ps2.push_back(v[k]);
        }
      }
    }

    int ans = 1;
    for(int i = 0; i < ps2.size(); ++i) {
      int sum = 0;
      for(int j = 0; j < ps.size(); ++j) {
        sum += isIn(C(ps[j], 1.0), ps2[i]);
      }
      ans = max(ans, sum);
    }
    cout << ans << endl;
  }
  return 0;
}

Measured memory_bytes: 1308
import sys
def input(): return sys.stdin.readline().strip()


def main():
    k = int(input())
    if k % 2 == 0: print((k // 2) ** 2)
    if k % 2 != 0: print(((k - 1) // 2) * (k + 1) // 2)
    

if __name__ == "__main__":
    main()


Measured memory_bytes: 38256
#include <bits/stdc++.h>
#define ll long long

using namespace std;

int main()
{
    string s,t;
    cin>>s>>t;
    
    int count=0;
    
    for(int i=0;i<s.size();i++){
        if(s[i]!=t[i]) count++;
    }
    
    cout<<count;
    
    return 0;
}


Measured memory_bytes: 3836
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define dunk(n) cout << n << endl
#define all(v) v.begin(), v.end()
typedef long long ll;



int main() {
    string s,t ;
    cin >> s >> t;
    
    if(s.size()+1==t.size() && s==t.substr(0,s.size())) dunk("Yes");
    else dunk("No");
    
    return 0;
}



Measured memory_bytes: 3628
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,m,n) for(int i=m;i<n;i++)
ll mod=1e9+7;
typedef pair<ll,int> P;


int main(){
  int n,m,x,y;
  cin>>n>>m>>x>>y;
  int a=-100;
  rep(i,0,n){
    int cur;
    cin>>cur;
    a=max(a,cur);
  }
  int b=100;
  rep(i,0,m){
    int cur;
    cin>>cur;
    b=min(b,cur);
  }
  if(a>=b) cout<<"War"<<endl;
  else if(b<=x || a>=y) cout<<"War"<<endl;
  else cout<<"No War"<<endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <cmath>
 
using namespace std;
int main()
{
	int n, tt, tx, ty; 
	int t = 0, x = 0, y = 0, flag = 0;
	cin >> n;
	for (int i = 0; i<n; i++)
	{
		cin >> tt >> tx >> ty;
		if (abs(tx - x) + abs(ty - y)>(tt - t) || (abs(tx - x) + abs(ty - y)) % 2 != (tt - t) % 2)
			flag = 1;
		t = tt;
		x = tx;
		y = ty;
	}
	if (!flag)	
		cout << "Yes" << endl;
	else	
		cout << "No" << endl;
 
	return 0;
}

Measured memory_bytes: 256
N, M = [int(a) for a in input().split()]
A = [int(a) for a in input().split()]
B = [0] * M
C = [0] * M
for j in range(M):
    B[j], C[j] = [int(a) for a in input().split()]

D = zip(C, B)
D = sorted(D, reverse=True) # Cで降順ソート
C, B = zip(*D)  # 統合していた配列を元に戻す

# C[0]>= C[1] >= ... >= C[M-1]となるように並び替え、
# B[0]枚をC[0]に、B[1]枚をC[1]に書き換えていく。
# すべてのカードがC[j]以上というjに到達したらおしまい。
A.sort()

k = 0 # 現在書き換えを検討しているカード
for j in range(M):
    for _ in range(B[j]):
        if k >= N or A[k] >= C[j]: break
        A[k] = C[j]
        k += 1

print(sum(A))

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

typedef int64_t Int;
#define all(x) (x).begin(), (x).end()
 
const double EPS = 1e-10;
const Int INF = 1e18;
const int inf = 1e9;
const Int mod = 1e9+7;

bool print_space_enable = false;
void print() { 
    cout << endl; 
    print_space_enable = false;
}

template <class Head, class... Tail>
void print(Head&& head, Tail&&... tail) {
    if (print_space_enable) cout << " ";
    cout << fixed << setprecision(15) << head;
    print_space_enable = true;
    print(std::forward<Tail>(tail)...);
}

template<typename T>
void print(vector<T> v) {
    for (size_t i = 0; i < v.size(); i++) {
        if (i > 0) std::cout << " ";
        std::cout << v[i];
    }
    std::cout << std::endl;
}

int main() {
    char c;
    cin >> c;
    if ('A' <= c and c <= 'Z') {
        print("A");
    } else {
        print("a");
    }
    return 0;
}

Measured memory_bytes: 3616
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
typedef long long ll;
int main() {
    string s,t;cin>>s>>t;
    string rev=s;
    bool ok=false;
    if (s==t)
    {
        /* code */
        ok=true;
    }
    
    for (int i = 0; i < s.size(); i++)
    {
        /* code */
        
        rev.erase(rev.begin()+0);
        rev.push_back(s[i]);
        if (rev==t)
        {
            /* code */
            ok=true;
        }
    }
    if (ok)
    {
        /* code */
        cout<<"Yes"<<endl;
    }
    else
    {
        cout<<"No"<<endl;
    }
    
    

}

Measured memory_bytes: 256
#![allow(unused_imports)]pub mod pcl{}
use std::collections::HashSet;
fn divisors(n: i64) -> Vec<i64> {
    let mut res = Vec::new();
    for i in 1..((n as f64).sqrt() as i64 + 1) {
        if n % i == 0 {
            res.push(i);
            res.push(n / i);
        }
    }
    res.sort();
    res.retain(|&x| x != 1);
    res
}
fn main() {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    let n = s.trim().parse::<i64>().unwrap();
    let mut res = divisors(n - 1);
    let divs = divisors(n);
    for div in divs {
        let mut n = n;
        while n % div == 0 {
            n /= div;
        }
        if n % div == 1 {
            res.push(div);
        }
    }
    res.sort();
    res.dedup();
    println!("{}", res.len());
}



Measured memory_bytes: 4352
import Control.Monad (replicateM)
import Data.Array.IArray

makeGrid :: a -> (Int, Int) -> [[a]] -> Array (Int, Int) a
makeGrid e (h,w) xss = accumArray
                      (flip const)
                      e
                      ((0,0), (h+1,w+1))
                      [ ((i,j), x) | (i,xs) <- zip [1..] xss
                                   , (j,x)  <- zip [1..] xs
                      ]

adjacent :: Eq a => a -> Array (Int, Int) a -> (Int, Int) -> Bool
adjacent x grid (i,j) = grid ! (i,j) /= x
                     || grid ! (i-1,j) == x
                     || grid ! (i+1,j) == x
                     || grid ! (i,j-1) == x
                     || grid ! (i,j+1) == x

solve :: Array (Int, Int) Char -> String
solve grid = let (_, (h',w')) = bounds grid
             in if all (adjacent '#' grid) [ (i,j) | i <- [1 .. h'-1]
                                                   , j <- [1 .. w'-1]
                                           ]
                  then "Yes"
                  else "No"

main :: IO ()
main = do
  [h,w] <- map read . words <$> getLine
  grid <- makeGrid '.' (h,w) <$> replicateM h getLine
  putStrLn $ solve grid


Measured memory_bytes: 1020
#include<stdio.h>
int main(void){

int w,h,x,y,r;
scanf("%d %d %d %d %d",&w,&h,&x,&y,&r);

if(0>y-r||0>x-r||w<x+r||h<y+r){printf("No\n");}
else{printf("Yes\n");}

return 0;
}

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

using namespace std;
using ll = long long;
using P = pair<int,int>;
using Pl = pair<ll,ll>;
#define REP(i,n) for(ll i = 0;i < (ll)n;i++)
#define REPD(i,n) for(ll i = (ll)n - 1;i >= 0;i--)
#define ALL(x) (x).begin(),(x).end()
#define FILLl(n,first_dimension_size,value) fill((ll*)n,(ll*)(n+first_dimension_size),value)
#define FILL(n,first_dimension_size,value) fill((int*)n,(int*)(n+first_dimension_size),value)
#define INF (1 << 30)
#define MOD 1000000007
//int dy[4] = {-1,0,0,1};
//int dx[4] = {0,1,-1,0};

  bool dp[300000][3000];

int main(){

  int n,Y;
  cin >> n >> Y;
  Y /= 1000;
  FILL(dp,n+1,0);
  dp[0][0] = true;
  int maney[3] = {1,5,10};
  REP(i,3){
    for(int j = 1;j <= n;j++){
      for(int k = 1;k <= Y;k++){
        if(k >= maney[i])dp[k][j] |= dp[k-maney[i]][j-1];
      }
    }
  }
  if(dp[Y][n]){
    int a[3] = {0,0,0};
    while(Y){
      REP(i,3){
        if(Y-maney[i] >= 0){
        	if(dp[Y-maney[i]][n-1])Y-=maney[i],n--,a[i]++;
        	else continue;
        }else{
          continue;
        }
      }
    }
    cout << a[2] << " " << a[1] << " " << a[0] << endl;
  }else{
    cout << -1 << " " << -1 << " " << -1 << endl;
  }
  



  return 0;
}


Measured memory_bytes: 59648
xlist = list(map(int,input().split()))
x = xlist[0]
y = xlist[1]

if y % 2 == 0:
    bool1 = True
else:
    bool1 = False

if y >= 2 * x and y <= 4 * x:
    bool2 = True
else:
    bool2 = False

if bool1 and bool2:
    print("Yes")
else:
    print("No")

Measured memory_bytes: 9180
#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
#include <map>
#include <queue>
#include <set>

#define ll long long
#define REP(i,n) for(int i = 0; i < n; i++)
#define PI 3.141592653589
#define MOD 1000000007

using namespace std;

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

int main(void){
    int sum = 0;
    string s;
    cin >> s;
    int N = s.size();
    REP(i,N){
        sum = (sum + (s[i]-'0')) % 9;
    }
    if(sum == 0) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}

Measured memory_bytes: 3716
#include <bits/stdc++.h>
using namespace std;
#define F first  
#define S second
#define ll long long
#define pb push_back
#define pr pair<ll,ll>

const ll N=1e5+9,mod=1e9+7,inf=1e18;


int main(int argc, char const *argv[])
{
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
   ll n,m;
   cin>>n>>m;
   if(n==m)cout<<"Yes\n";
   else cout<<"No\n";
   

	
	
	return 0;
}


Measured memory_bytes: 256
import java.util.*;

class Main{
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int min = 1000;
        int[] s = new int[n];
        int sum = 0;
        for(int i = 0; i < n; i++){
            int a = sc.nextInt();
            if(a % 10 != 0){
                min = Math.min(min, a);
            }
            sum += a;
        }
        if(sum % 10 == 0){
            if(min < 1000){
                System.out.println(sum-min);
            }else {
                System.out.println(0);
            }
        }else {
            System.out.println(sum);
        }
    }
}

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

using namespace std;

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

int read() {
  int res = 0, w = 1; char c = getchar();
  while (!isdigit(c) && c != '-') c = getchar();
  if (c == '-') c = getchar(), w = -1;
  while (isdigit(c)) res = (res << 1) + (res << 3) + c - '0', c = getchar();
  return res * w;
}

#define File ""

void Open_File() {
  freopen(File".in", "r", stdin);
  freopen(File".out", "w", stdout);
}

const int N = 410;
const int Mod = 998244353;

int add(int a, int b) {
  return (a += b) >= Mod ? a - Mod : a;
}

int sub(int a, int b) {
  return (a -= b) < 0 ? a + Mod : a;
}

int mul(int a, int b) {
  return 1ll * a * b % Mod;
}

int fast_pow(int a, int b) {
  int res = 1;
  for (; b; b >>= 1, a = mul(a, a)) {
    if (b & 1) res = mul(res, a);
  }
  return res;
}

int fac[N], inv[N];
int n, a[N], b[N], sa, sb;
int dp[N][N][N], tmp[N];

void init(int n = N - 1) {
  fac[0] = inv[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = mul(fac[i - 1], i);
  inv[n] = fast_pow(fac[n], Mod - 2);
  for (int i = n - 1; i >= 1; i--) inv[i] = mul(inv[i + 1], i + 1);
}

int main() {
  init();
  n = read();
  for (int i = 1; i <= n; i++) a[i] = read(), b[i] = read();
  dp[0][0][0] = Mod - 1;
  for (int i = 1; i <= n; i++) {
    tmp[0] = 1;
    for (int l = 1; l < b[i]; l++) tmp[l] = mul(tmp[l - 1], a[i]);
    for (int l = 1; l < b[i]; l++) tmp[l] = mul(tmp[l], inv[l]);
    for (int j = 0; j <= sb; j++) {
      for (int k = 0; k <= sa; k++) {
        dp[i][j][k] = add(dp[i][j][k], dp[i - 1][j][k]);
        for (int l = 0; l < b[i]; l++) {
          dp[i][j + l][k + a[i]] = sub(dp[i][j + l][k + a[i]], mul(dp[i - 1][j][k], tmp[l]));
        }
      }
    }
    sa += a[i];
    sb += b[i] - 1;
  }
  int ans = 0;
  for (int i = 0; i <= sb; i++) {
    for (int j = 1; j <= sa; j++) {
      int cur = mul(dp[n][i][j], fac[i]);
      cur = mul(cur, fast_pow(j, Mod - 1 - i));
      ans = add(ans, mul(cur, mul(sa, fast_pow(j, Mod - 2))));
    }
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 262400
#include<iostream>

int main(void)
{
  int N, K;
  std::string S;
  
  std::cin >> N;
  std::cin >> K;
  std::cin >> S;
  
  S[K - 1] = S[K - 1] + 0x20;
  
  std::cout << S << std::endl;
  return 0;
}
  
  

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

//#define int long long
#define ll long long
#define all(v) (v).begin(), (v).end()
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<n;++i)
#define exrep(i, a, b) for(ll i = a; i < b; i++)
#define out(x) cout << x << endl
#define EPS (1e-7)
#define gearup ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
typedef pair<ll, ll> P;
typedef vector<ll> vl;
typedef vector<vector<ll> > vvl;
typedef vector<vector<vector<ll> > > vvvl;
ll MOD = 1000000007;
const long long L_INF = 1LL << 60;
const int INF = 2147483647; // 2^31-1
const double PI = acos(-1);
//cout<<fixed<<setprecision(10);

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;}
template<class T> void debug(T v){rep(i,v.size()) cout<<v[i]<<" ";cout<<endl;}
const ll dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const ll dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};

signed main()
{   
    gearup;
    int n,k;cin>>n>>k;
    vl a(n);
    map<int,int> mp;
    rep(i,n){
        cin>>a[i];
        mp[a[i]]++;
    }
    ll t = mp.size();
    vector<pair<int,int> > p;
    for(auto b:mp){
        p.push_back(make_pair(b.second,b.first));
    }
    sort(all(p));
    ll res = 0;
    rep(i,p.size()){
        if(t<=k)break;
        res+=p[i].first;
        t--;
    }
    out(res);
}


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

int main() {
  int N, K, sum=1;
  
  cin >> N >> K;
  
  int i;
  while ( i < N ) {
    if ( sum < K ) {
      sum *= 2;
    }
    else {
      sum += K;
    }
    i++;
  }
  cout << sum << endl;
}


Measured memory_bytes: 256
#include <iostream>
#include <stdio.h>
#include <set>
#include<bits/stdc++.h>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <iomanip>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
    int x1 , x2 , x3 , x4 , x5;
    cin>>x1>>x2>>x3>>x4>>x5;
    if(x1==0){
        cout<<1;
    }
    if(x2==0){
        cout<<2;
    }
    if(x3==0){
        cout<<3;
    }
    if(x4==0){
        cout<<4;
    }
    if(x5==0){
        cout<<5;
    }
}


Measured memory_bytes: 3580
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    ll n, m, c;
    cin >> n >> m >> c;
    ll cnt = 0;
    vector<vector<ll>> books(n, vector<ll>(m + 1, 0));
    for (ll i = 0; i < n; i++)
    {
        for (ll j = 0; j < m + 1; j++)
        {
            cin >> books[i][j];
        }
    }
    bool j = false;
    ll ans = 1145141919810;
    for (ll bit = 0; bit < (1 << n); bit++)
    {
        vector<ll> a;
        ll sum = 0;
        for (ll i = 0; i < n; i++)
        {
            if (bit & (1 << i))
                a.emplace_back(i);
        }
        vector<ll> master(m, 0);
        for (ll i = 0; i < a.size(); i++)
        {
            for (ll j = 0; j < m + 1; j++)
            {
                if (j == 0)
                    sum += books[a[i]][0];
                else
                {
                    master[j - 1] += books[a[i]][j];
                }
            }
        }
        bool k = true;
        for (ll i = 0; i < m; i++)
        {
            if (c > master[i])
                k = false;
        }
        if (k)
        {
            ans = min(ans, sum);
            cnt++;
        }
    }
    cout << (cnt == 0 ? -1 : ans) << endl;
}

Measured memory_bytes: 3600