akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define ll long long int
#define MOD 1000000007
#define INF 1e18
#define PI 3.14159265358979

using namespace std;

ll power(ll n, ll k);
ll inv(ll n);
ll genfact(ll n, ll k);
ll fact(ll n);
ll nck(ll n, ll k);

int main(void){
  int n, a, b;

  cin >> n >> a >> b;
  
  cout << min(n*a, b) << endl;

  return 0;
}


ll power(ll n, ll k){
  ll res = 1;
  while(k > 0){
    if (k & 1) 
      res = res * n % MOD;
    n = n * n % MOD;
    k >>= 1;
  }
  return res;
}

ll genfact(ll n, ll k){

  ll res = 1;
  while (k >= 0){
    res = (res * (n - k)) % MOD;
    k--;
  }

  return res;
}

ll inv(ll n){
  return power(n, MOD - 2);
}

ll fact(ll n){
  return genfact(n, n - 1);
}

ll nck(ll n, ll k){
  if (k == 0)
    return 1;
  if (n <= 0)
    return 0;

  return ((genfact(n, k) % MOD) * inv(fact(k))) % MOD;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
using namespace __gnu_pbds;
typedef tree<pair<ll,pair<ll,ll> >, null_type, less<pair<ll,pair<ll,ll> > >, rb_tree_tag, tree_order_statistics_node_update>ordered_set;
#define me BOSS
#define bug() cout<<"AIkahne aise"<<endl
#define PI acos(-1)
/* Precode Start Here *\
     Sieve
void sieve()
{
    for(ll i=3; i<=2000; i+=2)
    {
        for(ll j=i*i; j<=4000000; j+=i)
            A[j]=1;
    }
    v.push_back(2);
    for(ll i=3; i<=4000000; i+=2)
        if(A[i]==0)
            v.push_back(i);
}

     Power Function Modulo P

ll modPow(ll a, ll x, ll p) {
    //calculates a^x mod p in logarithmic time.
    long res = 1;
    while(x > 0) {
        if( x % 2 != 0) {
            res = (res * a) % p;
        }
        a = (a * a) % p;
        x /= 2;
    }
    return res;
}


   factorial

ll fact(ll n)
{
    ll ans=1;
    for(ll i=1;i<=n;i++)
    {
        ans=(ans*i)%mod;
    }
    return ans;
}
     Calculating nCr using Fermats law Theorem

ll modInverse(ll a, ll p) {
    //calculates the modular multiplicative of a mod m.
    //(assuming p is prime).
    return modPow(a, p-2, p);
}


ll modBinomial(ll n, ll k, ll p) {
// calculates C(n,k) mod p (assuming p is prime).

    ll numerator = 1; // n * (n-1) * ... * (n-k+1)
    for (ll i=0; i<k; i++) {
        numerator = (numerator * (n-i) ) % p;
    }

    ll denominator = 1; // k!
    for (ll i=1; i<=k; i++) {
        denominator = (denominator * i) % p;
    }

    // numerator / denominator mod p.
    return ( numerator* modInverse(denominator,p) ) % p;
}
     num of divisor and euler totient

ll phi[1000001],mark[1000001],divi[1000001];;
void divisorPhi(ll n)
{
    for(int i=1;i<=n;i++)
        phi[i]=i;
    for(int i=2;i<=n;i++)
    {
        if(!mark[i])
        {
            for(int j=i;j<=n;j+=i)
            {
                mark[j]=1;
                phi[j]*=(1-1/(double)i);
            }
        }
    }
    for(ll i=1;i<=n;i++)
    {
        for(ll j=i;j<=n;j+=i)
            divi[j]++;
    }
}
/* Precode Ends */
#define mod 1000000007
ll A[5000001],B[5000001];
vector<ll>v;
map<ll,ll>myMap;
set<string>mySet;
vector<pair<ll,ll> >vp;
priority_queue<ll> pq;
priority_queue<ll, vector<ll>, std::greater<ll> > first;
ll po(ll a,ll n)
{
  ll ans=1;
  for(int i=1;i<=n;i++)
       ans*=a;
    return ans;
}

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

 ll n;
 cin>>n;
 while(n--)
 {
     string s;
     cin>>s;
     mySet.insert(s);
 }
 cout<<mySet.size()<<endl;

return 0;
}



