akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>

using ll = long long;
#define int long long

// [a -> b-1]
#define reps(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
// [0 -> a-1]
#define rep(i, a) reps(i, 0, (a))
// [a-1 -> b]
#define rreps(i, a, b) for (int i = (int)((a)-1); i >= (int)(b); i--)
// [a-1 -> 0]
#define rrep(i, a) rreps(i, a, 0)
#define all(v) (v).begin(), (v).end()
// next_permutation(all(v))
#define PERM(v) next_permutation(all(v))
/*sort(all(v));
 * (v).erase(unique(all(v)), v.end())*/
#define UNIQUE(v)\
	sort(all(v));\
	(v).erase(unique(all(v)), v.end())
#define MINV(v) min_element(all(v))
#define MAXV(v) max_element(all(v))
#define MIN3(a, b, c) min(min(a, b), c)
#define MIN4(a, b, c, d) min(MIN3(a, b, c), d)
#define MIN5(a, b, c, d, e) min(MIN4(a, b, c, d), e)
#define MIN6(a, b, c, d, e, f) min(MIN5(a, b, c, d, e), f)
#define MAX3(a, b, c) max(max(a, b), c)
#define MAX4(a, b, c, d) max(MAX3(a, b, c), d)
#define MAX5(a, b, c, d, e) max(MAX4(a, b, c, d), e)
#define MAX6(a, b, c, d, e, f) max(MAX5(a, b, c, d, e), f)
// b is [a, c)
#define RANGE(a, b, c) ((a) <= (b) && (b) < (c))
// c is [a, e) && d is [b, f)
#define RANGE2D(a, b, c, d, e, f) (RANGE((a), (c), (e)) && RANGE((b), (d), (f)))
#define chmin(a, b) a = min(a, (b))
#define chmin3(a, b, c) a = MIN3(a, (b), (c))
#define chmin4(a, b, c, d) a = MIN4(a, (b), (c), (d))
#define chmin5(a, b, c, d, e) a = MIN5(a, (b), (c), (d), (e))
#define chmin6(a, b, c, d, e, f) a = MIN6(a, (b), (c), (d), (e), (f))
#define chmax(a, b) a = max(a, (b))
#define chmax3(a, b, c) a = MAX3(a, (b), (c))
#define chmax4(a, b, c, d) a = MAX4(a, (b), (c), (d))
#define chmax5(a, b, c, d, e) a = MAX5(a, (b), (c), (d), (e))
#define chmax6(a, b, c, d, e, f) a = MAX6(a, (b), (c), (d), (e), (f))
#define fcout cout << fixed << setprecision(15)
#define YES(f) cout << ((f) ? YES_STR : NO_STR) << endl;

using namespace std;

vector<vector<char>> v(10);

int solve(int n, int m, int p) {
	int sum = 0;
	int g;
	rep(i, n) {
		int x; cin >> x; sum += x * 100;
		if (i + 1 == m) g = x;
	}
	if (g == 0) return 0;
	return sum * (100 - p) / 100 / g;
}

signed main() {
	int n, m, p;
	while (cin >> n >> m >> p, n) cout << solve(n, m, p) << endl;
}




Measured memory_bytes: 2996
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1000000007;
const ld PI = acos(-1);  
const ld EPS = 0.0000000001;


int main(){
    ll a, b, c, k;  cin >> a >> b >> c >> k;
    ll sum = 0;
    sum += min(a, k);
    k -= min(a, k);
    k -= min(b, k);
    sum -= min(c, k);
    cout << sum << endl;
}



Measured memory_bytes: 3636
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<functional>
#include<string.h>
#include<bitset>
#include<set>
using namespace std;
int day, N, ans;
int d[201], n[201][3];
int dp[201][201];
int main(){
	cin >> day >> N;
	for (int i = 1; i <= day; i++)
		cin >> d[i];
	for (int i = 1; i <= N; i++)
		cin >> n[i][0]>>n[i][1]>>n[i][2];
	for (int i = 0; i < 201; i++)
		fill(dp[i], dp[i] + 201, -1);
	for (int i = 1; i <= day; i++){
		for (int j = 1; j <= N; j++){
				if (d[i] >= n[j][0] && d[i] <= n[j][1]){
					if (i == 1){
						dp[1][j] = 0;
						continue;
					}
					for (int k = 1; k <= N; k++){
						if (dp[i - 1][k] != -1)
							dp[i][j] = max(dp[i][j], abs(n[j][2] - n[k][2]) + dp[i - 1][k]);
				}
			}
				if (i == day)
					ans = max(dp[i][j], ans);
		}
	}
	
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 1324
using System;
using System.IO;

class Solve{
    static void Main(string[] args){
        var arr = Array.ConvertAll(Console.ReadLine().Split(),int.Parse);
        int N = arr[0], M = arr[1], X = arr[2];
        var A = Array.ConvertAll(Console.ReadLine().Split(), int.Parse);
        var i = 0;
        for (; i < M; i++) 
            if (A[i] > X) break;
        var answer = i < M - i ? i : M - i;
        var writer = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
        Console.SetOut(writer);
        Console.WriteLine(answer);
        Console.Out.Flush();}}

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

int main(){
    string s;
    cin >> s;
    int l = s.length();
    int c = 0;
    int ans;
    for (int i=0; i<l; i++){
        if (s[i] == 'A'){
            c += 1;
        }
        else if (c > 0){
            c += 1;
            if (s[i] == 'Z'){
                ans = c;
            }
        }
    }
    cout << ans << endl;
}

Measured memory_bytes: 640
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <climits>

#define rep(i, m, n) for(int i=int(m);i<int(n);i++)
#define EACH(i, c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s, e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

//#define LOCAL 0
//#ifdef LOCAL
//#define DEBUG(s) cout << (s) << endl
//#define dump(x)  cerr << #x << " = " << (x) << endl
//#define BR cout << endl;
//#else
//#define DEBUG(s) do{}while(0)
//#define dump(x) do{}while(0)
//#define BR
//#endif


//改造
typedef long long int ll;
using namespace std;
#define INF (1 << 30) - 1
#define INFl (ll)5e15
#define DEBUG 0 //デバッグする時1にしてね
#define dump(x)  cerr << #x << " = " << (x) << endl
#define MOD 1000000007
//ここから編集する


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

    string s;
    cin >> s;
    sort(all(s));
    if (s == "abc") {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }


    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <stack>

using namespace std;

main(){
  char c;
  while(scanf("%c", &c) != EOF){
    if(c == '.') break;
    stack<char> data;
    bool f = true;
    while(c != '\n'){
      if(f){
        if(c == '(' || c == '[') data.push(c);
        if(c == ')'){
          if(data.size() == 0 || data.top() != '(') f = false;
          else data.pop();
        }
        if(c == ']'){
          if(data.size() == 0 || data.top() != '[') f = false;
          else data.pop();
        }
      }
      scanf("%c", &c);
    }
    cout << (data.size() == 0 && f ? "yes" : "no") << endl;
  }
}

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

int main(){
 int total;
 int books;

        
 while(true){
  cin>>total;
  if(total==0){
    break;
  }
 for(int i=0;i<9;i++){
   cin>>books;
   total-=books;
 }
 cout<<total<<"\n";
}	
return 0;
}

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

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

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define dep(i, a, n) for(int i = a; i >= (n); i--)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll
#define INF 100000000

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}


