akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using vll = vector<ll>;
using vi = vector<int>;

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

//pow(llpow,modpow)
template <class T>
ll llpow(ll x, T n)
{
    ll ans = 1;
    if (x == 0)
        ans = 0;
    while (n)
    {
        if (n & 1)
            ans *= x;
        x *= x;
        n >>= 1;
    }
    return ans;
}
long long modpow(long long a, long long n, long long mod)
{
    long long res = 1;
    while (n > 0)
    {
        if (n & 1)
            res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
//最大公約数
template <class T>
inline T gcd(T x, T y)
{
    if (y == 0)
        return x;
    else
    {
        return gcd(y, x % y);
    }
}
//最小公倍数
template <class T>
inline T lcm(T x, T y) { return x / gcd(x, y) * y; }
//逆元
long long modinv(long long a, long long m)
{
    long long b = m, u = 1, v = 0;
    while (b)
    {
        long long t = a / b;
        a -= t * b;
        swap(a, b);
        u -= t * v;
        swap(u, v);
    }
    u %= m;
    if (u < 0)
        u += m;
    return u;
}

#define rep(i, n) for (ll i = 0; i < (ll)n; i++)
#define rep2(i, begin_i, end_i) for (ll i = (ll)begin_i; i < (ll)end_i; i++)

long long INF = 1LL << 60;
int main()
{
    string s;
    cin >> s;
    vi num(s.size(), 0);
    int p = 0;
    int rcnt = 0, lcnt = 0;
    int vote = -1;

    while (p < s.size())
    {
        while (s.at(p) == 'R')
        {
            rcnt++;
            p++;
        }
        vote = p;
        int tmp = rcnt / 2;
        num.at(vote - 1)+= rcnt - tmp;
        num.at(vote)+= tmp;
        rcnt = 0;

        while (p < s.size() && s.at(p) == 'L')
        {
            lcnt++;
            p++;
        }
        tmp = lcnt / 2;
        num.at(vote - 1)+= tmp;
        num.at(vote)+= lcnt - tmp;
        lcnt = 0;

        vote = -1;
    }

    rep(i, s.size()) cout << num[i] << " ";

    return 0;
}


Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,a,b,p[100];
    cin>>n;
    cin>>a>>b;
    int ac=0,bc=0,cc=0;
    for(int i=0;i<n;i++){
        cin>>p[i];
        if(p[i]<=a){
            ac++;
        }
        else if(p[i]>b){
            cc++;
        }
        else {
            bc++;
        }
    }
    cout<<min({ac,cc,bc})<<endl;
}

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

#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char *name, Arg1 &&arg1)
{
    cerr << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&... args)
{
    const char *comma = strchr(names + 1, ',');
    cerr.write(names, comma - names) << " = " << arg1 << " | ";
    __f(comma + 1, args...);
}

int main()
{
    cin.sync_with_stdio(0);
    cin.tie(0);
    ll ans = 0;
    string s;
    cin >> s;
    ll cur = 0;
    for (char c : s)
    {
        if (c == 'R')
            cur++;
        else
        {
            ans = max(ans, cur);
            cur = 0;
        }
    }
    ans=max(ans,cur);
    cout << ans << "\n";
    return 0;
}


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

int main(){
    int N;
    cin>>N;
    
    unordered_set<string> g;
    
    for(int i=0;i<N;++i){
        string S;
        cin>>S;
        g.insert(S);
    }
    
    cout<<g.size()<<endl;
}


Measured memory_bytes: 17704
N = int(input())
A = list(map(int, input().split()))

count = 0
cont = True
current = A
while cont == True:
  new = []
  for c in current:
    if (c % 2 == 0):
      new.append(c // 2)
      continue
    else:
      cont = False
      break
  if (cont == True):
    current = new
    count += 1
  else:
    break

print(count)


Measured memory_bytes: 38512
#include <bits/stdc++.h>
using namespace std;
const uint64_t seed = std::chrono::system_clock::now().time_since_epoch().count();
mt19937_64 rnd(seed);
const int MOD = 998244353;

#ifdef VIPJML_LOCAL
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v)
{
    os << "{";
    for (typename vector<T>::const_iterator vi = v.begin(); vi != v.end(); ++vi)
    {
        if (vi != v.begin())
            os << ", ";
        os << *vi;
    }
    os << "}";
    return os;
}
template <typename A, typename B>
ostream &operator<<(ostream &os, const vector<pair<A, B>> &v)
{
    os << "{";
    for (typename vector<pair<A, B>>::const_iterator vi = v.begin(); vi != v.end(); ++vi)
    {
        if (vi != v.begin())
            os << ", ";
        os << '(' << vi->first << " " << vi->second << ")";
    }
    os << "}";
    return os;
}

template <typename A, typename B>
ostream &operator<<(ostream &os, const pair<A, B> &p)
{
    os << '(' << p.first << ", " << p.second << ')';
    return os;
}

void dbg_out() { cerr << endl; }
template <typename Head, typename... Tail>
void dbg_out(Head H, Tail... T)
{
    cerr << ' ' << H;
    dbg_out(T...);
}
#define dbg(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__)
#else
#define dbg(...)
#endif
class DSU
{
public:
    vector<int> pa;
    vector<int> cnt;
    int setCnt;

    DSU(int n) : pa(n), cnt(n), setCnt(n)
    {
        for (int i = 0; i < n; i++)
        {
            pa[i] = i;
            cnt[i] = 1;
        }
    }

    int get(int a)
    {
        return pa[a] = (pa[a] == a ? a : get(pa[a]));
    }

    bool merge(int a, int b)
    {
        a = get(a);
        b = get(b);
        if (a != b)
        {
            setCnt--;
            if (cnt[a] > cnt[b])
                swap(a, b);
            pa[a] = b;
            cnt[b] += cnt[a];
            return true;
        }
        else
            return false;
    }
};
void solve()
{
    int n, m;
    cin >> n >> m;
    DSU dsu(n);
    for (int i = 0; i < m; i++)
    {
        int a, b;
        cin >> a >> b;
        a--, b--;
        dsu.merge(a, b);
    }
    cout << dsu.setCnt - 1 << "\n";
}

int main()
{
    std::ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.precision(10);
    int T = 1;
    //cin >> T;
    for (int i = 1; i <= T; i++)
    {
        solve();
    }
    cout.flush();
    return 0;
}


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

typedef long long   signed int LL;
typedef long long unsigned int LU;

#define incID(i, l, r) for(int i = (l)    ; i <  (r); i++)
#define incII(i, l, r) for(int i = (l)    ; i <= (r); i++)
#define decID(i, l, r) for(int i = (r) - 1; i >= (l); i--)
#define decII(i, l, r) for(int i = (r)    ; i >= (l); i--)
#define  inc(i, n) incID(i, 0, n)
#define inc1(i, n) incII(i, 1, n)
#define  dec(i, n) decID(i, 0, n)
#define dec1(i, n) decII(i, 1, n)

#define inII(v, l, r) ((l) <= (v) && (v) <= (r))
#define inID(v, l, r) ((l) <= (v) && (v) <  (r))

#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define PQ priority_queue

#define  ALL(v)  v.begin(),  v.end()
#define RALL(v) v.rbegin(), v.rend()
#define  FOR(it, v) for(auto it =  v.begin(); it !=  v.end(); ++it)
#define RFOR(it, v) for(auto it = v.rbegin(); it != v.rend(); ++it)

template<typename T> bool   setmin(T & a, T b) { if(b <  a) { a = b; return true; } else { return false; } }
template<typename T> bool   setmax(T & a, T b) { if(b >  a) { a = b; return true; } else { return false; } }
template<typename T> bool setmineq(T & a, T b) { if(b <= a) { a = b; return true; } else { return false; } }
template<typename T> bool setmaxeq(T & a, T b) { if(b >= a) { a = b; return true; } else { return false; } }
template<typename T> T gcd(T a, T b) { return (b == 0 ? a : gcd(b, a % b)); }
template<typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }

