akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int N;
    cin >> N;
    long long K;
    cin >> K;
    long long Q;
    cin >> Q;
    vector<long long> score(N, K - Q);
    for (long long i = 0; i < Q; i++)
    {
        int a;
        cin >> a;
        a--;
        score[a]++;
    }
    for (int i = 0; i < N; i++)
    {
        if (score[i] <= 0)
            cout << "No" << endl;
        else
            cout << "Yes" << endl;
    }
    return 0;
}

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


int main(void){
  char S[101];
  int i;

  scanf("%s", S);

  int n = strlen(S);

  for (i = 0; i < n; i++) {
    if (i%2 == 0) {
      if (S[i] == 'L') {
        puts("No");
        return 0;
      }
    }else{
      if (S[i] == 'R') {
        puts("No");
        return 0;
      }
    }
  }

  puts("Yes");
  return 0;
}


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

using namespace std;

#define sqr(x) ((x) * (x))
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()

typedef long long ll;

const int MOD = 1000000007;
const int INF = 1000000007;
const ll INFLL = 1000000000000000007LL;

void solve() {
  string S;
  int Q;
  cin >> S >> Q;
  deque<char> ans;
  for (int i = 0; i < S.size(); i++) {
    ans.push_back(S[i]);
  }
  bool flag = false;
  for (int i = 0; i < Q; i++) {
    int T;
    cin >> T;
    if (T == 1) {
      flag = !flag;
    } else {
      int F;
      char C;
      cin >> F >> C;
      if (F == 1) {
        if (flag)
          ans.push_back(C);
        else
          ans.push_front(C);
      } else {
        if (flag)
          ans.push_front(C);
        else
          ans.push_back(C);
      }
    }
  }

  if (flag) reverse(all(ans));
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i];
  }
  cout << endl;
}

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

  solve();

  return 0;
}

Measured memory_bytes: 976
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<deque>
#include<string>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<stdlib.h>
#include<cassert>
using namespace std;
const long long mod=1000000007;
const long long inf=mod*mod;
const long long d2=500000004;
const long double EPS = 1e-14;
const long double INF = 1e+20;
const long double PI = acos(-1);
char S[100];
char T[100];
int main(){
	scanf("%s%s",S,T);
	int n=strlen(S)+strlen(T);
 
	for(int i=0;i<n;i++){
		if(i%2==0)printf("%c",S[i/2]);
		else printf("%c",T[i/2]);
	}printf("\n");
}

Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
if(a<=b&&b<=c)cout<<a<<" "<<b<<" "<<c<<endl;
else if(a<=c&&c<=b)cout<<a<<" "<<c<<" "<<b<<endl;
else if(b<=a&&a<=c)cout<<b<<" "<<a<<" "<<c<<endl;
else if(b<=c&&c<=a)cout<<b<<" "<<c<<" "<<a<<endl;
else if(c<=a&&a<=b)cout<<c<<" "<<a<<" "<<b<<endl;
else cout<<c<<" "<<b<<" "<<a<<endl;
return 0;
}


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

int main(){
  
  char s;
  
  cin >> s;
  
  if (s == 'a' || s == 'e' || s == 'i' || s == 'o' || s == 'u'){
    
    cout << "vowel";
    
  }else{
    
    cout << "consonant";
    
  }
  
  cout << endl;
  
}

Measured memory_bytes: 3620
#include <stdio.h>
#include <string.h>
#define MAX 1001

int main(void) {
	int n,i,j,k,pt,tp;
	char c,charA[MAX],t[8];

	scanf("%d\n",&n);
	for (i=0;i<n;i++) {
		pt = 0;
		while ((c = fgetc(stdin))!='\n') {
			charA[pt++] = c;
		}
		charA[pt] = '\0';
		for (j=0;j<pt;j++) {
			if (charA[j]=='H') {
				for (k=j;k<=j+6;k++) {
					t[k-j] = charA[k];
				}
				t[7] = '\0';
				if (!strcmp(t,"Hoshino")) {
					charA[j+6] = 'a';
					j += 5;
				}
			}
		}
		printf("%s\n",charA);
	}

	return 0;
}

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

int main(){
    int n, i, m = 2000000000, t = 2000000000, mi, ti, c = 0;
    cin >> n;
    int a[n];
    for(i=0; i<n; i++){
        cin >> a[i];
        if(a[i] < m){
            m = a[i];
            mi = i;
        }
    }
    m = t;
    while(c != n-1){
        c = 0;
        for(i=0; i<n; i++){
            if(a[i] == 0){
                c++;
            }else if(i != mi){
                if(a[i]%m == 0){
                    c++;
                }else if(a[i]%m < t){
                    t = a[i]%m;
                    ti = i;
                }
                a[i] %= m;
            }
        }
        m = t;
        mi = ti;
    }
    cout << m;
    return 0;
}

Measured memory_bytes: 640
# SPDX-License-Identifier: X11
# 2020-07-30

N = parse(Int,readline())
S = readlines()

O = zeros(Int,4)

for i in 1:N
  if S[i] == "AC"
    O[1] = O[1] + 1
  elseif S[i] == "WA"
    O[2] = O[2] + 1
  elseif S[i] == "TLE"
    O[3] = O[3] + 1
  elseif S[i] == "RE"
    O[4] = O[4] + 1
  end
end

println(string("AC x ", O[1]))
println(string("WA x ", O[2]))
println(string("TLE x ", O[3]))
println(string("RE x ", O[4]))


Measured memory_bytes: 181488
import java.util.Arrays;
import java.util.Scanner;

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

Measured memory_bytes: 21972
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) begin(v),end(v)
#define fi first
#define se second
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }
using ll = long long;
using pii = pair<int, int>;
constexpr ll INF = 1ll<<30;
constexpr ll longINF = 1ll<<60;
constexpr ll MOD = 1000000007;
constexpr bool debug = 0;
//---------------------------------//

int main() {
	int N;
	cin >> N;
	string S;
	cin >> S;
	
	map<pair<string, string>, int> mm;
	REP(i, 1 << N) {
		string a, b;
		REP(j, N) {
			if (i >> j & 1) a += S[j + N];
			else b += S[j + N];
		}
		++mm[make_pair(a, b)];
	}
	
	ll ans = 0;
	REP(i, 1 << N) {
		string a, b;
		REP(j, N) {
			if (i >> j & 1) a += S[j];
			else b += S[j];
		}
		
		reverse(ALL(b));
		reverse(ALL(a));
		ans += mm[make_pair(b, a)];
	}
	
	cout << ans << endl;
	return 0;
}