signed main() {
	int n;
  cin >> n;
  vector<int> result;
  while(n != 0) {
    result.pb(abs(n % 2));
    if(n % 2 == 0) n /= (-2);
    else n = (n - 1) / (-2);
  }
  dep(i, result.size() - 1, 0) cout << result[i];
  if(result.size() == 0) cout << 0;
  cout << endl;
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <set>       // ヘッダファイルインクルード
using namespace std;

int main(){
    int length;
    string str;
    cin >> length;
    cin >> str;
    int max = 0;
    for(int i = 1; i < str.length(); i ++){
        set<char> result;
        string str1;
        string str2;
        str1 = str.substr(0, i);
        str2 = str.substr(i, str.length() - i);
        for(int n = 0; n < str1.length(); n ++){
            for(int j = 0; j < str2.length(); j ++){
                if(str1[n] == str2[j]){
                    result.insert(str1[n]);
                }
            }
        }
        if(max < result.size()){
            max = result.size();
        }
    }
    cout << max << endl;  
    return 0;
}

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

#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define pow(x) x*x
#define ll long long
static const ll MAX = 1000000;
static const ll INFTY = 1e12;

struct edge {
    ll to, cost;
};

using Graph = vector<vector<int>>;
using _Graph = vector<vector<edge>>;
// 入力
int H, W;
vector<vector<char>> field;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

// 深さ優先探索
vector<bool> seen;
vector<int> colors;


int main() {

    int N;
    cin >> N;
    vector<int> A(N);
    double sum = 0;
    REP(i, N){
        cin >> A[i];
        sum += (double)(1.0 / A[i]);
    }
    cout << (double)1.0/sum << endl;

   

    
    
}
/*
                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-`  ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ` : | |
     \  \ `-.   \_ __\ /__ _/   .-` /  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         pass System Test!
*/


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

int main() {
  int n, m;
  cin >> n >> m;
  vector<int> l(m);
  vector<int> r(m);
  for(int i = 0; i < m; i++) cin >> l.at(i) >> r.at(i);
  
  int mn = 1, mx = n;
  for(int i = 0; i < m; i++){
    mn = max(mn, l.at(i));
    mx = min(mx, r.at(i));
  }
  
  cout << max(0, mx - mn + 1) << endl;
}

Measured memory_bytes: 1024
#include<stdio.h>

int minof(int min,int y){
  min = (min < y) ? min:y;
  return min;
}

int main() {
  int min[51], gram, i, j, k, l;
  while(1) {
    scanf("%d", &gram);
    if(gram == 0) {
      break;
    };
    gram /= 100;
    for (l = 0; l < 51; l += 1) {
      min[l] = 100000;
    };
    for(i = 0; i < 26; i += 1) {
      for(j = 0; j < 17; j += 1) {
        for(k = 0; k < 11; k += 1) {
          if(2 * i + 3 * j + 5 * k == gram) {
            min[2 * i + 3 * j + 5 * k] = minof(min[2 * i + 3 * j + 5 * k],(i / 5) * 1520 + (i % 5) * 380 + (j / 4) * 1870 + (j % 4) * 550 + (k / 3) * 2244 + (k % 3) * 850);
          };
        };
      };
    };
    printf("%d\n", min[gram]);
  };
  return 0;
}

Measured memory_bytes: 600
#include<cstdio>
#include<iostream>
#include<ctime>
#include<string.h>
#include<algorithm>
#include<cmath>
char a[100010];
bool used[100010];
using namespace std;
int main()
{
	scanf("%s",a);
	for(int i=0;i<strlen(a);i++)
	{
		used[a[i]-'a']=true;
	}
	for(int i=0;i<26;i++)
	{
		if(used[i]==false)
		{
			printf("%c",i+'a');
			return 0;
		}
	}
	printf("None");
	return 0;
}


Measured memory_bytes: 384
#include<bits/stdc++.h>
using namespace std;
#define ll long long

vector<vector<ll>> dp;

ll aCb(ll a, ll b){
    if(dp[a][b]!=-1){
        return dp[a][b];
    }
    if(a==b){
        return 1;
    }else if(b==0){
        return 1;
    }else if(b==1){
        return a;
    }else{
        return dp[a][b] = (aCb(a-1,b-1) + aCb(a-1,b) )%1000000007;
    }
}

int main(){
    ll n,k; cin>>n>>k;
    ll ANS=0;
    dp.assign(n,vector<ll>(n,-1));
    for(ll i=1;i<=k;i++){
        if(n==k){
            if(i==1){
                ANS = 1;
            }else{
                ANS = 0;
            }
        }else if(i==1){
            ANS = n-k+1;
        }else if(n-k+1<i){
            ANS = 0;
        }else{
            ANS = aCb(k-1,i-1);
            ANS %= 1000000007;
            ANS *= aCb(n-k+1,i);
            ANS %= 1000000007;
        }
        cout<< ANS << endl;
    }

}




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

using namespace std;

int main() {
	string deck;
	int m;
	while (cin >> deck && deck[0] != '-' && cin >> m) {
		deque<char> q;
		for (auto c: deck) {
			q.push_back(c);
		}
		while (m--) {
			int h;
			cin >> h;
			while (h--) {
				q.push_back(q.front());
				q.pop_front();
			}
		}
		deck = "";
		while (!q.empty()) {
			deck += q.front();
			q.pop_front();
		}
		cout << deck << '\n';
		cin.ignore();
	}
}


Measured memory_bytes: 3160
#include<iostream>
#include<algorithm>
#include<string>
#include<sstream>
using namespace std;
int main() {
  int n;
  cin >> n;
  int sn = 0;
  int m = n;
  while(n>0){
    sn += n%10;
    n /= 10;
  }
  string s;
  if(m%sn==0) s = "Yes";
  else s = "No";
  cout << s << endl;
  return 0;
}


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

int main() {
  string s;
  cin >> s;
  vector<bool> app(26);
  rep(i, s.size()) app[s[i] - 'a'] = true;
  rep(i, 26) if(!app[i]) {
    cout << string(1, i + 'a') << endl;
    return 0;
  }
  
  cout << "None" << endl;
  return 0;
}

Measured memory_bytes: 3728
# http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP2_7_B&lang=jp
#  Set: Delete: python3
#  2018.12.02 yonezawa

import sys
input = sys.stdin.readline
import collections

def main():
    tl = {}
    for i in range(int(input())):
        l = list(map(int,input().split()))

        #insert
        cmd = l[0]
        if cmd == 0:
            tl[l[1]] = 1
            print (len(tl))
        #find
        elif cmd == 1:
            c = 1 if l[1] in tl else 0
            print (c)
        #delete
        elif cmd == 2:
            d = l[1]
            try:
                tl.pop(d)
            except KeyError:
                None
if __name__ == '__main__':
    main()


Measured memory_bytes: 27024
#include <iostream>

int main(void) {
  int n, x;
  std::cin >> n >> x;

  int count = 1;
  int pos = 0;
  for (int i = 0; i < n; ++i) {
    int temp;
    std::cin >> temp;
    pos += temp;
    if (pos <= x) {
      ++count;
    }
  }

  std::cout << count << std::endl;
}

Measured memory_bytes: 256
#include<iostream>
#include<string>
#include<set>
#include<algorithm>
using namespace std;
int main() {
	string a, b;
	int aa[10001], bb[10001];
	cin >> a >> b;
	int len1 = a.size();
	int len2 = b.size();
	set<char> s1, s2;
	set<char>::iterator it;
	for (int i = 0; i<len1; i++)
		s1.insert(a[i]);
	int tot1 = 0, tot2 = 0;
	for (it = s1.begin(); it != s1.end(); it++)
	{
		for (int i = 0; i<len1; i++)
		{
			if (*it == a[i])
			{
				aa[tot1]++;
			}
		}
		tot1++;
	}
	for (int i = 0; i<len2; i++)
		s2.insert(b[i]);
	for (it = s2.begin(); it != s2.end(); it++)
	{
		for (int i = 0; i<len2; i++)
		{
			if (*it == b[i])
			{
				bb[tot2]++;
			}
		}
		tot2++;
	}
	if (s1.size() != s2.size())
		cout << "No" << endl;
	else
	{
		sort(aa, aa + tot1);
		sort(bb, bb + tot2);
		for (int i = 0; i<tot1; i++)
		{
			if (aa[i] != bb[i])
			{
				cout << "No" << endl;
				return 0;
			}
		}
		cout << "Yes" << endl;
	}
	return 0;
}

Measured memory_bytes: 776
N, K = map(int, input().split())

d = []
a = []
for i in range(K):
    d.append(int(input()))
    a.append(list(map(int, input().split())))
    
s = set([i for i in range(1, N+1)])
ss =  set()
for i in a:
    ss = ss | set(i)
print(len(s - ss))

Measured memory_bytes: 9212
// God put a smile upon your face <3

#include <bits/stdc++.h>`

#define slld(longvalue) scanf("%lld", &longvalue)

#define ll long long
#define ull unsigned long long
#define pll pair < long long, long long >

#define fastio ios_base:: sync_with_stdio(false); cin.tie(0); cout.tie(0)

#define pb push_back

#define bug printf("BUG\n")

#define mxlld LLONG_MAX
#define mnlld -LLONG_MAX

#define mxd 2e8
#define mnd -2e8

#define pi 3.14159265359

#define mod 958585860497

#define base 2001487

using namespace std;

bool check(ll n, ll pos)
{
	return n & (1LL << pos);
}

ll Set(ll n, ll pos)
{
	return n = n | (1LL << pos);
}

int main()
{
    ll i, j, k, l, m, n, o, r, q;
    ll testcase;
    ll input, flag, tag, ans;

//    freopen("input.txt", "r", stdin);

//    freopen("output.txt", "w", stdout);

//    slld(testcase);

	while(cin >> n)
	{
		ans = 0;

		for(ll i = 1; i <= n; i++)
		{
			ll lim = (n / i);

//			cout << lim << endl;

			ans += ((lim * (lim + 1)) / 2) * i;
		}

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

}






Measured memory_bytes: 3620
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const ll INF = 1LL << 60;
const ll MOD = (int) 1e9 + 7;

int main(){
    int n;
    cin >> n;
    vector<pair<string, int>> v;
    for (int i = 0; i < n; i++)
    {
        string s;
        int t;
        cin >> s >> t;
        v.emplace_back(s, t);
    }
    string x;
    cin >> x;
    bool asleep = false;
    int ans = 0;
    for (int i = 0; i < n; i++)
    {
        if (asleep) {
            ans += v[i].second;
        }
        else {
            if (v[i].first == x) {
                asleep = true;
            }
        }
    }
    cout << ans << "\n";
}

Measured memory_bytes: 256
/* 
 * Author: aps
 * Time: 29-06-2019 18:49:40
**/
#include<bits/stdc++.h>

#define fi first
#define se second
#define pb push_back
#define all(x) x.begin(), x.end()

using namespace std;

typedef long long int ll;
typedef long double ld;
typedef pair<ll,ll> pll;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef pair<int,int> pii;

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

inline ll add(ll x, ll y) { x += y; if (x >= mod) x -= mod; return x;}
inline ll sub(ll x, ll y) { x -= y; if (x < 0) x += mod; return x;}
inline ll mul(ll x, ll y) { return ((x % mod) * (y % mod)) % mod;}
inline ll power(ll a, ll b) {
    ll x = 1;
    while (b) {
        if (b & 1) x = mul(x, a);
        a = mul(a, a);
        b >>= 1;
    }
    return x;
}
inline ll inv(ll a) { return power(a, mod - 2);}

const int N = 1e5+5;

vi g[3*N];
int n,m,s,t;
int d[3*N];

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0);
    cin >> n >> m;
    for(int i=0;i<m;i++){
        int u,v; cin >> u >> v;
        
        g[u].pb(v+N);
        g[u+N].pb(v+2*N);
        g[u+2*N].pb(v);
    }
    for(int i=0;i<3*N;i++) d[i] = -1;

    cin >> s >> t;

    queue<int> q;
    q.push(s);
    d[s]=0;

    while(!q.empty()){
        int u = q.front(); q.pop();
        if(u == t) break;
        for(int v: g[u]){
            if(d[v] == -1) {
                q.push(v);
                d[v] = d[u]+1;
            }
        }
    }

    if(d[t] != -1) d[t] /= 3;
    cout << d[t] << endl;
    return 0;
}


