akhauriyash/Code-Regression huggingface dataset:
#include<iostream>
#define ll long long
using namespace std;
inline int read(){
    int x=0;
    char c=getchar();
    bool flag=0;
    while(c<'0'||c>'9'){
        if(c=='-')
            flag=1;
        c=getchar();
    }
    while(c>='0'&&c<='9'){
        x=(x<<3)+(x<<1)+c-'0';
        c=getchar();
    }
    if(flag)
        x=-x;
    return x;
}
void put(int x)  
{  
    int num = 0; char c[15];
    while(x) c[++num] = (x%10)+48, x /= 10;
    while(num) putchar(c[num--]);
    putchar('\n'); 
}
int main()
{
	ll a,b,x;
	cin>>a>>b>>x;
	cout<<((b+x)/x-(a-1+x)/x);
	
}

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

    int N,Q;
    string S;
    int l[1000000],r[1000000];
    int memo[1000000];

int main(){
    
    cin >> N >> Q;
    cin >> S;
    
    memo[0] = 0;
    for(int i = 1; i < N; i++){
        if(S[i-1] == 'A' && S[i] == 'C'){
            memo[i] = memo[i-1] + 1;
        }else{
            memo[i] = memo[i-1];
        }
    }

    for(int i = 0; i < Q; i++){
        cin >> l[i] >> r[i];
        
        cout << memo[r[i]-1] - memo[l[i]-1] << '\n';
    }
    
}

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

int main(){
  int n;
  cin >> n;
  int a[n];
  bool f = true;
  rep(i,n) {
    cin >> a[i];
    if(a[i] % 2 == 0 && !(a[i] % 3 == 0 || a[i] % 5 == 0)) f = false;
  }
  cout << (f? "APPROVED":"DENIED") << endl;
  return 0;
}

Measured memory_bytes: 256
#include <stdio.h>

int main(void)
{
  int n, i, f[50];
  scanf("%d", &n);
  f[0] = 1;
  f[1] = 1;
  for (i = 2; i <= n; i++)
    f[i] = f[i-1] + f[i-2];
  printf("%d\n", f[n]);
}


Measured memory_bytes: 2052
#include <stdio.h>
unsigned long long mi(unsigned long long a, unsigned long long b){
	return a < b ? a: b;
}
int main(){
	unsigned long long int bars[200005], sum[200005], min;
	int n;
	scanf("%d", &n);
	//scanf("%llu", &bars[1]);
	sum[0] = 0;
	//sum[1] = bars[1];
	for(int i = 1; i <= n; ++i){
		scanf("%llu", &bars[i]);
		sum[i] = sum[i-1] + bars[i];
		//printf("%llu ", sum[i]);
	}
	min = sum[n];
	unsigned long long u, dif, j;
	for(int i = 1; i < n; ++i){
		j = sum[i];//<-
		u = sum[n] > j ? sum[n] - j : j - sum[n]; //positive//->
		dif = u > j ? u - j: j - u;//positive
		//printf("%d %llu %llu %llu\n", i, u, j, dif);
		min = mi(min, dif);
	}
	printf("%llu\n", min);
}

Measured memory_bytes: 3328
#include <iostream>
using namespace std;
#define MAX 100
struct Card{
	char suit,value;
};
void bubble(struct Card A[],int n){
	for(int i=0;i<n-1;i++){
		for(int j=0;j<n-1-i;j++){
			if(A[j].value>A[j+1].value){
				Card temp=A[j];
				A[j]=A[j+1];
				A[j+1]=temp;
			}
		}
	}
}
void selection(struct Card A[],int n){
	for(int i=0;i<n;i++){
		int minj=i;
		for(int j=i+1;j<n;j++){
			if(A[j].value<A[minj].value){
				minj=j;
			}
		}
		Card temp=A[minj];
		A[minj]=A[i];
		A[i]=temp;
	}
}

void print(struct Card A[],int n){
		for(int i=0;i<n;i++){
			if(i>0)
				cout<<" ";
			cout<<A[i].suit<<A[i].value;	
		}
		cout<<endl;	
}
bool isStable(struct Card A[],struct Card B[],int n){
	for(int i=0;i<n;i++){
		if(A[i].suit!=B[i].suit)
			return false;
	}
	return true;
}
int main(){
	int n;
	Card A[MAX],B[MAX];
	char ch;
	cin>>n;
	for(int i=0;i<n;i++)
		cin>>A[i].suit>>A[i].value;
	for(int i=0;i<n;i++)
		B[i]=A[i];

	bubble(A,n);
	selection(B,n);
	print(A,n);
	cout<<"Stable"<<endl;
	print(B,n);
	if(isStable(A,B,n)){
		cout<<"Stable"<<endl;
	} else{
		cout<<"Not stable"<<endl;
	}
	return 0;
}


Measured memory_bytes: 3104
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using static MyIO;


public class E
{
	public static void Main()
	{
		int maxV = (int)1e5;
		long N = GetLong();
		long W = GetLong();
		long[] w = new long[N];
		long[] v = new long[N];
		for(int i = 0; i < N; i++)
		{
			w[i] = GetLong();
			v[i] = GetLong();
		}

		long[,] dp = new long[N + 1, maxV + 1];
		for(int i = 0; i <= N; i++)
			for(int j = 0; j <= maxV; j++)
				dp[i, j] = long.MaxValue / 2;
		
		dp[0, 0] = 0;
		for(int i = 0; i < N; i++)
		{
			for(long j = 0; j <= maxV; j++)
			{
				dp[i + 1, j] = Math.Min(dp[i + 1, j], dp[i, j]);

				if(j - v[i] >= 0)
					dp[i + 1, j] = Math.Min(dp[i + 1, j], dp[i, j - v[i]] + w[i]);
			}
		}

		int ans = 0;
		for(int i = 0; i <= maxV; i++)
			if(dp[N, i] <= W)
				ans = i;

		Console.WriteLine(ans);
	}
}


public static class MyIO
{
	private static string[] args = null;
	private static int num = -1;
	private static int used = -1;

	private static string getArg()
	{
		if(used == num)
		{
			args = Console.ReadLine().Split(' ');
			num = args.Length;
			used = 0;
		}
		return args[used++];
	}

	public static int GetInt(){ return int.Parse(getArg()); }
	public static long GetLong(){ return long.Parse(getArg()); }
	public static double GetDouble(){ return double.Parse(getArg()); }
	public static string GetString(){ return getArg(); }
}





