akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define P pair<ll,ll>
#define FOR(I,A,B) for(ll I = int(A); I < int(B); ++I)
#define FORR(I,A,B) for(ll I = int((B)-1); I >= int(A); --I)
#define TO(x,t,f) ((x)?(t):(f))
#define SORT(x) (sort(x.begin(),x.end())) // 0 2 2 3 4 5 8 9
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin()) //xi>=v  x is sorted
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin()) //xi>v  x is sorted
#define NUM(x,v) (POSU(x,v)-POSL(x,v))  //x is sorted
#define REV(x) (reverse(x.begin(),x.end())) //reverse
ll gcd(ll a,ll b){if(a<b)swap(a,b);if(a%b==0)return b;return gcd(b,a%b);}
ll lcm(ll a,ll b){ll c=gcd(a,b);return ((a/c)*(b/c)*c);}//saisyo kobaisu
#define NEXTP(x) next_permutation(x.begin(),x.end())
const ll INF=1e18+7;
const ll MOD=1e9+7;


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

	string s;
	ll sum = 0;
	cin >> s;
	while(s.size()<15)s+='o';
	for(auto c:s){
		if(c=='o')sum++;
	}
	if(sum>=8){
		cout << "YES" << endl;
	}else{
		cout << "NO" << endl;
	}
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
#define fi first
#define se second
#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 rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); ++i)
#define repm(i, n) for (int i = (int)(n)-1; i >= 0; --i)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define pb(n) push_back(n)
#define mp make_pair
#define MOD 1002000007
#define INF LONG_LONG_MAX

typedef pair<int, int> P;
int main(){
    long long n;
    cin>>n;
    string s;
    cin>>s;
    long long e=0;
    rep(i,n){
        if(s[i]=='E'){
            e++;
        }
    }
    long long mx=1e+8;
    long long w=0;
    rep(i,n){
        long long ans;
        if(s[i]=='E'){
            e--;
        }
        ans=w+e;
        if(s[i]=='W'){
            w++;
        }
        mx=min(ans,mx);
    }
    cout<<mx<<endl;
}


Measured memory_bytes: 900
/**
 *    author  : 𝒌𝒚𝒐𝒎𝒖𝒌𝒚𝒐𝒎𝒖𝒑𝒖𝒓𝒊𝒏
 *    created : 2020-01-18 20:36:06
**/

#include <iostream>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <complex>
#include <numeric>
#include <bitset>
#include <cassert>
#include <cctype>
#include <iomanip>
#include <random>
#include <utility>
#include <chrono>

using namespace std;

using int64 = long long;

template<class T> std::ostream& operator<<(std::ostream& os, const std::vector<T>& vec) { os << '{'; size_t n = vec.size(); for (size_t i = 0; i < n; ++i) { os << vec[i]; if (i != n - 1) os << ','; } os << '}'; return os; }
template<class T, class U> std::ostream& operator<<(std::ostream& os, const std::pair<T, U>& p) { return os << '{' << p.first << " " << p.second << '}'; }
template<class T> std::istream& operator>>(std::istream& is, std::vector<T>& vec) { size_t n = vec.size(); for (size_t i = 0; i < n; ++i) is >> vec[i]; return is; }

#ifdef LOCAL
#define debug(_) cerr << #_ << ": " << (_) << '\n'
#else
#define debug(_) 1728
#endif

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

  int h, w, n; cin >> h >> w >> n;
  int mx = max(h, w);

  cout << (n + mx - 1) / mx << endl;

  return 0;
}

Measured memory_bytes: 256
//学習番号１９１４０８３７　小島優希也
#include <iostream>
#include <vector>
using namespace std;

int main(void) {
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a.at(i);
    }
    for (int i = n - 1; i > 0; i--) {
        cout << a.at(i) << " ";
    }
    cout << a.at(0) << endl;
    return 0;
}



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

int main()
{
  ll n;
  cin >> n;
  ll a, b, c, d, e;
  cin >> a >> b >> c >> d >> e;
  ll t = min(a, min(b, min(c, min(d, e))));
  ll ans = ((n + t - 1) / t) + 4;

  cout << ans << endl;
}


Measured memory_bytes: 3592
var
	N,i:Longint;
	A:Array[1..200000]of Longint;
begin
	read(N);
	for i:=1 to N do read(A[i]);
	i:=N;
	while i>0 do begin
		writeln(A[i]);
		dec(i,2);
	end;
	i:=N mod 2+1;
	while i<=N do begin
		writeln(A[i]);
		inc(i,2);
	end;
end.


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

using namespace std;

using int64 = long long;

#include <bits/stdc++.h>

using namespace std;

using int64 = long long;

constexpr int64 P = 1000000007;

// Verified: ABC133E, ABC132D
struct FiniteField {
 private:
  int64 x;
 public:
  FiniteField(int64 input_x) : x(input_x) {}
  FiniteField() : x(0) {}
  int64 Value() { return x; }
  inline FiniteField operator+(FiniteField o) {
    FiniteField r(*this); r += o; return r;
  }
  inline FiniteField operator-(FiniteField o) {
    FiniteField r(*this); r -= o; return r;
  }
  inline FiniteField operator* (FiniteField o) {
    FiniteField r(*this); r *= o; return r;
  }
  inline FiniteField operator/ (FiniteField o) {
    FiniteField r(*this); r /= o; return r;
  }
  inline void operator+= (FiniteField o) { x = (x + o.x) % P; }
  inline void operator-= (FiniteField o) { x = (x + P - o.x) % P; }
  inline void operator*= (FiniteField o) { x = (x * o.x) % P; }
  void operator/=(FiniteField o) {
    int64 p = P - 2; while (p) { if (p % 2) { *this *= o; } o *= o; p /= 2; }
  }
};

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

  int x_count, y_count;
  cin >> x_count >> y_count;
  vector<int> xs(x_count), ys(y_count);
  for (int i = 0; i < x_count; i++) {
    cin >> xs[i];
  }
  for (int i = 0; i < y_count; i++) {
    cin >> ys[i];
  }

  vector<vector<FiniteField>> dp(y_count + 1, vector<FiniteField>(x_count + 1));
  for (int y = 0; y <= y_count; y++) {
    for (int x = 0; x <= x_count; x++) {
      if (y == 0 || x == 0) {
        dp[y][x] = 1;
      } else {
        if (ys[y - 1] == xs[x - 1]) {
          dp[y][x] = dp[y - 1][x] + dp[y][x - 1];
        } else {
          dp[y][x] = dp[y - 1][x] + dp[y][x - 1] - dp[y - 1][x - 1];
        }
      }
    }
  }
  cout << dp[y_count][x_count].Value() << endl;
}


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

