akhauriyash/Code-Regression huggingface dataset:
#include <stdio.h>

int main(void)
{
	int prime[1000]={2},i,j,n=0,judge=1,N,Na,a[1000]={};
	long long int num=1,ans=1;

	for(i=3;i<1000;i++){
		for(j=0;j<=n;j++){
			if(i%prime[j]==0){
				judge=0; break;
			}
		}
		if(judge!=0){
			prime[n+1]=i;
			n++;
		}
		judge=1;
	}

	scanf("%d",&N);

	while(1){
		i=0; Na=N;
		while(Na>1){
			if(prime[i]==0)	break; 

			if(Na%prime[i]==0){
				a[i]++;
				Na=Na/prime[i];
			}else{
				i++;
			}
		}
		N--;
		if(N<=1) break;
	}
	
	for(i=0;i<1000;i++){
		if(a[i]!=0){
			ans=(ans*(a[i]+1))%(1000000007);
		}
	}

	printf("%lld\n",ans);
	return 0;
}

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

int main() {
	string s;
	cin >> s;
	bool before = true;
	int cnt=0;
	int ma = 0;
	rep (i,3) {
		if (before) {
			if (s[i] == 'R' ){
				cnt++;
				before = true;
				ma = max(ma, cnt);
			} else {
				cnt = 0;
				before == false;
				ma = max(ma, cnt);
			}
		} else {
			cnt = 0;
			if (s[i] == 'R' ){
				cnt++;
				before == true;
				ma = max(ma, cnt);
			} else {
				cnt = 0;
				before == false;
				ma = max(ma, cnt);
			}
		}
	}
	cout << ma << endl;
	return 0;
}


Measured memory_bytes: 3624
#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m,x;
  cin>>n>>m>>x;
  int s1=0,s2=0;
  for(int i=0;i<m;i++){
    int a;
    cin>>a;
    (a<x?s1:s2)++;
  }
  cout<<min(s1,s2)<<endl;
  return 0;
}


Measured memory_bytes: 256
#include<cstdio>
#include<algorithm>

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

using namespace std;

typedef long long ll;

//        0
//      1  2
//     3  4  5
//   6  7  8  9
// 10 11 12 13 14

// nei[i] := ( テ」ツδ榲」ツつケ i テ」ツ?ィテゥツ堋」テヲツ篠・テ」ツ?凖」ツつ凝」ツδ榲」ツつケ )
const int nei[15][4]={
	{ 1, 2,-1,-1},
	{ 0, 3, 4,-1},
	{ 0, 4, 5,-1},
	{ 1, 6, 7,-1},
	{ 1, 2, 7, 8},
	{ 2, 8, 9,-1},
	{ 3,10,11,-1},
	{ 3, 4,11,12},
	{ 4, 5,12,13},
	{ 5,13,14,-1},
	{ 6,-1,-1,-1},
	{ 6, 7,-1,-1},
	{ 7, 8,-1,-1},
	{ 8, 9,-1,-1},
	{ 9,-1,-1,-1}
};

int dist[15][15]; // dist[i][j] := ( テ」ツδ榲」ツつケ i テ」ツ?ォテ」ツ?づ」ツつ凝ヲツ閉ーテ・ツュツ療」ツつ津」ツδ榲」ツつケ j テ」ツ?ォテァツァツサテ・ツ仰陛」ツ?凖」ツつ凝」ツ?淌」ツつ?」ツ?ョテヲツ慊?ァツ淞ュテヲツ可凝ヲツ閉ー )

int n,a[15];

int hstar(int now){
	int sum=0;
	rep(i,n) if(a[i]!=0) sum+=dist[a[i]][i];
	return now+sum;
}

int ub;
bool dfs(int now,int p,int pre,int end){
	if(end==n) return true;

	if(hstar(now)>ub) return false;

	// rep(k,4){
	for(int k=3;k>=0;k--){ // テゥツ??ゥツ??」ツ?ォティツェツソテ」ツ?ケテ」ツ?淌ヲツ鳴ケテ」ツ??10 テァツァツ津」ツ?湘」ツつ嘉」ツ??ゥツ?淌」ツ??( テ」ツδ?」ツつケテ」ツδ暗」ツつアテ」ツδシテ」ツつケテ」ツ?ョテァツ可ケテヲツ?ァ?? )
		int q=nei[p][k];
		if(q==-1 || q>=n || q==pre) continue; // テァツ崢エテ・ツ可催」ツ?ョテァツ環カテヲツ?凝」ツ?ォテ」ツ?ッテゥツ?キテァツァツサテ」ツ?療」ツ?ェテ」ツ??
		swap(a[p],a[q]);
		int end2=end-(a[q]==p?1:0)-(a[p]==q?1:0)+(a[p]==p?1:0)+(a[q]==q?1:0);
		if(dfs(now+1,q,p,end2)) return true;
		swap(a[p],a[q]);
	}
	return false;
}

int main(){
	rep(i0,15){
		rep(i,15) dist[i0][i]=77;
		dist[i0][i0]=0;
		int Q[32],head=0,tail=0; Q[tail++]=i0;
		while(head<tail){
			int i=Q[head++];
			rep(k,4){
				int j=nei[i][k];
				if(j!=-1 && dist[i0][j]==77) dist[i0][j]=dist[i0][i]+1, Q[tail++]=j;
			}
		}
	}

	for(int cas=1;scanf("%d",&n),n;cas++){
		n=n*(n+1)/2;
		rep(i,n) scanf("%d",a+i), a[i]--;

		int end=0; // テヲツ渉ε」ツ?」テ」ツ?ヲテ」ツ??」ツつ凝ヲツ閉ーテ・ツュツ療」ツ?ョテ・ツ?凝ヲツ閉ー
		rep(i,n) if(a[i]==i) end++;

		int p=find(a,a+15,0)-a;
		int h=(1<=p&&p<=2||6<=p&&p<=9?1:0); // 1 テ」ツ?ョテ」ツ?づ」ツつ凝ィツ。ツ?mod 2
		for(ub=h;ub<45;ub+=2) if(dfs(0,p,-1,end)) break;
		printf("Case %d: %d\n",cas,ub);
	}

	return 0;
}

Measured memory_bytes: 1028
a = []
b = []
for i in range(10):
    n = int(input())
    a.append(n)
for j in range(10):
    n = int(input())
    b.append(n)
a.sort()
b.sort()
x = int(a[7]+a[8]+a[9])
y = int(b[7]+b[8]+b[9])
print(x,y)