// ---- ----

int n, k, a[200000], b[200000];

int main() {
	cin >> n >> k;
	inc(i, n) { cin >> a[i]; a[i]--; }
	
	inc(i, n) { b[a[i]]++; }
	
	sort(b, b + 200000, greater<int>());
	
	int ans = 0;
	incID(i, k, 200000) { ans += b[i]; }
	
	cout << ans << endl;
	
	return 0;
}


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

int main() {
    int n;
    cin >> n;
    vi a(n);
    map<int, int> cnt;
    int maxi = 0;
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
        chmax(maxi, a[i]);
        cnt[a[i]]++;
    }
    int nmin = (maxi % 2 == 0 ? maxi / 2 : maxi / 2 + 1);
    for (int i = maxi; i >= nmin; --i) {
        if (i == nmin && maxi % 2 == 0) {
            if (cnt[i] < 1) {
                cout << "Impossible"
                     << "\n";
                return 0;
            } else {
                cnt[i] -= 1;
            }
        } else {
            if (cnt[i] < 2) {
                cout << "Impossible"
                     << "\n";
                return 0;
            } else {
                cnt[i] -= 2;
            }
        }
    }
    while (true) {
        int cmax = -1;
        for (auto it = cnt.rbegin(); it != cnt.rend(); it = next(it)) {
            if (it->second != 0) {
                cmax = it->first;
                break;
            }
        }
        if (cmax == -1)
            break;
        if (cmax <= nmin || cmax > maxi) {
            cout << "Impossible"
                 << "\n";
            return 0;
        }
        for (int i = cmax; i > nmin; --i) {
            if (cnt[i] < 1) {
                continue;
            } else {
                cnt[i]--;
            }
        }
    }
    cout << "Possible"
         << "\n";
    return 0;
}

Measured memory_bytes: 256
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;

namespace ABC155
{
    public class Program
    {
        static void Main(string[] args)
        {
            var n = int.Parse(Console.ReadLine());
            var dict = new Dictionary<string, int>();
            var max = 1;

            for (var i = 0; i < n; i++)
            {
                var s = Console.ReadLine();
                int count;
                if (dict.TryGetValue(s, out count))
                {
                    dict[s] = count + 1;
                    max = Math.Max(max, count + 1);
                }
                else
                {
                    dict.Add(s, 1);
                }
            }
            var result = dict.Where(x => x.Value == max).Select(x => x.Key).ToList();
            result.Sort(StringComparer.Ordinal);
            Console.WriteLine(string.Join("\n", result));
        }
    }
}


Measured memory_bytes: 47480
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
using namespace std;
bool prime(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}

long long gcd(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd(b,a%b);
  }
}
 
long long lcm(long long x, long long y){
  return (x/gcd(x,y))*y;
}
 
class UnionFind {
    public:
    //各頂点の親の番号を格納する。その頂点自身が親だった場合は-(その集合のサイズ)を入れる。
    vector<int> Parent;
    
    //クラスを作るときは、Parentの値を全て-1にする。
    //以下のようにすると全てバラバラの頂点として解釈できる。
    UnionFind(int N) {
        Parent = vector<int>(N, -1);
    }
    
    //Aがどのグループに属しているか調べる
    int root(int A) {
        if (Parent[A] < 0) return A;
        return Parent[A] = root(Parent[A]);
    }
    
    //自分のいるグループの頂点数を調べる
    int size(int A) {
        return -Parent[root(A)];//先祖をrootで取っておきたい。
    }
    
    //AとBをくっ付ける
    bool connect(int A, int B) {
        //AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
        A = root(A);
        B = root(B);
        if (A == B) {
            //すでにくっついてるからくっ付けない
            return false;
        }
        
        //大きい方(A)に小さいほう(B)をくっ付けたい
        //大小が逆だったらAとBをひっくり返す。
        if (size(A) < size(B)) swap(A, B);
        
        //Aのサイズを更新する
        Parent[A] += Parent[B];
        //Bの親をAに変更する
        Parent[B] = A;
        
        return true;
    }
};

int main(){
  int n,m;
  cin>>n>>m;
  if(n>=m){
    cout<<0<<endl;
    return 0;
  }
  
  vector<int> x(m);
  REP(i,m){
    cin>>x[i];
  }
  sort(x.begin(),x.end());
  
  int ans=x[m-1]-x[0];
  vector<int> diff(m-1);
  REP(i,m-1){
    diff[i]=x[i+1]-x[i];
  }
  sort(diff.begin(),diff.end(),greater<int>());
  REP(i,n-1){
    ans -= diff[i];
  }
  cout<<ans<<endl;
  return 0;
}


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

using namespace std;

typedef long long ll;

const int INF = 1000000000;

int main()
{
  string s; cin >> s;
  string ans;
  for (int i = 0; i < (int)s.size(); i += 2) {
    ans.push_back(s[i]);
  }
  printf("%s\n", ans.c_str());
  return 0;
}


Measured memory_bytes: 512
#include <iostream>
#include <numeric>
#include <cmath>
#include <limits>
#include <stdio.h>
#include <iomanip>
#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 <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
using namespace std;
using ll = long long;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
ll Max(ll(a), ll(b), ll(c)) {
	return max(max(a, b), c);
}
ll Min(ll(a), ll(b), ll(c)) {
	return min(min(a, b), c);
}





