akhauriyash/Code-Regression huggingface dataset:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ABC146v
{
    class Program
    {
        static void Main(string[] args)
        {
            a();
        }

        public static void a()
        {
            string s = Console.ReadLine();
            if(s == "SUN")
            { Console.WriteLine(7); }
            else if(s == "MON")
            { Console.WriteLine(6); }
            else if (s == "TUE")
            { Console.WriteLine(5); }
            else if (s == "WED")
            { Console.WriteLine(4); }
            else if (s == "THU")
            { Console.WriteLine(3); }
            else if (s == "FRI")
            { Console.WriteLine(2); }
            else
            { Console.WriteLine(1); }
        }
    }
}


Measured memory_bytes: 11092
import java.util.*;
 
public class Main{
  public static void main(String[]args){
    Scanner sc =  new Scanner(System.in);
    int N = Integer.parseInt(sc.nextLine());
    int A = sc.nextInt();
    int B = sc.nextInt();
    String ans = "NG";
    for(int i = A; i <= B; i++){
      if(i%N==0){
        ans = "OK";
        break;
      }
    }
    System.out.println(ans);
  }
}

Measured memory_bytes: 35760
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#define rep(i,n) for(int (i) = 0; (i) < (n); ++(i))
#define repp(i,n) for(int (i) = 1; (i) <= (n); ++(i))
#define popcnt __builtin_popcount
#define all(v) v.begin(),v.end()
#define _Pi 3.1415926535
#define _MOD = 1e9+7;
using namespace std;
using ll = long long;
using pint = pair<int,int>;
using itn = int;
using vint = vector<int>;
template<class T> inline bool chmax(T& a, T b){if(a<b){a = b; return true;} return false;}
template<class T> inline bool chmin(T& a, T b){if(a>b){a = b; return true;} return false;}
template<class T> T gcd(T a, T b){return b?GCD(b,a%b):a;}
template<class T> T lcm(T a, T b){return a*b/GCD(a,b);}

int main(){
    int n; cin >> n;
    vector<double> x(n);
    vector<string> u(n);
    rep(i,n) cin >> x[i] >> u[i];
    double ans = 0;
    rep(i,n){
        if(u[i] == "JPY"){
            ans += x[i];
        }
        else{
            ans += 380000 * x[i];
        }
    }

    printf("%.5f\n", ans);
    
    return 0;
}


Measured memory_bytes: 256
import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int h = sc.nextInt();
        int w = sc.nextInt();
        int[] a = new int[n];
        int[] b = new int[n];
        for(int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
            b[i] = sc.nextInt();
        }

        int ans = 0;
        for(int i = 0; i < n; i++) {
            if(a[i] >= h && b[i] >= w) ans++;
        }
        System.out.println(ans);
    } 
}

Measured memory_bytes: 24932
#define _CRT_SECURE_NO_WARNINGS

#include <vector>
#include <iostream>
#include <string>
#include <functional>
#include <set>
#include <map>
#include <unordered_map>
#include <fstream>
#include <iomanip>
#include <ctime>
#include <queue>
#include <deque>
#include <math.h>
#include <cmath>
#include <stack>
#include <algorithm>
#include <list>
#include <array>
#include <valarray>
#include <unordered_map>
#include <cassert>
#include <random>
#include <cstring>
#include <sstream>
#include <numeric>
#include <iterator>

using namespace std;

#define x first
#define y second
#define mp make_pair
#define pb push_back
#define sqr(a) ((a) * (a))
#define sz(a) int((a).size())
#define all(a) a.begin(), a.end()
#define forn(i, n) for(int i = 0; i < int(n); i++) 
#define fore(i, l, r) for(int i = int(l); i < int(r); i++)

typedef long long li;
typedef long double ld;
typedef pair<int, int> pt;

template <class A, class B> ostream& operator << (ostream& out, const pair<A, B> &a) {
	return out << "(" << a.x << ", " << a.y << ")";
}

template <class A> ostream& operator << (ostream& out, const vector<A> &v) {
	out << "[";
	forn(i, sz(v)) {
		if (i) out << ", ";
		out << v[i];
	}
	return out << "]";
}

mt19937 rnd(time(NULL));

const int INF = int(1e9);
const li INF64 = li(1e18);
const int MOD = INF + 7;
const ld EPS = 1e-9;
const ld PI = acos(-1.0);
//const li MOD = 100055128505716009;
//const li P = 3e4 + 11;

li a, b;

bool read() {
	if (!(cin >> a >> b))
		return false;

	if (a > b) {
		swap(a, b);
	}

	return true;
}


li gcd(li a, li b) {
	return(b ? gcd(b, a % b) : a);
}

li lcm(li a, li b) {
	return a / gcd(a, b) * b;
}
void solve() {

	vector<li> divs;
	for (li i = 1; i * i <= a; i++) {
		if (a % i != 0) {
			continue;
		}

		divs.pb(i);

		li t = a / i;

		if (t != i) {
			divs.pb(t);
		}
	}

	sort(all(divs));

	int id = 0;
	vector<li> ds;
	for (li i = 1; i * i <= b; i++) {
		if (b % i != 0) {
			continue;
		}

		if (binary_search(all(divs), i)) {
			ds.pb(i);
		}

		li t = b / i;

		if (t != i && binary_search(all(divs), t)) {
			ds.pb(t);
		}
	}

	sort(all(ds));
	li lc = -1;
	int bad = 0;

	forn(i, sz(ds)) {
		if (ds[i] == 1) {
			continue;
		}

		if (lc == -1) {
			lc = ds[i];
			continue;
		}

		if (gcd(lc, ds[i]) == 1) {
			lc = lcm(lc, ds[i]);
		}
		else {
			bad++;
		}
	}

	cout << sz(ds) - bad << '\n';
}

