akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define pb push_back
#define mp make_pair
#define all(a)      (a).begin(),(a).end()
#define debug_array(a,n) for (ll bccc=(0); bccc<(n); bccc++) cout<<a[bccc]<<" "<<"\n"
#define debug_vector(a) for(ll bccc=(0); bccc<(a.size());bccc++) cout<<a[bccc].first<<" "<<a[bccc].second<<"\n"
#define F           first
#define S           second
#define debug_set(s) for(auto p:s) cout<<p<<" "
#define debug_map(m) for(auto p:m) cout<<p.F<<" "<<p.S<<"\n"
#define trace(x) cerr<<#x<<": "<<x<<" "<<endl;
typedef long long ll;
using namespace __gnu_pbds;
typedef tree<pair<ll,ll>,null_type,less<pair<ll,ll> >,rb_tree_tag,tree_order_statistics_node_update> ordered_multiset;
/* ll t = 0;
ordered_multiset me;
...
me.insert({x, t++});
me.erase(me.lower_bound({x, 0}));
cout << me.order_of_key({x, 0}) << "\n";

///////////   t is insertion time
*/
//#pragma GCC optimize("Ofast")  // works very well
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
typedef long double lld;
lld pi=3.14159265358;
ll powr(ll a,ll b)
{
    ll c=1;
    ll kjk;
    for(kjk=0;kjk<b;kjk++)
        c*=a;
    return c;
}
ll hell=1000000007;
//ll hell=998244353   ;
ll power(ll x, ll y, ll p)
{
    ll res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
// to generate random number , use rng() ... eg cout<<rng();
vector<ll> v[100005];
int vis[100005];
void dfs(ll i)
{
    vis[i]=1;
    for(auto x:v[i])
    {
        if(!vis[x])
            dfs(x);
    }
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    srand(chrono::high_resolution_clock::now().time_since_epoch().count());
    ll n,m,i;
    cin>>n>>m;
    while(m--)
    {
        ll x,y,z;
        cin>>x>>y>>z;
        v[x].pb(y);
        v[y].pb(x);
    }
    ll c=0;
    for(i=1;i<=n;i++)
    {   if(!vis[i])
        {dfs(i);
        c++;}
    }
    cout<<c;
    return 0;
}


Measured memory_bytes: 9216
import numpy as np
from numba import njit, i8


@njit(i8[:](i8, i8, i8[:]), cache=True)
def myfunc(n, k, A):
    for _ in range(k):
        l = np.zeros((n + 1,), dtype=np.int64)
        for i, a in enumerate(A[:-1]):
            l[max(0, i - a)] += 1
            l[min(n, i + a + 1)] -= 1
        A = np.cumsum(l)
        if np.all(A[:-1] == n):
            break
    return A


def main():
    n, k = map(int, input().split())
    A = np.array(list(map(int, input().split())), dtype=np.int64)
    A = np.append(A, 0)
    print(*myfunc(n, k, A)[:-1])


if __name__ == "__main__":
    main()

Measured memory_bytes: 126960
N,K = (int(i) for i in input().split())
li = [int(i) for i in input().split()]

max = max(li)

b = min(li)
for a in li:
    while True:
        if a%b == 0:
            break
        tb = b
        b = a%b
        a = tb

if K <= max:
    if K%b == max%b:
        print('POSSIBLE')
        exit()

print('IMPOSSIBLE')


Measured memory_bytes: 14252
#include <stdio.h>
#include <string.h>
#define LEN 100005



//代表任务的结构体

typedef struct pp{
    char name[100];
    int t;
} P;



P Q[LEN];
int head, tail, n;


void enqueue(P x){
    
    Q[tail] = x;
    tail = (tail + 1) % LEN; //环形缓冲区
    
}



P dequeue(){
    
    P x = Q[head];
    head = (head +1) % LEN;
    return x;
}


int min(int a, int b){
    
    return a < b ? a : b; 
    
}


int main()
{
    int elaps = 0, c;
    int q;
    P u;
    scanf("%d %d", &n, &q);
    
    
    /*按顺序将所有任务添加至队列*/
    
    for(int i = 1; i<=n; i++){
        
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].t);
    }
    head = 1; 
    tail = n+1;
    
    
    /*模拟*/
    
    while (head != tail) {
        u = dequeue(); 
        c = min(q, u.t);                       /*执行时间片ｑ或所需时间ｕ.ｔ的处理*/
        u.t -= c;                              /*计算剩余所需的时间*/
        elaps += c;                            /*累计已经过的时间*/
        if(u.t >0) enqueue(u);                 /*如果处理尚未结束则重新添加至队列*/
        
        else{
            printf("%s %d\n", u.name, elaps);
        }
    }
    
    return 0;
}





















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

constexpr int64_t INF = 1e18;

constexpr int64_t f(int64_t b, int64_t n) {
    return n < b ? n : f(b, n / b) + n % b;
}

int main() {
    int64_t n, s;
    cin >> n >> s;

    int64_t ans = INF;
    if (n == s) ans = n + 1;

    for (int64_t b = 2; b <= sqrt(n); b++) {
        if (f(b, n) == s) ans = min(ans, b);
    }

    for (int64_t p = 1; p < sqrt(n); p++) {
        int64_t b = (n - s) / p + 1;
        if (b <= 1) continue;
        if (f(b, n) == s) ans = min(ans, b);
    }

    cout << (ans != INF ? ans : -1) << endl;
}


Measured memory_bytes: 256
import java.util.Scanner;
import java.lang.Math; 


class Main
{
  public static void main(String[] args)
  {
	Scanner input= new Scanner(System.in);
    int n= input.nextInt();
    
    if(n%2==0)
        System.out.print(n/2);
    else
        System.out.print(n/2 + 1);

  }
}

Measured memory_bytes: 22868
#include<cstdio>
#include<vector>
#include<map>
using namespace std;

typedef pair<int,int> P;

int time[1000];
int mon,day,h,m,p,tm,td;
char e;
vector<P> en[1000],ex[1000];

int cal(P a){return a.first*60+a.second;}

int common(int x){
  int res = 0;
  for(int i=0;i<(int)en[0].size();i++){
    for(int j=0;j<(int)en[x].size();j++){
      if(ex[x][j]<en[0][i] || ex[0][i]<en[x][j])continue;
      if(en[x][j]<=en[0][i])
	if(ex[x][j]<=ex[0][i])res += cal(ex[x][j]) - cal(en[0][i]);
	else res += cal(ex[0][i]) - cal(en[0][i]);
      else
	if(ex[x][j]<=ex[0][i])res += cal(ex[x][j]) - cal(en[x][j]);
	else res += cal(ex[0][i]) - cal(en[x][j]);
    }
  }
  return res;
}

