akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <cstring>
#include <map>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <set>
#include <vector>
#include <queue>
#include <list>
#include <numeric>
#include <stdio.h>
#include <string>
#include <cstdlib>
#include <math.h>
#include <stack>
#include <climits>
#include <bitset>
#include <utility>


using namespace std;
typedef long long ll;

//最小公倍数
ll gcd(ll x, ll y) {
  ll tmp = 0;
  if (x < y){
    tmp=x;
    x=y;
    y=tmp;
  }
  while (y > 0) {
    ll r = x % y;
    x = y;
    y = r;
  }
  return x;
}

//最大公倍数
ll lcm(ll x,ll y){
  return x/gcd(x,y)*y;
}

//階乗
ll kaijo(ll k){
    ll sum = 1;
    for (ll i = 1; i <= k; ++i)
    {
        sum *= i;
        sum%=1000000000+7;
    }
    return sum;
}

//for(int i = ; i < ; i++){}

ll lmax(ll s,ll t){
  if(s>t){
    return s;
  }
  else{
    return t;
  }
}

ll lmin(ll s,ll t){
  if(s<t){
    return s;
  }
  else{
    return t;
  }
}
// ここから開始

int main(){
  int x;
  cin>>x;
  cout<<((x<1200)?"ABC":"ARC")<<endl;
  return 0;
}


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

// 型定義
typedef long long ll;
typedef pair<ll, ll> P;

// forループ
#define REP(i,n) for(ll i=0; i<(ll)(n); ++i)

// 定数宣言
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

// グラフ表現
using Graph = vector<vector<int>>;

// グラフの辺表現
using Edge = map<pair<int,int>,int>;

// n次元配列の初期化。第２引数の型のサイズごとに初期化していく。
template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

// 最大公約数
ll gcd(ll a,ll b){
   if (a%b == 0) return(b);
   else return(gcd(b, a%b));
}

// 最小公倍数
ll lcm(ll a, ll b){
    return a/gcd(a, b) * b;
}

int main()
{
    cout << fixed << setprecision(15);
    ll N;
    cin >> N;

    vector<ll> A(N);

    REP(i, N){
        cin >> A[i];
    }

    sort(A.rbegin(), A.rend());

    priority_queue<ll> que;

    ll ans = 0;
    REP(i, N){
        if(i == 0){
            que.push(A[i]);
            continue;
        }
        ans += que.top();
        // cout << que.top() << endl;
        que.pop();
        que.push(A[i]);
        que.push(A[i]);
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 6928
import numpy as np
import heapq as hp
 
H, W = map(int, input().split())
s = np.array([list(input()) for _ in range(H)])
s = np.pad(s, 1, "constant")
visited = np.zeros_like(s, dtype=np.bool)

dist = np.inf
 
h = []
hp.heappush(h, (0, 1, 1))
 
while h:
    d, x, y = hp.heappop(h)
    if x == H and y == W:
        dist = d
        break
    for dx, dy in [[0, 1], [1, 0], [-1, 0], [0, -1]]:
        nx = x + dx
        ny = y + dy
        if s[nx, ny] == "." and not visited[nx, ny]:
            visited[nx, ny] = True
            hp.heappush(h, (d + 1, nx, ny))

if dist == np.inf:
    print(-1)
else:
    print((s == ".").sum() - dist - 1)

Measured memory_bytes: 12504
#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int M=N;
  int sum=0;
  
  while(N>0){
    sum+=N%10;
    N/=10;
    }
  if(M%sum==0) {
    cout << "Yes" << endl;}
  else {
    cout << "No" << endl;}
  }


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

int main() {
    string s, t;
    cin >> s >> t;

    sort(s.begin(), s.end());
    sort(t.begin(), t.end(), greater<char>());

    string ans = (s < t) ? "Yes" : "No";

    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<sstream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<cmath>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<numeric>
#include<functional>
#include<algorithm>
#include<bitset>
#include<tuple>
#include<unordered_set>
#include<random>
#include<array>
#include<cassert>
using namespace std;
#define INF (1<<29)
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define uniq(v) v.erase(unique(all(v)),v.end())


int n, m;
int in[100000];
vector<int> edge[100000];

vector<int> rev[100000];
int cnt[100000];


bool done[100000];
int par[100000];


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

	cin >> n >> m;
	rep(i,n+m-1) {
		int a, b;
		cin >> a >> b;
		a--; b--;
		in[b]++;
		edge[a].push_back(b);
		rev[b].push_back(a);
	}
	int root = -1;
	rep(i, n)if (in[i] == 0)root = i;

	memset(par, -1, sizeof(par));
	queue<int> q;
	q.push(root);
	while (!q.empty()) {
		int u = q.front();
		q.pop();

		for (int v : edge[u]) {
			if (++cnt[v] == rev[v].size()) {
				par[v] = u;
				q.push(v);
			}
		}
	}
	
	rep(i,n) {
		cout << par[i] + 1 << endl;
	}



	return 0;
}

Measured memory_bytes: 12928
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

#define SORT(c) sort((c).begin(),(c).end())
#define ANS(ans) cout<<(ans)<<endl;


//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  for(int i=0;i<(n);++i)
#define VI(v,n) vector<int> (v)((n))


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

	string s;
	cin >> s;

	int a = 0, b = 0;
	REP(i, n) {
		if (s[i] == 'c' || a+b==A+B) {
			cout << "No" << endl;
		}
		else {
			if (s[i] == 'a') {
				a++;
				cout << "Yes" << endl;
			}
			else if (s[i] == 'b' && b < B) {
				b++;
				cout << "Yes" << endl;
			}
			else {
				cout << "No" << endl;
			}

		}
	}




	return 0;
}



