akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <vector>
#include <cmath>
typedef long long ll;
using namespace std;

int main(void) {
    ll N,K,Q; cin>>N>>K>>Q;
    ll ary[Q];
    ll ppl[N];
    
    for (int i = 0; i < Q; i++) cin >> ary[i];
    ll tmp = K-Q;

    for(int j = 0; j < N; j++) ppl[j] = tmp;

    for (int i = 0; i < Q; i++){
        ppl[ary[i] - 1]++;
    }
    for (int j = 0; j < N; j++){
        if (ppl[j] > 0)
            cout << "Yes" << endl;
        else
            cout << "No" << endl;
    }
    
    return 0;
}

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

#define rep(i, n) for (int i = 0; i < n; ++i)
#define ALL(a) (a).begin(), (a).end()
#define rALL(a) (a).rbegin(), (a).rend()
#define SZ(x) ((int)(x).size())
using ll = long long;
using P = pair<ll, ll>;
using llP = pair<ll, ll>;
using DoP = pair<double, double>;
const int di[] = {0, 1, 0, -1, 1, 1, -1, -1};
const int dj[] = {1, 0, -1, 0, 1, -1, 1, -1};
const int INF = 1 << 29;
const ll INF64 = 1ll << 62;
const int mod = 1000000007;
//const int mod = 998244353;

template <class T>inline bool chmin(T &a, const T b)
{
  if (a > b)
  {
    a = b;
    return true;
  }
  return false;
}
template <class T>inline bool chmax(T &a, const T b)
{
  if (a < b)
  {
    a = b;
    return true;
  }
  return false;
}
template <class T>inline void line_out(const vector<T> vec) {
  int n = SZ(vec);
  rep(i, n) {
    cout << vec[i];
    //if(i < n-1) cout << " ";
  }
  cout << endl;
  return;
}