int main() {
#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);

	int tt = clock();

#endif

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

	cerr.precision(15);
	cout.precision(15);
	cerr << fixed;
	cout << fixed;

#ifdef _DEBUG
	while (read()) {
#else
	if (read()) {
#endif

		solve();

#ifdef _DEBUG
		cout << "TIME = " << clock() - tt << endl;
		tt = clock();
#endif
	}
	}

Measured memory_bytes: 384
n = gets.to_i
c = gets.chomp
x = c.count("R")
y = c.count("W")
z = 10**9
arr = []
if c[0] == "W"
    arr << 1
else
    arr << 0
end
for i in 1..(n-1)
  if c[i] == "W"
    arr << arr[-1] + 1
  else
    arr << arr[-1]
  end
end
for j in 0..(n-2)
  if c[j] != c[j+1]
    zz = [arr[j],n-j-1-y+arr[j]].max
    z = zz if zz < z
  end
end
puts [x,y,z].min

Measured memory_bytes: 16484
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <iomanip>
#include <queue>
#include <functional>
#include <cmath>
using namespace std;
typedef long long ll;
#define MOD (int)(1e9+7)
#define rep(i,n) for(int i=0;i<n;i++)

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

	string S; cin >> S;
	
	cout << S.substr(0,S.size()-8) << endl;

    return 0;
}



Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define repi(i,m,n) for(int i = m;i < n;i++)
#define drep(i,n,m) for(int i = n;i >= m;i--)
#define rep(i,n)repi(i,0,n)
#define rrep(i,n) repi(i,1,n+1)
typedef pair<int,int> P;
typedef pair<int, P> PP;
#define chmin(x,y) x = min(x,y)
#define chmax(x,y) x = max(x,y)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(), v.rend()
#define pb(x) push_back(x)
#define fi first
#define se second
const int inf = 1e9+7;
const int INF = 1e18+7;
int mod = 1e9+7;

string mp[4] = {"dream", "dreamer", "erase", "eraser"};
string str;
signed main(){
	cin >> str;
	int n = str.size();
	
	int cnt = inf;
	drep(i,n-1,0){
		int f = 0;
		rep(j,4){
			int m = mp[j].size();
			if(i-m+1 >= 0 && str.substr(i-m+1, m) == mp[j]){
				//cout << mp[j] << i-m << endl;
				i -= m-1;
				cnt = i-1;
				f = 1;
				break;
			}
		}
		if(f == 0)break;
	}
	
	if(cnt == -1)printf("YES\n");
	else printf("NO\n");
	return 0;
}


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

#define fastio 			ios::sync_with_stdio(0);	cin.tie(0); cout.tie(0);  cout<<fixed;  cout<<setprecision(12);
#define randomINT 		mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
#define	newl 			cout<<"\n"
#define DISP(as)		for(auto it : as) cout<<it<<" ";newl;
#define all(x)         	(x).begin(),(x).end()
#define mset(x,val)    	memset(x,val,sizeof(x))
#define newl           	cout<<"\n"
#define pb             	push_back
#define mp             	make_pair
#define f 				first
#define s 				second
#define dline          cerr<<"///REACHED///\n";
#define deb1(x)        cerr<<#x<<" = "<<x<<'\n';
#define deb2(x,y)      cerr<<'['<<#x<<','<<#y<<"] = "<<'['<<x<<','<<y<<']'<<'\n';
#define deb3(x,y,z)    cerr<<'['<<#x<<','<<#y<<','<<#z<<"] = "<<'['<<x<<','<<y<<','<<z<<']'<<'\n';

typedef long long 				ll;
typedef long double 			ld;
typedef vector<ll> 				vll;
typedef pair<ll , ll> 			pll;
typedef pair<ld, ld> 			pld;
typedef unordered_map<ll, ll> 	um;
typedef vector<pll> 			vpll;

const ll 	MAX5 	= 	1e+5 + 7;
const ll 	MAX7 	= 	1e+7 + 7;
const ll 	MAXN 	= 	MAX7;
const ll   	INF   	=  	0x7f7f7f7f7f7f7f7f;
const int  	INFi 	=  	0x7f7f7f7f;
const ll 	MOD		=  	1e9 + 7;


// <------------- Declare Variables Here ------------> //

ll T = 1;
ll n, x,  k;
string s, t;

// <------------- Implement Functions Here ----------> //

queue<ll> q[2000];
ll m[2000][2000] = {};
queue<ll> q1,q2;

// <------------- Start of main() -------------------> //

void MAIN() {
	cin >> s ;
	cout<<count(all(s),'2');
}

int main() {
	fastio; randomINT;
	//cin >> T;
	while (T--) {
		MAIN();
	}
	return 0;
}

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

int main() {
    int H, W;
    cin >> H >> W;

    vector<string> S(H);
    rep(i, H) cin >> S[i];

    auto ok = [&](int y, int x) {
        if (x >= 0 && x < W && y >= 0 && y < H && S[y][x] == '.')
            return true;
        return false;
    };

    int dx[] = {1, -1, 0, 0}, dy[] = {0, 0, 1, -1};
    queue<pair<int, int>> que;
    vector<vector<int>> d(H, vector<int>(W, INF));
    d[0][0] = 0;
    que.push({0, 0});

    while (!que.empty()) {
        pair<int, int> now = que.front();
        que.pop();
        rep(i, 4) {
            int ny = now.first + dy[i], nx = now.second + dx[i];
            if (ok(ny, nx) && d[ny][nx] == INF) {
                d[ny][nx] = d[now.first][now.second] + 1;
                que.push({ny, nx});
            }
        }
    }

    if (d[H - 1][W - 1] == INF) {
        cout << -1 << endl;
        return 0;
    }

    int ans = 0;
    rep(i, H) rep(j, W) ans += S[i][j] == '#';

    cout << H * W - ans - d[H - 1][W - 1] - 1 << endl;

    return 0;
}

Measured memory_bytes: 256
# -*- coding: utf-8 -*-

#
N = int(input())

graph = [[] for _ in range(N)]
for _ in range(N-1):
    u, v, w = map(int, input().split(' '))
    u -= 1
    v -= 1
    # print(u, v, w)
    graph[u].append([v, w])
    graph[v].append([u, w])

root = 0
distances = [-1 for _ in range(N)]
distances[root] = 0

stack = [root]
while len(stack) != 0:
    src = stack.pop()
    for dst, w in graph[src]:
        if distances[dst] == -1:
            distances[dst] = distances[src] + w
            stack.append(dst)

# print(distances)
#
root_color = 0
another_color = 1
for d in distances:
    if d % 2 == 0:
        print(root_color)
    else:
        print(another_color)





Measured memory_bytes: 83972
#include <cstdio>

int main() {
	int n, cnt = 0, num;
	scanf("%d", &n);
	for(int i = 1; i <= n; i++) {
		scanf("%d", &num);
		while(num % 2 == 0) {
			cnt ++;
			num /= 2;
		}
	}
	printf("%d\n", cnt);
	return 0;
}

Measured memory_bytes: 128
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<math.h>
#define Lens 105
#define Inf -1<<21
using namespace std;
int N;
int a[Lens];
int main()
{
	cin >> N;
	int sum = 0;
	for (int i = 0; i < N; i++)
	{
		cin >> a[i];
	}
	for (int i = 0; i < N; i++)
	{
		int mini = i;
		for (int j = i + 1; j < N; j++)
		{
			if (a[j] < a[mini])
				mini = j;
		}
		if (i != mini)
		{
			swap(a[i], a[mini]);
			sum++;
		}

	}
	for (int i = 0; i < N; i++)
	{
		if (i > 0)
			cout << ' ';
		cout << a[i];
	}
	cout << endl;
	cout << sum << endl;
	return 0;
}