int main() {

	ll N;
	string S;
	cin >> N >> S;
	vector<ll> W(N+1);
	ll an = N+3;
	W.at(0) = 0;
	rep(i, N) {
		if (S.at(i) == '.') {
			W.at(i + 1) = W.at(i) + 1;
		}
		else {
			W.at(i + 1) = W.at(i);
		}
	}
	rep(i, N+1) {
		
		an = min(an, (i - W.at(i)) + (W.at(N) - W.at(i)));
	}
	cout << an << endl;
}


Measured memory_bytes: 5236
#include <cstdio>

int N, A, B, C2, D2;
long long memo[1100][1100];
long long D = 1000000007;
long long C[1100][1100];
long long nP[1100];

long long calc(long long ii)
{
	long long r = 1;
	long long b = D-2;
	long long x = ii;
	while(b>0){
		if(b % 2 == 1){
			r *= x;
			r %= D;
		}
		b /= 2;
		x *= x;
		x %= D;
	}
	return r;
}

void pre()
{
	int i, j;
	for(i=0; i<=N; i++){
		C[i][0] = 1;
		C[i][i] = 1;
	}
	for(i=1; i<=N; i++){
		for(j=1; j<i; j++){
			C[i][j] = C[i-1][j] + C[i-1][j-1];
			C[i][j] %= D;
		}
	}
	nP[1] = 1;
	for(i=2; i<=N; i++){
		nP[i] = calc(i);
	}
}

void srch(int ii, int jj)
{
	int i;
	if(jj==A-1 && ii>0){
		memo[ii][jj] = 0;
		return ;
	}
	//if(jj>=A-1 && ii==0){
	if(ii==0){
		memo[ii][jj] = 1;
		return ;	
	}
	long long sum = 0;
	if(memo[ii][jj-1] == -1)
		srch(ii, jj-1);
	sum += memo[ii][jj-1];
	long long tmp = 1;
	long long tmp2 = 1;
	int i2 = ii;
	for(i=0; i<C2-1; i++){
		tmp *= C[i2][jj];
		tmp %= D;
		tmp *= nP[i+1];
		tmp %= D;
		i2 -= jj;
		if(i2<0){
			memo[ii][jj] = sum;
			return ;
		}
	}
	for(i=C2; i<=D2; i++){
		if(i2-jj<0)
			break;
		tmp *= C[i2][jj];
		tmp %= D;
		tmp *= nP[i];//tmp /= i;
		tmp %= D;
		if(memo[i2-jj][jj-1] == -1)
			srch(i2-jj, jj-1);
		tmp2 = tmp;
		tmp2 *= memo[i2-jj][jj-1];
		tmp2 %= D;
		sum += tmp2;
		sum %= D;
		i2 -= jj;
		//if(i2<0)
		//	break;
	}
	memo[ii][jj] = sum;
}

void solve()
{
	pre();
	int i, j;
	for(i=0; i<=N; i++){
		for(j=0; j<=N; j++)
			memo[i][j] = -1;
	}
	srch(N, B);
	printf("%lld\n", memo[N][B]);
}

int main()
{
	scanf("%d%d%d%d%d", &N, &A, &B, &C2, &D2);
	solve();
	return 0;
}

Measured memory_bytes: 17792
import java.util.*;
import java.lang.*;
import java.math.*;

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

	class color {
		int r, g, b;
		String s;

		color(int value, String s) {
			r = value >> 16;
			g = (value >> 8) & 255;
			b = value & 255;
			this.s = s;
		}

		int diff(color c) {
			return ((c.r - r) * (c.r - r) + (c.b - b) * (c.b - b) + (c.g - g)
					* (c.g - g));
		}
	}

	void run() {
		color db[] = { new color(0, "black"), new color(0, "blue"),
				new color(0, "lime"), new color(0, "aqua"),
				new color(0, "red"), new color(0, "fuchsia"),
				new color(0, "yellow"), new color(0, "white"), };
		db[1].b = 0xff;
		db[2].g = 0xff;
		db[3].g = 0xff;
		db[3].b = 0xff;
		db[4].r = 0xff;
		db[5].b = 0xff;
		db[5].r = 0xff;
		db[6].g = 0xff;
		db[6].r = 0xff;
		db[7].r = 0xff;
		db[7].b = 0xff;
		db[7].g = 0xff;

		for (;;) {
			String buffer = sc.next();
			if (buffer.equals("0")) {
				break;
			}
			Scanner in = new Scanner(buffer.substring(1));
			int value = in.nextInt(16);

			color ti = new color(value, "");
			int max = Integer.MAX_VALUE >> 1;
			String ret = "";
			for (color t : db) {
				if (max > t.diff(ti)) {
					max = t.diff(ti);
					ret = t.s;
				}
			}
			System.out.println(ret);
		}

	}

	public static void main(String[] args) {
		Main m = new Main();
		m.run();
	}
}

Measured memory_bytes: 13000
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define line cout<<"\n"
#define ci std ::cin
#define co std ::cout
#define sf(n) scanf("%d",&n);
#define sff(n,m) scanf("%d%d",&n,&m);
#define pf(n) printf("%d",n);
#define n_line printf("\n");
#define cas(n) printf("Case %d: ",n++);
#define task return
#define loop(x,n)  for(int x = 0 ; x < n ; x++)
#define constloop(x,a,n) for(int x = a ; x < n ; x++)
#define revloop(x,a,n)  for(int x = a ; x >= n ; x--)
#define REP(i,a,b) for (int i = a; i <= b; i++)
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define pi acos(-1)
#define mx 10000000
ll P[mx+5],cnt=1;
bool nP[mx+5];
void sieve(void)
{
    P[0]=2;
    nP[0]=true;
    nP[1]=true;
    for(ll i=3 ; i<=mx ; i+=2)
    {
        if(nP[i]==true)
            continue;
        for(ll j=i+i ; j<=mx ; j+=i)
            nP[j]=true;
        P[cnt++]=i;
    }
}
void solve()
{
    //Code here
 	string s;
 	cin>>s;
 	int cnt=0,final=0;
 	for(int i=0 ; i<s.size() ; i++)
 	{
 		if(s[i]=='R')
 			cnt++;
 		else
 			cnt=0;
 		final=max(cnt,final);
 	}
 	cout<<final<<endl;
}
int main()
{
	/*freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);*/
	/*ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);*/
	solve();
	return 0;
}

Measured memory_bytes: 3632
<?php
class Line {
    protected $lineData;
    protected $pointer;
    public function __construct(array $line)
    {
        $this->lineData = $line;
        $this->pointer = 0;
        $this->count = count($line);
    }

    public function next()
    {
        if ($this->count > $this->pointer) {
            return $this->lineData[$this->pointer++];
        }
        return false;
    }
}

