akhauriyash/Code-Regression huggingface dataset:
#include<stdio.h>
int main()
{
    int a,b=15,i,x[6],y[6];
    for(i=0;i<6;i++){
        scanf("%d",&x[i]);
    }
    for(i=0;i<6;i++){
        scanf("%d",&y[i]);
    }
    while(b--){
        if(x[0]==y[0]&&x[5]==y[5]){
            if(x[1]==y[1]&&x[4]==y[4]){
                if(x[2]==y[2]&&x[3]==y[3]){
                    puts("Yes");
                    return 0;
                }
            }
            else{
/*SpinCW*/      a=y[4];y[4]=y[3];y[3]=y[1];y[1]=y[2];y[2]=a;
            }
        }
        else{
            if(a%2){
/*RolS*/        a=y[0];y[0]=y[4];y[4]=y[5];y[5]=y[1];y[1]=a;
            }
            else{
/*RolE*/        a=y[0];y[0]=y[3];y[3]=y[5];y[5]=y[2];y[2]=a;
            }
        }
    }
    puts("No");
    return 0;
}

Measured memory_bytes: 580
#pragma GCC optimize("O3")

#define _GLIBCXX_DEBUG
#include <iostream>
#include <vector>
#include <string>
#include <string_view>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
using namespace std;

/*----------macros----------*/

//output================
#define endl '\n'
#define fcout(a) cout << fixed << setprecision((int)(a))

//typedef===============
typedef long long       ll;
typedef long double     ld;
typedef pair<int, int>  Pii;
typedef pair<ll, ll>    Pll;

//const number==========
constexpr ll INF9   = (ll)1e9 + 1;
constexpr ll INF18  = (ll)1e18 + 1;
constexpr ll MOD    = 1000000007;
constexpr ld PI     = 3.141592653589793L;

//member================
#define pb push_back
#define eb emplace_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second

//others================
#define all(x)          (x).begin(), (x).end()
#define rall(x)         (x).rbegin(), (x).rend()
#define rep(i, n)       for(int i = 0; (i) < (n); ++(i))
#define reps(i, n)      for(int i = 1; (i) <= (n); ++(i))
#define rrep(i, n)      for(int i = n - 1; (i) >= 0 ; --(i))
#define CtoI(c)         int((c)) - int('0')
#define ItoC(c)         char((c) + '0')

//functions=============
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }

template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

//vector<int> dx = {1, 0, -1, 0}, dy = {0, 1, 0, -1};
//vector<int> dx2 = { 1,1,0,-1,-1,-1,0,1 }, dy2 = { 0,1,1,1,0,-1,-1,-1 };

/*--------additional--------*/



/*----------main------------*/

int main() {
/*----------fastio----------*/
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    std::ios::sync_with_stdio(false);
/*----------solve-----------*/

    ll a, b, c, k; cin >> a >> b >> c >> k;
    if(k%2 == 0){
        cout << a - b << endl;
        return 0;
    }
    else cout << b - a << endl;

return 0;
}

Measured memory_bytes: 3588
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
//using ll = long long;
//using P = pair<int, int>;

int main() {
    int n;
    cin >> n;
    map<string, int> mp;
    rep(i,n) {
        string s;
        cin >> s;
        // O(NlogN)
        auto itr = mp.find(s);
        if (itr != mp.end()) itr->second++;
        else mp[s] = 0;
    }
    int cnt = 0;
    vector<string> ans;
    for (auto itr = mp.begin(); itr != mp.end(); ++itr) {
        if (cnt < itr->second) {
            cnt = itr->second;
            ans = vector<string> (0);
            ans.push_back(itr->first);
        } else if (cnt == itr->second) ans.push_back(itr->first);
    }
    sort(ans.begin(), ans.end());
    rep(i,ans.size()) cout << ans[i] << endl;

    return 0;
}

Measured memory_bytes: 26868
//============================================================================
// Name        : hoba.cpp :)
// Author      : (O_O Diab) (Why_not) (el 3AQ)
// Version     :
// Copyright   : please, Don't touch me :(
// Description : problem in C++
// MAIN IDEA   :
//============================================================================
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define rw freopen("input.txt","r",stdin),freopen("output.txt","w",stdout);
#define pb push_back
#define F first
#define S second
#define pf push_front
#define lp(i,a,b) for (int i=a;i<=(int)b;++i)
#define lp2(i,a,b) for (int i=a;i>=b;--i)
#define f(x) return cout<<x<<"\n",0
#define pii pair<int,int>
#define pll pair<ll,ll>
#define all(c) c.begin(),c.end()
#define allr(c) c.rbegin(),c.rend()
#define p(x) cout<<#x<<" = { "<<x<<" } \n"
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define vll vector<pll>
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define EPS 1e-6
// to convert string to number use int a = stoi(string);
// to convert number to string use string s = to_string(int);
#define FAST ios::sync_with_stdio(0),ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define clr(c,x) memset(c,x,sizeof(c));
using namespace __gnu_pbds;
using namespace std;
const ll INFL = 0x3f3f3f3f3f3f3f3fLL;
const int dx[] = { 0, 1, 0, -1, 1, -1, 1, -1 };
const int dy[] = { 1, 0, -1, 0, 1, -1, -1, 1 };
const int N = 1e5 + 5, mod = (int) 1e9 + 7, INF = 0x3f3f3f3f;
int n, DP[45][405][405] = { }, a, b, x[44], y[44], c[44];
int solve(int idx, int tot_A, int tot_B) {
	if (idx > n) {
		if (tot_B) {
			ll d = __gcd(tot_A, tot_B);
			tot_A /= d;
			tot_B /= d;
			if (tot_A == a && tot_B == b)
				return 0;
		}
		return 1e9;
	}
	int &ret = DP[idx][tot_A][tot_B];
	if (ret != -1)
		return ret;
	ret = 1e9;
	ret = min(ret, solve(idx + 1, tot_A + x[idx], tot_B + y[idx]) + c[idx]);
	ret = min(ret, solve(idx + 1, tot_A, tot_B));
	return ret;
}
int main() {
#ifdef ONLINE_JUDGE
	FAST
#endif
	clr(DP, -1);
	cin >> n >> a >> b;
	lp(i,1,n)
		cin >> x[i] >> y[i] >> c[i];
	int u = solve(0, 0, 0);
	if (u >= 1e9)
		f(-1);
	f(u);
	return 0;
}

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

int parent(int i){return i / 2;};
int left(int i){return 2 * i;};
int right(int i){return 2 * i + 1;};

int upper = 2000000;
int n = 0;
vector<int> a(upper + 1);