Measured memory_bytes: 896
#include<bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define mp make_pair
#define pb push_back
#define il inline
#define rg register
#define lch(x) ((x)<<1)
#define rch(x) ((x)<<1^1)
#define rep(i,st,ed) for(rg int i=(st);i<=(ed);++i)
#define per(i,ed,st) for(rg int i=(ed);i>=(st);--i)
#define rep0(i,n) for(rg int i=0;i<(n);++i)
#define per0(i,n) for(rg int i=(n)-1;i>=0;--i)
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int uint;
typedef double dbl;
typedef long double ldb;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
template<typename T> il T qmin(const T &x,const T &y){return x<y?x:y;}
template<typename T> il T qmax(const T &x,const T &y){return x>y?x:y;}
template<typename T> il void getmin(T &x,const T &y){if(y<x) x=y;}
template<typename T> il void getmax(T &x,const T &y){if(y>x) x=y;}
il void fileio(const string &s){
	freopen((s+".in").c_str(),"r",stdin);
	freopen((s+".out").c_str(),"w",stdout);
}

const int inf=(int)1e9+7;
const ll linf=(ll)1e18+7;
const ull base=(ull)1e8+7,inv=5840524504965430455ull;
const int N=500005;

char s[N];
ull pw[N],pwi[N];
map<ull,int> tot;
int a[N],pos[N];
ull val[N];
int n;

int main(){
	assert(base*inv==1);
	pw[0]=pwi[0]=1;
	rep(i,1,N-1){
		pw[i]=pw[i-1]*base;
		pwi[i]=pwi[i-1]*inv;
		assert(pw[i]*pwi[i]==1);
	}
//	fileio("test");
	scanf("%d%s",&n,s+1);
	int st=250001,cur=st;
	rep(i,1,n){
		if(s[i]=='<') --cur;
		else if(s[i]=='>') ++cur;
		else if(s[i]=='+') ++a[cur];
		else if(s[i]=='-') --a[cur];
		else assert(false);
		pos[i]=cur;
	}
	ull des=0;
	rep0(i,N) des+=a[i]*pw[i];
	++tot[0];
	per(i,n,1){
		val[i]=val[i+1];
		if(s[i]=='-') val[i]-=pw[pos[i]];
		else if(s[i]=='+') val[i]+=pw[pos[i]];
		++tot[val[i]];
	}
	--tot[val[1]];
	ll ans=tot[0];
//	cerr<<0<<" "<<tot[0]<<endl;
	ull sta=des;
	rep(i,1,n){
		--tot[val[i+1]];
		if(s[i]=='-') sta+=pw[pos[i]];
		else if(s[i]=='+') sta-=pw[pos[i]];
	//	cerr<<sta<<endl;
		ans+=tot[sta-des*(pos[i]>=st?pw[pos[i]-st]:pwi[st-pos[i]])];
	//	cerr<<i<<" "<<tot[sta-des*(pos[i]>=st?pw[pos[i]-st]:pwi[st-pos[i]])]<<endl;
	}
	printf("%lld\n",ans);
	return 0;
}

Measured memory_bytes: 47232
#include <cassert>
#include <numeric>
#include <cstring>
#include <iostream>

using namespace std;
const int M = 998244353;
int main() {
    string s; int K; cin >> s >> K;
    size_t p = s.find('0');
    if (p == string::npos) { cout << "1\n"; return 0; }
    else s = s.substr(p);
    int n = s.size();
    K = min(K, n);
    long long dp[2][n+1][K+1];
    memset(dp, 0, sizeof dp);
    int cur = 0, prev = 1;
    for (int j = 0; j <= K; j++) {
        if (j <= K) dp[prev][j][j] = 1;
    }

    int i0 = 0;
    for (;;) {
        int i = i0+1;
        while (i < n && s[i] == '1') i++;
        if (i == n) break;
        for (int j = i; j <= n; j++) {
            for (int k = 0; k <= K; k++) {
                long long sum = 0;
                for (int j1 = max(i0, j - (i - i0) - k); j1 < j; j1++) {
                    int k1 = j - j1 - (i - i0);
                    assert (k >= max(0, k1));
                    sum += dp[prev][j1][k - max(0, k1)];
                }
                dp[cur][j][k] = (sum % M + M) % M;
            }
        }
        i0 = i;
        swap(prev, cur);
    }
    long long ans = accumulate(dp[prev][i0], dp[prev][n], 0LL);
    cout << (ans % M + M) % M << endl;
}


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

int main() {
  int n; cin>>n;
  int an[n]; rep(i,n) cin >> an[i];
  int cnt=0;
  
  rep(i,n) {
    int j = an[i]-1;
    if (an[j]-1 == i) cnt++;
  }
  cnt /= 2;
  cout<<cnt<<endl;
}


Measured memory_bytes: 640
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
        int n;
        cin>>n;
        vector<int> a(n);
        for(auto& t:a) cin>>t;
        sort(a.begin(), a.end());
        vector<int> used(n,0);
        int r = 0;
        for(int target=(1<<30);target>=2;target/=2){
                int low=0, high=n-1;
                while(1){
                        while(low<n&&used[low]) ++low;
                        while(high>=0&&used[high]) --high;
                        if(low>=high) break;
                        long long sum = a[low]+a[high];
                        if(sum==target){
                                r++;
                                used[low] = used[high] = 1;
                        }else if(sum<target){
                                low++;
                        }else{
                                high--;
                        }
                }
        }
        cout<<r<<endl;
        return 0;
}

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

int main() {
  int64_t H;
  cin >> H;
  int sum = 0;
  while(true){
    sum++;
    H = H/2;
    if(H == 0){
      break;
    }
  }
  int64_t answer = 0;
  int64_t number_2 = 1;
  for(int i=0; i<sum; i++){
    answer += number_2;
    number_2 *= 2;
  }
  cout << answer << endl;
}


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

using namespace std;

int dig(long long int x) {
    int ret=1;
    while(x/10!=0) {
        ret++;
        x /= 10;
    }
    return ret;
}

int func(long long int x, long long int y) {
    return max(dig(x), dig(y));
}

int main() {
    long long int N;
    cin >> N;
    
    int mn=11;
    for(long long int i=1; i*i<=N; i++) {
        if(N%i==0) {
            mn = min(mn, func(i, N/i));
        }
    }
    
    cout << mn << endl;


    return 0;
    
}

Measured memory_bytes: 256
// ※※※ 解答不能 ※※※
// tourist 氏.
// https://atcoder.jp/contests/cf17-relay-open/submissions/8930823
#include<bits/stdc++.h>
using namespace std;
using LL = long long;
#define repex(i, a, b, n) for(int i = a; i < b; i += n)
#define repx(i, a, b) repex(i, a, b, 1)
#define rep(i, n) repx(i, 0, n)
#define repr(i, a, b) for(int i = a; i >= b; i--)