int main(){
  int n;
  while(scanf("%d",&n) && n){
    for(int i=0;i<1000;i++)time[i] = 0;
    tm = 0;
    td = 0;

    for(int i=0;i<n;i++){
      scanf("%d/%d %d:%d %c %d",&mon,&day,&h,&m,&e,&p);
      if(tm!=mon || td!=day){
	if(en[0].size()){
	  for(int i=1;i<n;i++)
	    if(en[i].size())time[i] += common(i);
	}
	for(int i=0;i<n;i++){
	  en[i].clear();
	  ex[i].clear();
	}
	tm = mon;td = day;
      }
      if(e=='I')en[p].push_back(P(h,m));
      else ex[p].push_back(P(h,m));
    }
    if(en[0].size()){
      for(int i=1;i<n;i++)
	if(en[i].size())time[i] += common(i);
      for(int i=0;i<n;i++){
	en[i].clear();
	ex[i].clear();
      }
    }
    int ans = 0;
    for(int i=1;i<n;i++)ans = max(ans,time[i]);
    printf("%d\n",ans);
  }
}

Measured memory_bytes: 0
function main(input) {
    const params = input.trim().split(/[\n\s]/).map(str => ~~str);
    var tmp = [0, 0, 0, 0];
    params.forEach(param => {
        tmp[param - 1]++;
    });
    tmp.sort();
    const res = tmp[0] === 1 && tmp[1] === 1 && tmp[2] === 2 && tmp[3] === 2;
    console.log(res ? 'YES' : 'NO');
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));

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

// #undef DEBUG  // Uncomment this line to forcefully disable debug print.
#if DEBUG
template <typename T>
void debug(T value) {
  std::cerr << value;
}
template <typename T, typename... Ts>
void debug(T value, Ts... args) {
  std::cerr << value << ", ";
  debug(args...);
}
#define dbg(...)                              \
  do {                                        \
    cerr << #__VA_ARGS__ << ": ";             \
    debug(__VA_ARGS__);                       \
    cerr << " (L" << __LINE__ << ")" << endl; \
  } while (0)
#else
#define dbg(...)
#endif

void read_from_cin() {}
template <typename T, typename... Ts>
void read_from_cin(T& value, Ts&... args) {
  std::cin >> value;
  read_from_cin(args...);
}
#define in(type, ...) \
  type __VA_ARGS__;   \
  read_from_cin(__VA_ARGS__);

template <typename T>
void write_to_cout(const T& value) {
  std::cout << value << std::endl;
}
template <typename T, typename... Ts>
void write_to_cout(const T& value, const Ts&... args) {
  std::cout << value << ' ';
  write_to_cout(args...);
}
#define out(...) write_to_cout(__VA_ARGS__);

#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)

using ll = long long;

using namespace std;

struct S {
  int lowest, change;
  bool operator<(const S& s) const { return lowest > s.lowest; }
};

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

int main() {
  in(int, n);
  vector<string> s(n);
  rep(i, n) cin >> s[i];
  vector<S> left, right;
  for (const string& si : s) {
    int lowest = 0, change = 0;
    for (char c : si) {
      if (c == '(') {
        ++change;
      } else {
        --change;
      }
      Setmin(lowest, change);
    }
    if (change >= 0) {
      left.push_back({lowest, change});
      continue;
    }
    lowest = 0, change = 0;
    for (int i = si.size() - 1; i >= 0; --i) {
      if (si[i] == ')') {
        ++change;
      } else {
        --change;
      }
      Setmin(lowest, change);
    }
    right.push_back({lowest, change});
  }
  sort(all(left));
  sort(all(right));
  auto height = [&](const vector<S>& v) {
    int curr = 0;
    for (const auto& s : v) {
      if (curr + s.lowest < 0) {
        return -1;
      }
      curr += s.change;
    }
    return curr;
  };
  int l = height(left), r = height(right);
  if (l >= 0 && r >= 0 && l == r) {
    out("Yes");
  } else {
    out("No");
  }
}


Measured memory_bytes: 42440
#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <functional>
#include <bitset>

using namespace std;
using lint = long long int;
long long int INF = 1001001001001001LL;
int inf = 1000000007;
long long int MOD = 1000000007LL;
double PI = 3.1415926535897932;

template<typename T1,typename T2>inline void chmin(T1 &a,const T2 &b){if(a>b) a=b;}
template<typename T1,typename T2>inline void chmax(T1 &a,const T2 &b){if(a<b) a=b;}

#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()

/* do your best */


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


int main() {
  
  lint x; cin >> x;
  cout << 360 / gcd(360, x) << endl;

  return 0;
}


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

using ll = int64_t;
#define int ll

#define FOR(i, a, b) for (int i = int(a); i < int(b); i++)
#define REP(i, b) FOR(i, 0, b)
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define ALL(x) x.begin(), x.end()

using pi = pair<int, int>;
using vi = vector<int>;
using ld = long double;

template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
  os << "(" << p.first << "," << p.second << ")";
  return os;
}

template <class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << "{";
  REP(i, (int)v.size()) {
    if (i) os << ",";
    os << v[i];
  }
  os << "}";
  return os;
}

ll read() {
  ll i;
  scanf("%" SCNd64, &i);
  return i;
}

void printSpace() { printf(" "); }

void printEoln() { printf("\n"); }

void print(ll x, int suc = 1) {
  printf("%" PRId64, x);
  if (suc == 1) printEoln();
  if (suc == 2) printSpace();
}

string readString() {
  static char buf[3341000];
  scanf("%s", buf);
  return string(buf);
}

char *readCharArray() {
  static char buf[3341000];
  static int bufUsed = 0;
  char *ret = buf + bufUsed;
  scanf("%s", ret);
  bufUsed += strlen(ret) + 1;
  return ret;
}

template <class T, class U>
void chmax(T &a, U b) {
  if (a < b) a = b;
}

template <class T, class U>
void chmin(T &a, U b) {
  if (b < a) a = b;
}

template <class T>
T Sq(const T &t) {
  return t * t;
}

signed main() {
  int N = read();
  print(180 * (N - 2));
}