Measured memory_bytes: 5600
#include <iostream>
#include <algorithm>
#include <string>
#include <queue>
#include <cmath>


using namespace std;
using ll = long long;

const ll mod = 1000000007;

ll N, a[100000];

//山iに振った雨
ll ans[100000];
ll sumrain;
ll temps;

int main()
{
	cin >> N;
	for (int i = 0; i < N; i++)
	{
		cin >> a[i];
		sumrain += a[i];
	}
	for (int i = 0; i < N - 1; i += 2)
	{
		temps += a[i];
	}
	temps *= 2;
	ans[N - 1] = sumrain - temps;
	for (int i = 0; i < N - 1; i++)
	{
		int x = (i + N - 1) % N;
		ans[i] = a[x] * 2 - ans[x];
	}
	cout << ans[0];
	for (int i = 1; i < N; i++)
	{
		cout << ' ' << ans[i];
	}
	cout << endl;

	return 0;
}


Measured memory_bytes: 2816
#include <cstdio>
#include <iostream>
#include <vector>
#include <set>
#include <cstring>
#include <string>
#include <map>
#include <cmath>
#include <ctime>
#include <algorithm>
#include <bitset>
#include <queue>
#include <sstream>
using namespace std;
#define mp make_pair
#define pb push_back
#define re return
#define fi first
#define se second
typedef vector<int> vi;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<string> vs;
typedef vector<vi> vvi;
int main() {
    //freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	double a,b;
	cin>>a>>b;
	cout<<a/b/1.0<<endl; 
	
    return 0;
}

Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace AtCoder
{
    class Program
    {
        static void Main()
        {
            Solve();

            Console.ReadKey();
        }

        static void Solve()
        {
            var N = IO.GetInt();
            var P = IO.GetIntList();
            int min = int.MaxValue;
            int ans = 0;

            for(int i = 0; i < N; i++)
            {
                if (P[i] < min)
                {
                    ans++;
                    min = P[i];
                }
            }

            Console.WriteLine(ans);
        }
    }

    static class IO
    {
        static public string GetString() { return Console.ReadLine(); }
        static public int GetInt() { return int.Parse(Console.ReadLine()); }
        static public long GetLong() { return long.Parse(Console.ReadLine()); }
        static public List<string> GetStringList() { return Console.ReadLine().Split(' ').ToList(); }
        static public List<int> GetIntList() { return Console.ReadLine().Split(' ').Select(int.Parse).ToList(); }
        static public List<long> GetLongList() { return Console.ReadLine().Split(' ').Select(long.Parse).ToList(); }
        static public List<double> GetDoubleList() { return Console.ReadLine().Split(' ').Select(double.Parse).ToList(); }
        static public void WriteStrings(object[] strings) { foreach (var o in strings) { Console.Write(o + " "); } }
    }
}

Measured memory_bytes: 33500
// ※※※ 解答不能 ※※※
// 正答者のソースを勉強する.
// kmjp氏
// https://atcoder.jp/contests/abc140/submissions/7391523
#include <bits/stdc++.h>
using namespace std;
using LL = long long;

LL S[1<<18];

int main(){
    int N;
    scanf("%d", &N);
    for(int i = 0; i < (1<<N); i++) scanf("%lld", &S[i]);
    sort(S, S + (1<<N));
    int M = (1<<N) - 1;
    multiset<int> T;
    for(int i = 0; i < M; i++) T.insert(S[i]);
    
    vector<int> V;
    V.push_back(S[M]);
    for(int i = 0; i < N; i++){
        vector<int> W = V;
        for(auto& v : V){
            auto it = T.lower_bound(v);
            if(it == T.begin()){
                printf("%s\n", "No");
                return 0;
            }
            it--;
            W.push_back(*it);
            T.erase(it);
        }
        sort(W.begin(), W.end());
        reverse(W.begin(), W.end());
        swap(V, W);
    }
    printf("%s\n", "Yes");
    return 0;
}

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

// macros
#define pb emplace_back
#define mk make_pair
#define FOR(i, a, b) for(int i=(a);i<(b);++i)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) for(int i=((int)(n)-1);i>=0;i--)
#define irep(itr, st) for(auto itr = (st).begin(); itr != (st).end(); ++itr)
#define irrep(itr, st) for(auto itr = (st).rbegin(); itr != (st).rend(); ++itr)
#define whole(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
#define bit(n) (1LL<<(n))
// functions
template <class T>bool chmax(T &a, const T &b){if(a < b){a = b; return 1;} return 0;}
template <class T>bool chmin(T &a, const T &b){if(a > b){a = b; return 1;} return 0;}
template <typename T> istream &operator>>(istream &is, vector<T> &vec){for(auto &v: vec)is >> v; return is;}
template <typename T> ostream &operator<<(ostream &os, const vector<T>& vec){for(int i = 0; i < vec.size(); i++){ os << vec[i]; if(i + 1 != vec.size())os << " ";} return os;}
template <typename T> ostream &operator<<(ostream &os, const set<T>& st){for(auto itr = st.begin(); itr != st.end(); ++itr){ os << *itr; auto titr = itr; if(++titr != st.end())os << " ";} return os;}
template <typename T> ostream &operator<<(ostream &os, const unordered_set<T>& st){for(auto itr = st.begin(); itr != st.end(); ++itr){ os << *itr; auto titr = itr; if(++titr != st.end())os << " ";} return os;}
template <typename T> ostream &operator<<(ostream &os, const multiset<T>& st){for(auto itr = st.begin(); itr != st.end(); ++itr){ os << *itr; auto titr = itr; if(++titr != st.end())os << " ";} return os;}
template <typename T> ostream &operator<<(ostream &os, const unordered_multiset<T>& st){for(auto itr = st.begin(); itr != st.end(); ++itr){ os << *itr; auto titr = itr; if(++titr != st.end())os << " ";} return os;}
template <typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &p){os << "(" << p.first << ", " << p.second << ")"; return os;}
template <typename T1, typename T2> ostream &operator<<(ostream &os, const map<T1, T2> &mp){for(auto itr = mp.begin(); itr != mp.end(); ++itr){ os << "(" << itr->first << ", " << itr->second << ")"; auto titr = itr; if(++titr != mp.end())os << " "; } return os;}
template <typename T1, typename T2> ostream &operator<<(ostream &os, const unordered_map<T1, T2> &mp){for(auto itr = mp.begin(); itr != mp.end(); ++itr){ os << "(" << itr->first << ", " << itr->second << ")"; auto titr = itr; if(++titr != mp.end())os << " "; } return os;}
//  types
using ll = long long int;
using P = pair<int, int>;
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double EPS = 1e-10;
const int mod = 1000000007;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};
// io
struct fast_io{
  fast_io(){ios_base::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(20);}
} fast_io_;


