akhauriyash/Code-Regression huggingface dataset:
#include<iostream>
#include<algorithm>
#include<climits>
#include<vector>
#include<utility>
#include<cmath>
#include<string>
#include<cstring>
#include<map>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define prin(arg) std::cout<<arg<<"\n"
#define prin2(arg1,arg2) std::cout<<arg1<<" "<<arg2<<"\n"
#define fill(arg,n) std::memset(arg,n,sizeof(arg))
using std::cin;
using std::atoi;
typedef long long ll;
typedef std::pair<int,int> pi;
typedef std::vector<int> vi;
const int INF=1e+9;
const ll INFLL=1e+17;
char A,B,C,D;
void solve(){
  int x,y;
  int a=A-'0',b=B-'0',c=C-'0',d=D-'0';
  if(a>=2) x=2;
  else if(a==1&&b>=3) x=2;
  else if(a==0&&b==0) x=2;
  else x=1;
  if(c>=2) y=2;
  else if(c==1&&d>=3) y=2;
  else if(c==0&&d==0) y=2;
  else y=1;
  if(x==0||y==0) prin("NA");
  else if(x==1&&y==1) prin("AMBIGUOUS");
  else if(x==2&&y==2) prin("NA");
  else if(x==1) prin("MMYY");
  else prin("YYMM");
}
int main(){
  cin>>A>>B>>C>>D;
  solve();
  return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<string>
#include<array>

int main(){
  	std::string str;
  	std::cin >> str;
  	if(str.size()==1){
      	std::cout << "0\n";
      	return 0;
    }
  	if(str.size()==2){
      	if(str.at(0) == str.at(1))
      		std::cout << "0\n";
      	else std::cout << "1\n";
      	return 0;
    }
  	std::array<int, 26> mc;
  	mc.fill(0);
  	for(int j=1;j<str.size()-1;j++){
      	char c = str.at(str.size() - 1 - j);
      	mc.at(c-'a')++;
    }
  	int ans=-1;
  	for(int i=0;i<mc.size();i++){
    if(mc.at(i) == 0) continue;
    char M = i+'a';
  	int Ms = 0, tmp=((str.at(0)==M)?0:1);
  	for(int j=1;j<str.size()-1;j++){
      	char c = str.at(j);
      	if(c!=M){
          	tmp++;
        }else{
          	if(Ms < tmp) Ms = tmp;
          	tmp=0;
        }
    }
  	if(tmp!=0 && Ms < (tmp+1)) Ms = tmp+1;
    if(ans == -1) ans = Ms;
    else if(ans > Ms) ans = Ms;
    }
  	std::cout << ans << "\n";
  	return 0;
}

Measured memory_bytes: 3136
#pragma region
#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <list>
#include <iomanip>
#include <cstdint>
#include <bitset>
#include <fstream>

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

#pragma region UnionFind
struct UnionFind
{
	vector<int> par;

	UnionFind(int n) : par(n, -1) {}
	void init(int n) { par.assign(n, -1); }

	int root(int x)
	{
		if (par[x] < 0) return x;
		else return par[x] = root(par[x]);
	}

	bool issame(int x, int y)
	{
		return root(x) == root(y);
	}

	bool merge(int x, int y)
	{
		x = root(x); y = root(y);
		if (x == y) return false;
		if (par[x] > par[y]) swap(x, y);
		par[x] += par[y];
		par[y] = x;
		return true;
	}

	int size(int x)
	{
		return -par[root(x)];
	}
};
#pragma endregion
#pragma region GCD
int gcd(int a, int b)
{
	if (a%b == 0)return b;
	return gcd(b, a%b);
}
#pragma endregion
#pragma region chmin
template<class T> inline bool chmin(T& a, T b)
{
	if (a > b)
	{
		a = b;
		return true;
	}
	return false;
}
#pragma endregion
#pragma region chmax
template<class T> inline bool chmax(T& a, T b)
{
	if (a < b)
	{
		a = b;
		return true;
	}
	return false;
}
#pragma endregion
#pragma endregion


int main()
{
	string s; cin >> s;
	if (s.size() == 2)cout << s << endl;
	else
	{
		reverse(all(s));
		cout << s << endl;
	}
}

Measured memory_bytes: 3480
#include<iostream>
#include<iomanip>
#include<vector>
#include<map>
#include<stack>
#include<queue>
#include<string>
#include<utility>
#include<numeric>
#include<algorithm>
#include<cmath>
#include<climits>
using namespace std;

using ll = long long;

class Stream{
public:
    Stream(){

    }
    //配列以外の入力を受け取る
    void read(){

    }
    template<typename First, typename... Rest>
    void read(First& first, Rest&... rest){
        cin >> first;
        read(rest...);
    }
    //配列を区切って出力する
    template<typename T>
    void write_vec(vector<T>& v, char divider){
        for(size_t i = 0; i < v.size(); i++){
            cout << v[i] << divider;
        }
    }
};

int main(){
    Stream io;
    
    int M;
    io.read(M);
    int ans = 24 - M + 24;
    cout << ans;
    return 0;
}

Measured memory_bytes: 256
#include<stdio.h>
int main(void){
  char s[10];
  scanf("%s",s);
  if(s[0]!=s[1] && s[1]!=s[2] && s[2]!=s[0]){
    printf("Yes\n");
  }else{
    printf("No\n");
  }
  return 0;
}

Measured memory_bytes: 128
import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {

    static class Task {

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            String c = in.next();
            if (Character.isUpperCase(c.charAt(0))) {
                out.println("A");
            } else {
                out.println("a");
            }
        }
    }

    private static void sort(double[] arr) {
        Double[] objArr = Arrays.stream(arr).boxed().toArray(Double[]::new);
        Arrays.sort(objArr);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = objArr[i];
        }
    }

    private static void sort(int[] arr) {
        Integer[] objArr = Arrays.stream(arr).boxed().toArray(Integer[]::new);
        Arrays.sort(objArr);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = objArr[i];
        }
    }

    private static void sort(long[] arr) {
        Long[] objArr = Arrays.stream(arr).boxed().toArray(Long[]::new);
        Arrays.sort(objArr);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = objArr[i];
        }
    }

    private static void solve() {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task task = new Task();
        task.solve(1, in, out);
        out.close();
    }

    public static void main(String[] args) {
        new Thread(null, () -> solve(), "1", 1 << 26).start();
    }

    static class InputReader {

        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

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

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

    }

}