Measured memory_bytes: 89824
def main():
    import sys
    import math
    a,b,c=list(map(int,sys.stdin.readline().split()))
    if c-a-b<0:
        return 'No'
    if 4*a*b < (c-a-b)**2:
        return 'Yes'
    else:
        return 'No'

print(main())


Measured memory_bytes: 2940
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>
#include <fstream>
#include <bitset>
#include <time.h>

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<ll> V;
typedef complex<double> Point;

#define PI acos(-1.0)
#define EPS 1e-10
const ll INF = (1LL << 31) - 1;
const ll MOD = 1e9 + 7;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,N) for(int i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()) )
#define fi first
#define se second
#define N_SIZE (1LL << 20)
#define NIL -1
#define MAX_N 100100 * 3

P dat[100010];
bool f[100010];
int n, w, d;

int main() {
	while (cin >> n >> w >> d&&n + w + d) {
		int k = 1;
		fill(f, f + 100010, 0);
		dat[0] = { w,d };
		REP(i, n) {
			int p, s;
			cin >> p >> s;
			int cnt = 0;
			int pos = 0;
			while (1) {
				if (!f[pos]) {
					cnt++;
					if (cnt == p)break;
				}
				pos++;
			}
			p = pos;
			f[p] = 1;
			int nw = dat[p].first, nd = dat[p].second;

			s %= (2 * nw + 2 * nd);
			//cout << s << " " << nw << " " << nd << endl;
			if (s <= nw) {
				dat[k] = { min(nw - s,s),nd };
				dat[k + 1] = { max(nw - s,s),nd };
			}
			else if (s <= nw + nd) {
				dat[k] = { nw,min(nd - (s - nw),s - nw) };
				dat[k + 1] = { nw,max(nd - (s - nw),s - nw) };
			}
			else if (s <= 2 * nw + nd) {
				dat[k] = { min(nw - (s - nw - nd),s - nw - nd),nd };
				dat[k + 1] = { max(nw - (s - nw - nd),s - nw - nd),nd };
			}
			else{
				dat[k] = { nw,min(nd - (s - 2 * nw - nd),s - 2 * nw - nd) };
				dat[k + 1] = { nw,max(nd - (s - 2 * nw - nd),s - 2 * nw - nd) };
			}
			k += 2;
			//REP(j, k) {
			//	if(!f[j])cout << dat[j].first << " " << dat[j].second << endl;
			//}
			//cout << endl;
		}
		vector<int> vi;
		REP(i, n + 1) {
			if (!f[i])vi.push_back(dat[i].first*dat[i].second);
			else n++;
		}
		sort(ALL(vi));
		REP(i, vi.size()) {
			if (i != 0)cout <<" "<< vi[i] ;
			else cout << vi[i];
		}
		cout << endl;
	}
}

Measured memory_bytes: 3120
use std::str::FromStr;

fn get_one<T : FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    return s.trim().parse().ok().unwrap();
}

fn get_vec<T : FromStr>() -> Vec<T> {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    return s.trim().split_whitespace().map(|e| e.parse().ok().unwrap()).collect();
}

fn main() {
    let mut v : Vec<i32> = get_vec();
    if v[0] == 1 { v[0] = 14; }
    if v[1] == 1 { v[1] = 14; }
    let mut ans = "Draw";
    if v[0] > v[1]{
        ans = "Alice";
    }
    else if v[0] < v[1] {
        ans = "Bob";
    }
    println!("{}", ans);
}


Measured memory_bytes: 4352
#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<tuple>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 1000000007;
const ll INF = (ll)1000000007 * 1000000007;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define Per(i,sta,n) for(int i=n-1;i>=sta;i--)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef long double ld;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ll, ll> LP;
int dx[4]={1,-1,0,0};
int dy[4]={0,0,1,-1};

int n,c[200010];
vector<int> G[200010];
int siz[200010];
vector<ll> pt[200010];

void dfs1(int s,int par){
    for(int t:G[s]){
        if(t==par) continue;
        dfs1(t,s);
        siz[s]+=siz[t];
    }
    siz[s]+=1;
}

void dfs2(int s,int par,map<int,int> &dp){
    dp.clear();
    for(int t:G[s]){
        if(t==par) continue;
        map<int,int> ch_dp;
        dfs2(t,s,ch_dp);
        if(ch_dp.size()>dp.size()){
            swap(ch_dp,dp);
        }
        for(auto e:ch_dp){
            dp[e.first]+=e.second;
        }
    }
    dp[c[s]]=siz[s];
    // cout << s << endl;
    // rep(i,n){
    //     cout << dp[i] << " ";
    // }
    // cout << "" << endl;
    if(par!=-1) pt[c[par]].emplace_back(siz[s]-dp[c[par]]);
    else{
        rep(i,n){
            pt[i].emplace_back(siz[s]-dp[i]);
        }
    }
}

void solve(){
    cin >> n;
    rep(i,n){
        cin >> c[i];c[i]--;
    }
    rep(i,n-1){
        int a,b;cin >> a >> b;a--;b--;
        G[a].emplace_back(b);
        G[b].emplace_back(a);
    }
    dfs1(0,-1);
    // rep(i,n){
    //     cout << siz[i] << " ";
    // }
    // cout << "" << endl;
    map<int,int> dp;
    dfs2(0,-1,dp);
    rep(i,n){
        ll ans=0;
        for(ll v:pt[i]){
            ans+=v*(v+1)/(ll)2;
        }
        cout << (ll)n*(ll)(n+1)/(ll)2-ans << endl;
    }
}

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

Measured memory_bytes: 78044
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
#define all(x) (x).begin(),(x).end()
#define pll pair<ll,ll>
#define rep(i,n) for(int i=0;i<n;i++)
#define sz(x) ((ll)(x).size())
#define pb push_back
#define mp make_pair
#define bit(n) (1LL<<(n))
#define F first
#define S second
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
const ll INF = 1LL<<60;
const ll mod = (int)1e9 + 7;

/*
テストケース全てに目を通す
テストケースが2個以下だったらなんかある
N最小のコーナーケースがないか調べる
制約をしっかりと確認する（1からNまでの順列、全て異なる値などの制約も含め）
操作の逆順を考える
 */

int main() {
    //ll N; cin >> N;
    //ll N,M; cin >> N >> M;
    //string S; cin >> S;
    //ll H,W; cin >> H >> W;
    int n;
    cin >> n;
  	int x=(n+1)/2;
  	double ans=(double)x/(double)n;
  	cout << fixed;
	cout << setprecision(10) <<ans;
    


}

/*



 */



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

using namespace std;