int main(){
    int n;
    scanf("%d", &n);
    vector<int> a(2 * n);
    rep(i, 2 * n) scanf("%d", &a[i]);
    sort(a.begin(), a.end());
    LL ans = 0;
    rep(i, 2 * n) ans += (LL)a[i] * i;
    printf("%.17lf\n", (double) ans / (2 * n - 1));
    return 0;
}

Measured memory_bytes: 1024
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i=0; i<(int)n; i++)
#define REPR(i, n) for(int i=(int)n-1; i>=0; i--)
#define FOR(i, m, n) for(int i=(int)m; i<(int)n; i++)
#define FORR(i, m, n) for(int i=(int)m-1; i>=(int)n; i--)
#define ALL(x) (x).begin(), (x).end()
#define ASC(v) sort(ALL(v));
#define DESC(v) sort(ALL(v), greater<int>());
#define UNIQ(a) sort(ALL(a));(a).resize(unique(ALL(a)) - a.begin());
#define DEBUG(x) cout<<#x<<": "<<x<<"\n"
typedef long long ll;
const double PI = acos(-1);
ll lcm(ll a, ll b) { return a / __gcd(a, b) * b; }
bool isprime(int x){ int i; if(x<2)return 0; else if(x==2) return 1; if(x%2==0) return 0; for(i=3; i*i<=x; i+=2) if(x%i==0) return 0; return 1; }
int digsum(int n) { int r=0; while(n>0) { r+=n%10; n/=10; } return r; }
//struct nya{ nya(){ cin.tie(0); ios::sync_with_stdio(false); } }nyan;


void solve(std::string S){
	ll res = 0;
	if (S=="SUN") res=7;
	if (S=="MON") res=6;
	if (S=="TUE") res=5;
	if (S=="WED") res=4;
	if (S=="THU") res=3;
	if (S=="FRI") res=2;
	if (S=="SAT") res=1;
	cout << res << "\n";
}

int main(){
    std::string S;
    std::cin >> S;
    solve(S);
    return 0;
}


Measured memory_bytes: 256
k,n = map(int, input().split())
a = list(map(int,input().split()))
max_dist = 0
for i in range(n):
    nxt = (i + 1) %n
    distance = a[nxt] - a[i]
    if distance < 0:
        distance += k
    max_dist = max(max_dist, distance)
print(k - max_dist)

Measured memory_bytes: 26420
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vector<int> vec(N);
  
  for(int i=0; i<N; i++){
    cin >> vec[i];
  }
  
  sort(vec.begin(), vec.end());
  reverse(vec.begin(), vec.end());
  
  int a, b;
  a=0;
  b=0;
  int i=0;
  
  while(i<N){
    a += vec[i];
    i++;
    if(i<N){
    b += vec[i];
    i++;
    }
  }
  
  
  cout << a - b <<endl;
  
  return 0;
  
}

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

#define 	pie				3.1415926536
#define 	mod 			1000000007
#define 	ll  			long long int
#define 	rep(i, a, b) 	for(int i = a ; i < b ; i++)
#define 	mod1 			1000003
#define     mod2            998244353
#define 	hi   			"hello"
#define 	nl 				"\n"
#define 	ws 				" "
#define 	F 				first
#define 	S 				second
#define 	PB 				push_back
#define 	MP				make_pair
#define 	B 				begin()
#define 	E 				end()
#define 	all(v) 			v.begin(), v.end()
#define 	reset(a, val) 	memset(a, val, sizeof(a))
#define 	vi 				vector<int>
#define     pi              pair<int, int>
#define     vll             vector<long long int>
#define 	vs 				vector<string>
#define     vc              vector<char>
#define 	print1(a) 		for(auto i : a)cout<<i<<" ";cout<<"\n"
#define 	print2(a) 		for(auto i : a)cout<<i;cout<<"\n"
#define 	boost 			ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

using namespace std;

//g++ -std=c++14
//fixed<<setprecision(9);
//max_element(mp.begin(), mp.end(), compare)
//greater<int>()
// __gcd(a, b);

bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) { return (a.second < b.second); }

bool compare(const pair<string, int>&a, const pair<string, int>&b){ return a.second<b.second; }

void solve()
{
   string s; cin>>s;
   rep(i, 0, 3){
       if(s[i]=='7'){
           cout<<"Yes"<<nl;return;
       }
   }
   cout<<"No\n";
}

int main()
{
    //boost;
    int t = 1, k = 1;
    // cin>>t;
    while(t--){
        // cout<<"Case #"<<k<<": ";
        solve();
        k++;
    }
}

Measured memory_bytes: 3624
#include <iostream>
#include <string>
#include <sstream>
#include <cstring>
using namespace std;

int graph[26][26];
		
void DFS(int i)
{
	for(int j=0;j<26;j++){
		if(graph[i][j]!=0){
			graph[i][j]--;
			DFS(j);
		}
	}
}
int main()
{
	int n;
	while(cin >> n){
		if(!n)
			break;
		int word[26] = {0};
		memset(graph,0,sizeof(graph));
		for(int i=0;i<n;i++){
			string str;
			cin >> str;
			word[static_cast<unsigned>(str[0]-'a')]--;
			word[static_cast<unsigned>(str[str.size()-1]-'a')]++;
			graph[str[0]-'a'][str[str.size()-1]-'a']++;
		}
		bool flag = true;
		for(int i=0;i<26;i++){
			if(word[i] != 0){
				flag = false;
				break;
			}
		}
		for(int i=0;i<26;i++){
			for(int j=0;j<26;j++){
				if(graph[i][j] != 0){
					DFS(i);
					goto JUMP;
				}
			}
		}
JUMP:;
		for(int i=0;i<26;i++){
			for(int j=0;j<26;j++){
				if(graph[i][j] != 0)
					flag = false;
			}
		}
		if(flag)
			cout << "OK" << endl;
		else
			cout << "NG" << endl;
	}
	return 0;
}