Measured memory_bytes: 17792
#include <iostream>

int main() {
    int N;
    std::cin >> N;

    int m = 0, k;
    std::cin >> k;
    for (int j = 0; j < k; ++j) {
        int i;
        std::cin >> i;
        m += (1 << i);
    }

    for (int b = 0; b < (1 << N); ++b) {
        if ((b & m) != m) continue;

        std::cout << b << ":";
        for (int i = 0; i < N; ++i) {
            if ((b >> i) & 1) std::cout << " " << i;
        }
        std::cout << std::endl;
    }
}


Measured memory_bytes: 3080
#include<bits/stdc++.h>
#define fo(i,a,b) for(int i=a;i<=b;i++)
using namespace std;

typedef long long LL;

LL a,b,c,k;

int main()
{
    scanf("%lld %lld %lld %lld",&a,&b,&c,&k);

    printf("%lld\n",(k&1) ?b-a :a-b );
}

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

int main()
{
    long long N;
    cin >> N;
    long long tmp = N;
    long long sum = 0;
    while (tmp > 0)
    {
        sum += tmp % 10;
        tmp /= 10;
    }
    if (N % sum == 0)
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }
}

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

int main(){
    long long n;
    cin >> n;
    string c;
    cin >> c;

    long long cnt_r = 0, cnt_w = 0;

    for(long long i = 0; i < n; i++){
        if(c[i] == 'R') cnt_r++;
        else cnt_w++;
    }

    long long change = 0;

    for(long long i = 0; i < cnt_r; i++){
        if(c[i] == 'W') change++;
    }
    cout << change << endl;
    return 0;
}