using namespace std;


int main()
{
  int n, m, c, s, g;
  const int INF = 1 << 25;
  while(cin >> n >> m >> c >> s >> g, n || m || c || s || g){
    s--, g--;
    int p[32], q[32][64], r[32][64], f[32][32768];
    int G[32][128][128], C[128][128];
    for(int i = 0; i < 32; i++){
      for(int j = 0; j < 128; j++){
	for(int k = 0; k < 128; k++){
	  G[i][j][k] = INF;
	}
	G[i][j][j] = 0;
      }
    }
    for(int i = 0; i < m; i++){
      int x, y, d, c;
      cin >> x >> y >> d >> c;
      x--, y--, c--;
      G[c][x][y] = G[c][y][x] = min(d, G[c][x][y]);
    }
    for(int i = 0; i < c; i++){
      for(int j = 0; j < n; j++){
	for(int k = 0; k < n; k++){
	  for(int l = 0; l < n; l++){
	    G[i][k][l] = min(G[i][k][l], G[i][k][j] + G[i][j][l]);
	  }
	}
      }
    }
    for(int i = 0; i < 32; i++){
      f[i][0] = 0;
      for(int j = 1; j < 32768; j++) f[i][j] = INF;
    }
    for(int i = 0; i < c; i++) cin >> p[i];
    for(int i = 0; i < c; i++){
      q[i][0] = 0;
      for(int j = 1; j < p[i]; j++) cin >> q[i][j];
      q[i][p[i]] = 32768-1;
      r[i][0] = 0;
      for(int j = 1; j <= p[i]; j++){
	cin >> r[i][j];
	for(int k = q[i][j-1]+1; k <= q[i][j]; k++) f[i][k] = f[i][k-1] + r[i][j];
      }
    }
    for(int i = 0; i < 128; i++){
      for(int j = 0; j < 128; j++){
	C[i][j] = INF;
      }
      C[i][i] = 0;
    }
    for(int i = 0; i < n; i++){
      for(int j = 0; j < n; j++){
	if(i == j) continue;
	int minDist = INF;
	for(int k = 0; k < c; k++){
	  if(G[k][i][j] >= INF) continue;
	  C[i][j] = min(C[i][j], f[k][G[k][i][j]]);
	}
      }
    }
    for(int i = 0; i < n; i++){
      for(int j = 0; j < n; j++){
	for(int k = 0; k < n; k++){
	  C[j][k] = min(C[j][k], C[j][i] + C[i][k]);
	}
      }
    }
    cout << (C[s][g]>=INF ? -1:C[s][g]) << endl;
  }
  return 0;
}

Measured memory_bytes: 7384
#include <iostream>
using namespace std;
const long INF = 1e9;
const long MOD = 1e9 + 7;
#define repi(i, n, init) for (int i = init; i < int(n); i++)

int main()
{
    int n, i;
    cin >> n >> i;
    cout << n - i + 1 << endl;
    return 0;
}

Measured memory_bytes: 256
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
// #define USE_LLONG_AS_INT
#ifdef USE_LLONG_AS_INT
#define int long long
#define inf (1ll<<60)
#else
#define inf (1<<30)
#endif
#define rep(i,n) for(int i=0;i<n;i++)
#define Rep(i,a,b) for(int i=a;i<b;i++)
#define REP(i,a,b) for(int i=a;i<=b;i++)
#define rev(i,n) for(int i=(n)-1;i>=0;i--)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a,0,sizeof(a))
#define Yes(f) cout<<(f?"Yes":"No")<<endl
#define yes(f) cout<<(f?"yes":"no")<<endl
#define YES(f) cout<<(f?"YES":"NO")<<endl
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v), greater<int>())

using namespace std;

const int mod=1e9+7;
const string sp=" ";

void run();

void init() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout<<fixed<<setprecision(12);
}

signed main(){
    init();
    run();
    return 0;
}

void run(){
    int n;
    cin>>n;
    vi a(n);
    rep(i,n)cin>>a[i];
    map<int,int> map;
    set<int> set;
    rep(i,n)set.insert(a[i]),map[a[i]]++;
    if(n%3)Yes(set.size()==1&&*set.begin()==0);
    else {
        if(set.size()==1)Yes(*set.begin()==0);
        else if(set.size()==2)Yes(map[0]==n/3);
        else if(set.size()==3){
            vi v;
            for(auto e:map)v.pb(e.fi);
            bool f=false;
            do{
                f|=(v[0]^v[1])==v[2]&&map[v[0]]==n/3&&map[v[1]]==n/3;
            }while(next_permutation(all(v)));
            Yes(f);
        }
        else cout<<"No"<<endl;
    }
}

Measured memory_bytes: 7808
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
LL dp[101][100001];
int main(void){
	int n,w;
	int wei,val;
	int i,j;
	LL MAX;
	cin>>n>>w;
	for(i=0;i<=n;i++){
		for(j=0;j<=w;j++){
			dp[i][j]=-1;
		}
	}
	dp[0][0]=0;
	for(i=0;i<n;i++){
		cin>>wei>>val;
		for(j=0;j<=w;j++){
			if(dp[i][j]!=-1){
				dp[i+1][j]=max(dp[i+1][j],dp[i][j]);
				if(j+wei<=w)	dp[i+1][j+wei]=max(dp[i+1][j+wei],dp[i][j]+val);
			}
		}
	}
	MAX=-1;
	for(i=0;i<=w;i++)	MAX=max(MAX,dp[n][i]);
	cout<<MAX<<endl;
	return 0;
}

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

using namespace std;
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)

typedef long long ll;
typedef pair<ll, ll> P;
const ll INF = 1LL<<60;

ll gcd(ll a, ll b) {
  if(b == 0) return a;
  return gcd(b, a % b);
}

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