Measured memory_bytes: 19232
/*input
3
10 30 20
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pii pair<int, int>
#define F first
#define S second
const int MX = 1e5 + 100, oo = 1ll << 40;
int v[MX], C[MX * 3];
int change(int v) { return v + MX + 10; }
int check(int m, int n) {
	int ans = 0, s = 0;
	memset(C, 0, sizeof(C));
	C[change(0)] = 1;
	int sum = 1;
	for(int i = 0; i < n; i ++) {
		if(v[i] >= m) s ++, sum += C[change(s)];
		else sum -= C[change(s)], s --;
		ans += sum;
		C[change(s)] ++;
		sum ++;
		//cout << ans << endl;
	}
	//cout << " " << m << ' ' << ans << endl;
	return ans;
}
main () {
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	int n; cin >> n;
	for(int i = 0; i < n; i ++) cin >> v[i];
	if(n == 1) return cout << v[0], 0;
	int l = 0, r = 1e9 + 10;
	while(l != r) {
		int m = l + r >> 1;
		if(check(m, n) * 2 < n * (n + 1) / 2) r = m;
		else l = m + 1;
	}
	cout << l - 1 << endl;
}

Measured memory_bytes: 3456
N = int(input())
h = list(map(int,input().split(" ")))

dp = [0] * N
dp[1] = dp[0] + abs(h[1]-h[0])
for i in range(2,N):
    dp[i] = min(dp[i-1]+abs(h[i] - h[i-1]),dp[i-2]+abs(h[i] - h[i-2]))

print(dp[N-1])

Measured memory_bytes: 53200
#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
using namespace std;

typedef long long ll;
typedef vector<int> vi;

const double PI=acos(-1.0);

int N,K;
void input()
{
    cin>>N>>K;
}

void solve()
{
    int ans=1;
    while(N/K>0){
        N/=K; ++ans;
    }
    cout<<ans<<endl;
}

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

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

#define ll long long
#define fornum(A,B,C) for(A=B;A<C;++A)
#define pii pair<int,int>
#define pll pair<ll,ll>

using namespace std;

/////////////////////////////////////////////////////

ll N,P[202020];

ll i, j,ans;
int main(){
    scanf("%lld",&N);
    fornum(i,0,N){
        scanf("%lld", &P[i]);
    }
    j = 1e9;
    fornum(i,0,N){
        if(P[i]<j){
            ++ans;
            j = min(j, P[i]);
        }
    }
    printf("%lld", ans);
    return 0;
}

Measured memory_bytes: 1792
while True:
    n,x = map(int,raw_input().split())
    if n == 0 and x == 0:
        break
    num = 0

    for a in range(1,n-1):
        for b in range(a+1,n):
            for c in range(b+1,n+1):
                if a + b+ c == x:
                    num += 1
    print num
                
    
    

Measured memory_bytes: 6368
#define _USE_MATH_DEFINES    
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <string>
#include <vector>
#include <utility>
#include <complex>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <tuple>
#include <bitset>
#include <limits>
#include <algorithm>
#include <array>
#include <random>
#include <complex>
#include <regex>
using namespace std;
typedef long double ld;
typedef long long ll;
typedef vector<int> vint;
typedef vector<ll> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
#define quickIO()   {cin.tie(0);    cout.sync_with_stdio(false);}
#define rep(i,n)    for(ll i=0; i<(ll)n; i++)
#define mp(a,b) make_pair(a,b)
#define pb push_back
#define fcout cout << fixed << setprecision(10) 
const ll inf = 1e18;
const ll mod = 1e9 +7;
     
ld sqrtld(ld x){
    ld left = 0, right = x;
    rep(i, 100){
        ld mid = (left + right)/2;
        if (mid*mid <= x)   left =mid;
        else    right = mid;
    }
    return left;
}

ll gcd(ll a, ll b){
    if(b>a){
        ll c =b; b=a;   a=c;
    }
    ll d = a%b;
    if(d==0){
        return b;
    }else if(d==1){
        return 1;
    }else{
        gcd(b,d);
    }
}


ll cul(ll n){
    return (n-1)*n/2;
}

int a[110];
int main (){
    int n;  cin >> n;
    rep(i,n){
        cin >> a[i];
        a[i] += 100;
    }

    ll ans = inf;
    for(int k = 0; k <= 200; k++ ){
        ll b=0;
        rep(i,n){
            b += (a[i]-k)*(a[i]-k);
        }
        ans = min(ans,b);
    }

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



Measured memory_bytes: 256
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int i = 1;
		while( ++i <= n){
			int x = i;
			if(x % 3 == 0){
				System.out.print(String.format(" %d",i));
				continue;
			}
			while(x >= 1){
				if(x % 10 == 3){
					System.out.print(String.format(" %d",i));
					break;
				}
				x = x/10;
			}
		}
		System.out.println();
	}
}



Measured memory_bytes: 36728
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int,int>;
#define enld '\n'
#define rep(i,n) for(int i=0; i<(n); i++)
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("Ofast")
constexpr ll INF = 1e15;
constexpr int inf = 1e9;
constexpr ll mod = 1000000007;
constexpr ll mod2 = 998244353;
const double PI = 3.1415926535897932384626433832795028841971;
const int dx[6] = {1, 0, -1, 0,1,1};
const int dy[6] = {0, 1, 0, -1,1,-1};
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
// ---------------------------------------------------------------------------



int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int N;
    cin >> N;
    N++;
    vector<ll> A(N);
    for(int i=0; i<N; i++){
        cin >> A[i];
    }
    ll now = 1;
    for(int i=0; i<N; i++){
        if(now < A[i]){
            cout << -1 << "\n";
            return 0;
        }
        now -= A[i];
        now = min(INF,now*2);
    }
    vector<ll> S(N+1,0);
    for(int i=N-1; i>=0; i--){
        S[i] += S[i+1] + A[i];
    }
    // for(int i=0; i<=N; i++){
    //     cout << S[i] << "\n";
    // }
    ll ans = 0;
    ll two = 1;
    for(int i=0; i<N; i++){
        ans += min(S[i],two);
        two -= A[i];
        two = min(INF,two*2);
    }
    cout << ans << "\n";
    return 0;
}

Measured memory_bytes: 4772
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N, A, B = map(int, readline().split())

    print(min(A * N, B))


if __name__ == '__main__':
    main()


Measured memory_bytes: 61720
n, k = map(int, input().split())
A = list(map(int, input().split()))
position = A.index(1)
left = position
right = n - position - 1
#print(left, right)
counter = 0
import math
counter += math.ceil(left / (k - 1))
if left % (k-1) != 0:
  right -= (k-1) - (left % (k-1))
counter += math.ceil(right / (k - 1))
print(counter)

Measured memory_bytes: 52476
/*
g++ -std=c++11 -o2 -Wall ARC100E.cpp -o ./out/ARC100E.out
./out/ARC100E.out
*/

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

#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define rep(i,s,g) for(ll (i) = (s);(i) < (g);++i)
#define rrep(i,s,g) for(ll (i) = (s);i >= (g);--(i))
#define PB push_back
#define MP make_pair
#define FI first
#define SE second

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

template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

pair<ll,ll> ans[1 << 20];
ll ret[1 << 20];

pair<ll,ll> toptwo(pair<ll,ll> A,pair<ll,ll> B){
	ll fir = max(A.FI,B.FI);
	ll sec = max(min(A.FI,B.FI),max(A.SE,B.SE));
	return MP(fir,sec);
}

int main(){
	int n;cin >> n;
	REP(i,1<<n){
		ll tmp;cin >> tmp;
		ans[i].FI = tmp;
	}
	REP(i,n){
		for(int j = 0;j < (1<<n);j++){
			if(j & (1 << i)){
				ans[j] = toptwo(ans[j],ans[j^(1<<i)]);
			}
		}
	}
	REP(i,1<<n){
		ret[i] = ans[i].FI + ans[i].SE;
	}
	REP(i,1<<n){
		ret[i+1] = max(ret[i+1],ret[i]);
	}
	for(int i = 1;i < (1<<n);i++){
		cout << ret[i] << endl;
	}
	return 0;
}


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

using namespace std;

int main()
{
   ios::sync_with_stdio(false);
   cin.tie(0);
   
   while(true){
       int n; cin>>n;
       if(n==0) break;
       
       double a[n]; double sum = 0;
       for(int i=0; i<n; i++) {
           cin>>a[i];
           sum += a[i];
       }
       
       double mean = (double)sum/n;
       
       sum = 0;
       
       for(int i=0; i<n; i++){
           sum += (a[i]-mean)*(a[i]-mean);
       }
       
       double variance = (double)sum/n;
       
       printf("%.8lf\n",sqrt(variance));
   }
   
   
   return 0;
}