Measured memory_bytes: 87040
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;

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

	int n, m; cin >> n >> m;
	vector<int>C(n);
	for (int i = 0; i < n; i++){
		cin >> C[i];
	}
	sort(C.begin(), C.end());

	vector<vector<int>>X(m);
	vector<int>Y(m);

	int pre = C[0];
	int cnt = 1;
	for (int i = 1; i < C.size(); i++){
		if (C[i] == pre) cnt++;
		else{
			X[pre%m].push_back(cnt);
			Y[pre%m] += cnt;
			pre = C[i];
			cnt = 1;
		}
	}
	X[pre%m].push_back(cnt);
	Y[pre%m] += cnt;

	int p = 0;
	for (int i = 1; i <= m/2 - !(m%2); i++){
		int tmp_p;
		tmp_p = min(Y[i], Y[m - i]);
		//cout << tmp_p << endl;
		Y[i] -= tmp_p;
		Y[m - i] -= tmp_p;
		p += tmp_p;
	}
	p += Y[0] / 2;
	if (!(m % 2))p += Y[m / 2] / 2;

	//cout << p << endl;

	for (int i = 1; i < m; i++){
		Y[i] /= 2;
		if (!(m % 2))if (i == m / 2)continue;
		for (int j = 0; j < X[i].size(); j++){
			if (X[i][j] >= 2){
				p += min(Y[i], X[i][j] / 2);
				Y[i] -= X[i][j] / 2;
				if (Y[i] <= 0)break;
			}
		}
	}

	cout << p << endl;

	return 0;
}

Measured memory_bytes: 6528
#include <bits/stdc++.h>
using namespace std;
string s;
int len;
int main()
{
  cin>>s;
  len=s.size();
  for(int i=0;i<len;i++)
  	if(s[i]=='9'){
  		cout<<"Yes"<<endl;
  		return 0;
	  }
  cout<<"No"<<endl;	  
  return 0;
}


Measured memory_bytes: 256
a, b, c, x, y = map(int, input().split())
possible_minimum_sum1 = a * x + b * y
possible_minimum_sum2 = c * x * 2 + max(y-x, 0) * b
possible_minimum_sum3 = c * y * 2 + max(x-y, 0) * a

print(min(possible_minimum_sum1, possible_minimum_sum2, possible_minimum_sum3))


Measured memory_bytes: 3060
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A = [LIST() for i in range(3)]
N = INT()
B = [INT() for i in range(N)]
T = [[False] * 3 for i in range(3)]

for i in range(3):
    for j in range(3):
        if A[i][j] in B:
            T[i][j] = True

# tate
for i in range(3):
    if T[i][0] == T[i][1] == T[i][2] == True:
        print("Yes")
        exit()
for i in range(3):
    if T[0][i] == T[1][i] == T[2][i] == True:
        print("Yes")
        exit()

if T[0][0] == T[1][1] == T[2][2] == True:
    print("Yes")
    exit()
if T[0][2] == T[1][1] == T[2][0] == True:
    print("Yes")
    exit()

print("No")



Measured memory_bytes: 5732
using System;
class test {
    public static void Main() {
        var a = 0;
        for (int i = 1; i > 0; i++) {
            a = int.Parse(Console.ReadLine());
            if (a == 0) {
                i *= -1;
                continue;
            } else {
                Console.WriteLine("Case " + i + ": " + a);
            }
        }
    }
}


Measured memory_bytes: 15756
#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
#define rep(i, n) for (int i = 0; i < ((int)(n)); i++) // 0-indexed昇順

int main()
{
  char A, B;
  cin >> A >> B;
  if (A == 'H') {
    if (B == 'H') {
      cout << 'H' << endl;
    } else {
      cout << 'D' << endl;
    }
  } else if (B == 'H') {
    cout << "D" << endl;
  } else {
    cout << "H" << endl;
  }
}

Measured memory_bytes: 256
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <iomanip>
using namespace std;

typedef long long ll;

#define sz size()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(c) (c).begin(), (c).end()
#define rep(i,a,b) for(ll i=(a);i<(b);++i)
#define per(i,a,b) for(ll i=(b-1);i>=(a);--i)
#define clr(a, b) memset((a), (b) ,sizeof(a))
#define ctos(c) string(1,c)
#define print(x) cout<<#x<<" = "<<x<<endl;

#define MOD 1000000007

#define MAX_V 3000
#define INF 1000000000

struct edge{int to, cost;};
typedef pair<int,int> P;

vector<edge> G[MAX_V];
int mn[MAX_V];

void ae(int from, int to, int cost){
  edge e = {to,cost};
  G[from].push_back(e);
}

void dijk(int start, int V){
  priority_queue<P, vector<P>, greater<P> > que;
  for(int i = 0; i < V; i++)mn[i] = INF;
  mn[start] = 0;
  que.push(P(0,start));
  while(!que.empty()){
    P p = que.top(); que.pop();
    int v = p.second;
    if(mn[v]<p.first)continue;
    for(int i = 0; i < G[v].size(); i++){
      edge e = G[v][i];
      if(mn[e.to] > mn[v]+e.cost){
        mn[e.to] = mn[v]+e.cost;
        que.push(P(mn[e.to],e.to));
      }
    }
  }
}