int main()
{
  string str;
  cin >> str;
  for(int i = 0;i < 3;i++)
  {
    if(str[i] == str[i + 1])
    {
      cout << "Bad" << endl;
      return 0;
    }
  }
  cout << "Good" << endl;
  return 0;
}

Measured memory_bytes: 256
#ifdef MY_LOCAL
#define MY_NAMESPACE(ns) namespace ns {
#define MY_NAMESPACE_    }
#define MY_DEBUG(s)      s
#else
#define MY_NAMESPACE(ns) 
#define MY_NAMESPACE_    
#define MY_DEBUG(s)      
#endif

#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <tuple>
#include <unordered_map>
#include <utility>
#include <vector>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define EPS (1e-7)
#define IINF ((int)1e9)


MY_NAMESPACE(testbed)
int main()
{
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	int n;
	cin >> n;
	vector<ll> num_divs(n + 1);
	ll res = 1;  // for k=1
	for (int k = 2; k <= n; k++)
	{
		res += 2 * (ll)k;
	}
	for (int k = 2; k * 2 <= n; k++)
	{
		for (int j = k * 2; j <= n; j += k)
		{
			res += j;
		}
	}
	cout << res << "\n";
	return 0;
}

int main1()
{
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	int n;
	cin >> n;
	vector<ll> num_divs(n + 1, 2);  // init with 2 because 1 and n are divisors
	num_divs[1] = 1;
	for (int k = 2; k * 2 <= n; k++)
	{
		for (int j = k * 2; j <= n; j += k)
		{
			num_divs[j]++;
		}
	}
	ll res = 0;
	for (int k = 1; k <= n; k++)
	{
		res += k * num_divs[k];
	}
	cout << res << "\n";
	return 0;
}
MY_NAMESPACE_

Measured memory_bytes: 81336
import java.io.BufferedReader
import java.io.InputStreamReader
import java.io.PrintWriter
import kotlin.math.max
import kotlin.math.min

val br = BufferedReader(InputStreamReader(System.`in`))
val out = PrintWriter(System.out)

fun main() {
    br.use { out.use {
        solve()
        out.flush()
    } }
}

fun solve() {
    val (n, k) = readLongList()
    val tmp = LongArray(100001)
    repeat(n.toInt()) {
        val (a, b) = readIntegerList()
        tmp[a] = tmp[a] + b
    }

    var count = 0L
    for ((a, b) in tmp.withIndex()) {
        count += b
        if (count >= k) {
            out.println(a)
            return
        }
    }
}

fun readInteger() = Integer.parseInt(br.readLine())
fun readLong() = java.lang.Long.parseLong(br.readLine())
fun readStringList() = br.readLine()!!.split(' ')
fun readIntegerList() = readStringList().map(Integer::parseInt)
fun readLongList() = readStringList().map(java.lang.Long::parseLong)
fun readDoubleList() = readStringList().map(java.lang.Double::parseDouble)


Measured memory_bytes: 59764
private fun readInts(): List<Int> = readLine()!!.split(" ").map { it.toInt() }

fun main(args: Array<String>) {
    val (N, Q) = readInts()
    val S = readLine()!!
    val lr = (0 until Q).map { readInts().map { index -> index - 1 } } // 0-started

    val sum = Array(N) { 0 }
    for (index in 1 until N) {
        val x = if (S[index - 1] == 'A' && S[index] == 'C') 1 else 0

        sum[index] = sum[index - 1] + x
    }

    lr
        .map { line ->
            val (l, r) = line
            sum[r] - sum[l]
        }.forEach { println(it) }
}

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

int main(){
    int A, B, c=0;
    cin >> A >> B;
    for(int i=A; i<=B; i++){
        int num=i;
        string numstr=to_string(num);
        if(numstr[0]==numstr[4] && numstr[1]==numstr[3])c++;
    }
    cout << c;
    return 0;
}

Measured memory_bytes: 256
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String str = sc.next();
		char[] ch = str.toCharArray();
		ArrayList<Character> check = new ArrayList<>();
		
		for(int i = 0; i < 4; i++) {
			if(!check.contains(ch[i])) {
				check.add(ch[i]);
			}
		}
		if(check.size() == 2) System.out.println("Yes");
		else System.out.println("No");
	}
}

Measured memory_bytes: 23124
#include<stdio.h>

 int max(int a[], int N){
        int i;
        int max = a[0];
        for(i=0;i<N;i++){
            if(a[i] > max){
                max = a[i];
            }
        }
   return max;
    }

int main()
{
    int a,b;
    char s[101];
    // 整数の入力
    scanf("%d", &a);
        scanf("%d", &b);
  
  int n[3];
	n[0] = a+b;
  	n[1] = a-b;
  	n[2] = a* b;
  int ans = 0;
	ans = max(n,3);

    printf("%d",ans);
    return 0;
}

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

