akhauriyash/Code-Regression huggingface dataset:
#include<stdio.h>
int main(void){

	int n,m,flag;
	int i,j;
	char ah[70],bh[70],jo;

	while(1){
		scanf("%d ",&n);
		if(!n) break;
		for(i=0;i<n;i++){
			scanf("%c %c ",&ah[i],&bh[i]);
		}
		scanf("%d ",&m);
		for(i=0;i<m;i++){
			scanf("%c ",&jo);
			flag=0;
			for(j=0;j<n;j++){
				if(jo==ah[j]){
					printf("%c",bh[j]);
					flag=1;
					break;
				}
			}
			if(!flag) printf("%c",jo);
		}
		printf("\n");
	}
	return 0;
}

Measured memory_bytes: 576
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define erep(i, n) for (ll i = 0; i <= (ll)(n); ++i)
#define FOR(i,a,b) for (ll i = (a); i < (ll)(b); ++i)
#define EFOR(i,a,b) for (ll i = (a); i <= (ll)(b); ++i)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } }


struct Edge {
    ll to;
    ll weight;
    Edge(ll t, ll w) : to(t), weight(w) { }
};
using Graph = vector<vector<Edge>>;
using P = pair<ll, ll>;


typedef vector<vector<int> > Matrix;

const int INF = 100000000;
Matrix d;

void warshall_floyd(int n) { // nは頂点数
    for (int i = 0; i < n; i++)      // 経由する頂点
        for (int j = 0; j < n; j++)    // 開始頂点
            for (int k = 0; k < n; k++)  // 終端
                d[j][k] = min(d[j][k], d[j][i] + d[i][k]);
}

ll modnum = 1e9+7;

int main() {
    ll n,x; cin >> n >> x;
    vector<ll> a(n);
    rep(i, n) cin >> a[i];

    // 左から
    ll ans = 0;
    ll prev = 0;
    rep(i, n) {
        if(i == 0 && a[i] > x) {
            ans += a[i]-x;
            prev = x;
            continue;
        }
        if(prev + a[i] > x) {
            ans += (prev + a[i]) - x;
            prev = x - prev;
        } else {
            prev = a[i];
        }
    }

    cout << ans << endl;

    return 0;
}



Measured memory_bytes: 1024
/* Date: 01/04/2020
 * Author: @codingoo
 * Problem Name: Rounding
 * Platform: AtCoder
 */
#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) x.begin(), x.end()
#define endl "\n"
#define sz(x) (int)(x).size()
using namespace std;
typedef long long int lli;
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;

int main() {
    int x, a;
    cin >> x >> a;
    if (x < a)
        cout << "0";
    else
        cout << "10";
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin>>s;
  int ichi=0;
  int zero=0;
  for(int i=0;i<s.size();i++){
    if(s[i]=='0')zero++;
    else ichi++;
  }
  int kotae=2*min(ichi,zero);
  cout<<kotae<<endl;
  return 0;
}


Measured memory_bytes: 512
#include<bits/stdc++.h>
using namespace std;
int n;
vector<int> num;
int main()
{
	cin>>n;
	for(int i=0;i<n*2;i++)
	{
		int x;
		cin>>x;
		num.push_back(x);
	}
	sort(num.begin(),num.end());
	int ans=0;
	for(int i=0;i<n*2-1;i+=2)
		ans+=min(num[i],num[i+1]);
	cout<<ans<<endl;
	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);
		int A = sc.nextInt();
		int B = sc.nextInt();
		int K = sc.nextInt();

		ArrayList<Integer> ary = new ArrayList<Integer>();

		for (int i = 1; i < 101; i++) {
			if (A % i == 0 && B % i == 0) {
				ary.add(i);
			}
		}

		System.out.println(ary.get(ary.size() - K));

	}
}


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

#define pb     push_back
#define mp     make_pair
#define all(v) v.begin() , v.end()
#define allr(v) v.rbegin(), v.rend()
const ll INF =  0x3f3f3f3f;
const int MOD = 1e9+7;
const int MAX = 1e5+5;

string s;
ll n;
vector<int> occ(30, 0);

int main(int argc, char const *argv[])
{
  ios_base::sync_with_stdio(false);
    cin >> s;
  n = s.size();
  for(int i = 0 ; i < n ; i++)
  	occ[s[i] - 'a']++;
  ll ans = 1 + (n*(n-1)) / 2;
  ll temp = 0;
  for(int i = 0 ; i < 26 ; i++){
  	ll z = occ[i];
  	temp = temp + (z*(z - 1)) / 2;
  }
  ans = ans - temp;
  cout << ans;

  return 0;
}  

Measured memory_bytes: 720
/*input
1
1

*/
 
/*
                                                    ______________
                                                          |       )
                                                          |   )   /
                                                          |______/
                                                    |     |      \
                                                    |     |   )   \
                                                    |_____|_______)
 
*/
#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 <queue>
#include <bitset>
#include <iomanip>
#include <fstream>
#include <stack>

using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> PII;
typedef pair<ll , ll> PLL;
typedef long double ld;
 
#define pb push_back
#define all(c) c.begin(),c.end()
#define allr(c) c.rbegin(),c.rend()
int mod = 1000000007;
const int inf = 1034567891;
const ll LL_INF = 1234567890123456789ll;
#define PI 3.14159265
#define endl '\n'
#define F first
#define S second
#define debug(x) cout << #x << " = " << x << endl;
#define TRACE
 
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
  cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
  const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif
 
#define out(container) for (auto it : container) cout << it << " "; cout << endl;
 
 
template < typename T > T GCD(T a, T b)            { ll t; while(a) { t = a; a = b % a; b = t; } return b; }
template < typename T > string toString(T a)       { return to_string(a); }
template < typename T > void toInt(string s, T &x) { stringstream str(s); str >> x;}
inline int add(int x, int y){ x += y; if(x >= mod) x -= mod; return x;}
inline int sub(int x, int y){ x -= y; if(x < 0) x += mod; return x;}
inline int mul(int x, int y){ return (x * 1ll * y) % mod;}
inline int powr(int a, ll b){
  int x = 1 % mod;
  while(b){
    if(b & 1) x = mul(x, a);
    a = mul(a, a);
    b >>= 1;
  }
  return x;
}
inline int inv(int a){ return powr(a, mod - 2);}