Measured memory_bytes: 3236
n = int(input())
*h, = map(int, input().split())

dp = [float("inf")]*(n+1)
dp[0] = 0

for i in range(1, n):
    dp[i] = min(dp[i-1]+abs(h[i] - h[i-1]), dp[i])
    if i > 1:
        dp[i] = min(dp[i-2]+abs(h[i] - h[i-2]), dp[i])

print(dp[n-1])


Measured memory_bytes: 13980
/*
 ------------------------------------------------------Read question very carefully------------------------------------------------------
 
                       In every question first approach must be basic, atleast give 15 mins for try to solve in basic approach
*/
 #include<iostream>
 #include<cstring>
 #include<string>
 #include<vector>
 #include<utility>
 #include<stdlib.h>
 #include<limits.h>
 #include<cmath>
 #include<set>
 #include<initializer_list>
 #include<unordered_set>
 #include<unordered_map>
 #include<map>
 #include<iomanip>
 #include<algorithm>
 #include<queue>
 #include<stack>
  
 #define sze 1000005
 #define ld long double
 //#define ll unsigned long long
 #define ll long long
 #define endl "\n"
 #define pb push_back
 #define mkp make_pair
 #define mod 1000000007
 #define ff first
 #define ss second
 #define F(i,a,b) for(int i = (int)(a); i <= (int)(b); i++)
 #define RF(i,a,b) for(int i = (int)(a); i >= (int)(b); i--)
 #define all(c) (c).begin(),(c).end()
  
 using namespace std;

//cout << fixed << setprecision(0) << pi <<" "<<npi<<endl;
 //const ll inf=1ll<<60;

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
      
}
ll binpow(ll a, ll b) {
    ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = (res%mod * a%mod)%mod;
        a = (a%mod * a%mod)%mod;
        b >>= 1;
    }
    return res;
}
//const int N=300005;

 int main()
 {
     ios_base::sync_with_stdio(false);
     cin.tie(NULL);
     long double pi = 3.14159265358979323846;
     long double a,b,h,m,ang; cin>>a>>b>>h>>m;
     ang = (pi/180)*((h*30) + (m*0.5) - m*6);
     cout<< fixed << setprecision(20)<<sqrt(a*a +b*b - (2*a*b*cos(ang)))<<endl;
 }


Measured memory_bytes: 4184
import java.io.*;
import java.util.*;
import static java.lang.System.out;

public class Main {
    static MyReader in = new MyReader();

    public static void main(String[] args) {
        int N = in.i();
        String ans = "No";
        for (int i = 0, cnt = 0; i < N; i++) {
            int a = in.i();
            int b = in.i();
            if (a == b) {
                cnt++;
                if (cnt == 3) {
                    ans = "Yes";
                    break;
                }
            } else {
                cnt = 0;
            }
        }
        out.println(ans);
    }
}

class MyReader extends BufferedReader {
    char[] cbuf = new char[1024];
    int head = 0;
    int tail = 0;

    MyReader() {
        super(new InputStreamReader(System.in));
    }

    char next() {
        if (head == tail) {
            try {
                tail = super.read(cbuf, 0, cbuf.length);
            } catch (IOException e) {
                e.printStackTrace();
            }
            head = 0;
        }
        return cbuf[head++];
    }

    void back() {
        head--;
    }

    boolean minus() {
        boolean minus;
        while (true) {
            char c = next();
            if (!isDelimiter(c)) {
                if (!(minus = c == '-')) back();
                return minus;
            }
        }
    }

    void skip() {
        while (isDelimiter(next()));
        back();
    }

    char[] s(int N) {
        char[] cbuf = new char[N];
        read(cbuf, 0, N);
        return cbuf;
    }

    public int read(char[] cbuf, int off, int len) {
        skip();
        int i;
        for (i = 0; i < cbuf.length; i++) {
            char c = next();
            if (isDelimiter(c)) {
                break;
            }
            cbuf[i] = c;
        }
        return i;
    }

    boolean isDelimiter(char c) {
        return c == ' ' || c == '\n' || c == '\r';
    }

    int i() {
        boolean minus = minus();
        int n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    }

    int[] ii(final int N) {
        int[] a = new int[N];
        for (int j = 0; j < a.length; j++) a[j] = i();
        return a;
    }

    long l() {
        boolean minus = minus();
        long n = 0;
        while (true) {
            int k = next() - '0';
            if (k < 0 || 9 < k) break;
            n = 10 * n + k;
        }
        return minus ? -n : n;
    }
}


Measured memory_bytes: 32696
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
  int N;
  cin >> N;
  vector<int> set(100000, 0);
  vector<int> a(N);
  rep(i, N){
    cin >> a[i];
    set[a[i]]++;
  }
  int sum = 0;
  int max_sum = 0;
  int ans = 0;
  if(N >= 3){
    for(int i = 1; i < 100000-1; i++){
      if(set[i-1]+set[i]+set[i+1] >ans){
        ans = set[i-1]+set[i]+set[i+1];
      }
    }
  }else if(N == 1){
  ans = 1;
}else{
  if(abs(a[1] - a[0]) <= 2){
    ans = 2;
  }else{
    ans = 1;
  }
}

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


Measured memory_bytes: 1024
import itertools
N,M = map(int,input().split())

Graph = [[0]*N for _ in range(N)]
for i in range(M):
  a,b = map(int,input().split())
  Graph[a-1][b-1] = 1 
  Graph[b-1][a-1] = 1
  
A = []
for i in range(1,N): A.append(i)

ans = 0
Comb = list(itertools.permutations(A))
for i in range(len(Comb)):
  tmp = list(Comb[i])
  #print(tmp)
  judge = 1
  for j in range(len(tmp)):
    if(j == 0): judge = judge*Graph[0][tmp[j]]
    else: judge = judge*Graph[tmp[j-1]][tmp[j]]
  if(judge == 1): ans += 1
 
print(ans)