Measured memory_bytes: 256
/*@author hussein zayed ;
    ___  ___
   |\  \|\  \
   \ \  \_\  \
    \ \   ___ \USSEIN
     \ \  \\ \ \
      \ \__\\ \_\
       \|__| \|__|
****************************************
*/

#include <bits/stdc++.h>
using namespace std;
#define fr for(int i=0;i<n;++i)
#define fr1 for(int i=1;i<=n;++i)
#define cinA for(int i=0;i<n;++i){cin>>arr[i];}
#define cinA1 for(int i=1;i<=n;++i){cin>>arr[i];}
#define coutA for(int i=0;i<n;++i){cout<<arr[i]<<" ";}
#define ll long long
#define lnarray sizeof(arr)/sizeof(*arr)
#define vi vector<int>
#define vs vector<string>
void Fast()
{
    ios_base :: sync_with_stdio( 0 ) ;
    cin.tie( 0 ) ;
    cout.tie( 0 ) ;
}
inline int RD()
{
    int i ;
    cin>>i;
    return i;
}

inline float RF()
{
    float i ;
    cin>>i;
    return i;
}

inline double RDO()
{
    double i ;
    cin>>i;
    return i;
}

inline string RS()
{
    string i ;
    cin>>i;
    return i;
}

inline ll RLL()
{
    ll i ;
    cin>>i;
    return i;
}

int cm[200000];

ll sumSet(ll n)
{
    return (1ll*n*(n+1))/2;
}
string s;


bool isPrime(int n)
{
    if(n==1)
        return false;
    for(int i=2; i*i<=n; ++i)
    {
        if(n%i==0)
            return false;
    }
    return true;
}
int sumDigit(int n){
int sum =0;
  while (n != 0)
    {
        sum+= + n % 10;
        n = n / 10;
    }
    return sum;
}

ll power2(int n){
  ll ans=(1<<n);
  return ans;
}

ll sumpow2(ll n){
 ll sum=(n*(n+1)*(2*n-1))/6;
 return sum;
}

int main(){
    Fast();
//freopen("output.txt" , "w" , stdout);
//freopen("wall.in" , "r" , stdin);
int a=RD(), b=RD();
  int ans=a-b;
  if(ans>0)
   cout<<ans<<"\n";
   else
   cout<<"0\n";  
  
 }




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

border = list(range(400, 3201, 400))
cnt = [0] * (len(border) + 1)
for aa in a:
    for i, k in enumerate(border):
        if aa < k:
            cnt[i] += 1
            break
    else:
        cnt[i+1] += 1

k = len([i for i in cnt[:-1] if i > 0])
print(k, k + cnt[-1]) if k != 0 else print(1, cnt[-1])

Measured memory_bytes: 3064
#include<cstdio>
#include<iostream>
#include<cmath>
#include<vector>
#include<string>
#include<algorithm>

#define ll long long
#define LL long long
#define ULL unsigned long long 
#define ull unsigned long long 
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define RFOR(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<n;i++)
#define RREP(i,n) for(int i=(n)-1;i>=0;i--)

using namespace std;

