akhauriyash/Code-Regression huggingface dataset:
#include<iostream>
#include<string>
#include<iomanip>
#include<cmath>
#include<vector>
#include<algorithm>
#include<utility>

using namespace std;

#define int long long
#define endl "\n"

constexpr long long INF = (long long)1e18;
constexpr long long MOD = 1'000'000'007; 

struct fast_io {
	fast_io(){
		std::cin.tie(nullptr);
		std::ios::sync_with_stdio(false);
	};
} fio;

signed main(){
	cout<<fixed<<setprecision(10);
	
	
	for(int i = 1; i <= 5; i++){
		int a;
		cin>>a;
		
		if(a == 0) {
			cout<<i<<endl;
			return 0;
		}
	}
	
	
	
	return 0;
}

Measured memory_bytes: 3640
#include <stdio.h>

int main(void)
{
    int h, m, s;

    scanf("%d", &s);
    h = s / 3600;
    s %= 3600;
    m = s / 60;
    s %= 60;
    printf("%d:%d:%d\n", h, m, s);

    return 0;
}

Measured memory_bytes: 592
# -*- coding: utf-8 -*-
"""
Created on Sun Sep 16 16:57:33 2018

@author: maezawa
"""

h, w = list(map(int, input().split()))
a = '#'*(w+2)
b = []
for i in range(h):
  s = input()
  b.append('#'+s+'#')
print(a)
for s in b:
    print(s)
print(a)

Measured memory_bytes: 3060
from collections import defaultdict

N,M=map(int,input().split())
P=[]
S=[]
for i in range (M):
	A,B=input().split()
	P.append(int(A))
	S.append(B)
Q=defaultdict(lambda:0)
R=defaultdict(lambda:0)
count=0
for i,j in zip(P,S):
  if Q[i]==0:
    if j=="AC":
      Q[i]=1
      count+=R[i]
    elif j=="WA":
      R[i]+=1
print(sum(Q.values()),count)

Measured memory_bytes: 29096
import itertools

N = int(input())
C = [1 if x == 'W' else 0 for x in input()]

rcount = C.count(0)
ans = rcount
W_acc = itertools.accumulate(C)
R_count = C.count(0)
for i, c in enumerate(W_acc, 1):
    ans = min(ans, abs(rcount - i) + c)
print(ans)


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

int main() {

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif

//write code hare 

string s;
cin>>s;


if(s[1] == 'R'){
	cout<<"ABC";
}
else {
	cout<<"ARC";
}
}

Measured memory_bytes: 2956
#include<cstdio>
int k,s,cnt;
int main()
{
    scanf("%d%d",&k,&s);
    for(int x=0;x<=k;x++)
        for(int y=0;y<=k;y++)
        if(s-x-y>=0&&s-x-y<=k)cnt++;
    printf("%d",cnt);
}

Measured memory_bytes: 128
N, K = map(int,input().split())
h = [int(input()) for i in range(N)]
s_h = sorted(h)
tmp = []
ans1 = 0
ans2 = 0
ans3 = 0
for i in range(N-K+1):
    ans1 = s_h[i+K-1]
    ans2 = s_h[i]
    ans3 = ans1 - ans2
    tmp.append(ans3)

print(min(tmp))

Measured memory_bytes: 17800
#include <stdio.h>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iterator>
#pragma warning(disable:4996)
 
typedef long long ll;
#define MIN(a, b) ((a)>(b)? (b): (a))
#define MAX(a, b) ((a)<(b)? (b): (a))
#define LINF 9223372036854775807
#define INF 2147483647
#define MOD 1000000007
using namespace std;

ll comb(long n, long k)
{
    ll curr=1;
    long i;
    for(i=0; i<k; i++) {
        curr = curr * (n-i) / (1+i);
    }
    return curr;
}

int main(int argc, char* argv[])
{
    long n,a,b;
    scanf("%ld%ld%ld", &n, &a, &b);

    vector<ll> v(n);

    long i;
    for(i=0; i<n; i++) {
        scanf("%lld", &v[i]);
    }
    sort(v.rbegin(), v.rend());

    vector<ll> s(n+1);
    s[0]=0;
    for(i=0; i<n; i++) {
        s[i+1]=s[i]+v[i];
    }

    if(v[0]==v[a-1]) {
        printf("%.8lf\n", (double)s[a]/a);

        long count=0;
        for(i=0; i<n; i++) {
            if(v[i]==v[a-1]) {
                count++;
            }
        }

        ll sum=0;
        long k;
        for(k=a; k<=b; k++) {
            sum += comb(count, k);
        }
        printf("%lld\n", sum);
    }
    else {
        printf("%.8lf\n", (double)s[a]/a);

        long count[2]={0,0};
        for(i=0; i<n; i++) {
            if(v[i]==v[a-1]) {
                if(i<a) count[0]++;
                else    count[1]++;
            }
        }
        printf("%ld\n", comb(count[0]+count[1], count[0]));
    }

    return 0;
}



Measured memory_bytes: 256
#include <iostream>
using namespace std;
 
int main() {
	int k, s,z, count=0;
scanf("%d %d\n",&k,&s) ;
for(int x=0;x<=k;x++) {
for(int y=0;y<=k;y++) {
z=s-x-y;
if(z>=0&&z<=k) {
count++;
} 
 
}} 
printf("%d\n",count) ;
 
return 0;
}

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


int main() {

 
    int n;
    cin>>n;

    vector<int> L(n);
    for(int i=0;i<n;i++){
        cin>>L.at(i);
    }

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

    int L_longest=L.at(n-1);
    int L_sum=0;
    for(int i=0;i<n-1;i++){
        L_sum+=L.at(i);
    }

    if(L_longest<L_sum)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;

    return 0;
}

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

using namespace std;

long long sec[100010];
long long dp[100010][2];

int main()
{
    int n;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>sec[i];
    }
    dp[1][0]=sec[1];
    dp[1][1]=0x8f8f8f8f8f8f8f8f;
    for(int i=2;i<=n;i++)
    {
        dp[i][0]=max(dp[i-1][1],dp[i-1][0])+sec[i];
        dp[i][1]=max(dp[i-1][1]+2*sec[i-1],dp[i-1][0]-2*sec[i-1])-sec[i];
    }
    cout<<max(dp[n][0],dp[n][1])<<'\n';
}



Measured memory_bytes: 2560
#include<bits/stdc++.h>
#define rep(i,n) for(int (i) = 0;(i) < (n);(i)++)
#define SORT(c) sort((c).begin(),(c).end())
#define INF 1e9
//S.size()

using namespace std;

typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<char> VC;
typedef vector<bool> VB;