Measured memory_bytes: 1056
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Abhas Jain
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        DKnapsack1 solver = new DKnapsack1();
        solver.solve(1, in, out);
        out.close();
    }

    static class DKnapsack1 {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.ni(), max = in.ni();
            long[] dp = new long[max + 1];
            for (int i = 0; i < n; ++i) {
                int w = in.ni();
                long v = in.nl();
                for (int j = max; j - w >= 0; --j) {
                    dp[j] = Math.max(dp[j], dp[j - w] + v);
                }
            }
            out.print(dp[max]);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

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

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

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

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

    }
}



Measured memory_bytes: 21844
#include<bits/stdc++.h>
using namespace std;
#define FOR(i,l,r) for(size_t i=(l);i<(r);++i)
#define REP(i,n) FOR(i,0,n)
#define int long long

signed main(){
    int N;
    cin >>N;
    double rans=0;
    REP(i,N){
        double a;
        cin >>a;
        rans +=1/a;
    }
    printf("%10.10f",1/rans);
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<iomanip>
#include<string>
#include<algorithm>
#include<numeric>
#include<utility>
#define ll long long
#define endl "\n"
#define ss string
using namespace std;
/*ll  mod(ll  a,ll  b)
{
  if(a>b)
    return (a-b);
  else
    return (b-a);
}
double distance(ll  x1, ll  y1, ll  x2, ll  y2)
{

    return sqrt(pow(x2 - x1, 2) +
                pow(y2 - y1, 2) * 1.0);
}*/

int main()
{
  /*ll t;
  cin>>t;
  while(t--)
  {
    ll n,q;
    cin>>n>>q;
    ss s;
    cin>>s;
    ss s2=s;
    ss s3=s;
    ll arr[q];
    for(int i=0;i<q;i++)
    {
      cin>>arr[i];
    }
    for(ll i=0;i<q;i++)
    {

      ss s1;
      for(ll j=0;j<s.size();)
      {
        if(count(s1.begin(),s1.end(),s[j])<=arr[i])
       {
         s1.push_back(s[j]);
         s.erase(s.begin()+j);
       }
       cout<<s1<<" "<<s<<endl;

      }
      cout<<s1<<endl;
      cout<<s.size()<<endl;
        s1.clear();
       s2=s3;
       s=s3;
    }*/
   unsigned ll a,b,n,x,mini=LONG_LONG_MAX,v;
   cin>>a>>b>>n;
   if(b-1>=n)
    x=n;
    else
    {
      x=b-1;
    }
    cout<<(a*x)/b<<endl;

  return 0;
}


Measured memory_bytes: 3628
import java.util.*;

class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);

		int times[] = new int[3];
		
		times[0] = sc.nextInt();
		times[1] = sc.nextInt();
		times[2] = sc.nextInt();

		Arrays.sort(times);

		System.out.println(times[1] + times[0]);
		
	}
}


Measured memory_bytes: 22740
#include <bits/stdc++.h>
using namespace std;
using LL = long long int;
#define incID(i, l, r) for(int i = (l)    ; i <  (r); ++i)
#define decID(i, l, r) for(int i = (r) - 1; i >= (l); --i)
#define incII(i, l, r) for(int i = (l)    ; i <= (r); ++i)
#define decII(i, l, r) for(int i = (r)    ; i >= (l); --i)
#define inc(i, n)  incID(i, 0, n)
#define dec(i, n)  decID(i, 0, n)
#define inc1(i, n) incII(i, 1, n)
#define dec1(i, n) decII(i, 1, n)
#define inID(v, l, r) ((l) <= (v) && (v) <  (r))
#define inII(v, l, r) ((l) <= (v) && (v) <= (r))
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define FR front()
#define BA back()
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
auto setmin   = [](auto & a, auto b) { return (b <  a ? a = b, true : false); };
auto setmax   = [](auto & a, auto b) { return (b >  a ? a = b, true : false); };
auto setmineq = [](auto & a, auto b) { return (b <= a ? a = b, true : false); };
auto setmaxeq = [](auto & a, auto b) { return (b >= a ? a = b, true : false); };
#define SI(v) static_cast<int>(v.size())
#define RF(e, v) for(auto & e: v)
#define until(e) while(! (e))
#define if_not(e) if(! (e))
#define ef else if
#define UR assert(false)
#define IN(T, ...) T __VA_ARGS__; IN_(__VA_ARGS__);
void IN_() { };
template<typename T, typename ... U> void IN_(T & a, U & ... b) { cin >> a; IN_(b ...); };
template<typename T> void OUT(T && a) { cout << a << endl; }
template<typename T, typename ... U> void OUT(T && a, U && ... b) { cout << a << " "; OUT(b ...); }

// ---- ----

int main() {
	IN(int, n, k);
	vector<int> f(n, 0);
	inc(i, k) {
		IN(int, d);
		inc(j, d) {
			IN(int, a);
			a--;
			f[a]++;
		}
	}
	OUT(count(ALL(f), 0));
}


Measured memory_bytes: 3628
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii =  pair<int, int>;
using pll =  pair<long long, long long>;
constexpr char ln =  '\n';
constexpr long long MOD = 1000000007LL;
constexpr long long INF = 1000000000LL;
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);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; }

int main() {
  string s;
  cin >> s;

  bool f = true; int cnt = 0;
  while(f){
    if(s.size() < 2) break;
    f = false;
    for(int i = 0; i < s.size() - 1; i++){
      if(s[i] != s[i+1]){
        s.erase(i,2);
        f = true;
        cnt += 2;
        break;
      }
    }
  }
  cout << cnt << ln;
}
  


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

#define fi first
#define se second
#define all(x) x.begin(), x.end()
using namespace std;
using ull = unsigned long long;
using ll = long long;

struct __INIT {
    __INIT() {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        cout << fixed << setprecision(15);
    }
} __init;

int main() {
    string S;
    cin >> S;
    int N = S.size();

    vector<int> A(N);
    for(int i = 0; i < N; i++) A[i] = S[i] - '0';

    ll sum = 0;
    ll now = A[0];
    for(int bit = 0; bit < (1 << (N - 1)); bit++){
        for(int i = 0; i < N - 1; i++){
            if(bit & (1 << i)){
                sum += now;
                now = A[i + 1];
            }else{
                now = now * 10 + A[i + 1];
            }
        }
        sum += now;
        now = A[0];
    }
    cout << sum << endl;
}

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

