akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> V;
#define rep(cnt,e) for(ll cnt=0;cnt<e;cnt++ )
#define allsort(X) sort(X.begin(),X.end())

typedef pair<ll,ll> P;
const ll mod = 1e9+7;
const ll INF = INT64_MAX;






ll i,j,k;


int main(){
    ll N;
    cin>>N;
    vector<string> S(N);
    V ans(4,0);
    rep(i,N)cin>>S[i];
    rep(i,N){
        if(S[i]=="AC")ans[0]++;
        if(S[i]=="WA")ans[1]++;
        if(S[i]=="TLE")ans[2]++;
        if(S[i]=="RE")ans[3]++;
    }
    vector<string> k={"AC","WA","TLE","RE"};
    rep(i,4)cout<<k[i]<<" "<<"x"<<" "<<ans[i]<<endl;
    
  

}

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

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

int main()
{
    int N;
    long t = pow(10, 9) + 7;
    cin >> N;
    long sum = 1;
    rep(i, N)
    {
        sum = (sum * (i + 1)) % t;
    }

    cout << sum << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <string>
#include <cstdlib>
#include<algorithm> 
#include <iomanip>

using namespace std;

int main(){
    while(1){
int a,b,c;
cin>>a>>b>>c;
if(a==-1||b==-1){
    if(a==-1&&b==-1&&c==-1)break;
    cout<<'F'<<endl;
}else if(a+b>=80)cout<<'A'<<endl;
else if(a+b>=65&&a+b<80)cout<<'B'<<endl;
else if(a+b>=50&&a+b<65)cout<<'C'<<endl;
else if(a+b>=30&&a+b<50){
    if(c>=50)cout<<'C'<<endl;
    else cout<<'D'<<endl;
}else cout<<'F'<<endl;
}
return 0;
}


Measured memory_bytes: 3080
// AtCoder Regular Contest 080
// C - 4-adjacent

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;


int N;

bool can(int cnt4, int cnt2) {
    if (cnt4 >= N / 2) {
        return true;
    }
    return (cnt4 * 2 + (cnt2 - cnt4) >= N);
}

int main() {

    int a;
    int cnt4, cnt2;

    cin >> N;
    cnt4 = cnt2 = 0;
    for (int i = 0; i < N; i++) {
        cin >> a;
        cnt4 += (a % 4 == 0 ? 1 : 0);
        cnt2 += (a % 2 == 0 ? 1 : 0);
    }

    cout << (can(cnt4, cnt2) ? "Yes" : "No") << endl;

    return 0;

}





Measured memory_bytes: 256
s=input()
s = int(s)
syoulist = []

syou1 = s//1000
amari1 = s%1000
syoulist.append(syou1)
syou2 = amari1//100
amari2 = amari1%100
syoulist.append(syou2)
syou3 = amari2//10
amari3 = amari2%10
syoulist.append(syou3)
syoulist.append(amari3)
flag = 0
for i in range(len(syoulist)-1):
    if syoulist[i]==syoulist[i+1]:
        flag+=1
    else:
        flag+=0

if flag>0:
    print("Bad")
else:
    print("Good")

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

struct Tree
{
    int p, start, end;
    bool isSearched;
    vector<int> v;
};

void DFS( Tree* t, int a, int& cnt )
{
    if( t[a].isSearched )
        return;

    t[a].isSearched = true;

    cnt++;
    t[a].start = cnt;

    for( int i = 0; i < t[a].v.size(); i++ )
        DFS( t, t[a].v[i], cnt );

    cnt++;
    t[a].end = cnt;
}


int main()
{
    int n, a, b, c;
    Tree t[101];

    for( int i = 0; i < 101; i++ )
    {
        t[i].p = -1;
        t[i].isSearched = false;
    }
    cin >> n;

    for( int i = 0; i < n; i++ )
    {
        cin >> a >> b;
        for( int j = 0; j < b; j++ )
        {
            cin >> c;
            t[a].v.push_back(c);
            t[c].p = a;
        }
    }

    int cnt = 0;
    for( int i = 1; i <= n; i++ )
            DFS( t, i, cnt );

    for( int i = 1; i <= n; i++ )
        cout << i << " " << t[i].start << " " << t[i].end << endl;

    return 0;
}


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

#if DEBUG
template <typename T>
void debug(const T& value) {
  std::cerr << value;
}
template <typename T, typename... Ts>
void debug(const T& value, const Ts&... args) {
  std::cerr << value << ", ";
  debug(args...);
}
#define dbg(...)                        \
  do {                                  \
    cerr << #__VA_ARGS__ << ": ";       \
    debug(__VA_ARGS__);                 \
    cerr << " (L" << __LINE__ << ")\n"; \
  } while (0)
#else
#define dbg(...)
#endif

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

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

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

using ll = long long;

template <typename T>
using V = std::vector<T>;
template <typename T>
using VV = V<V<T>>;

using namespace std;

int main() {
  rd(int, n);
  V<int> x(n);
  rep(i, n) cin >> x[i];
  V<int> sx = x;
  sort(all(sx));
  rep(i, n) {
    int l = n / 2 - 1;
    wt(x[i] <= sx[l] ? sx[l + 1] : sx[l]);
  }
}


Measured memory_bytes: 4840
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int[] L = new int[N];
        for (int i = 0; i < N; i++) {
            L[i] = sc.nextInt();
        }
        Arrays.sort(L);
        int sum = 0;
        for (int i = 0; i < N - 1; i++) {
            sum += L[i];
        }
        System.out.println(sum > L[N - 1] ? "Yes" : "No");
    }
}

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

int main(){
    int N;
    int a[110];
    int ave=0;
    cin >> N;
    for(int i=0; i<N; i++){
        cin >> a[i];
        ave+=a[i];
    }
    ave/=N;

    int sum1=0,sum2=0;
    for(int i=0; i<N; i++){
        sum1+=pow((a[i]-ave),2);
        sum2+=pow((a[i]-(ave+1)),2);
    }

    if(sum1<sum2){
        cout << sum1 << endl;
    }
    else cout << sum2 << endl;

    return 0;
}   

Measured memory_bytes: 3576
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, A;
  double d;
  cin >> N >> A;
  d = N / 500;
  if ( (N - d * 500) <= A)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}

Measured memory_bytes: 3628
import java.io.*
import java.util.*

fun solve(N: Int, A: IntArray, B: IntArray, C: IntArray){
    var ans = B[A[0] - 1]
    for (i in 1 until N){
        ans += B[A[i] - 1]
        if(A[i] == A[i-1] + 1) ans += C[A[i-1]-1]
    }
    println(ans)
    return
}


