akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
typedef int LL;
typedef double dl;
#define opt operator
#define pb push_back
const LL maxn=1e6+9,mod=998244353;
LL Read(){
	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<<3ll)+(x<<1ll)+c-'0'; c=getchar();
	}return x*f;
}
int main(){
    LL n(Read());
    printf("%d\n",n+n*n+n*n*n);
	return 0;
}


Measured memory_bytes: 3644
#include <stdio.h>
int main()
{
	int a,b,c;
	scanf("%d %d %d", &a, &b, &c);
	if (a>=b && b>=c)
	printf("%d %d %d\n",c,b,a);
	else if (a>=c && c>=b)
	printf("%d %d %d\n",b,c,a);
	else if (b>=a && a>=c)
	printf("%d %d %d\n",c,a,b);
	else if (b>=c && c>=a)
	printf("%d %d %d\n",a,c,b);
	else if (c>=a && a>=b)
	printf("%d %d %d\n",b,a,c);
	else if (c>=b && b>=a)
	printf("%d %d %d\n",a,b,c);
	return 0;
}


Measured memory_bytes: 2080
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <numeric>
#include <string.h>
#define rep(i, x) for (int i = 0; i < (int)(x); i++)
#define repn(i, x) for (int i = 1; i <= (int)(x); i++)
#define repr(i, x) for (int i = ((int)(x) - 1); i >= 0; i--)
#define reprn(i, x) for (int i = ((int)(x)); i > 0; i--)
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long int64;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1<<29;
const long long  INFL = 1e18;
const int MOD = 1000000007;
void solve() {
	int64 n; cin >> n;
	int64 ans = 0;
	for (int i = 1; i <= n; ++i) {
		if ((i % 15 != 0) && (i % 3 != 0) && (i % 5 != 0)) {
			ans += i;
		}
	}
	cout << ans << endl;
	return;
}

int main() {
	solve();
  return 0;
}

Measured memory_bytes: 3624
from fractions import gcd
def lcm(a, b):
	return a * b // gcd (a, b)
A, B, C, D = map(int,input().split())
l = lcm(C, D)
ans = B - (B // C + B // D - B // l)
ans -= (A-1) - ((A-1) // C + (A-1) // D - (A-1) // l)
print(ans)

Measured memory_bytes: 6200
#include<bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define mod 1000000007
#define MAX 1000000000000000
#define all(v) v.begin(),v.end()
#define rep(i,a,b) for(i=(ll)a;i<(ll)b;i++)
#define revrep(i,a,b) for(i=(ll)a;i>=(ll)b;i--)
#define ii pair<ll,ll>
#define MP make_pair
#define pb push_back
#define f first
#define se second
#define ll long long int
#define vi vector<ll>
ll modexp(ll a,ll b){ ll res = 1; while(b > 0){  if(b & 1) res = (res * a)%mod;  a = (a * a)%mod;  b/=2;  }  return res; }
#define rs resize
typedef tree< ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update > OST;
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <typename Arg1>
    void __f(const char* name, Arg1&& arg1){
        cout << name << " : " << arg1 << endl;
    }
    template <typename Arg1, typename... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args){
        const char* comma = strchr(names + 1, ','); cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
    }
#else
#define trace(...)
#endif

const ll N = 5;
ll i,ans;
ll p[N],t[N];
int main()
{
    std::ios_base::sync_with_stdio(false); cin.tie(NULL);
    rep(i,0,N){
        cin>>t[i];
        p[i] = i;
    }
    ans = MAX;
    do{
        ll r = 0;
        rep(i,0,N){
            r += t[p[i]];
            if(i < N - 1)
                r += (10 - r % 10) % 10;
        }
        
        ans = min(ans, r);
    } while(next_permutation(p,p + N));
    cout<<ans;
    return 0;
}

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

int N;
priority_queue<int> que;

int main() {
	cin >> N;
	for (int i = 0; i < N; i++) {
		int a;
		cin >> a;
		que.push(a);
	}

	int alice = 0, bob = 0;
	for(int i = 0; i < N; i++) {
		int num = que.top();
		que.pop();
		if (i % 2 == 0) alice += num;
		else bob += num;
	}

	cout << alice - bob << endl;
}

Measured memory_bytes: 256
#ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
#include<bits/stdc++.h>
using namespace std;
#define rep(i,s,t) for(ll i = (ll)(s); i < (ll)(t); i++)
#define rrep(i,s,t) for(ll i = (ll)(s-1);(ll)(t) <= i; i--)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> Pll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<vvl> vvvl;
constexpr ll INF = numeric_limits<ll>::max()/4;
constexpr ll n_max = 2e5+10;
#define int ll

template <typename A, typename B>
string to_string(pair<A, B> p);
string to_string(const string &s) {return '"' + s + '"';}
string to_string(const char *c) {return to_string((string) c);}
string to_string(bool b) {return (b ? "true" : "false");}
template <size_t N>
string to_string(bitset<N> v){
    string res = "";
    for(size_t i = 0; i < N; i++) res += static_cast<char>('0' + v[i]);
    return res;
}
template <typename A>
string to_string(A v) {
    bool first = true;
    string res = "{";
    for(const auto &x : v) {
        if(!first) res += ", ";
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}
template <typename A, typename B>
string to_string(pair<A, B> p){return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";}

void debug_out() {cerr << endl;}
template<typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cerr << " " << to_string(H);
    debug_out(T...);
}

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

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

signed main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    ll x,n; cin >> x >> n;
    vector<ll> cnt(110);
    for(int i = 0; i < n; i++) {
        ll p; cin >> p;
        cnt[p] = 1;
    }
    ll dif = INF;
    ll ans = -1;
    rrep(i, 110, 0) {
        if(cnt[i]) continue;
        if(chmin(dif, abs(i - x))){
            ans = i;
        }
    }

    cout << ans << "\n";
}

Measured memory_bytes: 3664
#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <math.h>
#include <sstream>
#include <numeric>
#include <string>
#include <cassert>

using namespace std;
typedef long long ll;

int main() {
  int r;
  cin >> r;
  cout << r * r << endl;
  return 0;
}


Measured memory_bytes: 256
#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;
  vector<int> a(n);
  rep(i, n) cin >> a[i];
  rep(i, n) a[i]--;

  vector<int> b(n);
  rep(i, n) b[a[i]] = i + 1;

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

Measured memory_bytes: 4052
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef int ll;
typedef long double ld;
const ll N = 200005;
char en = '\n';
ll inf = 1e16;
ll mod = 1e9 + 7;
ll power(ll x, ll n, ll mod) {
  ll res = 1;
  x %= mod;
  while (n) {
    if (n & 1)
      res = (res * x) % mod;
    x = (x * x) % mod;
    n >>= 1;
  }
  return res;
}

int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  ll n;
  cin >> n;
  ll p[n + 5];
  for (ll i = 1; i <= n; i++)
    cin >> p[i];

  ll min1 = inf;
  ll res = 0;
  for (ll i = 1; i <= n; i++) {
    min1 = min(min1, p[i]);

    if (p[i] <= min1)
      res++;
  }
  cout << res << en;
  return 0;
}

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