struct mint
{
  ll x; // typedef long long ll;
  mint(ll x = 0) : x((x % mod + mod) % mod) {}
  mint operator-() const { return mint(-x); }
  mint &operator+=(const mint a)
  {
    if ((x += a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator-=(const mint a)
  {
    if ((x += mod - a.x) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator*=(const mint a)
  {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const
  {
    mint res(*this);
    return res += a;
  }
  mint operator-(const mint a) const
  {
    mint res(*this);
    return res -= a;
  }
  mint &operator++()
  {
    if ((x += 1) >= mod)
      x -= mod;
    return *this;
  }
  mint &operator--()
  {
    if ((x += mod - 1) >= mod)
      x -= mod;
    return *this;
  }
  mint operator*(const mint a) const
  {
    mint res(*this);
    return res *= a;
  }
  mint pow(ll t) const
  {
    if (!t)
      return 1;
    mint a = pow(t >> 1);
    a *= a;
    if (t & 1)
      a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const
  {
    return pow(mod - 2);
  }
  mint &operator/=(const mint a)
  {
    return (*this) *= a.inv();
  }
  mint operator/(const mint a) const
  {
    mint res(*this);
    return res /= a;
  }
};


int main()
{
  int sx, sy, tx, ty;
  cin >> sx >> sy >> tx >> ty;
  vector<char> ans;
  rep(i, tx-sx) ans.push_back('R');
  rep(i, ty-sy) ans.push_back('U');
  rep(i, tx-sx) ans.push_back('L');
  rep(i, ty-sy+1) ans.push_back('D');
  rep(i, tx-sx+1) ans.push_back('R');
  rep(i, ty-sy+1) ans.push_back('U');
  ans.push_back('L');
  ans.push_back('U');
  rep(i, tx-sx+1) ans.push_back('L');
  rep(i, ty-sy+1) ans.push_back('D');
  ans.push_back('R');
  line_out(ans);
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#pragma GCC optimize(3)
#pragma GCC target("avx")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("inline")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-ffast-math")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("inline-functions")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("no-stack-protector")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fhoist-adjacent-loads")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("inline-small-functions")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("inline-functions-called-once")
#pragma GCC optimize("-fdelete-null-pointer-checks")
using namespace std;
char a,b,c,d;
bool flag=false;
int main()
{
	scanf("%c%c%c%c",&a,&b,&c,&d);
	if((a==b&&b==c)||(b==c&&b==d))
	{
		printf("Yes\n");
		return 0;
	}
	printf("No\n");
	return 0;
}

Measured memory_bytes: 256
import collections

N=int(input())
A=list(map(int,input().split()))

ans=0
dic=collections.Counter(A)
keys=list(dic.keys())
values=list(dic.values())


for i in values:
    
    ans+=(i*(i-1))//2

for j in A:
    ANS=ans
    num=dic[j]
    ANS=ANS-(num-1)
    print(ANS)

Measured memory_bytes: 26780
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i, n); for(ll i = 0; i < (ll)n; i++)
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() {
  ll n,d;
  cin >> n >> d;
  vector<vector<ll>> v(n, vector<ll>(d));
  
  rep(i,n){
    rep(j,d)
      cin >> v.at(i).at(j);
  }
  ll ans = 0;
  
  rep(i,n){
    for(ll j=i+1; j<n; j++){
      ll dis = 0;
      rep(k, d)
        dis += (v.at(i).at(k)-v.at(j).at(k))*(v.at(i).at(k)-v.at(j).at(k));
      
      rep(l, 200000){
        if(dis == l*l)
          ans++;
      }
    }
  }
  
  cout << ans << endl;
}

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

#define MAX 100
#define FND -1
#define CMP -2

int n, G_list[MAX+1];
int G[MAX+1][MAX+1];
int d[MAX+1][3];

void make_graph(void){
  scanf("%d", &n);

  for(int i=0; i<n; i++){
    int cnt, num, m;

    scanf("%d %d", &num, &cnt);
    G_list[i]=num;

    for(int j=0; j<cnt; j++){
      scanf("%d", &m);
      G[num][m]=1;
    }
  }
}

void check_depth(int data){
  stack<int> S;
  static int tm=0;
  
  S.push(data);
  d[data][0]=++tm;
  d[data][2]=FND;
  
  while(!S.empty()){
    int top=S.top();
    int next=-5;

    for(int i=0; i<n; i++){
      if(G[top][G_list[i]] == 1 && d[G_list[i]][2] == 0){
	next=G_list[i];
	S.push(next);
	d[next][2]=FND;
	d[next][0]=++tm;
	break;
      }
    }

    if(next == -5){
      d[S.top()][2]=CMP;
      d[S.top()][1]=++tm;
      S.pop();
    }

  }
}

void set_depth(void){

  for(int i=0; i<n; i++){
    if(d[G_list[i]][2] == 0) check_depth(G_list[i]);
  }
}

void print(void){

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

int main(void){

  make_graph();
  set_depth();
  print();
  
  return 0;
}



Measured memory_bytes: 3260
//#include <bits/stdc++.h>
#include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <climits>
#include <iomanip>

#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define ROF(i, j, k) for(int i = (int)(j); i >= (int)(k); --i)
#define FORLL(i, n, m) for(long long i = n; i < (long long)(m); i++)
#define SORT(v, n) sort(v, v+n)
#define REVERSE(v) reverse((v).begin(), (v).end())

using namespace std;
using ll = long long;
const ll MOD=1000000007LL;
typedef pair<int, int> P;

ll ADD(ll x, ll y) { return (x+y) % MOD; }
ll SUB(ll x, ll y) { return (x-y+MOD) % MOD; }
ll MUL(ll x, ll y) { return x*y % MOD; }
ll POW(ll x, ll e) { ll v=1; for(; e; x=MUL(x,x), e>>=1) if (e&1) v = MUL(v,x); return v; }
ll DIV(ll x, ll y) { /*assert(y%MOD!=0);*/ return MUL(x, POW(y, MOD-2)); }

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

const ll MAXN = 1e9;

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

  ll K, A, B;
  cin >> K >> A >> B;

  if(B-A <= 1 || K < A){cout << K+1 << endl; return 0;}

  //k回目
  ll ans = A, num = K-(A-1);

  if(num%2 == 0) cout << ans + (B-A)*(num/2) << endl;
  else cout << ans + (B-A)*((num-1)/2)+1 << endl;
  
  
  return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <string>
#include <fstream>
#include <vector>
#include <cstdio>
#include <cmath>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <list>
#include <bitset>

using namespace std;
typedef long long ll;

// #define DEBUG

class Unionfind
{
    vector<int> p;

public:
    Unionfind(int n);
    int find(int x);
    void unite(int x, int y);
    bool match(int x, int y);
};

Unionfind::Unionfind(int n)
{
    for (int i = 0; i < n; i++)
    {
        p.push_back(i);
    }
}

int Unionfind::find(int x)
{
    while (p[x] != x)
    {
        p[x] = p[p[x]];
        x = p[x];
    }
    return x;
}

bool Unionfind::match(int x, int y)
{
    return (find(x) == find(y)) ? true : false;
}

void Unionfind::unite(int x, int y)
{
    x = Unionfind::find(x);
    y = Unionfind::find(y);
    if (x != y)
    {
        p[x] = y;
    }
}

void printsubset(int x)
{
    int t;
    cout << x << ":";
    t = 0;
    while (x > 0)
    {
        if (x % 2 == 1)
            cout << " " << t;
        x /= 2;
        t++;
    }
    cout << endl;
}

int main()
{
#ifdef DEBUG
    cout << "DEBUG MODE" << endl;
    ifstream in("input.txt"); //for debug
    cin.rdbuf(in.rdbuf());    //for debug
#endif
    int n, k, b, p;
    cin >> n;
    cin >> k;
    p = 0;

    for (int i = 0; i < k; i++){
        cin >> b;
        p += pow(2, b);
    }


    for (int i = 0; i < pow(2, n); i++)
    {
        if ((p & i) == p){
            printsubset(i);
        }
    }

    return 0;
}

// getline(cin,s);
// a = strtok(s, ",");  ","で分解
// for (int i = 0; i < n; i++)


Measured memory_bytes: 3288
#include <bits/stdc++.h>
#define FOR(I,X,Y) for(int I=X;I<Y;I++)
#define REP(I,X,Y) for(int I=Y-1;I>=X;I--)
#define INF 1000000007
#define LINF 1000000000000000007
#define ll long long
using namespace std;

int main(){
  ll H,W;
  ll ans = LINF;
  cin >> H >> W;
  if(!(H%3) || !(W%3))cout << 0 << endl;
  else{
    FOR(i,1,W){
      ll S = H/2*(W-i);
      ans = min(ans,(max({H*i,S,H*W-H*i-S})-min({H*i,S,H*W-H*i-S})));
    }
    swap(H,W);
    FOR(i,1,W){
      ll S = H/2*(W-i);
      ans = min(ans,(max({H*i,S,H*W-H*i-S})-min({H*i,S,H*W-H*i-S})));
    }
    cout << min({H,W,ans}) << endl;
  }
}


Measured memory_bytes: 256
mod reader {
    use std::fmt::Debug;
    use std::str::FromStr;
    use std::collections::VecDeque;
    use std::io::{self, Read};

    fn _read_line() -> String {
        let mut buf = String::new();
        io::stdin().read_to_string(&mut buf);
        buf
    }

    fn _read_vec_deque_string() -> VecDeque<String> {
        _read_line().split_whitespace().map(|s| s.to_string()).collect()
    }

    pub struct Reader {
        buf : VecDeque<String>
    }

    impl Reader {
        pub fn new() -> Reader {
            Reader {buf : VecDeque::new()}
        }

        fn update_buf(&mut self) {
            if self.buf.is_empty() {
                self.buf = _read_vec_deque_string();
            }
        }

        pub fn next<T>(&mut self) -> T where T: FromStr, T::Err: Debug {
            self.update_buf();
            self.buf.pop_front().unwrap().parse::<T>().unwrap()
        }
    }
}


fn main() {
    let mut reader = reader::Reader::new();

    const N : usize = 100000;
    let mut array: [i32; N] = [0; N];

    let n : usize = reader.next();
    for i in 0..n {
        array[i] = reader.next::<i32>() - 1;        
    }

    let mut cnt = 0;
    let mut idx = 0;
    while idx >= 0 && idx != 1{
        let prv : usize = idx as usize;
        idx = array[prv];
        array[prv] = -1;
        cnt += 1;
    }

    println!("{}", if idx == 1 {
        cnt
    } else {
        idx
    });
}


Measured memory_bytes: 10876
#include <iostream>

using namespace std;

int primes[1000];

int get_primes(int n) {
    int ret = 0;
    for (int i = 2; i <= n; i++) {
        bool flag = true;
        for (int j = 2; j <= i; j++) {
            if (i % j == 0 && i != j) {
                flag = false;
                break;
            }
        }
        if (flag) {
            primes[ret++] = i;
        }
    }
    return ret;
}

int main() {
    const long long int mod = (long long int)1e9+7;
    int n, cnt;
    int exps[1000] = {0};

    cin >> n;
    cnt = get_primes(n);

    for (int i = 2; i <= n; i++) {
        int k = i;
        for (int j = 0; j < cnt; j++) {
            while (k % primes[j] == 0) {
                exps[j]++;
                k /= primes[j];
            }
        }
    }

	long long int ans = 1;
    for (int i = 0; i < cnt; i++) {
        ans *= (exps[i]+1);
        ans %= mod;
    }

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

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

int main(int argc, char *argv[])
{
	int judge[] = {0, 13, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; 
    int a, b;
	cin >> a >> b;

	if (judge[a] > judge[b])
		cout << "Alice";
	else if (judge[a] < judge[b])
		cout << "Bob";
	else
		cout << "Draw";

	cout << endl;

	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
//---------------------------
using namespace std;
//---------------------------
#define REP(i,n) for(int i = 0; i < (n); i++)
#define P(x) cout << (x) << "\n"

#define MOD 1e9+7
#define PI acos(-1.0)
#define ll long long
//---------------------------

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

  // ifstream in("input.txt");
  // cin.rdbuf(in.rdbuf());

  ll N;cin>>N;
  ll flag[] = {0,0,0,0,0};
  REP(i,N) {
    string a;
    cin>>a;
    if(a[0] == 'M')flag[0]++;
    if(a[0] == 'A')flag[1]++;
    if(a[0] == 'R')flag[2]++;
    if(a[0] == 'C')flag[3]++;
    if(a[0] == 'H')flag[4]++;
  }
  ll ans=0;
  // ans=flag[i]*flag[j]*flag[k]
  // ans = flag[0]*flag[1]*flag[2] + flag[0]*flag[1]*flag[3] + flag[0]*flag[1]*flag[4] + flag[0]*flag[2]*flag[3] + flag[0]*flag[2]*flag[4] + flag[0]*flag[3]*flag[4] + flag[1]*flag[2]*flag[3] + flag[1]*flag[2]*flag[4] + flag[1]*flag[3]*flag[4] + flag[2]*flag[3]*flag[4];
  for(int i=0;i<5;i++){
    for(int j=i+1;j<5;j++){
      for(int k=j+1;k<5;k++){
        ans += flag[i]*flag[j]*flag[k];
      }
    }
  }
  P(ans);
  return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main(void){
	int n;
	int s[1000],p[1000],q[1000],r[1000];
	int sum;
	int a,b,c,d;
	int i;
	int flg;
	while(1){
		cin>>n;
		if(n==0)	break;
		for(i=0;i<n;i++)	cin>>s[i]>>p[i]>>q[i]>>r[i];
		cin>>a>>b>>c>>d;
		flg=0;
		for(i=0;i<n;i++){
			sum=4*p[i]+9*q[i]+4*r[i];
			if(a>=p[i]){
				if(b>=q[i]){
					if(c>=r[i]){
						if(d>=sum){
							flg=1;
							cout<<s[i]<<endl;
						}
					}
				}
			}
		}
		if(flg==0)	cout<<"NA"<<endl;
	}
	return 0;
}


Measured memory_bytes: 3096
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
	int N, M;
	cin >> N >> M;
	int x = (M+1)/2;
	int y = M/2;
	for (int i = 0; i < x; ++ i) {
		cout << x-i << " " << x+1+i << endl;
	}
	for (int i = 0; i < y; ++ i) {
		cout << 2*x+y-i << " " << 2*x+y+2+i << endl;
	}
}


Measured memory_bytes: 3636
import sys

H,N=map(int, sys.stdin.readline().split())
AB=[ map(int, sys.stdin.readline().split()) for _ in range(N) ]

dp=[ float("inf") for _ in range(H+1) ]
dp[0]=0

for a,b in AB:
    for i in range(H+1):
        dp[min(i+a,H)]=min(dp[min(i+a,H)],dp[i]+b)

print dp[H]


Measured memory_bytes: 33512
kigou=list("abcdefghijklmnopqrstuvwxyz")
a=int(input())
keta=0
count=0
counter=[0]
for i in range(1,100):
    x=26**i+count
    if 26**i+count>=a:
      keta=i
      counter.append(x)
      break
    else:
        count+=26**i
        counter.append(count)
ans=""

for i in range(keta):
    a -= 1
    ans=kigou[a%26]+ans
    a=a//26

print(ans)

Measured memory_bytes: 9096
while True:
    m, f, r = list(map(int, input().split()))
    if m == f == r == -1:
        break
    elif m == -1 or f == -1:
        print('F')
    elif m + f >= 80:
        print('A')
    elif 65 <= m+f < 80:
        print('B')
    elif 50 <= m+f < 65:
        print('C')
    elif 30 <= m+f < 50:
        if r >= 50:
            print('C')
        else:
            print('D')
    else:
        print('F')

Measured memory_bytes: 7676
n,m = map(int, input().split())
l = []
for i in range(m):
    data = list(map(int,input().split()))
    l.append(data)

from collections import defaultdict
d = defaultdict(list)
for tmp in l:
    d[tmp[0]].append(tmp[1])
for key in d:
    lis = d[key]
    lis.sort()
    d[key] = lis

import bisect
for tmp in l:
    p = tmp[0]
    y = tmp[1]

    lut = d[p]
    ind = bisect.bisect_left(lut,y)+1
    print(str(p).zfill(6)+str(ind).zfill(6))

Measured memory_bytes: 42588
n = gets.to_i
s = gets.strip

patterns = []

poss = if s[0] == 'o'
  [
    ['S','S','S'],
    ['S','W','W'],
    ['W','S','W'],
    ['W','W','S'],
  ]
else
  [
    ['S','S','W'],
    ['S','W','S'],
    ['W','S','S'],
    ['W','W','W'],
  ]
end

poss.each do |first, second, last|
  a = Array.new(n)
  a[0] = first
  a[1] = second
  a[-1] = last
  patterns << a    
end


patterns.each do |ar|
  impossible = false
  1.upto(n-1) do |i|
    if s[i] == 'o' && ar[i] == 'S' && ar[i-1] == 'S'
      cand = 'S'
    elsif s[i] == 'o' && ar[i] == 'S' && ar[i-1] == 'W'
      cand = 'W'
    elsif s[i] == 'o' && ar[i] == 'W' && ar[i-1] == 'S'
      cand = 'W'
    elsif s[i] == 'o' && ar[i] == 'W' && ar[i-1] == 'W'
      cand = 'S'
    elsif s[i] == 'x' && ar[i] == 'S' && ar[i-1] == 'S'
      cand = 'W'
    elsif s[i] == 'x' && ar[i] == 'S' && ar[i-1] == 'W'
      cand = 'S'
    elsif s[i] == 'x' && ar[i] == 'W' && ar[i-1] == 'S'
      cand = 'S'
    elsif s[i] == 'x' && ar[i] == 'W' && ar[i-1] == 'W'
      cand = 'W'
    end
    
    if (ar[i+1] && ar[i+1] != cand) || (i == n-1 && ar[0] != cand)
      impossible = true 
      break
    elsif i+1 < n
      ar[i+1] = cand
    end
  end
  next if impossible
  puts ar.join('')
  exit 0
end

puts -1

Measured memory_bytes: 27900
#include<stdio.h>

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

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

int main(void){
  long long s=100LL;
  long long x;
  cin >> x;
  int ans=0;
  while(s<x){
    ans++;
	s = s*1.01;
  }
  cout << ans << endl;
  return 0;
    
 }

Measured memory_bytes: 3652
#include<iostream>
#include <bits/stdc++.h>
#define int long long int
int mod=1e9+7;
#define p_b push_back
#define p_f push_front
#define P_f pop_front
#define P_b pop_back
#define len() length()
#define sz() size()
#define u_b upper_bound
#define l_b lower_bound
#define ins insert
#define str string 
#define bitcount __builtin_popcount
#define all(v) v.begin(),v.end()
#define allr(v) v.rbegin(),v.rend()
#define ld long double
#define db double
#define fio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define F first
#define S second
#define T third
#define endl "\n"
using namespace std;
typedef map<int,int> Map;
typedef pair<int,int> pr;
typedef vector<int> vec;
const int INF = 1e18;
const int MAX =1e6;
int power(int a,int b)
{   
    if(b==0)
    return 1;
    int num=1;
    int m=mod;
    while(b!=1)
    { 
        if(b%2==0)
        { 
            a*=a;
            a%=m;
            b/=2;
        }
        else
        { 
            num*=a;
            num%=m;
            b--;
        }
        
    }
    return (a*num)%m;
}
void solve()
{
    int n;
    cin>>n;
    int a[n],c=0;
    for(int i=0;i<n;i++)
    {
        cin>>a[i];
        if(i%2==0&&a[i]%2)
        c++;
    }
    cout<<c<<endl;
}
int32_t main()
{    
    fio;
    int t;
    t=1;
    // cin>>t;
    while(t--)
    {   
        solve();
    }
    return 0;
}

Measured memory_bytes: 3648
#include<iostream>
#include<map>
#include<vector>
#include<cmath>
#include<string>
#include<cstring>
#include<algorithm> 
#include<climits>
#include<stack>
#include<queue>
#include<set>
#include<cctype>
using namespace std;

struct UnionFind {
    vector<int> par;
    vector<int> sz;
    map<int, int> szmp; // map<size, cnt>
 
    // n : 要素数
    UnionFind(int n = 0){
        if(n > 0) initialize(n);
    }
 
    void initialize(int n){
        par.resize(n);
        sz.resize(n);
        for(int i = 0; i < n; i++){
            par[i] = i;
            sz[i] = 1;
        }
        szmp[1] = n;
    }
 
    // 0-index
    int find(int x){
        if(par[x] == x){
            return x;
        } else {
            return par[x] = find(par[x]);
        }
    }

    // 0-index
    void unite(int x, int y){
        x = find(x);
        y = find(y);
        if(x == y) return;
        if(sz[x] > sz[y]) swap(x, y);
 
        for(int s : {sz[x], sz[y]}){
            szmp[s]--;
            if(szmp[s] == 0) szmp.erase(s);
        }
        par[x] = y;
        sz[y] += sz[x];
        szmp[sz[y]]++;
    }
 
    // 0-index
    bool same(int x, int y){
        return find(x) == find(y);
    }

    // 0-index
    int size(int x){
        return sz[find(x)];
    }
 
    // 最小要素サイズ
    int minsz(){
        return szmp.begin() -> first;
    }

    // 連結成分個数
    int unitenum(){
        return szmp.size();
    }
};

int main() {
    int n, m;
    cin >> n >> m;

    UnionFind uf(n);

    while(m--){
        int a, b;
        cin >> a >> b;
        uf.unite(a-1, b-1);
    }
    int cnt = 0;
    for(auto u : uf.szmp) {
        cnt += u.second;
    }
    cout << cnt - 1 << endl;
    return 0;    
}


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

using namespace std;

int main(){

  int tmp, a, b, c;

  cin >> tmp;
  a = tmp / 100;
  b = ( tmp % 100 ) / 10;
  c = ( tmp % 100 ) % 10;
  cout << a + b + c << endl;

  return 0;
}

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

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

  int X,Y;
  int count=-1;
  for (int i = 0; i < 1300; i++) {
    X=i*0.08;
    Y=i*0.1;
    if (X==A && Y==B){
      count=i;
      break;
    }
  }

  cout << count << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define all(x) (x.begin()),(x.end())
#define sz(x)  ((ll)x.size())
#define FAST_IO ios_base :: sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr);
using namespace std;
#ifdef LOCAL
#include "uj.h"
#endif
void tokenize(string str,const char delim,vector<string> & res){
	stringstream p(str);
	string token;
	while(getline(p,token,delim)){
		res.push_back(token);
	}
	return;
}

// Your workSpace ...
int N;
string str;
void test_case(){
	int x = 0,y= 0,z= 0,a=  0;;
	cin >> N;
	while(N--){
		cin >> str;
		if(str == "AC")
			++x;
		else if(str == "WA")
			++y;
		else if(str == "TLE")
			++z;
		else 
			++a;
	}
	cout << "AC" << " x " << x << endl;
	cout << "WA" << " x " << y << endl;
	cout << "TLE" << " x " << z << endl;
	cout << "RE" << " x " << a;
}
	
	


	





int main(){
	FAST_IO;
	int tt;
	//cin>>tt;
	tt = 1;
	while(tt--){
		test_case();
	}
#ifndef ONLINE_JUDGE
 	cerr << "Running Time: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif
	return 0;
}


Measured memory_bytes: 3656
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
use std::collections::{HashMap, HashSet};
#[allow(unused_imports)]
use std::io::*;
#[allow(unused_imports)]
use std::str::*;

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(dead_code)]
fn read<T: FromStr>() -> T {
    let cin = stdin();
    let cin = cin.lock();
    let s: String = cin
        .bytes() // Bytes
        .map(|c| c.expect("failed reading char") as char)
        .skip_while(|c| c.is_whitespace()) // c が whitespace である限り skip
        .take_while(|c| !c.is_whitespace()) // c が whitespace でない限り要素を返す
        .collect();
    s.parse().ok().expect("failed parsing")
}

fn main() {
    input! {a:String, b:String}
    let s = format!("{}{}", a, b);
    let x = s.parse::<isize>().unwrap();
    let mut is_square = false;
    for i in 1..x + 1 {
        if x == i * i {
            is_square = true;
            break;
        }
    }
    println! {
        "{}",
        if is_square {
            "Yes"
        }
        else {
            "No"
        }
    }
}


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

const int N = 1e5+10;

signed main(){

  int n,c; cin >> n >> c;
  vector<vector<int>> v(c,vector<int> (N,0));
  for(int i = 0; i < n; i++){
    int s,t,ch; cin >> s >> t >> ch;
    s--,ch--;
    v[ch][s]++,v[ch][t]--;
  }

  for(int i = 0; i < c; i++){
    for(int j = 1; j < N; j++){
      v[i][j] += v[i][j-1];
    }
  }

  int ans = 0;
  for(int j = 0; j < N; j++){
    int res = 0;
    for(int i = 0; i < c; i++){
      if(v[i][j]) res++;
    }
    ans = max(ans,res);
  }
  cout << ans << endl;

  return 0;
}


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

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

signed main() {
  int n, k;
  cin >> n >> k;
  vector<int> ma;
  vector<int> pa;
  int zero = 0;
  rep(i, n) {
    int x;
    cin >> x;
    if(x < 0) {
      ma.push_back(-x);
    } else if(x == 0) {
      zero++;
    } else {
      pa.push_back(x);
    }
  }
  sort(ma.begin(), ma.end());
  sort(pa.begin(), pa.end());
  int m = ma.size() * pa.size();
  int z = zero * (zero - 1) / 2 + (n - zero) * zero;
  if(m < k && k <= m + z) {
    cout << 0 << endl;
  } else if(m + z < k) {
    int b = 0;
    int e = (int)1 << 61;
    while(b < e - 1) {
      int p = (b + e) / 2;
      int c = 0;
      rep(i, ma.size()) {
        int k = upper_bound(ma.begin(), ma.end(), p / ma[i]) - ma.begin();
        c += max((int)0, k - i - 1);
      }
      rep(i, pa.size()) {
        int k = upper_bound(pa.begin(), pa.end(), p / pa[i]) - pa.begin();
        c += max((int)0, k - i - 1);
      }
      if(c < k - m - z) {
        b = p;
      } else {
        e = p;
      }
    }
    cout << e << endl;
  } else {
    int b = -((int)1 << 61);
    int e = 0;
    while(b < e - 1) {
      int p = (b + e) / 2;
      int c = 0;
      rep(i, ma.size()) {
        int k = lower_bound(pa.begin(), pa.end(), (-p - 1) / ma[i] + 1) - pa.begin();
        c += pa.size() - k;
      }
      if(c < k) {
        b = p;
      } else {
        e = p;
      }
    }
    cout << e << endl;
  }
}


Measured memory_bytes: 2420
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
		boolean b = false;
		for(int i = 1; i < 10; i++){
			for(int j = i; j < 10; j++){
				if(i * j == a){
					b = true;
				}
			}
		} 
		if(b){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
		
		
		
	}
}

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

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

    if(a==b){
        cout << a << endl;
        return 0;
    }
    ll dif=b-a;
    ll x=a^(a+1),y=x^(a+2)^(a+3);
    if(a%2){
        x=a-1;
        y=a;
        dif+=3;
    }
    ll z=dif%4;

    if(z==0)cout << (y^b) << endl;
    else if(z==1)cout << x << endl;
    else if(z==2)cout << (x^b) << endl;
    else if(z==3) cout << y << endl;
}

Measured memory_bytes: 256
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;

public class Program
{

    public void Proc()
    {
        int[] inpt = Reader.ReadLine().Split(' ').Select(a => int.Parse(a)).ToArray();
        string ans = "Yes";
        if(inpt.Any(a=>a%2==0)) {
            ans = "No";
        }
        Console.WriteLine(ans);

    }


    public class Reader
    {
        static StringReader sr;
        public static bool IsDebug = false;
        public static string ReadLine()
        {
            if (IsDebug)
            {
                if (sr == null)
                {
                    sr = new StringReader(InputText.Trim());
                }
                return sr.ReadLine();
            }
            else
            {
                return Console.ReadLine();
            }
        }
        private static string InputText = @"






3 1




";
    }

    public static void Main(string[] args)
    {
#if DEBUG
        Reader.IsDebug = true;
#endif
        Program prg = new Program();
        prg.Proc();
    }
}


Measured memory_bytes: 13396
import java.util.*

class Scanner(`in`: java.io.InputStream) {
    private val reader = java.io.BufferedReader(java.io.InputStreamReader(`in`))
    private var tokenizer: StringTokenizer? = null

    fun next(): String {
        if (tokenizer?.hasMoreTokens() != true) {
            tokenizer = StringTokenizer(reader.readLine())
        }
        return tokenizer!!.nextToken()
    }

    fun nextLine(): String {
        return if (tokenizer?.hasMoreTokens() != true) {
            reader.readLine()
        } else tokenizer!!.nextToken("\n")
    }
}

fun main(args: Array<String>) {
    val pw = java.io.PrintWriter(System.out)
    Problem.solve(Scanner(System.`in`), pw)
    pw.flush()
}

////////////////////////////////////////////////////////////////////////

object Problem {
    fun solve(sc: Scanner, pw: java.io.PrintWriter) {
        val N = sc.next().toInt()
        val A = IntArray(N) { sc.next().toInt() }.sorted()
        var i1 = 0
        var i2 = 0
        var n = 0
        var ans = 0
        while (i1 < N) {
            while (i2 < N && A[i2] - A[i1] <= 2) {
                n++
                if (ans < n) ans = n
                i2++
            }
            n--
            i1++
        }
        pw.println(ans)
    }
}


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

using namespace std;
#define  ll long long
#define ld long double
#define f first
#define s second
ll a[5][5];
bool vis[4][4];
pair<ll,ll> pos[105];

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

    for(int i=1; i<=3; i++)
    {
        for(int j=1; j<=3; j++)
        {
            cin >> a[i][j];
            pos[a[i][j]] = {i,j};
        }
    }

    ll n;
    cin >> n;
    for(int i=1; i<=n; i++)
    {
        ll x;
        cin >> x;
        int r = pos[x].f , c = pos[x].s;
        vis[r][c] = 1;
    }

    for(int i=1; i<=3; i++)
    {
        if (vis[i][1] && vis[i][2] && vis[i][3]) return cout << "Yes\n" , 0;
        if (vis[1][i] && vis[2][i] && vis[3][i]) return cout << "Yes\n" , 0;
    }
    if (vis[1][1] && vis[2][2] && vis[3][3]) return cout << "Yes\n" , 0;
    if (vis[3][1] && vis[2][2] && vis[1][3]) return cout << "Yes\n" , 0;
    cout << "No\n";

    return 0;
}

Measured memory_bytes: 256
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
#include <sstream>
#include <cassert>
#include <list>
using namespace std;
static const double EPS = 1e-10;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> PI;
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define SZ(a) (int(a.size()))
#define F first
#define S second

int dx[]={0,1,0,-1},dy[]={1,0,-1,0};


int __sign;
int __ch;
int x;
inline int num(){
  x=0;
  while((__ch<'0' || __ch>'9') && __ch!='-' && __ch!=EOF) __ch=getchar();
  if (__ch=='-')
    __sign=-1 , __ch=getchar();
  else
    __sign=1;
  do
    x=(x<<3)+(x<<1)+__ch-'0';
  while((__ch=getchar())>='0' && __ch<='9');
  return x*__sign;
}

PI V[30][30];
int Vs[30];
bool vis[1<<8][30];
int ti[30];

int main(){
  while(true){
    int n=num(),m=num(),p=num(),a=num()-1,b=num()-1;
    if(!n)break;
    rep(i,n)ti[i]=num();

    rep(i,m)Vs[i]=0;

    rep(i,p){
      int x=num()-1,y=num()-1,z=num();
      V[x][Vs[x]++]=mp(y,z);
      V[y][Vs[y]++]=mp(x,z);
    }

    priority_queue<pair<double,PI> > Q;
    Q.push(mp(0,mp(a,0)));
    memset(vis,0,sizeof(vis));
    double ans=-1;

    while(!Q.empty()){
      int v=Q.top().S.F,cst=Q.top().S.S;
      double cc=-Q.top().F;
      Q.pop();
      if(vis[cst][v])continue;
      vis[cst][v]=true;
      if(v==b){
        ans=cc;
        break;
      }

      rep(i,n){
        if(cst>>i&1)continue;
        rep(j,Vs[v]){
          int nv=V[v][j].first;
          int tc=V[v][j].second;
          int nst=cst|(1<<i);
          if(vis[nst][nv])continue;
          double nc=cc+1.0*tc/ti[i];
          Q.push(mp(-nc,mp(nv,nst)));
        }
      }
    }
    if(ans<0)puts("Impossible");
    else printf("%f\n",ans);
  }
}

Measured memory_bytes: 5520
//1.read question_2.read I/O_3.read test cases_4.read constraints(to decide TC of solution)_5.decide method_6.dry run_
//7.code_8.test_9.submit
#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
const lli mod=1e9+7;
int main()
{
    //freopen("input.txt","r",stdin);
    lli n;cin>>n;map<string,lli> mp;
    lli maxi=LONG_LONG_MIN;
    for(lli i=0;i<n;i++)
    {
        string s;cin>>s;
        mp[s]++;
        maxi=max(maxi,mp[s]);
    }
    for(auto i:mp)
        if(i.second==maxi)
            cout<<i.first<<"\n";
    return 0;
}


Measured memory_bytes: 25216
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>

using namespace std;
using ll = long long;

#define REP(i, a) for (int i = 0; i < (a); ++i)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define FORR(i, a, b) for (int i = (a)-1; i >= (b); --i)
#define ALL(obj) (obj).begin(), (obj).end()
#define SIZE(obj) (int)(obj).sizeT()
#define YESNO(cond, yes, no) \
    { cout << ((cond) ? (yes) : (no)) << endl; }
#define SORT(list) sort(ALL((list)));
#define RSORT(list) sort((list).rbegin(), (list).rend())
#define ASSERT(cond, mes) assert(cond&& mes)

constexpr int MOD = 1'000'000'007;
constexpr int INF = 1'050'000'000;

template <typename T>
T round_up(const T& a, const T& b) {
    return (a + (b - 1)) / b;
}

template <typename T1, typename T2>
istream& operator>>(istream& is, pair<T1, T2>& p) {
    is >> p.first >> p.second;
    return is;
}

template <typename T1, typename T2>
ostream& operator<<(ostream& os, pair<T1, T2>& p) {
    os << p.first << p.second;
    return os;
}

template <typename T>
istream& operator>>(istream& is, vector<T>& v) {
    REP(i, (int)v.size())
    is >> v[i];
    return is;
}

template <typename T>
T clamp(T& n, T a, T b) {
    if (n < a) n = a;
    if (n > b) n = b;
    return n;
}

template <typename T>
static T GCD(T u, T v) {
    T r;
    while (v != 0) {
        r = u % v;
        u = v;
        v = r;
    }
    return u;
}

template <typename T>
static T LCM(T u, T v) {
    return u / GCD(u, v) * v;
}

template <typename T>
std::vector<T> enum_div(T n) {
    std::vector<T> ret;
    for (T i = 1; i * i <= n; ++i) {
        if (n % i == 0) {
            ret.push_back(i);
            if (i * i != n) { ret.push_back(n / i); }
        }
    }
    return ret;
}

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

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

struct ToUpper {
    char operator()(char c) {
        return toupper(c);
    }
};

struct ToLower {
    char operator()(char c) {
        return tolower(c);
    }
};

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

    int N, K;
    cin >> N >> K;
    vector<int> X(N);
    cin >> X;

    int left = 0;
    int right = K - 1;
    int ans = INF;
    while (right < N) {
        chmin(ans, abs(X[left]) + abs(X[right] - X[left]));
        chmin(ans, abs(X[right]) + abs(X[right] - X[left]));
        left++;
        right++;
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 640
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <queue>

#define FOR(idx, begin, end) for(int idx = (int)(begin); idx < (int)(end); ++idx)

#ifdef _DEBUG
#define DMP(x) cerr << #x << ": " << x << "\n"
#else
#define DMP(x) ((void)0)
#endif

using namespace std;
typedef long long lint;

const int MOD = 1000000007, INF = 1111111111;
const double EPS = 1e-9;

template <class T>
class CuSum {
private:
	vector<T> cusum;

public:
	CuSum(vector<T> const &vec) : cusum(vec.size() + 1) { for (int i = 0; i < (int)(vec.size()); i++) cusum[i + 1] = cusum[i] + vec[i]; }
	CuSum(int N) : cusum(N + 1) {}

	void add(int i, T x) { cusum[i + 1] += x; }
	void init() { for (int i = 0; i < (int)(cusum.size()) - 1; i++) cusum[i + 1] += cusum[i]; }

	T query(int l, int r /*[l, r) */) { return cusum[r] - cusum[l]; }
};

int main() {

	cin.tie(0);

	int N;
	string S;
	cin >> N >> S;

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

		if (S[i] == '.') b[i] = 0;
		else b[i] = 1;
	}

	CuSum<int> cul(b);
	int ans = INF, changes;
	for (int i = 0; i < N; i++) {

		changes = cul.query(0, i) + (N - 1 - i - cul.query(i + 1, N));
		ans = min(ans, changes);
	}

	cout << ans;

	return 0;
}


Measured memory_bytes: 2180
/* 
****	
	AUTHOR :- @soham01 
****
*/
#include "bits/stdc++.h"
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	long long int h , a, n, i, j, sum=0;
	cin>>h>>n;
	long long int arr[n];
	for(i=0;i<n;i++)
	{
		cin>>arr[i];
		sum+=arr[i];
	}
	if(sum>=h)cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
	return 0;
}


Measured memory_bytes: 1024
#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef unsigned long long int ulli;
typedef long double ld;
#define vec(s) vector

#define vvec(s) vector<vector
>
typedef vector<lli> vi;
typedef vector<vi> vvi;
typedef pair<lli,lli> pii;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define Yes(x) cout<<(x?"Yes":"No")<<endl;
#define YES(x) cout<<(x?"YES":"NO")<<endl;
#define out(s) cout<<s<<endl;
#define Reverse(x) reverse(all(x));
#define Sort(x) sort(all(x));
#define pb(s) push_back(s);
#define sp " " 
#define INF 10000000000
#define LINF 9000000000000000000
#define all(s) s.begin(),s.end()
void vout(vi v){
    for(lli i=0;i<v.size();i++)
    cout<<v.at(i)<<endl;
}
int main(){
    cout << std::fixed << std::setprecision(10);
    lli n, h, w;
    cin >> n >> h >> w;
    out((n - h + 1) * (n - w + 1));
}

Measured memory_bytes: 3556
import sys
sys.setrecursionlimit(4100000)

import math

import logging

logging.basicConfig(level=logging.DEBUG)

logger = logging.getLogger(__name__)


def resolve():
    N = [int(x) for x in sys.stdin.readline().split()][0]
    S = [x for x in sys.stdin.readline().split()][0]

    logger.debug('{}'.format([N, S]))

    c = 0
    for i in range(N):
        if S[i:i + 3] == 'ABC':
            c += 1

    print(c)


if __name__ == "__main__":
    resolve()

# AtCoder Unit Test で自動生成できる, 最後のunittest.main は消す
# python -m unittest template/template.py で実行できる
# pypy3 -m unittest template/template.py で実行できる
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """10
ZABCDBABCQ"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """19
THREEONEFOURONEFIVE"""
        output = """0"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """33
ABCCABCBABCCABACBCBBABCBCBCBCABCB"""
        output = """5"""
        self.assertIO(input, output)


Measured memory_bytes: 5648
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <functional>
#include <cstring>
#include <queue>
using namespace std;
int main() {
	int a, b, c, d, e, f, g, h;
	scanf("%d%d%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f, &g, &h);
	int num = a + b + c + d, fail = e + f + g + h;
	printf("%d\n", max(num, fail));
}


Measured memory_bytes: 1020
#include <bits/stdc++.h>
#include <math.h>
#include <string.h>

#include <iostream>
#include <vector>

std::unordered_map<long, long> mp;
std::vector<int> v;

int main(void) {
  long a;

  std::cin >> a;

  std::cout << a + a*a + a*a*a << std::endl;
  

  return 0;
}

Measured memory_bytes: 3588
#include <cstdio>
#include <iomanip>
#include <cstring>
#include <iostream>
#include <stack>
#include <vector>
#include <queue>
#include <cctype>
#include <cmath>
#include <algorithm>
#include <set>
#include <bitset>
#include <map>
#define INF 0x3f3f3f3f
#define ULL unsigned long long
#define LL long long
#define N 10100
#define eps 10e-9
#define MOD 100000000
#define mem(a,n) memset(a,n,sizeof(a))
#define fread freopen("in.txt","r",stdin)
#define fwrite freopen("out.txt","w",stdout)
using namespace std;
const double PI=acos(-1.0);
int stick[55];
int main()
{
	ios::sync_with_stdio(false);
	int n,k;
	cin>>n>>k;
	for(int i=0;i<n;++i){
		cin>>stick[i];
	}
	sort(stick,stick+n,greater<int>());
	int ans=0;
	for(int i=0;i<k;++i){
		ans+=stick[i];
	}
	cout<<ans<<endl;
	return 0;
}


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

using namespace std;
using ll = long long;
// #define int ll
using PII = pair<ll, ll>;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()

template<typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template<typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template<typename T> bool IN(T a, T b, T x) { return a<=x&&x<b; }
template<typename T> T ceil(T a, T b) { return a/b + !!(a%b); }

template<typename T> vector<T> make_v(size_t a) { return vector<T>(a); }
template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts) {
    return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}
template<typename T,typename V> typename enable_if<is_class<T>::value==0>::type
fill_v(T &t, const V &v) { t=v; }
template<typename T,typename V> typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t, const V &v ) { for(auto &e:t) fill_v(e,v); }

template<class S,class T>
ostream &operator <<(ostream& out,const pair<S,T>& a) {
    out<<'('<<a.first<<','<<a.second<<')'; return out;
}
template<class T>
ostream &operator <<(ostream& out,const vector<T>& a){
    out<<'[';
    for(const T &i: a) out<<i<<',';
    out<<']';
    return out;
}
template<class T>
ostream &operator <<(ostream& out, const set<T>& a) {
    out<<'{';
    for(const T &i: a) out<<i<<',';
    out<<'}';
    return out;
}
template<class T, class S>
ostream &operator <<(ostream& out, const map<T,S>& a) {
    out<<'{';
    for(auto &i: a) out<<i<<',';
    out<<'}';
    return out;
}

int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0}; // DRUL
const int INF = 1<<30;
const ll LLINF = 1LL<<60;
const ll MOD = 1000000007;

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

    ll n, k;
    string s;
    cin >> n >> k >> s;

    if(s[k-1]=='A') s[k-1] = 'a';
    else if(s[k-1]=='B') s[k-1] = 'b';
    else if(s[k-1]=='C') s[k-1] = 'c';

    cout << s << endl;

    return 0;
}


Measured memory_bytes: 764
#include <bits/stdc++.h>
using namespace std;
int main(void){
    int N,M; cin >> N >> M;
    priority_queue<long long> que;
    for(int i = 0; i < N; i++){
        long long a; cin >> a;
        que.push(a);   
    }
    for(int i = 0; i < M; i++){
        long long b = que.top();
        que.pop();
        que.push(b/2);
    }
    long long sum = 0;
    while(!que.empty()){
        sum += que.top();
        //cout << que.top() << endl;
        que.pop();
    }
    cout << sum << endl;
}


Measured memory_bytes: 4296