ll modpow(ll a, ll n, ll mod) {
  ll res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return res;
}

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

  int n, m;
  cin >> n >> m;

  vector<vector<int>> g(n);

  rep(i, m){
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }

  vector<bool> visit(n);
  rep(i, n){
    visit[i] = false;
  }

  queue<int> q;
  q.push(0);
  visit[0] = true;

  vector<int> ans1;
  ans1.push_back(0);
  while(!q.empty()){

    int v = q.front();
    q.pop();
    for(auto nv : g[v]){

      if(visit[nv] == true) continue;

      q.push(nv);
      ans1.push_back(nv);
      visit[nv] = true;
      break;

    }
  }

  vector<int> ans2;
  q.push(0);
  while(!q.empty()){
    int v = q.front();
    q.pop();

    for(auto nv : g[v]){
      if(visit[nv] == true) continue;
      q.push(nv);
      ans2.push_back(nv);
      visit[nv] = true;
      break;
    }
  }

  cout << ans1.size() + ans2.size() << endl;

  rep(i, ans1.size()){
    cout << ans1[ans1.size()-1-i] + 1 << " ";
  }
  rep(i, ans2.size()){
    cout << ans2[i] + 1 << " ";
  }
  cout << endl;

  return 0;
}


Measured memory_bytes: 6776
#include <iostream>
#include <cstdio>
#define int long long
using namespace std;

int a,b,c,n,ans,f[10005];

signed main(){
	ios::sync_with_stdio(false);
	cin>>a>>b>>c>>n;n/=50;
	f[0]=1;
	for(int i=1;i<=n;i++){
		f[i]=f[i-1];
	}
	for(int i=2;i<=n;i++){
		f[i]+=f[i-2];
	}
	for(int i=10;i<=n;i++){
		f[i]+=f[i-10];
	}
	ans=f[n];
	a++;b++;c++;
	if(n-a*10>=0)ans-=f[n-a*10];
	if(n-b*2>=0)ans-=f[n-b*2];
	if(n-c>=0)ans-=f[n-c];
	if(n-a*10-b*2>=0)ans+=f[n-a*10-b*2];
	if(n-a*10-c>=0)ans+=f[n-a*10-c];
	if(n-b*2-c>=0)ans+=f[n-b*2-c];
	if(n-a*10-b*2-c>=0)ans-=f[n-a*10-b*2-c];
	cout<<ans<<endl;
	return 0;
}

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

int main() {
    int r;
    cin >> r;
    cout << pow(r, 2) << endl;

    return 0;
}

Measured memory_bytes: 256
using System;
using System.Linq;
using System.Numerics;

namespace ABC177
{
    class Program
    {
        static void Main(string[] args)
        {
            c();
        }

        public static void c()
        {
            long n = long.Parse(Console.ReadLine());
            long[] a = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
            long mod = (long)1e9 + 7;
            BigInteger sum = 0;
            long x = 0;
            for (long i = 0; i < n; i++)
            {
                sum = (sum + a[i] * x) % mod;
                x = (x + a[i]) % mod;
            }
            Console.WriteLine(sum);
        }
    }
}


Measured memory_bytes: 64276
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = uint32_t;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max() / 32 * 15 + 208;


void solve(int n){
    vector<vector<int>> v(30);
    for (int i = 0; i < n; ++i) {
        int x;
        cin >> x;
        for (int j = 0; j < x; ++j) {
            int y;
            cin >> y;
            v[y-1].emplace_back(i);
        }
    }
    vector<set<int>> u(n);
    for (int i = 0; i < n; ++i) {
        u[i].emplace(i);
    }
    for (int i = 0; i < 30; ++i) {
        set<int> s;
        for (int j : v[i]) {
            for (auto &&k : u[j]) {
                s.emplace(k);
            }
        }
        if(s.size() == n){
            cout << i+1 << "\n";
            return;
        }
        for (auto &&l : v[i]) {
            u[l] = s;
        }
    }
    puts("-1");
}

int main() {
    int n;
    while(cin >> n, n){
        solve(n);
    }
    return 0;
}


Measured memory_bytes: 3128
#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#include <iomanip>
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; }

const int mod=1000000007;
const int INF=1001001001;

vector<pair<int64_t,int64_t>>prime_factorize(int64_t x){
  vector<pair<int64_t,int64_t>>p;
  for(int64_t i=2;i*i<=x;i++){
    int cnt=0;
    if(x%i==0){
    while(x%i==0){cnt++;x/=i;}
    p.push_back(make_pair(i,cnt));
    }
  }
  if(x!=1){p.push_back(make_pair(x,1));}
  return p; 
}

int main() {
  int X;
  cin>>X;
  int64_t sum=0;
  for(int64_t i=1;i<=X;i++){
    sum+=i;
    if(sum>=X){cout<<i<<endl;return 0;}
  }
  return 0;  
}

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

int main(){
    
    ll a,v; 
    cin >> a >> v;
    ll b,w;
    cin >> b >> w;
    ll t;
    cin >> t;
    ll d = abs(a-b);
    ll d2 = (v-w)*t;
    puts(d<=d2?"YES":"NO");
}


Measured memory_bytes: 3604
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define ll          long long
#define pb          push_back
#define eb 			emplace_back
#define mp 			make_pair
#define pii         pair<ll,ll>
#define vi          vector<ll>
#define vii         vector<pii>
#define mi          map<ll,ll>
#define mii         map<pii,ll>
#define all(a)      (a).begin(),(a).end()
#define fi          first
#define si          second
#define sz(x)       (ll)x.size()
#define endl        '\n'
#define checkbit(n, b) ((n >> b) & 1)
#define mod        1000000007
#define inf        1000000000000000000
#define puts(n)		cout<<n;
#define rep(i,a,b)  for(ll i=a;i<b;i++)
#define setbits(x) __builtin_popcount(x)
#define mset(m,v) memset(m,v,sizeof(m))
using namespace std;
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	ll x,y;
	cin>>x>>y;
	for(ll i=0;i<=x;i++){
		ll val = i*2+(x-i)*4;
		if(val==y){
			cout<<"Yes";
			return 0;
		}
	}
	cout<<"No";
	return 0;
}

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

using namespace std;

int n;
char str[6010];
int aloc[3010], bloc[3010];
int loc[6010];
vector<int> ran;