class IOW {
    /**
     * @return Line
     */
    public static function nl()
    {
        $str = trim(fgets(STDIN));
        return new Line(explode(' ', $str));
    }

    public static function out($data)
    {
        print_r ($data . PHP_EOL);
    }
}

$line = IOW::nl();

$birth = $line->next();
$money = $line->next();

switch (true)
{
    case $birth >= 13:
        IOW::out($money);
        break;
    case $birth < 6:
        IOW::out(0);
        break;
    default:
        IOW::out($money/2);
}

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

using Pii = pair<int, int>;
using Pll = pair<ll, ll>;

#define REP(i, l, n) for(int i=(l), i##_len=(n); i<i##_len; ++i)
#define ALL(x) (x).begin(),(x).end()
#define pb push_back

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

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

char alpha[26] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};

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


int main(){
    ll n, k; cin >> n >> k;
    vector<ll> lis(n);
    REP(i, 0, n){cin >> lis[i];}
    REP(i, 0, n-k){
        if(lis[i] < lis[i+k]){
            cout << "Yes" << endl;
        }else{
            cout << "No" << endl;
        }
    }
}

Measured memory_bytes: 4856
listanm = []

n,m = map(int,input().split())

for x in range(n):
    listanm.append(0)

for c in range(m):
    a,b = map(int,input().split())
    listanm[a-1]+=1
    listanm[b-1]+=1
for g in listanm:
    print (g)
    


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

int main(){
  int n, m;
  int h[1500], w[1500];

  for(;;) {
    cin>>n>>m;
    if(!(n|m)) break;
    int sum[1500000]={0};
    int ans=0;    
    for(int i=0;i<n;i++){
      cin>>h[i];
      for(int j=0;j<i+1;j++){
	if(i!=j) h[j]+=h[i];
	sum[h[j]]++;
      }
    }
    for(int i=0;i<m;i++){
      cin>>w[i];
      for(int j=0;j<i+1;j++){
	if(i!=j) w[j]+=w[i];
	ans+=sum[w[j]];
      }
    } 
    cout<<ans<<endl;
  }
}


Measured memory_bytes: 7036
#include <bits/stdc++.h>
using namespace std;
const int SIZE = 1<<18;
using ll = long long;
using pll = pair<ll, ll>;
int h[200001];
struct LiChao{
	struct Node{
		int l=0,r=0;
		pll line = pll(0, (ll)1e18);
	} node[2*SIZE];
	int cnt;
	inline ll f(pll line, int x){
		return line.first*x + line.second;
	}
	void update(int nn, int ns, int ne, pll newLine){
		auto &cur = node[nn];
		pll l1 = cur.line, l2 = newLine;
		if(f(l1, ns) > f(l2, ns)) swap(l1, l2);
		if(f(l1, ne) <= f(l2, ne)){
			cur.line = l1;
			return;
		}
		int m = ns+ne>>1;
		if(f(l1, m) <= f(l2, m)){
			cur.line = l1;
			if(!cur.r) cur.r = ++cnt, node[cnt].line = l1;
			update(cur.r, m+1, ne, l2);
		}
		else{
			cur.line = l2;
			if(!cur.l) cur.l = ++cnt, node[cnt].line = l2;
			update(cur.l, ns, m, l1);
		}
	}
	ll query(int nn, int ns, int ne, int x){
		auto &cur = node[nn];
		if(ns==ne) return f(cur.line, x);
		int m = ns+ne>>1;
		if(m<x) return min(f(cur.line, x), cur.r?query(cur.r, m+1, ne, x):(ll)1e18);
		return min(f(cur.line, x), cur.l?query(cur.l, ns, m ,x):(ll)1e18);
	}
} L;
int N;
ll dp[200001], C;
int main(){
	scanf("%d%lld",&N,&C);
	for(int i=1; i<=N; ++i) scanf("%d",h+i);
	L.update(0, 0, 1e6, pll(-2ll*h[1], 1ll*h[1]*h[1]));
	for(int i=2; i<=N; ++i){
		dp[i] = 1ll*h[i]*h[i]+C+L.query(0, 0, 1e6, h[i]);
		L.update(0, 0, 1e6, pll(-2ll*h[i], 1ll*h[i]*h[i]+dp[i]));
	}
	printf("%lld",dp[N]);
	return 0;
}


Measured memory_bytes: 14848
#include <bits/stdc++.h>
using namespace std;
int main(){
    for(int i=0; ;i++){
    int h,w;
    cin >> h>>w;
    if(h == 0 && w==0)return 0;
    for(int j=0;j<h;j++){
        for(int k=0;k<w;k++)cout<<"#";
        cout<<endl;
    }
    cout<<endl;
    }

}


Measured memory_bytes: 3096
/*package whatever //do not write package name here */

import java.io.*;
import java.util.*;


public class Main {
	public static void main (String[] args) {
	Scanner s=new Scanner(System.in);
	int n=s.nextInt();
	String c=s.next();
	HashSet<Integer> cl=new HashSet<>();
	ArrayList<Integer> bl=new ArrayList<>();
	ArrayList<Integer> al=new ArrayList<>();
	for(int i=0;i<n;i++)
	{char cc=c.charAt(i);
	if(cc=='R')
	al.add(i);
	else if(cc=='G')
	bl.add(i);
	else
	cl.add(i);
	}
	long ans=0;
	for(int i=0;i<al.size();i++)
	{for(int j=0;j<bl.size();j++)
	{int p=al.get(i);
	int q=bl.get(j);
	int k=Math.abs(p-q);
	int max=Math.max(p,q);
	int min=Math.min(p,q);
	ans+=cl.size();
	if(cl.contains(max+k))
	ans-=1;
	if((k)%2==0 && cl.contains(max-k/2))
	ans-=1;
	if(cl.contains(min-k))
	ans-=1;
	}}
	System.out.println(ans);
	}
}

Measured memory_bytes: 56500
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <sstream>
#include <set>
#include <map>
#include <vector>
#include <list>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <string>
#include <stack>
#include <queue>
#include <bitset>     //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic
#include <cassert>
#include <iomanip>        //do setprecision
#include <ctime>
#include <complex>
using namespace std;

#define FOR(i,b,e) for(int i=(b);i<(e);++i)
#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)
#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)
#define REP(x, n) for(int x = 0; x < (n); ++x)

#define ST first
#define ND second
#define PB push_back
#define PF push_front
#define MP make_pair
#define LL long long
#define ULL unsigned LL
#define LD long double
#define pii pair<int,int>
#define pll pair<LL,LL>
#define vi vector<int>
#define vii vector<vi>

const double pi = 3.14159265358979323846264;
const int mod=1000000007;