Measured memory_bytes: 3100
#include<iostream>
#include<vector>
#include<utility>
#include<algorithm>
using namespace std;
int main(int argc, char *argv[])
{
  int n, m;
  cin >> n >> m;
  vector<pair<int,int>> cds;
  for(int i = 0; i < m; i++) {
    int c, d;
    cin >> c >> d;
    cds.push_back(make_pair(c,d)); // visits c after d (> c)
  }
  sort(cds.begin(), cds.end());
  // overlap -> rewind at onece
  int len = n + 1;
  int c = -1, d = -1;
  for(int i = 0; i < m; i++) {
    if(d < cds[i].first) { // do the previous overlap
      len += 2 * (d - c);
      c = cds[i].first;
      d = cds[i].second;
    } else { // overlapping
      d = max(d, cds[i].second);
    }
  }
  len += 2 * (d - c);
  cout << len << endl;
  return 0;
}



Measured memory_bytes: 3128
n = int(input())
A = list(map(int, input().split()))
sum_A = sum(A)
sum_a = 0
ans = 0
if n == 2:
    print(abs(A[0]-A[1]))
else:
    for a in A:
        if (sum_a+a)*2 <= sum_A:
            sum_a += a
        else:
            ans = min(abs(sum_A - 2*sum_a),abs(sum_A - 2*(sum_a+a)))
            print(ans)
            break

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

#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
//-------------------------------------------------------

int N,D;
ll Q;
ll X[505050];
ll L[505050];
int QQ[505050];
ll NG[501010];

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>N>>D;
	L[0]=D;
	FOR(i,N) {
		cin>>X[i];
		L[i+1]=min(L[i],abs(L[i]-X[i]));
	}
	
	cin>>Q;
	FOR(i,Q) cin>>QQ[i];
	
	if(L[N]>0) {
		FOR(i,Q) cout<<"YES"<<endl;
	}
	else {
		NG[N]=1;
		for(i=N-1;i>=0;i--) {
			if(NG[i+1]<=X[i]/2) NG[i]=NG[i+1];
			else NG[i]=NG[i+1]+X[i];
		}
		
		FOR(i,Q) {
			x = QQ[i];
			if(L[x-1]==0 || NG[x]>L[x-1]) cout<<"NO"<<endl;
			else cout<<"YES"<<endl;
		}
	}
	
}


int main(int argc,char** argv){
	string s;int i;
	if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
	FOR(i,argc-1) s+=argv[i+1],s+='\n';
	FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
	solve(); return 0;
}


Measured memory_bytes: 15744
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <queue>
#include <cstring>
#include <vector>
#include <map>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <bitset>
#include <set>
#include <stack>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,k,n) for(int i=(k);i<(int)(n);i++)
#define all(i,n) (i),(i+n)

int dx4[4]={1,0,-1,0};
int dy4[4]={0,-1,0,1};
int dx8[8]={1,0,-1,1,-1,1,0,-1};
int dy8[8]={1,1,1,0,0,-1,-1,-1};
int dx9[9]={0,1,0,-1,1,-1,1,0,-1};
int dy9[9]={0,1,1,1,0,0,-1,-1,-1};

typedef pair<int, int> P;
typedef pair<string, int> SP;
typedef long long ll;
typedef pair<ll, ll> PLL;

const int INF = 1e9;
const ll LLINF = 1e18;
const int MAX_V = 1e6+1;
const ll mod = 1000000007;
// << fixed << setprecision
// --------------------------------------
int n, k;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  cin >> n >> k;
  vector<int> a(n);
  REP(i, n) cin >> a[i];

  ll sum = 0;

  REP(i, n - k) {
    cout << (a[i] < a[k + i] ?  "Yes" : "No") << endl;
  }
}


Measured memory_bytes: 3988
#include<bits/stdc++.h>
using namespace std;
namespace FastIO
{
	static char c;
	template<typename T>
	inline void read(T& x)
	{
		x=0,c=getchar();
		while(!isdigit(c))c=getchar();
		while(isdigit(c))x=x*10+c-'0',c=getchar();
	}
	inline void getc(char& x){do x=getchar();while(x!='.'&&x!='#');}
}
using FastIO::read;
using FastIO::getc;

int n,m;
char f;
bool c[505][505];

int main()
{
	read(n),read(m);
	for(int i=1;i<=n;i++)for(int j=1;j<=m;j++)
		getc(f),c[i][j]=(f=='#');
	for(int i=1;i<=n;i++)
	{
		putchar('#');
		for(int j=2;j<m;j++)putchar(i&1||c[i][j]?'#':'.');
		putchar('.'),putchar('\n');
	}
	putchar('\n');
	for(int i=1;i<=n;i++)
	{
		putchar('.');
		for(int j=2;j<m;j++)putchar(!(i&1)||c[i][j]?'#':'.');
		putchar('#'),putchar('\n');
	}
	return 0;
}

Measured memory_bytes: 1024
#include <stdio.h>

int main()
{
	int w, h, x, y, r;

	scanf("%d %d %d %d %d", &w, &h, &x, &y, &r);

	if(x - r < 0) printf("No\n");
	else if(y - r < 0) printf("No\n");
	else if(x + r > w) printf("No\n");
	else if(y + r > h) printf("No\n");
	else printf("Yes\n");

	return 0;
}

Measured memory_bytes: 584
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep2(i, x, n) for(int i = x; i <= n; i++)
#define rep3(i, x, n) for(int i = x; i >= n; i--)
#define elif else if
#define sp(x) fixed << setprecision(x)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const ll MOD = 1e9+7;
//const ll MOD = 998244353;
const int inf = (1<<30)-1;
const ll INF = (1LL<<60)-1;
const ld EPS = 1e-10;
template<typename T> bool chmax(T &x, const T &y) {return (x < y)? (x = y, true) : false;};
template<typename T> bool chmin(T &x, const T &y) {return (x > y)? (x = y, true) : false;};

template<typename T>
struct Binary_Indexed_Tree{
    vector<T> bit;
    
    Binary_Indexed_Tree(int N){
        bit.assign(N+1, 0);
    }
    
    void add(int i, const T &x){
        for(i++; i < bit.size(); i += (i & -i)) bit[i] += x;
    }
    
    T sum(int i){
        T res = 0;
        for(i = i; i > 0; i -= (i & -i)) res += bit[i];
        return res;
    }
    