using namespace std;

int main(void) {
	int n, m; cin >> n >> m;
	long long int  s;
	priority_queue<long long int> a;
	for (int i = 0; i < n; ++i) {
		cin >> s;
		a.push(s);
	}
	while (m > 0) {
		s = a.top() / 2;
		a.pop();
		a.push(s);
		m--;
	}
	s = 0;
	while (!a.empty()) {
		s += a.top();
		a.pop();
	}
	cout << s;
	return 0;

}



Measured memory_bytes: 1400
#include<iostream>
#include<algorithm>
#include<cstring>
 
using namespace std;
 
typedef long long int64;
 
int N, M;
int64 A[5001];
int B[5001][200];
int ans[200];
 
int main()
{
 
  scanf("%d %d", &N, &M);
  for(int i = 1; i < N; i++) {
    scanf("%lld", &A[i]);
    A[i] += A[i - 1];
  }
  for(int i = 0; i < N; i++) {
    for(int j = 0; j < M; j++) scanf("%d", &B[i][j]);
  }
 
  int64 ret = 0;
  for(int i = 0; i < N; i++) {
    memset(ans, 0, sizeof(ans));
    int64 res = 0;
    for(int j = i; j < N; j++) {
      for(int k = 0; k < M; k++) {
        if(ans[k] < B[j][k]) {
          res += B[j][k] - ans[k];
          ans[k] = B[j][k];
        }
      }
      ret = max(ret, res + A[i] - A[j]);
    }
  }
 
  printf("%lld\n", ret);
}
 
 
 

Measured memory_bytes: 4224
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  //D
  long long n, m;
  cin >> n >> m;
  vector<int> a(m), b(m);
  for (int i = 0; i < m; i++) {
    cin >> a[i] >> b[i];
    a[i]--;
    b[i]--;
  }
  vector<int> v(n);
  vector<vector<int>> g(n);
  for (int i = 0; i < n; i++) {
    v[i] = i;
    g[i].push_back(i);
  }
  vector<long long> ans;
  ans.push_back(n * (n -1) / 2);
  for (int i = m - 1; i >= 0; i--) {
    int x = v[a[i]];
    int y = v[b[i]];
    if (g[x].size() < g[y].size()) swap(x, y);
    int k = g[x].size();
    int kk = g[y].size();
    //cerr << x << " " << y << endl;
    //cerr << k << " " << kk << endl << endl;
    long long res;
    if (x == y) {
      res = ans.back();
      ans.push_back(res);
      continue;
    }

		for (int j : g[y]) v[j] = x;
		g[x].insert(g[x].end(), g[y].begin(), g[y].end());
		g[y].clear();
    //long long k = (long long) g[x].size();
    if (x == y) res = ans.back();
    //else res = max(0LL, ans.back() - (1LL * k * kk));
    else res = ans.back() - (1LL * k * kk);
    ans.push_back(res);
  }
  reverse(ans.begin(), ans.end());
  for (int i = 1; i <= m; i++) {
    cout << ans[i] << endl;
  }
  return 0;	
}

Measured memory_bytes: 12660
/*
 * 17-2-18_ARC069_C.cpp
 *
 *  Created on: 2017/02/18
 *      Author: ryoma
 */

#include<iostream>
#include<algorithm>
#include<queue>
#include<map>

using namespace std;
typedef long long ll;

int N;
int a[100010];
priority_queue<ll> pq;
map<ll, int> mp;
map<ll ,long long> mpcnt;
long long ans[100010];
int main() {
	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> a[i];
		if (mp.find(a[i]) == mp.end()) {
			mp[a[i]] = i;
			mpcnt[a[i]] = 1;
			pq.push(a[i]);
		} else
			mpcnt[a[i]]++;
	}
	int now = pq.top();
	int x = mp[now];
	pq.pop();
	long long cnt = 0;
	while (!pq.empty()) {
		int q = pq.top();
		pq.pop();
		cnt += mpcnt[now];
		x = min(x,mp[now]);
		ans[x] += cnt * (now - q);
		now = q;
	}
	cnt += mpcnt[now];
	x = min(x,mp[now]);
	ans[x] += cnt * now;
	for (int i = 0; i < N; i++) {
		cout << ans[i] << endl;
	}
	return 0;
}