int main(){
	int n,t;
    cin>>n>>t;
    vector<pii> a(n);
    vii dp(n+1,vi(t+1,0));
    int mx=0;
    FOR(i,0,n){
        int aa,as;
        cin>>aa>>as;
        a[i]=MP(aa,as);
    }
    sort(a.begin(),a.end());

    int ans=0;
    FOR(i,0,n){
        FOR(j,0,t+1){
            if(j!=t){
                int tmp=min(j+a[i].ST,t);
                dp[i+1][tmp]=max(dp[i+1][tmp],dp[i][j]+a[i].ND);
                ans=max(ans,dp[i+1][tmp]);
                ans=max(ans,dp[i][j]+mx);
            }
            dp[i+1][j]=max(dp[i+1][j],dp[i][j]);
        }
    }
    cout<<ans;

}

Measured memory_bytes: 35584
parseInt(x) = parse(Int, x)
parseArray(x::Array{SubString{String}, 1}) = map(parseInt, x)

function main()
  n = readline() |> parseInt
  s=readline()|>strip|>collect

  ans=0
  prev=s[1]
  for i in 2:n
    s[i]==prev&&(ans+=1)
    prev=s[i]
  end
  println(n-ans)
end

main()


Measured memory_bytes: 122320
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int bills = (n % 1000 == 0)?(n/1000):(n/1000)+1;
		
		System.out.println((bills * 1000) - n);
	}

}


Measured memory_bytes: 32292
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

int main(){
    int d;
    cin>>d;
    d=25-d;
    cout<<"Christmas ";
    rep(i,d)cout<<"Eve ";
    cout<<endl;
    return 0;
}


Measured memory_bytes: 256
#include <algorithm>  //sort,二分探索,など
#include <array>
#include <bitset>         //固定長bit集合
#include <cmath>          //pow,logなど
#include <complex>        //複素数
#include <deque>          //両端アクセスのキュー
#include <functional>     //sortのgreater
#include <iomanip>        //setprecision(浮動小数点の出力の誤差)
#include <iostream>       //入出力
#include <map>            //map(辞書)s
#include <numeric>        //iota(整数列の生成),gcdとlcm(c++17)
#include <queue>          //キュー
#include <set>            //集合
#include <stack>          //スタック
#include <string>         //文字列
#include <unordered_map>  //イテレータあるけど順序保持しないmap
#include <unordered_set>  //イテレータあるけど順序保持しないset
#include <utility>        //pair
#include <vector>         //可変長配列

using namespace std;
typedef long long ll;

#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = (ll)(n)-1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = (a); i <= (b); i++)
#define FORD(i, a, b) for (ll i = (a); i >= (b); i--)
#define ALL(x) (x).begin(), (x).end()  // sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size())  // sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))
#define INF 1000000000000
#define MOD 10000007
#define PB push_back
#define MP make_pair
#define F first
#define S second
int main() {
  int N;
  cin >> N;
  ll ans = 0;
  cin >> ans;
  for (ll i = 1; i <= N; ++i) {
    if (i % 3 != 0 && i % 5 != 0) {
      ans+=i;
    }
  }
  cout << ans << endl;
}


Measured memory_bytes: 3636
#include <cstdlib>
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define MAX 100005
#define pb push_back
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
const double PI  =3.141592653589793238463;
long long MOD = 1000000007;

int stringToInteger(string x){
    int gg=0;
    //stringstream geek(x);
    //geek >> gg;
    return gg;
}

ll powmod(ll a,ll b,ll m)
{
    ll ans=1;
    while(b>0){ if(b%2)
        {ans*=a; ans%=m;}
         b/=2; a=a*a; a=a%m;
        }
        return ans%m;
}
ll gcd(ll a,ll b)
{

    return __gcd(a,b);
}
ll mulmod(ll a,ll b,ll m)
{  ll ans=0;
    a %=m;
    while (b>0)
    {       if(b&1) ans = (ans + a) % m;
        a = (a * 2)%m;
        b /= 2;
    }
    return ans % m;
}

ll pow(ll a, ll b, ll MOD)
{
 ll x=1,y=a;
 while(b > 0)
 	{
 		if(b%2 == 1)
 	{
 		x=(x*y);
 		if(x>MOD) x%=MOD;
 	}
 	y = (y*y);
 	if(y>MOD) y%=MOD;
 	b /= 2;
 	}
 return x;
}
ll modInverse(ll a, ll m)
{
    a = a%m;
    for (int x=1; x<m; x++)
       if ((a*x) % m == 1)
          return x;
}
ll maxDivide(ll a, ll b)
{
  while (a%b == 0)
   a = a/b;
  return a;
}
  set<ll>ans;
void primeFactors(ll n)
{

    while (n % 2 == 0)
    {
       ans.insert(2);
        n = n/2;
    }

    for (ll i = 3; i <= sqrt(n); i = i + 2)
    {
        // While i divides n, print i and divide n
        while (n % i == 0)
        {
            ans.insert(i);
            n = n/i;
        }
    }

    // This condition is to handle the case when n
    // is a prime number greater than 2
    if (n > 2)
        ans.insert(n);
}
ll is(ll no)
{   if(no==1) return 0;
    set<ll>::iterator it;
for(it=ans.begin();it!=ans.end();it++){
  no = maxDivide(no, *it);
  if(no==1) return 1;
//  if()
 // no = maxDivide(no, 3);
 // no = maxDivide(no, 5);
}
//if(no==1) return 1;
//for(it=ans.begin();it!=ans.end();it++){
//if(no==*it) return 1;
//}
  return 0;
}

int comp(string a,string b)
{
    string aa = a.append(b);
    string bb = b.append(a);

    return aa.compare(bb) > 0 ? 1: 0;

}
int main()
{
   long double n,k;
   cin>>n>>k;
   long double nn=n;
   long double a = 0;
   if(n>=k)
   { a=(n-k+1)/n;
     n=k-1;
   }
   long double ans=a;
//cout<<a<<" "<<n<<endl;
   for(long double i=1;i<=n;i++)
   {
    //  int b = log(k/i)/log(2);
    //  cout<<b<<endl;
long double s = (log(k/i)/log(2));
if (abs(s - (round(s))) < 0.000000001)
 { s=s;}
else s=ceil(s);

//cout<<s<<endl;
   ans+= (1/nn) *(1 /  pow(2,s));
   }
   cout<<setprecision(15)<<fixed<<ans<<endl;

}