vector<string> vs;
void print(int s, int e) {
    if (str[s]=='a') {
        int i;
        for (i=s;i<e;i++) {
            if (str[i]=='a') {
                printf("ab");
                i = bloc[loc[i]];
            }
        }
        return;
    }
    int i, j;
    for (i=loc[s];i<loc[e];i++) {
        string tmp;
        for (j=s;j<e;j++) {
            if (loc[j]>=i) tmp.push_back(str[j]);
        }
        vs.push_back(tmp);
    }
    sort(vs.begin(),vs.end());
    for (char &ch : vs.back()) printf("%c",ch);
    vs.clear();
}

typedef pair<string,int> psi;

vector<psi> vec;
void add(int s, int e) {
    int i, j;
    for (i=loc[s];i<loc[e];i++) {
        string tmp;
        for (j=s;j<e;j++) {
            if (loc[j]>=i) tmp.push_back(str[j]);
        }
        vs.push_back(tmp);
    }
    sort(vs.begin(),vs.end());
    vec.push_back(psi(vs.back(),-s));
    vs.clear();
}

int main() {
    int i, j;

    scanf("%d",&n);
    scanf("%s",str);
    int a = 0, b = 0;
    for (i=0;i<2*n;i++) {
        if (str[i]=='a') {loc[i] = a; aloc[a] = i; a++;}
        else {loc[i] = b; bloc[b] = i; b++;}
    }
    loc[2*n] = n;
    int ps = 0;
    ran.push_back(0);
    for (i=0;i<2*n;i++) {
        ps += ((str[i]=='a')?1:-1);
        if (!ps) {
            ran.push_back(i+1);
        }
    }
    int p = -1;
    for (i=(int)ran.size()-2;i>=0;i--) {
        if (str[ran[i]]=='b') {
            p = i;
            break;
        }
    }
    for (i=0;i<=p;i++) {
        if (str[ran[i]]=='a') continue;
        add(ran[i],ran[i+1]);
    }
    sort(vec.begin(),vec.end());
    reverse(vec.begin(),vec.end());
    int cur = -1;
    for (psi &tmp : vec) {
        if (cur>-tmp.second) continue;
        for (char &ch : tmp.first) printf("%c",ch);
        cur = -tmp.second;
    }
    for (i=p+1;i+1<ran.size();i++) {
        print(ran[i],ran[i+1]);
    }

    return 0;
}


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

signed main() {
    int h;
    cin >> h;

   int ans = 0, cnt = 1;
   while (h > 0) {
       h /= 2;
       ans += cnt;
       cnt *= 2;
   }

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

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
using namespace std;
typedef long long int ll;

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int x,y; cin >> x >> y;
	cout << abs(x-y) << endl;
}



Measured memory_bytes: 3188
#include <bits/stdc++.h>
#define loop(n, i) for(int i=0;i<n;i++)
#define loop1(n, i) for(int i=1;i<=n;i++)
#define rloop(n, i) for(int i=n;i;i++)
#define HERE cout << "HERE: " << __LINE__ << endl;
#define INSP(v) cout << v << " at " << __LINE__ << endl;
using namespace std;
using ll = long long;
template <class T>
using V = vector<T>;

const ll MOD = 1000000007;
int main() {
    string s; cin >> s;
    int n = s.size();

    int u = 0;
    loop (n, i) {
        char c = s[i];
        if (c == '?') c = '0';
        u = u * 10 + (c - '0');
        u %= 13;
    }

    int base = 1;
    ll M[13] = {};
    M[0] = 1;
    loop (n, i) {
        char c = s[n - 1 - i];
        if (c == '?') {
            ll tmpM[13] = {};
            loop (10, j) {
                int k = (base * j) % 13;
                loop (13, l) {
                    tmpM[(l + k) % 13] += M[l];
                    tmpM[(l + k) % 13] %= MOD;
                }
            }
            loop (13, j) M[j] = tmpM[j];
        }
        base *= 10;
        base %= 13;
    }
    cout << M[(13 + 5 - u) % 13] << endl;
    return 0;
}



Measured memory_bytes: 512
import sys
n = int(input())
result = ['']*n
dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
    result[i] = sys.stdin.readline().replace('\n', '')
    dic[result[i]] += 1

for key in dic:
    print(key, ' x ', dic[key], sep='')


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

int n,m,k,arr[10001];
int ans[101][101];
int main() {
    scanf("%d%d%d",&n,&m,&k);
    for(int i=1;i<=k;i++) scanf("%d",arr+i);

    int cur=1;
    for(int i=0;i<n;i++) {
        for(int j=(i%2==0 ? 0 : m-1);(i%2==0 && j<m) || (i%2==1 && j>=0);j+=(i%2==0 ? 1 : -1)) {
            while(!arr[cur]) cur++;
            ans[i][j]=cur;
            arr[cur]--;
        }
    }

    for(int i=0;i<n;i++){
        for(int j=0;j<m;j++) printf("%d ",ans[i][j]);
        puts("");
    }


    return 0;
}


Measured memory_bytes: 384
# -*- coding: utf-8 -*-

(a, b, k) = [int(i) for i in input().rstrip().split(" ")]
target = set([i for i in range(a, a+k)]).union([i for i in range(b-k+1, b+1)])
target = sorted([i for i in target if a <= i <= b])
for i in target:
    print(i)

Measured memory_bytes: 3316
#include <iostream>
#include <bitset>
#include <vector>
#include <string>
using namespace std;

int main()
{
    string number;
    int N[4];
    bool ans = false;

    cin >> number;

    int n = (int)number.size();

    for (int i = 0; i < n; i++)
    {
        N[i] = stoi(number.substr(i, 1));
    }

    for (int bit = 0; bit < (1 << 3); bit++)
    {
        bitset<4> s(bit);
        vector<char> a;

        int sum = N[0];

        for (int i = 0; i < 4; i++)
        {
            //0なら-,1なら+
            if (s.test(i))
            {
                if (i < 3)
                {
                    a.push_back('+');
                }
            }
            else
            {
                if (i < 3)
                {
                    a.push_back('-');
                }
            }
        }

        for (int i = 0; i < 3; i++)
        {
            if (a[2 - i] == '+')
            {
                sum += N[1 + i];
            }

            if (a[2 - i] == '-')
            {
                sum -= N[1 + i];
            }
        }

        if (sum == 7)
        {
            ans = true;
            cout << N[0] << a[2] << N[1] << a[1] << N[2] << a[0] << N[3] << "=7" << endl;
        }

        if (ans)
            break;
    }

    return 0;
}

Measured memory_bytes: 256
#include<stdio.h>