void maxHeap(vector<int> &a, int i){
    int l = left(i);
    int r = right(i);
    int largest;
    if(l <= n && a[l] > a[i]){
        largest = l;
    }else{
        largest = i;
    }
    if(r <= n && a[r] > a[largest])largest = r;
    if(largest != i){
        swap(a[largest],a[i]);
        maxHeap(a,largest);
    }
}

void build(vector<int> &a){
    for(int i = n / 2;0 < i;i--){
        maxHeap(a,i);
    }
}


void heap_increase(vector<int> &a,int i,int key){
    if(key < a[i])return;
    a[i] = key;
    while(i > 1 && a[parent(i)] < a[i]){
        swap(a[i],a[parent(i)]);
        i = parent(i);
    }
}

void insert(int key){
    n++;
    a[n] = -2100000000;
    heap_increase(a,n,key);
}

int extract(){
    if(n < 1)return -2100000000;
    int maxi = a[1];
    a[1] = a[n];
    n--;
    maxHeap(a,1);
    return maxi;
}

int main(){
    int key;
    string s;
    
    while(1){
        cin >> s;
        if(s[0] == 'e' && s[1] == 'n')break;
        if(s[0] == 'i'){
            cin >> key;
            insert(key);
        }else cout << extract() << endl;
    }
}



Measured memory_bytes: 10584
#include <cstdio>
#include <iostream>
#include <iomanip>
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <utility>
#include <cmath>

#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue

using namespace std;
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
typedef pair<ll, ll> Pll;
const int inf = 1e9;
const ll linf = 1LL << 50;

int main(int argc, char const* argv[])
{
  ll a, b, x;
  cin >> a >> b >> x;
  ll l = (a + x - 1) / x;
  ll r = (b) / x;
  cout << r - l + 1 << endl;
	return 0;
}


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

using namespace std; 

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef pair<LL, LL> PLL;
typedef vector<PLL> VPLL;
typedef priority_queue<int> PQ_DESC;
typedef priority_queue<int, vector<int>, greater<int>> PQ_ASC;
typedef priority_queue<PII> PQ_DESC_PII;
typedef priority_queue<PII, vector<PII>, greater<PII>> PQ_ASC_PII;

#define ALL(c) (c).begin(),(c).end()
#define PB push_back
#define MP make_pair
#define SORT_ASC(c) sort(ALL(c))
//#define SORT_DESC(c) sort(ALL(c), greater<typeof(*((c).begin()))>())
#define SORT_DESC(c) sort((c).rbegin(),(c).rend())
#define REV(c) reverse((c).begin(), (c).end())
#define SIZE(a) int((a).size())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define ROF(i,a,b) for(int i=(b-1);i>=(a);--i)
#define REP(i,n) FOR(i,0,n)
#define PER(i,n) ROF(i,0,n)

const double EPS = 1e-10;
const double PI  = acos(-1.0);
const int LARGE_INT = 1e9+100;
const int INF = 2e9+100;
const LL INF_LL = (LL)INF*(LL)INF;
const int MOD = 1e9+7;

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

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

void Main()
{
    int a,b;cin>>a>>b;
    if(a>=13){
        cout<<b<<endl;
    }
    else if(a>=6){
        cout<<b/2<<endl;
    }
    else{
        cout<<0<<endl;
    }
	return;
}

int main()
{
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Main();
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <iostream>
#include <functional>
#include <vector>
#include <stdio.h>
#include <queue>
#include <string.h>
#include <math.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<=n;i++)
#define rep1(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=a;i>=n;i--)
#define per1(i,a,n) for (int i=a;i>n;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
#define endl "\n"
#define pi 3.14159265358979323846264338327950288419716939937510
#define IOS cin.sync_with_stdio(false);cin.tie(0);cout.tie(0);
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const ll mod=1000000007;
const int inf=0x3f3f3f3f;
const ll INF=0x3f3f3f3f3f3f3f3f;
ll qpow(ll a,ll b){ll s=1;while(b>0){if(b%2==1){s=s*a;}a=a*a;b=b>>1;}return s;}
ll qpowmod(ll a, ll b, ll c){ll res, t;res=1;t=a%c;while(b){if(b & 1){res=res*t%c;}t=t*t%c;b>>=1;}return res;}
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
inline long long read(){long long k=0,f=1;char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}while(ch>='0'&&ch<='9'){k=k*10+ch-'0';ch=getchar();}return k*f;}
inline void write(long long x){if(x<0)x=-x,putchar('-');if(x>9)write(x/10);putchar(x%10+'0');}
// head
string s,t,u;
ll a,b;
int main()
{
    //IOS;
    cin>>s>>t>>a>>b>>u;
    if(s==u)
    {
        a--;
    }
    if(t==u)
    {
        b--;
    }
    cout<<a<<' '<<b<<endl;
    return 0;
}
/*

*/


Measured memory_bytes: 256
def main():
    N = int(input())

    xxyy = []
    for _ in range(N):
        A = int(input())
        xy = []
        for _ in range(A):
            x, y = map(int, input().split())
            xy.append((x - 1, y))
        xxyy.append(xy)

    ans = 0
    for i in range(2**N):
        truths = [1 if 0 < (i & 2**j) else 0 for j in range(N)]

        sts = True
        for j in range(N):
            if truths[j] == 1:
                for xy in xxyy[j]:
                    x, y = xy
                    if y == 0 and truths[x] == 1:
                        sts = False
                    if y == 1 and truths[x] == 0:
                        sts = False
        if sts:
            ans = max(ans, len(list(filter(lambda x: 0 < x, truths))))

    print(ans)


main()


Measured memory_bytes: 3064
<?php

while (true) {
    list($num1, $num2) = explode(" ", trim(fgets(STDIN)));
    
    if ($num1 == "0" && $num2 == "0") {
        break;
    }
    
    if ($num1 > $num2) {
        echo $num2 . " " . $num1, PHP_EOL;
    } else {
        echo $num1 . " " . $num2, PHP_EOL;
    }
}

Measured memory_bytes: 15152
import java.util.*;
public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int a = Integer.parseInt(sc.next());
		int b = Integer.parseInt(sc.next());
		int c = Integer.parseInt(sc.next());
		
		if((a+b == c) || (a+c == b) || (b+c == a)) {
			System.out.println("Yes");
		}else {
			System.out.println("No");
		}
	}
}

Measured memory_bytes: 23764
#include<bits/stdc++.h>
#define ll long long
#define F(type, i, a, b) for(type i = a; (a <= b)?i <= b:i >= b; (a <= b)?i ++: i --)
#define RF(type, i, a, b) for(type i = a; i >= b;i --)
#define sz(a) sizeof(a)
#define deb(a) cout<<" ["<<#a<<"->"<<a<<"] "
#define next_line cout<<'\n'
using namespace std;

typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<char,int> pci;
typedef map<int,int> mii;
typedef map<ll,ll> mll;
typedef map<char,int> mci;
typedef unordered_map<int,int> umii;
typedef unordered_map<ll,ll> umll;
typedef unordered_map<char,int> umci;
typedef vector<ll>  vll;
typedef vector<vector<ll> > vvll;

int n, arr[100001], dp[100001];

bool Win(int k){
    if(k < arr[0])
        return false;
    if(dp[k] != -1)
        return dp[k];
    bool ans = false;
    F(int, i, 0, n - 1){
        if(arr[i] <= k){
            ans |= !Win(k - arr[i]);
        }
        else{
            break;
        }
    }
    dp[k] = ans;
    return ans;
}

void solve()
{
    int k;
    cin>>n>>k;
    memset(dp, -1, sz(dp));
    F(int, i, 0, n - 1) cin >>arr[i];
    sort(arr, arr + n);
    bool ans = Win(k);
    (ans)?cout<<"First":cout<<"Second";
}

signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    //#ifndef ONLINE_JUDGE
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    //#else
    //#endif
    solve();
}


Measured memory_bytes: 8616
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <map>
#include<algorithm>
#include<sstream>
#include<iomanip>


using namespace std;



int main() {
	int n;
	cin >> n;
	string s;
	cin >> s;
	
	vector<int> wNum_to(n);
	vector<int> eNum_from(n);

	for (int i = 1; i < n;i++) {
		wNum_to[i] = wNum_to[i - 1] + (s[i - 1] == 'W');
	}
	for (int i = n-2; i >= 0;i--) {
		eNum_from[i] = eNum_from[i + 1] + (s[i + 1] == 'E');
	}

	int ans = n;

	for (int i = 0; i < n; i++) {
		int num = wNum_to[i] + eNum_from[i];

		if (ans > num) {
			ans = num;
		}
	}

	cout << ans << endl;

}

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

int main() {
  int N,M;
  cin >> N >> M ;
  
  vector< int > vec(N*M);
  
       for (int i = 0; i < (M*2) ;i++){
      			cin >> vec.at(i);
            }
  
		for (int ii = 0; ii < N; ii++) {
            int count = 0;
            for (int i = 0; i < (M*2) ;i++){
     			 if ( vec.at(i) == ( ii + 1 )){
            			 count ++;
       				 } 
            }
             cout << count << endl;
	}
}

Measured memory_bytes: 3636
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
import heapq
import math
from fractions import gcd
import random
import string
import copy
from itertools import combinations, permutations, product
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7

#############
# Main Code #
#############

N, A = getNM()
w = []
v = []
for i in range(N):
    a, b = getNM()
    w.append(a)
    v.append(b)

# limit回までコストカットできる
def knapsack_6(N, upper, limit, weight, value):
    dp = [[[0] * (upper + 1) for i in range(limit + 1)] for j in range(N + 1)]

    for i in range(N):
        # ボーナスでコスト１にするのを使ったか 使うと-1する
        for j in range(limit + 1):
            for l in range(upper + 1):
                # デフォルト　elseで下に置けない（場合分けが難しいので）
                dp[i + 1][j][l] = dp[i][j][l]
                # 追加
                if l >= weight[i]:
                    dp[i + 1][j][l] = max(dp[i][j][l], dp[i][j][l - weight[i]] + value[i])
                # 追加（コストカット）
                if l >= 1 and limit >= 1:
                    dp[i + 1][j - 1][l] = max(dp[i + 1][j - 1][l], dp[i][j - 1][l], dp[i][j][l - 1] + value[i])
    return dp[N][0][upper]

print(knapsack_6(N, A, 1, w, v))

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

class UnionFind {
private:
  vector<int> data;

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

  bool doUnite(int x, int y) {
    x = find(x), y = find(y);
    if (x == y)
      return (false);
    if (data[x] > data[y])
      swap(x, y);
    data[x] += data[y];
    data[y] = x;
    return (true);
  }

  int getFind(int k) {
    if (data[k] < 0)
      return (k);
    return (data[k] = find(data[k]));
  }

  int getSize(int k) { return (-data[find(k)]); }

public:
  UnionFind(int N) { data.resize(N, -1); }

  int same(int x, int y) { return isSame(x, y); }
  bool unite(int x, int y) { return doUnite(x, y); }
  int find(int k) { return getFind(k); }
  int size(int k) { return getSize(k); }
};

signed main() {
  int N, M;
  cin >> N >> M;

  UnionFind uf(N);

  for (int i = 0; i < M; i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    uf.unite(a, b);
  }

  map<int, int> mp;
  for (int i = 0; i < N; i++) {
    mp[uf.find(i)]++;
  }

  int mx = 1;
  for (int i = 0; i < N; i++) {
    mx = max(mx, mp[i]);
  }

  cout << mx << endl;

  return 0;
}

Measured memory_bytes: 17216
#define _USE_MATH_DEFINES

#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <utility>
#include <climits>
#include <vector>
#include <map>
#include <queue>
using namespace std;

#define ll long long
const int MOD = 1000000007;//10^9+7
const string SPACE = " ";

ll powsur(ll a, ll b, ll p) {

	if (b == 0) {

		return 1;

	}
	else if (b % 2 == 0) {

		ll d = powsur(a, b / 2, p);
		return ((d%p)*(d%p)) % p;

	}
	else {

		return ((a%p)*powsur(a, b - 1, p) % p) % p;

	}

}
//pは素数,aのb乗をpで割った余り

ll CMOD(ll n, ll r, ll p) {

	ll a = 1, b = 1, c = 1, re;
	for (int i = 1; i <= n; i++) {

		a *= i;
		a = a%p;

	}
	for (int i = 1; i <= r; i++) {

		b *= i;
		b = b%p;

	}
	for (int i = 1; i <= n - r; i++) {

		c *= i;
		c = c%p;

	}
	b = powsur(b, p - 2, p);
	c = powsur(c, p - 2, p);
	re = ((a%p)*(b%p)) % p;
	re = ((re%p)*c%p) % p;

	return re;

}
//pは素数,(nCr)%p

ll gcd(ll a, ll b) {

	if (a > b) {

		ll tmp = a;
		a = b;
		b = tmp;

	}
	ll r;
	r = b%a;
	if (r == 0)return a;
	else return gcd(r, a);

}
//最大公約数

ll lcm(ll a, ll b) {

	return (a / gcd(a, b))*b;

}
//最小公倍数

ll MAX(ll a, ll b) {

	if (a > b)return a;
	else return b;

}
//MAX