int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  
  int x;
  cin >> x;
  if (x >= 1800) {
    cout << 1 << endl;
  } else if (x >= 1600) {
    cout << 2 << endl;
  } else if (x >= 1400) {
    cout << 3 << endl;
  } else if (x >= 1200) {
    cout << 4 << endl;
  } else if (x >= 1000) {
    cout << 5 << endl;
  } else if (x >= 800) {
    cout << 6 << endl;
  } else if (x >= 600) {
    cout << 7 << endl;
  } else {
    cout << 8 << endl;
  }

  return 0;
}

Measured memory_bytes: 3636
#include <bits/stdc++.h>
using namespace std;
#define SELECTER(_1, _2, _3, SELECT, ...) SELECT
#define REP1(i, n) for(int (i)=0; (i)<(n); (i)++)
#define REP2(i, a, b) for(int (i)=(a); (i)<(b); (i)++)
#define REP(...) SELECTER(__VA_ARGS__, REP2, REP1,) (__VA_ARGS__)
#define MOD 1'000'000'007

template <class T> ostream& operator<<(ostream& os, const vector<T>& v){ os << "{"; for(size_t i=0; i<v.size(); i++) os << v[i] << (i+1==v.size() ? "" : ", "); os << "}"; return os; }
template <class T, class U> ostream& operator<<(ostream& os, const pair<T, U>& p){ return os << "{" << p.first << ", " << p.second << "}"; }

int main(){
    int N;
    cin >> N;
    vector<string> S(N);
    REP(i, N) cin >> S[i];
    set<string> st;
    REP(i, N) st.insert(S[i]);
    cout << st.size() << endl;
    return 0;
}


Measured memory_bytes: 25016
object Main extends App {
  val s: String = io.StdIn.readLine()
  val inds: Seq[Int] = Seq.range(1, s.length+1).filter(_ % 2 == 1)
  val ret: Seq[Char] = for (i <- inds) yield s.charAt(i-1)
  println(ret.mkString)
}

Measured memory_bytes: 39264
#include "bits/stdc++.h"
using namespace std;

int main() {
	int N;
	cin >> N;
	vector<vector<int>> data(10, vector<int>(10));
	for (int n = 1;n <= N;++n) {
		int zzz = n%10;
		int tmpn = n;
		while (10 <= tmpn) {
			tmpn /= 10;
		}
		int aaa = tmpn;
		data[aaa][zzz]++; 
		//cout << aaa << "_"<<zzz<<endl;
	}
	int ans = 0;
	for (int n = 0;n < 10;++n) {
		for (int m = 0;m < 10;++m) {
			//cout << n << "_"<<m<<"_"<<data[n][m] * data[m][n]<<endl;
			ans +=  data[n][m] * data[m][n];
		}
	}
	cout << ans<<endl;
}

Measured memory_bytes: 3572
/*
 * 17-1-7_ABC051_C.cpp
 *
 *  Created on: 2017/01/07
 *      Author: ryoma
 */

#include<iostream>
#include<algorithm>
#include<string>

using namespace std;

int sx, sy, tx, ty;
string S;
int main() {
	cin >> sx >> sy >> tx >> ty;
	for (int i = sy + 1; i <= ty; i++) {
		S += 'U';
	}
	for (int i = sx + 1; i <= tx; i++) {
		S += 'R';
	}
	for (int i = ty - 1; i >= sy; i--) {
		S += 'D';
	}
	for (int i = tx - 1; i >= sx; i--) {
		S += 'L';
	}
	S += 'L';
	for (int i = sy + 1; i <= ty + 1; i++) {
		S += 'U';
	}
	for (int i = sx; i <= tx; i++) {
		S += 'R';
	}
	S += 'D';
	S += 'R';
	for (int i = ty - 1; i >= sy - 1; i--) {
		S += 'D';
	}
	for (int i = tx; i >= sx; i--) {
		S += 'L';
	}
	S += 'U';
	cout << S << endl;
	return 0;
}



Measured memory_bytes: 256
#include <cstdio>

int main()
{
    int a, b, c;
    scanf("%d %d %d", &a, &b, &c);
    if (a == 5 and b==5 and c == 7)
    {
    	printf("YES");
	}
	else if (b == 5 and c == 5 and a == 7)
	{
		printf("YES");
	}
	else if (c == 5 and a == 5 and b == 7)
	{
		printf("YES");
	}
	else 
	{
		printf("NO");
	}
}