int main(void){
  int N; cin>>N;
  int num = 0;
  string n = to_string(N);
  for(int i = 0;i < n.size();i++){
    num += stoi(n.substr(i,1));
  }
  cout<<(N % num == 0?"Yes":"No");
}


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

bitset<1001001001> is_prime(0);
vector<int> prime_numbers;
void sieve_of_eratosthenes(int n=1e7) {
  for (int i = 2; i < n + 1; i++) {is_prime.set(i);}
  for (int i = 2; i < (int)sqrt(n) + 1; i++) {
    if (is_prime[i]) for (int j = i * 2; j < n + 1; j += i) is_prime.reset(j);
  }
  for (int i = 2; i < n + 1; i++) if (is_prime[i]) prime_numbers.push_back(i);
}

unordered_map<int, int> prime_factorize(int n) {
  unordered_map<int, int> res;
  int border = int(sqrt(n));
  for (int &p : prime_numbers) {
    if (p > border) break;
    if (n % p == 0) {
      res[p] = 1; n /= p;
      while (n % p == 0) {res[p]++; n /= p;}
    }
    if (n == 1) return res;
  }
  res[n] = 1; return res;
}

unordered_map<int, int> prime_factorize_factorial(int n) {
  unordered_map<int, int> res;
  for (int i = 2; i < n + 1; i++) {
    for (auto &pc : prime_factorize(i)) {
      if (res.find(pc.first) == res.end()) res[pc.first] = pc.second;
      else res[pc.first] += pc.second;
    }
  }
  return res;
}

int MOD = 1e9 + 7;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  sieve_of_eratosthenes(1e7);
  long long res = 1;
  for (auto &pc : prime_factorize_factorial(n)) {
    res *= pc.second + 1; res %= MOD;
  }
  cout << res << '\n';
  return 0;
}

Measured memory_bytes: 7280
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
#define FASTIO() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)

const int N = 100005, M = 1000000007, BIG = 0x3f3f3f3f;

int ct = 0;
ll x, y, a, b, c;
priority_queue<ll> Q[3];

bool Read() {
  cin >> x;
  if (cin.eof())
    return 0;
  cin >> y >> a >> b >> c;
  ll u;
  for (int i = 0; i < a; i++) {
    cin >> u;
    Q[0].push(u);
  }
  for (int i = 0; i < b; i++) {
    cin >> u;
    Q[1].push(u);
  }
  for (int i = 0; i < c; i++) {
    cin >> u;
    Q[2].push(u);
  }

  return 1;
}

void Process() {
  ll mx, ans = 0;
  int steps = x + y, sel;
  for (int i = 0; i < steps; i++) {
    mx = -1;
    vi cand;
    if (x && !Q[0].empty())
      cand.push_back(0);
    if (y && !Q[1].empty())
      cand.push_back(1);
    if (!Q[2].empty())
      cand.push_back(2);
    for (int x : cand) {
      if (Q[x].top() > mx) {
        mx = Q[x].top();
        sel = x;
      }
    }
    if (sel == 0)
      x--;
    else if (sel == 1)
      y--;
    ans += mx;
    Q[sel].pop();
  }
  cout << ans << "\n";
}

int main() {
  FASTIO();

  while (Read())
    Process();

  return 0;
}


Measured memory_bytes: 3316
#include<bits/stdc++.h>
using namespace std;
#define ll  long long
#define endl '\n'
#define FASTINOUT ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
const ll mod = 1000000007;
const double PI = 3.141592653589793238463;
const int N=1e2+9;
int main()
{
    FASTINOUT;
    int x,y;
    cin>>x>>y;
    if (x%3==0||y%3==0||(x+y)%3==0)
    cout<<"Possible\n";
    else
    cout<<"Impossible\n";
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, s, n) for (int i = s; i < (int)(n); i++)
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
ll mod = 998244353;
//---------------------------------------------------------------------------------------------------
ll f[301010], rf[301010];
ll inv(ll x)
{
    ll res = 1;
    ll k = mod - 2;
    ll y = x;
    while (k)
    {
        if (k & 1)
            res = (res * y) % mod;
        y = (y * y) % mod;
        k /= 2;
    }
    return res;
}
void init()
{
    f[0] = 1;
    rep(i, 1, 301010) f[i] = (f[i - 1] * i) % mod;
    rep(i, 0, 301010) rf[i] = inv(f[i]);
}
//---------------------------------------------------------------------------------------------------
ll C(int n, int k)
{
    ll a = f[n];      // = n!
    ll b = rf[n - k]; // = (n-k)!
    ll c = rf[k];     // = k!

    ll bc = (b * c) % mod;

    return (a * bc) % mod;
}

int main()
{
    init();
    ll n, a, b, k;
    cin >> n >> a >> b >> k;
    ll ans = 0;
    for (ll i = 0; i < n + 1; i++)
    {
        if (a * i > k)
            break;
        if ((k - a * i) % b == 0)
        {
            ll t = (k - a * i) / b;
            if (t > n)
                continue;
            ans += C(n, i) * C(n, t);
            ans %= mod;
        }
    }
    cout << ans % mod << endl;
}

Measured memory_bytes: 5120
#include<bits/stdc++.h>
using namespace std;
int main(){
	int n,count=0;
	float m,sum=0;
	cin>>n>>m;
	int a[n];
		for(int i=0;i<n;i++){
			cin>>a[i];
			sum+=a[i];
	}
	sum=sum/(4*m);
		for(int i=0;i<n;i++){
			if(a[i]>=sum){
			count++;
			}
		}
	if(count>=m) cout<<"Yes";
	else cout<<"No";
	return 0;
}