Measured memory_bytes: 15476
#include "bits/stdc++.h"
using namespace std;
#define trace1(x)                cerr<<#x<<": "<<x<<endl
#define trace2(x, y)             cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define trace3(x, y, z)          cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define trace4(a, b, c, d)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define trace5(a, b, c, d, e)    cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
#define trace6(a, b, c, d, e, f) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl
template <class T, class... S> void dbs(string str, T t, S... s) {int idx = str.find(','); cout << str.substr(0, idx) << " : " << t << ","; dbs(str.substr(idx + 1), s...);}
template <class S, class T>ostream& operator <<(ostream& os, const pair<S, T>& p) {return os << "(" << p.first << ", " << p.second << ")";}
template <class T>ostream& operator <<(ostream& os, const vector<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const set<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class S, class T>ostream& operator <<(ostream& os, const map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}

#define fio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define all(V) (V).begin(), (V).end() 
#define x first
#define y second

using namespace std;

typedef long long ll;
template <typename T> using V = vector <T>;

int main() {fio;
	int N, W;
	cin >> N >> W;
	V <int> w(N), v(N);
	for(int i = 0; i < N; i++) {
		cin >> w[i] >> v[i];
	}
	int vm = *max_element(all(v));
	V <ll> DP(vm * N + 1, 1e14);
	DP[0] = 0;
	int ans = 0;
	for(int i = 0; i < N; i++) {
		V <ll> DPL = DP;
		for(int j = v[i]; j <= vm * N; j++) {
			DP[j] = min(DPL[j - v[i]] + w[i], DP[j]); 
			if(DP[j] <= W) {
				ans = max(ans, j);
			}
		}
	}
	
	cout << ans;
    return 0;
}

Measured memory_bytes: 1812
#include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <array>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
using namespace std;
int main(void)
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	int N, H, a, b, MAXcut = 0; cin >> N >> H;
	vector<pair<int, int>>arr(N);
	vector<int>arr2(N, 0);
	for (int i = 0; i < N; ++i)
	{
		cin >> a >> b;
		arr2[i] = b;
		MAXcut = max(a, MAXcut);
		if (a >= b)
		{
			b = -1;
		}
		arr[i] = make_pair(a, b);
	}
	sort(arr2.begin(), arr2.end());
	reverse(arr2.begin(), arr2.end());
	int count = 0;
	for (int i = 0; H > 0; ++i)
	{
		if (i <N && arr2[i] > MAXcut)
		{
			H -= arr2[i];
		}
		else
		{
			H -= MAXcut;
		}
		count++;
	}
	cout << count << "\n";
}

Measured memory_bytes: 1408
/**
 *    author:  tourist
 *    created: 09.01.2018 11:59:26       
**/
#include <bits/stdc++.h>

using namespace std;

int main() {
  int k;
  scanf("%d", &k);
  vector<int> a(k);
  for (int i = 0; i < k; i++) {
    scanf("%d", &a[i]);
  }
  long long low = 2, high = 2;
  for (int i = k - 1; i >= 0; i--) {
    low = (low + a[i] - 1) / a[i] * a[i];
    high = high / a[i] * a[i] + (a[i] - 1);
    if (low > high) {
      cout << -1 << endl;
      return 0;
    }
  }
  cout << low << " " << high << endl;
  return 0;
}


Measured memory_bytes: 640
<?php
fscanf(STDIN,"%d",$n);


$chars = array();
$index = '';
 for($i=0;$i<$n;$i++){
   $char_li = str_split(trim(fgets(STDIN)));
   sort($char_li);
   for($j=0;$j<10;$j++) $index.=$char_li[$j];
   $chars[$index]++;
   $index = '';
 }
$sum = 0;

//print_r($chars);
foreach($chars as $v){
  if($v>=2){
    $sum += ($v*($v-1))/2;
    
  }
}

echo ($sum);

  