using namespace std;

int main() {
    int n;
    cin >> n;
    int x = n;
    int ans = 0;
    int y = 1;
    int flag = 0;
    while (x > 9) {
        if (flag % 2 == 0) {
            ans += 9 * y;
        }
        x /= 10;
        y *= 10;
        flag++;
    }
    //ans -= 9 * (y / 10);
    if (!(flag % 2)) {
        ans += (n - y) + 1;
    }
    cout << ans;
    return 0;
}

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

bool judge_triangle(int j_edge[])
{
    std::sort(j_edge, j_edge + 3);
    return j_edge[2] * j_edge[2] == j_edge[0] * j_edge[0] + j_edge[1] * j_edge[1];
}

int main()
{
    int num;
    std::cin >> num; 

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

        int edge[3];
        std::cin >> edge[0] >> edge[1] >> edge[2];

        if(judge_triangle(edge)) {
            std::cout << "YES" << std::endl;
        } else {
            std::cout << "NO" << std::endl;
        }

    }
    return 0;
}

// "j_edge" to "j_edge+3" ha "array j_edge" no memory jyou no
// adress no hajimari to owari wo simesu. 
// Yoku miru to kou natteru ==> [hajimari, owari)

Measured memory_bytes: 3112
#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
struct __INIT{__INIT(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);}} __init;
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define MOD 1000000007
#define INF (1<<30)
#define LINF (lint)(1LL<<56)
#define endl "\n"
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define reprev(i,n) for(int (i)=(n-1);(i)>=0;(i)--)
#define Flag(x) (1<<(x))
#define Flagcount(x) __builtin_popcount(x)
#define pint pair<int,int>
#define pdouble pair<double,double>
#define plint pair<lint,lint>
typedef unsigned long long int ull;
typedef long long lint;

int main(void){
    int N;
    cin >> N;
    pair<double,pdouble> engine[N];
    rep(i,N) cin >> engine[i].second.first >> engine[i].second.second;
    rep(i,N) engine[i].first=atan2(engine[i].second.second,engine[i].second.first);
    sort(engine,engine+N);
    double ans=0;
    for(int i=0;i<N;i++){
        double dx=0,dy=0;
        for(int j=i;j<i+N;j++){
            dx+=engine[j%N].second.first;
            dy+=engine[j%N].second.second;
            double dis=sqrt(pow(dx,2)+pow(dy,2));
            ans=max(ans,dis);
        }  
    }
    cout << ans << endl;
}

Measured memory_bytes: 512
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<string>
using namespace std;
typedef long long ll;
int main(){
  int n,k;
  cin>>n>>k;
  string s;
  cin>>s;
  int num=(int)(s[k-1]-'A');
  s[k-1]=(char)('a'+num);
  cout<<s<<endl;
}


Measured memory_bytes: 256
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

#define SORT(c) sort((c).begin(),(c).end())
#define ANS(ans) cout<<(ans)<<endl;
typedef vector<int> VI;
typedef long long ll;

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n)  for (int i = 0; i < (n); ++i)


int main() {

	int n;
	cin >> n;
	int k;

	int a[50][26] = {};

	string str;
	REP(i, n) {
		cin >> str;
		REP(j, str.length()) {
			k = str[j] - 'a';
			a[i][k]++;
		}
	}

	int mm;
	REP(i, 26) {
		mm = 100;
		REP(j, n ) {
			mm = min(a[j][i], mm);
		}
		REP(k, mm) {
			char c = 'a' + i;
			cout << c;
		}
	}
	

	return 0;
}



Measured memory_bytes: 256
x,k,d = map(int, input().split())
x = abs(x)

if x > k*d:
    ans = x- k*d
    print(ans)
    exit()

p_min_cnt = x//d
rem = k - p_min_cnt
p_min = x%d

if rem%2 == 0:
    print(p_min)
else:
    m_min = abs(p_min-d)
    print(m_min)

Measured memory_bytes: 61712
#include<vector>
#include<list>
#include<algorithm>
#include<iostream>
#include<string>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
using namespace std;
int main(){
  int i;
  int a,b=0,c=0;
  for(i=0;i<4;i++){
    cin>>a;
    b+=a;
  }
  for(i=0;i<4;i++){
    cin>>a;
    c+=a;
  }
  cout<<(b>c?b:c)<<endl;
  return 0;
}

Measured memory_bytes: 0
#include<iostream>
#include<algorithm>
#include<numeric>
#include<vector>
#include<set>
#include<map>
#define cinf(n,x) for(int i=0;i<(n);i++) cin >> x[i];
typedef long long int ll;
using namespace std;
ll mod=1e9+7;
ll cnt[100010];
ll cnt1[100010];
int main(){
	int n,m; cin >>n>>m;
	vector<int> a(m);
	cinf(m,a);
	sort(a.begin(),a.end());
	for(int i=0;i<m-1;i++){
		if(a[i+1]-a[i]==1){
			cout << 0 << endl;
			return 0;
		}
	}
	cnt[0]=1;
	for(int i=0;i<m;i++){
		cnt1[a[i]]++;
	}
	for(int i=1;i<=n;i++){
		if(cnt1[i]==0&&cnt[i-1]==0){
			cnt[i]=cnt[i-2];
		}
		else if(cnt1[i]==0&&cnt[i-2]==0){
			cnt[i]=cnt[i-1];
		}
		else if(cnt1[i]==0){
			if(i>1){
				cnt[i]=cnt[i-2]+cnt[i-1];
				cnt[i]%=mod;
			}
			else{
				cnt[i]=cnt[i-1];
			}
		}
		else{
			cnt[i]=0;
		}
	}
	cout << cnt[n]%mod<<endl;
}

Measured memory_bytes: 2048
#pragma GCC optimize("O3")

#include "bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef pair<int, int> pi;
tree<int,int,greater<int>,rb_tree_tag,tree_order_statistics_node_update> map_t;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define F0R(i, a) for(int i = 0; i < (a); ++i)
#define pb push_back
#define sz(x) (int)x.size()
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
#define REV(x) reverse(x.begin(),x.end())
int dx[]={-1,0,1,0};
int dy[]={0,-1,0,1};
int n;
struct robot{int x,d;};
robot arr[(int)2e5+1];
int dp[(int)2e5+1];
const int MOD=998244353;