int main() {
  ll h,w;
  cin>>h>>w;
  vector<string> vs; 
  rep(y,0,h){
    string s;
    cin>>s;
    vs.pb(s);
  }
  ll a = 0;
  rep(y,0,h){
    rep(x,0,w){
      if(vs[y][x]=='#')a++;
    }
  }
  rep(y,0,h){
    rep(x,0,w-1){
      if(vs[y][x]=='.'&&vs[y][x+1]=='.'){
        ae(y*w+x,y*w+(x+1),1);
        ae(y*w+(x+1),y*w+x,1);
      }
    }
    rep(x,1,w){
      if(vs[y][x-1]=='.'&&vs[y][x]=='.'){
        ae(y*w+x,y*w+(x-1),1);
        ae(y*w+(x-1),y*w+x,1);
      }
    }
  }
  rep(x,0,w){
    rep(y,0,h-1){
      if(vs[y][x]=='.'&&vs[y+1][x]=='.'){
        ae(y*w+x,(y+1)*w+x,1);
        ae((y+1)*w+x,y*w+x,1);
      }
    }
    rep(y,1,h){
      if(vs[y-1][x]=='.'&&vs[y][x]=='.'){
        ae(y*w+x,(y-1)*w+x,1);
        ae((y-1)*w+x,y*w+x,1);
      }
    }
  }
  dijk(0,h*w);
  if(mn[w*h-1]==INF){
    cout << -1 << endl;
    return 0;
  }
  ll ans = w*h-(mn[w*h-1]+1)-a;
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 640
#include <cstdio>

int main() {
	using namespace std;
	for (;;) {
		double a, b, c, d, e, f;
		if (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) == EOF) { break; }

		double detA = (double)(a * e - b * d);
		if (detA == 0) { break; }
		double x = (double)(e * c - b * f) / detA;
		if (x <= 0 && x > -5e-4) { x = 0; }
		double y = (double)(-d * c + a * f) / detA;
		if (y <= 0 && y > -5e-4) { y = 0; }
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

Measured memory_bytes: 0
#include <bits/stdc++.h>
 
#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)
 
#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=(int)(a)-1;i>=(int)(b);--i)
#define rrep(...) _overload(__VA_ARGS__,_rrange,_rrep,)(__VA_ARGS__)
 
#define _all(arg) begin(arg),end(arg)
#define uniq(arg) sort(_all(arg)),(arg).erase(unique(_all(arg)),end(arg))
#define getidx(ary,key) lower_bound(_all(ary),key)-begin(ary)
#define clr(a,b) memset((a),(b),sizeof(a))
#define bit(n) (1LL<<(n))
 
// #define DEBUG
 
#ifdef DEBUG
    #define dump(...) fprintf(stderr, __VA_ARGS__)
#else
    #define dump(...)
#endif
 
template<class T>bool chmax(T &a, const T &b) { return (a<b)?(a=b,1):0;}
template<class T>bool chmin(T &a, const T &b) { return (b<a)?(a=b,1):0;}
 
using namespace std;
using ll=long long;
using vi=vector<int>;
using vll=vector<ll>;
 
const double EPS = 1e-10;
const double PI = acos(-1.0);
const ll inf =1LL << 62;
const ll mod=1000000007LL;
const int dx[4]={1,0,-1,0};
const int dy[4]={0,1,0,-1};
 
 
ll extgcd(ll a,ll b,ll& x,ll& y){x=1,y=0;ll g=a;if(b!=0) g=extgcd(b,a%b,y,x),y-=a/b*x;return g;}
ll ADD(const ll &a, const ll &b,const ll &mod) { return (a+b)%mod;}
ll SUB(const ll &a, const ll &b,const ll &mod) { return (a-b+mod)%mod;}
ll MUL(const ll &a, const ll &b,const ll &mod) { return (1LL*a*b)%mod;}
ll DIV(const ll &a, const ll &b,const ll &mod) {ll x,y; extgcd(b,mod,x,y);return MUL(a,(x+mod)%mod,mod);}
 
random_device rd;
mt19937 mt(rd());
uniform_int_distribution<int> dice(1,6);
uniform_real_distribution<double> score(0.0,10.0);

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

    int n; cin >> n;
    vll a(n), b(n);
    rep(i, n){
        cin >> a[i] >> b[i];
    }

    ll res = 0;
    rrep(i, n){
        a[i] += res;
        if(a[i] == 0 or b[i] == 1 or a[i] % b[i] == 0) continue;
        res += (b[i] - a[i] % b[i]);
    }

    cout << res << endl;

    return 0;
}


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

int main(){
    int n,cnt=0;
    string s;
    cin>>n>>s;

    for(int i=0; i<n; i++){
        if(s[i] == 'A' && s[i+1] == 'B' && s[i+2] == 'C'){
            cnt++;
        }
    }
    cout<<cnt<<endl;
}


Measured memory_bytes: 3624
import sys
import time
input = sys.stdin.buffer.readline
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getlist():
    return list(map(int, input().split()))
# import math
from math import gcd
import heapq
import bisect
from collections import defaultdict, Counter, deque
MOD = 10**9 + 7
INF = 10**21


def dijkstra(graph, start, n):
    h = []
    heapq.heappush(h, (0, start))
    costs = [INF for _ in range(n)]
    while h:
        cost, cur = heapq.heappop(h)
        if costs[cur] != INF:
            continue
        costs[cur] = cost
        for edge in graph[cur]:
            ecost, tgt = edge
            if costs[tgt] == INF:
                heapq.heappush(h, (cost + ecost, tgt))

    return costs


def dist(x1, y1, x2, y2):
    return math.sqrt(abs(x1 - x2) ** 2 + abs(y1 - y2) ** 2)


def main():
    K = getN()
    ans = 0
    for i in range(1, K+1):
        for j in range(1, K+1):
            for k in range(1, K+1):
                tmp = gcd(i, j)
                ans += gcd(tmp, k)
                # print(i,j,k,ans)

    print(ans)

if __name__ == '__main__':
    main()


Measured memory_bytes: 68136
#include "bits/stdc++.h"
#define ed cout<<"\n";
#define speed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long int
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define All(obj) (obj).begin(),(obj).end()

using namespace std;


int main() {
	//speed;
	long double t, x;
	long double ans;
	cin >> t >> x;
	ans = t / x;
	cout << ans;
	ed;
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
 
int main(){
  long long money = 100;
  long long X;
  cin >> X;
  int year = 0;
  
  while(money < X){
    money = money + money/100;
    year++;
  }
  
  cout << year << endl;
}
    


Measured memory_bytes: 3592
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub
import copy

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, GSB):
    def f(N, gsb):
        dp0 = [0] * (N+1)
        dp1 = [0] * (N+1)
        for i in range(3):
            v = gsb[1][i] - gsb[0][i]
            a = gsb[0][i]
            if v > 0:
                for w in range(N+1):
                    if w >= a:
                        dp1[w] = max(dp0[w], dp1[w-a] + v)
            else:
                dp1 = dp0
            dp0 = dp1
            dp1 = copy.copy(dp0)
        return dp0[N] + N
    tmp = f(N, GSB)
    # print(tmp)
    GSB[0], GSB[1] = GSB[1], GSB[0]
    return f(tmp, GSB)


def main():
    N = read_int()
    GSB = [read_int_n() for _ in range(2)]
    print(slv(N, GSB))


if __name__ == '__main__':
    main()


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

Measured memory_bytes: 600
a, b, c, x, y = map(int, input().split())
pata = a*x + b*y

patb = c * (2 * max(x,y))

if x >= y:
    patc = c * (2*y) + a*(x-y)
else:
    patc = c * (2*x) + b*(y-x)
print(min(pata,patb,patc))


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

using namespace std;

int main(){
	string vowel = "aioue";
	char input;
	string output;
	cin >> input;
	if(vowel.find(input) == string::npos){
		output = "consonant";
	}else{
		output = "vowel";
	}

	cout << output << endl;
}


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

signed main(){
  int N,P;
  cin>>N>>P;
  int ans=1;
  if(N==1){cout<<P<<endl;return 0;}
  for(int i=1;pow(i,N)<=P;i++){
    int j=pow(i,N);
    if(P%j==0)ans=i;
  }
  cout<<ans<<endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define lli long long int
#define rep(i,s,e) for(int i=s;i<e;i++)
#define endl '\n'
int main(){
    int n;cin>>n;
    vector<int>A(n);
    rep(i,0,n)cin>>A[i];
    int res=100;
    rep(i,0,n){
        int tmp=0;
        while(A[i]%2==0){
            A[i]/=2;
            tmp++;
        }
        if(tmp<res)res=tmp;
    }
    cout<<res<<endl;
}

Measured memory_bytes: 3596
#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;
#define MOD 1000000007
#define ll long long
#define int long long 
#define INF 1e18
#define ar array
#define f first
#define s  second
#define REP(i,n) for (int i=0;i<(n);i++)
#define wt(x) int x;cin>>x;while(x--)
#define watch(x) cerr << "\n" << (#x) << " is " << (x) << endl
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

template <typename T>
using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>; 

void  c_p_c(){
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  #ifndef ONLINE_JUDGE
  freopen("input1.txt","r",stdin);

  freopen("output1.txt","w",stdout);
#endif
}

int power(int a,int b,int mod){
  a=a%mod;
  if(a==0){
    return 1;
  }
  int res=1;
  while(b){
    if(b&1){
      res=(res*a)%mod;
    }
    b>>=1;
    a=(a*a)%mod;
  }
  return res;
}

int  MMI(int p){
  return power(p,MOD-2,MOD);

}

int32_t main()
{
 c_p_c();
 int n,d;
 int cnt=0;
 cin>>n>>d;
 for(int i=0;i<n;i++){
  int x,y;
  cin>>x>>y;
  if(sqrt(x*x+y*y)<=d){
    cnt++;
  }
 }
 cout<<cnt<<"\n";



return 0;

}








   



   








Measured memory_bytes: 3704
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cctype>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <functional>

using namespace std;
using ll = long long int;
#define rep(i,n) for(int i = 0; i < n; i++)
#define FOR(i, a, b)  for(int i = (a); i < (b) ; i++)
#define pb push_back
#define SORT(v,n) sort(v, v+n)
#define ALL(x) (x).begin(),(x).end()
#define debug(x) cerr << #x << ": " << x << '\n'
#define elif else if
#define itn ll
#define int ll
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
///                →,↑,←,↓,↗,↖,↙,↘
int dx[8] = { 1, 0, -1, 0, 1, -1, -1, 1 };
int dy[8] = { 0, 1, 0, -1, 1, 1, -1, -1 };

signed main() {
	string s;
	cin >> s;
	int i;
	int cnt = 0;
	int k;
	FOR(i, 1, s.size()) {
		if (s[i] == s[i - 1]) {
			cnt++;
			s[i] = s[i] == '0' ? '1' : '0';
		}
	}
	cout << cnt << endl;
	return 0;
}

Measured memory_bytes: 512
#include <iostream>
// #include <algorithm>
// #include <numeric>

int main(){
	long long a, b, k;
	std::cin >> a >> b >> k;
	if(a>=k){
		a -= k;
	}else{
		b -= (k-a);
		a = 0;
		b = std::max(b, 0LL);
	}
	std::cout << a << " " << b << std::endl;
}


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

static const int dx[4]={0,-1,0,1};
static const int dy[4]={1,0,-1,0};
static const char dir[4]={'r','u','l','d'};
int MDT[16][16];

struct Puzzle{
    int f[16];
    int space;
    int MD;
};

Puzzle state;
int limit;
int path[100];

int getAllMD(Puzzle &pz){
    int sum=0;
    for(int i=0;i<16;i++){
        if(pz.f[i]==16) continue;
        sum+=MDT[i][pz.f[i]-1];
    }
    return sum;
}

bool dfs(int depth,int prev){
    if(state.MD==0) return true;
    if(depth+state.MD>limit) return false;

    int sx=state.space/4;
    int sy=state.space%4;
    Puzzle tmp;
    for(int r=0;r<4;r++){
        int tx=sx+dx[r];
        int ty=sy+dy[r];
        if(tx<0||ty<0||tx>3||ty>3){
            continue;
        }
        if(abs(prev-r)==2){
            continue;
        }
        tmp=state;
        state.MD-=MDT[tx*4+ty][state.f[tx*4+ty]-1];
        state.MD+=MDT[sx*4+sy][state.f[tx*4+ty]-1];
        swap(state.f[state.space],state.f[tx*4+ty]);
        state.space=tx*4+ty;
        if(dfs(depth+1,r)){
            path[depth]=r;
            return true;
        }
        state=tmp;
    }
    return false;
}

string iterative_deepening(Puzzle x){
    x.MD=getAllMD(x);
    for(limit=x.MD;limit<100;limit++){
        state=x;
        if(dfs(0,-100)){
            string ans="";
            for(int i=0;i<limit;i++){
                ans+=dir[path[i]];
            }
            return ans;
        }
    }
    return "unsolvable";
}

int main(){
    for(int i=0;i<16;i++){
        for(int j=0;j<16;j++){
            MDT[i][j]=abs(i/4-j/4)+abs(i%4-j%4);
        }
    }
    Puzzle x;
    for(int i=0;i<16;i++){
        cin>>x.f[i];
        if(x.f[i]==0){
            x.f[i]=16;
            x.space=i;
        }
    }

    cout<<iterative_deepening(x).size()<<endl;
}


Measured memory_bytes: 3204
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    ArrayList<Double> list = new ArrayList<Double>();

    for (int i = 0; i < n; i++) {
      list.add(sc.nextDouble());
    }

    for (int i = 0; i < (n - 1); i++) {
      Collections.sort(list);
      list.add((list.get(0) + list.get(1)) / 2);
      list.remove(0);
      list.remove(0);
    }

    System.out.println(list.get(0));

  }
}

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