int main()
{
	
		int n,ct = 1;
		cin>>n;
		int num;
		cin>>num;
		int min_num = num; 
		for(int i = 1;i<n;i++)
		{
			cin>>num;
			if(num < min_num) 
			{
				min_num = num;
				ct++;
			}
		}
		cout<<ct;
		cout<<endl;	
 	return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define NiYuan(x) Fast(x,mod-2ll)
#define Div(x,y) x*NiYuan(y)%mod
using namespace std;
struct Number
{
	long long Abs;
	bool Minus;
	inline const bool operator <(const Number &B)
	{
		return Abs>B.Abs;
	}
}Num[200200];
int P;
const long long mod=1e9+7;
inline long long Fast(long long x,long long y)
{
	if(y==0)
		return 1ll;
	if(y%2==0)
		return Fast(x*x%mod,y/2ll);
	return Fast(x*x%mod,y/2ll)*x%mod;
}
int main()
{
	int N,K;
	cin>>N>>K;
	int CMinus=0;
	for(int i=0;i<N;i++)
	{
		long long X;
		cin>>X;
		if(!X)
			continue;
		if(X<0)
		{
			CMinus++;
			Num[P].Minus=true;
		}
		else	Num[P].Minus=false;
		Num[P++].Abs=abs(X);
	}
	sort(Num,Num+P);
	if(P<K)
	{
		puts("0");
		return 0;
	}
	if(CMinus==P)
	{
		if(K%2)
			reverse(Num,Num+P);
		long long Ans=1;
		for(int i=0;i<K;i++)
			Ans=Ans*Num[i].Abs%mod;
		if(K%2)
        {
          if(N==P)
          {
            Ans=Ans*-1ll%mod;
            cout<<(Ans+mod)%mod<<endl;
          }
			else	puts("0");
          return 0;
        }
		cout<<(Ans+mod)%mod<<endl;
		return 0;
	}
	int Cnt=0;
	long long Ans=1;
	for(int i=0;i<K;i++)
	{
		Ans=Ans*Num[i].Abs%mod;
		Cnt+=Num[i].Minus;
	}
	if(Cnt%2==0)
	{
		cout<<(Ans+mod)%mod<<endl;
		return 0;
	}
	int FMinus=-1,FPosi=-1,LMinus=-1,LPosi=-1;
	for(int i=0;i<K;i++)
		if(Num[i].Minus)
			FMinus=Num[i].Abs;
		else	FPosi=Num[i].Abs;
	for(int i=P-1;i>=K;i--)
		if(Num[i].Minus)
			LMinus=Num[i].Abs;
		else	LPosi=Num[i].Abs;
	if(FMinus==-1||LPosi==-1)
	{
		if(FPosi==-1||LMinus==-1)
		{
			if(N==P)
            {
              if(Cnt%2)
                	Ans*=-1ll;
              cout<<(Ans+mod)%mod<<endl;
            }
			else	puts("0");
		}
		else
		{
			Ans=Div(Ans,FPosi);
			Ans=Ans*LMinus%mod;
			cout<<(Ans+mod)%mod<<endl;
		}
	}
	else if(FPosi==-1||LMinus==-1)
	{
		Ans=Div(Ans,FMinus);
		Ans=Ans*LPosi%mod;
		cout<<(Ans+mod)%mod<<endl;
	}
	else
	{
		long long A=FPosi,B=LMinus,C=FMinus,D=LPosi;
		if(B*C>D*A)
		{
			Ans=Div(Ans,FPosi);
			Ans=Ans*LMinus%mod;
			cout<<(Ans+mod)%mod<<endl;
		}
		else
		{
			Ans=Div(Ans,FMinus);
			Ans=Ans*LPosi%mod;
			cout<<(Ans+mod)%mod<<endl;
		}
	}
	return 0;
}


Measured memory_bytes: 6716
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
  int N;
  int sum=0,A[200];
  int i;
  int flag=0;

  scanf("%d",&N);
  for(i=0; i<N; i++)
  {
    scanf("%d",&A[i]);
  }
while(1)
{
  for(i=0; i<N; i++)
  {
    if(A[i]%2 == 0 || A[i]==0)
    {
      A[i] = A[i]/2;
    }else
    {
      flag=1;
      break;
    }
  }
  if(flag == 1)
  {
    break;
  }
  sum++;
}




  printf("%d\n",sum);
}

Measured memory_bytes: 128
import java.util.Scanner;

 class Main {
	public static void main(String[]args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int count = 0 ;
		for(int i = 1 ; i <= n ; i++) {
			String s = Integer.toString(i);
			if(s.length() % 2 != 0) {
				count++;
			}else {
				i = (i*10)-1 ;
			}
		}
		System.out.println(count);
	}
}


Measured memory_bytes: 28628
x = int(input())

if 400 <= x < 600:
    print(8)
elif 600 <= x < 800:
    print(7)
elif 800 <= x < 1000:
    print(6)
elif 1000 <= x < 1200:
    print(5)
elif 1200 <= x < 1400:
    print(4)
elif 1400 <= x < 1600:
    print(3)
elif 1600 <= x < 1800:
    print(2)
else:
    print(1)

Measured memory_bytes: 9188
// DP F

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
#define ALL(c) (c).begin(), (c).end()
#define SUM(x) std::accumulate(ALL(x), 0LL)
#define MIN(v) *std::min_element(v.begin(), v.end())
#define MAX(v) *std::max_element(v.begin(), v.end())
#define EXIST(v, x) (std::find(v.begin(), v.end(), x) != v.end())
using namespace std;

typedef long long ll;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
const int INF = 1e9;
const long long INFL = 1LL<<60;

void dump(const vector<pair<int, int>>& a)
{
  for (auto v : a) {
    cerr << v.first << " " << v.second << endl;
  }
}

void dump(const vector<int>& a)
{
  for (auto v : a) {
    cerr << v << " ";
  }
  cerr << endl;
}

int main() {
  int D, G, p[11], c[11];
  cin >> D >> G;
  rep(i, D) {
    cin >> p[i] >> c[i];
  }

  int ans = INF;
  rep(mask, (1 << D)) {
    int s = 0, num = 0, rest_max = -1;
    rep(i, D) {
      if (mask >> i & 1) {
        // i 番目の問題を全部解く
        s += 100 * (i+1) * p[i] + c[i];
        num += p[i];
      } else {
        rest_max = i; // 解いてない問題の最大
      }
    }
    if (s < G) {
      // スコアが足りてなかったら残りの中で配点の高い問題(だけ)を解く
      int s1 = 100 * (rest_max + 1);
      int need = (G - s + s1 - 1) / s1;
      if (need >= p[rest_max]) {
        // 解いても G に届かない場合はスキップ
        continue;
      }
      num += need;
    }
    chmin(ans, num);
  }
  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 256
n = int(input())
al = list(input())

al = [int(a) - 1 for a in al]
flag = False
if 1 not in al:
    flag = True
    al = [a // 2 for a in al]
else:
    al = [a if a != 2 else 0 for a in al]

countl = [0]
a = 0
for i in range(1, n+1):
    while i % 2 == 0:
        a += 1
        i //= 2
    countl.append(a)

def comb(a,b):
    if countl[a] - countl[a-b] - countl[b] > 0:
        return 0
    else:
        return 1

ans = 0
for idx, a in enumerate(al):
    if a == 1:
        ans += comb(n-1, idx)


if ans % 2 == 0:
    print(0)
else:
    if flag:
        print(2)
    else:
        print(1)



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


int main(){
  int n,Y[110],M[110],D[110],sum=0;
  cin>>n;
  for(int i=0;i<n;i++){
    cin>>Y[i]>>M[i]>>D[i];
    sum=0;
    if(Y[i]%3==0){
      for(int j=1;j<Y[i];j++){
	if(j%3==0)sum+=200;
        else sum+=195;
      }
      sum+=(M[i]-1)*20+D[i];
    }
    else {
      for(int j=1;j<Y[i];j++){
	if(j%3==0)sum+=200;
        else sum+=195;
      }
      for(int j=1;j<M[i];j++){
	if(j%2==1)sum+=20;
        else sum+=19;
      }
      sum+=D[i];
    }
    cout<<196471-sum<<endl;
  }
          
  return 0;
}

Measured memory_bytes: 3056
#include <iostream>
#include <set>
#include <map>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#include <iomanip>
#include <queue>
#include <deque>
#include <stack>
#include <climits>
#include <math.h>
#include <cassert>
#include <unordered_map>
#include <chrono>
#include <random>
#include <ctime>
using namespace std;
#pragma warning(disable : 4996)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

const ld PI = 3.14159265358979323846;
const ll MOD = 1e9 + 7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());


int main() {
#ifdef _DEBUG
	freopen("input1.txt", "r", stdin);
	freopen("output2.txt", "w", stdout);
#endif
	srand(time(0));
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int a;
	cin >> a;
	cout << a + a * a + a * a * a;
}

Measured memory_bytes: 3636
fun main(args:Array<String>):Unit {
    val n = readLine()!!.trim().toInt()
    val k = readLine()!!.trim().toInt()
    repeat(k){
        val (x, y) = readLine()!!.trim().split(' ').map(String::toInt)
        val diff = listOf(n - x + 1, n - y + 1, x, y).min()!! + 2
        println(diff % 3 + 1)
    }
}



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

using namespace std;

typedef long long LL;
typedef pair<int,int> pi;
typedef vector<int> vi;
#define ST first
#define ND second
#define PB push_back
#define DET(a,b,c) (LL(b.x-a.x)*LL((c.y-a.y))-LL((c.x-a.x))*LL((b.y-a.y)))

const int MAXN = 401;
const LL INF = (LL)1000*1000*1000*1000*1000*1000;
int n,a[MAXN];
LL p[MAXN];
LL dp[MAXN][MAXN];

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cin>>n;
    for(int i=1; i<=n;i++) {
        cin>>a[i];
        p[i] = p[i-1]+a[i];
    }
    for(int len = 2; len<=n; len++) {
        for(int L = 1; L<=n; L++) {
            int R = L+len-1;
            if(R>n) continue;
            dp[L][R] = INF;
            for(int last = L; last<R; last++) {
                dp[L][R]=min(dp[L][R],dp[L][last]+dp[last+1][R]+p[R]-p[L-1]);
            }
        }
    }
    cout<<dp[1][n];
}