Measured memory_bytes: 33944
//==========================Head files==========================
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
#include<queue>
#include<cmath>
#include<set>
#include<iostream>
#include<map>
#define LL long long
#define db double
#define mp make_pair
#define pr pair<int, int>
#define fir first
#define sec second
#define pb push_back
#define ms(i, j) memset(i, j, sizeof i)
using namespace std;
//==========================Templates==========================
inline int read() {
    int x = 0, f = 1; char c = getchar();
    while(c < '0' || c > '9'){if (c == '-') f = -1; c = getchar();}
    while(c >= '0' && c <= '9'){x = x * 10 + c - '0'; c = getchar();}
    return x * f;
}
inline LL readl() {
    LL x = 0, f = 1; char c = getchar();
    while(c < '0' || c > '9'){if (c == '-') f = -1; c = getchar();}
    while(c >= '0' && c <= '9'){x = x * 10 + c - '0'; c = getchar();}
    return x * f;
}
int power(int a, int b) {
	int ans = 1;
	while (b) {
		if(b & 1) ans = ans * a;
		b >>= 1; a = a * a;
	}
	return ans;
}
int power_mod(int a, int b, int mod) {
	a %= mod;
	int ans = 1;
	while (b) {
		if(b & 1) ans = (ans * a) % mod;
		b >>= 1, a = (a * a) % mod;
	}
	return ans;
}
LL powerl(LL a, LL b) {
	LL ans = 1ll;
	while (b) {
		if(b & 1ll) ans = ans * a;
		b >>= 1ll;a = a * a;
	}
	return ans;
}
LL power_modl(LL a, LL b, LL mod) {
	a %= mod;
	LL ans = 1ll;
	while (b) {
		if(b & 1ll) ans = (ans * a) % mod;
		b >>= 1ll, a = (a * a) % mod;
	}
	return ans;
}
LL gcdl(LL a, LL b) {return b == 0 ? a : gcdl(b, a % b);}
LL abssl(LL a) {return a > 0 ? a : -a;}
int gcd(int a, int b) {return b == 0 ? a : gcd(b, a % b);}
int abss(int a) {return a > 0 ? a : -a;}
//==========================Main body==========================
#define LD "%I64d"
#define D "%d"
#define pt printf
#define sn scanf
#define pty printf("YES\n")
#define ptn printf("NO\n")
//==========================Code here==========================
int n, h[100000 + 5];
int main() {
	cin >> n;
	for (int i = 1; i <= n; ++i) scanf("%d", &h[i]);
	int ans = 0, cnt = 0;
	h[n + 1] = 2000000000;
	for (int i = 1; i <= n + 1; ++i) {
		if (h[i] > h[i - 1]) {
			ans = max(ans, cnt);
			cnt = 0;
		}
		++cnt;
	}
	cout << ans - 1;
	return 0;
}

Measured memory_bytes: 640
import java.util.Scanner;
 
class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		int ACGT = 0;
		int max = 0;
		for(int i = 0; i < str.length(); i++){
			char c = str.charAt(i);
			if(c == 'A' || c == 'C' || c == 'G' || c == 'T'){
				ACGT += 1;
                if(max < ACGT){
					max = ACGT;
                }
			}else{
				if(max < ACGT){
					max = ACGT;
				}
				ACGT = 0;
			}
		}
		System.out.println(max);
	}
}

Measured memory_bytes: 23124
#include <bits/stdc++.h>
#define REP(i,n) for (int i = 0; i <(n); ++i)
#define ALL(v) v.begin(), v.end()
using namespace std;
using ll = long long;
using P = pair<int,int>;
static const double PI = acos(-1);



int main(){
  int n;
  cin >> n;
  vector<int> h(n);
  REP(i,n) cin >> h[i];

  int ans  = 0;
  int MX = 0;
  REP(i,n){
    if(h[i] >= MX) ++ans;
    MX = max(h[i], MX);
  }

  cout << ans << endl;


  return 0;
}

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

typedef pair<int, int> Piont;
main(){
	ios::sync_with_stdio(false);
	int n = 0;
	while(cin>>n){
		ull arr[n];
		for (int i = 0; i < n; ++i){
			cin>>arr[i];
		}
		sort(arr, arr+n);
		if(arr[0]==0){
			cout << "0" << endl;
		}else{
			ll ans = 1;
			for (int i = 0; i < n; ++i){
				if(arr[i] > 1e18l/ans){
					ans = -1;
					break;
				}
				ans *= arr[i];
			}
			cout << ans << endl;
		}
	}
}

Measured memory_bytes: 4424
#include <bits/stdc++.h>
using namespace std;
#define dump(x) cout << (x) << endl
typedef long long ll;
typedef vector<int> V;

int main() {
  string s, t;
  cin >> s >> t;
  int a = 1;
  map<char, int> mps, mpt;
  int sx[200005] = {}, tx[200005] = {};
  for (int i = 0; i < (int)s.size(); i++) {
    bool ex = false;
    for (auto itr = mps.begin(); itr != mps.end(); itr++) {
      if( itr->first == s[i] ) ex = true;
    }
    if( ex ) sx[i] = mps[s[i]];
    else {
      sx[i] = a;
      mps[s[i]] = a;
      a++;
    }
  }
  a = 1;
  for (int i = 0; i < (int)t.size(); i++) {
    bool ex = false;
    for (auto itr = mpt.begin(); itr != mpt.end(); itr++) {
      if( itr->first == t[i] ) ex = true;
    }
    if( ex ) tx[i] = mpt[t[i]];
    else {
      tx[i] = a;
      mpt[t[i]] = a;
      a++;
    }
  }
  bool res = true;
  for (int i = 0; i < (int)s.size(); i++) {
    // cout << sx[i] << " " << tx[i] << endl;
    if( sx[i] != tx[i] ) res = false;
  }
  dump(res ? "Yes" : "No");
  return 0;
}


Measured memory_bytes: 2312
#include<stdio.h>

int main(){
	int n, Rt[199999], i, j,  maxv, minv;
	scanf("%d",&n);
	for (i = 0; i < n; i++) {
		scanf("%d",&Rt[i]);
	}
	minv = Rt[0];
	maxv = Rt[1] - Rt[0];
	for (j = 1; j < n; j++) {
		if ((Rt[j] - minv) > maxv) {
			maxv = Rt[j] - minv;
		}
		if (Rt[j] < minv) {
			minv = Rt[j];
		}
	}
	printf("%d\n", maxv);
	
	return 0;

}