using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair

int main()
{
	ios::sync_with_stdio(false);
  	cin.tie(0);
	int x, a, b;
	cin >> x >> a >> b;	
	if(a >= b)
		cout << "delicious\n";
	else if(a + x < b)
		cout << "dangerous\n";
	else cout << "safe\n";
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
long long dp[100+1][100000+1];
long long knapsack(long long wt[],long long  val[],long long  w,long long  n){
    if(n==0 || w==0) return 0;
    if (dp[n][w]!=0) return dp[n][w];
    if(wt[n-1]<=w){
        return dp[n][w]=max(val[n-1]+knapsack(wt,val,w-wt[n-1],n-1),knapsack(wt,val,w,n-1));
    }
    else if (wt[n-1]>w)  return dp[n][w] = knapsack(wt,val,w,n-1);
}

int main(){
    long long n,w;
    cin>>n>>w;
    long long wt[n+1],val[n+1];
    for(long long i=0;i<n;i++){
        cin>>wt[i]>>val[i];
    }
    cout<<knapsack(wt,val,w,n)<<endl;
}


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

int main() {
  int n;
  int t[110000],x[110000],y[110000];
  cin>>n;
  t[0]=x[0]=y[0]=0;
  for(int i=0; i<n; i++) cin >> t[i+1] >> x[i+1] >> y[i+1];
  bool can = true;
  for(int i=0; i<n; i++){
    int dt = t[i+1]-t[i];
    int dxdy = abs(x[i+1]-x[i]) + abs(y[i+1]-y[i]);
    if(dt < dxdy) can = false;
    if(dt%2 != dxdy%2) can = false;
  }
  if(can) cout<<"Yes";
  else cout<<"No";
}

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

template<typename T>
istream& operator >> (istream& istr, vector<T>& v){
    for(T& x: v) istr >> x;
    return istr;
}

template<typename T, typename U>
istream& operator >> (istream& istr, pair<T,U>& p){
    istr >> p.first >> p.second;
    return istr;
}

template<typename T>
ostream& operator << (ostream& ostr, vector<T>& v){
    if(!v.empty()){
        ostr << v.front();
        for(auto itr = ++v.begin(); itr != v.end(); itr++)
            // ostr << *itr;
            ostr << " " << *itr;
    }
    return ostr;
}

template<typename T, typename U>
ostream& operator << (ostream& ostr, pair<T,U>& p){
    // ostr << p.first << p.second;
    // ostr << p.first << ", " << p.second;
    ostr << "(" << p.first << ", " << p.second << ")";
    return ostr;
}

template<typename T>
ostream& operator << (ostream& ostr, vector<vector<T>>& vv){
    if(!vv.empty()){
        ostr << vv.front();
        for(auto itr = ++vv.begin(); itr != vv.end(); itr++)
            ostr << endl << *itr;
    }
    return ostr;
}

template<typename T, typename U>
ostream& operator << (ostream& ostr, vector<pair<T,U>>& vp){
    if(!vp.empty()){
        ostr << vp.front();
        for(auto itr = ++vp.begin(); itr != vp.end(); itr++)
            ostr << endl << *itr;
    }
    return ostr;
}

typedef long long ll;
typedef vector<ll> vll;
typedef vector<char> vc;
typedef vector<double> vd;
// vll v(n); v[i]=x;
typedef vector<vll> vvll;
typedef vector<vc> vvc;
typedef vector<vd> vvd;
// vvll v(m,vll(n)); v[i][j]=x;
typedef pair<ll,ll> pll;
typedef pair<double,double> pd;
typedef vector<pll> vpll;
typedef vector<pd> vpd;
// vpll v(n); v[i]=make_pair(x,y); v[i].first/second;
// v.front() : v[0]
// v.back()  : v[v.size()-1]

#define PI 3.1415926535897932
#define EPS 1e-12
#define INF ((ll)1e+12)
#define REP(i,n) for(ll i=0; i<(n); i++)
#define RREP(i,n) for(ll i=(n)-1; i>=0; i--)
#define FOR(i,a,b) for(ll i=(a); i<=(b); i++)
#define FORR(i,a,b) for(ll i=(b); i>=(a); i--)
#define fix(x) cout << fixed << setprecision(x)
#define dump(x) cout << #x << " = " << (x) << endl
#define all(x) (x).begin(),(x).end()

template<typename T> T sum(vector<T>& v){return accumulate(all(v), (T)0);}
template<typename T> inline void sort(vector<T>& v){sort(all(v));}
template<typename T> inline void rsort(vector<T>& v){sort(all(v), greater<T>());}
template<typename T> inline void chmin(T& a, T b){if(a>b) a=b;}
template<typename T> inline void chmax(T& a, T b){if(a<b) a=b;}

int main(){
    ll n, k, ans = 0;
    const ll MOD = 1e9+7;
    cin >> n >> k;
    ll lb = (0 +   k-1)*k/2;
    ll ub = (n + n-k+1)*k/2;
    FOR(i,k,n+1){
        ans += ub-lb+1;
        ans %= MOD;
        lb += i-1;
        ub += n-i-1;
    }
    cout << ans << endl;
    return 0;
}


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

#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <unordered_map>
#include <queue>
#include <algorithm>

#include <bits/stdc++.h>
#include <cmath>
#include <limits>

using namespace std;

int x[102] = {0};
int y[102] = {0};
int h[102] = {0};

int main(int argc, char* argv[]){
	int N, CX, CY;

	cin >> N;
	for(int i=1; i<=N; i++){
		cin >> x[i] >> y[i] >> h[i];
	}

	int cx, cy, w;
	int H, HUP, notMatch;
	for(cx= 0;  cx <= 100; cx++){
		for(cy = 0; cy <= 100; cy++){
			notMatch = 0, H = -1, HUP = -1;
			for(int i = 1; i <= N; i++){
				if(h[i] > 0){
					w = h[i] + abs(x[i] - cx) + abs(y[i] - cy);
					if(H == -1){
						H = w;
					}
					else if(H != w){
						notMatch = 1;
						break;
					}
				}
				else if(h[i] == 0){
					w = abs(x[i] - cx) + abs(y[i] - cy);
					if(HUP == -1){
						HUP = w;
					}
					else{
						HUP = min(HUP, w);
					}
					if(H > HUP){
						notMatch = 1;
						break;
					}
				}
			}
			if(notMatch == 0){ break; }
		}
		if(notMatch == 0){ break; }
	}
	printf("%d %d %d\n", cx, cy, H);
	return 0;
}

Measured memory_bytes: 256
//Written by Rhitwik Saha//
#include <bits/stdc++.h>
using namespace std;
#define int         long long
#define mp          make_pair
#define pb          push_back
#define pii         pair<int,int>
#define vi          vector<int>
#define vb          vector<bool>
#define vc          vector<char>
#define vii         vector<pii>
//#define mi          map<int,int>
//#define mii         map<pii,int>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (int)x.size()
#define ub(x)       upper_bound(x)
#define lb(x)       lower_bound(x)
#define endl        '\n'
#define file        freopen("input.txt","r",stdin);freopen("output.txt","w",stdout)
#define fastio      ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
// #define N            1e5+5
#define M           1000000007
#define MAX         100005
#define mem0(a)     memset(a,0,sizeof(a))
#define prec        cout<<std::setprecision(9)<<std::fixed
#define forn(i,a,b)  for(int i=a;i<b;i++)

int i,j,k;

void Anon_mouS(){
    int n,m;
  	cin>>n>>m;
  	if(n==m)cout<<"Yes";
  else cout<<"No";
}
int32_t main(){
    prec;
    fastio;
    // file;
    // sieve();
    int q=1;
    //cin>>q;
    while(q--)Anon_mouS();
    return 0;
}



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

#define ll long long
#define ld long double
 
#define rep(i,a,b) for(ll i=a;i<b;i++)
#define repb(i,a,b) for(ll i=a;i>=b;i--)
 
#define err() cout<<"--------------------------"<<endl; 
#define errA(A) for(auto i:A)   cout<<i<<" ";cout<<endl;
#define err1(a) cout<<#a<<" "<<a<<endl
#define err2(a,b) cout<<#a<<" "<<a<<" "<<#b<<" "<<b<<endl
#define err3(a,b,c) cout<<#a<<" "<<a<<" "<<#b<<" "<<b<<" "<<#c<<" "<<c<<endl
#define err4(a,b,c,d) cout<<#a<<" "<<a<<" "<<#b<<" "<<b<<" "<<#c<<" "<<c<<" "<<#d<<" "<<d<<endl

#define pb push_back
#define all(A)  A.begin(),A.end()
#define allr(A)    A.rbegin(),A.rend()
#define ft first
#define sd second
 
#define pll pair<ll,ll>
#define V vector<ll>
#define S set<ll>
#define VV vector<V>
#define Vpll vector<pll>
 
#define endl "\n"
 
const ll logN = 20;
const ll M = 1000000007;
const ll INF = 1e18;
#define PI 3.14159265
 
const ll N = 100005;

int main(){
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    ll k;
    cin >> k;
    ll p = 1;
    ll rem = 0;
    if(k % 2 == 0 or k % 5 == 0){
    	cout << -1 << endl;
    }
    else{
    	ll cnt = 0;
    	while(1){
    		cnt++;
    		rem = (rem + p * 7) % k;
    		p = (p * 10) % k;
    		if(rem == 0){
    			cout << cnt << endl;
    			return 0;
    		}
    	}
    }
    return 0;
}

Measured memory_bytes: 3620
function Main(s) {
	s = s.split("\n");
	var n = parseInt(s[0]);
	var a = Array(n);
	var c = Array(n);
	for(var i = 0; i < n; i++){
		a[i] = s[i+1].split(" ").map(a => parseInt(a));
	}
	for(var i = 0; i < n; i++){
		c[i] = s[i+n+1].split(" ").map(a => parseInt(a));
	}
	a = a.sort((a,b) => a[1] - b[1]);
	a = a.sort((a,b) => a[0] - b[0]);
	c = c.sort((a,b) => a[0] - b[0]);
	c = c.sort((a,b) => b[1] - a[1]);
	
	var ans = 0;
	for(i = n-1; i >= 0; i--){
		for(var j = c.length-1; j >= 0; j--){
			if(a[i][0] < c[j][0] && a[i][1] < c[j][1]){
				ans++;
				c.splice(j,1);
				break;
			}
		}
	}
	console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());

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

int main()
{
	// Variable declaration
	char x[1001];
	int sum, i = 0;

	while (1)
	{
		// Input x
		cin >> x;

		// Check of value.
		if (x[0] == '0')
		{
			// End of Input.
			break;
		}

		while (x[i])
		{
			sum += x[i] - '0';
			i++;
		}

		// Output
		cout << sum << endl;

		// Initializ
		sum = 0;
		i = 0;
	}

	return 0;
}

Measured memory_bytes: 1140
//============================================================================
// Name        : 0006.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <algorithm>
using namespace std;

int main() {
	string s;
	while( cin >> s ){
		reverse(s.begin() , s.end());
		cout << s <<endl;
	}
	return 0;
}

Measured memory_bytes: 1172
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); i++)
using ll = long long;
using P = pair<int,int>;
using PP = pair<int,pair<int,int>>;
using T = tuple<string,int,int>;
const ll INF = 1LL<<60;
const int ny[4] = {-1,1,0,0}, nx[4] = {0,0,-1,1};
int sy,sx,gy,gx;