int main(void){
  int i,v,H,W;

  while(1){
    scanf("%d %d",&W,&H);

    if(W==0 && H==0){
      break;
    }else{
      for(i=1;i<=W;i++){
	for(v=1;v<=H;v++){
	  if(i%2==1 && v%2==1){
	    printf("#");
	  }else if(i%2==1 && v%2==0){
	    printf(".");
	  }else if(i%2==0 && v%2==1){
	    printf(".");
	  }else{
	    printf("#");
	  }
	}
	printf("\n");
      }
      printf("\n");
    }
  }
}



Measured memory_bytes: 2100
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int, int> pi;
typedef pair<ll, ll> pll;
typedef map<int, int> mi;
typedef set<int> si;
#define VV(T) vector<vector< T > >
#define dump(x)  cout << #x << " = " << (x) << endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define POSSIBLE(n) cout << ((n) ? "POSSIBLE" : "IMPOSSIBLE"  ) << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible"  ) << endl

#define rep(i, n) REP(i, 0, n)                              // 0, 1, ..., n-1
#define REP(i, x, n) for(int i = x; i < n; i++)             // x, x + 1, ..., n-1
#define FOREACH(x,a) for(auto& (x) : (a) )
#define SORT(x) sort(x.begin(), x.end())

#define ALL(v) (v).begin() , (v).end()
#define RALL(v) (v).rbegin(), (v).rend()

#define pb push_back
#define pu push
#define mp make_pair
#define fi first
#define sc second

#define COUT(x) cout << (x) << endl
#define VECCIN(x) for(auto&youso_: (x) )cin>>youso_
#define VECCOUT(x) for(auto&youso_: (x) )cout<<youso_<<" ";cout<<endl

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(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int N; cin >> N;
    int m[N][26] = {};
    
    rep (i, N) {
        string s;
        cin >> s;
        for (int j = 0; j < s.size(); j++) {
            m[i][s[j] - 'a']++;
        }
    }

    rep (i, 26) {
        int mi = INF;
        rep (j, N) {
            mi = min(mi, m[j][i]);
        }
        cout << string(mi, i + 'a');
    }
    cout << endl;
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp>
//using namespace __gnu_pbds;


//      DEEP

using namespace std;
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define all(v) v.begin(),v.end()
#define pb push_back
#define endl '\n'
#define mp make_pair

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef pair<int,int> pi;
typedef pair<long long,long long> pll;
typedef set<int> si;


/*
typedef tree<int,null_type,less<int>,rb_tree_tag,
tree_order_statistics_node_update> indexed_set;
*/
/*
typedef tree<
pair<int, int>,
null_type,
less<pair<int, int>>,
rb_tree_tag,
tree_order_statistics_node_update> ordered_set;
*/

const ll mod = 1e9 + 7;
const ll modl=998244353;
const double pie=3.1415926535;
                                                    //power
ull power(ull x,ull y){
   if(y==0) return 1;
   else{
     if(y%2==0) return power(x*x,y/2);
     else return x*power(x*x,(y-1)/2);
   }
}

                        //                    Modular Exponentiation

ll mod_power(ll x, ll y, ll m)
{
    ll r = 1;     // Initialize result

    x = x % m; // Update x if it is more than or equal to m

    if (x == 0) return 0; // In case x is divisible by m;

    while (y > 0)
    {
        // If y is odd, multiply x with result
        if (y & 1)
            r = (r*x) % m;

        // y must be even now
        y = y/2;
        x = (x*x) % m;
    }
    return r;
}

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

/*
bool isPrime[100001];
void sieve(int N) {

        for(int i = 0; i <= N;++i) {
            isPrime[i]=true;
        }
        isPrime[0]=false;
        isPrime[1]=false;

        for(int i = 2; i * i <= N; ++i) {
             if(isPrime[i] == true) {
                 for(int j = i * i; j <= N ;j += i)
                     isPrime[j] = false;
            }
        }
    }
*/

int main(){
    boost;
    int TESTS=1;
    //cin>>TESTS;
    while(TESTS--){
       string s;
       cin>>s;
       int ans=0;
       for(char i : s){
        int x=i-'0';
        ans+=x;
        ans%=9;
       }
       if(ans==0)cout<<"Yes"<<endl;
       else cout<<"No"<<endl;
    }
}











Measured memory_bytes: 3712
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
using namespace std;
const int MAXN = 1e6+10;
typedef long long LL;
int main()
{
   string s,t;
   cin >> s >> t;
   LL ans ;
   int lens = s.size();
   int lent = t.size();
   ans = lens;
   for(int i = 0;i+lent<=lens;++i)
   {
       LL cnt = 0;
       for(int j = 0;j<lent;++j)
       {
           if(s[i+j]!=t[j])
           {
               ++cnt;
           }
       }
       ans =min(ans,cnt);
   }
   cout << ans << "\n";
    return 0;
}


Measured memory_bytes: 3624
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<iostream>
#include<queue>
#include<vector>
#include <bitset>
#include <cmath>
#include <limits>
#include <iostream>
#include<set>
#include<tuple>
using namespace std;
#define INF 11000000000
#define MAX 100000
#define MOD 1000000007
typedef long long ll;
typedef pair<int,int> P;
typedef pair<pair<int,int>,int> p;
typedef pair< pair<int,int>, int> p; 
#define bit(n,k) ((n>>k)&1) /*nのk bit目*/
#define rad_to_deg(rad) (((rad)/2/M_PI)*360)

//http://kmjp.hatenablog.jp/entry/2019/06/17/0930

ll sum[2100][2100];
ll num[2100][2100];

int main(){
    int N,M;
    cin>>N>>M;
    int S[2100],T[2100];
    for(int i=0;i<N;i++) cin>>S[i];
    for(int i=0;i<M;i++) cin>>T[i];

    for(int i=0;i<2100;i++) sum[i][0]=sum[0][i]=1;
    ll ans=1;
    for(int i=0;i<N;i++){
        for(int j=0;j<M;j++){
            if(S[i]==T[j]){
                num[i+1][j+1]=(sum[i][j])%MOD;
                ans+=num[i+1][j+1];
            }
            sum[i+1][j+1]=(sum[i][j+1]+sum[i+1][j]+MOD-sum[i][j]+num[i+1][j+1])%MOD;
        }
    }
    cout<<ans%MOD<<endl;
}



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

int main() {
  int A, B, C, X;
  cin >> A >> B >> C >> X;
  int res = 0;
  for (int a = 0; a <= A; ++a) {
    for (int b = 0; b <= B; ++b) {
      for (int c = 0; c <= C; ++c) {
        int total = 500*a + 100*b + 50*c;
        if (total == X) ++res; 
      }
    }
  }
  cout << res << endl;
}

Measured memory_bytes: 3644
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep2(i, x ,n) for(int i = x; i < n; i++)
#define repr(i, n) for(int i = n-2; i >= 0; i--)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main(){
    ll n,ans=INF;
    string s;
    cin >> n >> s;
    int k = s.size();
    
    vector<ll>lw(n,0);
    vector<ll>re(n,0);
    
    rep2(i,1,n){
        if(s[i-1]=='W')lw[i]=lw[i-1]+1;
        else lw[i]=lw[i-1];
    }
    for(int i=n-2;i>=0;i--){
        if(s[i+1]=='E')re[i]=re[i+1]+1;
        else re[i]=re[i+1];
    }
    
    rep(i,n)ans=min(ans,(re[i]+lw[i]));
    
    cout << ans;
    
	return 0;
}