Measured memory_bytes: 1736
#include <bits/stdc++.h>
#include <string>
#include <cmath>
using namespace std;
int main()
{
    int ans, h1, m1, h2, m2, k;
    cin >> h1 >> m1 >> h2 >> m2 >> k;
    ans = (h2 - h1) * 60;
    ans += m2 - m1;
    ans -= k;

    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 3592
def get_i() #空白区切の入力を数値(整数)の配列で返す
  return gets.chomp.split(" ").map(&:to_i)
end
def get_f() #空白区切の入力を数値(実数)の配列で返す
  return gets.chomp.split(" ").map(&:to_f)
end
def get() #空白区切の入力を文字列の配列で返す
  return gets.chomp.split(" ")
end
def get_nsp() #入力されたものを一文字ずつに区切った文字列の配列で返す
  return gets.chomp.split("")
end
def yn_judge(bool,y="Yes",n="No") #boolに真偽を投げることで、trueならy、falseならnの値を出力する
  return bool ? y : n 
end
def array(size1,init=nil,size2=-1) #size2に二次元配列時の最初の要素数、size1に次の配列の大きさ、initに初期値を投げることでその配列を返す
  if size2==-1
    return Array.new(size1){init}
  else
    return Array.new(size2){Array.new(size1){init}}
  end
end

N,T=get_i
ct=array(N)
N.times do|i|
    ct[i]=get_i
end
ct.sort!{|x,y| x[1]<=>y[1]}
INF=Float::INFINITY
ans=INF
ct.each do|c,t|
  break if t>T
  ans=c if ans>c
end
if ans==INF
    puts "TLE"
else
    puts ans
end

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

using namespace std;

int main(void) {
    int n;
    string s, t;

    cin >> n;
    cin >> s >> t;
    for (int i = 0; i <= n; i++) {
        if (s.substr(i, n - i) != t.substr(0, n - i)) continue;
        cout << 2 * n - (n - i) << endl;
        break;
    }

    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;

void solve() {
    int N;
    cin >> N;
    vector<P> ranges, A(N), B(N);

    for(int i = 0; i < N; ++i) {
        int l, r;
        cin >> l >> r;
        ++r;
        ranges.emplace_back(l, r);
    }
    sort(ranges.begin(), ranges.end());

    A[0] = ranges[0];
    for(int i = 1; i < N; ++i) {
        A[i] = ranges[i];
        A[i].second = min(A[i].second, A[i - 1].second);
    }

    B[N - 1] = ranges[N - 1];
    for(int i = N - 2; i >= 0; --i) {
        B[i] = ranges[i];
        B[i].first = max(B[i].first, B[i + 1].first);
        B[i].second = min(B[i].second, B[i + 1].second);
    }

    int ans = 0;
    for(int i = 1; i < N - 1; ++i) {
        int l = max(A[i - 1].first, B[i + 1].first);
        int r = min(A[i - 1].second, B[i + 1].second);
        int score = ranges[i].second - ranges[i].first + max(0, r - l);
        ans = max(ans, score);
    }

    for(int i = 0; i < N - 1; ++i) {
        int scoreA = max(0, A[i].second - A[i].first);
        int scoreB = max(0, B[i + 1].second - B[i + 1].first);
        ans = max(ans, scoreA + scoreB);
    }

    cout << ans << '\n';
}

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


Measured memory_bytes: 2936
// nlather (Nishant Raj Lather)
// Chrollo_Lucifer

/* ------------------------------ TEMPLATE BEGIN ------------------------------ */

#include <bits/stdc++.h>
using namespace std;

/* ----------------- ORDERED SET (POLICY BASED DS) ----------------- */
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_set = tree
    <T, null_type, less<T>, rb_tree_tag, 
    tree_order_statistics_node_update>;

/* -------------- BETTER RANDOM (RAND() IS DANGEROUS) -------------- */
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
#define rnd(x, y) uniform_int_distribution<ll>(x, y)(rng)

/* ----------------- CUSTOM HASH FUNCTION FOR UMAP ----------------- */
struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }
    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = 
            chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};

/* ----------------------- DEBUGGING UTILITY ----------------------- */
#define cerr cout
void _print() {cerr << "]\n";}
template <typename T, typename... V> void _print(T t, V... v) {
    cerr << t; if(sizeof...(v)) cerr << ", "; _print(v...);
}
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)

#define boost ios_base::sync_with_stdio(false);cin.tie(nullptr);
#define rep(i, x, n) for (ll i = (ll)(x); i < (ll)(n); i++)
#define rrep(i, x, n) for (ll i = (ll)(x); i >= (ll)(n); i--)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define ff first
#define ss second
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define bs binary_search
#define minSelf(a, b) a = min(a, b)
#define maxSelf(a, b) a = max(a, b)
#define mem(arr, x) memset(arr, x, sizeof(arr))
using ll = long long int;
using ld = long double;
template <typename T, typename V> using P = pair<T, V>;
template <typename T> using V = vector<T>;
const ll MOD = 998244353;
const ll INF = 0x3f3f3f3f; // ~1e9 (1061109567)
const ld PI = 3.1415926535897932384626;
const ld EPS = 1e-9;
#define endl '\n' // REMOVE FOR INTERACTIVE TASKS
const ll MAX = 3e5+5;

/* ------------------------------- TEMPLATE END ------------------------------- */

void solve() {
    ld x;
    cin >> x;
    cout << fixed << setprecision(8) << (x/3)*(x/3)*(x/3) << endl;
}

int main() {
    boost
    ll t = 1;
    // cin >> t;
    while(t--) solve();
}


Measured memory_bytes: 256
import itertools
n , m = map(int,input().split())
sw = [[] for _ in range(m)]
for i in range(m):
    sw[i] = list(map(int,input().split()[1::]))
p = [int(x) for x in input().split()]
ans = 0

for tpl in itertools.product([0,1],repeat = n):
    bl = True
    for i in range(m):
        s = sum(tpl[s-1] for s in sw[i])
        if (s-p[i])%2 != 0:
            bl = False
            break
    if bl:
        ans +=1
print(ans)

Measured memory_bytes: 3188
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <math.h> // sqrt
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <iomanip> // setprecision
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vb = vector<bool>;
using vll = vector<long long>;
using pii = pair<int, int>;
using psi = pair<string, int>;

int main() {
    int N;
    string S;
    cin >> N >> S;
    ll r = 0, g = 0, b = 0;
    for (int i = 0; i < N; i++) {
        if (S[i] == 'R') {
            r++;
        }
        else if (S[i] == 'G') {
            g++;
        }
        else {
            b++;
        }
    }
    ll ans = r * g * b;
    for (int i = 0; i < N - 2; i++) {
        for (int j = i + 2; j < N; j += 2) {
            int k = (i + j) / 2;
            if (S[i] != S[j] && S[j] != S[k] && S[k] != S[i]) {
                ans--;
            }
        }
    }
    cout << ans << endl;
}

Measured memory_bytes: 3608
import math

n = int(input())
a = list(map(int, input().split()))

cnt = 0
prog = 1
for i in range(n):
	if i > 0:
		if a[i] == a[i-1]:
			prog += 1
		elif prog > 1:
			cnt += math.floor(prog/2)
			prog = 1
		if i == n-1 and prog > 1:
			cnt += math.floor(prog/2)
print(cnt)


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

#define pb push_back
#define fi first
#define se second
#define eb emplace_back

using namespace std;
typedef pair<int, int> ii;
typedef long long ll;

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    int n,m;cin>>n>>m;
    int s = 0;
    for(int i=0;i<m;++i) {
        int a;cin>>a;
        s += a;
    }

    if(s > n) cout << -1 << endl;
    else cout << n - s << endl;
}

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