int main()
{
	int len[200];
	int N;
	int ans=0;
	cin >> N;
	REP(i, 2*N) {
		cin >> len[i];
	}
	sort(len, len + 2 * N);
	for (int i = 0; i < N*2; i = i + 2) {
		ans +=min(len[i],len[i+1]);
	}

	cout << ans << endl;
	

	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//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; }

/* attention
    long longのシフト演算には気をつけよう
    タイポした時のデバッグが死ぬほどきつくなるので変数名は最低3字くらい使った方がいいかも
*/

int main(){
    int N, K; cin >> N >> K;
    cout << N+1-K << endl;
}

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

int main()
{
  int n, m;
  cin >> n >> m;
  vector<bool> ac(n);
  vector<int> wa(n);

  for (int i = 0; i < m; i++) {
    int p;
    string s;
    cin >> p >> s;
    p--;
    if (ac.at(p)) continue;
    if (s == "AC") {
      ac.at(p) = true;
    } else {
      wa.at(p)++;
    }
  }

  int ac_cnt = 0;
  int wa_cnt = 0;

  for (int i = 0; i < n; i++) {
    if (ac.at(i)) {
      ac_cnt++;
      wa_cnt += wa.at(i);
    }
  }
  cout << ac_cnt << ' ' << wa_cnt << endl;
}


Measured memory_bytes: 640
n = int(input())
t = list(map(int, input().split()))
m = int(input())
px = [list(map(int, input().split())) for i in range(m)]

for i in range(m):
  temp = t.copy()
  p, x = px[i]
  temp[p-1] = x
  print(sum(temp))

Measured memory_bytes: 3060
n = int(input())
a = list(map(int, input().split(' ')))

# import numpy as np
# ret = np.prod(a)

if a.count(0) > 0:
    print(0)
else:
    ret = 1
    for ai in a:
        ret *= ai
        if ret > 10**18:
            print(-1)
            break
    else:
        if ret > 10**18:
            print(-1)
        else:
            print(ret)

    # if ret > 10**18 or ret < 0:
    #     print(-1)
    # else:
    #     print(ret)

Measured memory_bytes: 21796
// freopen("input.txt", "rt", stdin);
// freopen("output.txt", "wt", stdout);
//#define _GLIBCXX_DEBUG//only for debugging
/*BISMILLAH UR RAHMAN*/ 
#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout<<fixed<<setprecision(10);
#define endl "\n"
#define pb push_back
#define all(v) v.begin(),v.end()
#define debug(x) std::cerr << #x << ": " << (x) << '\n';
#define sz(x) int(x.size())
#define INF INT_MAX;
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> ii;
int arr[int(1e5+10)];
int cnt[int(1e5+10)];
int main()
{  
  fast
  int n,k;
  cin>>n>>k;
  for(int i=1;i<=n;++i)cin>>arr[i];
  memset(cnt,0x3f3f3f,sizeof(cnt));
  cnt[1]=0;
  for(int i=2;i<=n;++i)
  { 
    for(int j=i-k;j<i;++j)
    {
      if(j>0)
      cnt[i]=min(cnt[i],cnt[j]+abs(arr[i]-arr[j]));
    }
  }
  cout<<cnt[n]<<endl;

}

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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define _abs(x)((x) < 0 ? (x) * -1 : (x))
#define _max(x, y)(max(0, max((x), (y))))
#define _min(x, y)(max(0, min((x), (y))))
template<typename T> inline bool __max__(T &x, const T &y) { return x < y ? x = y, 1 : 0; }
template<typename T> inline bool __min__(T &x, const T &y) { return x > y ? x = y, 1 : 0; }

#define pb push_back
#define mp make_pair

static const ll MOD = 1e9 + 7;
static const double PI = 3.141592653589793;


int main()
{
    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    //freopen("debug.txt", "w", stderr);

    cin.tie(0);
    ios::sync_with_stdio(false);

    string s;

    cin >> s;

    int ans = 0;

    int i, len = s.size();

    for (i = 0; i < len; i++) if (s[i] == '1') ans++;

    cout << ans << '\n';

    return 0;
}


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


int main(){
	int N;	//文字列の長さN
	int K;	//文字列のK番目を指定するための変数
	char S[50];		//入力した文字列

	//scanf_s("%d %d", &N, &K);
	//scanf_s("%s", &S,50);

	scanf("%d %d", &N, &K);
	scanf("%s", &S);

	S[K - 1] = S[K - 1] + 32;
	printf("%s\n", S);
}

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

int ctoi(char c) {
    int n = c - '0';
    return n;
}

int pow_int(int x, int n) {
    if (n == 0) {
        return 1;
    }else {
        int y = x;
        for (int i = 0; i < n-1; i++) {
            x *= y;
        }
        return x;
    }
}


int main() {
    string s;
    cin >> s;
    string s_rev = s;
    reverse(s_rev.begin(), s_rev.end());
    string half((s.size()-1)/2, 'a');
    rep(i, half.size()) {
        half[i] = s[i];        
    }
    string half_rev = half;
    reverse(half_rev.begin(), half_rev.end());
    if (s == s_rev && half == half_rev) {
        cout << "Yes" << endl;
    }else {
        cout << "No" << endl;
    }
}


Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <vector>
#include <iomanip>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <map>
#include <set>
#include <cmath>
using namespace std;

int main() {
    int A;
    int B;
    int C;
    int D;

    cin >> A >> B >> C >> D;

    int T[2] = {(int)ceil((double)C/B), (int)ceil((double)A/D)};

    cout << (T[0] <= T[1] ? "Yes" : "No") << endl;

    return 0;
}

Measured memory_bytes: 3592
N = int(input())
a = [0 for _ in range(N)]
for i in range(N):
    S, P = map(str, input().split())
    a[i] = [S, -int(P), i + 1]
b = sorted(a, key = lambda x: (x[0], x[1]))
for i in range(N):
    print(b[i][2])


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

using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
#define a first
#define b second
#define sz size()
#define pb(x) push_back(x) 
#define bg begin()
#define ed end()
#define rep(i,n) for(ll i=0;i<n;i++)
#define rep1(i,n) for(ll i=1;i<=n;i++)
#define mp(x,y) make_pair(x,y)
const ll MOD=1000000007;

vector<ll> pw2(51,1);
vector<ll> pw10(19,1);

ll maxx(ll x,ll y,ll z){
	return max(max(x,y),z);
}
ll minn(ll x,ll y,ll z){
	return min(min(x,y),z);
}
ll gcd(ll x,ll y){
	if(x%y==0) return y;
    else return gcd(y,x%y);
}
ll lcm(ll x,ll y){
	return x*(y/gcd(x,y));
}
ll myceil(ll x,ll y){
	if(x<=y) return 1;
	else if(x%y==0) return x/y;
	else return x/y+1;
}

//a,b x
int main(){
	rep1(i,18) pw10[i]=10*pw10[i-1];
	ll N; cin>>N;
	ll n=sqrt((double)N),A,B;
	for(int i=n;i>=1;i--){
		if(N%i==0){
			A=i,B=N/i;
			break;
		}
	}
	ll i=0,j=0;
	while(pw10[i]<=A){
		i++;
	}
	while(pw10[j]<=B){
		j++;
	}
	cout<<max(i,j);
}

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

int V;
vector<vector<int>> mat;
vector<int> color;
vector<vector<int>> parts;
vector<pair<int, int>> ab;

bool dfs(int u, int c) {
    color[u] = c;
    parts[c].emplace_back(u);
    for (int v = 0; v < V; v++) if (v != u && mat[u][v]) {
        if (~color[v]) {
            if (color[v] == color[u]) return false;
        } else {
            if (!dfs(v, c ^ 1)) return false;
        }
    }
    return true;
}

bool is_bipartite() {
    color.assign(V, -1);
    parts.clear(); parts.resize(2);
    for (int u = 0; u < V; u++) if (!~color[u]) {
        if (!dfs(u, 0)) return false;
        ab.emplace_back(parts[0].size(), parts[1].size());
        parts.clear(); parts.resize(2);
    }
    return true;
}

int main() {
    int E; cin >> V >> E;
    mat.assign(V, vector<int>(V, 1));
    for (int i = 0; i < E; i++) {
        int a, b; cin >> a >> b; a--; b--;
        mat[a][b] = mat[b][a] = 0;
    }
    if (!is_bipartite()) {
        cout << -1 << endl;
        return 0;
    }
    vector<int> dp(V * 2 + 1, false);
    dp[0] = true;
    for (auto &p: ab) {
        for (int j = V; j >= 0; j--) if (dp[j]) {
            dp[j] = false;
            dp[j + p.first] = dp[j + p.second] = true;
        }
    }
    int idx = -1;
    for (int j = 0; j <= V; j++) if (dp[j]) {
        if (abs(idx - V / 2) > abs(j - V / 2)) idx = j;
    }
    int a = idx, b = V - idx;
    int res = a * (a - 1) / 2 + b * (b - 1) / 2;
    cout << res << endl;
    return 0;
}

Measured memory_bytes: 2176
fun main() {
	val n = readLine()!!.toLong()
	for(i in -5404L..5404L) {
		for(j in -5404L..5404L) {
			if(i*i*i*i*i-j*j*j*j*j==n) {
				println("$i $j")
				return
			}
		}
	}
}


Measured memory_bytes: 34488
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define INF (1LL<<50)
#define MOD 1000000007

int main(){
    int N,M;
    cin >> N >> M;
    int ans=N*(N-1)/2;
    ans+=M*(M-1)/2;
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int,int> P;
int INF = 1e16+7;
int mod = 1e9+7;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
signed main() {
    int N;
    string S;
    cin >> N >> S;
    vector<set<int>>cnt(26);
    for(int i = 0; i < N; i++) {
        cnt[S[i]-'a'].insert(i);
    }
    int Q;
    cin >> Q;
    while (Q--) {
        int x;
        cin >> x;
        if(x == 1) {
            int y;
            char c;
            cin >> y >> c;
            y--;
            cnt[S[y]-'a'].erase(cnt[S[y]-'a'].find(y));
            cnt[c-'a'].insert(y);
            S[y] = c;
        }
        else {
            int l,r;
            cin >> l >> r;
            l--;r--;
            int res = 0;
            for(int i = 0; i < 26; i++) {
                if(cnt[i].lower_bound(l) != cnt[i].end()) {
                    if(*cnt[i].lower_bound(l) <= r) {
                        res++;
                    }
                }
            }
            cout << res << endl;
        }
    }
}


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

int main(){
    int n; cin >> n;
    int a[9],b[9];
    bool ok = false;
    for(int i = 0; i < 9; i++) a[i] = i+1,b[i] = i+1;
    for(int i = 0; i < 9; i++){
        for(int j = 0; j < 9; j++){
            if(n % a[i] == 0 && n / b[j] == a[i] && n % b[j] == 0){ ok = true; break; }
        }
        if(ok) break;
    }
    if(ok) cout << "Yes" << endl;
    else   cout << "No" << endl;
    return 0;
}

Measured memory_bytes: 256
#include<stdio.h>
int main(void)

{
	int H, W, i, a;

	while (1)
	{
		scanf("%d %d", &H, &W);
		if (H == 0 && W == 0)
		{
			break;
		}
		for (i = 0; i < H; i++)
		{
			if (i == 0 || i == H - 1)
			{
				for (a = 0; a < W; a++)
				{
					printf("#");
				}printf("\n");
			}
			else
			{
				for (a = 0; a < W; a++)
				{
					if (a == 0 || a == W - 1)
					{
						printf("#");
					}

					else
					{
						printf(".");
					}
				}printf("\n");
			}
		}
			printf("\n");

	}

		return 0;
}


Measured memory_bytes: 2612
N,M,K = map(int,input().split())
A = list(map(int, input().split()))
B = list(map(int,input().split()))

#片方の机から何も選ばれない場合での配列を作成
a, b = [0], [0]
for i in range(len(A)):
    a.append(a[i]+A[i])
for i in range(len(B)):
    b.append(b[i]+B[i])
#すべてJの場合から減らしていく
ans,j=0,M
for i in range(N+1):
    if a[i] > K:
        break
    #すべてBの総和がK-a[i]より小さくなるjを測定
    while b[j] > K - a[i]:
        j -= 1
    #i+jとansのうち大きい方を答えにする。
    ans= max(ans,i+j)

print(ans)

Measured memory_bytes: 134024
#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


int main(){

	int A,B,C;

	scanf("%d %d %d",&A,&B,&C);

	if(A+B >= C){

		printf("Yes\n");

	}else{

		printf("No\n");
	}

	return 0;
}


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

namespace ABC124cs
{
    class Program
    {
        static void Main(string[] args)
        {
            var x = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            var max = x.Max();
            var min = x.Min();
            var result = 0;
            if (max == min)
            {
                result = max * 2;
            }
            else
            {
                result = max + max - 1;
            }
            Console.WriteLine(result);
        }
    }
}


Measured memory_bytes: 13396
#include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<utility>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<unordered_set>
#include<unordered_map>
#include<bitset>
#include<iomanip>
#include<list>
#include<deque>
using namespace std;
//#define MODE 1
#ifdef MODE
#define DEB(X) cout<< #X <<": "<<X<<" ";
#define DEB2(X) cout<<X<<" ";
#define END cout<<endl;
#else
#define DEB(X) {}
#define DEB2(X) {}
#define END {}
#endif
typedef long long ll;
#define int ll
#define uset unordered_set
#define umap unordered_map
//typedef std::pair<int,int> P;
struct edge{int to,cost;};
const int INF=100000000000000000;
const int INF2=9223372036854775807;
const int MOD=1000000007;
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define min(X,Y) (((int)(X)<(int)(Y))?(X):(Y))
#define max(X,Y) (((int)(X)>(int)(Y))?(X):(Y))
#define NP(X,Y) next_permutation(X,Y)
#define setdouble(X,Y) cout<<fixed<<setprecision(X)<<Y
int ceil2(int a,int b){if(a%b==0){return a/b;}else{return a/b+1;}}
int pow2(int a,int b){int r=1;for(int i=1;i<=b;i++){r*=a;}return r;}
int Log2(int a){int t=0;while(1){if(a==0||a==1){break;}a/=2;t++;}return t;}

int H,W;
int N;

signed main(){
	cin>>H>>W>>N;
	cout<<ceil2(N,max(H,W))<<endl;
	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

using ll = long long;

void print(){ std::cout << std::endl; }
template <typename Head> void print(Head&& head) { std::cout << head << std::endl; }
template <typename Head, typename... Tail> void print(Head&& head, Tail&&... tail)
{
  std::cout << head << " ";
  print(std::forward<Tail>(tail)...); // or print(tail...);
}

template<typename T> T lmaximum(const std::vector<T>& v){return *std::max_element(v.begin(), v.end());}

int main()
{
  ll N;
  std::cin >> N;

  std::vector< ll > vl(N);
  for (ll i = 0; i < N; i++) {
    std::cin >> vl[i];
  }

  ll sum = std::accumulate(vl.begin(), vl.end(), 0);
  ll max_val = lmaximum(vl);

  if (sum - max_val > max_val) {
    print("Yes");
  } else {
    print("No");
  }

  return 0;
}


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

int main() {
	int n;
	cin >> n;
	vector<int> v(n);
	rep(i,n) cin >> v[i];
	sort(v.begin(), v.end());
	reverse(v.begin(), v.end());
	int ans=0;
	rep(i,n){
		if(i%2==0) ans+=v[i];
		else ans-=v[i];
	}
	cout << ans << endl;
}


Measured memory_bytes: 256
#include<iostream>
#include<cmath>
#include<vector>
#include<queue>
#include<algorithm>
#include<set>
#include<cstring>
#include<iterator>
#include <map>
using namespace std;

char matr[10][10];
int matr_num[10][10], arr[15], arr_line[10], arr_col[10];
int main()
{
    long long t, i, j, k, h, w, n, ch, ch1, count = 0, prev_left, prev_right, m;
    cin >> h >> w >> k;
    for (i = 0; i < h; i++)
        for (j = 0; j < w; j++)
            cin >> matr[i][j];
    for (i = 0; i < h; i++)
        for (j = 0; j < w; j++) {
            if (matr[i][j] == '.')
                matr_num[i][j] = 0;
            if (matr[i][j] == '#') {
                matr_num[i][j] = 1;
                count++;
            }
        }
    for (i = 0; i < h; i++)
        arr_line[i] = 0;
    for (i = 0; i < w; i++)
        arr_col[i] = 0;
    for (i = 0; i < h; i++)
        for (j = 0; j < w; j++)
            arr_line[i] += matr_num[i][j];
    for (i = 0; i < w; i++)
        for (j = 0; j < h; j++)
            arr_col[i] += matr_num[j][i];
//    for (i = 0; i < h; i++)
//        cout << arr_line[i] << " ";
//    cout << endl;
//    for (i = 0; i < w; i++)
//        cout << arr_col[i] << " ";
    long long ans = 0;
    for (i = 0; i < pow(2, h + w); i++){
        for (j = 0; j < h + w; j++)
            arr[j] = 0;
        j = i;
        t = 0;
        while (j > 0){
            arr[t] = j % 2;
            j = j / 2;
            t++;
        }
        long long result = 0;
        for (j = 0; j < h; j++)
            result += arr[j] * arr_line[j];
//        cout << result << "!" << endl;
        for (j = h; j < h + w; j++)
            result += arr[j] * arr_col[j - h];
//        cout << result << "?" << endl;
        for (j = 0; j < h; j++)
            for (long long j1 = 0; j1 < w; j1++) {
                result = result - matr_num[j][j1] * arr[j] * arr[h + j1];
//                if ((arr[j] && arr[h + j1])&&(i == 17))
//                    cout << j << " " << arr[j] << " ! " << j1 << " " << arr[j1] << " ! " << result << endl;
            }
//        cout << result << " " << i << endl;
        if (result == count - k) {
            ans++;
//            for (j = 0; j < h + w; j++)
//                cout << arr[j] << " ";
//            cout << endl << i << endl;
        }
    }
    cout << ans;
    return 0;
}

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

int main() {
    int x,y,z;
    cin >> x >> y >> z;
    cout << z << ' ' << x << ' ' << y << endl;
    return 0;
}

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

int main(){
    string s;
    cin >> s;
    set<int> set{s.at(0),s.at(1),s.at(2),s.at(3)};
    if(set.size()==2){
        int count = 0;
        for(int i=1;i<4;i++){
            if(s.at(0)==s.at(i))count++;
        }
        if(count==1){
            cout << "Yes" << endl;
        }else{
            cout << "No" << endl; 
        }
    }else{
        cout << "No" << endl;
    }
}


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

typedef long long ll;
#define int ll

using namespace std;

signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n,k;
    cin>>n>>k;
    int ans=0;
    while(n--)
    {
        int h;
        cin>>h;
        if(h>=k)
            ans++;
    }
    cout<<ans;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <unordered_map>
#include <map>
#include <limits.h>
#include <unordered_set>
#include <stack>
#define fo(i,l,r) for(int i=l;i<=r;++i)
#define fi(i,r,l) for(int i=r;i>=l;--i)
#define pb push_back
#define po pop_back
using namespace std;
void swap(int *a,int *b){
    int tmp = *a;
    *a = *b;
    *b = tmp;
}
void input(vector<int>& arr,int n){
    fo(i,0,n-1){
        cin>>arr[i];
    }
}
void print(vector<int>& ans,int n){
    fo(i,0,n-1){
        cout<<ans[i]<<" ";
    }
    cout<<endl;
}
bool solve(){
    int n;
    cin>>n;
    int x = n;
    while(x){
        int rem = x%10;
        if(rem==7){
            return true;
        }
        x = x/10;
    }
    return false;
}
int main(){
    if(solve()){
        cout<<"Yes";
    }else{
        cout<<"No";
    }
    cout<<endl;
}

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

#define int long long
#define ll long long
#define pb push_back

main(){
    int n;
    cin >> n;
    vector<int> a(n + 1);
    for(int i = 0; i < n + 1; i++) cin >> a[i];
    int now = 1;
    vector<int> maxi(n + 1);
    for(int i = 0; i < n + 1; i++){
        if (a[i] > now){
            cout << -1;
            return 0;
        }
        now -= a[i];
        maxi[i] = now;
        now *= 2;
        now = min(now, (ll) 1e14);
    }
    now = 0;
    for(int i = n; i >= 0; i--){
        maxi[i] = min(maxi[i], now);
        now += a[i];
    }
    int ans = 0;
    for(int i = 0; i < n + 1; i++){
        ans += maxi[i];
        ans += a[i];
    }
    cout << ans;
}


Measured memory_bytes: 4776
def main():
    n = int(input())
    hs = list(map(int, input().split()))
    res = hs[0]
    for i in range(1, n):
        if hs[i] > hs[i - 1]:
            res += hs[i] - hs[i - 1]
    print(res)


if __name__ == "__main__":
    main()


Measured memory_bytes: 2940
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define Yes                \
    cout << "Yes" << endl; \
    return 0;
#define No                \
    cout << "No" << endl; \
    return 0;
using namespace std;
using ll = long long;
const int INF = 1001001001;
const int MOD = 1000000007;
typedef long long ll;

template <typename T>
void print(const T &v);

int main()
{
    string S;
    cin >> S;
    int cnt = 0;
    for (char c : S)
    {
        if (c == '+')
            cnt++;
        if (c == '-')
            cnt--;
    }
    cout << cnt << endl;
    return 0;
}

// Use For Debug
template <typename T>
void print(T const &v)
{
    for (int i = 0; i < v.size(); i++)
    {
        if (i)
            cout << " ";
        cout << v[i];
    }
    cout << endl;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(int argc, const char * argv[]) {
    // insert code here...
    int x[5][4][11], n, a, b, c, d, i, j, k;
    scanf("%d", &n);
    for (i=1; i<=4; i++) {
        for (j=1; j<=3; j++) {
            for (k=1; k<=10; k++) {
                x[i][j][k]=0;
            }
        }
    }
    for (int m=0; m<n; m++) {
        scanf("%d %d %d %d", &a, &b, &c, &d);
        x[a][b][c]+=d;
    }
    for (i=1; i<=4; i++) {
        for (j=1; j<=3; j++) {
            for (k=1; k<=10; k++) {
                printf(" %d", x[i][j][k]);
            }
            printf("\n");
                
        }
            
        if(i != 4){
                
            printf("####################\n");
            
        }
    }
    return 0;
}



Measured memory_bytes: 2040
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
#define FOR(i,n,j) for(int i=(j);i<(n);++i)
#define ssort(n) sort((n).begin(),(n).end())
#define rsort(n) sort((n).begin(),(n).end(),greater<int>())
#define mp make_pair
using ll=long long;
using ld=long double;
typedef pair<int,int> P;
typedef pair<P,int> COST;
#define repl(i,n) for(ll i=0;i<(n);++i)
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
#define YES cout << "YES" << endl
#define NO cout << "NO" << endl
using Graf=vector<vector<ll>>;
#define MAX 1000000007

/*
void dfs(int v){
    印つける
    for(auto next_v:G[v]){
        探索済->continue
        dfs(next_v);
    }
}
*/
int main()
{
    int n;
    cin >> n;
    ll ans=0;
    ll double_num=0;
    
    rep(i,n-1){
        
        ans+=n/(i+1);
        if(n%(i+1)==0){
            ans--;
        }
    }
    cout << ans << endl;
}

Measured memory_bytes: 3632
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <array>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

using namespace std;

int main() {
    int A,B,C;
    cin>>A>>B>>C;
    if(A+B>=C)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    return 0;
}

Measured memory_bytes: 256
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i, begin, n) for (int i = begin; i < n; i++)
#define repe(i, begin, n) for (int i = begin; i <= n; i++)
#define repr(i, begin, n) for (int i = begin; i > begin - n; i--)
#define repre(i, begin, end) for (int i = begin; i >= end; i--)

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

const int inf = 1000000007;
const int MOD = 1000000007;
const long long INF = 1000000000000000007;

// -------------------------------------------------------
int A, B;

int main() {
  cin >> A >> B;
  cout << A * B << endl;
}


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

int main(){
  int ans=0;
  int N,M;
  cin>>N>>M;
  std::vector<int> v(N,0),w[N];
  int a,b;
  for(int i=0;i<M;i++){
    cin>>a>>b;
    a--;b--;
    w[a].push_back(b);
    w[b].push_back(a);
  }
  stringstream ss;
  int j;
  for(int i=0;i<N;i++){
    if(w[i].size()){
      ss<<i+1;
      j=i;
      v[i]++;
      break;
    }
  }
  ans++;
  int k=j;
  bool f=true;
  while(f){
    for(int i=0;i<w[j].size();i++){
      if(v[w[j][i]]==0){
        ss<<" "<<w[j][i]+1;
        ans++;
        v[w[j][i]]++;
        j=w[j][i];
        break;
      }
      if(i==w[j].size()-1)f=false;
    }
  }
  j=k;
  f=true;
  std::vector<string> sss;
  while(f){
    for(int i=0;i<w[j].size();i++){
      if(v[w[j][i]]==0){
        sss.push_back(" ");
        sss.push_back((to_string)(w[j][i]+1));
        ans++;
        v[w[j][i]]++;
        j=w[j][i];
        break;
      }
      if(i==w[j].size()-1)f=false;
    }
  }
  reverse(sss.begin(),sss.end());
  cout<<ans<<endl;
  for(int pp=0;pp<sss.size();pp++)cout<<sss[pp];
  cout<<ss.str()<<endl;
}


Measured memory_bytes: 8712
#include <bits/stdc++.h>
#include <tuple>
#include <iterator>
using namespace std;
using ll = long long;
const int INF = 1000000;

int main()
{
  bool num[300000];
  for (int i = 0; i < 300000; ++i)
  {
    if (i % 7 == 1 || i % 7 == 6)
      num[i] = true;
    else
      num[i] = false;
  }
  int n;
  while (cin >> n, n != 1)
  {
    vector<int> a;
    int t = n;
    for (int i = 6; i <= n; ++i)
    {
      if (num[i] && t % i == 0)
      {
        a.push_back(i);
      }
    }
    for (int i = 0; i < a.size(); ++i)
      for (int j = 0; j < a.size(); ++j)
      {
        if (i == j)
          continue;
        if (a[j] % a[i] == 0)
        {
          a.erase(a.begin() + j);
          j--;
        }
      }
    cout << n << ':';
    for (auto &e : a)
      cout << ' ' << e;
    cout << endl;
  }

  return 0;
}


Measured memory_bytes: 3384
#include <stdio.h>
int main(void){
char s[100];
 int count;
  scanf("%s",s);
  for(count=0;s[count]!='\0';count++){
    if(s[count]=='A'){s[count]='T';}
     else if(s[count]=='T'){s[count]='A';}
     else if(s[count]=='C'){s[count]='G';}
     else if(s[count]=='G'){s[count]='C';}
  }
  printf("%s",s);
}

Measured memory_bytes: 128
d,n=map(int,input().split())
if d==0 and n!=100:
    print(n)
elif d==0 and n==100:
    print(101)
elif d==1 and n!=100:
    print(n*100)
elif d==1 and n==100:
    print(10100)
elif d==2 and n!=100:
    print(n*10000)
elif d==2 and n==100:
    print(1010000)

Measured memory_bytes: 3060
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
int main(){
    int n,k,q;
    cin >> n >> k >> q;
    vector<int> sanka(n);
    rep(i,n) sanka[i] = k-q;
    
    rep(i,q){
        int a;
        cin >> a;
        a--;
        sanka[a]++;
}
rep(i,n){
    if(sanka[i]>0) cout << "Yes" << endl;
    else        cout << "No" << endl;
}
}

Measured memory_bytes: 1024
/************************************
/ AUTHOR : YATHARTH GOSWAMI         /  
/ ALIAS : hacker_yg                 /
/ INSTITUTE : IIT Kanpur            /
************************************/
//          TEMPLATE                //

#include <bits/stdc++.h>

#define ll long long
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define PI 3.14159265359

using namespace std;

/*ll powMod(ll a, ll y)
{
    ll ans = 1;
    
    while (y > 0) 
    { 
        if (y & 1) 
            ans = (ans*a) % MOD; 
  
        y = y>>1;
        a = (a*a) % MOD; 
    } 
    return ans;
}*/

/*ll modInv(ll a)
{
    return powMod(a, MOD-2);	
}*/

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    int h, w, m;
    cin >> h >> w >> m;
    vector <pair <int, int>> v(m);
    for (int i = 0; i < m; i++) cin >> v[i].F >> v[i].S;
    int ans = 0, maxr = -1, maxcol = -1;
    map <int, int> m1, m2;
    for (int i = 0; i < m; i++) {
        m1[v[i].F]++; m2[v[i].S]++;
    }
    for (int i = 1; i <= h; i++) maxr = max(maxr, m1[i]);
    for (int i = 1; i <= w; i++) maxcol = max(maxcol, m2[i]);
    ll count = 0, a = 0, b = 0;
    for (int i = 1; i <= h; i++) if (m1[i] == maxr) a++;
    for (int i = 1; i <= w; i++) if (m2[i] == maxcol) b++;
    for (pair<int, int> p : v) {
        if (m1[p.F] == maxr && m2[p.S] == maxcol) count++;  
    }
    if (count < a*b) cout << maxr + maxcol << endl;
    else cout << maxr + maxcol - 1 << endl;
    return 0;
}




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

int main() {
    int N,R; cin >> N >> R;
    cout << R + (10 - min(10,N))*100 << endl;
}

Measured memory_bytes: 764
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair <int, int>
#define app push_back
#define all(a) a.begin(), a.end()
#define bp __builtin_popcountll
#define ll long long
#define mp make_pair
#define f first
#define s second
#define Time (double)clock()/CLOCKS_PER_SEC

const int MOD = 1000 * 1000 * 1000 + 7;
int mod(int n) {
    n %= MOD;
    if (n < 0) return n + MOD;
    else return n;
}   
int fp(int a, int p) {
    int ans = 1, c = a;
    for (int i = 0; (1ll << i) <= p; ++i) {
        if ((p >> i) & 1) ans = mod(ans * c);
        c = mod(c * c);
    }   
    return ans;
}   
int dv(int a, int b) { return mod(a * fp(b, MOD - 2)); }


signed main() {
    #ifdef HOME
    freopen("input.txt", "r", stdin);
    #else
    #define endl '\n'
    ios_base::sync_with_stdio(0); cin.tie(0);
    #endif

    int n;
    cin >> n;
    string s;
    cin >> s;

    int ans = 1;
    int open = 0;
    for (int i = 0; i < 2 * n; ++i) {
        if (open < 0) {
            cout << 0 << endl;
            exit(0);
        }   

        bool w = s[i] == 'B';
        if ((open&1) == w) {
            ans = mod(ans * open);
            --open;
        }   
        else {
            ++open;
        }

        if (open < 0) {
            cout << 0 << endl;
            exit(0);
        }   

    }   

    //cout << "tak " << ' ' << open << endl;

    if (open) {
        cout << 0 << endl;
        exit(0);
    }   

    for (int i = 1; i <= n; ++i)
        ans = mod(ans * i);
    cout << ans << endl;
}

Measured memory_bytes: 720
n = input()

counter = [108]* 26
alphabet = "abcdefghijklmnopqrstuvwxyz"
for i in range(n):
    s = raw_input()
    for c in range(26):
        counter[c] = min(counter[c], s.count(alphabet[c]))

res = ""
for c in range(26):
    res += alphabet[c] * counter[c]
print res
        

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

using namespace std;

void solveA()
{
    int x;
    cin >> x;
    if (x == 7|| x == 5|| x == 3)
        cout << "YES\n";
    else
        cout << "NO\n";
}

void solveB()
{
    int a, b, c;
    cin >> a >> b >> c;

    int hp = max(a, b);
    hp = max(hp, c);

    int area;

    if (a == hp)
        area = (b * c) / 2;
    if (b == hp)
        area = (a * c) / 2;
    if (c == hp)
        area = (a * b) / 2;

    cout << area;
}

void solveC()
{
    int a, b;
    cin >> a >> b;
    if ((a*b) % 2 == 0)
        cout << "No\n";
    else
        cout << "Yes\n";
}

void solveD()
{
    int n, s=0, cp;

    cin >> n;
    cp = n;

    while (cp){
        s += cp%10;
        cp /= 10;
    }
    if (n % s == 0)
        cout << "Yes\n";
    else
        cout << "No\n";
}

void solveE()
{
    int n, t;

    cin >> n >> t;

    int rotas[n][2];

    int coast = INT_MAX;

    for (int i = 0; i < n; i++){

        cin >> rotas[i][0] >> rotas[i][1];

        if (rotas[i][1] < t){
            coast = min(coast, rotas[i][0]);
        }
    }
    if (coast == INT_MAX)
        cout << "TLE\n";
    else
        cout << coast << "\n";
}

void solveF()
{
    int k;
    cin >> k;
    int par = 0, impar = 0;
    for (int i = 1; i <= k ; i++){
        if (i % 2 == 0)
            par++;
        else
            impar++;
    }
    cout << par * impar << endl;
}

int main(int qtd, char* nome[])
{
    ios::sync_with_stdio(false);

    solveF();

    return 0;
}


Measured memory_bytes: 256
N = int(input())
S = input()
ans = 0

for i in range(1, N):
    S1 = S[:i]
    S2 = S[i:]
    list_S1 = list(S1)
    list_S2 = list(S2)
    _and = set(list_S1) & set(list_S2)
    and_num = len(_and)
    if ans < and_num:
        ans = and_num

print(ans)

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

int main(){
    int d[5];
    int e[5];
    int sum=0;
    for(int i=0; i<5; i++){
        cin >> d[i];
    }

    for(int i=0; i<5; i++){
        if(d[i]%10==0){
            e[i]=0;
        }
        else if(d[i]<10&&d[i]%10!=0){
            e[i]=10-d[i];
        }
        else if(d[i]>10&&d[i]%10!=0){
        e[i]=10-d[i]%10;
        }
    }

    int wt=-1;
    int num;
    for(int i=0; i<5; i++){
        if(wt<e[i]){
            wt=e[i];
            num=i;
        }
    }

    for(int i=0; i<5; i++){
        if(i!=num){
            sum+=d[i]+e[i];
        }
    }

    cout << sum+d[num] << endl;
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define st first
#define nd second
#define mp make_pair
#define pb push_back
#define N 1000005
using namespace std;

int n, say[30];
long long ans = 1;
char s[N];

int main() {
	// freopen("in.txt", "r", stdin);
	// freopen("out.txt", "w", stdout);
	scanf("%s",s + 1);
	n = strlen(s + 1);
	for(int i = 1; i <= n; i++)
		say[s[i] - 'a']++;
	for(int i = 1; i <= n; i++){
		say[s[i] - 'a']--;
		ans += n - i - say[s[i] - 'a'];
	}
	printf("%lld\n", ans);
	return 0;
}

Measured memory_bytes: 384