Measured memory_bytes: 8268
#!/usr/bin/env python
import string
import sys
from itertools import chain, dropwhile, takewhile

INF = float("inf")


def read(
    *shape, f=int, it=chain.from_iterable(sys.stdin), whitespaces=set(string.whitespace)
):
    def read_word():
        w = lambda c: c in whitespaces
        nw = lambda c: c not in whitespaces
        return f("".join(takewhile(nw, dropwhile(w, it))))

    if not shape:
        return read_word()
    elif len(shape) == 1:
        return [read_word() for _ in range(shape[0])]
    elif len(shape) == 2:
        return [[read_word() for _ in range(shape[1])] for _ in range(shape[0])]


def readi(*shape):
    return read(*shape)


def readi1(*shape):
    return [i - 1 for i in readi(*shape)]


def readf(*shape):
    return read(*shape, f=float)


def reads(*shape):
    return read(*shape, f=str)


def arr(*shape, fill_value=0):
    if len(shape) == 1:
        return [fill_value] * shape[0]
    elif len(shape) == 2:
        return [[fill_value] * shape[1] for _ in range(shape[0])]


def dbg(**kwargs):
    print(
        ", ".join("{} = {}".format(k, repr(v)) for k, v in kwargs.items()),
        file=sys.stderr,
    )


def main():
    N, K = readi(2)
    h = readi(N)
    h.extend([0] * K)
    dp = arr(N + K, fill_value=INF)
    dp[0] = 0
    for i in range(N):
        for j in range(K):
            dp[i + j + 1] = min(dp[i + j + 1], dp[i] + abs(h[i + j + 1] - h[i]))
    print(dp[N - 1])


if __name__ == "__main__":
    main()


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

int main(){
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    if(a <= c && c <= b)        cout << min(d,b)-c << endl;
    else if(c <= a && a <= d)   cout << min(d,b)-a << endl;
    else                        cout << 0 << endl;
    return 0;

}

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

using namespace std;

using ll = long long;
#define long long long

int main(void) {
    ll w, h;
    cin >> w >> h;
    vector<ll> p(w), q(h);
    for(auto &e: p) cin >> e;
    for(auto &e: q) cin >> e;
    
    vector<pair<ll,ll>> es;
    for(auto &e: p) es.push_back({e, 0});
    for(auto &e: q) es.push_back({e, 1});

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

    ll xx = 0, yy = 0, r = 0;
    for(auto &e: es) {
        ll c, t;
        tie(c, t) = e;
        if(t == 0)
            r += max(0ll, c * (h+1 - yy)), xx++;
        else
            r += max(0ll, c * (w+1 - xx)), yy++;
    }
    cout << r << endl;

}


Measured memory_bytes: 8048
#include<iostream>
#include<algorithm>
#include<math.h>
#include<string>
#include<vector>
using namespace std;