Measured memory_bytes: 3728
/// Thank you tanakh!!!
/// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

use std::collections::BinaryHeap;

#[derive(Copy, Clone, Eq, PartialEq, Debug)]
struct MinUsize(i64);

impl Ord for MinUsize {
    fn cmp(&self, other: &MinUsize) -> std::cmp::Ordering {
        other.0.cmp(&self.0)
    }
}

impl PartialOrd for MinUsize {
    fn partial_cmp(&self, other: &MinUsize) -> Option<std::cmp::Ordering> {
        Some(self.cmp(other))
    }
}

use std::cmp;

fn main() {
    input!(n: usize, a: [i64; 3 * n]);

    let mut bigger = vec![0; n + 1];
    let mut heap = BinaryHeap::new();
    let mut sum = 0;
    for i in 0..n {
        sum += a[i];
        heap.push(MinUsize(a[i]));
    }
    for i in 0..(n + 1) {
        bigger[i] = sum;
        sum += a[i + n];
        heap.push(MinUsize(a[i + n]));
        let removed = heap.pop().unwrap().0;
        sum -= removed;
        assert_eq!(heap.len(), n);
    }

    let mut heap = BinaryHeap::new();
    let mut sum = 0;
    let mut smaller = vec![0; n + 1];
    for i in 0..n {
        sum += a[3 * n - 1 - i];
        heap.push(a[3 * n - 1 - i]);
    }

    for i in 0..(n + 1) {
        smaller[i] = sum;
        let a = a[2 * n - 1 - i];
        sum += a;
        heap.push(a);
        let removed = heap.pop().unwrap();
        sum -= removed;
        assert_eq!(heap.len(), n);
    }

    let mut ans: i64 = std::i64::MIN;
    for i in 0..(n + 1) {
        ans = cmp::max(ans, bigger[n - i] - smaller[i]);
    }
    println!("{}", ans);
}


Measured memory_bytes: 18552
#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <deque>
#include <queue>
#include <array>
#include <set>
#include <map>
#include <cmath>
#include <algorithm>
#include <numeric>
#include <utility>
#include <tuple>
#include <functional>
#include <bitset>
#include <cstdint>
#include <cassert>

using namespace std;
using i64 = int64_t;
using i32 = int32_t;
template<class T, class U> void init_n(vector<T>& v, size_t n, U x) 
{ v = vector<T>(n, x); }
template<class T> void init_n(vector<T>& v, size_t n) { init_n(v, n, T()); }
template<class T> void read_n(vector<T>& v, size_t n, size_t o = 0) 
{ v = vector<T>(n+o); for (size_t i=o; i<n+o; ++i) cin >> v[i]; }
template<class T> void read_n(T a[], size_t n, size_t o = 0)
{ for (size_t i=o; i<n+o; ++i) cin >> a[i]; }
template<class T> T gabs(const T& x) { return max(x, -x); }
#define abs gabs

i64 n;
vector<i64> a, b;
int main() {
  cin >> n;
  read_n(a, n);
  read_n(b, n);
  i64 c = 0;
  for (i64 i = 0; i < n; ++i) {
    if (a[i] < b[i]) c += (b[i] - a[i]) / 2;
    else {
      c -= a[i] - b[i];
    }
  }
  cout << (c >= 0 ? "Yes" : "No") << endl;
  return 0;
}


Measured memory_bytes: 384
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define forn for(int i=0;i<n;i++)
#define pb push_back
#define pob pop.back()
int main()
{
  int a,b,c;
  cin>>a>>b>>c;
  if(a+b>=c) puts("Yes");
  else puts("No");
  return 0;
  
    
    
}

Measured memory_bytes: 256
#include <map>
#include <set>
#include <list>
#include <cmath>
#include <queue>
#include <stack>
#include <cstdio>
#include <string>
#include <vector>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <functional>
  
#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
  
using namespace std;
  
typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;
  
const int INF=1<<29;
const double EPS=1e-9;
  
const int dx[]={1,0,-1,0,1,1,-1,-1},dy[]={0,-1,0,1,1,-1,-1,1};


int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  sort(A.begin(), A.end());
  if (A[0] == A.back()) {
    cout << 1 << endl;
    return 0;
  }

  map<int,int> M;
  for (int i = 0; i < N; i++) {
    M[A[i]]++;
  }

  int cnt = 0;
  for(auto e : M) {
    if (e.second % 2 == 0) {
      cnt++;
    }
  }
  cout << M.size() - cnt % 2 << endl;
  return 0;
}