int main() {

	ll N, M, yan = 0, tmp;
	string S[105], T[105];

	cin >> N;
	for (int i = 0; i < N; i++) {

		cin >> S[i];

	}
	cin >> M;
	for (int i = 0; i < M; i++) {

		cin >> T[i];

	}

	for (int i = 0; i < N; i++) {
		
		tmp = 0;
		for (int j = 0; j < N; j++) {

			if (S[j] == S[i])tmp++;

		}
		for (int j = 0; j < M; j++) {

			if (T[j] == S[i])tmp--;

		}
		yan = max(yan, tmp);

	}

	cout << yan << endl;

	return 0;
}

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

using namespace std;
typedef long long ll;
#define rep(i, s, e) for (int(i) = (s); (i) <= (e); ++(i))
#define all(x) x.begin(),x.end()


int main()
{
	int k, s; cin >> k >> s;
	int ans = 0;
	rep(i, 0, k)rep(j, 0, k)
	{
		if(0 <= s - (i + j) && s - (i + j) <= k)++ans;
	}
	cout << ans << endl;
}

Measured memory_bytes: 256
#include <stdio.h>
int main (void)
{
  int a,b,c;
  scanf("%d",&a);	printf(" ");
  scanf("%d",&b);	printf(" ");
  scanf("%d",&c);	printf(" ");
  int d = (b-b%a)/a;
  if (d > c)
    printf("%d",c);
  else
    printf("%d",d);
}

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

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

    int N, K;
    cin >> N >> K;

    vector<ll> h(N);
    rep(i,N) cin >> h[i];

    vector<ll> cost(N, LLONG_MAX);
    cost[0] = 0;
    for (int i = 0; i < N - 1; i++) {
        for (int j = 1; j <= K; j++) {
            cost[i + j] = min(cost[i + j], cost[i] + abs(h[i + j] - h[i]));
        }
    }

    cout << cost[N-1] << endl;

    return 0;
}


Measured memory_bytes: 1792
def m():
    N, A, B, C, D = [int(i) - 1 for i in input().split()]
    N += 1
    S = input()

    if C < D:  # 追い抜かない
        for i in range(B, D):
            if S[i] == '#' and S[i+1] == '#':
                return False

        for i in range(A, C):
            if S[i] == '#' and S[i+1] == '#':
                return False
    else:  # 追い抜くパターン
        found = False
        for i in range(B, D+1):
            if S[i-1] == '.' and S[i] == '.' and S[i+1] == '.':
                found = True
                break
        if not found:
            return False

        for i in range(A, C):
            if S[i] == '#' and S[i+1] == '#':
                return False

    return True


print("Yes") if m() else print("No")


Measured memory_bytes: 40560
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n, t1, t2, i, pos;
	cin >> n >> t1 >> t2;
	double x, minn=999999;
	for (i=1; i<=n; i++)
	{
		cin >> x;
		x*=0.006;
		if (fabs(t1-t2-x)<minn)
		{
			minn=fabs(t1-t2-x);
			pos=i;
		}
	}
	cout << pos << endl;
	return 0;
}

Measured memory_bytes: 256
import java.text.MessageFormat;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		double a = scanner.nextDouble();
		double b = scanner.nextDouble();
		double c = scanner.nextDouble();
		double S;
		double L;
		double h;
		S =( a * b *Math.sin(Math.toRadians(c)))/2;
		L = a + b + Math.sqrt(a * a + b * b - (2 * a * b * Math.cos(Math.toRadians(c))));
		h = b * Math.sin(Math.toRadians(c));
		System.out.println(MessageFormat.format("{0,number,0.00000000}",S));
		System.out.println(MessageFormat.format("{0,number,0.00000000}",L));
		System.out.println(MessageFormat.format("{0,number,0.00000000}",h));

	}
}


Measured memory_bytes: 28488
#include <bits/stdc++.h>
#define LL long long
#define Accel ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define Re(a,b) memset(a,b,sizeof a)
#define F first
#define S second
#define MP make_pair
#define PB push_back
#define ALL(X) (X).begin(), (X).end()
#define FOR(I, A, B) for (int I = (A); I <= (B); I++)
#define REP(I, N) for (int I = 0; I < (N); I++)
#define PII pair<int,int>
#define PLL pair<LL,LL>
#define SZ(a) ((int)a.size())
#define endl "\n"
//#pragma GCC optimize(2)
using namespace std;
const int N=1e3+1;
const int M=1e9+7;
const double eps=1e-6;
typedef complex<double>C;
const double PI(acos(-1.0));
//__gcd, atan2(y,x)=y/x , __int128
//c(n,k)=c(n-1,k-1)+c(n-1,k)
//c(i,r),i for r to n =c(n+1,r+1)
//void add(int x){while(x<N)BIT[x]++,x+=x&-x;}
//int sum(int x){return x?BIT[x]+sum(x-(x&-x)):0;}
//int find(int x){return x==p[x]?x:p[x]=find(p[x]);}
//LL pw(LL a, LL b,LL M) { return b ? b & 1 ? a*pw(a, b - 1,M) % M : pw(a*a%M, b>>1,M) : 1; }
//log() = ln() , log(x)/log(y)=log(y)-base-x
//INT_MAX 127,INT_MIN 128
//int dw[4][2]={{0,1},{1,0},{0,-1},{-1,0}};
//int dw[8][2]={{0,1},{1,0},{0,-1},{-1,0},{1,1},{1,-1},{-1,1},{-1,-1}};
string s;
int f[301][301][301];
int main(){
	cin>>s;
	int x;
	cin>>x;
	int n=SZ(s);
	REP(i,n)
		REP(j,n-i){
			int from=j,to=j+i;
			//cout<<from<<" "<<to<<endl;
			for(int k=0;k<=x;k++){
				if(from==to)f[from][to][k]=1;
				else{
					f[from][to][k]=max(max(f[from+1][to][k],f[from][to-1][k]),f[from][to][k]);
					if(s[from]!=s[to])
						f[from][to][k+1]=max(f[from][to][k+1],f[from+1][to-1][k]+2);
					else f[from][to][k]=max(f[from][to][k],f[from+1][to-1][k]+2);
				}
				//cout<<f[from][to][k]<<endl;
			}
		}
	cout<<f[0][n-1][x]<<endl;
}


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

#define ld			long double
#define int         long long
#define pb          push_back
#define pii         pair<int,int>
#define vi          vector<int>
#define vii         vector<pii>
#define mi          map<int,int>
#define mii         map<pii,int>
#define all(a)      (a).begin(),(a).end()
#define x           first
#define y           second
#define sz(x)       (int)x.size()
#define endl        '\n'
#define MOD         1000000007
#define sd(t) 		scanf("%d",&(t))
#define rep(i,a,b)  for(int i=a;i<b;i++)
#define hii 		cout << "hii" << endl
#define okay 		cout << "okay" << endl
#define hey 		cout << "hey" << endl