bool comp(robot u,robot v)
{
    return (u.x<v.x);
}

int main()
{
    // freopen("input.txt", "r", stdin);
    // freopen("output.txt", "w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    cin >> n;
    F0R(i,n)
        cin >> arr[i].x >> arr[i].d;
    sort(arr,arr+n,comp);
    deque<pi> st;
    dp[n-1]=2;
    st.push_front({n-1,arr[n-1].x});
    for(int i=n-2; ~i; i--)
    {
        while(!st.empty() && st[0].second<arr[i].x+arr[i].d)
            st.pop_front();
        dp[i]=dp[i+1];
        if(!st.empty())
        {
            int j=st[0].first;
            dp[i]=(dp[i]+dp[j])%MOD;
        }
        else
            dp[i]=(dp[i]+1)%MOD;
        st.push_front({i,arr[i].x});
    }
    cout << dp[0];

    return 0;
}


Measured memory_bytes: 3456
let rec inp_loop : (unit -> 'a) -> int -> 'a list = fun inp_fun n ->
  if n = 0 then []
  else
    let x = inp_fun () in
    x :: inp_loop inp_fun (n - 1)

let () =
  let n = int_of_string (input_line stdin) in
  let l = inp_loop (fun () -> Scanf.sscanf (input_line stdin) "%s %d" (fun s p -> (s, p))) n in
  let l_i = List.mapi (fun i (s, p) -> (i + 1, s, p)) l in
  let l' = List.sort (fun (i1, s1, p1) (i2, s2, p2)->
               if s1 > s2 then 1
               else if s1 < s2 then -1
               else if p1 > p2 then -1
               else if p1 < p2 then 1
               else 0) l_i in
  List.iter (fun (i, s, p) ->
      print_int i;
      print_newline ()
    ) l'


Measured memory_bytes: 2432
#include <bits/stdc++.h>
#include <iostream>
//#include <algorithm>
// #include <iomanip>
#define ll long long

using namespace std;

int main() {
  ll h;
  scanf("%lld", &h);

  ll enenum = 1;
  ll n = 0;
  for (;;) {
    // cout << h << endl;
    if (h <= 0) {
      break;
    }
    if (h == 1) {
      h = 0;
    } else {
      h = h / 2;
    }
    n += enenum;
    enenum *= 2;
  }

  cout << n << endl;
}


Measured memory_bytes: 256
#include <iostream>

using namespace std;

int main(){
	int n,m,c;
	cin >> n >> m >> c;
	int i,j,b[m];
	for(i=0;i<m;i++) cin >> b[i];
	int h,sum,ans=0;
	for(i=0;i<n;i++){
		sum = c;
		for(j=0;j<m;j++){
			cin >> h;
			sum += h * b[j];
		}
		if(sum>0) ans++;
	}
	cout << ans << endl;
	return 0;
}

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

#define rep2(x,fr,to) for(int x=(fr);x<(to);x++)
#define rep(x,to) for(int x=0;x<(to);x++)
#define repr(x,fr,to) for(int x=(fr);x>=(to);x--)
#define all(c) c.begin(),c.end()
#define sz(v) (int)v.size()

using namespace std;
typedef long long  ll; typedef vector<int> VI; typedef pair<int,int> pii; typedef vector<ll> VL; const int MD = 1e9 + 7;
void dbg(){cerr<<"\n";} template <class F,class ...S> void dbg(const F& f, const S&...s){cerr <<f <<": "; dbg(s...);}


int main()
{
	cin.tie(0); ios_base::sync_with_stdio(false);
	int n, m, x;
	cin >>n >>m >>x;
	vector<VI> a(n, VI(m+1));
	rep(i, n) rep(j, m+1) cin >>a[i][j];
	int ans = MD;

	rep(i, 1<<n){
		VI cr(m+1, 0);
		rep(j, n) if(i>>j &1){
			rep(k, m+1) cr[k] += a[j][k];
		}
		bool ok=1;
		rep2(k,1,m+1) if(cr[k]<x) {ok = 0; break; }
		if(ok) ans = min(ans, cr[0]);
	}
	cout << (ans<MD? ans: -1) <<"\n";
	return 0;
}


Measured memory_bytes: 3612
import java.util.*;

import jdk.nashorn.internal.ir.LiteralNode.PrimitiveLiteralNode;

class Main {
  public static void main(String[] args){
    Scanner cin = new Scanner(System.in);
    MyArray myArray = new MyArray(110);
    
    while(cin.hasNext()){
      myArray.add(cin.nextInt());
    }
    myArray.mode();
  }
}

class MyArray {
  private int num[];
  private int size = 0;
   
  MyArray(int n){
    this.num = new int[n];
  }
 
  protected void sort(){
    Arrays.sort(num);
  }
 
  protected int top(){
    if (size == 0) {
//      System.out.println("empty");
      return (0);
    }
    return (num[size - 1]);
  }
 
  protected void pop(){
    for (int i = size - 1; i > 1; i--){
      num[i] = num[i - 1];
    }
  }
 
  protected void add(int n){
    num[n]++;
  }
 
  protected int at(int n){
    return (num[n]);
  }

  protected void mode(){
    int max = 0;
    for (int i = 1; i < 101; i++){
      max = Math.max(max, num[i]);
    }
    for (int i = 1; i < 101; i++){
      if (max == num[i]){
        System.out.println(i);
      }
    }
  }
}

Measured memory_bytes: 26012
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int a = sc.nextInt();
		int b = sc.nextInt();
		
		System.out.println(a * b + " " + 2 * (a + b));
		
		sc.close();
	}

}



Measured memory_bytes: 26056
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(1, N+1):
    S = input()
    if S == "AC":
        AC += 1
    elif S == "WA":
        WA += 1
    elif S == "TLE":
        TLE += 1
    else:
        RE += 1
print("AC x " + str(AC))
print("WA x " + str(WA))
print("TLE x " + str(TLE))
print("RE x " + str(RE))

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

#define sz(x) (int)((x).size())
#define xx first
#define yy second