Measured memory_bytes: 2588
#!/usr/bin/env python3
import sys
from operator import itemgetter
# gcd
# from fractions import gcd
# 切り上げ，切り捨て
# from math import ceil, floor
# リストの真のコピー（変更が伝播しない）
# from copy import deepcopy
# 累積和。list(accumulate(A))としてAの累積和
# from itertools import accumulate
# l = ['a', 'b', 'b', 'c', 'b', 'a', 'c', 'c', 'b', 'c', 'b', 'a']
# S = Counter(l)  # カウンタークラスが作られる。S=Counter({'b': 5, 'c': 4, 'a': 3})
# print(S.most_common(2))  # [('b', 5), ('c', 4)]
# print(S.keys())  # dict_keys(['a', 'b', 'c'])
# print(S.values())  # dict_values([3, 5, 4])
# print(S.items())  # dict_items([('a', 3), ('b', 5), ('c', 4)])
# from collections import Counter
# import math
# from functools import reduce
#
# input関係の定義
# fin = open('in_1.txt', 'r')
# sys.stdin = fin
# 提出時はコメントアウト+上のshebangを有効にする
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
# template


def iterate_tokens():
    for line in sys.stdin:
        for word in line.split():
            yield word


if __name__ == '__main__':

    tokens = iterate_tokens()
    P = int(next(tokens))  # type: int
    Q = int(next(tokens))  # type: int
    R = int(next(tokens))  # type: int

    # write code
    print(min(P+Q,Q+R,R+P))


Measured memory_bytes: 3188
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cstdlib>
#include<queue>

using namespace std;

#define rep(i, n) for(int i = 0; i < n; i++)

int main(){
    int n, k;
    cin >> n >> k;
    int num[n];
    rep(i, n) num[i] = 0;

    rep(i, k){
        int d;
        cin >> d;
        rep(i, d){
            int a;
            cin >> a;
            a--;
            if(num[a] == 0) num[a]++;
        }
    }
    int ans = 0;
    rep(i, n){
        if(num[i] == 0){
            ans++;
        }
    }
    cout << ans << endl;
}


Measured memory_bytes: 3620
#include <bits/stdc++.h>
using namespace std;
 
#define oo 1e9
#define fi first
#define se second
#define sp(iiii) setprecision(iiii)
#define IO ios_base::sync_with_stdio(false); cin.tie(0)
#define ms(aaaa,xxxx) memset(aaaa,xxxx,sizeof(aaaa))
#define cntbit(xxxx) __builtin_popcount(xxxx)
#define getbit(xxxx,aaaa) ((xxxx>>(aaaa-1))&1)
#define _cos(xxxx) cos(xxxx*acos(-1)/180)
#define _sin(xxxx) sin(xxxx*acos(-1)/180)
#define _tan(xxxx) tan(xxxx*acos(-1)/180)
#define PE cout<<fixed
 
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<pair<int,int>,int> piii;
typedef pair<long long,long long> pll;
typedef pair<pair<long long,long long>,long long> plll;
 
const ld pi=acos(-1);

int n,m,i,j,res[1000009],ok[2009][2009],sx,sy,dx,dy;
char a[2009][2009];
deque<pii> q;
vector<pii> v[1000009];

void fill(int x,int y,int z) {
    if ((x<=0)||(y<=0)||(x>n)||(y>m)) {
        return;
    }
    if (a[x][y]=='#') {
        return;
    }
    v[z].push_back({x,y});
    ok[x][y]=z;
    if (ok[x-1][y]==0) {
        fill(x-1,y,z);
    }
    if (ok[x+1][y]==0) {
        fill(x+1,y,z);
    }
    if (ok[x][y-1]==0) {
        fill(x,y-1,z);
    }
    if (ok[x][y+1]==0) {
        fill(x,y+1,z);
    }
}

void BFS() {
    fill(sx,sy,1);
    q.push_back({1,0});
    int sl=1;
    while (!q.empty()) {
        int x=q.front().fi;
        int y=q.front().se;
        q.pop_front();
        res[x]=y;
        for (int ii=0;ii<v[x].size();ii++) {
            //cout<<x<<' '<<v[x][ii].fi<<' '<<v[x][ii].se<<' '<<ii<<'\n';
            for (int ij=v[x][ii].fi-2;ij<=v[x][ii].fi+2;ij++) {
                for (int jj=v[x][ii].se-2;jj<=v[x][ii].se+2;jj++) {
                    if ((ij>0)&&(jj>0)&&(ij<=n)&&(jj<=m)&&(a[ij][jj]!='#')&&(ok[ij][jj]==0)) {
                        sl++;
                        fill(ij,jj,sl);
                        q.push_back({sl,y+1});
                    }
                }
            } 
        }
    }
}

int main() {
    IO;
    cin>>n>>m;
    cin>>sx>>sy;
    cin>>dx>>dy;
    for (i=1;i<=n;i++) {
        for (j=1;j<=m;j++) {
            cin>>a[i][j];
        }
    }
    res[0]=-1;
    BFS();
    //for (i=1;i<=n;i++) {
    //    for (j=1;j<=m;j++) {
    //        cout<<ok[i][j];
    //    }
    //    cout<<'\n';
    //}
    cout<<res[ok[dx][dy]]<<'\n';
}
    

Measured memory_bytes: 43620
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
#include <vector>
#include <numeric>
#include <map>
#include <cmath>
#include <iomanip>
#include <queue>
using ll =long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vs = vector<string>;

int main(){
    int A, B, C, D;
    cin >> A >> B >> C >> D;

    int hp_t = A;
    int hp_a = C;

    int takahashi;

    while(1){
        hp_a = hp_a-B;
        if(hp_a<=0){
            takahashi = 0;
            break;
        }
        hp_t = hp_t-D;
        if(hp_t<=0){
            takahashi = 1;
            break;
        }
    }

    if(takahashi==1){
        cout << "No" << endl;
    }
    else{
        cout << "Yes" << endl;
    }



}

Measured memory_bytes: 3132
void main()
{
    long n = rdElem;
    long[] a = rdRow;
    long[] b = rdRow;

    auto ex = BinaryHeap!(Array!long, "a < b")();
    long total;
    long cnt;
    foreach (x, y; zip(a, b))
    {
        if (x > y) ex.insert(x-y);
        if (x < y)
        {
            total += y - x;
            ++cnt;
        }
    }

    while (!ex.empty && total > 0)
    {
        total -= ex.front;
        ex.popFront;
        ++cnt;
    }

    if (total > 0) cnt = -1;
    cnt.writeln;
}

enum long mod = 10^^9 + 7;
enum long inf = 1L << 60;

T rdElem(T = long)()
if (!is(T == struct))
{
    return readln.chomp.to!T;
}

alias rdStr = rdElem!string;
alias rdDchar = rdElem!(dchar[]);

T rdElem(T)()
if (is(T == struct))
{
    T result;
    string[] input = rdRow!string;
    assert(T.tupleof.length == input.length);
    foreach (i, ref x; result.tupleof)
    {
        x = input[i].to!(typeof(x));
    }
    return result;
}