int main() {
	string a;
	cin >> a;
	int n = 0, w = 0, s = 0, e = 0;
	for (int i = 0; i < a.length(); i++) {
		if (a[i] == 'N') {
			n++;
		}
		else if (a[i] == 'W') {
			w++;
		}
		else if (a[i] == 'S') {
			s++;
		}
		else {
			e++;
		}
	}
	if (((n >= 1&&s>=1)||(n==0&&s==0)) && ((w >= 1&&e>=1)||(w==0&&e==0))) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <queue>
#include <tuple>
#include <cstring>

#define INF 100000000

using namespace std;

int main()
{
    int a, b, c;
    cin >> a >> b >> c;
    if (a == b)
        cout << c << endl;
    else if (b == c)
        cout << a << endl;
    else
        cout << b << endl;
    return 0;
}

Measured memory_bytes: 256
/*~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=
*$* WRITER:kakitamasziru/OxOmisosiru *$*
~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=*/
#ifdef LOCAL_JUDGE
#define _GLIBCXX_DEBUG //FOR THE DEBUG! COMMENT OUT THIS WHEN SUBMITTING!
#endif
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <iomanip>
#include <limits>//setprecision
//#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
//#include <unordered_set> //unordered_set
#include <stack> // stack
#include <deque> // deque
#include <math.h>//pow,,,
#include <cmath>//abs,,,
#include <bitset> // bitset
//It is so troublesome that I include bits/stdc++.h !
using namespace std;

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
const long long INF = 10010010010010;
const long long MOD = 1000000007;
typedef pair<int,int> P;

//Solve N^M. This, mod_pow use Iterative Square Method.
long long mod_pow(long long N, long long M) {
    if (M == 0) return 1;
    long long res = mod_pow((N * N) % MOD, M / 2);
    //最下位ビット(*N)が1の時は単独でNをかける
    if (M & 1) res = (res * N) % MOD;

    return res %= MOD;
}

long long gcd(long long a, long long b) {
    if (b == 0) return a;
    else return gcd(b, a % b);
}
long long lcm(long long a, long long b) {
    return a / gcd(a, b) * b ;
}

int main() {
    long long N,K;cin >> N >> K;
    vector<long long> retu(N);
    for(int i = 0;i<N;i++) cin >> retu.at(i);
    //vector<long long> imos(N+1);
    /*for(long long i = 0;i<N;i++){
        imos.at(max(i-retu.at(i),(long long)0))++;
        imos.at(min(i+retu.at(i)+1,N))--;
    }
    for(int i = 0;i<N;i++){
        if(i == 0) continue;
        imos.at(i) += imos.at(i-1);
    }
    for(int V:imos) cout << V << endl;*/
    bool already = true;
    vector<long long> now(N);
    now = retu;
    for(int i = 0;i<K;i++){
        vector<long long> imos(N+1);
        for(long long j = 0;j<N;j++){
            imos.at(max(j-now.at(j),(long long)0))++;
            imos.at(min(j+now.at(j)+1,N))--;
        }
        for(int j = 0;j<N;j++){
            if(now.at(j) != N) already = false;
            if(j == 0) continue;
            imos.at(j) += imos.at(j-1);
        }
        imos.pop_back();
        now = imos;
        if(already){
            for(int k = 0;k<N;k++) cout << now.at(i) << endl;
            return 0;
        }
        already = true;
    }
    for(int i = 0;i<N;i++) cout << now.at(i) << endl;
}


Measured memory_bytes: 7936
#include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <utility>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define _GLIBCXX_DEBUG
using namespace std;
typedef long long ll;
typedef pair<int, int> pair;

int main(){
    int a, b, c;
    cin >> a >> b >> c;
    if (a == b && b == c && a % 2 == 0) {
        cout << "-1" << endl;
        return 0;
    }

    if (a == b && b == c && a % 2 == 1) {
        cout << 0 << endl;
        return 0;
    }

    int ans = 0;
    bool w = true;

    while (w) {
        if (a % 2 || b % 2 || c % 2) {
            w = false;
            cout << 0 << endl;
            return 0;
        }
        int aa = a, bb = b, cc = c;
        ans++;
        a = (bb + cc) / 2;
        b = (aa + cc) / 2;
        c = (aa + bb) / 2;
        if (a % 2 || b % 2 || c % 2) w = false;
    }    

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

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

int main(){
    ll prices,discount_tickets;
    cin>>prices>>discount_tickets;
    priority_queue<ll> max_bag;
    ll pickone;
    ll bag[prices];
    ll result=0;
    for(ll i=0;i<prices;++i){
        cin>>bag[i];
        max_bag.push(bag[i]);
    }
    for(ll j=0;j<discount_tickets;j++){
        pickone = max_bag.top();
        max_bag.pop();
        max_bag.push(pickone/2);
    }
    while(!max_bag.empty()){
        result += max_bag.top();
        max_bag.pop();
    }
    cout<<result;


}

Measured memory_bytes: 1912
#include<stdio.h>
int main()
{
	int a[4];
	int i,x=0,y=0;
	while(~scanf("%d%d%d",&a[1],&a[2],&a[3]))
	{
    for(i=1;i<=3;i++)
    {
    	if(a[i]==5)x+=1;
	 	if(a[i]==7)y+=1;
    }
	 if(x==2&&y==1)
	 printf("YES\n");
	 else printf("NO\n");
   }
	 return 0;
	 
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define o(a) cout << a << endl
#define int long long
using namespace std;
typedef pair<int, int> P;

struct edge{
    int to, cost;
};

double p;
int n;
vector<edge> G[100010];
double x[100010];

void dfs(int pos, int prev){
    x[pos] = 0;
    for(int i = 0; i < G[pos].size(); i++){
        edge e = G[pos][i];
        if(e.to == prev) continue;
        dfs(e.to, pos);
        x[pos] += (double)(x[e.to] + e.cost) * p;
        cout << x[pos] << endl;
    }
}

double solve(int pos, int prev){
    double res = x[0];
    for(int i = 0; i < G[pos].size(); i++){
        edge e = G[pos][i];
        if(e.to == prev) continue;
        res += (solve(e.to, pos) + (double)e.cost) * p;
    }
    return res;
}

signed main(){
    cin >> p >> n;
    rep(i, 0, n - 1){
        int a, b, c;
        cin >> a >> b >> c;
        a--; b--;
        G[a]. push_back((edge){b, c});
        G[b]. push_back((edge){a, c});
    }
    dfs(0, -1);
    // rep(i, 0, n){
    //     printf("%.10lf\n", x[i]);
    // }
    printf("%.10f\n", solve(0, -1));
}

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

using namespace std;

int main()
{
	int a, b, c;
	while(~scanf("%d%d%d", &a, &b, &c))
	{
		if(c >= a && c <= b)
			cout << "Yes" << endl;
		else
			cout << "No" << endl;	
	}	
	return 0;
} 

Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace ConsoleApplication76
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] a = new int[2];
            a=Console.ReadLine().Split().Select(int.Parse).ToArray();
            if(a[0]<a[1])
            Console.WriteLine(0);
            else Console.WriteLine(a[0]-a[1]);
            }
        }
        }        

Measured memory_bytes: 13268
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <math.h>
#include <algorithm>
#include <chrono>
#include <queue>
#include <functional>

#define out(t) cout << (t) << "\n"

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef unsigned int uint;

int popcount(uint x) {
    x -= x >> 1 & 0x55555555;
    x = (x & 0x33333333) + (x >> 2 & 0x33333333);
    x = x + (x >> 4) & 0x0F0F0F0F;
    return x * 0x01010101 >> 24;
}

int tzcnt(uint x) {
    return popcount(~x & x - 1);
}

struct Point {
    int x, y;

    Point(int p, int q) : x(p), y(q) {}
};

string paint[50];

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

    int H, W;
    cin >> H >> W;

    for (int i = 0; i < H; ++i) {
        cin >> paint[i];
    }

    bool yes = true;

    const int dirh[] = {-1,  0, 0, 1 };
    const int dirw[] = {0, -1, 1, 0 };

    for (int i = 0; i < H; ++i) {
        for (int j = 0; j < W; ++j) {
            char t = paint[i][j];

            if (t != '#') continue;
            
            for (int k = 0; k < 4; ++k) {
                if (0 <= i + dirh[k] && i + dirh[k] < H && 0 <= j + dirw[k] && j + dirw[k] < W) {
                    if (t == paint[i + dirh[k]][j + dirw[k]]) {
                        goto suc;
                    }
                }
            }

            yes = false;
            goto fail;

        suc:;
        }
    }