const int N = 401;
const ll oo = 1e13;

int a[N];
ll dp[N][N], cost[N][N];

void solve() {
    int n;
    cin >> n;
    for (int i = 0; i < n; i++)
        cin >> a[i];
    for (int s = 1; s <= n; s++)
        for (int l = 0, r = s - 1; r < n; l++, r++) {
            if (l == r) {
                dp[l][r] = a[l];
                cost[l][r] = 0;
                continue;
            }
            dp[l][r] = oo;
            cost[l][r] = oo;
            for (int j = l; j < r; j++)
                dp[l][r] = min(dp[l][r], dp[l][j] + dp[j + 1][r]); 
            for (int j = l; j < r; j++)
                if (dp[l][r] == dp[l][j] + dp[j + 1][r])
                    cost[l][r] = min(cost[l][r], cost[l][j] + cost[j + 1][r]);
            cost[l][r] += dp[l][r];
        }
    cout << cost[0][n - 1] << '\n';
}
int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    // int _; cin >> _; while (_--)
    solve();
    return 0;
}


Measured memory_bytes: 6100
import java.util.Scanner;

fun main (args : Array<String>) {
  val input = Scanner(System.`in`)
  
  while (input.hasNext()) {
    val N = input.nextInt()
    val K = input.nextInt()
    val p = IntArray(N)
    
    for (i in p.indices) {
      p[i] = input.nextInt()
    }
    
    var maxExpValue = 0.0
    for (i in 0..K-1) {
      maxExpValue += (1 + p[i]) / 2.0
    }
    
    var currentExpValue = maxExpValue
    for (i in K..p.lastIndex) {
      currentExpValue -= (1 + p[i - K]) / 2.0
      currentExpValue += (1 + p[i]) / 2.0
      maxExpValue = Math.max(maxExpValue, currentExpValue)
    }
    
    println(maxExpValue)
  }
}

Measured memory_bytes: 64036
///HELLO THERE~!
///CREATED BY MD SADMAN MEHEDI SIVAN(IUT CSE-SWE^19)

#include <bits/stdc++.h>

#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define read freopen("blue.txt","r",stdin);
#define write freopen("red.txt","w",stdout);


typedef long long ll;

using namespace std;


int main()

{

    fastio;
    double pie=2*acos(0.0);

    double a;
    cin>>a;
    double result=2.0*pie*a;

    cout<<fixed<<setprecision(22)<<result;


    return 0;
}


Measured memory_bytes: 3832
N,M = map(int,input().split())
A = list(list(map(int,input().split())) for i in range(N))
like = [1]*M
for _ in A:
    tmp = [0]*M
    for i in _[1:]:
        tmp[i-1] = 1
    for i in range(M):
        like[i] = min(like[i],tmp[i])
print(sum(like))

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

using namespace std;

int main() {
  int N, D;
  cin >> N >> D;
  auto v = vector<vector<int>>(N, vector<int>(D, 0));
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < D; ++j) {
      cin >> v[i][j];
    }
  }
  int cnt = 0;
  for (int i = 0; i < N; ++i) {
    for (int j = i + 1; j < N; ++j) {
      int d = 0;
      for (int k = 0; k < D; ++k) d += pow(v[i][k] - v[j][k], 2);
      if ((int)sqrt(d) * (int)sqrt(d) == d) cnt++;
    }
  }
  cout << cnt << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main()
 {
 	char ch;
 	cin>>ch;
	if (ch >= 'A' && ch <= 'Z') 
        cout<<"A"<<endl; 
  
    else if (ch >= 'a' && ch <= 'z') 
    cout<<"a"<<endl; 
              
  
 	return 0;
}
 	
 					

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

typedef long long ll;
#define pii pair<int , int>
#define _FastIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define MAXX 100005

int n , k;
int p[MAXX];