Measured memory_bytes: 256
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int[] a = new int[n];
    int minus = 0;
    int index = 0;
    int z = 100000;
    int sum = 0;
    int m1 = 0;
    ArrayList<Integer> listp = new ArrayList<Integer>();
    ArrayList<Integer> listm = new ArrayList<Integer>();
    int[] mm = new int[n];
    for(int i = 0; i < n; i++) {
      a[i] = sc.nextInt();
      sum += a[i];
      if(a[i] < 0) {
        minus++;
        m1 += a[i];
        listm.add(i);
        mm[i] = 1;
      } else {
        listp.add(i);
      }
      if(Math.abs(a[i]) < z) {
        index = i;
        z = Math.abs(a[i]);
      }
    }
    if(minus == 0) {
      System.out.println(sum - 2 * a[index]);
      if(n == 2) {
        System.out.println(a[1 - index] + " " + a[index]);
      } else {
        int t = a[index];
        int p = 0;
        for(int i = 0; i < n; i++) {
          if(i == index) {
            
          } else {
            if(p == n - 1) {
              
            } else if(p == n - 2) {
              System.out.println(a[i] + " " + t);
            } else {
              System.out.println(t + " " + a[i]);
              t -= a[i];
            }
            p++;
          }
        }
      }
    } else if(minus == n) {
      System.out.println(2 * a[index] - sum);
      int t = a[index];
      for(int i = 0; i < n; i++) {
        if(i == index) {
        } else {
          System.out.println(t + " " + a[i]);
          t -= a[i];
        }
      }
    } else {
      System.out.println(sum - 2 * m1);
      int t = a[listm.get(0)];
      for(int i = 0; i < listp.size(); i++) {
        if(i == listp.size() - 1) {
          System.out.println(a[listp.get(i)] + " " + t);
          t = a[listp.get(i)] - t;
        } else {
          System.out.println(t + " " + a[listp.get(i)]);
          t -= a[listp.get(i)];          
        }
      }
      for(int i = 1; i < listm.size(); i++) {
        System.out.println(t + " " + a[listm.get(i)]);
        t -= a[listm.get(i)];
      }
    }
  }
}

Measured memory_bytes: 77100
#include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>

using namespace std;

typedef long long ll;
// constexpr ll MOD = 998244353;
constexpr ll MOD = 1000000007;

// struct UnionFind {
//     vector<int> par;
    
//     UnionFind(int N): par(N) {
//         for (int i=0;i<N;i++) par[i] = i;
//     }

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

//     void unite(int x, int y) {
//         int rx = root(x);
//         int ry = root(y);
//         if (rx == ry) return;
//         par[rx] = ry;
//     }

//     bool same(int x, int y) {
//         int rx = root(x);
//         int ry = root(y);
//         return rx == ry;
//     }
// };

int main(void) {
    int N;
    vector<int> L(2010,1010);
    cin >> N;
    for (int i=0;i<N;i++) cin >> L[i];
    vector<ll> M(2001,0);
    for (int i=0;i<N;i++) M[L[i]]++;
    vector<ll> M2(M.begin(), M.end());
    for (int j=1;j<=2000;j++) M2[j] += M2[j-1];
    // for (int j=0;j<=2000;j++) cout << M2[j] << " ";
    // cout << endl;
    sort(L.begin(), L.end());

    ll res = 0;
    for (int i=0;i<N;i++) for (int j=i+1;j<N;j++) {
        int s, t;
        if (L[i] < L[j]) {
            s = L[j]-L[i]+1, t = L[j]+L[i]-1;
        } else {
            s = L[i]-L[j]+1, t = L[j]+L[i]-1;
        }
        res += M2[t]-M2[s-1];
        if (L[i]>=s && L[i]<=t) res--;
        if (L[j]>=s && L[j]<=t) res--;
        // cout << i << "," << j << "," << s << "," << t << "," << res1 << "," << res2 << endl;
    }
    // cout << res1/3 << "," << res2/3 << endl;
    cout << res/3 << endl;

    return 0;
}


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

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 1e9 + 7;
#define REP(i,n) for(int i=0;i<(int)n;++i)

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

template < typename T >
void vprint(T &v){
	REP(i, v.size()){
		cout << v[i] << " ";
	}
	cout << endl;
}

int main(){
	string A, B, C;
	cin >> A >> B >> C;
	cout << (A[A.size()-1]==B[0]&&B[B.size()-1]==C[0]?"YES":"NO") << endl;
    return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
#include <math.h>
#define N_MAX 104729 /*10000ÔÚÌf*/

int main(void){
	char a[N_MAX+1]; int i, j, sum;
	
	/* eratosthenes */
	a[0]=0, a[1]=0;
	for(i=2; i<=N_MAX; i++) a[i]=1;
	
	for(i=2; i<=(int)sqrt(N_MAX); i++)
		if(a[i])
			for(j=2*i; j<=N_MAX; j+=i) a[j]=0;
	
	while(~scanf("%d",&i), i!=0){
		j=0, sum=0;
		
		while(i>0){
			while(a[j]==0) j++;
			sum+=j, i--;
			
			j++;
		}
		
		printf("%d\n",sum);
	}
	
	return 0;
}

Measured memory_bytes: 0
#include<iostream>
#include<cmath>
#include<map>
#include<deque>
#include<string>
#include<algorithm>
#include<bitset>
typedef long long ll;

#define all(x) (x).begin(),(x).end()
#define puts(x) cout<< x << endl;
#define rep(i,m,n) for(ll i=m;i<n;i++)
#define fore(i,a) for(auto i:a)
const ll MOD= 1000000007;
using namespace std;
ll n;
ll a[300005];
int main(){
    cin>>n;
    rep(i,0,n){
        cin>>a[i];
    }
    ll ans=0;
    rep(t,0,61){//すべてのけたについて考える
        ll zero=0,one=0;
        rep(i,0,n){
            if(a[i]>>t&1){
                one+=1;
            }else{
                zero+=1;
            }
            
        }
        ll c=(one*zero)%MOD;
        ans+=((ll(pow(2,t))%MOD)*c)%MOD;
        ans=ans%MOD;
    }
    puts(ans);
}


Measured memory_bytes: 2560
#include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <string>
using namespace std;
typedef long long int ll;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)

int main(){
  string s;
  cin >> s;
    if(s=="AAA" || s=="BBB"){
      cout << "No" << endl;
      return 0;
    }else{
      cout << "Yes" << endl;
      return 0;
    }
  
  return 0;
}



Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <algorithm>
#include <utility>
#include <iomanip>
#include <functional>
#include <queue>
#include <stack>
#include <map>
#include <vector>
#include <cmath>
#include <cctype>
#define ll long long
#define INF 1e+7
#define MOD 1000000007
using namespace std;