T[] rdRow(T = long)()
{
    return readln.split.to!(T[]);
}

T[] rdCol(T = long)(long col)
{
    return iota(col).map!(x => rdElem!T).array;
}

T[][] rdMat(T = long)(long col)
{
    return iota(col).map!(x => rdRow!T).array;
}

void wrMat(T = long)(T[][] mat)
{
    foreach (row; mat)
    {
        foreach (j, compo; row)
        {
            compo.write;
            if (j == row.length - 1) writeln;
            else " ".write;
        }
    }
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.traits;
import std.container;
import std.functional;
import std.typecons;
import std.ascii;
import std.uni;

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

int main(){
	int m,n;
	int sum=0;
	cin>>m>>n;
	vector<int>a(n);
	rep(i,n){
		cin>>a[i];
		sum+=a[i];
	}
	int ans;
	ans=m-sum;
	if(ans<0)
		cout<<-1<<endl;
	else
		cout<<ans<<endl;

}

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

int grid[100+1][100+1];
int main(){
    int H,W;
    cin >> H >> W;
    for(int h=0;h<H;h++){
        for(int w=0;w<W;w++){
            char a;
            cin >> a;
            if(a=='.'){
                grid[h][w]=0;
            }else{
                grid[h][w]=1;
                grid[h][100]+=1;
                grid[100][w]+=1;
            }
        }
    }

    for(int h=0;h<H;h++){
        int printline=0;
        for(int w=0;w<W;w++){
            if(grid[100][w]>0 && grid[h][100]>0){
                char a='.';
                if(grid[h][w]==1){
                    a='#';
                }
                printline++;
                cout << a;
            }
        }
        if(printline){
            cout << "\n";
        }
    }
    return 0;
}

Measured memory_bytes: 256
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <climits>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
//typedef pair<ll, ll> P;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define revrep(i, n) for(ll i = (n)-1; i >= 0; i--)
#define pb push_back
#define f first
#define s second
#define chmin(x, y) x = min(x, y);
#define chmax(x, y) x = max(x, y);

//const ll INFL = LLONG_MAX;//10^18 = 2^60
const ll INFL = 1LL<<60;
//const int INF = INT_MAX;
const ll INF = 1 << 30;//10^9
ll MOD = 1000000007;
//ll MOD = 998244353;

vector<ll> dy = {0, 1, 0, -1, 1, 1, -1, -1, 0};
vector<ll> dx = {1, 0, -1, 0, 1, -1, 1, -1, 0};

void pres(double A, ll x = 20){cout << fixed << setprecision(x) << A << endl;}
void BinarySay(ll x, ll y = 60){rep(i, y) cout << (x>>(y-1-i) & 1); cout << endl;}
ll cnt_bit(ll x){return __builtin_popcountll(x);}

ll pow_long(ll x, ll k){
  ll res = 1;
  while(k > 0){
    if(k % 2) res *= x;
    x *= x; k /= 2;
  }
  return res;
}

ll pow_mod(ll x, ll k){
  ll res = 1;
  while(k > 0){
    if(k % 2){
      res *= x; res %= MOD;
    }
    x *= x; x %= MOD;
    k /= 2;
  }
  return res;
}

ll inverse(ll x){return pow_mod(x, MOD - 2);};

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

ll lcm(ll x, ll y){
  ll res = x / gcd(x, y);
  res *= y;
  return res;
};

//コンビネーション
const int MAXcomb = 200010;
ll fac[MAXcomb], finv[MAXcomb], inv[MAXcomb];
//facはn!,finvは1/n!
//invは逆元
void COMinit(){
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for(int i = 2; i < MAXcomb; i++){
        fac[i] = fac[i-1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD/i) % MOD;
        finv[i] = finv[i-1] * inv[i] % MOD;
    }
}
ll comb(int n, int k){
    if(n < k) return 0;
    if(n < 0 || k < 0) return 0;
    return fac[n] * finv[k] % MOD * finv[n-k] % MOD;
}

const int MAXkai = 200010;
ll kai_memo[MAXkai];
ll kai(ll N){
  if(kai_memo[N] != 0) return kai_memo[N];
  if(N <= 1) return 1;
  return kai_memo[N] = N * kai(N-1) % MOD;
}

void solve(){
  ll H, A;
  cin >> H >> A;
  cout << (H + A - 1) / A << endl;
}

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


Measured memory_bytes: 256
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
from collections import deque

n, m = map(int, input().split())
AB = [[int(x) for x in input().split()] for _ in range(m)]

# representation matrix
repn = [[] for j in range(n)]
for a, b in AB:
    a -= 1
    b -= 1
    repn[a].append(b)
    repn[b].append(a)


# Minimum Spanning Tree
tree = [set() for i in range(n)]
visited = [False] * n
visited[0] = True
q = deque([0])

while q:
    u = q.popleft()
    for v in repn[u]:
        if visited[v]:
            continue
        visited[v] = True
        tree[u].add(v)
        tree[v].add(u)
        q.append(v)


# define directions of the edges other than that of MST
degree = [0] * n
ans = []

for a, b in AB:
    a -= 1
    b -= 1
    if b in tree[a]:
        continue
    ans.append('{} {}'.format(a+1, b+1))
    degree[a] += 1


# defining orientations
def dfs(u = 0, parent = None):
    for v in tree[u]:
        if v == parent:
            continue
        dfs(v, u)
        if degree[v] % 2 == 0:
            ans.append('{} {}'.format(u+1, v+1))
            degree[u] += 1
        else:
            ans.append('{} {}'.format(v+1, u+1))
            degree[v] += 1

dfs()

if degree[0] % 2 == 1:
    print(-1)
else:
    print('\n'.join(ans))


Measured memory_bytes: 162460
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		String s = new Scanner(System.in).next();
		char[] c = s.toCharArray();

		for(int i = 0; i < c.length; i++) {
			if(i % 2 == 0) System.out.print(c[i]);
		}
	}
}


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

void solve(std::istream &in, std::ostream &out);

int main() {
#ifdef LOCAL
  freopen("../IO/f.in", "r", stdin);
//  freopen("../IO/f.out", "w", stdout);
#else
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  std::cout.tie(nullptr);
#endif
  solve(std::cin, std::cout);
  return 0;
}

struct point_t {
  int x, y;
  point_t() = default;
  point_t(int x, int y) : x(x), y(y) {}
  int quad() const {
    return y > 0 || (y >= 0 && x >= 0);
  }
  int64_t abs2() const {
    return (int64_t) x * x + (int64_t) y * y;
  }
  int64_t dot(point_t rhs) const {
    return (int64_t) x * rhs.x + (int64_t) y * rhs.y;
  }
  int64_t det(point_t rhs) const {
    return (int64_t) x * rhs.y - (int64_t) y * rhs.x;
  }
};