Measured memory_bytes: 5376
#include <bits/stdc++.h>
#include <numeric>
typedef long long ll;
#define rep(i,a,b) for(int i=a;i<b;++i)
#define rrep(i,a,b) for(int i=a;i>=b;--i)
using namespace std;

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

    int N; cin >> N;
    set<int> st;

    rep(i, 0, N) {
        int a;
        cin >> a;
        auto ret = st.insert(a);
        if (!ret.second) st.erase(a);
    }

    cout << st.size() << endl;
}

Measured memory_bytes: 4992
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define dunk(n) cout << n << endl
#define all(v) v.begin(), v.end()
typedef long long ll;



int main() {
    int n, m;
    cin >> n >> m;
    n++;
    vector<vector<int>> g(n);
    int a, b;
    rep(i,m){
        cin >> a >> b;
        g.at(a).push_back(b);
        g.at(b).push_back(a);
    }
    
    map<int,bool> check;
    check[1] = true;
    
    queue<int> q;
    q.push(1);
    
    map<int,int> ans;
    
    while(!q.empty()){
        int x = q.front(); q.pop();
        for(int y: g.at(x)){
            if(!check.count(y)){
                check[y] = true;
                q.push(y);
                ans[y] = x;
            }
        }
    }
  
    n--;
    
    if(check.size() != n) dunk("No");
    else{
        dunk("Yes");
        for(int i=2; i<=n; i++) dunk(ans[i]);
    }
    
    return 0;
}



Measured memory_bytes: 22268
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>
#include<stack>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

const double EPS=1e-10;
const double INF=1e+10;
const double PI=acos(-1.0);
int sig(double r){return (r<-EPS)?-1:(r>EPS)?1:0;}
struct Pt{
	double x,y;
	Pt(){}
	Pt(double x,double y):x(x),y(y){}
	Pt operator+(const Pt &a)const{return Pt(x+a.x,y+a.y);}
	Pt operator-(const Pt &a)const{return Pt(x-a.x,y-a.y);}
	Pt operator*(const Pt &a)const{return Pt(x*a.x-y*a.y,x*a.y+y*a.x);}
	Pt operator-()const{return Pt(-x,-y);}
	Pt operator*(const double &k)const{return Pt(x*k,y*k);}
	Pt operator/(const double &k)const{return Pt(x/k,y/k);}
	double abs()const{return sqrt(x*x+y*y);}
	double abs2()const{return x*x+y*y;}
	double arg()const{return atan2(y,x);}
	double dot(const Pt &a)const{return x*a.x+y*a.y;}
	double det(const Pt &a)const{return x*a.y-y*a.x;}
	bool operator<(const Pt &a)const{return x*a.x+y*a.y;}
	bool operator==(const Pt &a)const{return (sig(x-a.x)==0&&sig(y-a.y)==0);}
};
ostream &operator<<(ostream &os,const Pt &a){os<<"("<<a.x<<", "<<a.y<<")";return os;}
double tri(Pt a,Pt b,Pt c){return (b-a).det(c-a);}
bool iLS(Pt a,Pt b,Pt c,Pt d){
	return (sig(tri(a,b,c))*sig(tri(a,b,d))<0);
}

int main() {
	int n;
	while(n=in()){
		vector<Pt> vpt;
		double x,y;
		int i,j;
		for(i=0;i<n;i++){
			scanf("%lf,%lf",&x,&y);
			vpt.push_back(Pt(x,y));
		}
		int res=n;
		for(i=0;i<n-1;i++){
			int k=0;
			for(j=i+1;j<n;j++){
				int a,b;
				for(a=0;a<n-1;a++){
				if(a==i||a==j)continue;
					for(b=a+1;b<n;b++){
						if(b==i||b==j)continue;
						if(iLS(vpt[i],vpt[j],vpt[a],vpt[b]))goto batsu;
					}
				}
				k++;
				if(k==2)break;
				batsu:;
			}
			res-=k;
		}
		cout<<res<<endl;
	}
	return 0;
}

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

const int MAXN = 2e2 + 5;
const int INF = 0x3f3f3f3f;

int N;
char s[MAXN][MAXN];
int dist[MAXN][MAXN];

void load() {
	scanf("%d", &N);
	for (int i = 0; i < N; i++)
		scanf("%s", s[i]);
}

int solve() {
	memset(dist, INF, sizeof dist);
	for (int i = 0; i < N; i++)
		for (int j = 0; j < N; j++)
			if (i == j)
				dist[i][j] = 0;
			else if (s[i][j] == '1')
				dist[i][j] = 1;
	
	for (int k = 0; k < N; k++)
		for (int i = 0; i < N; i++)
			for (int j = 0; j < N; j++)
				dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j]);
	
	for (int k = 0; k < N; k++)
		for (int i = 0; i < N; i++)
			for (int j = 0; j < N; j++)
				if (dist[k][i] == dist[k][j] && s[i][j] == '1')
					return -1;
					
	int sol = 0;
	for (int i = 0; i < N; i++)
		sol = max(sol, *max_element(dist[i], dist[i] + N));
	
	return sol + 1;
}

int main() {
	load();
	printf("%d\n", solve());
	return 0;
}

Measured memory_bytes: 512
#include<iostream>
#include<vector>
#include<cmath>

using namespace std;

int main(){
  long long n,d,count = 0;
  vector<long long> x,y;
  cin >> n >> d;
  x.resize(n);
  y.resize(n);
  for(long long i = 0; i < n; i++){
    cin >> x[i] >> y[i];
  }
  
  for(long long i = 0; i < n;i++){
    if(d >= sqrt(x[i]*x[i] + y[i]*y[i])){
      count++;
    }
  }
  cout << count;
  return 0;
}

Measured memory_bytes: 6424
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma comment(linker, "/STACK:1024000000,1024000000")

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

#define pb push_back
#define F first
#define S second

#define f(i,a,b)  for(int i = a; i < b; i++)
// #define endl '\n'

using ll = long long;
using db = long double;
using ii = pair<int, int>;