int main(){
    int N;
    cin >> N;
    
    int x[N],y[N],h[N];
    for(int i=0; i<N; i++){
        cin >> x[i] >> y[i] >> h[i];
    }
    
    int px,py,ph;
    for(int i=0; i<N; i++){
        if(h[i]>0){
            px=x[i],py=y[i],ph=h[i];
            break;
        }
    }
    
    for(int cx=0; cx<=100; cx++){
        for(int cy=0; cy<=100; cy++){
            int correct=1;
            int H=ph+abs(cx-px)+abs(cy-py);
            
            for(int i=0; i<N; i++){
                if(h[i]!=max(0,H-abs(x[i]-cx)-abs(y[i]-cy))){
                    correct=0;
                    break;
                }
            }
            
            if(correct){
                cout<<cx<<" "<<cy<<" "<<H<<endl;
                return 0;
            }
        }
    }
    

    return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(void)
{
	int a,b;
	int S,L;
	
	scanf("%d %d", &a, &b);
	
	S = a * b;
	L = 2 * (a + b);
	
	printf("%d %d\n", S, L);
	
	return 0;
}

Measured memory_bytes: 596
#include <iostream>

using namespace std;


inline long Aabs(long a)
{
	return (a>0) ? a: -a;
}

void solve()
{
	long N, minuses=0; cin >> N;
	long *A = new long[N];
	long long ans = 0;
	long absmin = 0;


	cin >> A[0];
	if(A[0]<0)
		minuses++;
	ans += Aabs(A[0]);
	absmin = Aabs(A[0]);

	for(long i=1; i<N; i++){
		cin >> A[i];
		if(A[i]<0)
			minuses++;
		ans += Aabs(A[i]);
		if(absmin > Aabs(A[i]))
			absmin = Aabs(A[i]);
	}

	if(minuses%2)
		ans += (-2)*absmin;
	
	cout << ans;
	return ;
}

int main()
{
	solve();

	return 0;
}

Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
 
#define pb 		push_back
#define mp 		make_pair
#define prior   priority_queue
#define MOD 	1000000007
#define INF 	(long long int)9e18
#define EPS 	1e-9
#define PI 		3.1415926535897932384626433832795 
#define ll      long long int
#define ld		long double
#define ret     return
#define NUM 	1000001
const int SIZE = 2e5+4;
void fastio(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
}

void input(){
	#ifndef ONLINE_JUDGE
		freopen("input.txt","r",stdin);
		freopen("output.txt","w",stdout);
	#endif
}


int main(){
	fastio();
	input();
	
	ll n,a,b;
	cin>>a>>b>>n;
	ll x = min((b-1),n);
	cout<<floor((a*x)/(double)b)-a*floor(x/(double)b)<<endl;
	return 0;
}



Measured memory_bytes: 3772
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define printVec(v) printf("{"); for (const auto& i : v) { std::cout << i << ", "; } printf("}\n");
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using namespace std;
using P = pair<int,int>;
using ll = long long;
const ll INF = 1LL<<60;
const double PI = 3.1415926535897932;
const int MOD = 1e9 + 7;

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

  int cnt, ans;
  ans = 0;
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 0) continue;
    cnt = 0;
    for (int j = 1; j <= i; j++) {
      if (i % j == 0) cnt++;
    }
    if (cnt == 8) ans++;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 3544
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a,b = f()
    c = [a,b, a-1, b-1]
    c.sort()
    print(c[3]+c[2])


solve()


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


vector<vector<ll>> W1(2005, vector<ll> (2005,0));
vector<vector<ll>> B1(2005, vector<ll> (2005,0));

vector<vector<ll>> WT(2005, vector<ll> (2005,0));
vector<vector<ll>> BT(2005, vector<ll> (2005,0));
vector<vector<ll>> WC(2005, vector<ll> (2005,0));
vector<vector<ll>> BC(2005, vector<ll> (2005,0));

ll areaW(ll x1,ll x2,ll y1,ll y2){
  if (x1>x2 or x2<0)return ll(0);
  if (y1>y2 or y2<0)return ll(0);

  ll a1=0,a2=0,a3=0,a4=0;
  a1=WC[x2][y2];
  if (y1>=1)a2=WC[x2][y1-1];
  if (x1>=1)a3=WC[x1-1][y2];
  if (x1>=1 and y1>=1)a4=WC[x1-1][y1-1];
  ll ans=a1-a2-a3+a4;
  return ans;

}

ll areaB(ll x1,ll x2,ll y1,ll y2){
  if (x1>x2 or x2<0)return ll(0);
  if (y1>y2 or y2<0)return ll(0);

  ll a1,a2,a3,a4;
   a1=0,a2=0,a3=0,a4=0;
  a1=BC[x2][y2];
  if (y1>=1)a2=BC[x2][y1-1];
  if (x1>=1)a3=BC[x1-1][y2];
  if (x1>=1 and y1>=1)a4=BC[x1-1][y1-1];
  ll ans=a1-a2-a3+a4;
  return ans;
}


int main() {
  ll n,k;
  cin>>n>>k;


  rep(i,n){
    ll x1,y1;
    char c1;
    cin>>x1>>y1>>c1;
    x1%=2*k;
    y1%=2*k;

    if (c1=='W'){
      W1[x1][y1]++;
    }
    if (c1=='B'){
      B1[x1][y1]++;
    }
  }

  rep(i,2*k)rep(j,2*k){
    if(j>0)WT[i][j]+=WT[i][j-1];
    WT[i][j]+=W1[i][j];
  //  cout<<WT[i][j]<<'i'<<i<<'j'<<j<<endl;

  }

  rep(j,2*k)rep(i,2*k){
    if(i>0)WC[i][j]+=WC[i-1][j];
    WC[i][j]+=WT[i][j];
  //  cout<<WC[i][j]<<'i'<<i<<'j'<<j<<endl;
  }

  rep(i,2*k)rep(j,2*k){
    if(j>0)BT[i][j]+=BT[i][j-1];
    BT[i][j]+=B1[i][j];
  //  cout<<BT[i][j]<<'i'<<i<<'j'<<j<<endl;

  }
  rep(j,2*k)rep(i,2*k){
    if(i>0)BC[i][j]+=BC[i-1][j];
    BC[i][j]+=BT[i][j];
   //cout<<BC[i][j]<<'i'<<i<<'j'<<j<<endl;
  }

  ll cnt=0;

  //全ての点についてtry
  rep(i,k)rep(j,k){
    ll a1=areaB(0,i-1,0,j-1);
    ll a2=areaB(i+k,2*k-1,0,j-1);
    ll a3=areaB(i,i+k-1,j,j+k-1);
    ll a4=areaB(0,i-1,j+k,2*k-1);
    ll a5=areaB(i+k,2*k-1,j+k,2*k-1);
    ll temp=a1+a2+a3+a4+a5;
//    cout<<a1<<' '<<a2<<' '<<a3<<' '<<a4<<' '<<a5<<' '<<endl;

//    cout<<temp<<endl;

    ll b1=areaW(i,i+k-1,0,j-1);
    ll b2=areaW(0,i-1,j,j+k-1);
    ll b3=areaW(i+k,2*k-1,j,j+k-1);
    ll b4=areaW(i,i+k-1,j+k,2*k-1);
//    cout<<b1<<' '<<b2<<' '<<b3<<' '<<b4<<' '<<endl;

    temp=a1+a2+a3+a4+a5+b1+b2+b3+b4;
  //  cout<<temp<<'i'<<i<<'j'<<j<<endl;
    cnt=max(temp,cnt);

  }


  rep(i,k)rep(j,k){
    ll a1=areaW(0,i-1,0,j-1);
    ll a2=areaW(i+k,2*k-1,0,j-1);
    ll a3=areaW(i,i+k-1,j,j+k-1);
    ll a4=areaW(0,i-1,j+k,2*k-1);
    ll a5=areaW(i+k,2*k-1,j+k,2*k-1);
    ll temp=a1+a2+a3+a4+a5;
  //  cout<<a1<<' '<<a2<<' '<<a3<<' '<<a4<<' '<<a5<<' '<<endl;

  //  cout<<temp<<endl;

    ll b1=areaB(i,i+k-1,0,j-1);
    ll b2=areaB(0,i-1,j,j+k-1);
    ll b3=areaB(i+k,2*k-1,j,j+k-1);
    ll b4=areaB(i,i+k-1,j+k,2*k-1);
  //  cout<<b1<<' '<<b2<<' '<<b3<<' '<<b4<<' '<<endl;

    temp=a1+a2+a3+a4+a5+b1+b2+b3+b4;
    //cout<<temp<<'i'<<i<<'j'<<j<<endl;
    cnt=max(temp,cnt);

  }

cout<<cnt;


}