int main(int argc, char const* argv[])
{
  ll n, r; cin >> n >> r;
  if(n >= 10)cout << r << endl;
  else cout << r + 100 * (10 - n) << endl;
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef long double ld;
const int inf=1e9+7;
const ll longinf=1LL<<60;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define F first
#define S second
 
#define bit(n,k) ((n>>k)&1) //*n no k bit me 1 or 0*/

const int mx=200010;
const ll mod=1e9+7;

//オンライン

template<typename T,const T id>
struct ConvexHullTrick{
    struct Line{
        T a,b;
        Line(T a=0,T b=0):a(a),b(b){}
        T get(T x){return -(x-a)*(x-a)-b;}
    };

    struct Node{
        Line l;
        Node *lhs,*rhs;
        Node(Line l):l(l),lhs(nullptr),rhs(nullptr){}
    };

    const T mi,ma;
    Node* root=nullptr;

    ConvexHullTrick(T mi=0,T ma=1<<30):mi(mi),ma(ma){}
    Node* insert(Node* p,T lb,T ub,Line& l){
        if(!p)return new Node(l);
        if(p->l.get(lb)>=l.get(lb)&&p->l.get(ub)>=l.get(ub))return p;
        if(p->l.get(lb)<=l.get(lb)&&p->l.get(ub)<=l.get(ub)){
            p->l = l;
            return p;
        }
        T mid=(lb+ub)/2;
        if(p->l.get(mid)<l.get(mid))swap(p->l , l);
        if(p->l.get(lb)<=l.get(lb)){
            p->lhs=insert(p->lhs,lb,mid,l);
        }
        else {
            p->rhs=insert(p->rhs,mid,ub,l);
        }
        return p;

    }
    void insert(T a,T b){
        Line l(a,b);
        root=insert(root,mi,ma,l);
    }

    void insert(Line l){
        root=insert(root,mi,ma,l);
    }
    T query(Node* p,T lb,T ub,T t){
        if(!p)return id;
        if(lb==ub)return p->l.get(t);
        T mid=(lb+ub)/2;
        if(t<=mid)return max(p->l.get(t),query(p->lhs,lb,mid,t));
        else return max(p->l.get(t),query(p->rhs,mid,ub,t));
    }

    T query(T x){
        return query(root,mi,ma,x);
    }
};


int main(){
    int n;cin>>n;
    ll c;cin>>c;
    ConvexHullTrick<ll,-longinf> cht; 
    ll ret=0; 
    rep(i,n){
        ll h;cin>>h;
        if(i)ret=-cht.query(h);
        cht.insert(h,c+ret);
    }  
    cout<<ret<<endl;
    return 0;
}


Measured memory_bytes: 9600
#include<bits/stdc++.h>
using namespace std;
 
void change(string s) 
{ 
  
    // Finding the length of the string  
    int n = s.length();  
  
    // To store the number of replacement operations  
    int cc = 0; 
  
    for(int i=0;i<n/2;i++) 
    { 
  
        // If the characters at location  
        // i and n-i-1 are same then  
        // no change is required  
        if(s[i]== s[n-i-1])  
            continue; 
  
        // Counting one change operation  
        cc+= 1;
    } 
    cout<<cc<<endl;   
}
 
int main()
{
  	string s;
  cin>>s;
  change(s);
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;	
int main(){
	int n; cin>>n;
	vector<int> a(n);
	for(int i =0; i<n; i++){
		cin>>a[i];
	}
	int ans = 0;
	int t = 0;
	for(int i =0; i < n; i++){
		if(a[i] >= t){
			ans++;
			t = a[i];
		}
	}
	cout<<ans;
	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>

using Grid = std::vector<std::vector<char>>;
Grid grid;

int32_t dp[1100][1100];
auto MOD = 1000000007;

int add(int &a, int b) {
  a += b;
  if (a >= MOD) a -= MOD;
}

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

  uint32_t H, W;

  std::cin >> H >> W;
  grid.resize(H);

  for (uint32_t i = 0; i < H; i++) {  
    grid[i].resize(W);  
    for (uint32_t j = 0; j < W; j++) {
      char x;
      std::cin >> x;
      grid[i][j] = x;
    }
  }

  dp[0][0] = 1;

  for (uint32_t i = 0; i < H; i++) {
    for (uint32_t j = 0; j < W; j++) {
      if (i + 1 < H && grid[i + 1][j] == '.') add(dp[i + 1][j], dp[i][j]);
      if (j + 1 < W && grid[i][j + 1] == '.') add(dp[i][j + 1], dp[i][j]);
    }
  }

  std::cout << dp[H - 1][W - 1] << std::endl;

  return 0;
}


Measured memory_bytes: 5632
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <iomanip>
using namespace std;

typedef long long ll;

#define sz size()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(c) (c).begin(), (c).end()
#define rep(i,a,b) for(ll i=(a);i<(b);++i)
#define per(i,a,b) for(ll i=(b-1);i>=(a);--i)
#define clr(a, b) memset((a), (b) ,sizeof(a))
#define ctos(c) string(1,c)
#define print(x) cout<<#x<<" = "<<x<<endl;

#define MOD 1000000007

int main() {
	ll n,a,b;
	cin>>n>>a>>b;
	if((b-a)%2==0){
		cout << "Alice" << endl;
	}
	else{
		cout << "Borys" << endl;
	}
	return 0;
}

Measured memory_bytes: 764
// {{{
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <cmath>
#include <cstdio>

using namespace std;

typedef long int i32;
typedef unsigned long int u32;
typedef long long int i64;
typedef unsigned long long int  u64;
typedef pair<i32, i32> PII;
#define IN(x) cin >> x;
#define MEM(a, b) memset(a, (b), sizeof(a))
#define ZERO(a) memset(a, 0, sizeof(a))
#define FOR(i, j, k, in) for (int i=j ; i<k ; i+=in)
#define RFOR(i, j, k, in) for (int i=j ; i>=k ; i-=in)
#define REP(i, j) FOR(i, 0, j, 1)
#define RREP(i, j) RFOR(i, j-1, 0, 1)
#define all(cont) cont.begin(), cont.end()
#define rall(cont) cont.rbegin(), cont.rend()
#define MP make_pair
#define PB push_back
#define PF push_front
#define INF (int)1e9
#define EPS 1e-9
#define PI 3.1415926535897932384626433832795
#define DEBUG(x) cout << #x << ": " << x << endl;

template<typename T, typename U> inline void amin(T &x, U y) { if(y < x) x = y; }
template<typename T, typename U> inline void amax(T &x, U y) { if(x < y) x = y; }
// }}}

const u64 MAX_N = 5000;
const u64 MAX_K = 5000;
array<u64, MAX_K+1> dp;
vector<u64> a;
u64 N, K;
bool countSubSet(int m) {
    dp.fill(false);
    dp[0] = true;
    REP(i, N)RREP(j, K) {
        if(i == m) {
            continue;
        }
        if(a[i] + j >= K) {
            dp[K] = dp[K] || dp[j];
        } else {
            dp[a[i]+j] = dp[a[i]+j] || dp[j];
        }
    }
    RREP(i, K) {
        if(dp[i] && a[m] + i >= K) {
            return true;
        }
    }
    return false;
}
int main() {
    IN(N);
    IN(K);
    REP(i, N) {
        u64 tmp;
        IN(tmp);
        a.PB(tmp);
    }
    sort(rall(a));
    i64 l, m, r;
    l = -1;
    r = N;
    m = (l + r) / 2;
    while(r - l > 1) {
        if(countSubSet(m)) {
            l = m;
        } else {
            r = m;
        }
        m = (l + r + 1) / 2;
    }
    cout << N - m << endl;

    return 0;
}


Measured memory_bytes: 384
import java.util.*;

public class Main {
    private static final Scanner scn = new Scanner(System.in);
    private static final String CRLF = System.getProperty("line.separator");
    private static final String[][] TABLE = {
        {},
        {".", ",", "!", "?", " "},
        {"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"}
    };
    
    public static void main(String[] args) {
        scn.nextLine();
        while(scn.hasNextLine()) {
            Scanner reader = new Scanner(scn.nextLine());
            reader.useDelimiter("0+");
            StringBuilder sb = new StringBuilder();
            while(reader.hasNext()) {
                String tmp = reader.next();
                int y = Integer.parseInt(tmp.substring(0, 1));
                int x = (tmp.length() - 1) % TABLE[y].length;
                sb.append(TABLE[y][x]);
            }
            System.out.println(sb);
        }
    }
}

Measured memory_bytes: 38352
#include<stdio.h>
int main(void)
{
  int n,m;
  scanf("%d",&n);
  scanf("%d",&m);
  int a[n][m];

  int h,w,i,j,count;
  scanf("%d",&h);
  scanf("%d",&w);

  for(i=0; i<n-h; i++){
    for(j=0; j<m-w; j++){
      count ++;
    }
  }

  printf("%d",count);



  return 0;
}


Measured memory_bytes: 128
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()) {
			String[] s = sc.nextLine().split("[,. ]");
			List<String> list = new ArrayList<String>();
			for(String k : s) {
				if(k.length() >= 3 && k.length() <= 6) {
					list.add(k);
				}
			}
			for(int i = 0; i < list.size(); i++) {
				if(i == list.size() - 1) {
					System.out.println(list.get(i));
				}else {
					System.out.print(list.get(i) + " ");
				}
			}
		}
		sc.close();
	}
}