template <class T> ostream& operator << (ostream &os, const vector<T> &v) { for (T i : v) os << i << ' '; return os; }
template <class T> ostream& operator << (ostream &os, const set<T> &v) { for (T i : v) os << i << ' '; return os; }
template <class T, class S> ostream& operator << (ostream &os, const pair<T, S> &v) { os << v.first << ' ' << v.second; return os; }
template <class T, class S> ostream& operator << (ostream &os, const unordered_map<T, S> &v) { for (auto i : v) os << '(' << i.first << "=>" << i.second << ')' << ' '; return os; } 
 
 
#ifndef ONLINE_JUDGE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <class Arg1> void __f(const char* name, Arg1&& arg1) { cerr << name << " : " << arg1 << endl; }
    template <class Arg1, class... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args) {
        const char* sep = strchr(names + 1, ',');
        cerr.write(names, sep - names) << " : " << arg1 << "  ";
        __f(sep + 1, args...);
    }
#else
#define trace(...) 
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx2,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define _CRT_SECURE_NO_WARNINGS
#endif // ifndef ONLINE_JUDGE

void fast()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
   
}

clock_t time_p=clock();
void starboy1299()
{
    time_p=clock()-time_p;
    cerr<<"Time Taken : "<<(float)(time_p)/CLOCKS_PER_SEC<<"\n";
}

const int N = 3e3+5;
int arr[105];
int dp[N][N];
int n, m;
string s, t;
string res;
int f(int idx1, int idx2){
	if(idx1==n or idx2==m){
		return 0;
	}
	if(dp[idx1][idx2]!=-1) return dp[idx1][idx2];
	int ans = 0;
	if(s[idx1]==t[idx2]){
		ans = max(ans,1 + f(idx1+1, idx2+1));
	}

	ans = max(ans, f(idx1+1, idx2));
	ans = max(ans, f(idx1, idx2+1));

	return dp[idx1][idx2] = ans;
}

void solve()
{
	cin >> s >> t;

	n = s.size();
	m = t.size();
	memset(dp, -1, sizeof(dp));
	string res = "";
	int sz = f(0, 0);
	int idx1 = 0, idx2 = 0;

	// for(int i=0; i<n; i++){
	// 	for(int j=0; j<n; j++){
	// 		cout << dp[i][j] << " ";
	// 	}
	// 	cout << endl;
	// }

	while(idx1 < n and idx2 < m){
		if(s[idx1]==t[idx2]){
			res += s[idx1];
			idx1++, idx2++;
		}
		else if(dp[idx1+1][idx2] > dp[idx1][idx2+1]){
			idx1++;
		}
		else idx2++;
	}
	
	cout << res << endl;
}			 	

int32_t main(){
	fast();
    int t = 1;
    // cin>> t;
    while(t--){
    	solve();
    }
	starboy1299();
}




Measured memory_bytes: 71040
import java.util.Scanner;
class Main{
	public static void main(String[] a){
		Scanner scan = new Scanner(System.in);
		int[] data = new int[5];
		for(int i = 0; i < 5; i++){
			data[i] = scan.nextInt();
		}
		for(int i = 0; i < 4; i++){
			for(int j = 4; j > i; j--){
				if(data[j] > data[j - 1]){
					int sub = data[j];
					data[j] = data[j - 1];
					data[j - 1] = sub;
				}
			}
		}
		System.out.println(data[0] + " " + data[1] + " " + data[2]
			+ " " + data[3] + " " + data[4]);
	}
}

Measured memory_bytes: 17176
#include <iostream>
#include <vector>
#include <utility>

using namespace std;

int n,a[2000001],b[2000001],c[10001];

void sort() {
	for(int i=0;i<=10000;i++)c[i]=0;
	for(int j=1;j<=n;j++)c[a[j]]++;
	for(int i=1;i<=10000;i++)c[i]+=c[i-1];
	for(int j=n;j>0;j--){b[c[a[j]]]=a[j];c[a[j]]--;}
}

int main(void) {
	cin>>n;for(int i=1;i<=n;i++)cin>>a[i];
	sort();
	for(int i=1;i<n;i++)cout<<b[i]<<" ";
	cout<<b[n]<<endl;
}



Measured memory_bytes: 18712
#include <bits/stdc++.h>
using namespace std;
 
#define ll long long 
#define llinf 4e17
#define nllinf -4e18
 
#define vll vector<ll>
#define sll set<ll>
#define pll pair<ll,ll> 
#define vpll vector<pair<ll,ll > >
 
#define repup(a,b,i) for(i=a;i<=b;i++)
#define repdown(a,b,i) for(i=b; i>=a; i--)
#define repupx(a,b,i,x) for(i=a;i<=b;i+=x)
	
#define repit(v,it) for(it=v.begin(); it!=v.end(); it++)
#define itall(v) v.begin(),v.end()
#define pb push_back
#define pf push_front
#define mp make_pair
#define fr first
#define sc second
 
#define err(n) cout<<n<<" ";
#define t1 cout<<",";
 
ll MOD= 998244353;
 
int main(){
ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
ll i,j;

ll n, k;cin>>n>>k;

ll a[n+5];repup(0,n-1,i)cin>>a[i];

ll ans[n+5];
ans[0]=0;
repup(1,min(n-1,k-1),i){
	ans[i]= abs(a[i]-a[0]);
	repup(1,i-1,j){
		ans[i]= min(ans[i], ans[j]+abs(a[i]-a[j]));
	}
}
repup(k,n-1,i){
	ans[i]= (ll)llinf;
	repdown(1,k,j){
		ans[i]=min(ans[i], ans[i-j]+abs(a[i]-a[i-j]));
	}
}

cout<<ans[n-1];
}

Measured memory_bytes: 1792
#include <bits/stdc++.h> 
using namespace std; 
 
// Function to traverse the DAG 
// and apply Dynamic Programming 
// to find the longest path 
void dfs(int node, vector<int> adj[], int dp[], bool vis[]) 
{ 
	// Mark as visited 
	vis[node] = true; 
 
	// Traverse for all its children 
	for (int i = 0; i < adj[node].size(); i++) { 
 
		// If not visited 
		if (!vis[adj[node][i]]) 
			dfs(adj[node][i], adj, dp, vis); 
 
		// Store the max of the paths 
		dp[node] = max(dp[node], 1 + dp[adj[node][i]]); 
	} 
} 
 