Measured memory_bytes: 3700
#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);
vector<vector<int>> v;
int n;
int dp[N][3];
int dfs(int pos, int state){
    if(pos == n){
        return 0;
    }
    int &res = dp[pos][state];
    if(res != -1){
        return res;
    }
    if(state == 0){
        return res = max(dfs(pos + 1, 1), dfs(pos + 1, 2)) + v[pos][0];
    }else if(state == 1){
        return res = max(dfs(pos + 1, 0), dfs(pos + 1, 2)) + v[pos][1];
    }else{
        return res = max(dfs(pos + 1, 0), dfs(pos + 1, 1)) + v[pos][2];
    }
}
int32_t main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int tc = 1;
    while(tc--){
        cin >> n;
        v.resize(n, vector<int> (3));
        for(int i = 0; i < n; i++){
            for(int j = 0; j < 3; j++){
                cin >> v[i][j];
            }
        }
        memset(dp, -1, sizeof(dp));
        cout << max({dfs(0, 0), dfs(0, 1), dfs(0, 2)}) << '\n';
    }
}

Measured memory_bytes: 65152
MOD=10**9+7
def modpow(a,n,mod):
    res=1
    a=a%mod
    while(n>0):
        if(n&1):
            res=res*a%mod
        a=a*a%mod
        n>>=1
    return res

def com(n,k,mod):
    res=1
    tmp=1
    for i in range(1,k+1):
        res=res*(n-i+1)%mod
        tmp=tmp*i%mod
    a=modpow(tmp,1000000005,mod)
    return res*a%mod

X,Y=map(int,input().split())
if((X+Y)%3!=0):
    print(0)
    exit()
m=(2*X-Y)//3
n=(2*Y-X)//3
if(m<0 or n<0):
    print(0)
    exit()
print(com(m+n,m,MOD))

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

#define REP(i, a, b) for (int i = int(a); i < int(b); i++)
#define dump(val) cerr << __LINE__ << ":\t" << #val << " = " << (val) << endl

using namespace std;

typedef long long int lli;

template<typename T>
vector<T> make_v(size_t a, T b) {
    return vector<T>(a, b);
}

template<typename... Ts>
auto make_v(size_t a, Ts... ts) {
    return vector<decltype(make_v(ts...))>(a, make_v(ts...));
}

int main() {
    int N;
    cin >> N;
    vector<int> A(N);
    REP(i, 0, N) {
        cin >> A[i];
    }
    int ans = 0;
    REP(i, 0, N) {
        REP(j, i + 1, N) {
            ans = max(ans, abs(A[i] - A[j]));
        }
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 768
#include<bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin>>N;
  vector<double>A(N);
  double sum=0;
  double seki=1;
  for(int i=0;i<N;i++){
    cin>>A.at(i);
    seki=seki*A.at(i);
  }
  for(int i=0;i<N;i++){
    sum=sum+seki/A.at(i);
  }
  cout<<fixed<<setprecision(10)<<double(seki/sum)<<endl;
}

Measured memory_bytes: 256
import java.util.Scanner;

/**
 * A - Serval vs Monster
 * サーバルはモンスターと戦っています。
 * モンスターの体力は H です。
 * サーバルが攻撃を 1 回行うとモンスターの体力を A 減らすことができます。
 * 攻撃以外の方法でモンスターの体力を減らすことはできません。
 * モンスターの体力を 0 以下にすればサーバルの勝ちです
 * サーバルがモンスターに勝つために必要な攻撃の回数を求めてください。
 */
public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner( System.in );
        // モンスターの体力
        int h = sc.nextInt();
        // サーバルが行う１回の攻撃で減らすことができるモンスターの体力
        int a = sc.nextInt();
        double result = ( double ) h / a;

        System.out.println( ( int ) Math.ceil( result ) );

        sc.close();
    }
}


Measured memory_bytes: 23764
#include <iostream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <queue>
#include <list>
#include <cmath>
#include <stack>
#include <deque>
#include <iomanip>

using namespace std;
typedef long long ll;
using Pll = pair<ll,ll>;

const ll INF = 1LL<<60;
const ll MOD = 1000000007;

//cout << fixed << setprecision(10);

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

    int N = S.size();
    
    string ans = "Yes";
    
    for(int i=0;i<N;i++){
        if(i%2==1 && S[i]=='R') ans = "No";
        else if(i%2==0 && S[i]=='L') ans = "No";
    }
    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 256
#include<iostream>
using namespace std;
int main()
{
    int n,x;
    cin>>n>>x;
    int c=1,sum=0;
    while(n--){
        int temp;
        cin>>temp;
        sum+=temp;
        if(sum<=x) c++;
        else break;
    }
    cout<<c<< "\n";
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define repc(i, b, e) for(auto i = (b); i != (e); i++)

int main(){
    int n, h, s = 0, max = 0;
    cin >> n;
    rep(i, n){
        cin >> h;
        if (max <= h){
            s++;
            max = h;
        }
    }
    cout << s << endl;
    return 0;
}

Measured memory_bytes: 256
#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=1e5+7;
int a[maxn]{0};
int main()
{
	int n;
	cin>>n;
	int max=0;
	for(int i=0;i<n;i++)
	{
		int x;
		cin>>x;
		a[x]++;
		if(a[x]>max)
			max=a[x];
		a[x+1]++;
		if(a[x+1]>max)
			max=a[x+1];
		a[x-1]++;
		if(a[x-1]>max)
			max=a[x-1];
	}
	cout<<max<<endl;
}

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

int main()
{
    // input
    string S;

    cin >> S;
    vector<int> v(S.size());

    string ACGT = "ACGT";

    for (int i = 0; i < S.size(); i++)
    {
        for (int j = 0; j < ACGT.size(); j++)
        {
            if (S[i] == ACGT[j])
            {

                v[i] = 1;
                break;
            }
            else
            {
                v[i] = 0;
            }
        }
    }

    for (int i = 1; i < S.size(); i++)
    {
        if (v[i] != 0)
            v[i] = v[i - 1] + v[i];
    }

    int res = 0;
    for (int vi : v)
        res = max(res, vi);

    cout << res << endl;
}

Measured memory_bytes: 256
def main():
    N, D = list(map(int, input().split()))
    counta = 0
    D_2 = D ** 2
    for _ in range(N):
        x, y = list(map(int, input().split()))
        if x ** 2 + y ** 2 <= D_2:
            counta += 1
    print(counta)

if __name__ == '__main__':
    main()

Measured memory_bytes: 9192
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <unordered_map>
#include <stack>
#include <cassert>
#include <string>
#include <cmath>
#include <iomanip>

using namespace std;
using ll = long long;
using ld = long double;

#define st first
#define nd second

const int MAXN = 1e6 + 5, inf = 1e9;
const ll INF = 1e18;
const ld PI = 3.1415926535897932384626433832795;

int cnt[MAXN];
ll dp[MAXN], tab[MAXN];
bool vis[MAXN], used[MAXN];

vector<int> G[MAXN];
vector<ll> V;
set<ll> S;
map<ll, int> M;
stack<ll> St;
queue<ll> Q;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout << setprecision(13) << fixed;

    //////////////////////////////////////////
    //////////////////////////////////////////

    int n, d, x;
    cin >> n >> d >> x;
    for (int i= 1; i <= n; i++)
    {
        cin >> tab[i];
        for (int j = 1; j <= d; j += tab[i])
        {
            cnt[j]++;
        }
    }

    int res = 0;
    for (int i = 1;i <= d; i++)
    {
        res += cnt[i];
    }

    cout << res + x << "\n";
}