Measured memory_bytes: 26120
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=2e5+9;
int main()
{
	char s[maxn];
	scanf("%s",s+1);
	int len=strlen(s+1);
	ll d[maxn]={0},b[maxn]={0};
	ll ans=0;
	for(int i=1;i<=len;i++)
	{
		int num=s[i]-'0';
		d[num]++;
		for(int j=0;j<2019;j++)
		{
			d[(j*10+num)%2019]+=b[j];
		}
		for(int j=0;j<2019;j++)
		{
			b[j]=d[j];d[j]=0;
		}
		ans+=b[0];
	}
	printf("%lld\n",ans);
}


Measured memory_bytes: 7040
#include <iostream>
#include <string>
#include <vector>
#include <stdlib.h>
#include <cstdint>
#include <cmath>
#include <algorithm>
#include <float.h>
using namespace std;

int main()
{
	int a, b, c;
	
	cin >> a >> b >> c;

	if( a + b >= c ) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}

	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <numeric>
#include <tuple>
#include <stack>

#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) x.begin(),x.end()
typedef long long ll;
using namespace std;

int main() {
    int n; cin >> n;
    vector<int> x(n), y(n), h(n);

    rep(i, n) cin >> x[i] >> y[i] >> h[i];
    int MAX = 100;
    rep(i, MAX+1){ //x
        rep(k, MAX+1){ //y
            ll H = -1;
            rep(p, n){
                if (h[p] > 0){
                    ll tmp = h[p] + abs(x[p] - i) + abs(y[p] - k);
                    if (H == -1) H = tmp;
                    else if (H != tmp){
                        H = -2; 
                        break;
                    } 
                
                    if (H == -2) continue;
                
                }
            }
            rep(p, n){   
                if (h[p] == 0){
                    int d = abs(x[p] - i) + abs(y[p] - k);
                    if (H > d){
                        H = -2; 
                        break;
                    }
                
                    if (H == -2) continue;
                }
            }
            if (H > 0){
                cout << i << " " << k << " " << H << endl;
                return 0;
            }
        }
    }
}

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

struct edge{
    int to,cost;
    edge(){
        to = 0; cost = 0;
    }
    edge(int t,int c){
        to = t;
        cost = c;
    }
};

int n;
vector<edge> G[100001];
long long int d[100001];

const long long int INF = 1000000000000;

void Dijkstra(int s){

    priority_queue<pair<int,int>,vector<pair<int,int> >,greater<pair<int,int> > > que;

    fill(d,d+n,INF);

    d[s] = 0;

    que.push(make_pair(0,s));

    while(!que.empty()){
        pair<int,int> p = que.top(); que.pop();

        int v = p.second;
        if(d[v] < p.first){
            continue;
        }
        for(int i=0; i<G[v].size(); i++){
            edge e = G[v][i];
            if(d[e.to] > d[v] + e.cost){
                d[e.to] = d[v] + e.cost;
                que.push(make_pair(d[e.to],e.to));
            }
        }

    }

}