Measured memory_bytes: 13048
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define irep(i, n) for (int i = (n); i >= 0; i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1 << 30;
 
int main() {
  ll k, a, b;
  cin >> k >> a >> b;

  ll ans;
  if (b <= a + 1) ans = k + 1;

  
  else if (b-a >= 2) {
    if (k <= a) ans = k + 1;  
    else {
      k -= (a-1);//クッキーをa枚にする
      ans = a + (k / 2) * (b-a);
      if (k % 2 == 1) ans++;
    }
  }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 3600
#include <bits/stdc++.h>
        #define endl '\n'
        #define modulo 1000000007
        #define int long long
        //#define __int128 long long
        #pragma GCC optimize("-Ofast")
        #define float double
        #define PI 3.141592653589793238462643383279502884
        #define sinDegrees(x) sin((x) * PI / 180.0)
        #define tanDegrees(x) tan((x) * PI / 180.0)
        #define atanDegrees(x) atan(x)* 180.0 / PI
        #define f first
       // #define s second
        using namespace std;
        int power(int x,int y,int m)
        {
        int temp;
        if(y == 0)
        return 1;
        temp = (power(x, y/2,m))%m;
        if (y%2 == 0)
        return ((temp%m)*temp);
        else
        return ((x*temp%m)*temp%m)%m;
        }
        int inv(int x)
        {
        return (power(x,modulo-2,modulo))%modulo;
        }
        bool comp(pair<int,int>a,pair<int,int>b)
        {
            if(a.second==b.second)
            return a.first<b.first;
            return a.second<b.second;
        }
        ///Solution created by:Ahmadsm2005
        int32_t main()
        {
            //freopen("output.txt","w", stdout);
            //freopen("input0.txt","r", stdin);
            iostream::sync_with_stdio(0);
            cin.tie(0);
            cout.tie(0);
            int n;
            cin>>n;
            cout<<n/2+n%2;
            return 0;
        }


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

int main()
{
    int n, x = 0;
    string str;
    cin >> n;
    cin >> str;
    vector<int> vec;

    vec.push_back(x);
    for (int i = 0; i < n; i++) {
        if (str[i] == 'I') {
            x++;
        } else if (str[i] == 'D') {
            x--;
        }
        vec.push_back(x);
    }

    sort(vec.begin(), vec.end());
    cout << *(vec.end() - 1) << endl;

    return 0;
}


Measured memory_bytes: 256
/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <iostream>
#include<bits/stdc++.h>
using namespace std;
int cum [200001];
 map<int,int> mp ; 
int main()
{
// 110010
        int n , k,sum=0,Max=0 ,last=0; 
        cin>>n>>k ; 
        string s ; 
        cin >>s ; 
        vector<int> v ; 
        int cnt =0 ; 
        int mx = 0;
        for(int i =0;i<n;i++){
          if(i!=n-1 and s[i]=='0' and s[i+1]=='1'){
            cnt++; 
          }
          if(s[i] == '1')
           mx = max(mx,i +1 - mp[cnt - k]);
          if(  i!=n-1 and s[i]=='0' and s[i+1]=='1')
              mp[cnt]= i+1;
        }
        if(s[n- 1] ==  '0')
          mx = max(mx, n - mp[cnt + 1 - k]);
        cout<<mx  ;
        
  }

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

using namespace std;

int main() {


    int a, b, c;
    scanf("%d %d", &a, &b);
    int sum = 0;
    int kecil = 1001;
    int count = 0;

    while(a) {
    	scanf("%d", &c);
    	sum += c;
    	count++;
    	if(kecil > c) {
    		kecil = c;
    	}

    	a--;
    }

    b -= sum;
    count += (b/kecil);
    printf("%d\n", count);
    return 0;
}

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

using namespace std;

int main(){

	int n;
	string str;

	cin>>n;
	cin>>str;

	int state=0;
	int leftNum=0;
	int rightNum=0;

	int ansRightNum=0;
	int ansLeftNum=0;

	for(int i=0;i<n;i++){
		if(state==0){
			if(str.at(i)==')'){
				rightNum++;
			}else{
				ansRightNum+=rightNum;
				rightNum=0;
				leftNum++;
				state=1;
			}
		}else{
			if(str.at(i)==')'){
				leftNum--;
				if(leftNum==0){
					state=0;
				}
			}else{
				leftNum++;
			}
		}
	}
	ansRightNum += rightNum;
	for(int i=0;i<ansRightNum;i++){
		cout<<"(";
	}
	cout<<str;
	for(int i=0;i<leftNum;i++){
		cout<<")";
	}
	cout<<endl;

	return 0;


}

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

using namespace std;
const int OO = 0x3f3f3f3f;
//const long long OO = (long long) 1e18+7;
//const unsigned long long UOO = (long long) 10e18+7;
#define lp(i,a,n) for(long long i = a ; i < n ; ++i)
#define lpr(i,a,n) for(long long i = a ; i >= n ; --i)
#define rep(i,vec) for(ll i = 0 ; i < vec.size() ; ++i)
#define reprv(i,vec) for(ll i = vec.size()-1; i >=0 ; --i)
#define eps (1e-5)
#define pb(i) push_back(i)
#define EPS 1e-9
#define sz(x) int((x).size())
#define all(x) (x).begin(), (x).end()
#define ff first
#define ss second
#define debug(x) cout<<(#x)<<": \""<<x<<"\""<<endl
#define debugVec(vec) cout<<(#vec)<<": "; for (auto& i: vec) cout<<i<<" "; cout<<endl

typedef vector<int> vi ;
typedef   long long ll;
typedef   unsigned long long ull;
typedef vector<ll> vll ;
typedef pair<int,int> pii ;
typedef vector< pair<int,int> >  vpii;
typedef vector<pair<long long,long long>> vpll;
typedef vector<vector<int> > vvi ;
typedef complex<double> point;
typedef pair<ll,ll> pll;

using namespace std;
ll  inv(ll a, ll b) {return 1 < a ? b - inv(b % a, a) * b / a : 1;}
ll  Pow(ll  B,ll  P){ll  R=1; while(P>0)  {if(P&1) R=(R*B);P/=2;B=(B*B);}return R;} //compute b^p
ll  GCD(ll  a,ll  b){ while(b){b ^= a ^=b ^= a %=b;}  return a;}
ll  LCM(ll  a,ll  b) { return (a / GCD(a,b)*b); }
ll  BigMod(ll  B,ll  P,ll  M){ ll  R=1; while(P>0)  {if(P&1){R=(R*B)%M;}P/=2;B=(B*B)%M;} return (ll )R;} //compute b^p%m
//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//int i=uniform_int_distribution<int>(1,n)(rng);

ll MOD = 1000000007;
int n,m;
char g[1002][1002];
ll dp[1002][1002];

bool valid(int x,int y){
    return x >= 0 && y >= 0 && x < n && y < m && g[x][y] == '.';
}





int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
//    cout.tie(0);
//#ifndef ONLINE_JUDGE
//   freopen( "output.txt" , "w" , stdout ) ;
//   freopen( "input.txt" , "r" , stdin ) ;
//#endif

    cin >> n >> m;

    lp(i,0,n)lp(j,0,m) cin >> g[i][j],dp[i][j] = -1;

    dp[n-1][m-1] = 1;
    queue<pii> q;
    q.push({n-1,m-1});
    while(q.size()){
        pii p = q.front();
        q.pop();
        if(valid(p.ff-1,p.ss)){
            if(dp[p.ff-1][p.ss] == -1){
                q.push({p.ff-1,p.ss});
                dp[p.ff-1][p.ss] = 0;
            }
            dp[p.ff-1][p.ss] += dp[p.ff][p.ss];
            dp[p.ff-1][p.ss] %= MOD;
        }
        if(valid(p.ff,p.ss-1)){
            if(dp[p.ff][p.ss-1] == -1){
                q.push({p.ff,p.ss-1});
                dp[p.ff][p.ss-1] = 0;
            }
            dp[p.ff][p.ss-1] += dp[p.ff][p.ss];
            dp[p.ff][p.ss-1] %= MOD;
        }
    }
    dp[0][0] == -1 ? cout << "0" : cout << dp[0][0];

    return 0;
}


Measured memory_bytes: 12440
#include<iostream>
using namespace std;
typedef long long li;
#define rep(i,n) for(int i=0;i<(n);i++)
#define df 0
template<class T> void print(const T& t){ cout << t << "\n"; }
template<class T, class... Ts> void print(const T& t, const Ts&... ts) { cout << t; if (sizeof...(ts)) cout << " "; print(ts...); }

int main(){
  int a,b; cin >>a >>b;
  print(a*b);
}


Measured memory_bytes: 3636
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
using namespace std;
typedef long long LL;

int main(){
    int zero=0,one=0;
    char c;
    while(cin>>c){
        if(c=='0')zero++;
        else one++;
    }
    cout<<min(zero,one)*2<<endl;
}


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

string ask(int x){
    cout<<x<<endl;
    string res;
    cin>>res;
    if(res == "Vacant") exit(0);
    return res;
}

int main(void){
    int n;
    cin>>n;
    int l=0,r=n-1,m=n/2;
    string ls=ask(l), ms=ask(m), rs=ask(r);
    while(true){
        if(((m-l)%2==0 && ms==ls) || ((m-l)%2==1 && ms!=ls)){
            l = m;
            ls = ms;
        }else{
            r = m;
            rs = ms;
        }
        m = (l+r)/2;
        ms = ask(m);
    }
    return 0;
}


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

#define ll long long
#define pb push_back
#define vi vector<int>
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define sizeOf(A) (sizeof(A))/(sizeof(A[0]))
#define odd(x) ((x) % (2))

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

    int h, w;
    cin >> h >> w;
    string A[h];
    FOR(i, 0, h) {cin >> A[i];}

    w += 2;
    FOR(i, 0, w) {cout << "#";}
    cout << "\n";
    FOR(i, 0, h) {
        cout << "#";
        cout << A[i];
        cout << "#\n";
    }
    FOR(i, 0, w) {cout << "#";}
    return 0;
}


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