    T query(int l, int r){
        return sum(r) - sum(l);
    }
    
    void clear(){
        fill(bit.begin(), bit.end(), 0);
    }
};

int main(){
    int N; ll K;
    cin >> N >> K;
    ll a[N];
    rep(i, N) {cin >> a[i]; a[i] -= K;}
    ll sum[N+1];
    sum[0] = 0;
    rep(i, N) sum[i+1] = sum[i]+a[i];
    vector<int> v(N+1);
    iota(all(v), 0);
    sort(all(v), [&](int i, int j){
        if(sum[i] != sum[j]) return sum[i] < sum[j];
        return i < j;
    });
    Binary_Indexed_Tree<ll> bit(N);
    ll ans = 0;
    rep(i, N+1){
        ans += bit.query(0, v[i]);
        bit.add(v[i], 1);
    }
    cout << ans << endl;
}

Measured memory_bytes: 8788
#include <bits/stdc++.h>
using namespace std;
using lint = long long;
const lint MOD = 1e9+7;

signed main(){
  lint N; cin >> N;
  string s; cin >> s;
  vector<lint> num(26, 0);
  for(lint i = 0; i < N; i++) num[s[i] - 'a']++;
  lint ans = 1;
  for(lint i = 0; i < 26; i++){
    ans *= (num[i] + 1);
    ans %= MOD;
  }
  cout << ans-1 << endl;
}

Measured memory_bytes: 512
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <tuple>
#define mkp make_pair
#define mkt make_tuple
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
const ll MOD=1e9+7;

int main(){
  int N;
  cin>>N;
  string S;
  cin>>S;

  int ans=0;
  for(int i=0;i<N-2;i++){
    if(S[i]=='A'&&S[i+1]=='B'&&S[i+2]=='C') ans++;
  }

  cout<<ans<<endl;

  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int ll
#define tests int t;cin>>t;while(t--)
void start()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif
}
void solve()
{
	int a,v,b,w;
	double t;
	cin>>a>>v;
	cin>>b>>w;
	cin>>t;
	if(w>=v)
	{
		cout<<"NO\n";
		return ;
	}
	int d=llabs(b-a);
	int s=v-w;
	double tc=(d*1.0)/(s*1.0);
	if(tc>t)
		cout<<"NO\n";
	else
		cout<<"YES\n";
}
signed main()
{
	start();
	solve();
	return 0;
}

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

int main() {
  char c;
  cin >> c;
  
  // ここにプログラムを追記
  if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){
  puts("vowel");
}else{
  puts("consonant");
}
}


Measured memory_bytes: 256
import java.util.*;

public class Main{
	
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
  	int r=Integer.parseInt(sc.next()),g=Integer.parseInt(sc.next()),b=Integer.parseInt(sc.next());
    int f=10*g+b;
    if(f%4==0){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }
  }
}


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

typedef long long int ll;


int main()
{
    ll n;
    cin >> n;
    vector<string> s(n);
    for(ll i = 0;i < n;i++){
        cin >> s[i];
    }

    ll a, b, ba;
    a = b = ba = 0;
    ll ans = 0;

    for(ll i = 0;i < n;i++){
        if(s[i][0] == 'B' && s[i][(ll)s[i].size() - 1] == 'A'){
            ba++;
        }
        else if(s[i][0] == 'B'){
            b++;
        }
        else if(s[i][(ll)s[i].size() - 1] == 'A'){
            a++;
        }
        for(ll j = 0;j < (ll)s[i].size() - 1;j++){
            if(s[i][j] == 'A' && s[i][j + 1] == 'B'){
                ans++;
            }
        }
    }

    if(ba >= 1){
        ans += ba - 1;
        if(a >= 1){
            ans++;
            a--;
        }
        if(b >= 1){
            ans++;
            b--;
        }
    }

    ans += min(a, b);

    cout << ans;

    return 0;
}


Measured memory_bytes: 768
//------------------------------>> tsukasa_diary's template <<------------------------------//
#include <bits/stdc++.h>
using namespace std;

#define for_(i,a,b) for(int i=(a);i<(b);++i)
#define for_rev(i,a,b) for(int i=(a);i>=(b);--i)
#define allof(a) (a).begin(),(a).end()
#define minit(a,b) memset(a,b,sizeof(a))

using lint = long long;
using pii = pair< int, int >;

template< typename T > using Vec = vector< T >;

template< typename T > bool in_range(T x, T lb, T ub) { return lb <= x && x < ub; }
template< typename T > bool in_range(T x, T y, T lb, T ub) { return in_range(x, lb, ub) && in_range(y, lb, ub); }

template< typename T > void modAdd(T& a, T b, T mod) { a = (a + b + mod) % mod; }
template< typename T > void modMul(T& a, T b, T mod) { a = (a * b) % mod; }
template< typename T > void minUpdate(T& a, T b) { a = min(a, b); }
template< typename T > void maxUpdate(T& a, T b) { a = max(a, b); }

int bitCount(int x) { return __builtin_popcount(x); }
int bitCount(lint x) { return __builtin_popcountll(x); }

const int dx[4] = {0,1,0,-1}, dy[4] = {-1,0,1,0};
const int Dx[8] = {0,1,1,1,0,-1,-1,-1}, Dy[8] = {-1,-1,0,1,1,1,0,-1};
const double EPS = 1e-9;
const double PI = acos(-1);

//--------------8---------------->> coding space <<-----------------8-------------//

void finish(bool alice) {
	puts(alice ? "Alice" : "Borys");
	exit(0);
}

int main() {
	int N, A, B;
	cin >> N >> A >> B;
	
	bool turn = true;
	while (1) {
		if (turn) {
			if (A + 1 < B) ++A;
			else finish(false);
		} else {
			if (A < B - 1) --B;
			else finish(true);
		}
		turn = !turn;
	}
}
//--------------8---------------->> coding space <<-----------------8-------------//


Measured memory_bytes: 256
//http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1249

#include<iostream>
#include<map>
#include<vector>
#include<algorithm>
#include<cmath>
#include<climits>
#include<ctime>
#include<cstring>
#include<numeric>

#define ALL(v) (v).begin(),(v).end()
#define REP(i,p,n) for(int i=p;i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define dump(a) (cerr << #a << "=" << (a) << endl)
#define DUMP(list) cout << "{ "; for(auto nth : list){ cout << nth << " "; } cout << "}" << endl;

using namespace std;

int N,M;
int field[7][7][7];
int height[7][7];

const int W = 1;
const int B = 2;

void init()
{
	fill_n((int *)field, sizeof(field) / sizeof(int), 0);
	fill_n((int *)height, sizeof(height) / sizeof(int), 0);
}