const int N = 55, LG = 17, MOD = 1e9+7;
const int SQ = 320;
const long double EPS = 1e-7;
int cnt = 0;
vector<string> store[11];
void bt(string s = "", int sum = 0){
  if(sum > 7)return;
  store[sum].pb(s);
  f(i,0,7){
    s.pb('0' + i);
    bt(s,sum+i+1);
    s.pop_back();
  }
}
const int M = 10;
int trie[N*N*N][M];
int go[N*N*N][M];
int mrk[N*N*N], f[N*N*N];
int ptr = 1;
void BFS(){

  queue<int> q;
	for(int i = 0; i < M; i++)
		if(trie[0][i])
			q.push(trie[0][i]), f[trie[0][i]] = 0;
	for(int i = 0; i < M; i++) go[0][i] = trie[0][i];
	while(!q.empty()) {
		int x = q.front(); q.pop();
		for(int i = 0; i < M; i++) {
			if(trie[x][i]) {
				int y = trie[x][i];
				f[y] = f[x];
				while(f[y] && !trie[f[y]][i])
					f[y] = f[f[y]];
				if(trie[f[y]][i]) f[y] = trie[f[y]][i];
				q.push(y);
			}
			if(trie[x][i]) go[x][i] = trie[x][i];
			else go[x][i] = go[f[x]][i];
		}
	}

}
void ins(string x){
  int cur = 0;
  for(int i = 0; i < x.size(); i++){
      if(!trie[cur][x[i]-'0'])
        trie[cur][x[i]-'0'] = ptr++;
      cur = trie[cur][x[i]-'0'];
  }
  mrk[cur] = true;
}
int dp[N][N*N*N][2];
int n, x, y, z;
int solve(int idx, int state, bool f){
  f|=mrk[state];
  if(idx == n)
    return f;
  int &ret = dp[idx][state][f];
  if(~ret)
    return ret;
  ret = 0;
  f(j,0,10){
    ret += solve(idx+1,go[state][j], f);
    if(ret>=MOD)ret-=MOD;
  }
  return ret;
}
int32_t main(){
#ifdef ONLINE_JUDGE
  ios_base::sync_with_stdio(0);
  cin.tie(0);
#endif // ONLINE_JUDGE



  bt();

  cin >> n >> x >> y >> z;

  for(auto X : store[x])
    for(auto Y : store[y])
      for(auto Z : store[z])if(X.size()+Y.size()+Z.size()<=n)
        ins(X+Y+Z);
  BFS();
  memset(dp,-1,sizeof dp);
  cout << solve(0,0,0) << '\n';

  return 0;
}


Measured memory_bytes: 80128
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define all(x) (x).begin(), (x).end()
using ll = long long;
using namespace std;
template <typename T> using vec = std::vector<T>;

const ll MOD = 1000000007;

struct mint {
    ll x;
    mint(ll x = 0) : x((x % MOD + MOD) % MOD) {
    }
    mint operator-() const {
        return mint(-x);
    }
    mint &operator+=(const mint a) {
        if ((x += a.x) >= MOD) x -= MOD;
        return *this;
    }
    mint &operator-=(const mint a) {
        if ((x += MOD - a.x) >= MOD) x -= MOD;
        return *this;
    }
    mint &operator*=(const mint a) {
        (x *= a.x) %= MOD;
        return *this;
    }
    mint operator+(const mint a) const {
        mint res(*this);
        return res += a;
    }
    mint operator-(const mint a) const {
        mint res(*this);
        return res -= a;
    }
    mint operator*(const mint a) const {
        mint res(*this);
        return res *= a;
    }
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t/2);
        a *= a;
        if (t & 1) a *= *this;
        return a;
    }

    // for prime MOD
    mint inv() const {
        return pow(MOD - 2);
    }
    mint &operator/=(const mint a) {
        return (*this) *= a.inv();
    }
    mint operator/(const mint a) const {
        mint res(*this);
        return res /= a;
    }
};

ostream &operator<<(ostream &os, const mint &a) {
    return os << a.x;
}

struct counting {
    vector<mint> fact, ifact;
    counting(int n) : fact(n + 1), ifact(n + 1) {
        assert(n < MOD);
        fact[0] = 1;
        for (int i = 1; i <= n; ++i)
            fact[i] = fact[i - 1] * i;
        ifact[n] = fact[n].inv();
        for (int i = n; i >= 1; --i)
            ifact[i - 1] = ifact[i] * i;
    }
    mint nCk(int n, int k) {
        if (k < 0 || k > n) return 0;
        return fact[n] * ifact[k] * ifact[n - k];
    }
    mint nPk(int n, int k){
        return fact[n]*ifact[n-k];
    }
    mint factorial (int n){
        return fact[n];
    }
} c(1000009);

int main() {
    ll N, M;
    cin >> N >> M;
    if(abs(N-M)>=2){
        cout << 0 << endl;
    } else if(abs(N-M)==1){
        cout << c.factorial(N)*c.factorial(M) << endl;
    } else {
        cout << mint(2)*c.factorial(N)*c.factorial(M) << endl;
    }
}


Measured memory_bytes: 18616
#include <bits/stdc++.h>
#define f(i,n) for(int i=0;i<n;i++)
#define P pair<int,int>
#define F first
#define S second
#define int long long
#define mod 1000000007
#define mmod 998244353
#define all(v) v.begin(), v.end()
using namespace std;
int mypow(int a, int b, int c) {
	if (b == 0)return 1;
	if (b % 2)return mypow(a, b - 1, c)*a%c;
	int z = mypow(a, b / 2, c);
	return z * z%c;
}
int x[32] = { 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 };
signed main() {
	int n;
	cin >> n;
	cout << x[n - 1] << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define fori(i , a ,b) for (int  q = i ; q < a; q +=b )
#define vi vector<int>
typedef long long ll;
int main() {
  long double n  = 0 , x = 0 , t = 0;
  cin >> n >> x >> t;
  if (fmod(n,x) ==0) {
      cout << fixed<<setprecision(0) <<(n/x) * t << "\n";
  }
  
  else {
      cout << fixed<<setprecision(0)<<ceil(n/x) * t << "\n";
  }
  

  return 0;
}

Measured memory_bytes: 3868
import java.util.*;
import java.io.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        System.out.println(Math.min(B/A, C));
    }
}


Measured memory_bytes: 21844
#include <stdio.h>

int data[4][3][10] = {{{}}};

void update(int b, int f, int r, int n)
{
    data[b-1][f-1][r-1] += n;
    return;
}

void show(void)
{
    int i,j,k;

    for(i=0;i<4;i++) {
        for(j=0;j<3;j++) {
            for(k=0;k<10;k++) {
                printf("%2d", data[i][j][k]);
            }
            putchar('\n');
        }
        if(i<3) puts("####################");
    }
    return;
}