int main(){
  int n; cin >> n;
  vector<ll> a(n),b(n),c(n);

  rep(i,n) cin >> a[i];
  rep(i,n) cin >> b[i];
  rep(i,n) cin >> c[i];

  sort(a.begin(), a.end());
  sort(c.begin(), c.end());
  ll ans = 0;
  for(int i = 0; i < n; i++){
    int now = b[i];
    ll low = lower_bound(a.begin(), a.end(), now) - a.begin();
    ll hig = n - (upper_bound(c.begin(), c.end(), now) - c.begin());
    ans += low * hig;
  }
  cout << ans << endl;
  return 0;
}


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

int main(void){
    // Your code here!
    while (true){
    int n,d=1,u=1,m=0,t=0,a,b;
    cin >> n;
    if (n==0) break;
    vector<int> id(n),s(n),dd(100000);
    for (int i=0;i<100000;i++){
        dd.at(i)=1;
    }
    for (int i=0;i<n;i++){
        cin >> id.at(i);
        t=0;u=1;m=0;d+=3;
        while (true){
            if (u<10){
            cin >> a;
            t=t+a;
            if (m==0 && t<10) {m++;d++;continue;}
            else if (t<10) {s.at(i)+=(t-a)*dd.at(d-1);s.at(i)+=a*dd.at(d);d++;t=0;u++;m=0;}
            else if (m==0 && t==10) {s.at(i)+=t*dd.at(d);dd.at(d+1)++;dd.at(d+2)++;t=0;u++;m=0;d++;}
            else {s.at(i)+=(t-a)*dd.at(d-1);s.at(i)+=a*dd.at(d);dd.at(d+1)++;t=0;u++;m=0;d++;}
            }
            if (u==10){
                cin >> a >> b;
                if (a+b>=10) {s.at(i)+=a*dd.at(d);s.at(i)+=b*dd.at(d+1);cin >> a;s.at(i)+=a;}
                else {s.at(i)+=a*dd.at(d);s.at(i)+=b*dd.at(d+1);}
                break;
            }
        }
    }
    vector<pair<int,int>> v(n);
    for (int i=0;i<n;i++){
        v.at(i).second=s.at(i);
        v.at(i).first=id.at(i);
    }
    sort(v.begin(),v.end(), [&](const pair<int, int>& x, const pair<int, int>& y) {
			if (x.second == y.second) {
				return x.first < y.first;
			}
			return x.second > y.second;
		});
    for (int i=0;i<n;i++) {
			cout << v[i].first << " " << v[i].second << endl;
		}
}
}