void put(int x, int y, int color)
{
	field[height[y][x]][y][x] = color;
	height[y][x]++;
}

bool out_range(int x, int y, int z)
{
	return x < 0 || x >= N || y < 0 || y >= N || z < 0 || z >= N;
}

bool judge(int color)
{
	int dx[13] = { 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1};
	int dy[13] = { 0, 1, 0, 1, 1, 0, 0, 1,-1, 1, 1,-1,-1};
	int dz[13] = { 0, 0, 1, 1,-1, 1,-1, 0, 0, 1,-1, 1,-1};

	rep(x,N){
		rep(y,N){
			rep(z,N){
				if(field[z][y][x] == color)
				{
					rep(d,13)
					{
						int cnt = 1;
						int xi=x, yi=y, zi=z;
						rep(i,M)
						{
							xi += dx[d]; 
							yi += dy[d]; 
							zi += dz[d];

							if(out_range(xi,yi,zi)){ break; }
							if(field[zi][yi][xi] == color){
								cnt++;
							}else{
								break;
							}
							if(cnt == M){ return true; }
						}
					}
				}
			}
		}
	}

	return false;
}

int main()
{
	int P;
	while(cin >> N >> M >> P && N)
	{
		init();

		vector<int> x(P),y(P);
		rep(i,P)
		{
			cin >> x[i] >> y[i];
			x[i]--; y[i]--;
		}

		bool isDraw = true;
		rep(i, P)
		{
			int color = (i % 2) ? W : B;
			
			put(x[i],y[i],color);
			
			if(judge(color))
			{
				string winner = (color-1) ? "Black" : "White"; 
				cout << winner << " " << i+1 << endl;
				isDraw = false;
				break;
			}
		}

		if(isDraw){ cout << "Draw" << endl; };
	}

	return 0;
}

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

using namespace std;

//#define endl '\n'
#define all(v) (v).begin(),v.end()
#define rall(v) (v).rbegin(),v.rend()
#define sz(v) (int)(v).size()
#define oo 1e15

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<string> vs;

int main() {
  ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
#ifdef LOCAL
  freopen("test.in", "rt", stdin);
//  freopen("o.txt", "wt", stdout);
#endif
  int a, b, c, K;
  cin >> a >> b >> c >> K;
  for (int i = 0; i < K; ++i) {
    if (a >= b)
      b *= 2;
    else if (b >= c)
      c *= 2;
    else
      break;
  }
  cout << ((a < b && b < c) ? "Yes" : "No") << endl;
  return 0;
}


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

int main()
{
	int a[3]; cin>>a[0]>>a[1]>>a[2]; sort(a,a+3);

	if(a[0] == a[1] and a[1] == a[2]){
		cout<<0; return 0;
	}

	if(a[0]==a[1]){
		cout<<a[2]-a[1]; return 0;
	}
	int mov=0;
	if(a[1]==a[2]){
		if((a[1]-a[0])%2==1){
			a[1]++;
			mov++;
		}
		mov += (a[1]-a[0])/2;
		cout<<mov; return 0;
	}

	mov += (a[2]-a[1]);
	a[0] += mov;
	a[1] = a[2];

	if((a[1]-a[0])%2==1){
		mov++;
		a[1]++;
	}

	mov += (a[1]-a[0])/2;

	cout<<mov;
}


Measured memory_bytes: 256
import java.util.*;

class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int w = sc.nextInt();
		int[] DP = new int[w+1];
		for(int i = 0; i < n; i++){
			int vv = sc.nextInt();
			int ww = sc.nextInt();
			for(int j = w; j >= 0; j--){
				if(j-ww>=0){
					DP[j] = Math.max(DP[j],DP[j-ww]+vv);
				}
			}
		}
		System.out.println(DP[w]);
	}
}



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

int main()
{
        while(true){
                string s1;
                cin >> s1;

                if(s1==".")
                        break;

                string s2;
                cin >> s2;

                if(s1==s2){
                        cout << "IDENTICAL" << endl;
                        continue;
                }

                string t1 = s1;
                string t2 = s2;

                while(true){
                        size_t d1b = t1.find('\"');
                        if(d1b==string::npos)
                                break;
                        t1.replace(d1b, 1, "@");

                        size_t d1e = t1.find('\"');
                        t1.replace(d1e, 1, "@");

                        size_t d2b = t2.find('\"');
                        if(d2b==string::npos)
                                break;
                        t2.replace(d2b, 1, "@");

                        size_t d2e = t2.find('\"');
                        t2.replace(d2e, 1, "@");

                        string u1 = s1;
                        u1.replace(d1b+1, d1e-d1b-1, "");
                        string u2 = s2;
                        u2.replace(d2b+1, d2e-d2b-1, "");

                        if(u1==u2){
                                t1 = u1;
                                t2 = u2;
                                break;
                        }
                }

                if(t1==t2){
                        cout << "CLOSE" << endl;
                }
                else{
                        cout << "DIFFERENT" << endl;
                }
        }

        return 0;
}
                        

Measured memory_bytes: 3144
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
    ios_base:: sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    ll s;cin>>s;

    ll v = 1e9;
    ll x = (v - s%v)%v;
    ll y = (s+x)/v;

    cout<<"0 0 1000000000 1 "<<x<<" "<<y;
}

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

ans = []
x = len(S) - 1
while x:
    for step in range(m, 0, -1):
        if x - step < 0:
            continue
            
        to = S[x-step]
        if to == '1':
            continue
        else:
            x -= step
            ans.append(str(step))
            break
    else:
        print(-1)
        exit()

print(' '.join(ans[::-1]))

Measured memory_bytes: 10484
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
using namespace std;
#define INF ((1<<30)-1)
#define LINF (1LL<<60)
#define EPS (1e-10)
typedef long long ll;
typedef pair<ll, ll> P;
const int MOD = 1000000007;
const int MOD2 = 998244353;

map<int,int> mp;

int main(){
    int x, n;
    cin >> x >> n;
    if (n == 0) {
        cout << x << endl;
        return 0;
    }

    rep(i, n){
        int q;
        cin >> q;
        mp[q] = 1;
    }

    int mn = 500;
    for (int i = -200; i < 200; i++){
        if (mp[i] != 1) mn = min(mn, abs(x-i));
    }

    for (int i = -200; i < 200; i++){
        if (mp[i] != 1 && abs(x-i) == mn){
            cout << i << endl;
            return 0;
        }
    }
}