int main() {
  int i, h, m, s;
  scanf("%d", &i);

  h = i / (60 * 60);
  m = (i % (60 * 60)) / 60;
  s = i % 60;

  cout << h << ":" << m << ":" << s << endl;
}


Measured memory_bytes: 3148
#include <iostream>

using namespace std;

int main() {
  int N, M;
  cin >> N >> M;

  int r = M / N, res = -1;
  while(true) {
    if (M % r == 0) {
      res = r;
      break;
    }
    r--;
  }

  cout << res << endl;

  return 0;
}

Measured memory_bytes: 256
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

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


n = int(input())
lines = sys.stdin.readlines()
edges = [ [] for _ in range(n+1) ]
for i in range(n-1):
    e = tuple(map(int, lines[i].split(" ")))
    log(e)
    edges[e[0]].append((e[1],e[2]))
    edges[e[1]].append((e[0],e[2]))

q,k = map(int, lines[n-1].split(" "))

ddd = [0] * (n+1)


que = deque()
que.append(k)
def bfs(x):
    for y, d in edges[x]:
        if ddd[y]:
            continue
        ddd[y] = ddd[x] + d
        que.append(y)


while que:
    bfs(que.pop())

for i in range(n, n+q):
    x, y = map(int, lines[i].split(" "))
    log(x,y)
    print(ddd[x] + ddd[y])


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

int main(){
	int n;cin>>n;
	for(double i=1;i<=n;i++){
		int now=(i*1.08);
		if(now==n){
			cout<<int(i)<<endl;
			return 0;
		}
	}
	cout<<":("<<endl;
	return 0;
}

Measured memory_bytes: 3632
import java.util.*;

public class Main {

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

		int N = in.nextInt();
		int[][] nums = new int[2][N];
		long answer = 0;
		
		for (int a = 0; a < 2; a++) {
			for (int i = 0; i < N; i++) {
				nums[a][i] = in.nextInt();
			}
		}
		
		for (int i = 0; i < N; i++) {
			long temp = 0;
			for (int j = 0; j <= i; j++) {
				temp += nums[0][j];
			}
			for (int j = i; j < N; j++) {
				temp += nums[1][j];
			}
			answer = Math.max(answer, temp);
		}
		
		System.out.println(answer);
	}
}


Measured memory_bytes: 21844
#include<iostream>
#include<string>
#include<cmath>

using namespace std;

int main(){

   string a,b,c;
   int okawa,sano;
   cin >> a >> b;
   c = a + b;
   okawa = stoi(c);
   sano = sqrt(okawa);
    if(sano*sano == okawa){
    
        cout << "Yes" << endl;
        
    }else{
    
    cout << "No" << endl;    
        
}
}

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

using namespace std;

typedef bitset<300000/10> BS;

BS absbs;
BS is[3000];
vector<int> idx;
int a[32345],b[32345];

int rec(const BS &bs,int nth,int r){
  if(r<0)return r;
  if(bs==absbs)return r;
  while((is[idx[nth]]&~bs).none()){
    nth++;
  }
  BS n=is[idx[nth]]&~bs;
  if(n.count()==1){
    for(int i=0;;i++){
      if(n[i]){
	return rec(bs|is[a[i]^b[i]^idx[nth]],nth+1,r-1);
      }
    }
  }else{
    int rv=rec(bs|is[idx[nth]],nth+1,r-1);
    BS o=bs;
    int c=0;
    for(int i=0;n.any();i++){
      if(n[i]){
	o|=bs|is[a[i]^b[i]^idx[nth]];
	c++;
	n[i]=false;
      }
    }
    return max(rv,rec(o,nth+1,r-c));
  }
}

int main(){
  int N,M,K;
  cin>>N>>M>>K;
  int pop[32345]={};
  for(int i=0;i<M;i++){
    absbs[i]=true;
    cin>>a[i]>>b[i];
    a[i]--;
    b[i]--;
    pop[a[i]]++;
    pop[b[i]]++;
    is[a[i]][i]=true;
    is[b[i]][i]=true;
  }
  idx.resize(N);
  iota(begin(idx),end(idx),0);
  sort(begin(idx),end(idx),[pop](int a,int b){
      return pop[a]>pop[b];
    });
  int r=rec(BS(),0,K);
  if(r<0){
    cout<<"Impossible"<<endl;
  }else{
    cout<<K-r<<endl;
  }
}

Measured memory_bytes: 17356
#include "bits/stdc++.h"
using namespace std;
using ll     = long long;
using pii    = pair<int, int>;
using pll    = pair<ll, ll>;
using vi     = vector<int>;
using vl     = vector<ll>;
using vvi    = vector<vi>;
using vvl    = vector<vl>;
const ll INF = 1LL << 60;
const ll MOD = 1000000007;
template <class T>
bool chmax(T &a, const T &b) {
    return (a < b) ? (a = b, 1) : 0;
}
template <class T>
bool chmin(T &a, const T &b) {
    return (b < a) ? (a = b, 1) : 0;
}
template <class C>
void print(const C &c, std::ostream &os = std::cout) {
    std::copy(std::begin(c), std::end(c), std::ostream_iterator<typename C::value_type>(os, " "));
    os << std::endl;
}

int main() {
    int n;
    cin >> n;
    if (n % 2 == 0)
        cout << 0.5 << "\n";
    else
        cout << fixed << setprecision(10) << double(n / 2 + 1) / double(n) << "\n";
    return 0;
}

Measured memory_bytes: 256
#!/usr/bin/env python3
import sys


def solve(N: int, d: "List[int]"):
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    N = int(input())
    d = [int(input()) for i in range(N)]
    print(len(set(d)))
    return



if __name__ == '__main__':
    main()


Measured memory_bytes: 2940
import java.io.IOException;
import java.util.Scanner;
public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = 0;
		int count=0;
		while(scan.hasNext()){	
			num= scan.nextInt();
			boolean[] prime = new boolean[num]; 
			for(int b=0;b<num;b++)
				prime[b]=true;
			if(num>1){
				prime[0]=false;
				//prime[1]=false;
			}else{
				System.out.println("0");
				continue;
			}
			for(int i=2;i<=Math.sqrt(num);i++){
				for(int j=2;j*i<=num;j++){
					if(prime[j*i-1])
						prime[i*j-1] = false;
				}
			}
		    for(int i=0;i<num;i++){
		    	if(prime[i]){
		    		//System.out.print((i+1)+" ");
		    		count++;
		    	}	
		    }
	        System.out.println(count);
			count=0;
		}
	}	
}