Measured memory_bytes: 512
#include<bits/stdc++.h>
using namespace std;
#define oo (long long)1e18
#define ll long long
#define setdp memset(dp,-1,sizeof(dp))
const ll mod = 1e9+7;
void _IOS(){ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);cin.sync_with_stdio(0);}
#define PI 3.14159265359
int sx,sy,tx,ty;
//8c:1a:bf:89:66:b6
struct threeElements{
int _1st,_2nd,_3rd;
};
vector<vector<int>>adj(10);
ll solve(int a,int b)
{
    int f=0,s=0;
    while(a)
    {
        a/=10;
        f++;
    }
    while(b)
    {
        b/=10;
        s++;
    }
    return max(f,s);
}
int main()
{
   // freopen ("jumping.in","r",stdin);
   _IOS();
   //18:52
   int n;
   cin>>n;
   vector<string>v;
   for(int i=0;i<n;i++)
   {
       string s;
       cin>>s;
       v.push_back(s);
   }
   vector<vector<int>>va(27);
   for(char ch='a';ch<='z';ch++)
   {
       ll c=oo;
       for(int j=0;j<n;j++)
       {
           ll u=0;
           for(int k=0;k<v[j].size();k++)
           {
               if(v[j][k]==ch)
                u++;
           }
           c=min(c,u);
       }
       va[ch-'a'].push_back(c);
   }
   string s;
   for(char i='a';i<='z';i++)
   {
       for(int j=0;j<va[i-'a'][0];j++)
       {
           s+=i;
       }
   }
   sort(s.begin(),s.end());
   cout<<s;
}


Measured memory_bytes: 3628
#include<cmath>
#include<cstdio>
#include<iostream>
#include<climits>
#include<algorithm>
#include<ctime>
#include<cstdlib>
#include<vector>
#include<cassert>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)   REP(i,0,n)
typedef long long ll;
const int N = 100001;
const ll mod = 100000007;
ll len5[N];
ll len3[N];
ll dp5[N];
ll dp3[N];

void precalc(){
  len5[0]=1;
  len3[0]=1;
  for(int i=1;i<N;i++){
    len5[i]=0;
    len3[i]=0;
    for(int j=1;j<=5;j++){
      if (i-j < 0)continue;
      len5[i]+=len5[i-j];
      len5[i]%=mod;
    }
    for(int j=1;j<=3;j++){
      if (i-j < 0)continue;
      len3[i]+=len3[i-j];
      len3[i]%=mod;
    }
  }

  //O(n)
  dp5[0]=0;
  dp3[0]=0;
  for(int i=1;i<N;i++){
    dp5[i]=len5[i];
    dp3[i]=len3[i];
    if (i-5 > 0){
      dp5[i]+=dp5[i-5];
      dp5[i]%=mod;
    }
    if (i-3 > 0){
      dp3[i]+=dp3[i-3];
      dp3[i]%=mod;
    }
  }

}

main(){
  precalc();
  string in;
  while(cin>>in){
    if (in == "#")break;
    in=in+"*";//endmark
    //8,0 or 1,2,3,4,5,6,7,9
    ll ans=1;
    char prev='+';
    int cnt=1;
    for(int i=0;i<in.size();i++){
      if (prev != in[i]){
	if (prev == '0' || prev == '8')ans=ans*dp3[cnt];
	else if (isdigit(prev))ans=ans*dp5[cnt];
	ans%=mod;
	prev=in[i];
	cnt=1;
      }else cnt++;
    }
    cout << ans%mod << endl;
  }
  return false;
}

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

int main(){
ll N,A=1,B=0;
  cin >> N;
ll n=N,m=10000000000000;
  
while(A<=sqrt(N)){
  if(N%A==0){
    m=min(m,A+(N/A)-2);
  }
  A++;
}
  

  
   
cout << m << endl;
  
}

Measured memory_bytes: 256
H, W = map(int, input().split())
HW_list = [list(input()) for i in range(H)]
import copy

tate = [False] * H
yoko = [False] * W

for h in range(H):
    for w in range(W):
        if HW_list[h][w] == '#':
            tate[h] = True
            yoko[w] = True

for h in range(H):
    tmp = ''
    for w in range(W):
        if tate[h] and yoko[w]:
            tmp += HW_list[h][w]
    if tmp == '':
        continue
    print(tmp)


Measured memory_bytes: 9364
#include<bits/stdc++.h>
 
using namespace std;
 
#define INF 1000000007
#define LINF 1000000000000000007
 
typedef long long ll;
typedef pair<ll,ll> P;


int n;

int main(){
	cin >> n;
	
	if(n % 2 ) cout << n * 2 << endl;
	else cout << n << endl;
	
	return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <memory.h>
#include <limits.h>
#include <math.h>

int main(int argc, char *argv[])
{
    int n, k;
    char s[100];
    int ans;

    scanf("%d %d", &n, &k);
    scanf("%s", s);

    s[k - 1] += 0x20;

    printf("%s\n", s);

    return 0;
}


Measured memory_bytes: 128
#include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
#include <string>
#include <complex>
#include <functional>
using namespace std;
typedef pair<int,int> P;
int cnt[7];
int main(){
    int i,n,p;
    while(cin>>n&&n){
        for(i=0;i<7;i++) cnt[i]=0;
        for(i=0;i<n;i++){
            cin>>p;
            if(p<10) cnt[0]++;
            else if(p<20) cnt[1]++;
            else if(p<30) cnt[2]++;
            else if(p<40) cnt[3]++;
            else if(p<50) cnt[4]++;
            else if(p<60) cnt[5]++;
            else cnt[6]++;
        }
        for(i=0;i<7;i++) cout<<cnt[i]<<endl;
    }
    return 0;
}


Measured memory_bytes: 3068
import scala.collection.mutable

object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val N, K = sc.nextInt()
  val counts = mutable.Map[Int, Int]()
  for (_ <- 1 to N) {
    val a = sc.nextInt()
    counts.update(a, counts.getOrElse(a, 0) + 1)
  }
  val diff = counts.keys.size - K
  println(if (diff <= 0) 0 else counts.values.toList.sorted.take(diff).sum)
}


Measured memory_bytes: 83472
#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
typedef long long ll;
namespace mp = boost::multiprecision;
using Mint = mp::cpp_int;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repi(i,a,b) for(int i = int(a); i < int(b); i++)
#define all(v) v.begin(), v.end()
#define uni(v) v.erase(unique(all(v)), v.end())
#define sort_g(v) sort(all(v), greater<int>())
#define dump(x) cerr << #x << ' ' << '=' << ' ' << x << endl

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

    int cnt = 0;
    rep(i, M + 1) {
        rep(j, D + 1) {
            int D_d = j / 10;
            int D_o = j % 10;
            if(D_d >= 2 && D_o >= 2 && D_d * D_o == i) cnt++;
        }
    }
    
    cout << cnt << endl;
}

Measured memory_bytes: 3648
#include<stdio.h>

int n,A[2000];

int solve (int i,int m){
	int res;
	if(m==0) return 1;
	if(i>=n) return 0;
	res = solve(i+1,m) || solve(i+1,m-A[i]);
	return res;
}