Measured memory_bytes: 28928
import java.util.Scanner;
//import java.io.*;
//import java.util.Arrays;
public class Main {
	public static void main(String[] args) throws java.io.IOException {
		Scanner scan = new Scanner(System.in);
		//InputStreamReader is = new InputStreamReader(System.in);
		//BufferedReader br = new BufferedReader(is);
		int x = scan.nextInt();
		int y = scan.nextInt();
		int cun = 0;
		int z = 1;
		while(x != 0 || y != 0){
			if(x < y){
				z = x;
				x = y;
				y = z;
			}
			while(z != 0){
				z = x%y;
				x = y;
				y = z;
				cun++;
			}
			System.out.println(x + " " + cun);
			x = scan.nextInt();
			y = scan.nextInt();
			cun = 0;
			z = 1;
		}
	}
}

Measured memory_bytes: 33412
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()

// #include <boost/multiprecision/cpp_dec_float.hpp>
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision;
// using Bint = mp::cpp_int;
// using Real = mp::number<mp::cpp_dec_float<1024>>;

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

    vector<string> sub;

    for(int k = 1; k <= K && k <= S.size() ; k++){
        for(int i = 0; i < S.size() - k + 1; i++){
            string s = S.substr(i, k);
            sub.push_back(s);
        }
    }

    sort(all(sub));
    
    int count = 1, sub_i = 0;
    while(count != K){
        sub_i++;
        if(sub.at(sub_i) != sub.at(sub_i - 1)){
            count++;
        }
    }
    cout << sub.at(sub_i) << endl;
}

Measured memory_bytes: 1660
#include "bits/stdc++.h"

using namespace std;

class UnionFind
{
    vector<int> par;

public:
    UnionFind(int n) : par(n, -1) {}

    int root(int x)
    {
        if (par[x] < 0)
            return x;
        else
            return par[x] = root(par[x]);
    }

    bool merge(int x, int y)
    {
        x = root(x);
        y = root(y);
        if (x == y)
            return false;
        if (par[x] > par[y])
            swap(x, y);
        par[x] += par[y];
        par[y] = x;
        return true;
    }

    int size(int x) { return -par[root(x)]; }
};

void solve()
{
    int n, m, q;
    cin >> n >> m;
    UnionFind uf(n);
    while (m--)
    {
        int s, t;
        cin >> s >> t;
        uf.merge(s, t);
    }
    cin >> q;
    while (q--)
    {
        int s, t;
        cin >> s >> t;
        if (uf.root(s) == uf.root(t))
        {
            cout << "yes\n";
        }
        else
        {
            cout << "no\n";
        }
    }
}

int main()
{
    solve();
    return 0;
}



Measured memory_bytes: 3116
#include <bits/stdc++.h>
  
using namespace std;
  
template<class T> void ckmin(T &a, T b) { a = min(a, b); }
template<class T> void ckmax(T &a, T b) { a = max(a, b); }
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  
#define pb push_back
#define mp make_pair
#define cotu cout
#define itn int
#define Red ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define F first
#define S second
#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for(int i = 0; i < n; ++i)
#define repr(i,n) for(int i = n - 1; i >= 0; --i)
#define Rep(i, a, n) for(int i = (a); i <=(n); ++i)
#define repst(i, n) for(auto it = n.begin(); it != n.end(); ++it)
#define Repr(i, a, n) for(int i = (n); i >= (a); --i)
#define setp(x) fixed << setprecision(x)
#define ordered_set tree<int , null_type,less<int >, rb_tree_tag,tree_order_statistics_node_update> 
 
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
  
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
  
const int inf = int(1e9);
const ll INF = ll(1e16);
const int mod = inf + 7;
const int N = 1e6 + 555; // TL MB
const double PI = acos(-1.0);
void mul(ll &x, ll y){
	x *= y;
	if(x >= mod) x %= mod;
} 
ll bp(ll a, ll n){
	ll r = 1;
	while(n){
		if(n & 1) mul(r, a);
		mul(a, a);
		n >>= 1;
	}
	return r; 
}
template<typename T_vector> // neal
void output_vector(const T_vector &v, bool add_one = false, int start = -1, int end = -1) {
    if (start < 0) start = 0;
    if (end < 0) end = int(v.size());
 
    for (int i = start; i < end; i++)
        cout << v[i] + (add_one ? 1 : 0) << (i < end - 1 ? ' ' : '\n');
}
int get(char c){
	if(c >= 'A') c = tolower(c);
	return c;
}
void solve()
{ 
	int n;
	cin >> n;
	bool ok = 0;
	int cnt = 0;
	rep(i, n){
		int a, b;
		cin >> a >> b;
		if(a == b) cnt++;
		else cnt = 0;
		if(cnt == 3) ok = 1;
	}
	cout << (ok ? "Yes" : "No");
}
	


int main()
{
	// freopen("input.txt", "r", stdin);
	// freopen("output.txt", "w", stdout);
    // Red;
  	int T = 1;
  	// cin >> T;
  	for(int i = 1; i <= T; ++i){
  		solve();
  	}
  	return 0;

}

Measured memory_bytes: 3632
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		int N,K;
		N=scan.nextInt();
		K=scan.nextInt();
		int h[]=new int[N];
		int i,count=0;
		for(i=0;i<N;i++){
			h[i]=scan.nextInt();
		}
		for(i=0;i<N;i++){
			if(K<=h[i])count++;
		}
		System.out.print(count);
	}
}

Measured memory_bytes: 49984
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <numeric>
using namespace std;
typedef long long unsigned int ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

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