int main() {

    cin >> n;

    int ed,r;

    cin >> ed >> r;

    int a, b, c;

    for (int i = 0; i < ed; i++) {
        scanf(" %d %d %d", &a, &b, &c);
        G[a].push_back(edge(b, c));
    }

    Dijkstra(r);

    for (int i = 0; i < n; i++) {

        if(d[i]!=INF){
            cout << d[i] << endl;
        }
        else{
            cout << "INF" << endl;
        }
    }

    return 0;
}

Measured memory_bytes: 13456
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <ctime>
#include <cstring>
#include <functional>
#include <iostream>
#include <iomanip>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <regex>
#include <vector>

#define fix(n)          cout<<fixed<<setprecision(n)
#define rep(i,n)        for (int i = 0; i < (n); ++i)
#define sort(a)         sort((a).begin(), (a).end())
#define uniq(a)         sort(a);(a).erase(unique((a).begin(), (a).end()), (a).end())
#define reverse(a)      reverse((a).begin(), (a).end())
#define ctos(c)         string(1, (c))
#define out(d)          cout << (d)
#define outl(d)         std::cout<<(d)<<"\n"
#define YES()           cout << "YES" << endl
#define NO()            cout << "NO" << endl
#define Yes()           cout << "Yes" << endl
#define No()            cout << "No" << endl
#define ceil(x, y)      ((x + y - 1) / (y))
#define debug(x)        cerr << #x << ": " << (x) << '\n'
#define debug2(x, y)    cerr << #x << ": " << (x) << ", " << #y << ": " << (y) << '\n'
#define debug3(x, y, z) cerr << #x << ": " << (x) << ", " << #y << ": " << (y) << ", " << #z << ": " << (z) << '\n'
#define dbg(v)          for (size_t _ = 0; _ < v.size(); ++_){ cerr << #v << "[" << _ << "] : " << v[_] << '\n'; }

using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll,ll>;

const ll MOD = 1000000007; // 10^9 + 7
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

void solve() {
  int n; cin >> n;
  map<int, int> map;
  rep(i, n) {
    int a; cin >> a;
    if (map.find(a) == map.end()) map.insert(make_pair(a, 1));
    else map[a]++;
  }
  ll sum = 0;
  for (auto it = map.begin(); it != map.end(); it++) {
    if (it->first <= it->second) sum += it->second - it->first;
    else sum += it->second;
  }
  outl(sum);
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  srand((unsigned)time(NULL));
  fix(12);

  solve();
}


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

long long N;
#define MAXN 100000
long long A[MAXN];

int main() {
  scanf("%lld", &N);
  long long sum = 0;
  for(int i = 0; i < N; ++i) {
    scanf("%lld", &A[i]);
    sum += A[i];
  }
  if(sum % (N * (N + 1) / 2) != 0) { printf("NO\n"); return 0;}
  long long k = sum / (N * (N + 1) / 2);
  long long sum_d = 0;
  for(int i = 0; i < N; ++i) {
    long long d = A[i] + k - A[(i + 1) % N];
    if(d < 0 || d % N != 0) { printf("NO\n"); return 0;}
    sum_d += d / N;
  }
  printf("%s\n", sum_d == k ? "YES" : "NO");
  return 0;
}


Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(x) x.begin(),x.end()
#define pll  pair <long long,long long>
#define ss second
#define ff first
#define inf 9223372036854775807
#define maa 1000000007
#define ld long double
#define fast  ios_base::sync_with_stdio(false);cin.tie(NULL);
#define bug(x) cout << #x <<": " << x << '\n';
const ll N=200001 ;
ll n ;
vector<ll>v[N] ;
map<pll,ll>ma ;
ll ans[N] ;
ll col ;
void dfs(ll i,ll p,ll c)
{
    ll cc=1 ;
    for(ll j:v[i])
    {
        if(j==p)
            continue ;
        if(cc==c)
            cc++ ;

        ans[ma[{i,j}]]=cc ;
        dfs(j,i,cc) ;
        col=max(col,cc) ;
        cc++ ;





    }
}
int main()
{
   fast ;
   ///Mission-500
   cin>>n ;
   vector<pll>p ;
   for(ll i=0;i<n-1;i++)
   {
       ll a,b ;
       cin>>a>>b ;
       p.pb({a,b}) ;
       v[a].pb(b) ;
       v[b].pb(a) ;
       ma.insert({{a,b},i}) ;
       ma.insert({{b,a},i}) ;

   }
   col=0 ;
   dfs(1,-1,0) ;

   cout<<col<<endl ;
   for(ll i=0;i<n-1;i++)
   {
     cout<<ans[i]<<endl ;
   }



}


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


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

   string s;
   map <int, int> m;
   ll final = 0;
   cin >> s;
   int n = s.length();
   vector <int> p(n + 1, 1), q(n, 1);
   for (int i = 1; i <= n; i++) {
      p[i] = (p[i - 1] * 10) % 2019;
   }
   m[0]++;
   q[0] = ((s[0] - '0') * p[n - 1]) % 2019; 
   for (int i = 1; i < n; i++) {
      q[i] = (q[i - 1] + (s[i] - '0') * p[n - i - 1]) % 2019;
   }
   for (auto i: q) {
      m[i]++;
   }
   for (auto i: m) {
      final += (i.ss * (i.ss - 1)) / 2;
   }
   cout << final << endl;

   return 0;
}

Measured memory_bytes: 5176
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const int maxn = 200000+10;

int n,k;
int a[maxn],sum[maxn],b[maxn];
map<int,int> cnt;

int main()
{
    scanf("%d%d",&n,&k);
    for (int i=1;i<=n;i++) scanf("%d",&a[i]);
    for (int i=1;i<=n;i++) sum[i]=(sum[i-1]+a[i])%k;
    for (int i=1;i<=n;i++) b[i]=((sum[i]-i)%k+k)%k;
    //for (int i=0;i<=n;i++) printf("%d ",b[i]); printf("\n");
    cnt[0]++;
    LL ans=0; int pre=0;
    for (int i=1;i<=n;i++)
    {
        while (i-pre>=k)
        {
            cnt[b[pre]]--;
            pre++;
        }
        ans+=cnt[b[i]];
        cnt[b[i]]++;
    }
    printf("%lld\n",ans);
    return 0;
}


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

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

#define fst first
#define snd second
#define pb push_back

const int maxn=300005,maxm=106;
const double pi=acos(-1.0);
const ll mod=1000000007;
const double eps=1e-6;

int n,m;

int a[maxn];
vector<int> E[maxn];