using namespace std;
typedef long long ll;

ll a, b;

int main() {
	cin>>a>>b;
	ll g=__gcd(a, b);
	ll m=sqrt(g+0.5);
	int ans=0;
	for(int i=2; i<=m; i++) {
		if(g%i==0) {
			ans++;
			while(g%i==0) g/=i;
		}
	}
	if (g>1) ans++;
	cout<<ans+1<<endl;
	return 0;
}


Measured memory_bytes: 256
#include <stdio.h>
  int main(){
   long long int dp[100][100]={},x[101],i,j,n;//dp[a][50+b]とはa個の数の式の結果がbであるものの数千代
scanf("%lld",&n);
for(i=1;i<=n;i++){
scanf("%lld",&x[i]);
}
dp[1][50+x[1]]=1;
for(i=2;i<n;i++){
for(j=0;j<=20;j++){
dp[i][50+j]=dp[i-1][50+j+x[i]]+dp[i-1][50+j-x[i]];
}}
printf("%lld\n",dp[n-1][50+x[n]]);
scanf("%d\n",&i);
return 0;
}

Measured memory_bytes: 1116
#include <bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) for (int i = (int)(n-1); i >= 0; i--)
#define sz(x) int(x.size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define INF 2e9
#define LINF 1e18
#define mod 1000000007
template<class T> inline bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T &a, const T &b) { if (a > b) { a = b; return 1; } return 0; }
typedef long long ll;
typedef pair<int, int> P;
int dx[4] = {1,0,-1,0};
int dy[4] = {0,1,0,-1};

int main() {
    int h,w; cin >> h >> w;
    char s[h][w];
    rep(i,h)rep(j,w) cin >> s[i][j];

    int d[h][w];
    rep(i,h)rep(j,w) d[i][j] = INF;
    d[0][0] = 0;

    int num = 0;
    rep(i,h)rep(j,w) {
        if (s[i][j]=='#') num++; //#の数カウント
    }

    queue<P> que;
    que.push(P(0,0));
    while (!que.empty()) {
        P p = que.front(); que.pop();
        if (p.first==h-1 && p.second==w-1) break;
        rep(i,4) {
            int ny = p.first + dy[i];
            int nx = p.second + dx[i];
            if (0<=ny && ny<h && 0<=nx && nx<w && s[ny][nx]!='#' && d[ny][nx]==INF) {
                que.push(P(ny,nx));
                d[ny][nx] = d[p.first][p.second]+1;
            }
        }
    }
    if (d[h-1][w-1]==INF) cout << -1 << endl;
    else cout << h*w - d[h-1][w-1] - num - 1 << endl;
}

Measured memory_bytes: 3608
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int n = sc.nextInt();
        int m = sc.nextInt();
        int k[] = new int[n];
        int a[][] = new int[n][m];
        int love[] = new int[m];
        int i,j;
        int count = 0;
        for(i = 0;i < n;i++){
          k[i] = sc.nextInt();
           for(j = 0;j < k[i];j++){          
             a[i][j] = sc.nextInt();
             love[a[i][j] - 1] += 1;
           }
        }
		
      
        for(i = 0;i < m;i++){
          if(love[i] == n){
            count += 1;
          }
        }
        System.out.println(count); 
      
 
 
    }
}

Measured memory_bytes: 38616
n = int(input()) 
a = list(map(int,input().split())) 
sa = sorted(a) 

if n % 2 == 0:
  k = 1
  l = 0
else:
  k = 0
  l = 1 