int main(void)
{
    int i;
    int n;
    int buil, flor, room, num;

    scanf("%d", &n);
    for(i=0;i<n;i++) {
        scanf("%d %d %d %d", &buil, &flor, &room, &num);
        update(buil, flor, room, num);
    }

    show();

    return 0;
}

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

int main(){
  ll X;
  cin >> X;
  vector<int> v;
  ll i = 2;
  while(1){
    bool flag = true;
    for(auto x: v){
      if(i % x == 0){
	flag = false;
	break;
      } 
    }
    if(flag){
      v.push_back(i);
      if(i >= X){
	break;
      }
    }
    i++;
  }
  cout << i << endl;
}


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

set<int> hamming;
void make_hamming() {
  for(int i=0; i<20; i++) 
    for(int j=0; j<20; j++)
      for(int k=0; k<20; k++)
	hamming.insert(pow(2.0, i)*pow(3.0, j)*pow(5.0, k));
}

int main() {
  make_hamming();
  int m, n;
  while(cin >> m >> n && m) {
    set<int>::iterator it = hamming.begin();
    int cnt = 0;
    for(it; it!=hamming.end(); it++) {
      if(m<=*it && *it <=n) cnt ++;
    }
    cout << cnt << endl;
  }
  return 0;
}

Measured memory_bytes: 1272
#include<bits/stdc++.h>
#define ll long long
#define pi 3.14159265358979323846
#define pb push_back
#define mp make_pair
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
  int n,m;
  cin>>n>>m;
  int x;
  long sum=0;
  for(int i=0;i<m;i++){
    cin>>x;
    sum+=x;
  }
  if((n-sum)<0)
    cout<<-1;
  else
    cout<<(n-sum);
}

Measured memory_bytes: 3640
//! 尺卂乃卂.卂ﾌ乇乇ㄒ
#include<bits/stdc++.h>
//#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace std;
//Using namespace __gnu_pbds;
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> Ordered_set;

#define ll              long long
#define int             long long
#define ld             long double
#define pb              push_back
#define pii             pair<int,int>
#define vi              vector<int>
#define vii             vector<vi>
#define vip            vector<pii>
#define mii             map<int,int>
#define mip             map<pair<int,int>,int>
#define mic             map<char,int> 
#define all(v)          v.begin(),v.end()  
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define lb(x)           (x&(-x))
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define w(x)            int x; cin>>x; while(x--)
#define itr(it,v)          for(auto it:v)
#define show(arr,n)     for(int i=0;i<n;i++) cout<<arr[i]<<" "; cout<<"\n";
#define fi(i,n)         for(int i=0;i<n;i++)
#define fir(i,k,n)       for(int i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define ff               first 
#define ss               second
#define deb(x) cout << #x << "=" << x << endl
#define FIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define check(x) (x && cout<<"Yes\n")||(cout<<"No\n");
#define fin(s)          freopen(s,"r",stdin);  
#define fout(s)         freopen(s,"w",stdout);

const ld pi = 3.141592653589793238462643383279502884;
const int xd[]={-1,0,1,0};
const int yd[]={0,-1,0,1};
int XX[] = { -1, -1, -1, 0, 0, 1, 1, 1 };
int YY[] = { -1, 0,  1, -1, 1, -1, 0, 1 };

int expo(int a,int b,int m);
int mmi(int a,int m);
void ipgraph(int m);

const int N=5*(1e5)+10;
vii adj(N);
int a[N];

void  solve(){

}
int32_t main()
{
    FIO
    int x; cin>>x;
    if(x>=30) cout<<"Yes\n";
    else cout<<"No\n";
    return 0;

}

void ipgraph(int m){
    int i, u, v;
    while(m--){
          cin>>u>>v;
         u--, v--;
    adj[u].pb(v);
    adj[v].pb(u);
    }
}
int expo(int a,int b,int m){
    if(b==0) return 1;
    if(b==1) return a;
    int val=(expo(a,b/2,m)*expo(a,b/2,m))%m;
    if(b & 1) return (val*a)%m;
    else return val;
}
int mmi(int a,int m){
    return expo(a,m-2,m);
}

Measured memory_bytes: 15016
import sys
import math
import copy
from heapq import heappush, heappop, heapify
from functools import cmp_to_key
from bisect import bisect_left, bisect_right
from collections import defaultdict, deque, Counter
# sys.setrecursionlimit(1000000)

# input aliases
input = sys.stdin.readline
getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = float("inf")
MOD = 10**9 + 7
divide = lambda x: pow(x, MOD-2, MOD)


def zaatsu(nums):
    ref = list(set(copy.copy(nums)))
    ref.sort()
    dic = dict()
    for i, num in enumerate(ref):
        dic[num] = i

    return [dic[num] for num in nums]

def solve():
    n, d, a = getList()
    li = []
    for i in range(n):
        li.append(getList())

    li.sort()
    ichi = [x[0] for x in li]
    imos = [0] * n
    cur = 0
    ans = 0
    for i, (x, h) in enumerate(li):
        cur -= imos[i]
        hp = h - cur * a
        if hp <= 0:
            continue
        thr = hp // a
        if hp % a != 0:
            thr += 1
        ans += thr
        cur += thr
        owari = bisect_right(ichi, x + 2 * d)
        if owari != n:
            imos[owari] += thr

    print(ans)
def main():
    n = getN()
    for _ in range(n):
        solve()

    return
if __name__ == "__main__":
    # main()
    solve()







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