Measured memory_bytes: 33784
#include<bits/stdc++.h> 
#define REP(i, b) for(int i = 0; i < (b); i++)
#define REPS(i, b) for(int i = 1; i <= (b); i++)
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
using ll = long long;
using P = pair<int, int>;
using vi = vector<int>;
using vl = vector<ll>;
using vs = vector<string>;
using vb = vector<bool>;
const int INF = 1e9;
const int MOD = 1e9+7;


signed main()
{
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    int N; cin >> N;
    vi A(N);
    REP(i, N)
    {
        int t; cin >> t;
        A[i] = -t;
    }
    vi S; 
    REP(i, N)
    {
        auto itr = upper_bound(ALL(S), A[i]);
        if(itr == S.end()) S.push_back(A[i]);
        else *itr = A[i];
    }
    cout << S.size() << endl;
}

Measured memory_bytes: 1276
using System;
using System.Collections.Generic;

namespace agc005_a
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            Stack<char> stack = new Stack<char>();
            for (int i = 0; i < s.Length; i++)
            {
                if (s[i] == 'S')
                {
                    stack.Push('S');
                }
                else
                {
                    if (stack.Count == 0)
                    {
                        stack.Push('T');
                    }
                    else
                    {
                        if (stack.Peek() == 'S')
                        {
                            stack.Pop();
                        }
                        else
                        {
                            stack.Push('T');
                        }
                    }
                }
            }
            Console.WriteLine(stack.Count);
        }
    }
}

Measured memory_bytes: 12768
//coded b vishal mourya - the legendary coder
#include<bits/stdc++.h>
#define ll long long int
#define vec vector<ll>
#define f(a,b) for(ll i = a ; i < b ; i++ )
#define fj(a,b) for(ll j = a ; j < b ; j++ )
#define fk(a,b) for(ll k = a ; k < b ; k++ )
#define fasthoja ios_base::sync_with_stdio(false); cin.tie(NULL);
using namespace std;

int main(void){
    fasthoja;
    ll h; cin >> h;
    ll n; cin >> n;
    vec v(n);
    f(0,n) cin >> v[i];
    ll sum = 0;
    
    f(0,n) sum += v[i];
    
    if( sum >= h ) cout << "Yes\n";
    else cout << "No\n";

 return 0;
}


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

using namespace std;

#define int long long

#define rep(i,x) for(int i=0;i<x;++i)
#define all(a) a.begin(),a.end()
#define fst first
#define scd second

int n;
int A[100010];
int sum[200010];

bool check(int i, int x)
{
	int idx = lower_bound(sum+i, sum+i+n, sum[i]+x) - sum;

	if (idx == i + n) return false;
	int idx2 = lower_bound(sum+i, sum+i+n, sum[idx]+x) - sum;

	if (idx2 == i + n) return false;
	
	return sum[i+n] - sum[idx2] >= x;
}

signed main()
{
	cin >> n;
	
	rep(i, n)cin>>A[i];
	
	rep(i,n) sum[i+1] = A[i] + sum[i];
	rep(i,n) sum[i+n+1] = A[i] + sum[i+n];
	
	//rep(i,2*n+1)printf("sum[%lld]=%lld\n",i,sum[i]);
	
	int ans = 0;
	
	rep(i, n) {
		int l = -1, r = 1e9*1e5;
		rep(_, 50) {
			int mid=(l+r)/2;
			if (check(i, mid)) l=mid;
			else r=mid;
		}
		
		ans = max(ans, l);
		//if (l==17){cout<<"i="<<i<<endl;}
	}
	
	cout << ans << endl;
}

Measured memory_bytes: 5432
#include<bits/stdc++.h>
#pragma GCC optimize ("-O3")
    using namespace std;
    #define ll long long
    #define ld long double
    #define vll vector<ll>
    #define mll map<ll,ll>
    #define pll pair<ll,ll>
    #define ff first
    #define ss second
    #define pb push_back
    #define deb(x) cout<<#x<<" : "<<x<<endl;
    #define deb2(x,y) cout<<#x<<" : "<<x<<"\t"<<#y<<" : "<<y<<endl;
    #define deb3(x,y,z) cout<<#x<<" : "<<x<<"\t"<<#y<<" : "<<y<<"\t"<<#z<<" : "<<z<<endl;
    #define deb4(w,x,y,z) cout<<#w<<" : "<<w<<"\t"<<#x<<" : "<<x<<"\t"<<#y<<" : "<<y<<"\t"<<#z<<" : "<<z<<endl;
    #define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #define printv(a)  for(ll i=0;i<a.size();i++)  cout<<a[i]<<" ";
   
   
    const int mod=1e9+7;
    const int N=1e6+5; 
   
    bool sortbysec(const pair<pair<ll,ll>,ll> &a, 
                      const pair<pair<ll,ll>,ll> &b) 
        { 
            return (a.second > b.second); 
        } 
        ll powermod(ll x, ll y, ll p)
        {
            ll res = 1;
            x = x % p;
            while (y > 0)
            {
                if (y & 1) res = (res*x) % p;
                y = y>>1;
                x = (x*x) % p;
            }
            return res;
        }
       
        bool isprime(int n) 
        { 
            if (n <= 1)  return false; 
            if (n <= 3)  return true; 
            if (n%2 == 0 || n%3 == 0) return false; 
            for (int i=5; i*i<=n; i=i+6) 
                if (n%i == 0 || n%(i+2) == 0) 
                   return false; 
           return true; 
        }
       
        
     
        int main()
    {
        FAST;
        ll h,w;
        cin>>h>>w;
        char a[h][w];
        for(ll i=0;i<h;i++)
        {
            for(ll j=0;j<w;j++)
            {
                cin>>a[i][j];
            }
        }
        vector<vll> dp(h,vector<ll>(w));
        dp[0][0]=1;
        for(ll i=0;i<h;i++)
        {
            for(ll j=0;j<w;j++)
            {
                for(ll row:{i,i+1})
                {
                   ll col=j;
                   if(row==i)
                   col=col+1;
                   if(row<h && col<w && a[row][col]=='.')
                   {
                       dp[row][col]+=dp[i][j];
                       dp[row][col]%=mod;
                   }
                }
               
            }
        }
        cout<<dp[h-1][w-1];
        
   
    
        return 0;
    }