Measured memory_bytes: 3656
import java.util.Scanner;

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

    int N = scanner.nextInt();
    int T = scanner.nextInt();
    int min = Integer.MAX_VALUE;
    for (int i = 0; i < N; i++) {
      int c = scanner.nextInt();
      int t = scanner.nextInt();
      if (t <= T && c < min) min = c;
    }
    if (min == Integer.MAX_VALUE) {
      System.out.println("TLE");
    } else {
      System.out.println(min);
    }
  }
}


Measured memory_bytes: 23892
import java.util.*;

public class Main {
	// public static void printArray(int[] a) {
	// 	for (int i = 0; i < a.length; i++) {
	// 		System.out.print(a[i] + ", ");
	// 	}
	// 	System.out.println();
	// }

	// public static<T> void printArrayT(T[] a) {
	// 	for (int i = 0; i < a.length; i++) {
	// 		System.out.print(a[i] + ", ");
	// 	}
	// 	System.out.println();
	// }

	// public static class Triple implements Comparable<Triple> {
	// 	public int A, B, C;
	// 	Triple(int A, int B, int C) {
	// 		this.A = A;
	// 		this.B = B;
	// 		this.C = C;
	// 	}

	// 	@Override
	// 	public String toString() {
	// 		return String.format("(%d, %d, %d)", A, B, C);
	// 	}

	// 	@Override
	// 	public int compareTo(Triple o) {
	// 		int a = this.A - o.A;
	// 		if (a != 0) return a;
	// 		int b = this.B - o.B;
	// 		if (b != 0) return b;
	// 		return this.C - o.C;
	// 	}
	// }

	private static long gcd(long m, long n) {
		if(m < n) return gcd(n, m);
		if(n == 0) return m;
		return gcd(n, m % n);
	}

	// static int count(int max, int interval, int skip) {
	// 	int a = max % interval;
	// 	int b = max / interval;

	// 	return b * (interval - skip) + count2(a);
	// }

	// static int count2(int max, int D, int E) {
	// }

	static long count(long max, long C, long D, long CD) {
		long v1 = max / C;
		long v2 = max / D;
		long v3 = max / CD;
		return max - v1 - v2 + v3;
	}

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long A = sc.nextLong();
		long B = sc.nextLong();
		long C = sc.nextInt();
		long D = sc.nextInt();
		long count = 0;
		long gcd = gcd(C, D);
		long CD = D / gcd * C;
		long ans = count(B, C, D, CD) - count(A - 1, C, D, CD);

		// System.out.println((A - 1) + ":" + count(A - 1, C, D, CD));
		// System.out.println(B + ":" + count(B, C, D, CD));
		System.out.println(ans);
	}
}


Measured memory_bytes: 23892
fun main(args: Array<String>) {
    val (N, K) = listOfInt()
    val cnt = (1 .. N).count { it % K == 0 }.toLong()
    var ans = cnt * cnt * cnt
    if (K % 2 != 1) {
        val k2 = K / 2
        val cnt2 = (1 .. N).count { it % K == k2 }.toLong()
        ans += cnt2 * cnt2 * cnt2
    }
    println(ans)
}
fun next() = readLine()!!
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map { Integer.parseInt(it) }


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

#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define pf printf
#define sc scanf
#define sf(num) scanf("%d",&num)
#define sff(num1,num2) scanf("%d %d",&num1,&num2)
#define sfff(num1,num2,num3) scanf("%d %d %d",&num1,&num2,&num3)
#define sl(num) scanf("%lld",&num)
#define sll(num1,num2) scanf("%lld %lld",&num1,&num2)
#define slll(num1,num2,num3) scanf("%lld %lld %lld",&num1,&num2,&num3);
#define rep(i,n) for(i=1;i<=n;i++)
#define rep0(i,n) for(i=0;i<n;i++)
#define reps(i,a,n) for(i=a;i<=n;i++)
#define pb push_back
#define mpp make_pair
#define MOD 1000000007
#define fi first
#define se second
#define N 100005
#define mem(ara,n) memset(ara,n,sizeof(ara))
#define memb(ara) memset(ara,false,sizeof(ara))
#define all(x) (x).begin(),(x).end()
#define sq(x) ((x)*(x))
#define pi pair<int,int>
#define pii pair<pair<int,int>,pair<int,int> >
#define db(x) cout<<#x<<" :: "<<x<<"\n";
#define dbb(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n";
#define fr freopen("input.txt","r",stdin);
#define fw freopen("output.txt","w",stdout);
#define TIME cerr<<"Time : "<<(double)clock()/(double)CLOCKS_PER_SEC<<"s\n";
typedef long long int ll;
using namespace std;
int main()
{
    double w,h,x,y;
    cin>>w>>h>>x>>y;
    double a=w/2.0,b=h/2.0;
    pf("%.6f",(w*h)/2.0);
    //dbb(a,b);
    //dbb(x,y);
    if(a==x && b==y)
        pf(" 1");
    else
        pf(" 0");

}


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

x_sorted = sorted(x)
meds = x_sorted[n//2-1:n//2+1]
for i in range(n):
    if x[i] <= meds[0]:
        print(meds[1])
    elif x[i] >= meds[1]:
        print(meds[0])


Measured memory_bytes: 26356
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <iomanip>
#include <cassert>
#include <functional>


using namespace std;

int main() {
  int n;
  cin>>n;
  int ans =0;
  map<string,int> s;
  for(int i=0;i<n;i++){
    string str;
    cin>>str;
    decltype(s)::iterator it = s.find(str);
    if (it == s.end()){ // 見つからなかった
      ans++;
      s[str]=1;
    }
    else
      s[str]=1;
  }

  cout<<ans<<endl;

  return 0;
}

Measured memory_bytes: 19224
#include <bits/stdc++.h>
#include <cstdlib>  // abs() for integer
using namespace std;

int main() {
  int X, N;
  cin >> X >> N;
  
  vector<int> P(N);
  for(int i=0; i<N; i++)
    cin >> P.at(i);
  
  int ans=0;
  bool cont;
  
  for(int i=0; i<102; i++){
    cont = false;
    for(int j=0; j<N; j++){
      if(i == P.at(j)){
        cont=true;
        break;
      }
    }
    if(cont==true)
      continue;
    
    if(abs(X-ans) > abs(X-i))
      ans = i;
  }
  
  cout << ans << endl;
      
}

Measured memory_bytes: 3628
package main

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

// define
var (
	sc = bufio.NewScanner(os.Stdin)
)

func scanIntLine(len int) []int{
	arr := make([]int, len)
	for i:=0; i<len; i++{
		sc.Scan()
		tmp, err := strconv.Atoi(sc.Text())
		if err == nil{
			arr[i] = tmp
		}
	}
	return arr
}

func scanStringLine(len int) []string{
	arr := make([]string, len)
	for i:=0; i<len; i++{
		sc.Scan()
		arr[i] = sc.Text()
	}
	return arr
}

func scanIntSplit(len int) []int{
	arr := make([]int, len)
	sc.Scan()
	for i, v := range strings.Split(sc.Text(), " "){
		tmp, err := strconv.Atoi(v)
		if err == nil{
			arr[i] = tmp
		}
	}
	return arr
}

func main(){
	arr := scanIntSplit(3)
	N, A, B := arr[0], arr[1], arr[2]
	ans := 0
	for i:=1; i<=N; i++{
		sum, num := 0, i
		for num >0 {
			sum += num%10
			num /= 10
		}
		if A <= sum && sum <= B {
			ans += i
		}
	}
	fmt.Println(ans)
}

Measured memory_bytes: 640
#include <bits/stdc++.h>
#define be(v) (v).begin(),(v).end()
#define pb(q) push_back(q)
typedef long long ll;
using namespace std;
const ll mod=1000000007;
#define doublecout(a) cout<<fixed<<setprecision(10)<<a<<endl;

ll fac[200007],finv[200007],inv[200007];
void cominit(){
    fac[0]=fac[1]=1;
    finv[0]=finv[1]=1;
    inv[1]=1;
    for(int i=2;i<200007;i++){
        fac[i]=fac[i-1]*i%mod;
        inv[i]=mod-inv[mod%i]*(mod/i)%mod;
        finv[i]=finv[i-1]*inv[i]%mod;
    }
}
ll com(ll n,ll k){
    if(n<k)return 0;
    if(n<0 || k<0)return 0;
    return fac[n]*(finv[k]*finv[n-k]%mod)%mod;
}
long long modpow(long long a, long long n) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}