Measured memory_bytes: 189056
#include <bits/stdc++.h>
 
using namespace std;
 
template <typename A, typename B>
string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const string& s) {
    return '"' + s + '"';
}
string to_string(const char* s) {
    return to_string((string) s);
}
string to_string(bool b) {
    return (b ? "true" : "false");
}
string to_string(vector<bool> v) {
    bool first = true;
    string res = "{";
    for (int i = 0; i < static_cast<int>(v.size()); i++) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(v[i]);
    }
    res += "}";
    return res;
}
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) + ")";
}
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
    cerr << " " << to_string(H);
    debug_out(T...);
}
template<typename T>
void read(T& val){
    cin >> val;
}
template<typename T>
void read(vector<T>& a){
    for(int i = 0; i < (int)a.size(); ++i){
      read(a[i]);
    }
}
template<typename Head, typename... Tail>
void read(Head& H, Tail&... T){
    read(H);
    read(T...);
}
#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif
#define vec vector
#define i64 long long
#define endl '\n'
#define sz(x) (x).size()
#define times(n) for(int i = 0; i < (n); ++i)
#define bits(x) __builtin_popcount(x)
 
int test_case_number = 1;

void print_case(){
    #ifdef LOCAL
    cout << "Case #" << test_case_number++ << ": ";
    #endif
}

void solve(){
    string s;
    cin >> s;
    int c = 0;
    for(char ch : s){
        c += ch - '0';
    }
    if(c % 9 == 0)
        cout << "Yes" << endl;
    else 
        cout << "No" << endl;
}
 
int main(){
    solve();
}

Measured memory_bytes: 3696
import java.util.*;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i=0;i<n;i++)a[i]=sc.nextInt();
        int[] b = a.clone();
        Arrays.sort(b);
        for (int i=0;i<n;i++){
            if (a[i]==b[n-1])System.out.println(b[n-2]);
            else System.out.println(b[n-1]);
        }
    }
}


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


int main(void){
    // Your code here!
    int ans = 0;
    string s;
    cin >> s;
    //cout <<s;
    char c = 'n';
    int f_i = -1;
    for(int i=0;i <s.size();i++){
    if(c == '1' && s[i] == '0'){
            ans +=2;
            c = 'n';
            //cout << s << "  " << f_i << i << endl;
            s.erase(i,1);
            s.erase(f_i,1);
            i = max(f_i-2,-1);
            f_i = -1;

        }else if(c == '0' && s[i] == '1'){
            ans +=2;
            c = 'n';
            //cout << s << "  " << f_i << endl;
            s.erase(i,1);
            s.erase(f_i,1);
            i = max(f_i-2,-1);
            f_i = -1;
        }else{
            c = s[i];
            f_i = i;
        }
    }
    cout << ans << endl;
return 0;
}


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

#define ran 101101

int n;
int a[ran];

int main() {
	scanf("%d", &n);
	for(int i=1;i<=n;i++) scanf("%d", &a[i]);
	sort(a+1, a+n+1);
	
	printf("%d\n", a[n/2+1] - a[n/2]);
	
	return 0;
}

Measured memory_bytes: 640
#include <bits/stdc++.h> //C++の標準ライブラリを一行で一括でインクルードする
#include <math.h> //数学関数と数学定数を利用する
#define rep(i,n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
template<class T> void chmax(T &a,T b) { if (a<b) a=b;}
template<class T> void chmin(T &a,T b) { if (a>b) a=b;}
int gcd(int a, int b){//ユークリッドの互除法
  if (a < b) gcd(b,a); //aの方がbよりでかいのが前提
  if (b == 0) return a; //aをbで割り切れたらreturn
  else gcd(b, a % b);
}

const ll INF = 1LL << 60;

int main(){
  string s; cin >> s;
  int year = stoi(s.substr(0,4));
  int month = stoi(s.substr(5,2));
  int day = stoi(s.substr(8,2));
  
  if(year >= 2019 && month > 4){
    cout << "TBD" << endl;
  }else cout << "Heisei" << endl;
  
  return 0;
}

Measured memory_bytes: 256
use std::str::FromStr;
use std::fmt::Debug;
use std::cmp;

#[allow(dead_code)]
fn read_as_vec<T>() -> Vec<T>
where T: FromStr, <T as FromStr>::Err : Debug{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().split_whitespace().map(|c| T::from_str(c).unwrap()).collect()

}

#[allow(dead_code)]
fn read_as_string() -> String{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().to_string()
}

fn main(){
    let line: Vec<usize> = read_as_vec();
    let (n, k) = (line[0], line[1]);

    let mut counter: Vec<u64> = vec![0;n+1];
    let a: Vec<usize> = read_as_vec();

    for elem in a{
        counter[elem] += 1;
    }
    counter.sort();

    let num0 = counter.iter().filter(|x| **x == 0).count();

    println!("{}", counter.into_iter().take(n+1-k).sum::<u64>());
}


Measured memory_bytes: 12540
package main

import "fmt"

func main() {
	var a int
	fmt.Scan(&a)
	b := a % 10
	if b == 3 {
		fmt.Print("bon")
	} else if b == 0 || b == 1 || b == 6 || b == 8 {
		fmt.Print("pon")
	} else {
		fmt.Print("hon")
	}
}


Measured memory_bytes: 1752
#!/usr/bin/python
# -*- coding: UTF-8 -*-

import sys


def get_ints():
    return map(int, sys.stdin.readline().strip().split())