a=1000000007
flag = True 
for i,s in enumerate(sa):
  if ((i+l)//2)*2+k != s:
    flag = False
if flag:
  print(2**(n//2) % a)
else:
  print(0) 


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

using namespace std;
typedef long long ll;
//typedef unsigned long long ll;

#define rep(i, n) for (ll i = 0; i < (n); ++i)
//#define rep(i, n) for (int i = 0; i < (n); ++i)
//#define sz(x) ll(x.size())
//typedef pair<ll, int> P;
typedef pair<ll, ll> P;
//const double INF = 1e10;
const ll INF = LONG_LONG_MAX / 100;
//const ll INF = 1e15;
const ll MINF = LONG_LONG_MIN;
//const int INF = INT_MAX / 10;
#define cmin(x, y) x = min(x, y)
#define cmax(x, y) x = max(x, y)

bool contain(set<char> &s, int a) { return s.find(a) != s.end(); }


//ifstream myfile("C:\\Users\\riku\\Downloads\\0_00.txt");
//ofstream outfile("log.txt");
//outfile << setw(6) << setfill('0') << prefecture << setw(6) << setfill('0') << rank << endl;
// std::cout << std::bitset<8>(9);

typedef priority_queue<ll, vector<ll>, greater<ll>> PQ_ASK;
const int mod = 1000000007;

int main() {
    vector<int> a(3);
    rep(i, 3)cin >> a[i];
    ll sum = accumulate(a.begin(), a.end(), 0);
    if (sum >= 22) {
        cout << "bust" << endl;
    } else {
        cout << "win" << endl;
    }

}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define FOR(i,start,end) for(int i=start;i<=end;i++)
const int INF = 1001001001;
using namespace std;
typedef long long ll;
 
int main()
{
  int W, H, N;
  int cell[110][110];
  int x[110], y[110], a[110];
  int res=0;
  cin >> W>>H>>N;
 
  rep(i,N) {
    cin >> x[i] >> y[i] >> a[i];
    x[i];
    y[i];
  }
 
  rep(i,W){
    rep(j,H){
      cell[i][j]=0;
    }
  }
  rep(i,N){
    if(a[i]==1)
      FOR(j,0,x[i]-1){
        FOR(k,0,H){
          cell[j][k]=1;
        }
      }
    if(a[i]==2)
      FOR(j,x[i],W-1){
        FOR(k,0,H){
          cell[j][k]=1;
        }
      }
    if(a[i]==3)
      FOR(j,0,y[i]-1){
        FOR(k,0,W-1){
          cell[k][j]=1;
        }
      }
    if(a[i]==4)
      FOR(j,y[i],H-1){
        FOR(k,0,W-1){
          cell[k][j]=1;
	}
      }
  }
 
  rep(i,H){
    rep(j,W){
      //cout << cell[j][i];                                                              
      res+=cell[j][i];
    }
    //cout << endl;                                                                      
  }
  res = H*W-res;
  cout << res << endl;
}


Measured memory_bytes: 256
count = [0]*26
while True:
         try:
                  sample = (input())
         except:
                  break
         for i in range(len(sample)):
                  case = ord(sample[i])
                  if 65 <= case <= 90:
                           count[case-65] += 1
                  elif 97 <= case <= 122:
                           count[case-97] += 1
for i in range(26):
         print(chr(i+97)+" : "+str(count[i]))



Measured memory_bytes: 5564
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        int a = 0;
        int b = 0;
        int ans = 0;
        for(int i = 0; i < 9; i++){
            a = i + 1;
            for(int j = 0; j < 9; j++){
                b = j + 1;
                ans = a * b;
                System.out.println(a+"x"+b+"="+ans);
            }
        }
    }
}

Measured memory_bytes: 23988
#define _USE_MATH_DEFINES
#include <cstdio>
#include <cmath>

#define myPrint(a, b) printf("%12.8f %12.8f\n", a, b)

struct myPoint { double x, y; };

void koch(int n, myPoint a, myPoint b) {
	myPoint s, t, u;
	double th = M_PI * (60.0 / 180.0);

	if (n == 0) return;
	s.x = (2.0 * a.x + b.x) / 3.0;
	s.y = (2.0 * a.y + b.y) / 3.0;
	t.x = (a.x + 2.0 * b.x) / 3.0;
	t.y = (a.y + 2.0 * b.y) / 3.0;
	u.x = (t.x - s.x) * cos(th) - (t.y - s.y) * sin(th) + s.x;
	u.y = (t.y - s.y) * cos(th) + (t.x - s.x) * sin(th) + s.y;

	koch(n - 1, a, s);
	myPrint(s.x, s.y);
	koch(n - 1, s, u);
	myPrint(u.x, u.y);
	koch(n - 1, u, t);
	myPrint(t.x, t.y);
	koch(n - 1, t, b);
} 

int main() {
	myPoint a, b;
	int n;

	scanf("%d", &n);

	a.x = 0;
	a.y = 0;
	b.x = 100;
	b.y = 0;

	myPrint(a.x, a.y);
	koch(n, a, b);
	myPrint(b.x, b.y);

	return 0;
}

Measured memory_bytes: 2752
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i,x,n) for(int i=x; i<(n); i++)
#define all(n) begin(n),end(n)
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
const long long INF = numeric_limits<long long>::max();
int main(){
    long long X,K,D;
    cin>>X>>K>>D;
    //K*D>|X|なら、0の前後をうろうろするので超えるときか戻るときかで場合分け
    //K*D<=|X|なら0に近づくだけなので|X|-K*Dが答え
    if(abs(X)/D>=K){
        cout << abs(X)-K*D << endl;
        return 0;
        //overflowしない
    }
    long long n = abs(X)/D;//0を飛び越える直前の場所までの回数（0丁度も可）
    long long r = K-n;//残りジャンプ数
    if(r%2==0){
        //残り偶数回なら答えは|X|-nD
        cout << abs(X)-n*D << endl;
        return 0;
    }else{
        cout << abs((abs(X)-n*D)-D) << endl;
        return 0;
    }

    return 0;
}

Measured memory_bytes: 3556
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD=1e9+7;
const int INF=1e9;

int main(){
    string s;
    int x,y;
    cin>>s>>x>>y;
    s+='T';
    int n=s.size(),cnt=0,it=0,t=1;
    while(it<n&&s[it]=='F'){
        it++;
        cnt++;
    }
    set<int> st[2][2];
    st[0][1].insert(cnt);
    st[1][0].insert(0);
    while(it++<n){
        cnt=0;
        while(it<n&&s[it]=='F'){
            cnt++;
            it++;
        }
        int a=t%2,b=t/2;
        for(int v:st[a][b]){
            st[a][b^1].insert(v+cnt);
            st[a][b^1].insert(v-cnt);
        }
        st[a][b].clear();
        t=(t+1)%4;
    }
    /*
    for(int i=0;i<2;i++){
        for(int j=0;j<2;j++){
            if(st[i][j].size()){
                for(int v:st[i][j])cout<<v<<" ";
                cout<<endl;
            }
        }
    }
    */
    bool a=st[0][0].find(x)!=st[0][0].end();
    bool b=st[0][1].find(x)!=st[0][1].end();
    bool c=st[1][0].find(y)!=st[1][0].end();
    bool d=st[1][1].find(y)!=st[1][1].end();
    if((a||b)&&(c||d))cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}


Measured memory_bytes: 768
#include<bits/stdc++.h>
#define INF 9223372036854775807LL
#define inf 1000000007
#define SYOU(x) setprecision(x+1)
#define abs(x,y) (max(x,y)-min(x,y))
#define lol long long
#define mp make_pair
#define fi first
#define se second
using namespace std;
lol i[10000];
lol p[1000];
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a,b,c,d,e=0,f=0;
  string s,w;
  int ans=0;
  cin >>a>>b;
  for(int n=0;n<a;n++){
      cin >>c;
      for(int m=0;m<c;m++){
	  cin >>d;
	  p[d]++;
      }
  }
  for(int n=1;n<=b;n++){
      if(p[n]==a) ans++;
  }
  cout <<ans<<'\n';
  return (0);
}


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

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  int n;
  cin >> n;
  
  vector<int> d(n), e(13);
  for (int i = 0; i < n; i++) {
    cin >> d.at(i);
    e.at(d.at(i))++;
  }
  
  vector<int> x;
  x.emplace_back(0);
  x.emplace_back(24);
  
  bool flag = true;
  for (int i = 0; i < 13; i++) {
    if (i == 0 && e.at(i) > 0) {
      cout << "0\n";
      return 0;
    }
    else if (i == 12) {
      if (e.at(i) > 1) {
        cout << "0\n";
        return 0;
      }
      if (e.at(i) == 1) x.emplace_back(i);
    }
    else {
      if (e.at(i) > 2) {
        cout << "0\n";
        return 0;
      }
      if (e.at(i) == 2) {
        x.emplace_back(i);
        x.emplace_back(24 - i);
      }
      else if (e.at(i) == 1) {
        if (flag) x.emplace_back(i);
        else x.emplace_back(24 - i);
        flag ^= true;
      }
    }
  }
  
  sort(x.begin(), x.end());
  int ans = 24;
  for (int i = 1; i < x.size(); i++) ans = min(ans, x.at(i) - x.at(i - 1));
  cout << ans << '\n';
}

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