Measured memory_bytes: 1664
import java.util.*;

class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int ans = 0;
		for(int i = 0; i < 3; i++){
			ans += (n%10==1?9:1)*Math.pow(10,i);
			n/=10;
		}
		System.out.print(ans);
	}
}


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

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

    if (s == t)
        cout << "=";
    else if (s > t)
        cout << ">";
    else
        cout << "<";
    cout << endl;

    return 0;
}


Measured memory_bytes: 3548
def solve():
    n = int(input())
    B = [0] + list(map(int, input().split()))
    ans = []
    for i in range(n):
        t = 0
        for j in range(1, n - i + 1):
            if B[j] == j:
                t = j
        if t == 0:
            return [-1]
        else:
            ans.append(t)
            del B[t]
    return ans[::-1]
print(*solve(), sep="\n")


Measured memory_bytes: 3060
#include <iostream>

using namespace std;

int main(int argc, char *argv[]) {
	long H, W;
	cin >> H >> W;

	long long ans = 10000000000;
	for (int i = 1; i <= H - 1; i++) {
		long long a = W * i;

		long long bh = (H - i) / 2;
		long long ch = H - (i + bh);
		long long b = W * bh, c = W * ch;
		ans = min(ans, max(max(a, b), c) - min(min(a, b), c));

		long long bw = W / 2;
		long long cw = W - bw;
		b = (H - i) * bw, c = (H - i) * cw;
		ans = min(ans, max(max(a, b), c) - min(min(a, b), c));
	}

	for (int i = 1; i <= W - 1; i++) {
		long long a = H * i;

		long long bw = (W - i) / 2;
		long long cw = W - (i + bw);
		long long b = H * bw, c = H * cw;
		ans = min(ans, max(max(a, b), c) - min(min(a, b), c));

		long long bh = H / 2;
		long long ch = H - bh;
		b = (W - i) * bh, c = (W - i) * ch;
		ans = min(ans, max(max(a, b), c) - min(min(a, b), c));
	}

	cout << ans << endl;

	return 0;
}

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

int main() {
    int W, H, x, y, r;
    
    cin >> W >> H >> x >> y >> r;
    
    if (x + r > W || x - r < 0) {
        cout << "No" << endl;
    }
    else if (y + r > H || y - r < 0) {
        cout << "No" << endl;
    }
    else {
        cout << "Yes" << endl;
    }
    
    return 0;
}


Measured memory_bytes: 3120
#include<bits/stdc++.h>
using namespace std;
int main()
{
  	int n, arr[201];cin>>n;n*=2;	
  for(int i=1;i<=n;i++) cin>>arr[i];
  	sort(arr+1, arr+n+1);
  	int ans=0;
  	
    for(int i=1;i<=n;i+=2)
    {
      ans+=arr[i];
    }
  cout<<ans;
}

Measured memory_bytes: 256
from itertools import combinations


N = int(input())
AS = [int(i) for i in input().split()]
Q = int(input())
MS = [int(i) for i in input().split()]


sums = [sum(c) for cs in [combinations(AS, i) for i in range(1, N)] for c in cs]

for m in MS:
    print('yes' if m in sums else 'no')



Measured memory_bytes: 43104
#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
typedef vector<int> VI;
typedef long long ll;
typedef pair<int,int> PII;
const ll mod=1000000007;
ll powmod(ll a,ll b){ll res=1;a%=mod;assert(b>=0);for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}

const int N=2e3+10;
int n,x,y;
int dist[N][N];
multiset<int>s;
int main(){
	scanf("%d%d%d",&n,&x,&y);
	rep(i,1,n+1){
		rep(j,i+1,n+1){
			dist[i][j]=min(abs(j-i),min(abs(x-i)+1+abs(j-y),abs(y-i)+1+abs(x-j)));
			s.insert(dist[i][j]);
		}
	} 
	
	rep(i,1,n){
		printf("%d\n",s.count(i));
	}
    return 0;
}


Measured memory_bytes: 109056
#include <iostream>
#include <queue>
#include <algorithm>
#include <numeric>
#include <bits/stdc++.h>

using namespace std;

 long long INF = 1LL<<40;