fail:
    out(yes ? "Yes" : "No");
    
    int aaa;
    cin >> aaa;
}

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

const int MAX_N = 10010;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> Array;
typedef vector<Array> Graph;
typedef pair<double, double> pdd;
const ull mod = 1000000000 + 7;
#define REP(i,n) for(int i=0;i<(int)n;++i)

int main(){
    int N;
    cin >> N;
    set<int> G[N];
    REP(i, N-1){
        int x, y;
        cin >> x >> y;
        x--;y--;
        G[x].insert(y);
        G[y].insert(x);
    }
    set<pii> D;
    REP(i, N){
        D.insert(make_pair(G[i].size(), i));
    }
    while(D.size()){
        if(D.begin()->first == 0){
            cout << "First" << endl;
            return 0;
        }
        int x = D.begin()->second;
        int y = *G[x].begin();
        for(set<int>::iterator itr = G[y].begin();itr!=G[y].end();itr++){
            int r = *itr;
            D.erase(make_pair(G[r].size(), r));
            G[r].erase(y);
            D.insert(make_pair(G[r].size(), r));
            }
        D.erase(make_pair(G[x].size(), x));
        D.erase(make_pair(G[y].size(), y));
    }
    cout << "Second" << endl;
    return 0;
}

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

int di[4] = {1, 0, -1, 0};
int dj[4] = {0, 1, 0, -1};

int main() {
    int H, W, N; cin >> H >> W >> N;
    vector<int> A;
    REP(i, 0, N) {
        int a; cin >> a;
        REP(j, 0, a) A.push_back(i + 1);
    }

    vector<vector<int>> C(H, vector<int>(W, 0));
    int h = 0, w = 0;
    REP(i, 0, H * W) {
        C[h][w] = A[i];
        REP(j, 0, 4) {
            int nh = h + di[j];
            int nw = w + dj[j];
            if (nh < 0 || nh >= H || nw < 0 || nw >= W) continue;
            if (C[nh][nw] != 0) continue;
            h = nh;
            w = nw;
            break;
        }
    }

    REP(i, 0, H) {
        REP(j, 0, W) {
            if (j == W - 1) cout << C[i][j] << endl;
            else cout << C[i][j] << " ";
        }
    }

    return 0;
}

Measured memory_bytes: 384
#設定
import sys
input = sys.stdin.buffer.readline

#ライブラリインポート
from collections import defaultdict

con = 10 ** 9 + 7
#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	A = getlist()
	D = defaultdict(int)
	for i in range(N):
		D[A[i]] += 1

	ans_pre = 0
	for i in D:
		var = D[i]
		ans_pre += int(var * (var - 1) // 2)

	for i in range(N):
		ans = ans_pre - D[A[i]] + 1
		print(ans)


if __name__ == '__main__':
	main()

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


int main(){
    int n,l; cin >> n >> l;
    vector<int> r(n),absr(n); //りんごの味

    int sum = 0,minr = 1e5;
    for(int i=0;i<n;i++){
        r[i] = l+i;
        absr[i] = abs(r[i]);
        sum += r[i];
        minr = min(minr,absr[i]);
    }

    if(r[n-1] > 0 && r[0] > 0){
        cout << sum - minr << endl;
    }else if(r[n-1] > 0 && r[0] < 0){
        cout << sum << endl;
    }else{
        cout << sum + minr <<  endl;
    }
}

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

using namespace std;

int main(){
    string s,t,u;
    int a,b;
    cin >> s >> t >> a >> b >> u;
    if(s==u) cout << a-1 << " " << b << endl;
    if(t==u) cout << a << " " << b-1 << endl;
    return 0;
}

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

// Vasito
typedef long long ll;
typedef pair<int,int> pii;
#define fore(i,ii,iii)for(int i=ii;i<iii;i++)
#define rfor(i,ii,iii)for(int i=iii-1;i>=ii;i--)
#define all(s) s.begin(),s.end()
#define sz(a) ((int)a.size())
#define pb push_back
#define mset(a,b) memset(a,b,sizeof(a))
#define fst first
#define snd second
// Extra
#define OUT(a)cout<<a<<endl
#define ANS(a) OUT(res.size());for(auto i:a)cout<<i<<" ";ENDL
#define PRINT(a,init,end) FOR(i,init,end) cout<<a[i]<<" ";ENDL
#define PRINTV(a) for(auto i:a)cout<<i<<" ";ENDL

struct block {ll w,s,v;};
const ll N=1024,M=1e4+15,MOD=1e9+7,INF=1e18;
block a[N];
ll n,m,dp[N][M];
  
bool compare(const block &a,const block &b) {
  return (a.w+a.s)<(b.w+b.s);
}

ll solve(int i,int j) {
  if(i==n) return 0;
  if(j>=M)return 0;
  if(dp[i][j]!=-1) return dp[i][j];
  ll r = solve(i+1,j);
  if(a[i].s>=j) r=max(r,a[i].v+solve(i+1,j+a[i].w));
  return dp[i][j] = r;
}

int main() {
  ios::sync_with_stdio(false);
  mset(dp,-1);
  cin>>n;
  fore(i,0,n)cin>>a[i].w>>a[i].s>>a[i].v;
  sort(a,a+n,compare);
  //cout<<"___________"<<endl;fore(i,0,n)cout<<a[i].w<<" "<<a[i].s<<" "<<a[i].v<<endl;
  cout<<solve(0,0)<<endl;
}

Measured memory_bytes: 80512
#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<time.h>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
const int inf=1e8;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
int main(){
	int n,m;
	cin>>n>>m;
	vector<bool>h(n);
	vi in(n);
	rep(i,m){
		int a;cin>>a;
		rep(j,a){
			int b;cin>>b;in[b-1]=i;
		}
	}
	cin>>m;
	rep(i,m){
		int a,b;
		cin>>a>>b;
		a--;b--;
		if(in[a]==in[b]){
			h[a]=true;
			h[b]=true;
		}
	}
	int co=0;
	rep(i,n)if(h[i])co++;
	cout<<co<<endl;

}

Measured memory_bytes: 1200
"use strict";
function main(input) {
  const n = parseInt(input[0]);
  let sum = 0;

  for(let i=1;i<=n;i++){
    if((i%3===0) || (i%5===0)){
    }else{
      sum += i;
    }
  }
  console.log(sum);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));

Measured memory_bytes: 35180