int main()
{
	int q,m,i;
	scanf("%d",&n);
	for(i=0;n>i;i++) scanf("%d",&A[i]);
	scanf("%d",&q);
	for(i=0;q>i;i++){
		scanf("%d",&m);
		if(solve(0,m)) printf("yes\n");
		else printf("no\n");
	}
	return 0;
}

Measured memory_bytes: 1804
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<vector>
#include<climits>

typedef long long LL;
using namespace std;
#define pb push_back
#define mp make_pair
#define x first
#define y second

int read()
{
	int x = 0, f = 1; char c = getchar();
	while(!isdigit(c)) { if(c == '-') f = 0; c = getchar(); }
	while(isdigit(c)) { x = (x * 10) + (c ^ 48); c = getchar(); }
	return f ? x : -x;
}

const int maxn = 1010;
int a[maxn][maxn];

int main()
{

	int K = read();

	if(K == 1) { puts("1"); puts("1"); return 0; }

	int n = max((K + 1) / 2, 1);
	if(n & 1) n++;
	cout << n << endl;
	int now = 0;
	for(int i = 1; i <= n; ++i)
	{
		int p1, p2;
		if(now + 2 <= K && K - (now + 2) >= (n - i))
		{
			p1 = now + 1; p2 = now + 2;
			now += 2;
		}
		else { p1 = p2 = now + 1; now++; }
		for(int j = 1, k = i; j <= n; ++j, k = (k == n) ? 1 : k + 1, swap(p1, p2))
			a[j][k] = p1;
	}
	for(int i = 1; i <= n; ++i)
	{
		for(int j = 1; j <= n; ++j)
			cout << a[i][j] << ' ';
		cout << endl;
	}

	return 0;
}

Measured memory_bytes: 3200
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		
		Scanner scan = new Scanner(System.in);
		int h = scan.nextInt();
		int a = scan.nextInt();
		
		int ans = h / a;
		if(ans * a == h) {
			System.out.print(ans);
			return;
		}
		else {
			System.out.print(ans+1);
		}
	}

}


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

using namespace std;

#define ll long long

ll r;

void solve() {
  cin >> r;
  cout << r * r << '\n';
}

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


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
// マクロ
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
// typedef
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<vi> vvi;

int main() {
    char s;
    cin >> s;
    cout << char(s + 1)<< endl;
}

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

typedef long long ll;
const int maxn = 3e5+100,MOD = 1e9+7;
ll arr[maxn],bits[maxn][2],tt[maxn];

int main() {
    ll n,ans = 0;
    tt[0] = 1;
    for(int i=1; i<=60; i++) {
        tt[i] = tt[i-1]*2%MOD;
    }
    //slove()
    scanf("%lld",&n);
    for(int i=0; i<n; i++) scanf("%lld",&arr[i]);
	for(int k=0; k<=60; k++) {
		for(int i=0; i<n; i++) {
			bits[k][arr[i]%2]++;
			arr[i]/=2;
		}
		ans = (ans+bits[k][0]*bits[k][1]%MOD*tt[k]%MOD)%MOD;
	}
	ans %= MOD;
    printf("%lld\n",ans);
    return 0;
}


Measured memory_bytes: 5504
#include<bits/stdc++.h>
// #define int long long
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define repa(i, s, n) for(int i = s; i < (int)n; i++)
#define MOD 1000000007
using namespace std;
using ll = long long;
typedef vector<int> vi;

signed main() {
    int all = 1, n;
    cin >> n;
    vi a(n+1);
    int he = 1;
    rep(i, n){
        cin >> a[n];
        if(a[n] % 2 == 0) he*=2;
        all *= 3;
    }


    ll ans = all - he;
    cout << ans << endl;


}

Measured memory_bytes: 3636
#include <stdio.h>
#define SIZE 5

int main(int argc, char *argv[]){
     int x, y, v[SIZE][SIZE], h[SIZE][SIZE], f;
     char d, t[SIZE+1];
     
     while(~scanf("%s",t)){
	  for(x=0; x<SIZE-1; x++) h[x][0] = t[x]-'0';
	  
	  for(y=0; y<SIZE-1; y++){
	       scanf("%s",t);
	       for(x=0; x<SIZE; x++) v[x][y] = t[x]-'0';
	       scanf("%s",t);
	       for(x=0; x<SIZE-1; x++) h[x][y+1] = t[x]-'0';
	  }
	  
	  x=0, y=0, f=0, d='R';
	  while(x!=0 || y!=0 || !f){
	       f=1;
	       
	       putchar(d);
	       
	       switch(d){
	       case 'R':
		    x++;
		    if(y!=0 && v[x][y-1]) d='U';
		    else if(x!=SIZE-1 && h[x][y]) d='R';
		    else if(y!=SIZE-1 && v[x][y]) d='D';
		    else d='L';
		    break;
	       case 'D':
		    y++;
		    if(x!=SIZE-1 && h[x][y]) d='R';
		    else if(y!=SIZE-1 && v[x][y]) d='D';
		    else if(x!=0 && h[x-1][y]) d='L';
		    else d='U';
		    break;
	       case 'L':
		    x--;
		    if(y!=SIZE-1 && v[x][y]) d='D';
		    else if(x!=0 && h[x-1][y]) d='L';
		    else if(y!=0 && v[x][y-1]) d='U';
		    else d='R';
		    break;
	       case 'U':
		    y--;
		    if(x!=0 && h[x-1][y]) d='L';
		    else if(y!=0 && v[x][y-1]) d='U';
		    else if(x!=SIZE-1 && h[x][y]) d='R';
		    else d='D';
		    break;
	       }
	  }

	  printf("\n");
     }

     return 0;
}

Measured memory_bytes: 0
n = int(input())
s = input()
 
result = 0
 
if n <= 2:
    print(0)