int main() {
    long long N, K;
  
  cin >> N >> K;
    vector<vector<long long> > s(N);
    for (int i = 0; i < N; ++i) {
        long long t, d; 
      
      cin >> t >> d; --t;
        s[t].push_back(d);
    }

   
    for (auto &v : s) {
        sort(v.begin(), v.end(), greater<long long>());
        if (v.empty()) v.push_back(-INF);
    }

  
    sort(s.begin(), s.end(), [&](vector<long long> a, vector<long long> b) {
            return a[0] > b[0];});
 
   
    long long cur = 0;
  
    priority_queue<long long> que;
    for (int i = 0; i < K; ++i) {
        cur += s[i][0];
        for (int j = 1; j < s[i].size(); ++j) que.push(s[i][j]);
    }
    for (int i = K; i < N; ++i) for (int j = 0; j < s[i].size(); ++j) que.push(s[i][j]);

    
    long long res = cur + K*K;
    for (long long x = K-1; x >= 1; --x) {
        long long v = s[x][0];
        long long w = que.top();
        if (v < w) {
            que.pop(); cur += w;
            que.push(v); cur -= v;
        }
        res = max(res, cur + x*x);

    }
    cout << res << endl;
}


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

vector<int> tree[100010];
int id[100010];
int parent[100010];
int depth[100010];
int used[100010];

void dfs (int v, int d) {
  depth[v] = d;
  for (int i = 0; i < (int) tree[v].size(); i++) {
    dfs (tree[v][i], d + 1);
    parent[tree[v][i]] = v;
  }
}

int main() {

  int n;
  cin >> n;
  
  for (int i = 0; i < n; i++) {
    parent[i] = -1;
    int id, k;
    cin >> id >> k;
    tree[id].resize(k);
    for (int j = 0; j < k; j++) {
      cin >> tree[id][j];
      used[tree[id][j]] = 1;
    }
  }

  for (int i = 0; i < n; i++) {
    if (used[i] != 1) {
      dfs(i, 0);
    }
  }

  for (int i = 0; i < n; i++) {
    cout << "node " << i << ": parent = " << parent[i] << ", depth = " << depth[i];
    if (parent[i] < 0) {
      cout << ", root, [";
    } else if (!tree[i].size()) {
      cout << ", leaf, [";
    } else {
      cout << ", internal node, [";
    }
    for (int j = 0; j < (int) tree[i].size(); j++) {
      cout << tree[i][j];
      if (j != (int) tree[i].size() - 1) {
        cout << ", ";
      }
    }
    cout << "]" << endl;
  }

  return 0;

}


Measured memory_bytes: 7000
// AtCoder Beginners Contest 165
// B - 1%

#include <iostream>
#include <cmath>

using namespace std;

int main()
{
    unsigned long X, s0, s;
    int year;
    s0 = 100;

    cin >> X;

    if (X < 101 || 1000000000000000000 < X)  {
        cout << "Kは条件を満たしていません!\n";
        return 0;
    }

    s = s0;
    year = 0;
    while ( round(s) < X) {
        s = s * 1.01;
	year = year + 1;
    }
    cout << year << '\n';
}

Measured memory_bytes: 3636
import sys

stdin = sys.stdin

ni = lambda: int(ns()) #int
na = lambda: list(map(int, stdin.readline().split())) #int,list
ns = lambda: stdin.readline().rstrip()  # str

n,k = na()
s=ns()
print(s[:k-1]+s[k-1].lower()+s[k:])

Measured memory_bytes: 3060
import numpy as np

N = int(input())

k = len(str(N))
ans = 0

if k%2 == 0:
    for i in np.arange(1, k+1, 2):
        ans += 9 * (10**(i-1))
    print(ans)
    
else:
    for i in np.arange(1, k, 2):
        ans += 9 * (10**(i-1))
    ans += N - 10**(k-1) +1
    print(ans)

Measured memory_bytes: 12396
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n - 1; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i <= n; i++)
#define FORR(i, m, n) for(int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define VSORTR(v) sort(v.rbegin(), v.rend());
#define ALL(v) (v).begin(),(v).end()
 
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<ll, ll>;

template<typename T> using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

const ll mod = 1e9 + 7;
const ll inf = 1e18;

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

    vll a = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51};
    ll i;
    cin >> i;
    cout << a[i - 1] << endl;
    return 0;
}

Measured memory_bytes: 3624
"use strict";

function main(input) {
  input = input.split(/\n/).slice(1, -1);
  input = input.map(v => v.split(/\s/).map(v => ~~v));

  let ans = "Yes"; // 'Yes' or 'No'
  let distance = 0;
  let time = 0;
  let next = { x: 0, y: 0, t: 0 };
  let tmp = { x: 0, y: 0, t: 0 };

  for (let i = 0; i < input.length; i++) {
    next.t = input[i][0];
    next.x = input[i][1];
    next.y = input[i][2];

    // time = next.t - tmp.t;

    distance = next.x + next.y; // Math.abs(tmp.x - next.x) + Math.abs(tmp.y - next.y);

    // console.log(time, distance, time % 2, distance % 2)
    if (next.t < distance || next.t % 2 != distance % 2) {
      ans = "No";
      //   break;
    }

    tmp.t = next.t;
    tmp.x = next.x;
    tmp.y = next.y;
  }
  console.log(ans);
}

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


Measured memory_bytes: 51104
import java.util.Scanner;

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

		int R = sc.nextInt();
		String ans = "";

		if ( R < 1200 ) {
			ans = "ABC";
		} else if ( R <2800 ) {
			ans = "ARC";
		} else {
			ans = "AGC";
		}
		System.out.println( ans );
	}
}

Measured memory_bytes: 21332
// AtCoder ABC131: D - Megalomania
// 2019.9.4 bal4u

#include <stdio.h>

typedef long long ll;

#if 1
#define gc() getchar_unlocked()
#else
#define gc() getchar()
#endif

int in() {   // 非負整数の入力
	int n = 0, c = gc();
	do n = 10 * n + (c & 0xf); while ((c = gc()) >= '0');
	return n;
}

ll t[200005]; int N;

void Qsort(ll *a, int l, int r) {
	int i, j; ll m, t;
	
	i = l, j = r, m = a[(l+r) >> 1];
	while (1) {
		while (a[i] < m) i++;
		while (m < a[j]) j--;
		if (i >= j)	break;
		t = a[i], a[i] = a[j], a[j] = t;
		i++, j--;
	}
	if (l+1 < i) Qsort(a, l, i-1);
	if (j+1 < r) Qsort(a, j+1, r);
}

int main()
{
	int i, a, b; ll s;
	
	N = in(); for (i = 0; i < N; i++) {
		a = in(), b = in();
		t[i] = ((ll)b << 32) | a;
	}
	Qsort(t, 0, N-1);
	s = 0; for (i = 0; i < N; i++) {
		s += t[i] & 0xffffffff;
		if (s > (t[i] >> 32)) goto No;
	}
	puts("Yes"); return 0;
No: puts("No");  return 0;
}


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