struct PolarAngleComparator {
  bool operator()(point_t a, point_t b) const {
    int c1 = a.quad(), c2 = b.quad();
    if (c1 != c2) {
      return c1 > c2;
    }
    auto orientation = a.det(b);
    if (orientation == 0) {
      return a.abs2() < b.abs2();
    } else {
      return orientation > 0;
    }
  }
};

void solve(std::istream &in, std::ostream &out) {
  int n;
  in >> n;
  vector<point_t> points(n);
  for (point_t &point : points) {
    in >> point.x >> point.y;
  }
  sort(points.begin(), points.end(), PolarAngleComparator());
  for (int i = 0; i < n; ++i) {
    points.push_back(points[i]);
  }
  int64_t result = 0;
  int64_t sx = 0, sy = 0;
  for (int r = 0, l = 0; l < n; ++l) {
    if (points[l%n].x==0&&points[l%n].y==0)continue;
    while (r - l < n && (points[l % n].det(points[r % n]) > 0 ||
                         (points[l % n].det(points[r % n]) == 0 && points[l % n].dot(points[r % n]) >= 0))) {
      sx += points[r % n].x;
      sy += points[r % n].y;
      ++r;
      result = max(result, sx * sx + sy * sy);
    }
    sx -= points[l % n].x;
    sy -= points[l % n].y;
    result = max(result, sx * sx + sy * sy);
  }
  out << fixed << setprecision(12) << sqrt(result) << '\n';
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = (ll)1e9;

int main(){
	int n;
	cin >> n;
	auto d = vector<ll>(n,0);
	auto s = vector<ll>(n,0);
	for(int i=0;i<n;i++){
		cin >> d[i];
      	if(d[0]!=0){
        	cout << 0 << endl;
          	return 0;
        }
      	s[d[i]]++;
	}
  	if(s[0]!=1){
		cout << 0 << endl;
		return 0;
	}
	ll sum =1;
	for(int i=2;i<n;i++){
      	for(int j=0;j<s[i];j++){
        	sum = sum*s[i-1]%998244353;	
        }
		
	}
	cout << sum << endl;
	return 0;
}

Measured memory_bytes: 1792
#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
using namespace std;
int main() {
	int a, b, c, d, e, f = 0, g = 0;
	cin >> a >> b >> c;
	int test[21] = { 0 };
	int uiop[21][21] = { 0 };
	for (int h = 1; h <= b; h++) {
		cin >> d;
		test[h] = d;
	}
	for (int i = 1; i <= a; i++) {
		for (int j = 1; j <= b; j++) {
			cin >> e;
			uiop[i][j] = e;
		}
		for (int k = 1; k <= b; k++) {
			f += test[k] * uiop[i][k];
		}
		f = f + c;
		if (f > 0) {
			g++;
		}
		f = 0;
	}
	cout << g << endl;
	cin >> e;
}

Measured memory_bytes: 256
#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include <random>
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include<fstream>
#include <unordered_map>
#include <cstdlib>
#include <complex>
#include <cctype>
using namespace std;
typedef string::const_iterator State;
#define Ma_PI 3.141592653589793
#define eps 0.00000001
#define LONG_INF 1e18
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007
#define MOD 998244353
#define REP(i,n) for(long long i = 0;i < n;++i)    
#define seg_size 524288
int term(State& begin);
int expression(State& begin) {
	int now_value = 0;
	if (*begin == '(') {
		begin++;
		int d1 = expression(begin);
		int d2;
		if (*begin == '+') {
			begin++;
			d2 = expression(begin);
			now_value = max(d1, d2);
		}
		else if(*begin == '*'){
			begin++;
			d2 = expression(begin);
			now_value = min(d1, d2);
		}
		begin++;
	}
	else {
		now_value = term(begin);
	}
	return now_value;
}
int term(State& begin) {
	int now_value = 0;
	if (*begin == '-') {
		begin++;
		now_value = 2 - expression(begin);
	}
	else if (*begin >= '0' && *begin <= '9') {
		now_value = *begin - '0';
		begin++;
	}
	return now_value;
}
int main() {
	while (true) {
		string s;
		cin >> s;
		if (s == ".") return 0;
		int ans = 0;
		REP(i, 3) {
			REP(q, 3) {
				REP(j, 3) {
					string a;
					REP(t, s.length()) {
						if (s[t] == 'P') {
							a.push_back(i+'0');
						}
						else if (s[t] == 'Q') {
							a.push_back(q + '0');
						}
						else if (s[t] == 'R') {
							a.push_back(j + '0');
						}
						else {
							a.push_back(s[t]);
						}
					}
					auto d = a.cbegin();
					if (expression(d) == 2) {
						ans++;
					}
				}
			}
		}
		cout << ans << endl;
	}
}


Measured memory_bytes: 3164
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

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

	int INF = 1 << 30;

	void solver() {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();// the number of cities
		int M = sc.nextInt();// the number of goods
		int W = sc.nextInt();
		int T = sc.nextInt();
		String[] s = new String[M];
		int[] v = new int[M];
		int[] p = new int[M];
		Map<String, Integer> ref = new HashMap<>();

		for (int i = 0; i < M; i++) {
			s[i] = sc.next();// name
			ref.put(s[i], i);
			v[i] = sc.nextInt();// weight
			p[i] = sc.nextInt();// price at (0,0)
		}
		int[] x = new int[N + 1];
		int[] y = new int[N + 1];
		int[][] item = new int[N][M];
		for (int i = 0; i < N; i++) {
			Arrays.fill(item[i], INF);
			int L = sc.nextInt();
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
			while (L-- != 0) {
				int id = ref.get(sc.next());
				item[i][id] = sc.nextInt();// price
			}
		}
		int[][] adj = new int[N + 1][N + 1];
		for (int i = 0; i <= N; i++) {
			for (int j = i; j <= N; j++) {
				adj[i][j] = adj[j][i] = Math.abs(x[i] - x[j]) + Math.abs(y[i] - y[j]);
			}
		}
		int[][] dist = new int[(1 << N)][N];
		for (int S = 1; S < (1 << N); S++) {
			for (int last = 0; last < N; last++) {
				if (((S >> last) & 1) == 1) {
					int ns = S - (1 << last);
					if (ns == 0) {
						dist[S][last] = adj[last][N];
					} else {
						int min = INF;
						for (int j = 0; j < N; j++) {
							if (((ns >> j) & 1) == 1) {
								min = Math.min(min, dist[ns][j] + adj[j][last]);
							}
						}
						dist[S][last] = min;
					}
				}
			}
		}
		int[] bestTime = new int[1 << N];
		for (int S = 1; S < 1 << N; S++) {
			int min = INF;
			for (int i = 0; i < N; i++) {
				if (((S >> i) & 1) == 1)
					min = Math.min(min, dist[S][i] + adj[i][N]);
			}
			bestTime[S] = min;
		}
		int[] bestShell = new int[1 << N];
		int[] c = new int[M];
		int[] ws = new int[W + 1];
		for (int V = 1; V < 1 << N; V++) {
			Arrays.fill(ws, 0);
			Arrays.fill(c, INF);
			for (int i = 0; i < N; i++) {
				if (((V >> i) & 1) == 1) {
					for (int j = 0; j < M; j++) {
						c[j] = Math.min(c[j], item[i][j]);
					}
				}
			}
			for (int i = 0; i < M; i++) {
				c[i] = Math.max(0, p[i] - c[i]);
			}
			for (int i = 1; i <= W; i++) {
				for (int j = 0; j < M; j++) {
					if (v[j] <= i) {
						ws[i] = Math.max(ws[i], ws[i - v[j]] + c[j]);
						bestShell[V] = Math.max(bestShell[V], ws[i]);
					}
				}
				// bestShell[V] = ws[V];
			}
		}
		long ans = 0;
		long[] dp = new long[T + 1];
		for (int t = 1; t <= T; t++) {
			for (int V = 1; V < 1 << N; V++) {
				if (bestTime[V] <= t) {
					dp[t] = Math.max(dp[t], dp[t - bestTime[V]] + bestShell[V]);
				}
			}
			ans = Math.max(ans, dp[t]);
		}
		System.out.println(dp[T]);
	}
}