int main() {

  ll N, K;

  cin >> N >> K;

  ll mm = N / K;

  ll ans = mm * mm * mm;

  if (K % 2 == 0) {
    if (N % K * 2 >= K) {
      ans += (mm + 1) * (mm + 1) * (mm + 1);
    } else {
      ans *= 2;
    }
  }

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


Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <complex>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <iomanip>
#include <assert.h>
#include <array>
#include <cstdio>
#include <cstring>
#include <random>
#include <functional>
#include <numeric>
#include <bitset>
#include <fstream>

using namespace std;

struct before_main{before_main(){cin.tie(0); ios::sync_with_stdio(false);}} before_main;

#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
#define all(c) (c).begin(), (c).end()
#define zero(a) memset(a, 0, sizeof a)
#define minus(a) memset(a, -1, sizeof a)
#define watch(a) { cout << #a << " = " << a << endl; }
template<class T1, class T2> inline bool minimize(T1 &a, T2 b) { return b < a && (a = b, 1); }
template<class T1, class T2> inline bool maximize(T1 &a, T2 b) { return a < b && (a = b, 1); }
template<class T> constexpr bool in_range(T y, T x, T H, T W) { return 0<=y&&y<H&&0<=x&&x<W; }

typedef long long ll;
int const inf = 1<<29;

int dx[4] = {-1,0,1,0};
int dy[4] = {0,-1,0,1};

int H, W;

void solve(vector<string>& G) {

  int res = 0;

  while(1) {
    bool ok = 0;
    rep(i, H) rep(j, W) {
      if(G[i][j] == '.') {
        map<char, vector<pair<int, int>>> mp;
        rep(k, 4) {
          int y = i, x = j;
          while(1) {
            y += dy[k], x += dx[k]; if(!in_range(y, x, H, W)) break;
            if(G[y][x] != '.') {
              mp[G[y][x]].emplace_back(y, x);
              break;
            }
          }
        }

        for(auto && e: mp) {
          if(e.second.size() > 1) {
            G[e.second[0].first][e.second[0].second] = '.';
            G[e.second[1].first][e.second[1].second] = '.';
            res += 2;
            ok = 1;
          }
        }
      }
    }
    if(!ok) break;
  }
  cout << res << endl;
}

int main() {

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

  rep(i, H) rep(j, W) {
    if(isalpha(G[i][j])) {
      rep(k, 4) {
        int ni = i + dy[k], nj = j + dx[k];
        if(!in_range(ni, nj, H, W)) continue;
        if(G[ni][nj] == '.') G[ni][nj] = '-';
      }
    }
  }

  int k = 0;
  rep(i, H) {
    if(G[i] != string(W, '.'))
      G[k++] = G[i];
  }
  H = k;

  vector<string> T(W); rep(i, W) T[i].resize(H);
  rep(i, W) rep(j, H) {
    T[i][j] = G[j][i];
  }

  k = 0;
  rep(i, W) {
    if(T[i] != string(H, '.'))
      T[k++] = T[i];
  }

  W = k;

  G.clear(); G.resize(H); rep(i, H) G[i] = string(W, '.');

  rep(i, H) rep(j, W)
    G[i][j] = T[j][i] == '-' ? '.' : T[j][i];

//  rep(i, H) cout << G[i] << endl;

  solve(G);

  return 0;
}

Measured memory_bytes: 3496
// 177

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <queue>
#include <iomanip>
#include <climits>
#include <string>
#include <cmath>

using namespace std;

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


Measured memory_bytes: 3720
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <cmath>
#include <map>
#include <string.h>
#include <algorithm>
#include <bits/stdc++.h>
#include <vector>

using namespace std;
#define set_precision cout << fixed << setprecision(10)
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repb(i, a, b) for (int i = a; i >= b; i--)
#define repit(arr) for (auto it = arr.begin(); it != arr.end(); it++)
#define vi vector<int>
#define vl vector<long long int>
#define Vi vector<vector<int>>
#define vpi vector<pair<int,int>>
#define seti set<int>
#define setl set<ll>
#define dseti set<int, greater<int>>
#define dsetl set<ll, greater<ll>>
#define mseti multiset<int>
#define msetl multiset<ll>
#define dmseti multiset<int, greater<int>>
#define dmsetl multiset<ll, greater<ll>>
#define sortA(arr) sort(arr.begin(), arr.end())
#define dsortA(arr) sort(arr.begin(), arr.end(), greater<int>())
#define ssort(arr) stable_sort(arr.begin(), arr.end())
#define nth(v,n) nth_element(v.begin,v.begin+n-1,v.end())
#define dnth(v,n) nth_element(v.begin,v.begin+n-1,v.end(),, greater<int>())
#define pb push_back
#define ll long long

int fact(int n) 
{ 
    int res = 1; 
    for (int i = 2; i <= n; i++) 
        res = res * i; 
    return res; 
}
int nCr(int n, int r) 
{ 
    return fact(n) / (fact(r) * fact(n - r)); 
}
int cel(int a,int b){return((a-1)/b+1);} 
int gcd(int a, int b)
{
    if (a < b)
        swap(a, b);
    if (b == 0)
        return a;
    else
        return gcd(b, a % b);
}
int lcm(int a,int b){
    return (a*b)/gcd(a,b);
} 
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int a,b,c,k,x=0,y;
    cin>>a>>b>>c>>k;
    if(a==b){b*=2;x++;}
    else if(a>b){
        while(b<=a){
            b*=2;x++;
        }
    }
    while(c<=b){
        c*=2;x++;
    }
    //cout<<x<<" ";
    if(x<=k)cout<<"Yes";
    else cout<<"No";
    return 0;
}

Measured memory_bytes: 3648
#ifdef __LOCAL
  #define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
using namespace std;
template<typename T> bool chmax(T &a,T b) {if(a<b) {a=b; return true;} return false;}
template<typename T> bool chmin(T &a,T b) {if(a>b) {a=b; return true;} return false;}
#define itn int
#define fi first
#define se second
#define intmax numeric_limits<int>::max()
#define llmax numeric_limits<ll>::max()
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define rrep1(i,n) for(int i=(int)(n);i>=1;i--)
#define all(vec) vec.begin(),vec.end()
#define sortt(vec) sort((vec).begin(),(vec).end())
#define rsort(vec) sort((vec).rbegin(), (vec).rend())
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
typedef tuple<ll,ll,ll> tlll;
typedef tuple<int,int,int> tiii;
const ll mod=1e9+7;
const int inf=1<<30;
const ll lnf=1ll<<60;

ll pm[55];
ll pc[55];