int main() {
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    cominit();
    ll n,k;
    cin>>n>>k;
    cout << (modpow(k,n)) <<endl;
    return 0;
}



Measured memory_bytes: 7904
N, M = map(int, input().split())
digits = [-1 for _ in range(N+1)]
for __ in range(M):
  digit, num = map(int, input().split())
  if digit == 1 and num == 0 and N != 1:
    print(-1)
    exit()
  elif digits[digit] != -1 and num != digits[digit]:
    print(-1)
    exit()
  else:
    digits[digit] = num
answer = 0
for i in range(1, N+1):
  if digits[i] == -1:
    if i == 1 and N != 1:
      answer += 1*10**(N-i)
  else:
    answer += digits[i]*10**(N-i)
print(answer)


Measured memory_bytes: 61756
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define per(i, n) for (int i = (int)(n-1); i >= 0; i--)
#define sz(x) int(x.size())
#define all(x) (x).begin(), (x).end()
#define INF 2e9
#define LINF 1e18
typedef long long ll;
typedef pair<int, int> P;

int main() {
    int h, w; cin >> h >> w;
    vector<vector<char> > a(h, vector<char>(w));
    rep(i, h) {
        rep(j, w) {
            cin >> a[i][j];
        }
    }

    vector<vector<int> > dp(h+1, vector<int>(w+1));
    int mod = 1e9+7;
    
    rep(i, h+1) dp[i][0] = 0;
    rep(j, w+1) dp[0][j] = 0;

    rep(i, h) {
        rep(j, w) {
            if (i==0 && j==0) {
                dp[1][1] = 1;
                continue;
            }
            if (a[i][j] == '.') {
                dp[i+1][j+1] = dp[i+1][j] + dp[i][j+1];
                dp[i+1][j+1] %= mod;
            }
            else {
                dp[i+1][j+1] = 0;
            }
        }
    }

    cout << dp[h][w] << endl;

}

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

int main()
{
	int N, M;
	while (cin >> N >> M, N | M) {
		vector<unordered_set<int>> g(M);
		vector<int> S(M);
		for (int i = 0; i < M; i++) {
			cin >> S[i];
			int k;
			cin >> k;
			for (int j = 0; j < k; j++) {
				int c;
				cin >> c; --c;
				g[i].insert(c);
			}
		}
		int ma = 0;
		for (int i = 0; i < N; i++) {
			vector<int> sc(N);
			for (int j = 0; j < M; j++) if (g[j].count(i)) {
				sc[i] += S[j];
			}
			for (int j = 0; j < M; j++) if ((int)g[j].size() == 1 && *g[j].begin() != i) {
				sc[*g[j].begin()] += S[j];
			}
			ma = max(ma, *max_element(sc.begin(), sc.end()) - *min_element(sc.begin(), sc.end()));
		}
		cout << ma + 1 << endl;
	}
	return 0;
}



Measured memory_bytes: 6796
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++) //for文マクロ
using namespace std;

typedef unsigned long ul;
typedef long long ll;
typedef pair<ul, ul> P; //ペア　タイプでふ

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


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repr(i, a, b) for(int i = a; i >= b; i--)
#define int long long
#define all(a) a.begin(), a.end()
using namespace std;
typedef pair<int, int> P;
const int mod = 1000000007;
const int INF = 1e18;

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int a, b, c;
    cin >> a >> b >> c;
    int ans = b;
    ans += min(c, a + b + 1);
    cout << ans << endl;
}

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

int main()
{
  string s;
  int ok=0,ok1=1,cnt=0;
  cin>>s;
  int len=s.length();
  for(int i=0;i<len;++i)
  {
  	if(s[i]=='C'&&ok1) { ok=1; ok1=0; }
  	if(s[i]=='F'&&ok) { cout<<"Yes"<<endl; system("pause"); return 0; }
  }
  cout<<"No"<<endl;
  system("pause"); 
  return 0;
}


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

int   answer(int n){
	int sum = 0;
	while(n > 0){
		sum += n%10;
		n = n/10;
	}
	return sum;
}