Measured memory_bytes: 9088
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define all(v) v.begin(),v.end()
#define mem(arr) memset(arr, 0, sizeof(arr))
#define ff first
#define ss second
#define int long long int
const int MOD = 1e9 + 7;
const int INF = 1e18;
const int N = 1e6 + 20;
vector<int> g[N];
vector<int> vis(N);
int32_t main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int tc = 1;
    while(tc--){
        string s;
        cin >> s;
        vector<string> v = {"YES", "NO"};
        int l = s.length() - 7;
        int flag = 1;
        for(int i = 0; i + l <= s.length(); i++){
            if(s.substr(0, i) + s.substr(i + l) == "keyence"){
                flag = 0;
            }
        }
        cout << v[flag] << '\n';
    }
}


Measured memory_bytes: 31488
#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 <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <stdio.h>
#include <complex>
#include <cstdint>
#include <tuple>
#include <numeric>
#define M_PI       3.14159265358979323846

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str(); }

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define MT make_tuple
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define FILL(a, x) memset(a, x, sizeof(a))

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

LL dp[105][100005];

int main() {
	int n, w;
	scanf("%d%d", &n, &w);
	memset(dp, 0x7f, sizeof(dp));
	dp[0][0] = 0;
	int maxv = 0;
	REP(i, n) {
		int u, v;
		int nmaxv = maxv;
		scanf("%d%d", &u, &v);
		REP(j, maxv+1)dp[i + 1][j] = dp[i][j];
		REP(j, maxv+1) {
			if (dp[i][j] + u <= w) {
				dp[i + 1][j + v] = min(dp[i + 1][j + v], dp[i][j] + u);
				nmaxv = max(nmaxv, j + v);
			}
		}
		maxv = nmaxv;
	}
	printf("%d\n", maxv);
	return 0;
}

Measured memory_bytes: 82304
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < n; i++)
#define print(n) cout << n << endl
#define YN(c) (c)?(print("YES")):(print("NO"))
#define Yn(c) (c)?(print("Yes")):(print("No"))
#define yn(c) (c)?(print("yes")):(print("no"))
#define in(v) int v; cin >> v
#define din(v) double v;cin >> v
#define vint vector<int>
#define pb push_back
typedef long long int ll;

int main(){
  din(l);
  cout << setprecision(15) << pow(l/3,3) << endl;
  return 0;
}

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

using namespace std;

#define INF 1000007
#define MOD 1000000007
#define int long long int
#define maxn 100
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) FOR(i, 0, n)

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

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

int mpow(int N, int P, int M) //繰り返し自乗法
{
    if (P == 0)
        return 1;
    if (P % 2 == 0)
    {
        int t = mpow(N, P / 2, M);
        return t * t % M;
    }
    return N * mpow(N, P - 1, M) % M;
}

int counter(int x) //bit計算
{
    if (x == 0)
        return 0;
    return counter(x >> 1) + (x & 1);
}

vector<bool> prime(maxn + 1, true); //素数テーブル
void prime_table(void)
{
    prime[0] = false;
    prime[1] = false;
    for (int i = 2; i * i <= maxn; i++)
    {
        if (!prime[i])
        {
            continue;
        }
        for (int j = i + i; j <= maxn; j += j + i)
        {
            prime[j] = false;
        }
    }
}

bool IsPrime(int num) //素数判定
{
    if (num < 2)
        return false;
    else if (num == 2)
        return true;
    else if (num % 2 == 0)
        return false;

    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return false;
        }
    }

    return true;
}
vector<int> divisor(int n) //約数列挙
{
    vector<int> ret;
    for (int i = 1; i * i <= n; i++)
    {
        if (n % i == 0)
        {
            ret.push_back(i - 1);
            if (i * i != n)
            {
                ret.push_back((n / i) - 1);
            }
        }
    }
    sort(ret.begin(), ret.end());
    return (ret);
}
int max_n = 2001;
signed main()
{
    int N;
    cin >> N;
    vector<string> S(N);
    rep(i,N){
      cin >> S[i];
    }
  sort(S.begin(),S.end());
  int count = 1;
  for(int i = 1;i < N;i++){
    if(S[i-1] != S[i]){
      count++;
    }
  }
  cout << count << endl;
}


Measured memory_bytes: 9612
#include <stdio.h>
#include <string.h>
#include <math.h>

int main(){
  char s[20], bit[]="111111111";
  int i, j, len, n, t=1, m;
  long long ans=0, c;

  scanf("%s", s);
  len = strlen(s);
  m = len;
  n = pow(2,len-1);

  for(i=0;i<len-1;i++){
    bit[i]='0';
  }

  for(i=0;i<n;i++){
    c=s[0]-'0';
    for(j=0;j<len-1;j++){
      if(bit[j]=='0'){
        c*=10;
        c+=s[j+1]-'0';
      }
      else {
        ans+=c;
        c=s[j+1]-'0';
      }
    }
    ans+=c;
    c=0;
    m=0;
    if(strcmp(bit,"111111111")!=0){
      while(t==1 || m>len-1){
        if(bit[m]=='0'){
          bit[m]='1';
          t=0;
        }
        else {
          bit[m]='0';
          t=1;
          m++;
        }
      }
    }
    m=0;
    t=1;
  }
  printf("%lld\n", ans);
  return 0;
}

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

int main(){

    int q;
    cin >> q;
    set<int> st;
    for(int i = 0; i < q; ++i){
        int com, x;
        cin >> com >> x;
        if(com == 0){
            st.insert(x);
            cout << st.size() << endl;
        }
        else if(com == 1){
            cout << (st.find(x) != st.end()) << endl;
        }
        else{
            st.erase(x);
        }
    }

    return 0;
}