int main()
{
	int n, v[25], c[25], x = 0, y = 0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> v[i];
	}
	for (int i = 0; i < n; i++) {
		cin >> c[i];
	}
	for (int i = 0; i < n; i++) {
		if (v[i] > c[i]) {
			x += v[i];
			y += c[i];
		}
	}
	cout << x - y << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define int long long
#define mod 1000000007
#define trace(x) cerr<<#x<<": "<<x<<" "<<endl
#define tarce(x) cerr<<#x<<": "<<x<<" "<<endl
#define trace2(x, y) cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define trace3(x, y, z) cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define trace4(a, b, c, d) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define sa(a,n) for(int i =0 ; i<n ; i++) cin>>a[i]
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define pb push_back
#define inf 2e18
#define scan() int n; cin>>n ; int a[n]; for(int i = 0 ; i<n ; i++) cin>>a[i]
#define print(a,n) for(int i = 0 ; i < n ; i++) cout<<a[i]<<' '
#define mem(a,v) memset(a,v,sizeof(a))
#define pii pair<int,int>
#define mkp make_pair
using namespace std;
#define N 200005

int32_t main(){
        ios_base::sync_with_stdio(false);
        cin.tie(NULL);
        cout.tie(NULL);

        int n;
        cin >> n;
        int i;
        int f[10]={0};
        f[0]=1;
        for(i=1; i<=9; i++){
            f[i]=f[i-1]*i;
        }
        double a[n+1],b[n+1];
        int r=f[n]*(n-1);
        int z=((n-1)*(n))/2;
        double c=r/z;
      //  trace3(r,z,c);
        for(i=1; i<=n; i++){
            double x,y;
            cin >> x >> y;
            a[i]=x;
            b[i]=y;
        }
        
        double ans=0;

        for(i=1; i<=n; i++){
            for(int j=i+1; j<=n; j++){
                double d=(double)sqrt((a[i]-a[j])*(a[i]-a[j])+(b[i]-b[j])*(b[i]-b[j]) );
                ans+=(d*c);
            }
        }
        double fa=ans/(f[n]);
        cout << fixed << setprecision(16) <<  fa << '\n';
}

Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
using namespace std;
#define ll long long

int main() {
    int n, m;
    cin >> n >> m;
    int sum = 0;
    for(int i = 0; i < m; i++) {
        int a;
        cin >> a;
        sum += a;
    }
    if(n-sum < 0) {
        cout << -1 << endl;
    }
    else {
        cout << n-sum << endl;
    }
    return 0;
}

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

int func(int n)
{
  int ret = 0;
  while(n > 0){
    ret += n % 10;
    n = n / 10;
  }
  return ret;
}

int main()
{
  int n, a, b;
  cin >> n >> a >> b;
  int ans = 0;
  for(int i = 1; i <= n; ++i)
  {
    int tmp = func(i);
    if(tmp >= a && tmp <= b) ans += i;
  }
  
  cout << ans << endl;
}

Measured memory_bytes: 3596
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>



int main() {
  char m[20];
  scanf("%s", m);
  if (m[2] == m[3] && m[4] == m[5]) {
    printf("Yes");
  }
  else {
    printf("No");
  }
  return 0;
}


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

 
using namespace std;


int main(){
    long long N;
    cin >> N;
    bool isOK=true;
    long long H[N];
    
    for(long long i=0;i<N;i++){
        cin >> H[i];
    }
    for(long long i=N-1;i>0;i--){
        long long d = H[i]-H[i-1];
        if (d>=0)continue;
        if(d<-1){
            isOK=false;
            break;
        }
        if(d==-1){
            H[i-1]-=1;
        }
    }
    if(isOK){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }

}


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

#define FOR(i,a,b) for(int i=a;i<b;i++)
#define FORN(i,a,b) for(int i=a;i<=b;i++)
#define INT_MAX 2147483647
#define INT_MIN -2147483648

typedef long long ll;			//%ld.
typedef long long int lli;		//%lld.
typedef unsigned long long ull;	//%llu.
// int %d, double %lf ,float %f ,string %s.

void swap(int *x,int *y);
int max(int x,int y);
int min(int x,int y);
void sortSeq(int dt[],int l,int r);
void sortIns(int dt[],int l,int r);
void mergeSort(int dt[],int l,int r);
int binser(int nilai,int dt[],int l,int r);
int abs(int x);
double maxD(double x,double y);
double minD(double x,double y);

//main code
int hitung(int x){
	int m = 0;
	while(x>0){
		m+=(x%10);
		x/=10;
	}
	return m;
}

int main(){
	int n , a, b;
	scanf("%d %d %d",&n,&a,&b);
	int hasil = 0;
	for(int i=1;i<=n;i++){
		int m = hitung(i);
		if(m>=a&&m<=b){
			hasil+=i;
		}
	}
	printf("%d\n",hasil);
}

















///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
double maxD(double x,double y){
	return x > y ? x : y;
}
double minD(double x,double y){
	return x < y ? x : y;
}
int abs(int x){
	if(x<0)	return -x;
	return x;
}
void merge(int arr[], int aLeft , int aRight , int bLeft , int bRight){ //merge
	int size = bRight - aLeft + 1;
	int temp[size];                
	int tIndex = 0;
	int aIndex = aLeft;
	int bIndex = bLeft;
	while( (aIndex <= aRight)&&(bIndex <= bRight))
	{
		if(arr[aIndex]<=arr[bIndex])
		{
			temp[tIndex] = arr[aIndex];
			aIndex = aIndex +1;
		}
		else
		{
			temp[tIndex] = arr[bIndex];
			bIndex = bIndex + 1;
		}
		tIndex = tIndex + 1;
	}
	while(aIndex <= aRight)
	{
		temp[tIndex] = arr[aIndex];
		aIndex = aIndex + 1;
		tIndex = tIndex + 1;
	}
	while(bIndex <= bRight)
	{
		temp[tIndex] = arr[bIndex];
		bIndex = bIndex + 1;
		tIndex = tIndex + 1;
	}
	for(int i = 0 ; i<= size-1 ; i++)
	{
		arr[aLeft + i] = temp[i];
	}
}