fun main(args: Array<String>) {
    fun StringArray(size: Int, init: (Int) -> String = { "\u0000" }): Array<String> {
        return Array<String>(size, init)
    }
    class Scanner(stream: InputStream) {
        private val reader = BufferedInputStream(stream).bufferedReader()
        private var st: StringTokenizer? = null
        fun next(): String {
            while (!(st?.hasMoreTokens() ?: false)) st = StringTokenizer(reader.readLine())
            return st!!.nextToken()
        }
    }
    val sc = Scanner(System.`in`)
    val N = sc.next().toInt()
    val A = IntArray(N)
    for (i in 0 until N) {
        A[i] = sc.next().toInt()
    }
    val B = IntArray(N)
    for (i in 0 until N) {
        B[i] = sc.next().toInt()
    }
    val C = IntArray((N-1))
    for (i in 0 until (N-1)) {
        C[i] = sc.next().toInt()
    }
    solve(N, A, B, C)
}



Measured memory_bytes: 31400
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
	int N;
	cin >> N;

	vector<long long> a(N);
	for(int i = 0; i < N; i++){
		cin >> a[i];
	}

	sort(a.begin(), a.end());

	auto count = 0;
	for(int i = 0; i < N; i++){
		if(a[i] == a[i + 1]){
			count = count + 1;
		}
	}

	if(count > 0){
		cout << "NO" << endl;
	} else {
		cout << "YES" << endl;
	}

	return 0;
}

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

using namespace std;
int main()
{
	int n;
	cin >> n;
	int m;
	cin >> m;
	vector<int>boxes(n);
	vector<int>size(n);
	for(int i=0;i<n;i++)
	{
		boxes[i] = 0;
		size[i] = 1;
	}
	boxes[0] = 1;
	for(int i = 0; i< m;i++)
	{
		int x;
		cin >> x;
		x -= 1;
		int y;
		cin >> y;
		y -= 1;
		if(boxes[x])
		{
			boxes[y] = 1;
			size[y] += 1;
			size[x] -= 1;
			if(size[x] == 0)
				boxes[x] = 0;
		}
		else if(size[x] > 0)
		{
			size[x] -= 1;
			size[y] += 1;
		}
	}
	int asw = 0;
	for(int i = 0; i < n; i++)
	{
		if(boxes[i])
			asw += 1;
	}
	cout << asw;
	return 0;
}


Measured memory_bytes: 1024
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<map>
#include<numeric>
#include<queue>
#include<string>
#include<sstream>

using namespace std;

int main(void) {

  int n, a, b, c, x;
  while(cin >> n >> a >> b >> c >> x){
    if( n == 0 ) break;
    vector<int> y(n);
    for(int i=0; i<n; i++) cin >> y[i];

    int p = 0;
    bool f = false;
    for(int i=0; i<=10000; i++){
      if( x == y[p] ) p++;
      if( p >= n ){
        cout << i << endl;
        // return 0;
        f = true;
        break;
      }
      if( f ) break;
      x = (a * x + b) % c;
    }
    if( !f ) cout << -1 << endl;

  }


  return 0;
}










//

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

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

  int n;
  string s;
  cin >> n >> s;
  vector<int> cnt(3);
  for (int i = 0; i < n; i++) {
    if (s[i] == 'R') cnt[0]++;
    else if (s[i] == 'G') cnt[1]++;
    else if (s[i] == 'B') cnt[2]++;
  }
  long long res = (long long)cnt[0] * cnt[1] * cnt[2];
  for (int i = 0; i < n - 2; i ++) {
    for (int j = i + 1; 2 * j - i < n; j++) {
      int k = 2 * j - i;
      res -= s[i] != s[j] && s[j] != s[k] && s[k] != s[i];
    }
  }
  cout << res << '\n';
  return 0;
}

Measured memory_bytes: 3636
n,a,b=map(int, input().split())
pot = b-a+1
if(b<a):
    print(0)
    exit()
if n==0:
    print(0)
elif n==1:
    if a==b:
        print(1)
    else:print(0)
elif n==2:
    if a==b:print(1)
    print(1)
else:
    k = n-1
    m = k*b
    high = m+a
    low = a*k + b
    print(high-low+1)


Measured memory_bytes: 38384
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 13 21:15:41 2019