int main()
{
	int i,j,k,l;
	scanf("%d %d",&n,&m);
	for(i=0;i<n;i++) scanf("%d",a+i);
	for(j=0;j<m;j++)
    {
        int x,y;
        scanf("%d %d",&x,&y);
        --x;--y;
        E[x].pb(y);E[y].pb(x);
    }
    int ans=0;
    for(i=0;i<n;i++)
    {
        bool fl=1;
        for(j=0;fl&&j<E[i].size();j++)
        {
            if(a[i]<=a[E[i][j]]) fl=0;
        }
        ans+=fl;
    }
    printf("%d\n",ans);
    return 0;
}


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

int main(){
    int N = 10000;
    vector<int> vh(N);
    vector<int> vw(N);
    int tmp = 0;
    for (int i = 0; i < N; i++) {
        int h,w;
        cin >> h >> w;
        if (w == 0 && h == 0) {
            tmp = i;
            break;
        }
        vh.at(i) = h;
        vw.at(i) = w;
    }

    for (int i = 0; i <= tmp; i++) {
        if (i > 0) cout << endl;
        for (int j = 0; j < vh[i]; j++) {
            for (int z = 0; z < vw[i]; z++) {
                cout << '#';
            }
            cout << endl;
        }
    }
    return 0;
}



Measured memory_bytes: 3180
#ifdef MY_LOCAL
#define MY_NAMESPACE(ns) namespace ns {
#define MY_NAMESPACE_    }
#define MY_DEBUG(s)      s
#else
#define MY_NAMESPACE(ns) 
#define MY_NAMESPACE_    
#define MY_DEBUG(s)      
#endif

#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <tuple>
#include <unordered_map>
#include <utility>
#include <vector>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define EPS (1e-7)
#define IINF ((int)1e9)


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

	int h, w, k;
	cin >> h >> w >> k;

	int x1, y1, x2, y2;
	cin >> x1 >> y1 >> x2 >> y2;
	x1--;
	y1--;
	x2--;
	y2--;

	vector<vector<char>> pond(h, vector<char>(w));
	for (int i = 0; i < h; i++)
	{
		for (int j = 0; j < w; j++)
		{
			cin >> pond[i][j];
		}
	}

	vector<vector<vector<int>>> min_step(h, vector<vector<int>>(w, vector<int>(4, IINF)));
	int dx[] = { 1, 0, -1, 0 };
	int dy[] = { 0, 1, 0, -1 };
	typedef tuple<int, int, int, int> T4int;  // {step, x, y, direction(0-3)}
	priority_queue<T4int, vector<T4int>, greater<T4int>> q;
	for (int i = 0; i <= 3; i++)
	{
		min_step[x1][y1][i] = 0;
		q.emplace(0, x1, y1, i);
	}
	while (!q.empty())
	{
		int this_step, this_x, this_y, this_dir;
		tie(this_step, this_x, this_y, this_dir) = q.top();
		q.pop();

		// change the direction
		for (int i = 0; i <= 3; i++)
		{
			int next_step = ((this_step + k - 1) / k) * k;
			if (min_step[this_x][this_y][i] > next_step)
			{
				min_step[this_x][this_y][i] = next_step;
				q.emplace(next_step, this_x, this_y, i);
			}
		}

		// one step along with the direction
		int next_x = this_x + dx[this_dir];
		int next_y = this_y + dy[this_dir];
		int next_dir = this_dir;
		if (next_x < 0 || h <= next_x || next_y < 0 || w <= next_y)
			continue;
		if (min_step[next_x][next_y][next_dir] <= this_step)
			continue;
		if (pond[next_x][next_y] == '@')
			continue;
		min_step[next_x][next_y][next_dir] = this_step + 1;
		q.emplace(this_step + 1, next_x, next_y, next_dir);
	}

	int res = IINF;
	for (int i = 0; i <= 3; i++)
	{
		if (min_step[x2][y2][i] == IINF)
			continue;
		int actual_step = (min_step[x2][y2][i] + k - 1) / k;
		res = min(res, actual_step);
	}
	if (res == IINF)
		res = -1;
	cout << res << "\n";
	return 0;
}
MY_NAMESPACE_

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

int main(){
    ll n;
    cin>>n;
    ll a[n];
    for(int i=0;i<n;++i)cin>>a[i];
    ll ans = 0; 
    ll mul = 1;             //mul = multiplier --> (power of 2)
    for(int j=1;j<=64;++j){
        ll count_e = 0,count_o = 0;         //count of even and odd numbers among n elements
        for(int i=0;i<n;++i){
            if(a[i]&1)count_o++;
            else count_e++;
            a[i] = (a[i]>>1);           //right shift so that the elements will be ready to be judged in the next iteration if it's even or odd
        }
        ll pairs = (count_o*count_e)%mod;   // total no.of pairs whose product of those two respective nums has it's last digit as set (1) 
        ans = (ans + pairs*mul)%mod;
        mul = (mul*2)%mod;
    }
    cout<<ans;
}

Measured memory_bytes: 5952
#include <cstdio>
#include<iostream>
#include<map>
#include<algorithm>
#include<vector>
#include <cmath>
#include <iomanip>
#include <regex>
#include <queue>
#include <set>
#include <cassert>
using namespace std;
using ll = long long;
using plong = pair<ll,ll>;
const long MOD = 1000000007;

int main(){
    ll K;
    string S;
    cin>>K>>S;
    if(S.size()<=K){
        cout<<S<<endl;
    }else{
        for(ll i=0;i<K;i++){
            cout<<S[i];
        }
        cout<<"..."<<endl;
    }
}


Measured memory_bytes: 3628
using System;
class test{
public static void Main(){
  int P = int.Parse(Console.ReadLine());
  var str = Console.ReadLine().Split(' ');
  int min = int.MaxValue;
  int now = 0;
  for(int i=1;i<=100;i++){
    for(int j=0;j<str.Length;j++){
      int sub = int.Parse(str[j])-i;
      now += (sub*sub);
    }
    if(min>now){
      min=now;
    }
    now=0;
  }
  Console.Write(min);
}
}

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