// Function to add an edge 
void addEdge(vector<int> adj[], int u, int v) 
{ 
	adj[u].push_back(v); 
} 
 
// Function that returns the longest path 
int findLongestPath(vector<int> adj[], int n) 
{ 
	// Dp array 
	int dp[n + 1]; 
	memset(dp, 0, sizeof dp); 
 
	// Visited array to know if the node 
	// has been visited previously or not 
	bool vis[n + 1]; 
	memset(vis, false, sizeof vis); 
 
	// Call DFS for every unvisited vertex 
	for (int i = 1; i <= n; i++) { 
		if (!vis[i]) 
			dfs(i, adj, dp, vis); 
	} 
 
	int ans = 0; 
 
	// Traverse and find the maximum of all dp[i] 
	for (int i = 1; i <= n; i++) { 
		ans = max(ans, dp[i]); 
	} 
	return ans; 
} 
 
// Driver Code 
int main() 
{   int n,m,x,y;
	cin>>n>>m;
	vector<int> adj[n + 1]; 
 
	for(int i=1;i<=m;++i)
    	{	cin>>x>>y;addEdge(adj, x, y); 
	}
	
	cout << findLongestPath(adj, n); 
	return 0; 
} 

Measured memory_bytes: 9600
while True:
    s=input().rstrip().split()
    if s[1]=='?':
        break
    elif s[1]=='+':
        print(int(s[0])+int(s[2]))
    elif s[1]=='-':
         print(int(s[0])-int(s[2]))
    elif s[1]=='*':
        print(int(s[0])*int(s[2]))
    elif s[1]=='/':
        print(int(s[0])//int(s[2]))

Measured memory_bytes: 7680
#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <algorithm>
#include <set>
#include <iomanip>
#include <stdio.h>
#include <sstream>
#include <bits/stdc++.h>
using namespace std;
int main(void){
  for(long long int i=0; i<5; i++){
    int x;
    cin>>x;
    if(x==0){
      cout<<i+1<<endl;
      break;
    }
  }
}

Measured memory_bytes: 3600
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <string>
using namespace std;
int main(void)
{
char c[6];
cin>>c[0]>>c[1]>>c[2]>>c[3]>>c[4]>>c[5];
if(c[0]==c[5]&&c[1]==c[4]&&c[2]==c[3])
{
cout<<"YES"<<endl;
}

else{
cout<<"NO"<<endl;
}
}


Measured memory_bytes: 256
#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <queue>
#include <limits>
#include <algorithm>
#include <string>
#include <set>
using namespace std;

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

	int32_t res = A + B;
	if (res > 23)
		res -= 24;

	cout << res << endl;

	return 0;
}

Measured memory_bytes: 256
n,m,x = map(int,input().split())

A = [int(i) for i in input().split()]
couA = 0
couB  =0
for i in range(x,n):
    if A.count(i):
        couA +=1
for j in range(x,0,-1):
    if A.count(j):
        couB +=1
print(min(couA,couB))

Measured memory_bytes: 3060
#include "bits/stdc++.h"
using namespace std;
#define repr(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repr(i,0,n)
#define reprrev(i,a,b) for(int i=(int)(b)-1;i>=(int)(a);i--)
#define reprev(i,n) reprrev(i,0,n)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define mp make_pair
#define mt make_tuple
#define MOD 1000000007
#define PI 3.1415926535
typedef long long ll;
typedef pair<int, int> Pi;
typedef pair<ll, ll> Pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<Pi> vPi;
typedef vector<Pll> vPll;
typedef vector<vector<int>> vvi;
typedef vector<vector<bool>> vvb;
typedef vector<vector<ll>> vvll;
typedef vector<vector<char>> vvc;
typedef vector<vector<string>> vvs;
typedef vector<vector<double>> vvd;
typedef vector<vector<Pi>> vvPi;
typedef priority_queue<int, vector<int>, greater<int>> pqli;
typedef priority_queue<ll, vector<ll>, greater<ll>> pqlll;
typedef priority_queue<Pi, vector<Pi>, greater<Pi>> pqlP;
string YN(bool y) { return (y?"YES":"NO"); }
string yn(bool y) { return (y?"Yes":"No"); }
string ON(bool y) { return (y?"OK":"NG"); }
int main(void)
{
	int n, k;

	string s;

	cin >> n >> s >> k;

	char sk=s[k - 1];

	rep(i, n){
		if(s[i] != sk) s[i]='*';
	}
	cout << s << endl;
}


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

int nums[200];

int main(){
  int N, A, B, C, X;

  while(cin >> N >> A >> B >> C >> X && (N || A || B || C || X)){
    int pos = 0;
    int res = 0;
    for(int i = 0; i < N; i++) cin >> nums[i];
    if(nums[pos] == X) pos++;
    while(pos < N){
      res++;
      X = (A * X + B) % C;
      if(nums[pos] == X) pos++;
      if(res > 10000){
	res = -1;
	break;
      }
    }
    cout << res << endl;
  }
  return 0;
}

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

#define count_ones __builtin_popcountl
typedef long long ll;
using namespace std;