Measured memory_bytes: 12368
#include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef tuple<ll,ll,ll> T;
const long long INF = 1LL<<60;
const int MOD = 1000000000+7;
#define rev(s) (string((s).rbegin(), (s).rend()))
template < typename T > inline string toString( const T &a ) { ostringstream oss; oss << a; return oss.str(); };
// cout << fixed << setprecision(10) << ans << endl;
// *min_element(c + l, c + r) *max_element(c + l, c + r)
// int dx[8]={1,1,0,-1,-1,-1,0,1};
// int dy[8]={0,1,1,1,0,-1,-1,-1};
// int dx[4]={1,0,-1,0};
// int dy[4]={0,1,0,-1};
// struct Edge {
//   int to, id;
//   Edge(int to, int id): to(to), id(id) {}
// };

vector<int> ki[200010];

ll sum[200010];
bool seen[200010];

int main() {
    int n,m;cin>>n>>m;
    rep(i,n-1) {
        int a,b;cin>>a>>b;
        a--;b--;
        ki[a].push_back(b);
        ki[b].push_back(a);
    }
    rep(i,m) {
        int p,x;cin>>p>>x;
        p--;
        sum[p]+=x;
    }
    queue<int> qu;
    qu.push(0);
    seen[0]=true;
    while(!qu.empty()) {
        int now = qu.front();qu.pop();
        for(auto nxt: ki[now]) {
            if(!seen[nxt]) {
                seen[nxt]=true;
                sum[nxt]+=sum[now];
                qu.push(nxt);
            }
        }
    }
    rep(i,n) {
        cout<<sum[i]<<" ";
        if(i==n-1) cout<<endl;
    }
}

Measured memory_bytes: 17468
#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
#include<set>
using namespace std;

#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j,k
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define sort(a) sort(a.begin(),a.end())
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define sizeoof(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll i,ans=1;rep(i,0,n)ans*=x;return ans;}
/*階乗*/ll fact(ll x){ll i,ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)/fact(r)/fact(n-r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;ll i;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
llfor;///////////////////////////////////////////////////////////
int main(){
 ll n;
 sc(n);
 ll s[150];
 ll sum=0;
 ll mx=0,mn=1000000000;
 rep(i,0,n){
  sc(s[i]);
  sum+=s[i];
  mn=min(mn,s[i]);
  mx=max(s[i],mx);
 }
 ll ave=cei(sum,n);
 ll tmp[150]={0};
 ll ans=1000000000;
 rep(j,mn,mx+1){
  tmp[j]=0;
  rep(i,0,n){
   tmp[j]+=(j-s[i])*(j-s[i]); 
   if(tmp[j]>ans)break;
  // cout<<j<<" "<<i<<" "<<tmp[j]<<endl;
  }
  ans=min(ans,tmp[j]);
 }
 pr(ans);
return 0;}

Measured memory_bytes: 3648
#include<iostream>
#include<algorithm>
#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define int long long
#define pi 3.141592653589793238462643383279502
#define M 1000000007
#define F first
#define S second
#define pii pair<int,int>
#define rep(i,n) for(int i=0;i<n;i++)
bool isPowerOfTwo(int n)
{
   if(n==0)
   return false;

   return (ceil(log2(n)) == floor(log2(n)));
}
int power(int x, unsigned int y, int p)
{
    int res = 1;

    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;

        y = y>>1;
        x = (x*x) % p;
    }
    return res;
}
bool isprime(int x)
{
      if(x<2)
        return false;
    for(int i=2;i*i<=x;i++)
     {
        if (x%i==0)
            return false;
    }
    return true;
}

void solve()
{
int n,m;
cin>>n>>m;
int a[n];
int c=0;
int s=0;
for(int i=0;i<n;i++)
{
    cin>>a[i];
    s+=a[i];
}
for(int i=0;i<n;i++)
{
    if(a[i]*4*m>=s)
        c++;
}
if(c>=m)
    cout<<"Yes"<<endl;
else
    cout<<"No"<<endl;
}

signed main()
{ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
int t;
//cin>>t;
t=1;
while(t--)
{
  solve();
}
}





Measured memory_bytes: 256
#define DEBUG 0
#include <bits/stdc++.h>
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define REP(i,n) for(int i=0; i<(n); i++)
#define REP2(i,x,n) for(int i=x; i<(n); i++)
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<class T>using numr=std::numeric_limits<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 int INF = 1e9;
const ll LLINF = 1e16;
const int mod = 1000000007;
const int mod2 = 998244353;
void debug_impl() { std::cerr << std::endl; }
template <typename Head, typename... Tail>
void debug_impl(Head head, Tail... tail) { std::cerr << " " << head; debug_impl(tail...); }
#if DEBUG
#define debug(...)\
    do {\
        std::cerr << std::boolalpha << "[" << #__VA_ARGS__ << "]:";\
        debug_impl(__VA_ARGS__);\
        std::cerr << std::noboolalpha;\
    } while (false)
#else
#define debug(...) {}
#endif

template < typename Container, typename Value = typename Container::value_type, std::enable_if_t<!std::is_same< Container, std::string >::value, std::nullptr_t> = nullptr>
std::istream& operator>> (std::istream& is, Container& v)
    { for (auto & x : v) { is >> x; } return is; }

template < typename Container, typename Value = typename Container::value_type, std::enable_if_t<!std::is_same< Container, std::string >::value, std::nullptr_t> = nullptr >
std::ostream& operator<< (std::ostream& os, Container const& v) {
os << "{";
    for (auto it = v.begin(); it != v.end(); it++)
        {os << (it != v.begin() ? "," : "") << *it;}
    return os << "}";
}

int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    ll l,r;
    cin >> l >> r;
    ll ans = INF;
    for(ll i = l;i<=min(r,l+2019);i++){
        for(ll j = i+1; j<= min(r,l+2019);j++){
            ans = min(ans,((i%2019)*(j%2019))%2019);
        }
    }
    cout << ans << endl;
}

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

using namespace std;

int main(){
	int n , m , ans = 0;
	cin>>n>>m;
	for(int i = 0 ; i < m ; i++){
		int t;
		cin>>t;
		ans+=t;
	}
	cout<<(n-ans >=0 ? n - ans : -1)<<endl;
}