Measured memory_bytes: 31956
#include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<cstdio>
#include<cstring>
#include<iomanip>
#include<string>
#include<set>
#include<map>
#include<vector>
#include<queue>
#include<stack>
#include<utility>
#define PI acos(-1.0)
using namespace std;
const int N = 1e5+5;
int a[N];
struct node{
	int b;
	int c;
}b[N];
bool cmp(node x,node y){
	return x.c > y.c;
}
int main(){
	int n,m;
	cin >> n >> m;
	for(int i = 0;i < n;i++) scanf("%d",&a[i]);
	sort(a,a+n);
	for(int i = 0;i < m;i++){
		scanf("%d %d",&b[i].b,&b[i].c);
	}
	sort(b,b+m,cmp);
	int t = 0;
	for(int i = 0;i < m;i++){
		if(b[i].c <= a[t]){
			break;
		}
		while(b[i].b){
			if(b[i].c > a[t]){
				a[t] = b[i].c;
				t++;
			}
			b[i].b--;
		}
	}
	long long sum = 0;
	for(int i = 0;i < n;i++){
		sum += a[i];
	}
	cout << sum << endl;
	return 0;
}

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

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

    int num;
    int n;
    cin >> n;
    vector<int> dp(3,0);
    while(n--){
        vector<int> newdp(3,0);
        vector<int> happy(3);
        for(int i=0; i<3; ++i){
            cin >> num;
            happy[i] = num;
        }

        for(int i=0; i<3; ++i) {
            for(int j=0; j<3; ++j) {
                if(i!=j)
                    newdp[j] = max(newdp[j], dp[i] + happy[j]);
            }
        }
        dp = newdp;    
    } 

    cout << max(dp[0],max(dp[1],dp[2])) << endl;

    return 0;
}

Measured memory_bytes: 3624
#include <stdio.h>
#include<vector>
#include<iostream>
#include<string>
#include<deque>
#include<queue>
#include<stack>
#include<list>
#include<cmath>
#include<algorithm>
#define LONG long long int
using namespace std;


int main() {
	int a, b, t;
	cin >> a >> b >> t;

	cout << (t / a)*b << endl;
	return 0;
}

Measured memory_bytes: 256
#include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<cmath>
#include<tuple>
#include<string>
#include<chrono>
#include<functional>
#include<iterator>
#include<random>
#include<unordered_set>
#include<array>
#include<map>
#include<iomanip>
#include<assert.h>
#include<list>
#include<bitset>
#include<stack>
#include<memory>
#include<numeric>
using namespace std;
using namespace std::chrono;
typedef long long int llint;
typedef long double lldo;
#define mp make_pair
#define mt make_tuple
#define pub push_back
#define puf push_front
#define pob pop_back
#define pof pop_front
#define fir first
#define sec second
#define res resize
#define ins insert
#define era erase
/*cout<<fixed<<setprecision(20);cin.tie(0);ios::sync_with_stdio(false);*/
const int mod=998244353 ;
const llint big=2.19e15+1;
const long double pai=3.141592653589793238462643383279502884197;
const long double eps=1e-10;
template <class T,class U>bool mineq(T& a,U b){if(a>b){a=b;return true;}return false;}
template <class T,class U>bool maxeq(T& a,U b){if(a<b){a=b;return true;}return false;}
llint gcd(llint a,llint b){if(a%b==0){return b;}else return gcd(b,a%b);}
llint lcm(llint a,llint b){if(a==0){return b;}return a/gcd(a,b)*b;}
template<class T> void SO(T& ve){sort(ve.begin(),ve.end());}
template<class T> void REV(T& ve){reverse(ve.begin(),ve.end());}
template<class T>llint LBI(const vector<T>&ar,T in){return lower_bound(ar.begin(),ar.end(),in)-ar.begin();}
template<class T>llint UBI(const vector<T>&ar,T in){return upper_bound(ar.begin(),ar.end(),in)-ar.begin();}
int main(void){
	int n,i,j;cin>>n;
	vector<llint>A(n),B(n);
	for(i=0;i<n;i++){cin>>A[i];}
	for(i=0;i<n;i++){cin>>B[i];}
	auto sA=A,sB=B;
	SO(sA);SO(sB);
	bool can=false;
	for(i=0;i<n;i++){
		if(sA[i]>sB[i]){cout<<"No"<<endl;return 0;}
		if(i>0&&sA[i]<=sB[i-1]){can=true;}
	}
	if(can){cout<<"Yes"<<endl;return 0;}
	vector<int>go(n);
	for(i=0;i<n;i++){go[LBI(sA,A[i])]=LBI(sB,B[i]);}
	
	int ans=0;
	for(i=0;i<n;i++){
		int ter=i;
		while(go[ter]!=ter){
			//for(j=0;j<n;j++){cerr<<go[j];}cerr<<endl;
			swap(go[ter],go[go[ter]]);ans++;
		}
	}
	cout<<(ans<=n-2?"Yes":"No")<<endl;
	return 0;
}


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