def std_in():
    return sys.stdin.readline().strip()


def main():
    k = int(std_in())
    if k % 2 == 0:
        print(-1)
    elif k % 5 == 0:
        print(-1)
    else:
        i=0
        kk = k
        while 1:
            ks = str(kk)
            if ks.count("7") == len(ks):
                break
            one = kk % 10
            if one == 7:
                kk = kk // 10
                i += 1
            else:
                kk += k
        print(i + len(ks))


if __name__ == "__main__":
    main()


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

int main() {
  long long n, a, b;
  cin >> n >> a >> b;

  if (a > b) {
    cout << 0 << endl;
    return 0;
  }

  if (n==1) {
    if (a == b) {
      cout << 1 << endl;
    } else {
      cout << 0 << endl;
    }
    return 0;
  }

  cout << (b-a)*(n-2)+1 << endl;
  return 0;
}


Measured memory_bytes: 256
#include<iostream>
using namespace std;
int main()
{
	int n,x,ma=0,mi=1000000005;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		scanf("%d",&x);
		ma=max(ma,x);
		mi=min(mi,x);
	}
	cout<<ma-mi;
 } 

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long long
#define rep(X,N) for(ll X = 0; X < (N); X++)
#define PI (acos(-1.0))
#define pback push_back
#define mpair make_pair
#define divceil(A, B) ((A + (B - 1)) / B)
#define MODN 1000000007
#define ALL(V) (V).begin(),(V).end()
#define CERR if(false) cerr

using namespace std;

int main(){

    int n;
    cin >> n;

    string s;
    cin >> s;

    int ans = 1;

    for(int i = 1; i < n; i++){
        if(s[i] != s[i - 1]) ans++;
    }

    cout << ans << endl;

}


Measured memory_bytes: 512
#include <bits/stdc++.h>
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define fore(i, l, r) for (int i = (int)(l); i <= (int)(r); ++i)
#define ford(i, n) for (int i = (int)(n) - 1; i >= 0; --i)
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;

int main(){
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    string s;
    int m, h;

    while(true){
        cin >> s;
        if(s == "-") break;
        cin >> m;
        forn(i, m){
            cin >> h;
            s = s.substr(h) + s.substr(0, h);
        }
        cout << s << endl;
    }
}


Measured memory_bytes: 3236
#include<bits/stdc++.h>
#define vll vector<ll>
#define vi vector<int>
#define vpll vector<pair<ll,ll>>
#define pii pair<int,int>
#define REP(i,a) for(int (i)=0; (i)<(a); (i)++)
#define RREP(i,a) for(int (i)=a-1; (i)>=(0); (i)--)
#define REP2(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define MOD 1000000007
#define ALL(v) v.begin(), v.end()
#define m0(x) memset(x,0,sizeof(x))
typedef long long ll;

using namespace std;

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string S;
  cin >> S;
   if(S[0] == S[1] && S[1] == S[2]) cout << "No";
   else cout << "Yes";

  return 0;
}

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

int main(){
    int n;
    cin >> n;
    int ac = 0, wa = 0, tle = 0, re = 0;
    for (int i = 0; i < n; i++){
        string s;
        cin >> s;
        if (s ==  "AC"){
            ac++;
        } else if (s == "WA"){
            wa++;
        } else if (s == "TLE"){
            tle++;
        } else{
            re++;
        }
    }

        cout << "AC x " << ac << "\n";
        cout << "WA x " << wa << "\n";
        cout << "TLE x " << tle << "\n";
        cout << "RE x " << re << "\n";
}


Measured memory_bytes: 3628
package main

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

// input scanner
var sc = bufio.NewScanner(os.Stdin)

const (
	initialBufSize = 10e4
	maxBufSize     = 10e6
)

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	a, _ := strconv.Atoi(next())
	return a
}

func nextInt64() int64 {
	a, _ := strconv.ParseInt(next(), 10, 64)
	return a
}

func nextFloat64() float64 {
	a, _ := strconv.ParseFloat(next(), 64)
	return a
}

func nextInts(n int) []int {
	ret := make([]int, n)
	for i := 0; i < n; i++ {
		ret[i] = nextInt()
	}
	return ret
}
func nextFloats(n int) []float64 {
	ret := make([]float64, n)
	for i := 0; i < n; i++ {
		ret[i] = nextFloat64()
	}
	return ret
}
func nextStrings(n int) []string {
	ret := make([]string, n)
	for i := 0; i < n; i++ {
		ret[i] = next()
	}
	return ret
}

// util
func max(l []int) (int, int) {
	idx := 0
	ans := l[idx]
	for i, n := range l {
		if n > ans {
			idx = i
			ans = n
		}
	}
	return idx, ans
}

func min(l []int) (int, int) {
	idx := 0
	ans := l[idx]
	for i, n := range l {
		if n < ans {
			idx = i
			ans = n
		}
	}
	return idx, ans
}

// main
func main() {
	buf := make([]byte, initialBufSize)
	sc.Buffer(buf, maxBufSize)
	sc.Split(bufio.ScanWords)
	k := nextInt()
	q := make([]int64, 0, k)
	for i := 1; i < 10; i++ {
		q = append(q, int64(i))
	}
	for i := 0; i < k-1; i++ {
		x := q[0]
		y := x % 10
		q = q[1:]
		if y != 0 {
			q = append(q, 10*x+(y-1))
		}
		q = append(q, 10*x+y)
		if y != 9 {
			q = append(q, 10*x+y+1)
		}
	}
	fmt.Println(q[0])
}


Measured memory_bytes: 7040
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

s = input()
len_s = len(s)
cnt = [0] * 26
al = [chr(ord('a') + i) for i in range(26)]
ans = [''] * (len_s + 1)
ans[0] = s
for i in range(26):
    check = list(s)
    if al[i] in check:
        ans[0] = s
        while any([al[i] != a for a in check]):
            cnt[i] += 1
            for j in range(len_s - cnt[i]):
                if ans[cnt[i] - 1][j + 1] == al[i]:
                    ans[cnt[i]] += al[i]
                else:
                    ans[cnt[i]] += ans[cnt[i] - 1][j]
            check = list(ans[cnt[i]])
            ans[cnt[i] - 1] = ''
if all(cnt[i] == 0 for i in range(26)):
    print(0)
else:
    cnt = sorted(set(cnt))
    if cnt[0] == 0:
        print(cnt[1])
    else:
        print(cnt[0])


Measured memory_bytes: 3064
// ------------------------------------
// Date:2018/ 3/17
// Problem:a september 9 b.cpp
//
// ------------------------------------

#include <bits/stdc++.h>

using namespace std;