int main()
{
    _FastIO;
    cin >> n >> k;
    for(int i = 0; i < n; i++){
        cin >> p[i];
    }
    sort(p , p + n);
    int ans = p[n - 1] - p[0];
    for(int i = k - 1; i < n; i++){
        ans = min(ans , (p[i] - p[i - k + 1]));
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 640
//#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>
#include <stack>
#include <bitset>

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

ll n, k, q;
ll a[1000010];

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

  cin >> n >> k >> q;
  REP(i,q) {
    int pt;
    cin >> pt; pt--;
    a[pt]++;
  }
  /*
  //k-q pts から増やす
  REP(i,n) cerr << a[i] << " ";
  cerr << endl;
*/
  REP(i,n) {
    a[i] += k-q;
    if(a[i] > 0) cout << "Yes" << endl;
    else cout << "No" << endl;
  }

  return 0;
}


Measured memory_bytes: 1408
/**
 *   Author:  Wasi Ur Rahman
 *   FROM RMSTU
**/
#include <bits/stdc++.h>
#define ll                      long long
#define boost                   ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define ticktock                cout<<"\nTime Elapsed: " << 1.0*clock() / CLOCKS_PER_SEC << " sec\n"
#define min3(a,b,c)             min(a,min(b,c))
#define min4(a,b,c,d)           min(d,min3(a,b,c))
#define max3(a,b,c)             max(a,max(b,c))
#define max4(a,b,c,d)           max(d,max3(a,b,c))
#define all(v)                  v.begin(),v.end()
#define revall(v)               v.rbegin(),v.rend()
#define pb                  	push_back
#define eb                      emplace_back
#define mk                      make_pair
#define setbits(x)              __builtin_popcountll(x)
#define zrobits(x)              __builtin_ctzll(x)
#define si(x)               	scanf("%d", &x)
#define sii(x, y)           	scanf("%d %d", &x, &y)
#define siii(x, y, z)       	scanf("%d %d %d", &x, &y, &z)
#define siiii(p,x, y, z)    	scanf("%d %d %d %d",&p, &x, &y, &z)
#define sll(x, y)           	scanf("%lld %lld", &x, &y)
#define slll(x, y, z)       	scanf("%lld %lld %lld", &x, &y, &z)
#define read                	freopen("input.txt","r",stdin)
#define write               	freopen("output.txt","w",stdout)
#define println()          		cout << endl
#define printi(x)           	printf("%d\n")
#define printii(x,y)        	printf("%d %d\n")
#define printiii(x,y,z)     	printf("%d %d %d\n")
#define printl(x)           	printf("%lld\n")
#define printll(x,y)        	printf("%lld %lld\n")
#define printlll(x,y,z)     	printf("%lld %lld %lld\n")
using namespace std;
/*************************************
*          A S S E M B L E           *
**************************************/
bool Prime(ll n){if(n <= 1)return false;for (ll i = 2; i<=sqrt(n); i++)if (n % i == 0)return false;return true;}
const int mod = 1e9+7;
inline int add(int a,int b){if((a+=b)>=mod)a-=mod;return a;}
inline int dec(int a,int b){if((a-=b)<0)a+=mod;return a;}
ll mult(ll a,ll b){long long t=1ll*a*b;if(t>=mod)t%=mod;return t;}
inline int power(int a,int b){int out=1;while(b){if(b&1)out=mult(out,a);a=mult(a,a);b>>=1;}return out;}
ll fact(ll n){ll res = 1;for(ll i = n;i>=1;i--) res = mult(res,i);return res;}
ll nCr(ll n,ll r){return (fact(n)/(fact(r)*fact(n-r)));}
ll nPr(ll n,ll r){return fact(n)/fact(n-r);}
ll modpow(ll a, ll n, ll mod){ll res=1;while(n>0){if(n&1) res=res*a%mod;a=a*a%mod;n>>=1;}return res;}
bool com(pair<ll,ll> a,pair<ll,ll> b) {if(a.first != b.first)return a.first<b.first;else return (a.second > b.second);}
/*************************************
*  E N D    G A M E   S T A R T S    *
**************************************/
int main(){
    boost;
    vector<ll> v;
    for(ll i = 0;i<3;i++)
    {
        ll x;
        cin >> x;
        v.pb(x);
    }
    sort(all(v));
    int sum = 0;
    for(ll i = 0;i<v.size()-1;i++)
        sum += abs(v[i+1]-v[i]);
    cout << sum << endl;
    return 0;
}


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

public class Program
{

    public void Proc()
    {
        string moji1 = Reader.ReadLine();
        string moji2 = Reader.ReadLine();

        string ans = "No";
        if(string.Join("", moji1.OrderBy(a=>a)).CompareTo(string.Join("", moji2.OrderByDescending(a=>a)))<0) {
            ans = "Yes";
        }
        Console.WriteLine(ans);
    }


    public class Reader
    {
        private 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 = @"



cd
abc

";
    }

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


Measured memory_bytes: 13536
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void)
{
  char buf[1000];
  char *str;
  int n, m, point=0, sum=0;
  int shohin[1000];
  float judge;

  fgets(buf, sizeof(buf), stdin);
  sscanf(buf, "%d %d \n", &n, &m);

  fgets(buf, sizeof(buf), stdin);

  for (int i = 0; i < n; i++) {
    if (i == 0) {
      str = strtok(buf, " ");
    } else {
      str = strtok(NULL, " ");
    }

    shohin[i] = atoi(str);
    sum += shohin[i];
  }

  judge = (float)sum / (4.0f * (float)m);

  for (int i = 0; i < n; i++) {
    if (shohin[i] < judge) {

    } else {
      point++;
    }
  }

  if (point >= m) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }

}

Measured memory_bytes: 128
####################################################################################################
####################################################################################################
####################################################################################################
####################################################################################################
####################################################################################################
eval"N,K,*V="+`dd`.split*?,;
p (0..L=[K,N].min).map{|a|(0..L-a).map{|b|
s=V[0,a]+V[-b,b];
(s+s.min(K-a-b).map{|x|x<0?-x:0}).reduce 0,:+
}.max}.max


Measured memory_bytes: 3336
#include <bits/stdc++.h>
#define sz(v)   ((int)(v).size())
#define  all(v)    ((v).begin()),((v).end())
#define  allr(v)    ((v).rbegin()),((v).rend())
#define   pb         push_back
#define   mp         make_pair
#define    clr(v,d)      memset( v, d ,sizeof(v))
typedef  long long     ll ;
using namespace std;
void GO(){ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);}
const int N=1009;
ll a[N];
int main(){
    GO();
    int n;
    cin>>n;
    int g=0;
    for(int i=0;i<n;i++){
        int no;
        cin>>no;
        g=__gcd(g,no);
    }
    cout<<g<<endl;
}


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

int main() {
	double a, b, c, d, e, f,A,B,D,E;
	while (cin >> a >> b >> c >> d >> e >> f) {
		A = e / (a*e - b*d);
		B = -b / (a*e - b*d);
		D = -d / (a*e - b*d);
		E = a / (a*e - b*d); 
		a = A*c + B*f;
		a *= 1000;
		if(a>=0)a += 0.5;
		else a -= 0.5;
		a = int(a);
		a /= 1000;
		b = D*c + E*f;
		b *= 1000;
		if (b >= 0)b += 0.5;
		else b -= 0.5;
		b = int(b);
		b /= 1000;
		cout << fixed << setprecision(3) << a << " " << b << endl;
	}
	return 0;
}

Measured memory_bytes: 1280
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=1e5+5;
int n,a[maxn],len;
string s;
void init()
{
    len=0;
    for(int i=0;i<n-1;)
    {
        if(s[i]=='A'&&s[i+1]=='C')
           a[len++]=i+1,i+=2;
        else i++;
    }
    sort(a,a+len);
}
int main()
{
    int Q,l,r;
    cin>>n>>Q;
    cin>>s;
    init();
    while(Q--)
    {
        scanf("%d%d",&l,&r);
        int L=lower_bound(a,a+len,l)-a;
        int R=lower_bound(a,a+len,r)-a;
        R--;
        if(L>R) printf("0\n");
        else printf("%d\n",R-L+1);
    }
}


Measured memory_bytes: 1280
anten=[]
for i in range(5):
    anten.append(int(input()))
k=int(input())

flag=False
for i in range(5):
    for j in range(5-i-1):
        p=anten[i]
        q=anten[i+j+1]
        if q-p>k:
            flag=True
if flag:
    print(":(")
else:
    print("Yay!")

Measured memory_bytes: 3060