int main(){
    int N,n;
    int s[13] = {},h[13] = {},c[13] = {},d[13] = {};
    char mark;
    
    cin >> N;
    for(int i = 1;i<=N;i++){
        cin >> mark >> n;
        switch(mark){
            case 'S':
                    s[n-1] = 1;
                    break;
            case 'H':
                    h[n-1] = 1;
                    break;
            case 'C':
                    c[n-1] = 1;
                    break;
            case 'D':
                    d[n-1] = 1;
                    break;
        }
    }
    for(int i = 1;i<=13;i++){
        if(s[i-1] == 0) cout << "S" << " " << i <<endl;
    }
    for(int i = 1;i<=13;i++){
        if(h[i-1] == 0) cout << "H" << " " << i <<endl;
    }
    for(int i = 1;i<=13;i++){
        if(c[i-1] == 0) cout << "C" << " " << i <<endl;
    }
    for(int i = 1;i<=13;i++){
        if(d[i-1] == 0) cout << "D" << " " << i <<endl;
    }

}

Measured memory_bytes: 1160
#include <iostream>
#include <string>
int main(void)
{
  std::string k;
  int f=0;
 std :: cin>> k;
 for (auto &m:k)
 {if(m=='7')
   {
     std::cout<< "Yes";
     f++;
    break;}
 }
 if(f!=1)
     std::cout <<"No";
}

Measured memory_bytes: 3624
#ifdef MY_LOCAL
#define MY_NAMESPACE(ns) namespace ns {
#define MY_NAMESPACE_    }
#define MY_DEBUG(s)      s
#else
#define MY_NAMESPACE(ns) 
#define MY_NAMESPACE_    
#define MY_DEBUG(s)      
#endif

#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <string>
#include <tuple>
#include <unordered_map>
#include <utility>
#include <vector>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define EPS (1e-7)

MY_NAMESPACE(ABC169F)
int main()
{
	const int modval = 998244353;

	int n, s;
	cin >> n >> s;
	vector<int> a(n);
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
	}

	vector<vector<ll>> dp(n + 1, vector<ll>(s + 1));
	dp[0][0] = 1;
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j <= s; j++)
		{
			dp[i + 1][j] = dp[i][j] * 2 % modval;
			if (j - a[i] >= 0)
			{
				dp[i + 1][j] += dp[i][j - a[i]];
				dp[i + 1][j] %= modval;
			}
		}
	}
	cout << dp[n][s] << "\n";
	return 0;
}
MY_NAMESPACE_

Measured memory_bytes: 73600
S = input()
T = input()

ans = len(T)
for i in range(len(S) - len(T) + 1):
    v = 0
    for j in range(len(T)):
        # print(i, j)
        if S[i+j] != T[j]:
            v += 1
    # print(i, v)
    ans = min(ans, v)
print(ans)


Measured memory_bytes: 9096
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
using namespace std;

int main(){
    long long dp[11][1010];
    memset(dp, 0, sizeof(dp));
    dp[0][0] = 1;
    for(int i = 0 ; i <= 100 ; i++){
        for(int j = 9 ; j >= 0 ; j--){
            for(int k = 0 ; k <= 1000 - i ; k++){
                dp[j+1][k+i] += dp[j][k];
            }
        }
    }

    int n, s;
    while(cin >> n >> s, n|s){
        cout << dp[n][s] << endl;
    }
    return 0;
}

Measured memory_bytes: 1248
#include<bits/stdc++.h>
using namespace std;
#define ALL(obj) (obj).begin(), (obj).end()
#define REP(i, n) for(int i = 0;i < (n);++i)
#define RREP(i, n) for(int i = (n)-1; i >= 0; --i)

#define endl '\n'
#define pb push_back
#define eb emplace_back
#define prique priority_queue
#define BIG 2000000000
#define VERYBIG 1000000000000000ll
#define PI 3.1415926
#define coutdb cout<<fixed<<setprecision(15)

const int dx[]={1,0,-1,0,1,1,-1,-1}, dy[]={0,-1,0,1,1,-1,1,-1};
const long long MOD = 1e9+7;

// typedef int_fast64_t ll;
#define int int_fast64_t

template<typename T> inline T GCD(T a,T b){T c;while(b!=0){c=a%b;a=b;b=c;}return a;}
template<typename T> inline T LCM(T a,T b){T c=GCD(a,b);a/=c;return a*b;}
template<typename T> inline T nCr(T a,T b){T i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;}
template<typename T> inline T nHr(T a,T b){return nCr(a+b-1,b);}

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

  int N; cin >> N;
  cout << N*(N-1)/2 << endl;
}

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

const int INF = 1000000;
int t[50][50];

int main() {
    int H, W, in, a, b;
    cin >> H >> W;
    for (int i = 0; i < H; ++i) {
        for (int j = 0; j < W; ++j) {
            scanf("%1d", &in);
            if (i == 0 && j == 0) continue;
            t[i][j] = in + min( i>0 ? t[i-1][j] : INF , j>0 ? t[i][j-1] : INF );
        }
    }
    cout << t[H-1][W-1] << endl;
    return 0;
}

Measured memory_bytes: 1256
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>

using namespace std;

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

typedef vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;

#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EACH(t,i,c) for(t::iretator i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)

const double EPS = 1e-10;

int main() {
	string str;

	while(cin >> str) {
		int jc = 0, ic = 0;

		REP(i, str.size()-2) {
			if(str[i+1] == 'O' && str[i+2] == 'I') {
				if(str[i] == 'J') {
					jc++;
				} else if(str[i] == 'I') {
					ic++;
				}
			}
		}

		cout << jc << endl;
		cout << ic << endl;
	}

	return 0;
}

Measured memory_bytes: 1196
#include <algorithm>
#include <climits>
#include <cmath>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define INF_INT (INT_MAX / 2)
#define INF_LONG (LONG_MAX / 2)
//#define DEBUG true
#define DEBUG false
using namespace std;

const int MAX = 100001;
const int MOD = 1000000007;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;

int ceil(int x, int y) { return (x % y == 0) ? x / y : x / y + 1; }

int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }

int lcm(int x, int y) { return x / gcd(x, y) * y; }

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

  string s;
  cin >> s;

  int n = s.length();
  int ans[n];
  fill(ans, ans + n, 0);

  vector<int> b;
  int count = 0;
  for (int i = 0; i < n; i++) {
    ++count;
    if (i + 1 < n && s[i] != s[i + 1]) {
      b.push_back(count);
      count = 0;
    }
  }
  b.push_back(count);

  int k = 0;
  for (int i = 0; i + 1 < n; i++) {
    if (s[i] == 'R' && s[i + 1] == 'L') {
      ans[i] += (b[k] - (b[k] / 2));
      ans[i + 1] += (b[k] / 2);
      ans[i + 1] += (b[k + 1] - (b[k + 1] / 2));
      ans[i] += (b[k + 1] / 2);
      k += 2;
    }
  }

  string buf;
  for (int i = 0; i < n; i++) {
    buf += to_string(ans[i]) + " ";
  }
  cout << buf << endl;

  return 0;
}