#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
#define RFOR(i,a,b) for(int i=(int)b-1;i>=(int)a;--i)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define debug(x) cerr << #x << ":" << x << endl

typedef long long ll;

void CINT(){}
template <class Head,class... Tail>
void CINT(Head&& head,Tail&&... tail) {
  cin >> head; CINT(move(tail)...);
}
#define CIN(...) int __VA_ARGS__;CINT(__VA_ARGS__)
#define LCIN(...) ll __VA_ARGS__;CINT(__VA_ARGS__)
#define SCIN(...) string __VA_ARGS__;CINT(__VA_ARGS__)

static const int MOD = 1e9 + 7;
static const int MAX_N = 1;

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

  SCIN(s);
  bool ok = false;
  REP(i, s.size()) {
    if (s[i] == '9') ok = true;
  }

  cout << (ok ? "Yes" : "No") << endl;

  return 0;
}



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

ans = 0

if sum(a) >= sum(b):
    diff = [a[i]-b[i] for i in range(n)]
    diff.sort()
    shortage = 0
    for i in diff:
        if i < 0:
            ans += 1
            shortage += (-i)
        else:
            break
    idx = n-1
    while shortage > 0:
        shortage -= diff[idx]
        idx -= 1
        ans += 1
else:
    ans = -1
print(ans)

Measured memory_bytes: 18396
from functools import reduce
INF = 10 ** 7
N, M = map(int, input().split())
L = 1 << N
keys = [0] * M
for m in range(M):
    cost, _ = map(int, input().split())
    match = reduce(lambda a, b: a | b, (1 << shamt for shamt in map(lambda n: int(n) - 1, input().split())))
    keys[m] = cost, match
table = [[INF] * L for _ in range(M + 1)]
table[0][0] = 0
for m in range(M):
    cost, match = keys[m]
    for l in range(L):
        now = table[m][l]
        if l and not now:
            continue
        table[m + 1][l] = min(now, table[m + 1][l])
        table[m + 1][l | match] = min(now + cost, table[m + 1][l | match])
print(table[M][L - 1] if table[M][L - 1] != INF else -1)

Measured memory_bytes: 79320
#pragma GCC optimize("O3")
#pragma GCC target("sse4")

#include <bits/stdc++.h>
 
typedef long long ll;
 
using namespace std;
 
 int main() {
  ll A, B;
  cin >> A >> B;
  
  A--;
  ll a = 0;
  switch(A % 4) {
      case 0: 
      	a = A;  
      	break;   
      case 1:
      	a = 1; 
      	break;    
      case 2: 
      	a = A + 1;  
      	break;
      case 3: 
      	a = 0; 
      	break;
  }
  ll b = 0;
  ll ans = 1 ^ 2 ^ 3 ^ 4;
  switch(B % 4) {
      case 0: b = B; break; 
      case 1: b = 1; break;
      case 2: b = B + 1;   break;
      case 3: b = 0;  break;
  }
  cout << (b ^ a) << endl;
  return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <cmath>
#include <algorithm>
#include <bitset>
#include <iomanip>
#include <cstdio>
#include <new>
#include <vector>
#include <cstdlib>

using namespace std;

int main() {
	string S, T;
	cin >> S;
	cin >> T;

	int size = S.length();
	
	bool Flag = true;

	for (int i = 0; i < size; ++i) {
		if (S[i] != T[i]) {
			Flag = false;
		}
	}

	int size_T = T.length();
	size++;

	if (size_T != size) {
		Flag = false;
	}

	if (Flag) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}

	return 0;
}

Measured memory_bytes: 3628
#include<cstdio>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
int main(){
    int a;
    string s;
    cin>>a>>s;
    if(3200<=a)cout<<s<<endl;
    else cout<<"red"<<endl;
    return 0;
}


Measured memory_bytes: 256
n,k = map(int,input().split())
d = list(map(int,input().split()))
for i in range(100001):
  nn = n+i
  cnt = 0
  for j in d:
    if str(j) in str(nn):
      break
    else:
      cnt += 1
  if cnt == len(d):
    print(nn)
    break

Measured memory_bytes: 3060
# coding: utf-8
# Your code here!




def insert_str(target, i, char):
    return target[:i] + char + target[i:]

def calc(target, i):
    global ans
    if i >= len(target):
        ans += eval(target)
        return
    calc(target, i+1)
    calc(insert_str(target, i, "+"), i+2)
        
S = input()
N = len(S)
ans = 0
calc(S, 1)


print(ans)






Measured memory_bytes: 9124
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template<class T> using vc = vector<T>;
template<class T> using vvc = vector<vector<T>>;

#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define repr(i, n) for (ll i = (n)-1; i >= 0; i--)
#define repe(i, l, r) for (ll i = (l); i < (r); i++)
#define reper(i, l, r) for (ll i = (r)-1; i >= (l); i--)
#define repa(i,n) for (auto& i: n)

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 (b<a) { a=b; return 1; } return 0; }
void init() {cin.tie(0);ios::sync_with_stdio(false);cout << fixed << setprecision(15);}

#ifdef DEBUG
template <class T, class N> void verr(const T& a, const N& n) { rep(i, n) cerr << a[i] << " "; cerr << "\n" << flush; }
ll dbgt = 1; void err() { cerr << "passed " << dbgt++ << "\n" << flush; }
template<class H, class... T> void err(H&& h,T&&... t){ cerr<< h << (sizeof...(t)?" ":"\n") << flush; if(sizeof...(t)>0) err(forward<T>(t)...); }
#endif

const ll INF = 5e18;
const ld EPS = 1e-11;
const ld PI = acos(-1.0L);
const ll MOD = 1e9 + 7;
// const ll MOD = 998244353;
//--------------------------------------------------------------------------------//
ll A[100000], dp[100005];
int main() {
    init();
    ll N;
    cin >> N;
    rep(i, N) cin >> A[i];

    fill(dp + 1, dp + N + 1, INF);
    dp[0] = -1;

    rep(i,N){
        ll di = lower_bound(dp, dp + N, A[i]) - dp;
        chmin(dp[di], A[i]);
    }

    cout << lower_bound(dp, dp + N + 1, INF) - dp - 1 << endl;
}


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

int main(){
    int N;
    long long a,b,minB=1000000000,sum=0;
    cin >> N;
    for(int i=0; i<N; i++){
        cin >> a >> b;
        sum+=a;
        if(a>b && minB>b)
        minB=b;
    }
    if(minB==1000000000)
    cout << 0 << endl;
    else
    cout << sum-minB << endl;
    return 0;
}

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

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

typedef long long ll;

const int INF = 1 << 30;
const ll LLINF = 1LL << 60;