Measured memory_bytes: 3624
#include<stdio.h>
int main(){
  int a,b,sum=0;

  scanf("%d %d",&a,&b);

  if(a > b){
    sum += 2*a - 1;
  }else if(b > a){
    sum += 2*b - 1;
  }else if(a == b){
    sum += a + b;
  }
  printf("%d",sum);
  
  return 0;
}


Measured memory_bytes: 128
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.IntStream;

public class Main {

    public static void main(String[] args) throws Exception {
	    String[] inputs = Io.read();
	    int size = Integer.parseInt(inputs[0]);

	    int[] nums = parse(size, inputs[1]);

	    Calculator calc = new Calculator();
        Io.write(calc.calc(nums));
    }

    private static int[] parse(int size, String numStr) {
        int[] result = new int[size];
        String[] nums = numStr.split(" ");
        for (int i = 0; i < nums.length; i++) {
            result[i] = Integer.parseInt(nums[i]);
        }
        return result;
    }
}

class Calculator {
    final private int minLim = -100;
    final private int maxLim = 100;

    public int calc(int[] nums) {
        int cost = Integer.MAX_VALUE;
        int tmpCost = 0;
        for (int i = minLim; i <= maxLim; i++) {
            tmpCost = calcCost(i, nums);
            if (tmpCost <= cost) {
                cost = tmpCost;
            }
        }

        return cost;
    }

    private int calcCost(final int target, int[] nums) {
        IntStream stream = Arrays.stream(nums);
        return stream.map(x -> (x - target) * (x - target)).sum();
    }
}

class Io {

    /**
     * 標準入力から1行ずつ受け取る
     * @return
     * @throws IOException
     */
    public static String[] read() throws IOException
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        List<String> inputs = new ArrayList<String>();
        String line;
        while ((line = br.readLine()) != null) {
            if (line.equals(""))
                break;

            inputs.add(line);
        }
        br.close();
        return inputs.toArray(new String[0]);
    }

    /**
     * 標準出力
     * @param line
     */
    public static void write(int line)
    {
        System.out.println(line);
    }
}

Measured memory_bytes: 28756
#include<bits/stdc++.h>
#include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	int N,M,p;
	cin>>N>>M>>p;
	int d[100001];
	for(int i=0;i<M;i++){
		cin>>d[i];
		if(d[i]>=p){
			d[i]=d[i]-p;
		}
		else{
			d[i]=N-(p-d[i]);
		}
	}
	sort(d,d+M);
	d[M]=d[0];
	int sum[10001];
	for(int i=0;i<M;i++){
			sum[i]=min(d[i]*2+N-d[i+1],(N-d[i+1])*2+d[i]);
	}
	sum[M]=min(d[M-1],N-d[0]);
	int answer=99999999;
	for(int i=0;i<M+1;i++){
		answer=min(answer,sum[i]*100);
	}
	cout<<answer<<endl;
	
	//cout<<sum[0]<<endl;
	/*int N,M;
	int h[100],m[100],k[100],g[100];
	cin>>N;
	for(int i=0;i<N;i++){
		cin>>h[i]>>m[i];
	}
	cin>>M;
	for(int i=0;i<M;i++){
		cin>>k[i]>>g[i];
	}
	int n[200];
	for(int i=0;i<N+M;i++){
		if(i<N){
			n[i]=h[i]*60+m[i];
		}
		else{
			n[i]=k[i-N]*60+g[i-N];
		}
	}
	sort(n,n+N+M);
	if(n[0]%60>=10){
		cout<<n[0]/60<<':'<<n[0]%60;
	}
	else{
		cout<<n[0]/60<<':'<<0<<n[0]%60;
	}
	for(int i=1;i<N+M+1;i++){
		if(n[i]!=n[i-1] && i!=N+M){
		if(n[i]%60>=10){
			if(i<N+M-1){
				cout<<' '<<n[i]/60<<':'<<n[i]%60;
			}
			else{
				cout<<' '<<n[i]/60<<':'<<n[i]%60;
			}
		}
      else{
			if(i<N+M-1){
				cout<<' '<<n[i]/60<<':'<<0<<n[i]%60;
			}
			else{
				cout<<' '<<n[i]/60<<':'<<0<<n[i]%60;
			}
		}
	}
	else if(i==N+M){
		cout<<endl;
	}
}*/
	/*int N;
	cin>>N;
	int K[100],P[100];
	for(int i=0;i<N;i++){
		cin>>K[i]>>P[i];
	}
	for(int i=0;i<N;i++){
		if(K[i]%P[i]==0){
			cout<<P[i]<<endl;
		}
		else{
			cout<<K[i]%P[i]<<endl;
		}
*/
	/*int c1,c5,c10,c50,c100,c500;
	cin>>c1>>c5>>c10>>c50>>c100>>c500;
	if(c1+c5*5+c10*10+c50*50+c100*100+c500*500>=1000){
		cout<<1<<endl;
	}
	else{
		cout<<0<<endl;
	}*/
	/*int d,c;
	cin>>d>>c;
	cout<<d*c<<endl;*/
	//cout << "Hello world!!" << endl;
	return 0;
}



Measured memory_bytes: 3176
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
using namespace std;
#define int long long
typedef pair<int, int> P;

signed main() {
	int n, m, k;
	cin >> n >> m >> k;
	for (int i = 0; i <= n; i++) {
		for (int j = 0; j <= m; j++) {
			int b = i*m + j*n-2*i*j;
			if (b == k) {
				puts("Yes");
				return 0;
			}
		}
	}
	puts("No");
	return 0;
}

Measured memory_bytes: 256
import re

S = input()
S = S[::-1] # 文字列反転

pattern = ["dream", "dreamer", "erase", "eraser"]

for i in range(len(pattern)):
    pattern[i] = pattern[i][::-1]

fin = False
while not fin:
    if S == '':
        print("YES")
        exit()
    fin = True
    for x in pattern:
        if re.match(x, S):
            S = S.replace(x, "", 1)
            fin = False
            break

print("NO")

Measured memory_bytes: 3444