int main(){
    int N, K; cin >> N >> K;
    string S; cin >> S;
    vector<int> Nums;
    int now = 1;
    int cnt = 0;
    for (int i = 0; i < N; i++)
    {
        if(S[i] ==  (char)('0' + now)) cnt++;
        else{
            Nums.push_back(cnt);
            now = 1 - now;
            cnt = 1;
        }
    }
    if(cnt != 0) Nums.push_back(cnt);

    //1-0-1-0-1って感じの配列が欲しい

    if(Nums.size() % 2 == 0) Nums.push_back(0);

    int Add = 2 * K + 1;

    int ans = 0;

    int left = 0;
    int right = 0;
    int tmp = 0; //[left, right)のsum

    for (int i = 0; i < Nums.size(); i += 2)
    {
        int Nextleft = i;
        int Nextright = min(i + Add, (int)Nums.size());

        //サタンを移動する
        while (Nextleft > left)
        {
            tmp -= Nums[left];
            left++;
        }
        while (Nextright > right)
        {
            tmp += Nums[right];
            right++;
        }

        ans = max(tmp, ans);
    }
    cout << ans << endl;
}

Measured memory_bytes: 1020
#include<bits/stdc++.h>
using namespace std;
int main(){
	long long l,h,n;
	cin>>l>>h>>n;
	for(int i=0;i<n&&l<=h;i++){
		cout<<l<<endl;
		l++;
	}
	l--;
	if(l+n<h) l=h-n+1;
	else l++;
	while(l<=h){
		cout<<l<<endl;
		l++;
	}
	return 0;
}

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

namespace ABC115C
{
    static class MainClass
    {

        public static void Main(string[] args)
        {


            string[] input1 = Console.ReadLine().Split(' ');
            int N = int.Parse(input1[0]);
            int K = int.Parse(input1[1]);
            int input2 = 0;
            var h = new List<int>();

            for (int i = 0; i < N; i++)
            {
                input2 = int.Parse(Console.ReadLine());               
                h.Add(input2);
            }

            h.Sort((a, b) => a - b);

            var d = new List<int>();
            for (int j = K - 1; j < N; j++){
                d.Add(h[j] - h[j - K + 1]);
            }

            Console.WriteLine(d.Min());

            return;


        }


    }

}






Measured memory_bytes: 19292
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();
		sc.close();
		
		int ans = Integer.MAX_VALUE;
		for(int i = 0;i < N;++i) {
			int num = 0;
			for(int j = 0;j < 42;++j) {
				if(((A[i] >>> j) & 0x01) == 1) {
					num = j;
					break;
				}
			}
			if(ans > num)
				ans = num;
		}
		System.out.println(ans);
	}
}


Measured memory_bytes: 23124
import java.util.*;
public class Main{
    static Scanner kbd = new Scanner(System.in);
    public static void main(String[] args){
	boolean[] p = new boolean[1000000];
	setP(p);
	while(kbd.hasNext()){
	    int a = kbd.nextInt();
	    int d = kbd.nextInt();
	    int n = kbd.nextInt();
	    if(a!=0) solve(a, d, n, p);
	}
    }

    static void solve(int a, int d, int n, boolean[] p){
	while(n>0){
	    if(p[a]) {
		n--;
		a += d;
	    }
	    else{
		a += d;
	    }
	}
	System.out.println(a-d);
    }

    static void setP(boolean[] p){
	Arrays.fill(p, true);
	p[0]=false; p[1]=false;
	for(int i=2; i<p.length; i++){
	    for(int j=i+i; j<p.length; j+=i){
		if(p[i]) p[j] = false;
	    }
	}
    }
}

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

int a[100010], n, k, ans;

int check(const int &t) {
	int i = t, k = 1;
	while (a[i] == a[i + 1]) {
		i++, k++;
	}
	return k;
}

int main() {
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d", &a[i]);
	}
	sort(a, a + n);
	for (int i = 0; i < n; i += k) {
		k = check(i);
		ans += (k >= a[i] ? k - a[i] : k);
	}
	printf("%d", ans);
	return 0;
}

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

int main() {
	int d, t, s;
	cin >> d >> t >> s;
	if (d <= t * s) cout << "Yes" << endl;
	else cout << "No" << endl;
	return 0;
}

Measured memory_bytes: 3620
#include <iostream>
#include <vector>
#include <cmath>
#include <string>
#include <algorithm>
#include <iomanip>
#include <map>
#include <bitset>
#include <cstdio>
#include <set>
#include <stack>
#include <queue>
#include <cassert>
#include <numeric>
#define rep(i,n) Rep(i,0,n)
#define Rep(i,k,n) for(int i=k ; i<n ; i++)
#define rep1(i,n) for(int i=1 ; i<=n ; i++)
#define vi vector<int>
#define vii vector<vector<int>>
#define mii map<int,int>
#define Sort(v) sort(v.begin(),v.end())
#define Reverse(v) reverse(v.begin(),v.end())
#define ALL(a)  (a).begin(),(a).end()
#define pb push_back
#define mp make_pair
//#define int ll
typedef long long ll;

const int md = 1000000007;
const int INF = 1<<30;
using namespace std;

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

    if(a%2 == 0 or b%2 == 0 or c%2 == 0){
        cout << 0 << endl;
    } else{
        ll sa = b * c;
        ll sb = a * c;
        ll sc = a * b;

        cout << min(min(sa,sb) , sc) << endl;
    }
}

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

using namespace std;

#define inf 1<<30
#define llong long long
#define usd unsigned
#define pqueue priority_queue
#define mp make_pair
#define pb push_back
#define fn fill_n
typedef pair<int, int> P;
typedef struct data{
	int now;
	int cost;
}data;
int nw[9] = {0, 1, 0, -1, -1, 1, 1, -1, 0};
int nh[9] = {1, 0, -1, 0, 1, 1, -1, -1, 0};

int n;
map<P, int> red, blue;
vector<P> all;
vector<P> r;