using ll = long long;
using vi = vector<int>;
using vi2 = vector<vector<int>>;
#define MP(a,b) make_pair((a),(b))
#define MT(...) make_tuple(__VA_ARGS__)

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

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

#define DCOUT(x,n) cout << fixed << setprecision(n) << (x) << endl;

#define sz(x) (int)(x).size()
#define HOGE cout << "hoge" << endl;
using P = pair<ll,ll>;

template<typename T>inline istream& operator>>(istream&i,vector<T>&v)
{REP(j,sz(v))i>>v[j];return i;}

int main(){
    int N;
    cin >> N;
    vi X(N);
    vi Y(N);
    REP(i,N) {
      	cin >> X[i];
      	Y[i] = X[i];
    }

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

    int a = X[N/2-1];
    int b = X[N/2];

    REP(i,N){
        if(Y[i]<=a){
          	cout << b << endl;
        }
        else {
          	cout << a << endl;
        }
    }
}


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

using namespace std;

int main()
{
  string cards;
  while(getline(cin, cards), cards != "0"){
    stringstream ss(cards);
    int ans = 0, x;
    bool one = false;
    while(ss >> x){
      ans += min(x, 10);
      if(x == 1) one = true;
    }
    if(ans > 21) cout << 0 << endl;
    else cout << (one ? ((ans + 10 <= 21) ? ans + 10 : ans) : ans) << endl;
  }
  return 0;
}

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

#define rep(i, n) for(int (i)=0; (i)<(n); (i)++)
#define FILL0(x) memset(x,0,sizeof(x))

using namespace std;

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

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
 

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(20);

    ll a,b;
    ll v,w, t;
    cin >> a >> v >> b >> w >> t;

    if(w>=v)
    {
        cout << "NO" << endl;
        return 0;
    }

    if(abs(a-b)-abs(v-w)*t<=0)
    {
        cout << "YES" << endl;
    }
    else
    {
        cout << "NO" << endl;
    }
    



    return 0;
}



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

typedef long long   signed int LL;
typedef long long unsigned int LU;

#define incID(i, l, r) for(int i = (l)    ; i <  (r); i++)
#define incII(i, l, r) for(int i = (l)    ; i <= (r); i++)
#define decID(i, l, r) for(int i = (r) - 1; i >= (l); i--)
#define decII(i, l, r) for(int i = (r)    ; i >= (l); i--)
#define  inc(i, n) incID(i, 0, n)
#define inc1(i, n) incII(i, 1, n)
#define  dec(i, n) decID(i, 0, n)
#define dec1(i, n) decII(i, 1, n)

#define inII(v, l, r) ((l) <= (v) && (v) <= (r))
#define inID(v, l, r) ((l) <= (v) && (v) <  (r))

#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define UB upper_bound
#define LB lower_bound
#define PQ priority_queue

#define  ALL(v)  v.begin(),  v.end()
#define RALL(v) v.rbegin(), v.rend()
#define  FOR(it, v) for(auto it =  v.begin(); it !=  v.end(); ++it)
#define RFOR(it, v) for(auto it = v.rbegin(); it != v.rend(); ++it)

template<typename T> bool   setmin(T & a, T b) { if(b <  a) { a = b; return true; } else { return false; } }
template<typename T> bool   setmax(T & a, T b) { if(b >  a) { a = b; return true; } else { return false; } }
template<typename T> bool setmineq(T & a, T b) { if(b <= a) { a = b; return true; } else { return false; } }
template<typename T> bool setmaxeq(T & a, T b) { if(b >= a) { a = b; return true; } else { return false; } }
template<typename T> T gcd(T a, T b) { return (b == 0 ? a : gcd(b, a % b)); }
template<typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }

// ---- ----

int a[3];
int b[3] = { 5, 5, 7 };

int main() {
	inc(i, 3) { cin >> a[i]; }
	
	sort(a, a + 3);
	
	bool flag = true;
	inc(i, 3) { if(a[i] != b[i]) { flag = false; } }
	
	cout << (flag ? "YES" : "NO") << endl;
	
	return 0;
}


Measured memory_bytes: 256
/* Great things never come from comfort zones,
"whatever the mind of a man can conceive and believe,it can achieve." */
 
#include <bits/stdc++.h>
#define ll long long
#define scf(n) scanf("%d",&n)
#define lscf(n) scanf("%lld",&n)
#define lpri(n) printf("%lld ",n)
#define pri(n) printf("%d ",(int)n)
#define prin(n) printf("%d\n",(int)n)
#define lprin(n) printf("%lld\n",n)
#define rep(i,ini,n) for(int i=ini;i<(int)n;i++)
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x)     x.begin(),x.end()
#define tc   int tt; scf(tt); while(tt--)
#define inf INT_MAX
#define ninf INT_MIN
#define gcd __gcd
#define bitcount(n) __builtin_popcount(n)
typedef double dd;
using namespace std;
const ll mod =1e9+7;
const int N = 2e5+7;
 
  
int main()
{
    int a,b;
    scf(a),scf(b);
    
    prin(a*b);
 
}

Measured memory_bytes: 3764
#include <iostream>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <cmath>
using namespace std;

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

    int ans = -1;
    for (int i = 1; i < 10000; ++i) {
        int t8 = i * 0.08;
        int t10 = i * 0.1;
        if (t8 == A && t10 == B) {
            ans = i;
            break;
        }
    }

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


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

#define int long long
#define rep(i,a,n) for(int i = a; i < n; i++)
#define pb push_back
#define eb emplace_back
#define dump(x) cout << #x << " = " << (x) << endl
#define chk() cout << "now" << endl;
#define SORT(c) sort((c).begin(), (c).end())
#define SORTG(c) sort((c).begin(), (c).end(), greater<int>());
#define fi first
#define se second
  
typedef pair<int,int> P;
typedef vector<int> vi;

int vector_finder(vi vec, int number) {
      auto itr = find(vec.begin(), vec.end(), number);
        size_t index = distance( vec.begin(), itr );
          if (index != vec.size()) { // 発見できたとき
                  return 1;
                    }
            else { // 発見できなかったとき
                    return 0;
                      }
}

int N,M;
vi p,k;

signed main() {
    cin>>N>>M;
    vector<vector<int>> s(M,vector<int>(0));
    rep(i,0,M) {
        int K;
        cin>>K;
        k.pb(K);
        rep(j,0,K) {
            int S; cin>>S; s[i].pb(S);
        }
    }
    rep(i,0,M) {
        int P; cin>>P; p.pb(P);
    }

    int ans=0;
    rep(bit,0,1<<N) { // determine ON lights lists
        vi Q;
        rep(i,0,N) {
            if(bit&(1<<i)) {
                Q.pb(i);
            }
        }

        bool flag=true;
        rep(i,0,M) {
            int ctn=0;
            rep(j,0,k[i]) {
                if(vector_finder(Q,s[i][j]-1)==1) ctn++;
            }
            if(ctn%2!=p[i]) {
                flag=false;
                break;
            }
        }
        if(flag==true) ans++;
    }

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











Measured memory_bytes: 256
n = int(input())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]