int main(){
    int A,B,MAX,delta;
    cin >> A >>B;
    if( B==1){
        cout << 0 << endl;
        return 0;
    }
    else if ( B <= A) {
        cout << 1 << endl;
        return 0;
    }else{
        MAX= A;
        int ans = 1;
    delta = A-1;
    while(MAX < B){
        ans++;
        MAX += delta;
    }
    cout << ans << endl; 
    }
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(a,b,c) for(int a=b;a<=c;a++)
#define FORD(a,b,c) for(int a=b;a>=c;a--)
#define FORL(a,b) for(int a=head[b];a;a=nxt[a])
#define in(a)  a=read()
#define out(a) printf("%d\n",a)
#define clr(x,y) memset(x,y,sizeof(x))
inline ll read(){
    ll f=1,x=0;char c=getchar();
    while(c>'9'||c<'0'){if(c=='-')f=-1;c=getchar();}
    while(c>='0'&&c<='9')x=x*10+c-'0',c=getchar();
    return x*f;
}
/*-------------------------------------------------*/
#define mod 10000007
#define maxn 100010
#define inf (1<<30)
/*-------------------------------------------------*/
int a[maxn];
int main(){
	int n,m;
	in(n);in(m);
	FOR(i,1,n)in(a[i]);
	sort(a+1,a+n+1);
	int ans=0;
	FOR(i,1,n){
		if(a[i]<=m)m-=a[i],ans++;
		 else break;
	}
	if(m&&ans==n)ans--;
	out(ans);
}

Measured memory_bytes: 256
using System;

namespace AtCoder.ABC095
{
    class b
    {
        static void Main(string[] args)
        {
            var line = Console.ReadLine().Trim();
            var spl = line.Split(' ');
            var N = int.Parse(spl[0]);
            var X = int.Parse(spl[1]);
            var cnt = N;
            var min = 1000;
            for(var i = 0; i < N; ++i)
            {
                line = Console.ReadLine().Trim();
                var m = int.Parse(line);
                if (min > m) min = m;
                X -= m;
            }
            cnt += X / min;
            Console.WriteLine(cnt);
        }
    }
}


Measured memory_bytes: 13140
#include<iostream>
using namespace std;
int main()
{
int n,x,min=50000,nmin,i;
cin>>n>>x;
for(i=0;i<n;i++)
{
cin>>nmin;
x-=nmin;
if(nmin<min)min=nmin;
}
cout<<(n+x/min);
return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main()
{
long long int a,b,c,d, e,i,j,k,l,x,y;
cin>>a;
d=a/500;
a=a-(d*500);
b=a/5;
e=d*1000+b*5;
cout<<e<<endl;


}

Measured memory_bytes: 256
#include <stdio.h>
#include <algorithm>
#include <iostream>
#include <vector>
#include <assert.h>
#include <map>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <math.h>
#include <string>
#include <string.h>
#include <queue>
#include <complex>
#include <iomanip>
#include <stack>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
ll mod=1e9+7;
double eps=1e-7;
ll exp(ll x,ll y){if(y<0) return 0; ll ret=1;for(;y;y>>=1,x=(x*x)%mod){if(y&1)ret=(ret*x)%mod;}return ret;}
ull pexp(ull x,ull y){if(y<0) return 0; ull ret=1; for(;y;y>>=1,x=(x*x)){if(y&1)ret=(ret*x);}return ret;}
ll gcd(ll x,ll y){if(!x||!y) return x+y; return x%y==0?y:gcd(y,x%y);}
ll lcm(ll x,ll y){return x*(y/gcd(x,y));}
ll bsum(ll u,ll b){ll ret=0;if(u<b)return u;while(u){ret+=u%b;u/=b;}return ret;}
ll prival(ll u,ll p){ll cn=0;while(u%p==0){cn++;u=u/p;}return cn;}
ll minv(ll a,ll b){return 1<a?b-minv(b%a,a)*b/a:1;}
ll extm(ll a,ll b){ll ret=0;while(a!=0){if(a%2==1){ret+=b;ret%=mod;}a>>=1;b=(2*b)%mod;}return ret;}   
ll eaphi(ll x){ll t=x,ret=x,i;for(i=2;i*i<=x;i++){if(t%i==0){ret-=ret/i;while(t%i==0) t/=i;}}if(t!=1) ret-=ret/t;return ret;}
ll eadivc(ll x){ll ret=0;ll i;for(i=1;i*i<=x;i++){if(x%i==0 && i*i!=x) ret+=2;if(x%i==0 && i*i==x) ret+=1;}return ret;}
ll eadivs(ll x){ll ret=0;ll i;for(i=1;i*i<=x;i++){if(x%i==0 && i*i!=x) ret+=i+x/i;if(x%i==0 && i*i==x) ret+=i;}return ret;}
ll ndig(ll x, ll b){ll ret=0;while(x){x/=b; ret++;}return ret;}
ll rev(ll n, ll b){ll ret=0;while(n){ret=b*ret+n%b; n/=b;}return ret;}
ll sq(ll x){ll t=(ll)sqrt(x); for(ll i=t-2 ; i<=t+2 ; i++) if(i*i==x) return abs(i); return -1;}
ll extexp(ll x,ll y){if(y<0) return 0; ll ret=1;for(;y;y>>=1,x=extm(x,x)){if(y&1)ret=extm(ret,x);}return ret;}
bool isprime(ll x){if(x<=1) return false; for(ll i=2;i*i<=x;i++){if(x%i==0){return false;}}return true;}
int a, b, c;

bool isok(int x)
{
	if(x<a || x<b || x<c) return false;
	if((a+b+c)%2!=x%2) return false;
	return true;
}

int main(void)
{
	cin>>a>>b>>c; int i;
	for(i=0 ; i<=1111 ; i++)
	{
		if(isok(i))
		{
			cout<<(3*i-a-b-c)/2;
			return 0;
		}
	}
}

Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>

int main() {
	int a, b, k;

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

	int i;
	for (i = a; i <= b; i++) {
		if (i%k == 0) {
			printf("OK\n");
			break;
		}
	}
	if (b == i - 1) printf("NG\n");

	return 0;
}

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

int main(int argc, char const *argv[])
{
	int n;
	cin>>n;
	if (n==3)
	{
		cout<<"2 5 63\n";
	}
	else
	{
		vector<int> ans={3,9,2,4};
		n-=4;
		if (n>0)
		{
			for (int i = 1; i < 5000; ++i)
			{
				if (n==1)
				{
					ans.push_back(6);
					n=0;
					break;
				}
				if (n==0)
				{
					break;
				}
				ans.push_back(6*i+2);
				ans.push_back(6*i+4);
				n-=2;
			}
		}
		if (n==1)
		{
			ans.push_back(6);
			n=0;
		}
		if (n>0)
		{
			for (int i = 2; i < 5000; i+=2)
			{
				if (n==1)
				{
					ans.push_back(6);
					n=0;
					break;
				}
				if (n==0)
				{
					break;
				}
				ans.push_back(6*i+3);
				ans.push_back(6*i+9);
				n-=2;
			}
		}
		if (n==1)
		{
			ans.push_back(6);
			n=0;
		}
		if (n>0)
		{
			for (int i = 1; i <= 5000; ++i)
			{
				ans.push_back(6*i);
				--n;
				if (n==0)
				{
					break;
				}
			}
		}
		if (n==0)
		{
			for (auto v:ans)
			{
				if (v==3)
				{
					cout<<3;
				}
				else
				{
					cout<<" "<<v;
				}
			}
		}
	}
	return 0;
}


Measured memory_bytes: 512