int main(){
	cin >> n;
	int x, y;
	for(int i = 0; i < n; i++){
		cin >> x >> y;
		red[P(x, y)]++;
		all.pb(P(x, y));
	}
	for(int i = 0; i < n; i++){
		cin >> x >> y;
		blue[P(x, y)]++;
		all.pb(P(x, y));
	}

	int ans = 0;
	sort(all.begin(), all.end());
	for(int i = 0; i < all.size(); i++){
 		if(red.find(all[i]) != red.end()) r.pb(all[i]);
		else if(blue.find(all[i]) != blue.end() && r.size() != 0){
			int dis = inf;
			int index = -1;
			for(int j = 0; j < r.size(); j++){
				if(r[j].second < all[i].second && all[i].second - r[j].second < dis){
					dis = all[i].second - r[j].second;
					index = j;
				}
			}
			if(index != -1){
				ans++;
				r.erase(r.begin() + index);
			}
		}
	}

	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
long i;
double a,s;
while(cin>>a){
s=a;
for(i=0;i<4;i++){a*=2;s+=a;a/=3;s+=a;}
a*=2;s+=a;
printf("%.6f\n",s);
}
return 0;
}

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

int64_t MOD = 1000000007;

int64_t f1(int64_t x, int64_t y) {
  if(y == 0) {
    return 1;
  }
  else if(y % 2 == 0) {
    return f1(x, y / 2) * f1(x, y / 2) % MOD;
  }
  else {
    return (f1(x, y / 2) * f1(x, y / 2) % MOD) * x % MOD;
  }
}

int main() {
  int s;
  cin >> s;
  int64_t ans = 0;
  int64_t x = 1;
  for(int i = 1; 3 * i <= s; i++) {
    int64_t nCk = 1;
    for(int j = 1; j <= i - 1; j++) {
      nCk *= s - 2 * i - j;
      nCk %= MOD;
    }
    if(i != 1) {
      x *= i - 1;
      x %= MOD;
    }
    nCk *= f1(x, MOD - 2);
    nCk %= MOD;
    ans += nCk;
    ans %= MOD;
  }
  cout << ans << endl;
}

Measured memory_bytes: 3520
#include<iostream>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<map>
#include<set>

using namespace std;

#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define ALL(a) (a).begin(),(a).end()
#define PI 3.141592653589793238
#define INF 1050000000
#define INFL (long long)(4e18)

using vi = vector<int>;

template<class T>
struct Edge {
	int to;
	T cost;
	Edge() {};
	Edge(int to, T cost) : to(to), cost(cost) {};
};

template<class T>
class Graph {
	int n;
	bool directed;
	vector<vector<Edge<T>>> edges;
public:

	Graph(int n, bool directed) :n(n), directed(directed), edges(vector<vector<Edge<T>>>(n)) {};
	Graph() {};

	void add(int to, T cost) {
		emplace_back(to, cost);
	}

	int size() {
		return n;
	}
};


int main() {

	double R;

	cin >> R;

	cout << fixed << setprecision(15) << R*2.0*PI << endl;

	return 0;
}


Measured memory_bytes: 3788
/*                         _
                        _ooOoo_
                       o8888888o
                       88" . "88
                       (| -_- |)
                       O\  =  /O
                    ____/`---'\____
                  .'  \\|     |//  `.
                 /  \\|||  :  |||//  \
                /  _||||| -:- |||||_  \
                |   | \\\  -  /'| |   |
                | \_|  `\`---'//  |_/ |
                \  .-\__ `-. -'__/-.  /
              ___`. .'  /--.--\  `. .'___
           ."" '<  `.___\_<|>_/___.' _> \"".
          | | :  `- \`. ;`. _/; .'/ /  .' ; |
          \  \ `-.   \_\_`. _.'_/_/  -' _.' /
===========`-.`___`-.__\ \___  /__.-'_.'_.-'================

                  Please give me AC.
*/
#include<bits/stdc++.h>
#define INF 0x3f3f3f3f

using namespace std;

const int N = 2e5 + 5;
const int M = 1e4 + 7;

int i,j,T,t,n,m,l,s,c[N],a,b,g[105],p,k,d,flag;
double x;

int main()
{
    ios::sync_with_stdio(false);
    cin >> n >> m;
    c[0]=0;
    s=0;
    for(i = 1;i <= n;i++){
        cin >> a;
        c[i]=c[i-1]+a;
        if(i>=m&&c[i]-c[i-m]>s) s=c[i]-c[i-m];
    }
    printf("%.12f",(1.0*s+m)/2);
    return 0;
}


Measured memory_bytes: 1024
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
using namespace std;

template <typename A, typename B>
string to_string(pair<A, B> p);
 
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
 
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
 
string to_string(const string& s) {
  return '"' + s + '"';
}

string to_string(const char& ch) {
	string s = "";
	s += ch;
	return "'" + s + "', ";
}
 
string to_string(const char* s) {
  return to_string((string) s);
}
 
string to_string(bool b) {
  return (b ? "true" : "false");
}
 
string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
 
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  return res;
}
 
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto &x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
 
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
 
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}
 
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
 
void debug_out() { cout << endl; }
 
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cout << " " << to_string(H);
  debug_out(T...);
}
 
#ifdef LOCAL_DEFINE
#define debug(...) cout << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif
   
#define int long long
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(),(v).end()
typedef pair<int, int> pii;
const int mod = (int) 1000000007; // 998244353;
const int inf = (int) 2e18;



int32_t main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	#ifdef LOCAL_DEFINE
		freopen("in.txt", "rt", stdin);
	#endif
	
	
	string s, t;
	cin >> s >> t;
	for(char ch = 'a'; ch <= 'z'; ++ ch)
	{
		debug(s + ch, t);
		if(s + ch == t)
		{
			cout << "Yes\n";
			return 0;
		}
	}
	cout << "No\n";
	
	return 0;
}






Measured memory_bytes: 3136
N,K = map(int,input().split())
R,S,P = map(int,input().split())
T = list(input())
d = {'r':P,'s':R,'p':S}
ans = 0
for i,c in enumerate(T):
    if i < K or c != T[i-K]:
        ans += d[c]
        continue
    else:
        T[i] = '_'
print(ans)

Measured memory_bytes: 4084
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {

		String temp;


		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);

		String str = null;
		try {
			str = br.readLine();
		} catch (IOException e) {
			// TODO 自動生成された catch ブロック
			e.printStackTrace();
		}
		String[] spl = str.split(" ");

		System.out.print(spl[2]+" "+spl[0]+" "+spl[1]);

	}
}


Measured memory_bytes: 21076
#include<stdio.h>
int main(void)
{
  char a, b;
  scanf("%c %c", &a, &b);
  if(a == 'H' && b == 'H'){
    printf("H\n");
  } else if(a == 'H' && b =='D'){
    printf("D\n");
  } else if(a == 'D' && b =='H'){
    printf("D\n");
  }  else if(a == 'D' && b =='D'){
    printf("H\n");
  }
  return 0;
}



Measured memory_bytes: 128