Measured memory_bytes: 3464
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repm(i, m, n) for (int i = m; i < (n); i++)
#define eps (1e-7)
#define inf (1e9)
#define pi (acos(-1))
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
ll a, b, c, i, j, k, l, m, n, ans, tmp, hoge;

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

    cin >> n >> a >> b;
    string str;
    cin >> str;

    // cout << "a+b " << a + b << endl;
    // cout << "b " << b << endl;
    int countA = 0, countB = 0;
    rep(i, n)
    {
        // cout << "i " << i << " str " << str[i] << endl;
        // cout << "countA " << countA << endl;
        // cout << "countB " << countB << endl;
        if (str[i] == 'a')
        {
            if ((countA + countB) < (a + b))
            {
                countA++;
                cout << "Yes" << endl;
            }
            else
                cout << "No" << endl;
        }
        else if (str[i] == 'b')
        {
            if (((countA + countB) < (a + b)) && countB < b)
            {
                countB++;
                cout << "Yes" << endl;
            }
            else
                cout << "No" << endl;
        }
        else
            cout << "No" << endl;
        //cout << endl;
    }

    return 0;
}

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

using namespace std;

#define int long long
#define x first
#define y second
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define forn(i,n) for(int i=0;i<(int)n;i++)
#define pb push_back
#define sz(a) (int)(a.size())