for i in range(n-2):
    if s[i] == "R":
        a = s[i+1:].count("G")
        b = s[i+1:].count("B")
        result += a*b
        for j in range(1, (n+1-i)//2):
            if (s[i+j] == "G" and s[i+2*j] == "B") or (s[i+j] == "B" and s[i+2*j] == "G"):
                result -= 1
    elif s[i] == "G":
        a = s[i+1:].count("R")
        b = s[i+1:].count("B")
        result += a*b
        for j in range(1, (n+1-i)//2):
            if (s[i+j] == "R" and s[i+2*j] == "B") or (s[i+j] == "B" and s[i+2*j] == "R"):
                result -= 1
    elif s[i] == "B":
        a = s[i+1:].count("R")
        b = s[i+1:].count("G")
        result += a*b
        for j in range(1, (n+1-i)//2):
            if (s[i+j] == "R" and s[i+2*j] == "G") or (s[i+j] == "G" and s[i+2*j] == "R"):
                result -= 1
print(result)

Measured memory_bytes: 9308
#include <bits/stdc++.h>
#define ll  long long
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define br cout <<"\n";
#define all(x)  (x).begin(),(x).end()
#define rall(x)  (x).rbegin(),(x).rend()
#define tr(c,i) for(auto i : c)
#define pii pair< int,int >
#define fast_io() ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define pq priority_queue< pair<ll,pii> ,vector<pair<ll,pii>>,greater <pair<ll,pii>> >p;//container adapter makes ascending q
using namespace std;
const int dx[] = { 1, -1 , 0 , 0  };
const int dy [] = { 0 ,0 , 1 , -1  };
const int MOD = 1000 * 1000 * 1000 + 7 ;
const int N = 4  ;
const int MAXN = 1000*100 + 5 ;
const int INF = INT_MAX ;

int main (){
int n ;
cin >> n ;
bool ok = true ;
for (int i = 0 ; i < n ; ++ i){
 int x ;
 cin >> x ;
 if (x % 2 == 0 ){

	if ( x % 3 == 0  or x % 5 == 0  )
	continue ;
	ok = false ; 

	 } 	

}

cout << (ok ?"APPROVED":"DENIED" );
br






 


return 0 ;
 
}

// 2 year => 2 3 -> 6 5 1 5 5 1 5 


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define SZ(x) ((int)x.size())
#define ALL(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
typedef long double ld;
int n, c[26];
char s[30];
int main() {
	scanf("%s", s);
	n = strlen(s);
	for(int i=0; i<n; i++) {
		c[s[i]-'a']++;
	}
	for(int t=n; t>=0; t--) {
		int idx = -1;
		//printf("t:%d\n", t);
		for(int i=s[t] ? s[t] - 'a' : 0; i<26; i++) {
			if(c[i] == 0) {
				for(int j=0; j<t; j++) putchar(s[j]);
				putchar(i + 'a');
				return 0;
			}
		}
		if(t < n) c[s[t] - 'a']--;
	}
	puts("-1");
	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<map>
#include<vector>
#include<string>
#include <cmath>

using namespace std;


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



int main() {
    int N,K;
    cin >> N >> K;
    int A[N];
    for(int i = 0; i < N; i++) {
        cin >> A[i];
    }
    int gc = A[0];
    int ma = A[0];
    for(int i = 1; i < N; i++) {
        gc = gcd(gc,A[i]);
        ma = max(ma,A[i]);
    }

    if(K % gc == 0 && K <= ma) {
        cout << "POSSIBLE" << endl;
    } else {
        cout << "IMPOSSIBLE" << endl;
    }
    


    
}


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

#define llong long long
#define inf 999999999
#define mp make_pair
#define pb push_back
#define fn fill_n
typedef pair<int, int> P;
typedef pair<P, int> PP;
typedef pair<PP, int> PPP;
typedef struct data{
	int now;
	int cost;
}data;
int nh[4] = {1, 0, -1, 0};
int nw[4] = {0, 1, 0, -1};





int main(){
	// int n, k;
	// int ans = 0;
	// cin >> n >> k;
	// for(int i = k; i <= n; i++){
	// 	for(int j = k; j <= i; j++){
	// 		if(i%j >= k) ans++;
	// 		if(j == i) ans += n - i;
	// 	}
	// }
	// cout << ans << endl;
	unsigned llong int n, m;
	cin >> n >> m;
	if(n == 1 && m == 1) cout << 1 << endl;
	else if(n == 1) cout << m - 2 << endl;
	else if(m == 1) cout << n - 2 << endl;
	else cout << m * n - 2 * m - 2 * n + 4 << endl;
	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<functional>
#include<map>
#include<unordered_set>
using namespace std;
//int p = 998244353;
int p = 1000000007;
#define int long long
#define vel vector<long long>
#define vvel vector<vel>
#define rep(i,n) for(int i=0;i<n;i++)
#define sor(v) sort(v.begin(),v.end())
#define mmax(a,b) a=max(a,b)
#define mmin(a,b) a=min(a,b)
#define mkp make_pair
#define pin pair<int,int>
#define qin pair<int,pin>
#define V vector
#define Endl endl
#define veb vector<bool>
#define rev(s) reverse(s.begin(),s.end())
int max_kai = 150000;
vel kai(max_kai, 1);
vel inv_kai;
int rui(int a, int n) {
	if (n == 0) { return 1; }
	int x = rui(a, n / 2);
	x *= x; x %= p;
	if (n % 2 == 1) { x *= a; x %= p; }
	return x;
}
int inv(int a) { return rui(a, p - 2); }
void make_kai() {
	for (int i = 1; i < max_kai; i++) { kai[i] = kai[i - 1] * i; kai[i] %= p; }
	inv_kai = kai;
	rep(i, max_kai) { inv_kai[i] = inv(kai[i]); }
}
int nCr(int n, int r) {
	int a = kai[n] * inv_kai[r]; a %= p;
	a *= inv_kai[n - r]; a %= p;
	return a;
}
int inf = 6000000000000;
vel dijk(vvel &way, vel &cost, int s) {
	int n = way.size(); int m = 7 * n;
	vel ans(m, inf);
	priority_queue<pin, vector<pin>, greater<pin>> que;//cost,pla
	que.push(mkp(0,s));
	while (!que.empty()) {
		pin x = que.top(); que.pop();
		int pla = x.second;
		if (ans[pla] == inf) {
			int sum_cost = x.first;
			ans[pla] = sum_cost;
			int nex_cost = sum_cost + cost[pla];
			int mod = nex_cost % 7;
			for (auto x : way[pla/7]) {
				que.push(mkp(nex_cost, x * 7 + mod));
			}
		}
	}
	return ans;
}
vel pa;
int root(int x) {
	if (pa[x] == -1) { return x; }
	int ans = root(pa[x]); pa[x] = ans;
	return ans;
}
void marge(int x, int y) {
	x = root(x);
	y = root(y);
	if (x != y) {pa[x] = y;}
}
#define lower(h,val) lower_bound(h.begin(),h.end(),val)-h.begin()
#define upper(h,val) upper_bound(h.begin(),h.end(),val)-h.begin()
int sol(int a, int b, int c, int d) {
	return abs(a*c - b * d);
}
signed main(){
	vel ans(101, 0);
	rep(i, 12) {
		int e; cin >> e;
		ans[e]++;
	}
	rep(i, 101) {
		if (ans[i] % 4 != 0) { cout << "no" << endl; return 0; }
	}
	cout << "yes" << endl;
	return 0;
}


Measured memory_bytes: 3716