int prevv[100010]; //頂点の最大数
struct edge{
  int to;
  int money;
  ll cost; //=time
};

vector<vector<ll> > dijkstra(int n,vector<vector<edge> > G,int sv,int sm){
  fill(prevv,prevv+n,-1);
  priority_queue<tlll,vector<tlll>,greater<tlll> > que;
  vector<vector<ll> > dist(n,vector<ll>(2500,lnf));
  dist[sv][sm]=0;
  que.push(tlll(0,sv,sm));
  while(!que.empty()){
    ll cost,m; int v;
    tie(cost,v,m)=que.top();
    que.pop();
    if(dist[v][m]<cost) continue;
    if(m+pm[v]<2500){ //一回のみ補充
      ll nm=m+pm[v];
      ll nc=cost+pc[v];
      if(dist[v][nm]>nc){
        dist[v][nm]=nc;
        que.push(tlll(dist[v][nm],v,nm));
      }
    }
    for(int i=0;i<G[v].size();i++){
      edge e=G[v][i];
      ll ec=e.cost;
      ll nm=m-e.money;
      int nv=e.to;
      if(nm>=0&&dist[nv][nm]>dist[v][m]+ec){
        dist[nv][nm]=dist[v][m]+ec;
        prevv[nv]=v;
        que.push(tlll(dist[nv][nm],nv,nm));
      }
    }
  }
  return dist;
}

//頂点への最短路
vector<int> get_path(int t){
  vector<int> path(0);
  for(;t!=-1;t=prevv[t]) path.push_back(t);
  reverse(path.begin(),path.end());
  return path;
}

int main(){
  itn n,m,s; cin >> n >> m >> s;
  if(s>=2500) s=2499;
  vector<vector<edge> > g(n,vector<edge>(0));
  rep(i,m){
    itn u,v,a,b;
    cin >> u >> v >> a >> b;
    u--; v--;
    g[u].push_back({v,a,b});
    g[v].push_back({u,a,b});
  }
  rep(i,n){
    itn c,d;
    cin >> c >> d;
    pm[i]=c;
    pc[i]=d;
  }
  vector<vector<ll> > dist=dijkstra(n,g,0,s);
  vector<ll> ans(n,lnf);
  rep(i,n)rep(j,2500){
    chmin(ans[i],dist[i][j]);
  }
  rep1(i,n-1) cout << ans[i] << endl;
}

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

using namespace std;

int n,k,a[200001];

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

void process()
{
    for (int i=k+1;i<=n;++i)
    {
        if (a[i]>a[i-k])
            cout<<"Yes";
        else cout<<"No";
        cout<<"\n";
    }
}

int main()
{
    nhap();
    process();
    return 0;
}


Measured memory_bytes: 4404
use std::io::{self, Read};

macro_rules! input {
    ($it: expr) => ($it.next().unwrap().parse().unwrap());
    ($it: expr, $T: ty) => ($it.next().unwrap().parse::<$T>().unwrap());
}

fn main() {
    let mut buf = String::new();
    io::stdin().read_to_string(&mut buf).unwrap();

    let mut it = buf.split_whitespace();

    let a: String = input!(it);
    let b: String = input!(it);

    let ai = a.parse::<u64>().unwrap();
    let bi = b[0..1].parse::<u64>().unwrap() * 100 + b[2..4].parse::<u64>().unwrap();

    println!("{}", ai * bi / 100);
}


Measured memory_bytes: 2160
#include<iostream>
#include <algorithm>
using namespace std;
int main()
{
int a,b,c,d;
int from,until;
cin >> a >> b >> c >> d;
if(a>c){
  if(a>=d){
    cout<<0<<endl;
  }else{
    cout<<min(b,d)-a<<endl;
  }
}

if(a<=c){
  if(c>=b){
    cout<<0<<endl;
  }else{
    cout<<min(b,d)-c<<endl;
  }
}

}

Measured memory_bytes: 256
x,n = map(int,input().split())
l = list(map(int,input().split()))
if n == 0:
    print(x)
    exit()
sa = 0
ansa,ansb = x,x
while ansa in l and ansb in l:
    ansa -= 1
    ansb += 1
if not ansa in l:
    print(ansa)
else:
    print(ansb)
    
    


Measured memory_bytes: 61360
#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<string>
#include<algorithm>
#include<numeric>
#include<cmath>
#include<queue>
#include<stack>
#include<list>
#include<unordered_map>
#include<unordered_set>
#include<cctype>
#include<iomanip>

using namespace std;
typedef long long int ll;typedef pair<int, int> P;
const long long mod = 1e9 + 7;
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(a) (a).begin(),(a).end()
#define allg(a) (a).begin(),(a).end(),greater<>()
#define SUM(a) accumulate((a).begin(),(a).end(),0)
const double PI = 3.14159265359;

int main(void) {
	string str; cin >> str;
	sort(all(str));
	if (str.length() % 2 == 1) {
		cout << "No" << endl;
		return 0;
	}
	bool x = 1;
	for (int i = 0; i < str.length(); i += 2) {
		if (str[i] != str[i + 1])x = 0;
	}
	cout << (x ? "Yes" : "No") << endl;
	return 0;
}

Measured memory_bytes: 256
// A Dynamic Programming based 
// C# program to find minimum 
// number operations to 
// convert str1 to str2 
using System;
using System.Collections.Generic;
using System.Linq;

class GFG
{

    public static void Main()
    {
        var input = Console.ReadLine().Split(' ');

        var a = long.Parse(input[0]);
        var b = long.Parse(input[1]);
        var c = long.Parse(input[2]);
        var k = long.Parse(input[3]);

        if (a + b <= k && c >= 0)
        {
            var diff = Math.Abs(a + b-k);
            if (diff <= c)
                Console.Write((a) * (1 + 0) - 1 * diff);
            else
                Console.Write((a) * (1 + 0) - 1 * c);
        }
        else
        {
            var diff = Math.Abs(a + b-k);
            Console.Write((a + (b - diff)) * (1 + 0));
        }

    }

}

Measured memory_bytes: 17872
#http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_2_D
#?????§????????????
#??????????????????????????????????????????????????\?????????????????¨??????
#???????????????????????????????????????????????????????????????????????????