Measured memory_bytes: 1976
#include<bits/stdc++.h>
#define ll long long int
#define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n)
using namespace std;

int main(){
 int a, b;
 cin >> a >> b;
 cout << a*b << " " << 2*(a+b) << "\n";
 return 0;
}

Measured memory_bytes: 3084
#define _USE_MATH_DEFINES
  
#include <list>
#include <map>
#include <set>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <memory.h>
#include <ctime>
#include <bitset>
#include <vector>
#include <string>
#include <queue>
  
using namespace std;

int tot[100050];

void solution() {
    int n;
    cin >> n;
    long long sum = 0;
    for (int i = 0; i < n; i++) {
        int x;
        scanf("%d", &x);
        tot[x]++;
        sum += x;
    }
    int q;
    cin >> q;
    for (int i = 0; i < q; i++) {
        int b, c;
        scanf("%d%d", &b, &c);
        long long x = tot[b];
        sum -= x * (b - c);
        tot[b] = 0;
        tot[c] += x;
        printf("%lld\n", sum);
    }
}
  
/*-------------------*/
      
int main()
{
#ifdef Files
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    /*Test*/
    //freopen("input.txt", "w", stdout);
      
    double OcZ2X = clock();
#else
    //freopen("joke.in", "r", stdin);
    //freopen("joke.out", "w", stdout);
#endif
      
/*
　　     　 　          ∧_,,∧　　　
    　            ♪　  (・ω・)　♪
               ＿＿＿＿○＿＿つヾ＿＿＿＿＿
             /δ⊆・⊇ 。/†: :† /δ ⊆・⊇｡ /|
            |￣￣￣￣￣￣￣￣￣￣￣￣￣ | |
            |　　　*/solution();/* 　　| |
            |　　　　　　　　　　　　　 |
*/
       
#ifdef Time
double P2HxQ = clock();
printf("\n*** Total time = %.3f sec ***\n", (P2HxQ - OcZ2X) / CLOCKS_PER_SEC);
#endif
}

Measured memory_bytes: 4200
/*
  author: ruruvuvu
  GitHub account: colon-ku

  created at: 2019-12-13 14:15:48
*/

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

#define all(x) (x).begin(),(x).end()
#define rep(x, y) for (int x = 0; x < y; x++)
#define MOD 1000000007

typedef long long LL;
typedef long double LD;

bool compare_by_b(pair<int, int> a, pair<int, int> b)
{
    if (a.second != b.second) {
        return a.second < b.second;
    } else {
        return a.first < b.first;
    }
}

ostringstream oss_global;
string s_global = oss_global.str();

int main()
{
    int a, b;
    cin >> a >> b;

    int ans;
    if (2*b > a) ans = 0;
    else ans = a - 2*b;

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


Measured memory_bytes: 384
#include <algorithm>
#include <iostream>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <iomanip>
#include <numeric>
#include <tuple>
#include <bitset>
#include <complex>
#define _USE_MATH_DEFINES
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> plglg;
typedef tuple<int, int, int> tiii;
typedef tuple<ll, ll, ll> tlglglg;
typedef complex<double> xy_t;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
double pi = 3.141592653589793;
ll mod = 1000000007;
int intmax = 2147483647;
int intmin = -2147483648;
ll llmax = 9223372036854775807;
ll llmin = -9223372036854775807;
ll inf = llmax / 2;
double eps = 1e-11;

double cross_product (xy_t a, xy_t b) {
    return (conj(a) * b).imag();
}

vector<xy_t> hull;
pii g[1000000];
xy_t cg[1000000];

int convexHull(int n) {
    sort(g, g + n);
    for (int i = 0; i < n; i++) {
        cg[i] = xy_t(g[i].first, g[i].second);
    }
    vector<xy_t> down;
    down.push_back(cg[0]);
    for (int i = 1; i < n; i++) {
        while (true) {
            if (down.size() == 1) {
                down.push_back(cg[i]);
                break;
            } else {
                xy_t a = down[down.size() - 2];
                xy_t b = down[down.size() - 1];
                double diff = cross_product(b - a, cg[i] - a);
                if (diff > -1 * eps) {
                    down.push_back(cg[i]);
                    break;
                } else {
                    down.pop_back();
                }
            }
        }
    }
    vector<xy_t> up;
    up.push_back(down[down.size() - 1]);
    for (int i = n - 2; i >= 0; i--) {
        while (true) {
            if (up.size() == 1) {
                up.push_back(cg[i]);
                break;
            } else {
                xy_t a = up[up.size() - 2];
                xy_t b = up[up.size() - 1];
                double diff = cross_product(b - a, cg[i] - a);
                if (diff > -1 * eps) {
                    up.push_back(cg[i]);
                    break;
                } else {
                    up.pop_back();
                }
            }
        }
    }
    int downlen = down.size();
    for (int i = 0; i < downlen; i++) {
        hull.push_back(down[i]);
    }
    int uplen = up.size();
    for (int i = 1; i < uplen - 1; i++) {
        hull.push_back(up[i]);
    }
    int num = downlen + uplen - 2;
    return num;
}

int main() {
    int n;
    cin >> n;
    int x, y;
    for (int i = 0; i < n; i++) {
        cin >> x >> y;
        g[i] = pii(x, y);
    }
    int num = convexHull(n);
    int bottom = 0;
    int bottomy = hull[0].imag();
    int len = hull.size();
    for (int i = 1; i < len; i++) {
        if (hull[i].imag() >= bottomy) {
            break;
        } else {
            bottomy = hull[i].imag();
            bottom++;
        }
    }
    cout << num << endl;
    for (int i = bottom; i < len; i++) {
        cout << hull[i].real() << " " << hull[i].imag() << endl;
    }
    for (int i = 0; i < bottom; i++) {
        cout << hull[i].real() << " " << hull[i].imag() << endl;
    }
}



Measured memory_bytes: 8072
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
  int n;cin>>n;
  vector<int> v(n);
  for(int i=0;i<n;i++){
    cin>>v[i];
  }
  sort(v.begin(),v.end(), greater<int>());
  int cnt=0,num=v[0];
  for(int i=1;i<=n;i++){
    if(num>v[i]){
      cnt++;
      num=v[i];
    }
  }
  cout<<cnt<<endl;
}

Measured memory_bytes: 256