int mod = 1000000007;

int main(void){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll ans = 0;
    int N; cin >> N;
    ll A[N],B[N],C[N];
    rep(i, N) cin >> A[i]; sort(A, A+N);
    rep(i, N) cin >> B[i]; sort(B, B+N);
    rep(i, N) cin >> C[i]; sort(C, C+N);
    rep(i, N){
        //cout << i << ":" << endl;
        ll acc = 1;
        ll key = B[i];
        //keyより小さいAの要素はいくつ?
        int ok = -1, ng = N;
        int m = (ok+ng)/2;
        while(abs(ok-ng) > 1){
            if(A[m] < key) ok = m;
            else ng = m;
            m = (ok+ng)/2;
        }
        //cout << ok << endl;
        acc *= ok+1;

        //keyより大きいCの要素はいくつ?
        //N-(key以下のCの要素の数)と等しい
        ok = -1; ng = N;
        m = (ok+ng)/2;
        while(abs(ok-ng) > 1){
            if(C[m] <= key) ok = m;
            else ng = m;
            m = (ok+ng)/2;
        }
        acc *= N-(ok+1);
        ans += acc;
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 2560
#include <iostream>
#include <numeric>
#include <math.h>
#include <algorithm>
#include <float.h>
#include <limits>
#include <vector> 
#include <string.h>
#include <iomanip>

#define rep(i,a,n) for(ll int (i) = (a);(i) < (n);(i)++)
#define urep(i,a,n) for(ll int (i) = (a);(i) > (n);(i)--)
#define MOD 1000000007
#define INF 2147483647
#define ll long long
#define asort(a) sort(a.begin(),a.end());//昇順ソート
#define usort(a) sort(a.rbegin(),a.rend());//降順ソート

using namespace::std;

int jo(ll int a, ll int b){//累乗
    ll int num=1;
    rep(i,0,b) num=num*a;
    return num;
}
char tobig(char s){//char大文字化
  return (s-0x20);
}
char tolow(char s){//char小文字化
  return (s+0x20);
}
int ctoi(char a){//char->int
  if('0'<=a&&a<='9') return (a-'0');
  return -1;
}

int gcd(ll int a,ll int b) {//最大公約数
  if(a<b) return gcd(b,a);
  int c;
  while ((c=a%b)) {
    a=b;
    b=c;
  }
  return b;
}
int lcm(ll int a,ll int b){//最小公倍数
 return (a*b)/gcd(a,b);
}


int main(){
  int N;
  cin>>N;
  cout<<(N-2)*180;
}




// vector<vector<int>> 変数名(左の個数, vector<int>(右の個数));

//cout<<fixed<<setprecision(n);  //小数点n桁まで表示

//  vector<pair<int,int>> data(N);  //2つのデータを格納、.first/.secondで参照
// pairのソートはfirst優先の昇順


Measured memory_bytes: 256
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[] count = new int[M];
		int ans = 0;

		for(int i=0; i<N; i++){
			int K = sc.nextInt();
			for(int j=0; j<K; j++){
				int A = sc.nextInt();
				count[A-1]++;
			}
		}
		

		for(int i=0; i<M; i++){
			if(count[i]==N){
				ans++;
			}
		}
		System.out.println(ans);
	}
}


Measured memory_bytes: 24404
N = int(input())
p = list(map(int , input().split()))

correct = []

for i in range (1 , N+1):
    correct.append(i)

difference = 0

for j in range(N):
    if p[j] != correct[j]:
        difference += 1

if difference == 2 or difference == 0:
    print("YES")
else:
    print("NO")

Measured memory_bytes: 3064
#include <stdio.h>

int main()
{
	long long X, Y;
	scanf("%lld %lld", &X, &Y);
	if (X == Y - 1 || X == Y || X == Y + 1) printf("Brown\n");
	else printf("Alice\n");
	fflush(stdout);
	return 0;
}

Measured memory_bytes: 1660
#include <bits/stdc++.h>
#include <algorithm>
#include <string>
using namespace std;
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    long long a, b, x;
    long long count_a = 0, count_b = 0;
    cin >> a >> b >> x;
    if (a != 0) {
        count_a = (a - 1) / x;
    } else {
        count_a = 1;
    }
    count_b = b / x;
    if (a == 0) {
        cout << count_b + count_a << endl;
    } else {
        cout << (count_b - count_a) << endl;
    }
    return 0;
}

Measured memory_bytes: 256
#include<algorithm>     //sort,二分探索,など
#include<bitset>        //固定長bit集合
#include<cmath>         //pow,logなど
#include<complex>       //複素数
#include<deque>         //両端アクセスのキュー
#include<fstream>       //ファイルストリーム（標準入力変更用）
#include<functional>    //sortのgreater
#include<iomanip>       //setprecision(浮動小数点の出力の誤差)
#include<iostream>      //入出力
#include<iterator>      //集合演算(積集合,和集合,差集合など)
#include<map>           //map(辞書)
#include<numeric>       //iota(整数列の生成),gcdとlcm(c++17)
#include<queue>         //キュー
#include<set>           //集合
#include<stack>         //スタック
#include<string>        //文字列
#include<unordered_map> //イテレータあるけど順序保持しないmap
#include<unordered_set> //イテレータあるけど順序保持しないset
#include<utility>       //pair
#include<vector>        //可変長配列

//名前
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef map<string, int> msi;
typedef map<string, ll> msll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pllll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vector<int>> vvi;
typedef vector<vector<ll>> vvll;
typedef vector<vector<string>> vvs;
typedef vector<vector<bool>> vvb;

//定数
const ll MOD = 1000000007;
const ll INF = 1000000000000000000;

//マクロ
#define rep(i,n) for(int i=0;i<n;i++)
#define reps(i,s,e) for(int i=s;i<e;i++)
#define repse(i,s,e) for(int i=s;i<=e;i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define in(x1) cin >> x1
#define in2(x1, x2) cin >> x1 >> x2
#define in3(x1, x2, x3) cin >> x1 >> x2 >> x3
#define outl(x) cout << x << endl
#define out2l(x, y) cout << x << " " << y << endl 

//よく使う関数
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

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

    //標準入力をファイルに変更
    //std::ifstream in("input.txt");
    //std::cin.rdbuf(in.rdbuf());
    ll X, K, D;
    in3(X, K, D);

    X = abs(X);

    ll L = X / D;

    if (L >= K)
    {
        X -= K * D;
    }
    else
    {
        X -= L * D;
        K -= L;

        if (K % 2 == 1) X = abs(X - D);
    }

    outl(X);

    return 0;
}

Measured memory_bytes: 3648