cnt = 0
def insertion_sort(target_list,g):
    maxlen = len(target_list)
    global cnt
    for focus_index in range(g, maxlen):
        target = target_list[focus_index]
        
        if target < target_list[focus_index - g]:
            compare_index = focus_index - g

            while compare_index >= 0 and target_list[compare_index] > target:
                target_list[compare_index + g] = target_list[compare_index]
                compare_index = compare_index - g;
                cnt += 1
                
            target_list[compare_index + g] = target
    
    return target_list

def shell_sort(target_list):

    g = []
    g_value = 1
    while g_value <= len(target_list):
        g.append(g_value)
        g_value = 3 * g_value + 1
    g = g[::-1]
    
    print(len(g))
    print(*g)
    for i in range(0,len(g)):
        insertion_sort(target_list, g[i])

def main():
    n_list = int(input())
    target_list = [int(input()) for n in range(n_list)]
    cc = shell_sort(target_list)
    print(cnt)
    print("\n".join([str(n) for n in target_list]))
    
    
if __name__ == "__main__":
    main()

Measured memory_bytes: 127948
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import reduce
import math
import itertools
import heapq
#import numpy as np
import bisect
import sys
#import sympy
sys.setrecursionlimit(10**6)


def bfs(s, n, node):
    # 頂点が探索済みかどうかのチェック配列
    check = [False for _ in range(n)]
    check[s] = True
    # 次見る頂点を格納するキュー
    queue = deque([s])
    visited_num = 1

    # 問題固有の配列
    #color_check=[[True for _ in range(l)] for _ in range(n)]
    color = [-1 for _ in range(n)]
    color[s] = 0

    while visited_num < n:
        # グラフが全連結ではない場合
        if len(queue) == 0:
            # 空配列を返す
            # 現状までの計算済み配列を返してもいいと思う
            return color

        now_vertex = queue.popleft()
        # インデックスがない場合は
        for next_vertex in node[now_vertex]:

            if check[next_vertex] == True:
                continue

            queue.append(next_vertex)
            check[next_vertex] = True

            # 問題固有の計算
            color[next_vertex] = color[now_vertex]+1
            visited_num += 1

    return color


mod = 10**9+7
# n=int(input())
# n,m=list(map(int,input().split()))
# a=list(map(int,input().split()))
def ceil(x, y): return (x+y-1)//y
def input_list(): return list(map(int, input().split()))


n = int(input())
n -= 1
num = 26
ans = []
while n >= num:
    k = n % num
    ans.append(k)
    n //= num
    n -= 1
ans.append(n)
# print(ans)
ans = (list(map(lambda x: chr(x+ord("a")), ans)))
print("".join(ans)[::-1])


Measured memory_bytes: 9576
n,m,x,y=gets.split.map &:to_i
a=gets.split.map &:to_i
b=gets.split.map &:to_i
ans1= b.min-(a.max+1)>=0? 1:0
ans2= ((a.max+1)-x>0 && y-(a.max+1)>=0)? 1:0
puts ans1+ans2>=2 ? "No War" :"War"


Measured memory_bytes: 14308
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2,
     1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

k = int(input())

print(a[k-1])


Measured memory_bytes: 2940
#include<cstdio>
#include<iostream>
#include<cstring>
#include<vector>
#include<queue>
#include<set>
#include<cmath>
#include<algorithm>
#include<map>
#include<cstdlib>
#include<stack>
#include<sstream>
#include<string>
#include<cassert>
#include<ctime>
#include<functional>
#include<deque>
#include<bitset>
#include<unordered_set>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
int kase = 0;
int n, m;
const int maxn = 200000 + 10;
ll a[maxn];
ll sum[maxn] = { 0 };

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	cin >> n;
	for (int i = 1; i <= n; i++)
	{
		cin >> a[i];
		//scanf("%lld", &a[i]);
		sum[i] = sum[i - 1] + a[i];
	}
	ll ans = 100000000000000000ll;
	ll all = sum[n];
	for (int i = 1; i < n; i++)
	{
		ans = min(ans, abs(all - 2 * sum[i]));
	}
	//printf("%lld\n", ans);
	cout << ans << endl;
}

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

signed main(){
  string S;
  cin>>S;
  int be=0,en=0,SS=S.size();
  for(int i=0;i<SS;i++){
    if(S[i]=='A'){
      be=i;
      break;
    }
  }
  for(int j=SS-1;1<j;j--){
    if(S[j]=='Z'){
      en=j;
      break;
    }
  }
  cout<<en-be+1<<endl;
}

Measured memory_bytes: 640
//#include<bits/stdc++.h>
#include<iostream>
//#include<vector>
//#include<map>
//#include <iomanip>
//#include<cstring>
//#include<string>
//#include<cmath>
#include<stack>
#include<queue>
#include<algorithm>
#define ll long long
#define eps 1e-9
#define endl "\n"
#define PI acos(-1)
#define pb push_back
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL)
#define rep(j,n) for(int j=0;j<n;j++)
using namespace std;
/*
ll mod=1e9+7;
bool f(const pair<ll,ll>&a,const pair<ll,ll>&b)
{
    return (a.first<b.first);
}
bool f2(const pair<ll,ll>&a,const pair<ll,ll>&b)
{
    return (a.second<b.second);
} */

int main()
{
    fast;
    string a,b;
    cin>>a>>b;
    int al=a.length();
    int bl=b.length();
    if(al>bl)
    {
        cout<<"GREATER"<<endl;
    }
    else if(al<bl)
    {
        cout<<"LESS"<<endl;
    }
    else
    { //length equal
        int g=0,l=0,e=0;
        for(int i=0;i<al;i++)
        {
            if(a[i]>b[i])
            {
                g=1;
                e=1;
                break;
            }
            else if(a[i]<b[i])
            {
                l=1;
                e=1;
                break;
            }

        }
        if(e==0)
        {
            cout<<"EQUAL"<<endl;
        }
        else if(e==1&&g==1)
        {
            cout<<"GREATER"<<endl;
        }
        else
        {
            cout<<"LESS"<<endl;
        }



    }

    return 0;
}


Measured memory_bytes: 3620
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<map>
#define int long long
#define ll long long
using namespace std;
signed main() {
	string s;
	cin >> s;
	s[5] = ' ';
	s[13] = ' ';
	cout << s << endl;
	getchar(); getchar(); return 0;
}

Measured memory_bytes: 256
S = input()

L = []
for i in range(len(S) - 2):
    m = int(S[i] + S[i + 1] + S[i + 2])
    L.append(m)

# print(L)
m = 10**4
for i in range(len(L)):
    m = min(m, abs(753 - L[i]))

print(m)


Measured memory_bytes: 2940