int main() {
	int n,a,b,sum=0,ans=0;
	cin >> n >> a >> b;
	for(int i=0;i<=n;i++){
		sum = answer(i);
		if(sum >= a&&sum <= b){
			ans += i;
		}
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 256
n,k = (int(i) for i in input().split())
a = [int(i) for i in input().split()]
a.sort()
for i in range(a[0],0,-1):
	if a[0]%i==0:
		if all(a[j]%i==0 for j in range(n)):
			num = i
			break
if k%num==0 and k<=a[-1]: print("POSSIBLE")
else: print("IMPOSSIBLE")

Measured memory_bytes: 14252
#include <bits/stdc++.h>
using namespace std;
int n;
double dp[3005][3005];
double prob[3005];
int main() {
	scanf("%d", &n);
    for (int i=1; i<=n; i++) scanf("%lf", &prob[i]);
    dp[1][0] = 1 - prob[1];
    dp[1][1] = prob[1];
    for (int i=2; i<=n; i++) {
        dp[i][0] = dp[i-1][0] * (1 - prob[i]);
        for (int j=1; j<i; j++) {
            dp[i][j] = dp[i-1][j] * (1 - prob[i]) + dp[i-1][j-1] * prob[i];
        }
        dp[i][i] = dp[i-1][i-1] * prob[i];
    }
    for(int i=0; i<=n; i++) {
        for (int j=0; j<=i; j++) {
            //printf("%d %d %lf\n", i, j, dp[i][j]);
        }
    }
    double ans = 0;
    for (int i = n / 2 + 1; i <= n; i++) ans += dp[n][i];
    printf("%.10lf\n", ans);
    return 0;
}

Measured memory_bytes: 68992
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

int p[1000006];

int N;
int A[1000006];

vector<int> prime;

int C[1000006];

int main(void) {

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


	for (int i = 2; i <= 1000000; i++) { p[i] = 1; }
	for (int i = 2; i <= 1000000; i++) {
		if (p[i] == 1) {
			for (int j = i * 2; j <= 1000000; j += i) { p[j] = 0; }
		}
	}

	for (int i = 2; i <= 1000000; i++) {
		if (p[i] == 1) { prime.push_back(i); }
	}


	/*for (int i = 0; i <= 30; i++) {
		cout << prime[i] << endl;
	}*/


	for (int i = 1; i <= N; i++) {
		int tmp = A[i];

		for (int j = 0; prime[j] * prime[j] <= A[i]; j++) {
			if(tmp%prime[j] == 0) { C[prime[j]]++; }
			while (tmp%prime[j] == 0) { tmp /= prime[j]; }
		}
		if (tmp > 1) { C[tmp]++; }
	}


	/*for (int i = 1; i <= 10; i++) {
		cout << "C[" << i << "]= " << C[i] << endl;
	}*/

	string ans = "pairwise coprime";
	int sign = 1;
	for (int i = 2; i <= 1000000; i++) {
		if (C[i] > 1) { sign = -1; }
	}

	if (sign == 1) { cout << ans << endl; return 0; }


	for (int i = 2; i <= 1000000; i++) {
		if (C[i] == N) { ans = "not coprime"; cout << ans << endl; return 0; }
	}

	cout << "setwise coprime" << endl;

	return 0;
}

Measured memory_bytes: 15384
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cctype>
#include <algorithm>
#include <numeric>
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <complex>
#include <sstream>
#include <deque>

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

using namespace std;

char m[5][5];
string boards[10];
int cnt = 0;

bool equal(int form, int forinp, bool flg){
    if(flg) {
        REP(i, 5) if (m[form][i] == boards[forinp][5-i-1]) return false;
    } else {
        REP(i, 5) if (m[form][i] == boards[forinp][i]) return false;
    }
    return true;
}

bool check(bool *used){
    bool cpused[10];
    int val[5];
    REP(i, 10) cpused[i] = used[i];
    REP(i, 5) {
        bool flg = 0;

        REP(j, 10) {
            if(cpused[j]) continue;
            if(equal(i, j, false) || equal(i, j, true)) {
                cpused[j] = true;
                flg = true;
                val[i] = j;
                break;
            }
        }
        if (!flg) return false;
    }

    return true;
}


int bt(bool *used,int now){
    if (now == 5){
        if (check(used)) cnt++;
        return cnt;
    }

    for(int i=0;i<10;i++){
        if (used[i] == true) continue;
        used[i] = true;
        REP(j, 5) m[j][now] = boards[i][j];
        bt(used, now+1);

        if ( boards[i][0] == boards[i][4] && boards[i][1] == boards[i][3]){
            used[i]=false;
            continue;
        }

        REP(j, 5) m[j][now] = boards[i][5-j-1];
        bt(used, now+1);
        used[i] = false;
    }
    return cnt;
}


int main(){
    while(cin>>boards[0] && boards[0][0] != 'E'){
        for(int i = 1; i < 10; i++) cin >> boards[i];

        cnt = 0;
        bool used[10]={0};

        //cout << cnt << " " << cnt %8 << endl;
        cout << bt(used, 0)/8 << endl;
    }
    return 0;
}

Measured memory_bytes: 1188
#include<stdio.h>

int main(void)
{
  int N,K,Q,i,j;
  int A[100000];
  int B[100000];
  scanf("%d %d %d/n",&N,&K,&Q);
  for(i=0;i<=Q-1;i++){
    scanf("%d/n",&A[i]);
  }
  for(i=0;i<=N-1;i++){
    B[i]=0;
  }
  for(i=0;i<=Q-1;i++){
    j=A[i]-1;
    B[j]++;
  }
  for(j=0;j<=N-1;j++){
    if(B[j]>=Q-K+1){
      printf("Yes\n");
    }else{
      printf("No\n");
    }
  }
  return 0;
}

Measured memory_bytes: 1280
#include<bits/stdc++.h>
using namespace std;
int n,m;
string s;
int main(){
	cin>>n>>m>>s;
	for(int i=0;i<n;i++){
		if(i==m-1)cout<<char(s[i]+32);
		else cout<<s[i];
	}
	return 0;
}

Measured memory_bytes: 256
import java.util.*;
 
public class Main {
    public static void main(String[] args) throws Exception {
        // Your code here!
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        long W = Long.parseLong(sc.next());
        long dp[][] = new long[N+1][100001];
        int ans = 0;
        for(int i=1;i<=N;i++){
          long w = Long.parseLong(sc.next());
          int v = Integer.parseInt(sc.next());
          for(int j=1;j<=100000;j++){
            if(j==v){
              if(dp[i-1][j] > 0) dp[i][j] = Math.min(w, dp[i-1][j]);
              else dp[i][j] = w;
            }else if(j>v && dp[i-1][j-v] > 0){
              if(dp[i-1][j] > 0) dp[i][j] = Math.min(dp[i-1][j], dp[i-1][j-v]+w);
              else dp[i][j] = dp[i-1][j-v]+w;
            }else if(dp[i-1][j] > 0){
              dp[i][j] = dp[i-1][j];
            }
            if(dp[i][j] > 0 && dp[i][j] <= W) 
              ans = Math.max(j,ans);
          }
        }
        System.out.println(ans);
    }
}

Measured memory_bytes: 129492
#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,k;
    cin>>n>>k;
    vector<int>v(n);
    for(int i=0;i<n;i++){
        cin>>v[i];
    }
    long long res=0;
    sort(v.begin(),v.end());
    for(int i=0;i<k;i++){
        res+=v[i];
    }
    cout<<res<<endl;
    return 0;
}

Measured memory_bytes: 3612