typedef long long ll;typedef vector<int> vi;
typedef pair<int,int> ii;typedef vector<ii> vii;
typedef vector<vi> vvi;

set<int> st;
signed main(){
	IOS
	int x,n;cin>>x>>n;
	forn(i,n){
		int a;cin>>a;
		st.insert(a);
	}
	for(int d=0;d<200;d++){
		if(!st.count(x-d)){
			cout<<x-d;
			return 0;
		}
		else if(!st.count(x+d)){
			cout<<x+d;
			return 0;
		}
	}
}

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

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

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(20);
    
    ll a,b;
    cin>>a>>b;
    ll g = gcd(a,b);
    ll ans = a*b/g;
    cout << ans << endl;
    
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#include<string.h>
using namespace std;
#define rep(a,b,c) for(ll a=b;a<c;a++)
#define ll long long
#define endl '\n'
#define pb(a) push_back(a)

int main(){
    //ios_base::sync_with_stdio(false);
    //cin.tie(NULL);
    int n;
    cin>>n;
    ll ans=0;
    ll divs[n+1]={0};
    rep(i,1,n+1){
        for(int j=i;j<n+1;j+=i){
            divs[j]++;
        }
    }
    rep(i,1,n+1){
        ans+=i*divs[i];
    }
    cout<<ans<<endl;


    return 0;
}


Measured memory_bytes: 81748
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using vi=vector<int>;
using P = pair<int,int>;
using Graph = vector<vector<int>>;
template<typename T> void ndarray(vector<T> &vec, int len) { vec.resize(len); }
template<typename T, typename... Args> void ndarray(vector<T> &vec, int len, Args... args) { vec.resize(len); for (auto &v : vec) ndarray(v, args...); }

int two(int w,int x){
    rep(i,x){
        w*=2;
    }
    return w;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int a,b,c,k;
    cin >> a >> b >> c >> k;
    for(int i=0;i<=k;++i){
        for(int j=0;j+i<=k;++j){
            for(int l=0;i+j+l<=k;++l){
                if(two(a,i)<two(b,j) && two(b,j)<two(c,l)){
                    cout << "Yes" << "\n";
                    return 0;
                }
            }
        }
    }
    for(int i=0;i<=k;++i){
        for(int j=0;j+i<=k;++j){
            for(int l=0;i+j+l<=k;++l){
                if(two(a,l)<two(b,i) && two(b,i)<two(c,j)){
                    cout << "Yes" << "\n";
                    return 0;
                }
            }
        }
    }
    for(int i=0;i<=k;++i){
        for(int j=0;j+i<=k;++j){
            for(int l=0;i+j+l<=k;++l){
                if(two(a,j)<two(b,l) && two(b,l)<two(c,i)){
                    cout << "Yes" << "\n";
                    return 0;
                }
            }
        }
    }
    cout << "No" << "\n";
    return 0;
}   

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

int main(){
 int n,d;
 cin>>n>>d;
 int res=(2*d)+1;
 if(n%res==0){
     cout<<n/res<<endl;
 }
 else
 cout<<(n/res)+1<<endl;
return 0;
}

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

int main(){
  int N,T;
  cin >> N >> T;
  int num = INF;
  rep(i,N){
    int c,t;
    cin >> c >> t;
    if(T>=t){
      num = min(num,c);
    }
  }
  if(num==INF){
    cout << "TLE" << endl;
  }else{
    cout << num << endl;
  }
}

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

int main(){
   int n,k;
   cin >> n >> k;
   vector<int> l(n);
   for (int i=0;i<n;i++){
      cin >> l.at(i);
   }
   sort(l.begin(),l.end());
   reverse(l.begin(),l.end());
   int i=0;
   int sum=0;
   while (i<k){
      sum+=l.at(i);
      i++;
   }
   cout << sum << endl;
}

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