int main() {
    ios::sync_with_stdio(false);

    ll n;
    cin >> n;
    string s;
    cin >> s;
    if (n % 2 != 0) {
        cout << "No";
        return 0;
    }
    for (ll i = 0, j = n / 2; i < n / 2; i++, j++) {
        if (s[i] != s[j]) {
            cout << "No";
            return 0;
        }
    }
    cout << "Yes";

    return 0;
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main(){
	int A, B;
	cin >> A >> B;
	char F;
	string S = "";

	if (A < B) {
		for (int i = 0; i < B; i++) {
			F = 48+A;
			S += F;
		}
	} else {
		for (int i = 0; i < A; i++) {
			F = 48+B;
			S += F;
		}
	}
    cout << S;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
// types
typedef long long ll; 
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> pii;
// IO
#define fo(i, n) for (int i = 0; i < n; i++)
#define fo1(i, n) for (int i = 1; i <= n; i++)
#define sc(n) scanf("%d", &n) 
#define sca(a, n) fo(i, n) sc(a[i])
#define pd(a) printf("%d ", a)
#define pld(a) printf("%d\n", a)
#define pda(a, n) fo(i, n) pd(a[i])
#define pl printf("\n")
#define pb(a) push_back(a)
#define mp(a, b) make_pair(a, b) 
void Yes() {printf("Yes\n");}
void No() {printf("No\n");}
// math
const ll mod = 1e9+7;
template<typename T> T gcf(T a, T b) {return (b == 0) ? a : gcf(b, a%b);} 
template<typename T> T lcm(T a, T b) {return (a*b)/gcf(a, b);}
template<typename T> T sumTo(T x) {return x * (x+1) / 2;}
template<typename T> T sumSquaresTo(T x) {return x * (x+1) * (2*x+1) / 6;}
template<typename T> T ceilDiv(T n, T d) {return (n+d-1)/d;}

const int MAXN = 1e7+10;

void solve() {
    int f[MAXN] = {0};
    fo1(i, MAXN) {
        for (int j = i; j < MAXN; j += i) f[j]++;
    }
    int n; cin >> n; 
    ll ans = 0;
    fo1(i, n) {
        ans += (ll) i * (ll) f[i];
    }
    cout << ans;
}

int main() {
    int t = 1;
    //scanf("%d", &t);
    while (t--) {
        solve();
    }
    return 0;
}

Measured memory_bytes: 42692
a, b, c, d = map(int, input().split())


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


div_c = b // c - (a - 1) // c
div_d = b // d - (a - 1) // d
e = c // gcd(c, d) * d
div_e = b // e - (a - 1) // e

ans = b - a + 1
ans -= (div_c + div_d) - div_e

print(ans)


Measured memory_bytes: 3060
#include<bits/stdc++.h>
#define Fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define Freed freopen ("0in.txt","r",stdin);
#define Fout freopen ("0out.txt","w",stdout);
#define ll long long int
#define pb push_back
#define mp make_pair
#define pi acos(-1.0)
#define Mod 1000000007
#define limit 1000008
using namespace std;

void solve(int t)
{
    ll i,j,n,m,ans=0,ct=0;
    cin >> n;
    for(i=1; i<n; i++)
    {
        int rem = n%i;
        ct = n/i;
        if(n%i==0)
            ct--;
        ans += ct;
    }
    cout <<ans<<endl;
    return ;
}
int  main()
{
//    Fast
//    Freed
//    Fout
    int t,tt=1;
   // cin >> tt;
    for(t=1; t<=tt; t++)
        solve(t);
    return 0;
}



Measured memory_bytes: 3640
#include<bits/stdc++.h>
#define forr(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i,n) for(int i = 0; i < (n); i++)
#define rrep(i,n) for(int i = 1; i <= (n); i++)
#define ALL(a) (a.begin()),(a.end())
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<ll, ll> LP;
const ll LINF = 1LL<<60;
const int INF = 1001001001;
const int MOD = 1000000007;

/* --------------------------------------------------- */

int main() {
    ll n;
    cin >> n;
    map<ll, ll> mp;
    rep(i, n) {
        ll a;
        cin >> a;
        mp[-a]++;
    }
    
    ll ans = 1;
    int cnt = 0;
    for(auto const& x : mp) {
        if(x.second >= 2) {
            if(x.second >= 4 && cnt == 0) {
                ans = x.first * x.first;
                cout << ans << endl;
                return 0;
            }
            ans *= x.first;
            cnt++;
        } 
        if(cnt == 2) {
            cout << ans << endl;
            return 0;
        }
    }
    cout << 0 << endl;

    return 0;
}

Measured memory_bytes: 6528
N = int(input())
A_B = [list(map(int, input().split())) for _ in range(N)]
A_B.sort(key=lambda x: x[1])
count = 0
for i in range(N):
    if count + A_B[i][0] <= A_B[i][1]:
        count += A_B[i][0]
        continue
    print("No")
    break
else:
    print("Yes")


Measured memory_bytes: 53724
nab = input()

nab = nab.split()

n = int(nab[0])
a = int(nab[1])
b = int(nab[2])

ans = 0

for i in range(1, n+1):
	s = 0
	q = i
	while q != 0:
		s = s + q % 10
		q = int( q / 10)	
		
	if s >= a and s <= b:
		ans = ans + i
	
print(ans)

Measured memory_bytes: 3064
n,m=map(int,input().split())
count=0
for i in range(n+1):
		for j in range(n-i+1):
			if(i*10000+j*5000+(n-j-i)*1000==m):
				print(i,j,(n-j-i))
				exit()
if(count==0):
	print('-1 -1 -1')

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

int main() {
  string S;
  cin >> S;
  int even = 0;
  int odd = 0;
  for (int i = 0; i < S.size(); i++) {
    if (i % 2 == 0) {
      if (S[i] == '1') even++;
    } else {
      if (S[i] == '1') odd++;
    }
  }
  int even_size = S.size()/2 + S.size()%2;
  int odd_size = S.size()/2;
  cerr << even << ',' << odd << ',' << even_size << ',' << odd_size << ',' << S.size() << endl;
  
  cout << min(odd_size - odd + even, even_size - even + odd) << endl;

  return 0;
}

Measured memory_bytes: 512
w,h,n = map(int,input().split())
data = []
for i in range(n):
    data.append(list(map(int,input().split())))
map_data = [[0 for i in range(w)] for j in range(h)]
for i in range(n):
    if data[i][2] == 1:
       for j in range(h):
           for k in range(0,data[i][0]):
               map_data[j][k] = 1
    elif data[i][2] == 2:
       for j in range(h):
           for k in range(data[i][0],w):
               map_data[j][k] = 1
    elif data[i][2] == 3:
       for j in range(0,data[i][1]):
           for k in range(w):
               map_data[j][k] = 1
    else:
       for j in range(data[i][1],h):
           for k in range(w):
               map_data[j][k] = 1
ans = 0
for i in range(h):
    ans += map_data[i].count(0)
print(ans)


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




int main(){
	int N; cin >> N;
	int a[N];
	for(int i=0;i<N;i++){
		cin >> a[i];
	}
	for(int i=0;i<N;i++){
		for(int j=i;0<j;j--){
			if(a[j-1] > a[j]){
				int tmp = a[j-1];
				a[j-1] = a[j];
				a[j] = tmp;
			}else {
				break;
			}
		}
		for(int k=0;k<N;k++){
			if(k<N-1)cout << a[k] << " ";
			else cout << a[k] ;
		}
		cout << endl;
	}
	return 0;
}



Measured memory_bytes: 3104
import heapq

N,K=map(int,input().split())
L=[]

for _ in range(N):
    (t,d)=map(int,input().split())
    heapq.heappush(L,(-d,t))

LL=[]
sum=0
used=set()

for i in range(K):
    d,t=heapq.heappop(L)
    if t in used:
        heapq.heappush(LL,(-d,t))
    used.add(t)
    sum+=-d

ans=len(used)**2+sum

while L and LL:
    d,t=heapq.heappop(L)
    if t not in used:
        used.add(t)
        dd,_=heapq.heappop(LL)
        sum=sum-dd+(-d)
        ans=max(ans,len(used)**2+sum)

print(ans)


Measured memory_bytes: 19236
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
     long long i,n,x,z=0,total=1,k;
     cin>>n;
     vector<long long>a;     
     for(i=0;i<n;i++)
     {
         cin>>x;
         a.push_back(x);
         if(x==0)
         {
            z++;
         }
         total*=x;
     }
     if(z>0)
     {
         cout<<"0"<<endl;
     }
     else
     {
         k=total;
         for(i=n-1;i>=0;i--)
         {
             total/=a[i];
         }
         if(total==1)
         {
             if(k<=1000000000000000000)
             {
                 cout<<k<<endl;;
             }
             else
             {
                 cout<<"-1"<<endl;
             }
         }
         else
         {
             cout<<"-1"<<endl;
         }
     }
     return 0;

}

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

using namespace std;

int main(void){
  long long H, N;
  cin >> H >> N;
  for(int i = 0; i < N; i++){
    long long A;
    cin >> A;
    H -= A;
  }
  if(H <= 0) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define _CRT_SECURE_NO_WARNINGS
#define ll long long
#define BUF 50
#define INF 1<<30
using namespace std;
ll MOD = 1e9 + 7;
ll A, B, C, D, G, H, N, M, L, K, P, Q, R, W, X, Y, Z;
string S;
ll ans = 0;
int main() {
	cin >> S;
	stack<char> st;
	st.push(S[0]);
	for (int i = 1; i < S.size(); i++) {
		if (st.size()==0) {
			st.push(S[i]);
			continue;
		}
		char now=st.top();
		if (S[i] != now) {
			st.pop();
			ans += 2;
		}
		else st.push(S[i]);
	}
	cout << ans << endl;
}

Measured memory_bytes: 512
#include<bits/stdc++.h>
using namespace std;
#define int  long long  
void solve(){
        string s;
        cin>>s;int n=s.length();
        if(s[n-1]=='2' || s[n-1]== '4' || s[n-1]=='5' || s[n-1]== '7'  || s[n-1]== '9')cout<<"hon\n";
        else if(s[n-1]=='0' || s[n-1]=='1' || s[n-1]=='6' || s[n-1]=='8')cout<<"pon\n";
        else if(s[n-1]=='3')cout<<"bon\n";
}
int32_t main()
{
     ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
 
 #ifndef ONLINE_JUDGE
      freopen("input.txt",  "r",  stdin);
      freopen("output.txt", "w", stdout);
 #endif
  
     cout << setprecision(9) << fixed;
     clock_t z = clock();
 
     int t=1; 
     // cin >> t;
     while (t--) solve();
     cerr << "Run Time : " << ((double)(clock() - z) / CLOCKS_PER_SEC);
     return 0;
}



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

const int mod=1e9+7;
ll power(ll a,ll b){
    ll res=1;
    while(b){
        if(b&1)res=res*a%mod;
        b>>=1;
        a=a*a%mod;
    }
    return res;
}
ll inv(ll x){

    return power(x,mod-2);
}
vector<ll>g[400020];

vector<ll>v1,v2;
char a[433333];
int main(){
    ll n,i,j,k,x,y,z,t,m;
    string s;
    cin>>s;
    int l=200000,r=l+s.length()-1;
    for(i=0;i<s.length();i++)a[i+l]=s[i];
    int jud=0;
    cin>>n;
    while(n--){
        cin>>x;
        if(x==1)jud=!jud;
        else{
            int f;
            char c;
            scanf("%d %c",&f,&c);
            if(jud){
                if(f==2){
                    a[l-1]=c;
                    l--;
                }
                else{
                    a[r+1]=c;
                    r++;
                }
            }
            else{
                if(f==1){
                    a[l-1]=c;
                    l--;
                }
                else{
                    a[r+1]=c;
                    r++;
                }
            }
            //cout<<l<<" "<<r<<endl;
        }
    }
    if(jud){
        for(i=r;i>=l;i--)cout<<a[i];
    }
    else for(i=l;i<=r;i++)cout<<a[i];

}







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

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)n; ++i)
#define FOR(i, a, b) for(int i = a; i < (int)b; ++i)
#define rrep(i, n) for(int i = ((int)n - 1); i >= 0; --i)