void swap(int *a,int *b){ //swap
	int temp = *a;
	*a = *b;
	*b = temp;
}
int max(int a,int b){ //maksimum
	return a>b ? a : b;
}
int min(int a,int b){ //minimum
	return a<b ? a : b;
}
void sortSeq(int arr[],int l,int r){ //sequencial sort
	for(int i=l;i<=r-1;i++)
		for(int j=i+1;j<=r;j++)
			if(arr[j]<arr[i])
				swap(&arr[i],&arr[j]);
}
void sortIns(int h[],int l,int r){ //insertion sort
	for(int i=l;i<=r;i++){
		int pos=i;
		while((pos>1)&&(h[pos]<h[pos-1])){
			swap(&h[pos],&h[pos-1]);
			pos=pos-1;
		}
	}
}
void mergeSort(int arr[],int left,int right){ //merge sort
	if( left == right )
		return; 
	else{
		int mid = (left+right)/2;    	 
		mergeSort(arr,left,mid);	
		mergeSort(arr,mid+1,right);
		merge(arr,left,mid,mid+1,right); 
	}
}
int binser(int x,int dt[],int kiri,int kanan){ //tidak ada = -1
	int hasil = -1;
	while((kiri<=kanan)&&(hasil==0)){
		int tengah=(kiri+kanan)/2;
		if(x<dt[tengah])
			kanan=tengah-1;
		else if(x>dt[tengah])
			kiri=tengah+1;
		else
			hasil=tengah;
	}
	return hasil;
}

Measured memory_bytes: 1736
#define _USE_MATH_DEFINES
#include <math.h>
#include <time.h>
#include <iostream>
#include <string>
#include <vector>
#include <iomanip>
#include <iterator>
#include <algorithm>

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 PI M_PI
#define INF 1000000000
#define MOD 1000000007;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<string> vs;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvll;
typedef vector<vector<bool>> vvb;

int N;
int ans = 0;


int main()
{
	int A, B;
	cin >> N >> A >> B;
	bool a = false;

	while (1)
	{
		A++;
		if (A == B)
		{
			a = true;
			break;
		}

		B--;
		if (A == B)
		{
			break;
		}
	}

	if (a == true) cout << "Borys" << endl;
	else cout << "Alice" << endl;


	return 0;
}


Measured memory_bytes: 256
N, W = map(int, input().split())
w = []
v = []
for _ in range(N):
    x, y = map(int, input().split())
    w.append(x)
    v.append(y)
    
V = N * max(v)

inf = float('inf')
dp = [[inf] * (V + 1) for i in range(N + 1)]
dp[0][0] = 0
for i in range(N):
    for j in range(V + 1):
        if v[i] > j:
            dp[i + 1][j] = dp[i][j]
        else:
            dp[i + 1][j] = min(dp[i][j], dp[i][j - v[i]] + w[i])
            
ans = 0
for i in range(V + 1):
    if dp[N][i] <= W:
        ans = i
print(ans)

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

int main(){
    int h,w;
    cin >> h >> w;

    char c[h][w];
    int a[h+2][w+2] = {0};
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            cin >> c[i][j];
        }
    }

    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            if(c[i][j] == '#'){
                a[i][j]++;
                a[i+1][j]++;
                a[i+2][j]++;
                a[i][j+1]++;
                a[i+1][j+1]++;
                a[i+2][j+1]++;
                a[i][j+2]++;
                a[i+1][j+2]++;
                a[i+2][j+2]++;
            }
        }
    }

    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            if(c[i][j] == '#'){
                cout << "#";
            }else{
                cout << a[i+1][j+1];
            }
        }
        cout << endl;
    }

    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <ctype.h>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

void func_A() {

    char s;
    cin >> s;

    if (isupper(s)) cout << "A";
    else cout << "a";

}

void func_B() {

    int n, k;
    cin >> n >> k;
    vector<int> p(n);

    for (int i = 0; i < n; ++i) cin >> p[i];
    sort(p.begin(), p.end());
    long long ans = 0;
    for (int i = 0; i < k; ++i) ans += p[i];

    cout << ans;
}


void func_C() {

}

int main() {

    //func_A();
    func_B();
    //func_C();

    return 0;
}

Measured memory_bytes: 3632
#include <iostream>

using ll = long long;
using namespace std;
int main() {
  string S;
  cin >> S;
  ll cnt[2] = {0};
  ll ans = 0;
  for (char c : S) {
    int col = c == 'B' ? 0 : 1;
    if (col == 1) ans += cnt[0];
    cnt[col]++;
  }
  cout << ans << endl;
}

Measured memory_bytes: 640
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <utility>
#include <string>
#include <algorithm>
#include <map>
#include <vector>
#include <climits>
#include <numeric>
#include<stdio.h>
#include <queue>
int gcd(int a, int b) { return b ? gcd(b, a%b) : a; }
using namespace std;
signed main()
{
	cin.tie(0); ios::sync_with_stdio(0);
	char c;
	int s[100005];
	int n = 1;
	while(c=getchar(),c!=EOF) {
		if (c == '\n' || c == EOF)break;
		s[n++] = c - '0';
	}
	int judge = 0;
	n -= 1;
	if (s[n] == 1 || s[1] == 0 || s[n - 1] == 0)judge = 1;
	for (int i = 1; i <= n-1; i++) {
		if (s[i] != s[n-i])judge = 1;
	}
	if(judge==0){
		int point = 1;
		int now = 2;
		for (int i = 1; i <= n / 2; i++) {
			if (s[i] == 1) {
				cout << point << " " << now<<"\n";
				point = now; now += 1;
			}
			else {
				cout << point << " " << now<<"\n";
				now += 1;
			}
		}
		for (int i = now; i <= n; i++) {
			cout << point << " " << i<<"\n";
		}
	}
	else cout << -1;
}

Measured memory_bytes: 1792