signed main() {
	int N;
	cin >> N;
	vector<ll> A(N);
	vector<int> Z;
	for(int i=0;i<N;i++) {
		cin >> A[i];
		if(A[i] == 0LL) {
			Z.push_back(i);
		}
	}
	if(Z.size() == 0 || A[0] != 0) {
		cout << -1 << endl;
		return 0;
	}
	Z.push_back(INT_MAX);

	ll ans = 0;
	ll beforeA = INT_MIN;
	for(int i=N-1;i>=0;i--) {
		int bz = *(upper_bound(Z.begin(), Z.end(), i) - 1);
		if(A[i] <= i - bz and A[i] >= beforeA - 1) {
			if(A[i] + 1 == beforeA) {
				beforeA = A[i];
			} else {
				ans += A[i];
				beforeA = A[i];
			}
		} else {
			cout << -1 << endl;
			return 0;
		}
	}

	cout << ans << endl;
}

Measured memory_bytes: 2936
import math
import collections

n = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

if n == 1:
    print(0)
    exit()
else:
    c = collections.Counter(prime_factorize(n))

res = 0
for x, y in c.items():
    num = int( (-1 + (1 +8*y)**(0.5))/2 )
    res += num

print(res)


Measured memory_bytes: 68540
#include<iostream>
#include<cstdio>
#include<string>
using namespace std;
int main(){
  int A[3][3];
  int N;
  int b;
  for(int i=0;i<3;i++)
    for(int j=0;j<3;j++)
      cin>>A[i][j];
  cin>>N;
  string ans="No";
  for(int k=0;k<N;k++){
    cin>>b;
    for(int i=0;i<3;i++)
      for(int j=0;j<3;j++)
        if(A[i][j]==b)
          A[i][j]=0;
    if(A[0][0]+A[0][1]+A[0][2]==0||A[1][0]+A[1][1]+A[1][2]==0||A[2][0]+A[2][1]+A[2][2]==0||A[0][0]+A[1][0]+A[2][0]==0||A[0][1]+A[1][1]+A[2][1]==0||A[0][2]+A[1][2]+A[2][2]==0||A[0][0]+A[1][1]+A[2][2]==0||A[0][2]+A[1][1]+A[2][0]==0)
      ans="Yes";
  }
  cout<<ans<<endl;
}


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

#define REP(i,n) for(int (i)=0; i<(int)(n); i++)

int main(void) {
	int N;
	set <int> st;
	cin >> N;
	REP(i,N) {
		int x; cin >> x;
		st.insert(x);
	}
	if(st.size() == N) cout << "YES" << endl;
	else cout << "NO" << endl;
	return 0;
}


Measured memory_bytes: 9600
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
vector<vector<int>>adj;
int col[1005];
bool cycle;
int node;
void dfs(int v){
	col[v]=1;
	for(auto u:adj[v]){
		if(col[u]==0){
			dfs(u);
		}
		else if(col[u]==1){
			if(cycle==0){
				node=u;
			}
			cycle=1;
		}
	}
	col[v]=2;
}

int main() {
	int n, m;
	cin>>n>>m;
	adj.resize(n+1);
	for(int i=0; i<m; i++){
		int u, v;
		cin>>u>>v;
		adj[u].pb(v);
		
	}
	for(int i=1; i<=n; i++){
		if(col[i]==0){
			dfs(i);
		}
	}


	if(cycle==0){
		cout<<-1;
		return 0;
	}
	
	int mini=10000;
	int ind=-1;
	for(int node=1; node<=n; node++){
		int d[1005];
		int p[1005];
		for(int i=0; i<1005; i++){
			d[i]=100000;
			p[i]=-1;
		}
		d[node]=0;
		p[node]=node;
		queue<int>q;
		q.push(node);
		bool che=0;
		while(!q.empty()){
			if(che==1){
				break;
			}
			int x=q.front();
			q.pop();
			for(auto u:adj[x]){
				if(u==node){
					vector<int>path;
					int node=x;
					
					while(p[node]!=node){
						path.pb(node);
						node=p[node];
					}
					path.pb(node);
					if(path.size()<mini){
						mini=path.size();
						ind=node;
					}
					che=1;
					break;
				}
				if(d[u]>1+d[x]){
					d[u]=1+d[x];
					p[u]=x;
					q.push(u);
				}
			}
		}
	}
	int node=ind;
	int d[1005];
		int p[1005];
		for(int i=0; i<1005; i++){
			d[i]=100000;
			p[i]=-1;
		}
		d[node]=0;
		p[node]=node;
		queue<int>q;
		q.push(node);
		
		while(!q.empty()){
			
			int x=q.front();
			q.pop();
			for(auto u:adj[x]){
				if(u==node){
					vector<int>path;
					int node=x;
					
					while(p[node]!=node){
						path.pb(node);
						node=p[node];
					}
					path.pb(node);
					if(path.size()<mini){
						mini=path.size();
						ind=node;
					}
					cout<<path.size()<<endl;
					for(auto u:path){
						cout<<u<<endl;
					}
					return 0;
				}
				if(d[u]>1+d[x]){
					d[u]=1+d[x];
					p[u]=x;
					q.push(u);
				}
			}
		}
	return 0;
}

Measured memory_bytes: 3652
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
#include<functional>
#include<map>
#include<cstdlib>
#include<complex>
#include<numeric>

using namespace std;
using Int = long long;
Int INF = 1LL << 60;

int main() {

	Int r;
	cin >> r;

	cout << 3 * r * r << endl;


}

Measured memory_bytes: 256
import math
H,N = map(int,input().split())
A=[]
B=[]
for i in range(0,N,1):
    a,b = map(int,input().split())
    A.append(a)
    B.append(b)

dp = [[0 for j in range(0,H+1,1)]for i in range(0,N,1)]

for j in range(0,H+1,1):#初期化
    dp[N-1][j]=B[N-1]*math.ceil(j/A[N-1])

for i in range(0,N,1):#初期化２
    dp[i][0]=0

for i in range(N-2,-1,-1):
    for j in range(0,H+1,1):
        if j-A[i] >= 0:
            dp[i][j]=min(dp[i+1][j],dp[i][j-A[i]]+B[i])
        else:
            dp[i][j]=min(dp[i+1][j],B[i])

print(dp[0][H])

Measured memory_bytes: 281608