res = 0
for i in range(n):
    res += min(a[i]+a[i+1], b[i])
    if a[i] < b[i]:
        a[i+1] -= min(a[i+1], b[i] - a[i])

print(res)

Measured memory_bytes: 18624
class BinaryIndexedTree
  def initialize(n, array = nil)
    @n = n
    @bit = Array.new(@n + 1, 0)
    if array.nil?
      @array = Array.new(@n, 0)
    else
      @array = array.dup
    end
    @n.times { |i| add(i, @array[i]) }
  end

  def sum(i)
    s = 0
    i += 1
    while i > 0
      s += @bit[i]
      i -= (i & -i)
    end
    s
  end

  # sum of [left, right]
  #   0-indexed
  def range(left, right)
    left > right ? 0 : (sum(right) - sum(left - 1))
  end

  # add x at bit[i] (i is 0-indexed)
  def add(i, x)
    i += 1
    while i <= @n
      @bit[i] += x
      i += (i & -i)
    end
  end
end



n, q = gets.split.map(&:to_i)
ans = []
bit = BinaryIndexedTree.new(n)
q.times do
  com, x, y = gets.split.map(&:to_i)
  x -= 1
  if com == 0
    bit.add(x, y)
  else
    y -= 1
    ans << bit.range(x, y)
  end
end

puts ans


Measured memory_bytes: 8964
import collections
n = int(input())
a = sorted(collections.Counter(list(map(int, input().split()))).most_common())
if len(a) == 3:
    if a[0][0] ^ a[1][0] ^ a[2][0] == 0 and a[0][1] == a[1][1] == a[2][1]:
        print("Yes")
    else:
        print("No")
elif len(a) == 2:
    if a[0][1] * 2 == a[1][1] and a[0][0] == 0:
        print("Yes")
    else:
        print("No")
elif len(a) == 1:
    if a[0][0] == 0:
        print("Yes")
    else:
        print("No")
else:
    print("No")


Measured memory_bytes: 15392
import sys
from bisect import bisect_left, bisect_right, insort

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
S = list('-' + sr())
d = [[] for _ in range(26)]
for i in range(1, N+1):
    s = S[i]
    o = ord(s) - ord('a')
    d[o].append(i)

Q = ir()
for _ in range(Q):
    q, a, b = sr().split()
    if q == '1':
        a = int(a)
        if S[a] == b:
            continue
        prev = ord(S[a]) - ord('a')
        d[prev].pop(bisect_left(d[prev], a))
        next = ord(b) - ord('a')
        insort(d[next], a)
        S[a] = b
    else:
        a = int(a); b = int(b)
        ans = 0
        for alpha in range(26):
            if bisect_right(d[alpha], b) - bisect_left(d[alpha], a) >= 1:
                ans += 1
        print(ans)


Measured memory_bytes: 30088
n = gets.strip.to_i
v = gets.strip.split.map(&:to_i)
c = gets.strip.split.map(&:to_i)

val = []
(0..n-1).each do |i|
  val[i] = v[i] - c[i]
end

max = 0

(1..n).each do |i|
  val.combination(i) do |a|
    value = 0
    (0..a.length-1).each do |j|
      value += a[j]
    end
    max = value if max < value
  end
end

puts max

Measured memory_bytes: 2172
#include <bits/stdc++.h>
#define ll long long int
#define N 100
#define f(i, a, b) for (ll i = (ll)a; i <= (ll)b; i++)
#define rf(i, a, b) for (ll i = (ll)a; i >= (ll)b; i--)
#define po pop_back
#define pb push_back
#define lb lower_bound
#define fi first
#define se second
#define debug(x) cout << #x << " = " << x << endl
#define ub upper_bound
#define ibs ios_base::sync_with_stdio(false)
#define cti cin.tie(0)
#define all(x) x.begin(), x.end()
#define PI 3.141592653
#define cot cout.tie(0)
#define endl "\n"
using namespace std;
/**
  * @author :: Sawlani
  *
  */

int main()
{
    ll a,b,c,d;
    cin >> a >> b >> c >> d;

    ll ans=max({a*c,a*d,b*c,b*d});

    cout << ans ;
}

Measured memory_bytes: 3632
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#ifdef ENABLE_DEBUG
#define dump(a) cerr<<#a<<"="<<a<<endl
#define dumparr(a,n) cerr<<#a<<"["<<n<<"]="<<a[n]<<endl
#else
#define dump(a) 
#define dumparr(a,n) 
#endif
#define FOR(i, a, b) for(ll i = (ll)a;i < (ll)b;i++)
#define For(i, a) FOR(i, 0, a)
#define REV(i, a, b) for(ll i = (ll)b-1LL;i >= (ll)a;i--)
#define Rev(i, a) REV(i, 0, a)
#define REP(a) For(i, a)
#define SIGN(a) (a==0?0:(a>0?1:-1))

typedef long long int ll;
typedef unsigned long long ull;
typedef unsigned int uint;
typedef pair<ll, ll> pll;
typedef pair<ll,pll> ppll;
typedef vector<ll> vll;
typedef long double ld;
typedef pair<ld,ld> pdd;

const ll INF=(1LL<<50);
#if __cplusplus<201700L
ll gcd(ll a, ll b) {
  if(a < b) return gcd(b, a);
  ll r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
}
#endif
template<class T>
bool chmax(T& a,const T& b){
  if(a<b){
    a=b;
    return true;
  }
  return false;
}
template<class T>
bool chmin(T& a,const T& b){
  if(a>b){
    a=b;
    return true;
  }
  return false;
}
template<class S,class T>
std::ostream& operator<<(std::ostream& os,pair<S,T> a){
  os << "(" << a.first << "," << a.second << ")";
  return os;
}
template<class T>
std::ostream& operator<<(std::ostream& os,vector<T> a){
  os << "[ ";
  REP(a.size()){
    os<< a[i] << " ";
  }
  os<< " ]";
  return os;
}


void solve(long long N){
  ll sum=0;
  REP(N){
    ll x=i+1;
    if(x%3!=0&&x%5!=0){
      sum+=x;
    }
  }
  cout<<sum<<endl;
}

int main(){
  cout<<setprecision(1000);
    long long N;
    scanf("%lld",&N);
    solve(N);
    return 0;
}

Measured memory_bytes: 3764