using ll = long long;
using ld = long double;

const ll INF = 1e18;
const int Inf = 1e9;
const double EPS = 1e-9;
const ll MOD = 1e9 + 7;

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(0);
	int n;
	cin >> n;
	FOR (i, 1, 10) {
	  FOR (j, 1, 10) {
		if (i * j == n) {
		  cout << "Yes" << endl;
		  return 0;
		}
	  }
	}
	cout << "No" << endl;
    
    return 0;
}



Measured memory_bytes: 3532
#include <iostream>
#include <stdio.h>
#include <cmath>
using namespace std;

int main()
{
    double x1, y1, x2, y2, dx, dy;

    cin >> x1 >> y1 >> x2 >> y2;

    dx = (x1 - x2) * (x1 - x2);
    dy = (y1 - y2) * (y1 - y2);

    printf("%f\n", sqrt(dx + dy));
}


Measured memory_bytes: 3292
#include <iostream>
#include <queue>
#include <map>
#include <list>
#include <vector>
#include <string>
#include <limits>
#include <cassert>
#include <fstream>
#include <cstring>
#include <bitset>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <cstdio>
#include <ciso646>
#include <array>
#include <cmath>

using namespace std;

#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)

#define inf 0x3f3f3f3f
#define uinf 0x3f3f3f3f3f3f3f3f
#define CLEAR(a) a = decltype(a)()
#define MP make_pair
#define ALL(a) (a).begin(),(a).end()
#define pii pair<int ,int>
#define pcc pair<char,char>
#define pic pair<int,char>
#define pci pair<char,int>
#define VS vector<string>
#define VI vector<int>
#define VVI vector<vector<int>>
#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define pi 2*acos(0.0)
#define INFILE() freopen("in.txt","r",stdin)
#define OUTFILE() freopen("out.txt","w",stdout)
#define ll long long
#define ull unsigned long long
#define eps 1e-14
#define FIN std::ifstream cin("D:\input.txt")
const int MOD = 1e9 + 7;

signed int main(void) {
	int N, L; cin >> N >> L;
	vector<int> A(N); for (auto &a : A) cin >> a;

	int pos = -1;
	REP(i, N - 1) if (A[i] + A[i + 1] >= L) {
		pos = i;
		break;
	}

	if (pos == -1) {
		cout << "Impossible" << endl;
		return 0;
	}

	cout << "Possible" << endl;
	REP(i, pos) {
		cout << i + 1 << endl;
	}
	RFOR(i, pos + 1, N - 1) {
		cout << i+1 << endl;
	}
	cout << pos+1 << endl;

	return 0;
}


Measured memory_bytes: 1280