@author: screamLab
"""

s = input()

ans = 0
for i in range(len(s)):
    if(s[0] == '1'):
        if(i%2 != 0):
            if(s[i]!='0'):
                ans += 1
        else:
            if(s[i] != '1'):
                ans+=1
    if(s[0] == '0'):
       if(i%2 != 0):
           if(s[i]!='1'):
               ans += 1
       else:
           if(s[i] != '0'):
               ans+=1          
if(len(s)==1):
    ans = 0
print(ans)
            

Measured memory_bytes: 3316
#include<bits/stdc++.h> 
using namespace std;
using ll=long long;
typedef pair<ll,ll> P;
#define fi first
#define se second
set<string> c;
map<ll,ll> mp;
const ll inf=100000000000000000;
const ll mod=1000000007;
const ll mod2=998244353;
ll gcd(ll a,ll b) {return b ? gcd(b,a%b):a;}
ll lcm(ll c,ll d){return c/gcd(c,d)*d;}
int n,m;
vector<vector<int>> graph;
vector<bool> used;
vector<int> ans;
void dfs(int s){
 ans.push_back(s+1);
 used.at(s)=false;
 for(int i=0;i<graph.at(s).size();i++){
     int v=graph.at(s).at(i);
     if(used.at(v))return dfs(v);
 }
 return;
}

int main(){
 cin>>n>>m;
graph.resize(n);
used.resize(n);
for(int i=0;i<n;i++)used.at(i)=true;
for(int i=0;i<m;i++){
   int a,b;
   cin>>a>>b;
   a--;b--;
   graph.at(a).push_back(b);
   graph.at(b).push_back(a);
}
dfs(0);
reverse(ans.begin(),ans.end());
 ans.pop_back();
 dfs(0);
    cout << ans.size() << endl;
    for(int i=0; i<ans.size(); i++){
        cout << ans.at(i)<< " ";
    }
    cout << endl;
}


Measured memory_bytes: 11128
import java.util.*;
import java.util.function.*;
import java.util.stream.*;

public class Main{
	Scanner s=new Scanner(System.in);

	void solve(){
		System.out.println(
				INTS(gInt()).allMatch(i->i%2==1||i%3==0||i%5==0)
				?"APPROVED":"DENIED");
	}

	public static void main(String[] A){
		new Main().solve();
	}

	int gInt(){
		return Integer.parseInt(s.next());
	}
	long gLong(){
		return Long.parseLong(s.next());
	}
	double gDouble(){
		return Double.parseDouble(s.next());
	}

	SupplyingIterator<Integer> ints(int n){
		return new SupplyingIterator<>(n,this::gInt);
	}
	SupplyingIterator<Long> longs(int n){
		return new SupplyingIterator<>(n,this::gLong);
	}
	SupplyingIterator<Double> doubles(int n){
		return new SupplyingIterator<>(n,this::gDouble);
	}
	SupplyingIterator<String> strs(int n){
		return new SupplyingIterator<>(n,s::next);
	}

	Range rep(int i){
		return Range.rep(i);
	}
	Range rep(int f,int t,int d){
		return Range.rep(f,t,d);
	}
	Range rep(int f,int t){
		return rep(f,t,1);
	}
	Range rrep(int f,int t){
		return rep(t,f,-1);
	}

	IntStream REP(int v){
		return IntStream.range(0,v);
	}
	IntStream REP(int l,int r){
		return IntStream.rangeClosed(l,r);
	}

	IntStream INTS(int n){
		return IntStream.generate(this::gInt).limit(n);
	}
	LongStream LONGS(int n){
		return LongStream.generate(this::gLong).limit(n);
	}
	Stream<String> STRS(int n){
		return Stream.generate(s::next).limit(n);
	}

}

class SupplyingIterator<T> implements Iterable<T>,Iterator<T>{
	int t;
	Supplier<T> supplier;

	SupplyingIterator(int t,Supplier<T> supplier){
		this.t=t;
		this.supplier=supplier;
	}

	@Override
	public Iterator<T> iterator(){
		return this;
	}

	@Override
	public boolean hasNext(){
		return t>0;
	}

	@Override
	public T next(){
		--t;
		return supplier.get();
	}

}

class Range implements Iterable<Integer>,PrimitiveIterator.OfInt{
	int to,cur,d;

	Range(int from,int to,int d){
		this.cur=from-d;
		this.to=to;
		this.d=d;
	}

	Range(int n){
		this(0,n-1,1);
	}

	@Override
	public Iterator<Integer> iterator(){
		return this;
	}

	@Override
	public boolean hasNext(){
		return cur+d==to||(cur!=to&&(cur<to==cur+d<to));
	}

	@Override
	public int nextInt(){
		return cur+=d;
	}
	static Range rep(int i){
		return new Range(i);
	}
	static Range rep(int f,int t,int d){
		return new Range(f,t,d);
	}
	static Range rep(int f,int t){
		return rep(f,t,1);
	}
	static Range rrep(int f,int t){
		return rep(f,t,-1);
	}
}


Measured memory_bytes: 26708
#include <stdio.h>
#include <iostream>
#include <string>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main()
{
    string text;
    cin >> text;

    int cnt = 0;
    int maxCnt = 0;
    rep (i, text.size()) {
        if (text[i] == 'R') {
            cnt += 1;
        }
        else {
            if (maxCnt < cnt) {
                maxCnt = cnt;
            }
            cnt = 0;
        }
    }
    if (maxCnt < cnt) {
        maxCnt = cnt;
    }

    cout << maxCnt << endl;

    return 0;
}

Measured memory_bytes: 3608
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		String s = sc.next();
		String ans[] = {s, "red"};
		int an = 0;
		sc.close();
		if(a < 3200)an = 1;
		System.out.println(ans[an]);
	}
}


Measured memory_bytes: 22612
#include <bits/stdc++.h>
#define rep3(i, s, n, a) for (int i = (s); i < (int)(n); i += a)
#define rep2(i, s, n) rep3(i, s, n, 1)
#define rep(i, n) rep2(i, 0, n)

using namespace std;
using ll = long long;
using ull = unsigned long long;
using P = pair<int, int>;

int main(){
    int h, w;
    cin >> h >> w;
    vector<vector<string>> s;
    rep(i, h){
        vector<string> tmp;
        rep(j, w){
            string x;
            cin >> x;
            tmp.push_back(x);
        }
        s.push_back(tmp);
    }
    rep(i, h){
        rep(j, w){
            if(s[i][j].size()==5){
                if(s[i][j]=="snuke"){
                    cout << (char)('A'+j) << i+1 << endl;
                    return 0;
                }
            }
        }
    }
    return 0;
}

Measured memory_bytes: 3540
#include <stdio.h>

int main() {

	int i;
	int j;
	int H;
	int W;

	while (true) {

		scanf("%d%d", &H, &W);

		if (H == 0 && W == 0) {
			break;
		}

		for (i = 0; i < H; i++) {

			for (j = 0; j < W; j++) {

				if (j == 0 || j == W-1 || i == 0 || i == H-1 ) {

					printf("#");

				}

				else {

					printf(".");

				}

			}

			printf("\n");

		}

printf("\n");
	}

	return 0;

} 


Measured memory_bytes: 2512
n, d = map(int, input().split())
p = [[int(j) for j in input().split()] for i in range(n)]
cnt = 0
for i in range(n):
    for j in range(i + 1, n):
        dist = 0
        for k in range(d):
            dist += (p[i][k] - p[j][k])**2
        if int(dist**0.5) == dist**0.5:
            cnt += 1
print(cnt)

Measured memory_bytes: 9460
s=input()
n=len(s)
for i in range(n):
    if s[i]!=s[n-i-1]:
        print("No")
        break
else:
    for i in range((n-1)//2):
        if s[i]!=s[(n-1)//2-1-i]:
            print("No")
            break
    else:
        for i in range((n+3)//2-1,n):
            if s[i]!=s[n-i+(n+3)//2-2]:
                print("No")
                break
        else:
            print("Yes")

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

using namespace std;
using LL = long long;

vector<LL> s, t;
int A, B;

LL calculate_dist(LL a, LL b, LL x);

bool it_valid(vector<LL>::iterator x, vector<LL>& a){
    int loc = x - a.begin();
    return loc >= 0 and loc < (int)a.size();
}

int main(){
    ios_base::sync_with_stdio(false); cin.tie(NULL);
    int T;
    cin >> A >> B >> T;
    s.resize(A); t.resize(B);
    for (int i = 0; i < A; ++i){
        cin >> s[i];
    }
    for (int i = 0; i < B; ++i){
        cin >> t[i];
    }
    LL x;
    LL ans;
    int ds[4] = {1, 0, 1, 0}; // 1 indicates west
    int dt[4] = {0, 1, 1, 0}; // 0 indicates east
    vector<LL>::iterator cls, clt;
    while(T--){
        ans = (1LL << 39);
        cin >> x;
        for (int i = 0; i < 4; ++i){
            cls = s.end(); clt = t.end();
            cls = lower_bound(s.begin(), s.end(), x) - ds[i];
            if (it_valid(cls, s)){
                clt = lower_bound(t.begin(), t.end(), *cls) - dt[i];
                if (it_valid(clt, t)){
                    ans = min(ans, calculate_dist(*cls, *clt, x));
                }
            }

            cls = s.end(); clt = t.end();
            clt = lower_bound(t.begin(), t.end(), x) - dt[i];
            if (it_valid(clt, t)){
                cls = lower_bound(s.begin(), s.end(), *clt) - ds[i];
                if (it_valid(cls, s)){
                    ans = min(ans, calculate_dist(*clt, *cls, x));
                }
            }
        }
        cout << ans << endl;
    }
    return 0;
}

LL calculate_dist(LL a, LL b, LL x){
    return abs(x - a) + abs(a - b);
}

Measured memory_bytes: 2944
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys
import string

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")


N, K = list(map(int, sys.stdin.readline().split()))
L = list(map(int, sys.stdin.readline().split()))
L.sort(reverse=True)
print(sum(L[:K]))



Measured memory_bytes: 13672
A,B,C=map(int,input().split())
if C<7*A+B:         #1週間目でおわる
    if  A*7<C and C<A*7+B: #実は1週目の日曜日に終わる
        print(7)
    else:    
        if C%A==0:          
            print(C//A)
        else:               #あまりがあったら＋１
            print(C//A+1) 
else:                       #2週間目以降
    if C%((7*A)+B)==0:              #日曜日に終わる
        print((C//((7*A)+B))*7)
    else :
        if C%((7*A)+B)>=7*A and C%((7*A)+B)<7*A+B: #実は日曜日に終わる
            print((C//((7*A)+B)+1)*7)
        else:
            if (C%((7*A)+B))%A==0 :
                print(((C//((7*A)+B))*7)+((C%((7*A)+B))//A))
            else:                       #余りがあったら+１
             print(((C//((7*A)+B))*7)+((C%((7*A)+B)))//A+1)
    


Measured memory_bytes: 5600
#include <stdio.h> 
#include <algorithm> 
#include <iostream> 
#include <string.h> 
#include <queue>
#include <stack>
#include <stdlib.h>
using namespace std;

stack<int> kuohao;

int main(){
    double a,k;
    cin>>a>>k;
    int c = 1 ;
    for(int i = 0 ; i < a ; i++){
        if (c <= k) c = c * 2;
        else c = c + k;
    }
    cout<<c<<endl;
    return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(void){
    int H,N,i=0,sum=0;
    scanf("%d %d\n",&H,&N);
    int a[N];
    for (i=0;i<N;i++){
        scanf("%d\n",&a[i]);
        sum += a[i];
    }
    if (sum>=H){
        printf("Yes");
    }else{
        printf("No");
    }
    return 0;
}



Measured memory_bytes: 512
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
// #define int long long
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPS(i, r, n) for (int i = (r); i < (n); ++i)
#define REPR(i, n) for(int i = (n); i >= 0; --i) // from n to 0
#define REPRS(i, r, n) for(int i = (n); i >= (r); --i) // from n to r
#define REPOBJ(itr, obj) for(auto itr = (obj).begin(); itr != (obj).end() ; ++itr)
#define REPROBJ(itr, obj) for(auto itr = (obj).rbegin(), e = (obj).rend(); itr != e; ++itr)
#define COUTB(x) cout << (x) << "\n"
#define COUTS(x) cout << (x) << " "
#define PB push_back
#define SORT(obj) sort((obj).begin(), (obj).end())
#define SORTR(obj) sort((obj).begin(), (obj).end(), greater<>())
#define ALL(obj) (obj).begin(), (obj).end()
#define MOD 1000000007
#define PI (acos(-1))

int lcm(int, int);
map<int,int> GetPrimeFactors(int);
bool IsPrime(int);
int Factorial(int);
int npr (int, int);
int ncr (int, int);


/***** MAIN *****/
void Main() {
  int nums[3][3];
  REP(i,3) {
    REP(j,3) {
      cin >> nums[i][j];
    }
  }
  int n;
  cin >> n;
  int calls[n];
  REP(i,n) {
    cin >> calls[i];
    REP(j,3) {
      REP(k,3) {
        if(nums[j][k] == calls[i]) nums[j][k] = 0;
      }
    }
  }
  bool flag = true;
  REP(i,3) {
    REP(j,3) {
      if(nums[i][j] != 0) {
        flag = false;
        break;
      }
    }
    if(flag) {
      cout << "Yes\n";
      return;
    }
    flag = true;
  }
  REP(i,3) {
    REP(j,3) {
      if(nums[j][i] != 0) {
        flag = false;
        break;
      }
    }
    if(flag) {
      cout << "Yes\n";
      return;
    }
    flag = true;
  }
  REP(i,3) {
    if(nums[i][i] != 0) {
      flag = false;
      break;
    }
  }
  if(flag) {
    cout << "Yes\n";
    return;
  }
  flag = true;
  REP(i,3) {
    if(nums[i][2-i] != 0) {
      flag = false;
      break;
    }
  }
  if(flag) {
    cout << "Yes\n";
    return;
  }
  cout << "No" << endl;

}
/***** MAIN *****/

signed main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  Main();
  return 0;
}

int lcm(int a, int b) { return a / __gcd(a,b) * b;}

map<int,int> GetPrimeFactors(int n) {
  map<int,int> mp;
  // dived by 2, 3, 5, ...
  for(int i=2; i*i<=n; i+=2) {
    if(i==4) i = 3;
    while(n%i == 0) {
      ++mp[i];
      n /= i;
    }
  }
  if(n!=1) ++mp[n];

  return mp;
}

bool IsPrime(int a) {
  if(a <= 1) return false;
  if(a == 2) return true;
  if(a%2 == 0) return false;
  for(int i = 3; i*i <= a; i+=2) {
    if(a%i==0) return false;
  }
  return true;
}

int Factorial(int n){
  int ans = 1;
  while(n > 1){
    ans *= n;
    --n;
  }
  return ans;
}

int npr(int n, int r) {
  return Factorial(n)/Factorial(n-r);
}

int ncr (int n, int r){
  return npr(n,r)/Factorial(r);
}


Measured memory_bytes: 256
a = input()
b = input()
c = len(a)
d = len(b)
if c>d:
    print('GREATER')
elif c<d:
    print('LESS')
else:
    for x, y in zip(a,b):
        if x<y:
            print('LESS')
            exit()
        if x>y:
            print('GREATER')
            exit()
    print('EQUAL')

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

long long INF = 1e18;

int main(){
    int h,a;
    cin>>h>>a;
    if(h%a == 0){
        cout<<h/a<<endl;
    }else{
        cout<<(h/a)+1<<endl;
    }
    return 0;
}

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

int dp[1000010][4];
int main()
{
    int n;
    cin >> n;
    int inp[n+10][10];

    for(int i=0;i<n;i++)
    {
        for(int j=0;j<3;j++)
            cin >> inp[i][j];
    }

    for(int i=0;i<n;++i)
    {
        for(int j=0;j<=2;++j)
        {
            if(j==0)
                dp[i][j]=max(dp[i-1][1],dp[i-1][2])+inp[i][0];
            else if(j==1)
                dp[i][j]=max(dp[i-1][0],dp[i-1][2])+inp[i][1];
            else if(j==2)
                dp[i][j]=max(dp[i-1][1],dp[i-1][0])+inp[i][2];
        }
    }

    cout<< max(dp[n-1][0],max(dp[n-1][1],dp[n-1][2]))<<endl;
}


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

int main ()
{
    int H, W;
    while(true) {
        cin >> H >> W;
        if(H == 0 && W == 0){
            break;
        }
        for(int i = 0; i < H; i++){
            for(int j = 0; j <W; j++){
                cout <<'#';
            }
            cout << endl;
        }
        cout << endl;
    }
}



Measured memory_bytes: 3088
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

const int INF = 1001001001;

int main(){
    int N, M;
    cin >> N >> M;
    vector<int> L(M), R(M), D(M);
    for(int i = 0; i < M; ++i){
        cin >> L[i] >> R[i] >> D[i];
        L[i]--;
        R[i]--;
    }
    vector<vector<P>> graph(N);     // (to, weight)
    vector<bool> used(N, false);
    vector<int> value(N, INF);
    
    for(int i = 0; i < M; ++i){
        graph[L[i]].push_back(P(R[i], D[i]));
        graph[R[i]].push_back(P(L[i], -D[i]));
    }

    // BFS  非連結の場合もあるのでループが必要
    for(int i = 0; i < N; ++i){
        if(used[i])     continue;
        
        queue<P> que;
        que.push(P(i, 0));
        
        while(!que.empty()){
            P p = que.front();
            que.pop();
            
            int point = p.first;
            int val = p.second;

            if(used[point]){
                if(value[point] != val){
                    cout << "No\n";
                    return 0;
                }
            }
            
            else{
                used[point] = true;
                value[point] = val;
                
                for(int j = 0; j < graph[point].size(); ++j){
                    int to = graph[point][j].first;
                    int weight = graph[point][j].second;
                    que.push(P(to, value[point] + weight));
                }
            }
        }
    }
    
    // 最後までいけばYes
    cout << "Yes\n";
}

Measured memory_bytes: 13556
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;

int main(void)
{
  int n,k,m;
  double a[1001], sum1, sum2, av, sg[1001];

  n = 1;
  m = 0;
  while(n > 0) {
    m = m + 1;
    cin >> n;
    sum1 = 0;
    sum2 = 0;
    for(k = 1; k <= n; k++){
      cin >> a[k];
      sum1 = sum1 + a[k];
      sum2 = sum2 + a[k]*a[k];
    }
    av = sum1/n;
    sg[m] = sqrt(sum2/n - av*av);
  }

  for(k = 1; k < m; k++){
    cout << fixed << setprecision(6) << sg[k] << endl;
  }     
  return 0;
}

Measured memory_bytes: 3296
#include <bits/stdc++.h>
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define RFOR(i,a,b) for (int i = (b)-1; i >= (a); --i)
#define rep(i,n) FOR(i,0,(n))
#define REPS(i,n) FOR(i,1,(n)+1)
#define RREP(i,n) RFOR(i,0,(n))
#define rng(x) (x).begin(),(x).end()
#define rrng(x) (x).rbegin(),(x).rend()
#define debug(x) cout << #x << " = " << (x) << endl;
#define SORT(x) sort(rng(x))
#define RSORT(x) sort(rrng(x))
#define SUM(x) accumulate(rng(x),0)
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define uni(x) x.erase(unique(rng(x)),x.end())
#define SP << " " <<
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
const int mod = 1000000007;
const double EPS = 1e-9;
const int INF = (1<<30)-1;
const ll INFLL = (1LL<<62)-1;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
//cout << fixed << setprecision(10);

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

ll gcd(ll a, ll b) { return b ? gcd(b,a%b) : a;}
ll lcm(ll a, ll b) { return a/gcd(a,b)*b;}

int main () {
  double a, b, x;
  cin >> a >> b >> x;
  double s0 = a*b/2;
  double s = x/a;
  double rad;
  if (s >= s0) {
    double h = 2*(a*b-s)/a;
    rad = atan2(h,a);
  }
  else {
    double w = 2*s/b;
    rad = atan2(b,w);
  }
  double deg = rad*180/M_PI;
  printf("%.10f\n", deg);
  return 0;
}

Measured memory_bytes: 256
//  LINK ZADATKA: http://arc081.contest.atcoder.jp/tasks/arc081_a

#include <queue>
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <complex>
#include <fstream>
#include <cstring>
#include <string>
#include <climits>

using namespace std;

typedef long long ll;
typedef complex<double> point;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector< vector<int> > vvi;


#define FOR(k,a,b) for(int k=(a); k<=(b); ++k)
#define REP(k,a) for(int k=0; k<(a);++k)
#define SZ(a) int((a).size())
#define ALL(c) (c).begin(),(c).end()
#define PB push_back
#define MP make_pair
#define INF 999999999
#define INFLONG 1000000000000000000
#define MOD 1000000007
#define MAX 100
#define ITERS 100
#define MAXM 200000
#define MAXN 1000000
#define _gcd __gcd
#define eps 1e-9

ll n;
int main(){
	
	scanf("%lld", &n);
	ll a; int ubaceno;
	map<ll,ll > v;
	pair<map<ll,ll >::iterator, bool> kek;
	REP(i, n){
		scanf("%lld", &a);
		kek = v.insert(MP(a, 1));
		
		if(kek.second == false){
			kek.first -> second++; 
		}
		//printf("%d %lld %lld\n", kek.second, kek.first -> first, kek.first -> second);
	}
	//sort(ALL(v));
	//reverse(ALL(v));
	ll sol = 1, brojac = 0;
	ll prvi, drugi;
	
	//for(map<ll,ll >::reverse_iterator it = v.rbegin(); it != v.rend(); it++) printf("%lld %lld\n", it -> first, it -> second);
	map<ll,ll >::reverse_iterator it = v.rbegin();
	while(it != v.rend()){
		if(it -> second >= 2){
			it -> second -= 2;
			sol *= it -> first;
			brojac++;	 
		} else it++;
		if(brojac == 2){
			printf("%lld\n", sol);
			return 0;
		}
	}
	printf("0\n");
	return 0;
}

Measured memory_bytes: 6528
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))

#################

S = str(input())
n = len(S)

for i in range(n):
    if S[i] != S[n-1-i]:
        print('No')
        exit()

for i in range((n-1)//2):
    if S[i] != S[(n-3)//2-i]:
        print('No')
        exit()

for i in range((n+1)//2,n):
    if S[i] != S[(3*n-1)//2-i]:
        print('No')
        exit()

print('Yes')

Measured memory_bytes: 38384
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>

using namespace std;

int main() {
	string o, e;
	cin >> o >> e;

	string password;
	for (int i = 0; i < o.size(); i++) {
		password += o[i];
		if (i < e.size()) {
			password += e[i];
		}
	}

	cout << password << endl;
	return 0;
}


Measured memory_bytes: 256
#![allow(non_snake_case)]
use proconio::input;

fn main() {
    input!(mut A: i32, B: i32, mut C: i32, D: i32);
    let mut t = 0;
    loop {
        if t == 0 {
            C -= B;
            if C <= 0 {
                println!("Yes");
                break
            }
        } else {
            A -= D;
            if A <= 0 {
                println!("No");
                break
            }
        }
        t = 1 - t
    }
}

Measured memory_bytes: 2152
#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;
int A[3030];
ll memo[3030][3030];

ll dp(int L,int R) {
	if(R<=L) return 0;
	if(memo[L][R]!=1LL<<60) return memo[L][R];
	if(L+1==R) return A[L];
	
	return memo[L][R]=max(A[L]-dp(L+1,R),A[R-1]-dp(L,R-1));
}

void solve() {
	int i,j,k,l,r,x,y; string s;
	
	cin>>N;
	FOR(i,N) cin>>A[i];
	FOR(x,N+1) FOR(y,N+1) memo[x][y]=1LL<<60;
	
	cout<<dp(0,N)<<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);
	cout.tie(0); solve(); return 0;
}


Measured memory_bytes: 72064
macro_rules ! input { ( source = $ s : expr , $ ( $ r : tt ) * ) => { let mut iter = $ s . split_whitespace ( ) ; input_inner ! { iter , $ ( $ r ) * } } ; ( iter = $ iter : ident , $ ( $ r : tt ) * ) => { let s = { use std :: io :: Read ; let mut s = String :: new ( ) ; std :: io :: stdin ( ) . read_to_string ( & mut s ) . unwrap ( ) ; s } ; let mut $ iter = s . split_whitespace ( ) ; input_inner ! { $ iter , $ ( $ r ) * } } ; ( $ ( $ r : tt ) * ) => { let s = { use std :: io :: Read ; let mut s = String :: new ( ) ; std :: io :: stdin ( ) . read_to_string ( & mut s ) . unwrap ( ) ; s } ; let mut iter = s . split_whitespace ( ) ; input_inner ! { iter , $ ( $ r ) * } } ; }
macro_rules ! input_inner { ( $ iter : expr ) => { } ; ( $ iter : expr , ) => { } ; ( $ iter : expr , mut $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let mut $ var = read_value ! ( $ iter , $ t ) ; input_inner ! { $ iter $ ( $ r ) * } } ; ( $ iter : expr , mut $ var : ident $ ( $ r : tt ) * ) => { input_inner ! { $ iter , mut $ var : usize $ ( $ r ) * } } ; ( $ iter : expr , $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let $ var = read_value ! ( $ iter , $ t ) ; input_inner ! { $ iter $ ( $ r ) * } } ; ( $ iter : expr , $ var : ident $ ( $ r : tt ) * ) => { input_inner ! { $ iter , $ var : usize $ ( $ r ) * } } ; }
macro_rules ! read_value { ( $ iter : expr , ( $ ( $ t : tt ) ,* ) ) => { ( $ ( read_value ! ( $ iter , $ t ) ) ,* ) } ; ( $ iter : expr , [ $ t : tt ; $ len : expr ] ) => { ( 0 ..$ len ) . map ( | _ | read_value ! ( $ iter , $ t ) ) . collect ::< Vec < _ >> ( ) } ; ( $ iter : expr , { chars : $ base : expr } ) => { read_value ! ( $ iter , String ) . chars ( ) . map ( | c | ( c as u8 - $ base as u8 ) as usize ) . collect ::< Vec < usize >> ( ) } ; ( $ iter : expr , { char : $ base : expr } ) => { read_value ! ( $ iter , { chars : $ base } ) [ 0 ] } ; ( $ iter : expr , chars ) => { read_value ! ( $ iter , String ) . chars ( ) . collect ::< Vec < char >> ( ) } ; ( $ iter : expr , char ) => { read_value ! ( $ iter , chars ) [ 0 ] } ; ( $ iter : expr , usize1 ) => { read_value ! ( $ iter , usize ) - 1 } ; ( $ iter : expr , $ t : ty ) => { $ iter . next ( ) . unwrap ( ) . parse ::<$ t > ( ) . unwrap ( ) } ; }
fn solve(x: Vec<bool>) -> bool {
    let n = x.len();
    let mut tb = vec![0; n + 1];
    let mut ans = false;
    for i in 1..n + 1 {
        let mut m = 0;
        let mut j = i;
        while j > 0 && j & 1 == 0 {
            j /= 2;
            m += 1;
        }
        tb[i] = tb[i - 1] + m;
    }
    for i in 0..n {
        if x[i] {
            let mut z = 0;
            z += tb[n - 1];
            z -= tb[i];
            z -= tb[n - 1 - i];
            if z == 0 {
                ans ^= true;
            }
        }
    }
    ans
}
fn main() {
    input! { _n, x: {chars: '1'} };
    let ans = if x.iter().all(|&y| y != 1) {
        if solve(x.iter().map(|&y| y == 2).collect::<Vec<_>>()) {
            2
        } else {
            0
        }
    } else {
        if solve(x.iter().map(|&y| y == 1).collect::<Vec<_>>()) {
            1
        } else {
            0
        }
    };
    println!("{}", ans);
}


Measured memory_bytes: 20732
h, w = gets.split.map(&:to_i)
s = Array.new(h) { gets.chomp.chars.map! { |c| c == "#" } }

line_prev = Array.new(w, false)
t = Array.new(w, 999999)
t[0] = 0

s.each do |line|
  left = false
  t__l = 999999

  line.each_with_index do |b, i|
    from_top  = t[i] + (b ^ line_prev[i] ? 1 : 0)
    from_left = t__l + (b ^ left ? 1 : 0)
    t__l = t[i] = [from_top, from_left].min
    left = b
  end
  
  line_prev = line
end

puts (t.last + 1) / 2

load __FILE__ unless $stdin.eof?


Measured memory_bytes: 1916
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <queue>
#include <fstream>
#include <string>
#include <math.h>
#include <set>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
//typedef pair<ll, P> T;

#define rep(i, n) for (ll i = 0; i < (n); i++)
#define revrep(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define f first
#define s second
#define pb push_back

ll mod = 1000000007;
const ll INF = 100000000000010000;

//ll bit[200010];
//ll kai[3010];

//void pres(double A, ll x = 20) { printf("%.20f\n", x); }

/*ll sum(ll i)
{
	i += 1;
	ll t = 0;
	while (i > 0)
	{
		t += bit[i];
		i -= i & -i;
	}
	return t;
}

void update(ll i, ll x)
{
	i += 1;
	while (i <= 200005)
	{
		bit[i] += x;
		i += i & -i;
	}
}*/

/*`ll SAIKI(ll S) {
	for (ll T = S; ; T = (T - 1) & S) {

	}
}*/

void test() {
	cout << "888888888888888888888888" << endl;
}

ll gcd(ll x, ll y) {
	if (y == 0) return x;
	return gcd(y, x % y);
}

ll pow_mod(ll x, ll y) {
	if (y == 0) return 1;
	if (y % 2 == 1) {
		return x * pow_mod(x, y - 1) % mod;
	}
	else {
		ll half = pow_mod(x, y / 2);
		return half * half % mod;
	}
}

ll div_mod(ll x) {
	return pow_mod(x, mod - 2);
}

/*ll com(ll x, ll y) {
	return kai[x] * div_mod(kai[y] * kai[x - y] % mod) % mod;
	//毎回オーダーlog(n)かかる
}*/

/*void kaijo() {
	kai[0] = 1;
	for (ll i = 1; i <= 3004; i++) {
		kai[i] = kai[i - 1] * i % mod;
	}
}*/

ll N, M, ans;
ll A[100010];
priority_queue<ll> que;

void solve() {
	cin >> N >> M;
	rep(i, N) {
		cin >> A[i];
		que.push(A[i]);
	}
	rep(i, M) {
		ll val = que.top() / 2;
		que.pop(); que.push(val);
	}
	while (que.size()) {
		ans += que.top();
		que.pop();
	}
	cout << ans << endl;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	solve();
	ll N;
	cin >> N;
}


Measured memory_bytes: 1912
def dijkstra_heap(graph: list, s: int, V: int=None):
    """
    :param graph: - adjacency list [(v, w), ...]:
    :param s: start
    :param V: number of vertices
    :return: dist, pred
    """
    import heapq

    pq = []
    INF = float("inf")

    if V is None:
        V = len(graph)

    dist = [INF] * V
    pred = [-1] * V

    dist[s] = 0

    heapq.heappush(pq, (0, s))

    while pq:
        d, u = heapq.heappop(pq)
        if d > dist[u]:
            continue

        for v, w in graph[u]:
            new_dist = dist[u] + w
            if new_dist < dist[v]:
                heapq.heappush(pq, (new_dist, v))
                dist[v] = new_dist
                pred[v] = u
    return dist, pred


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

    dist, pred = dijkstra_heap(G, 0)
    # print(dist)

    ans = [0] * N
    for u, d in enumerate(dist):
        ans[u] = 0 if d%2==0 else 1

    for c in ans:
        print(c)


if __name__ == '__main__':
    main()

Measured memory_bytes: 44452
#include<bits/stdc++.h>
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* 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)) + ")";
}

#define ar array<ll, 2>
#define ll long long
#define in insert
#define pb push_back
#define vt vector
#define P_Q(x) priority_queue<x>
#define p_q(x) priority_queue<x, vector<x>, greater<x>>
#define For(i, n) for(int i = 0; i < n; i++)
#define Rev(i, n) for(int i = n-1; i >= 0; i--)
#define FOR(i, n) for(int i = 1; i <= n; i++) 
#define REV(i, n) for(int i = n; i >= 1; i--)
#define Rep(i,a,b) for(int i = a; i <= b; i++)
#define all(x) (x).begin(),(x).end()
#define sz(x) (int) (x).size()

#define CERR cout
// #define CERR cerr
 
void debug_out() { CERR << endl; }
 
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  CERR << " " << to_string(H);
  debug_out(T...);
}
 
#ifndef ONLINE_JUDGE
#define dbg(...) CERR << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define dbg(...) 42
#endif
 
const ll mod = 1e9L + 7;
const ll INF = 1e18L + 5;
const ll mxN = 2e5 + 1;
ll n;
vt<ll> a;
// string s;

void solve()
{
    ll d, t, s;
    cin >> d >> t >> s;
    cout << (s*t >= d ? "Yes" : "No");
}
 
int main()
{

#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    
    ios::sync_with_stdio(0);  cin.tie(0);
    ll t = 1;
    // cin >> t;

    while(t--)
    {
        solve();
    } 
    return 0;
}

Measured memory_bytes: 3596
W, H, N = map(int, input().split())
area = [[1] * W for i in range(H)]
for n in range(N):
  x, y, a = map(int, input().split())
  for i in range(len(area)):
      for j in range(len(area[i])):
        if a == 1 and j <= x - 1:
          area[i][j] = 0
        elif a == 2 and j > x - 1:
          area[i][j] = 0
        elif a == 3 and i <= y - 1:
          area[i][j] = 0
        elif a == 4 and i > y - 1:
          area[i][j] = 0
# print(area)
answer = 0
for row in area:
  answer += sum(row)
print(answer)


Measured memory_bytes: 3064
#include<bits/stdc++.h>
using namespace std;
int n,m;
int a;
int main()
{
	int ans=0;
	cin>>n>>m;
	for(int i=1;i<=n;i++)
	{
		cin>>a;
		if(a>=m)
		ans++;
	}
	cout<<ans;
}

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

int main(){
  int i,n;
  cin >> n;
  long long l[87];
  i = 2;
  l[0]=2;
  l[1]=1;
  while(i<=n){
    l[i]=l[i-1]+l[i-2];
    i++;
  }

  cout << l[n] << endl;
  return 0;
}


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

using namespace std;

const int MOD = 1000000007;

// 6 1
// 3

int main() {
  int n, m;
  scanf("%d %d", &n, &m);

  int a[100009];
  for (int i = 1; i <= n; i++) {
    int broken;
    scanf("%d", &broken);
    a[broken] = 1;
  }

  int dp[100009];

  dp[0] = 1;

  for (int i = 1; i <= n; i++) {
    if (a[i]) {
      dp[i] = 0;
    } else {
      if (i >= 2) {
        dp[i] = dp[i - 1] + dp[i - 2];
      } else {
        dp[i] = dp[i - 1];
      }
      dp[i] = dp[i] % MOD;
    }
  }

  cout << dp[n] << endl;
}


Measured memory_bytes: 1024
#include <string>
#include <iostream>
using namespace std;
int n; string s;
int check() {
	if(s.size() < 6) return 0;
	if(s[0] != '>') return 0;
	if(s[1] == '\'') {
		int cnt = 0, cntp = 0;
		for(int i = 2; i < s.size() - 1; i++) {
			if(s[i] != '=') break;
			cnt++; cntp++;
		}
		if(s[2 + cnt] != '#') return 0;
		for(int i = cnt + 3; i < s.size(); i++) {
			if(s[i] != '=') break;
			cnt--; cntp++;
		}
		if(cnt) return 0;
		if(2 + cntp + 2 != s.size()) return 0;
		return (s[2 + cntp + 1] == '~' ? 1 : 0);
	}
	if(s[1] == '^') {
		int cnt = 0;
		for(int i = 2; i < s.size() - 2; i += 2) {
			if(s[i] != 'Q' || s[i + 1] != '=') break;
			cnt += 2;
		}
		if(cnt + 4 != s.size()) return 0;
		return ((s[cnt + 2] == '~' && s[cnt + 3] == '~') ? 2 : 0);
	}
	return 0;
}
int main() {
	scanf("%d", &n);
	for(int i = 0; i < n; i++) {
		cin >> s;
		int r = check();
		if(r == 0) cout << "NA" << endl;
		if(r == 1) cout << "A" << endl;
		if(r == 2) cout << "B" << endl;
	}
	return 0;
}

Measured memory_bytes: 3196
#include<bits/stdc++.h>
using namespace std;
typedef long long L;
int main()
{
	L x;
	cin>>x;
	L sm=0;
	while(x>=500) 
	{
		x-=500;
		sm+=1000;
	}
	while(x>=5)
	{
		x-=5;
		sm+=5;
	}
	cout<<sm;
	return 0;
}

Measured memory_bytes: 256
s = int(input())
mod = 10**9 + 7

dp = [0]*(s+1)
dp[0] = 1

x = 0
for i in range(1,s+1):
    if i-3 >= 0:
        x += dp[i-3]
        x %= mod
    dp[i] = x
    
print(dp[s])

Measured memory_bytes: 9152
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<string.h>
#include<stdbool.h>
typedef long long ll;
typedef long double ld;
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k))
#define rrep(i,l,r)for(ll i=(l);i>=(r);i--)
#define INF (1LL<<60)
#define MOD1 1000000007
#define MOD2 998244353
#define MAX_N (1 << 17)
#define YES printf("Yes\n")
#define NO printf("No\n")
#define PN printf("\n")

void swap(ll *a, ll *b){ll c;c=*b;*b=*a;*a=c;}
ll max2(ll a,ll b){return a>=b?a:b;}
ll min2(ll a,ll b){return a>=b?b:a;}
ll min3(ll a, ll b, ll c){return (a<=b && a<=c) ? a : b<=c ? b : c;}
ll max3(ll a, ll b, ll c){return (a>=b && a>=c) ? a : b>=c ? b : c;}
ll minn(ll n, ll a[n]){ll b=INF;rep(i,0,n) b=min2(b,a[i]);return b;}
ll maxn(ll n, ll a[n]){ll b=-INF;rep(i,0,n) b=max2(b,a[i]);return b;}
ll ABS(ll a){return a>=0?a:(-a);}
ll POW(ll a, ll b){ll c=1;rep(i,0,b) c*=a;return c;}
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
ll mod(ll n){return n%=MOD1;}
int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;}
int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;}
void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);}
void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);}

typedef struct{ ll a , b;}fr;
int cmp1( const void *p, const void *q ) { return ((fr*)p) ->a - ((fr*)q)->a;}
int cmp2( const void *p, const void *q ) { return ((fr*)q) ->a - ((fr*)p)->a;}
void strsortup(fr*a,int n){qsort(a,n,sizeof(fr),cmp1);}
void strsortdown(fr*a,int n){qsort(a,n,sizeof(fr),cmp2);}

int main(void){
    // char ;
    ll n,ans=0;
    scanf("%lld",&n);
    ll a[n+1],b[n];
    rep(i,0,n+1){
        scanf("%lld",&a[i]);
    }
    rep(i,0,n){
        scanf("%lld",&b[i]);
    }
    ll rest=0;
    rep(i,0,n){
        ans+=min2(rest,a[i]);
        a[i]-=min2(a[i],rest);
        rest=0;

        ans+=min2(a[i],b[i]);
        rest=max2(0,b[i]-a[i]);
    }
    
    ans+=min2(a[n],rest);
    printf("%lld\n",ans);
    return 0;
}


Measured memory_bytes: 1664
#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;

char s[maxn];
int a[5];

int main() {
    scanf("%s",s);
    int ls = strlen(s);
    for(int i=0;i<ls;i++) {
        a[s[i]-'a']++;
    }
    sort(a,a+3);
    if(a[0] == a[1] && a[1] == a[2]) puts("YES");
    else if(a[0] == a[1]-1 && a[1] == a[2]) puts("YES");
    else if(a[0]==a[1] && a[1] == a[2]-1) puts("YES");
    else puts("NO");
    return 0;
}

Measured memory_bytes: 384