akhauriyash/Code-Regression huggingface dataset:
#include "bits/stdc++.h"
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL<<60;
const long long int Mod = 1000000007;
using ll = long long int; using ci = const int;
using vi = vector<int>;  using Vi = vector<long long int>;
using P = pair<int, int>;  using PLL = pair<ll, ll>;
using matrix = vector<vector<ll>>;
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define rep(i,N) for(ll i = 0; i < (ll)N; i++)
#define repi(i,a,b) for(ll i = ll(a); i < ll(b); ++i)
template<class T>bool chmax(T &former, const T &b) { if (former<b) { former=b; return true; } return false; }
template<class T>bool chmin(T &former, const T &b) { if (b<former) { former=b; return true; } return false; }
template<class T>T sqar(T x){ return x*x; }//sqrt(x)は平方根;
#define Sort(v) std::sort(v.begin(), v.end(), std::greater<decltype(v[0])>()) //降順でVをソート
#define p_queue(v) priority_queue<v, vector<v>, greater<v> >
template<class T> inline void princ(T x){cout<<x<<" ";}; 
template<class T> inline void print(T x){cout<<x<<"\n";};
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
///////////////////////////////////////////////////////////////////////////////////

ll n;
Vi a;

int main(){
    cin.tie(0);ios::sync_with_stdio(false);
    std::cout<<std::fixed<<std::setprecision(30);
    cin>>n;
    a.resize(n);
    ll ssm = 0;
    rep(i,n){
        cin>>a[i];
        ssm += a[i];
    }
    ll tmp = 0;
    ll sum = 0;
    rep(i,n){
        tmp = a[i] - tmp;
    }
    ll x = tmp/2;
    a[n-1] -= a[0]-x;
    rep(i,n){
        princ(x*2);
        if(i!=0)a[i-1]-=x;
        a[i]-= x;
        x = a[i];
    }
    print("");
    return 0;
}

Measured memory_bytes: 2176
#include <iostream>
#include <cmath>
using namespace std;
typedef long long int lli;
const double EPS = 1e-10;

int main(){
    int w,h,v,t,sx,sy,gx,gy;
    cin>>w>>h>>v>>t>>sx>>sy>>gx>>gy;
    lli rad = v*t;

    long long int ans=0;
    double r2 = rad*rad;
    double diff = gx;
    for(int x=-gx-2*w*(rad/(2*w)+1); x<=sx+rad; x+=2*diff, diff=w-diff){
        if(sx-x>rad) continue;
        double d = sqrt(r2 -(double)(sx-x)*(sx-x));
        double lub[2]={d-sy, d+sy};
        for(int i=0; i<2; i++){
            if(lub[i]-gy+EPS > 0){ 
                ans += (lli)( (lub[i]-gy+EPS)/(2*h) +1 );
            }
            if(lub[i]-(2*h-gy)+EPS > 0){
                ans += (lli)( (lub[i]-(2*h-gy)+EPS)/(2*h) +1 );
            }
        }
        if(gy<lub[1] && gy<-lub[0]) ans -= 1;
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 3092
#include<bits/stdc++.h>
using namespace std;
 
#define REP(i,a,b) for(i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)

int main(){
	string s;
	cin >> s;
	s.replace(3, 1, "8");
	cout << s << endl;
}

Measured memory_bytes: 256
#//https://atcoder.jp/contests/abc121/tasks/abc121_b

#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <set>
#include <map>
#include <bitset>


using namespace std;
int main(){
	int T,X;
	double answer;
	cin>>T>>X;
	answer=(double)T/X;
	cout<<answer<<endl;
	return 0;
}

	




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

int main() {
  char X, Y;
  cin >> X >> Y;
  
  if (X > Y) {
    cout << ">" << endl;
  } else if (X < Y) {
    cout << "<" << endl;
  } else {
    cout << "=" << endl;
  }
}

Measured memory_bytes: 3628
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <stack>
#include <queue>
#include <numeric>
#include <map>
#include <unordered_map>
#include <set>
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
#define mod 1000000007
using ll = long long;
using namespace std;

int main(){
  int M,D;
  cin >> M >> D;
  int ans = 0;
  for(int i=1;i<=M;i++){
    for(int d=1;d<=D;d++){
      if(d%10>=2 && d/10>=2){
        if((d%10)*(d/10)==i) ans++;
      }
    }
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 256
#include <iostream>
//#include <stdio.h>
#include <cstring>
#include <math.h>
#include <algorithm>
#include <queue>
#include <stack>
#include <deque>
#include <vector>
#include <set>
#include <map>
#include <string.h>
#include <iomanip>
#include <utility>
#include <bitset>
#include <random>
#pragma warning(disable:4996)
using namespace std;


const int MAXN = 1e5 + 5, INF = 1e9;


int n, m;

pair<int, int> inp[MAXN];

vector<int> a[MAXN];

string makeID(int x) {
	string s = "";
	while (x) {
		s.push_back((x % 10) + '0');
		x /= 10;
	}
	while (s.length() < 6) {
		s.push_back('0');
	}
	reverse(s.begin(), s.end());
	return s;
}


int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cin >> n >> m;
	for (int i = 0; i < m; ++i) {
		cin >> inp[i].first >> inp[i].second;
		a[inp[i].first - 1].emplace_back(inp[i].second);
	}
	for (int i = 0; i < n; ++i) {
		sort(a[i].begin(), a[i].end());
	}
	for (int i = 0; i < m; ++i) {
		int x = lower_bound(a[inp[i].first - 1].begin(), a[inp[i].first - 1].end(), inp[i].second) - a[inp[i].first - 1].begin();
		cout << makeID(inp[i].first) << makeID(x + 1) << endl;
	}
	return 0;
}

Measured memory_bytes: 7808
#include <stdio.h>

int main(void)
{
	int n,v[10000],c[10000],i,ans=0;
	
	scanf("%d",&n);
	
	for(i=0;i<n;i++){
		scanf("%d",&v[i]);
	}
	
	for(i=0;i<n;i++){
		scanf("%d",&c[i]);
	}
	
	for(i=0;i<n;i++){
		if(v[i] - c[i] > 0){
			ans += v[i] - c[i];
		}
	}
	printf("%d\n", ans);
	
	return 0;
}


Measured memory_bytes: 128
#B
N= map(int, input().split())
W = list(map(int, input().split()))
ans_max=0
ans_min=0
for i in range(1,len(W)-1,1):
    if(W[i]==max(W[i-1],W[i],W[i+1])):
        ans_max = ans_max+1
    if(W[i]==min(W[i-1],W[i],W[i+1])):
        ans_min = ans_min+1


print(len(W)-2-(ans_max+ans_min))

Measured memory_bytes: 3064
import heapq

def dijkstra(s,g,n):
    d=[float('inf')]*n
    d[s]=0
    pq=[]
    cnt=0
    eused=[False]*m
    visited=[False]*n
    nowe=[-1]*n
    heapq.heappush(pq,[0,s])
    while len(pq)!=0:
        t,u=heapq.heappop(pq)
        if d[u]<t:
            continue
        for v,c,e in g[u]:
            if d[u]+c<d[v]:
                if not visited[v]:
                    visited[v]=True
                    eused[e]=True
                    nowe[v]=e
                else:
                    idx=nowe[v]
                    eused[idx]=False
                    eused[e]=True
                    nowe[v]=e
                    #print nowe,eused,idx
                d[v]=d[u]+c
                heapq.heappush(pq,[d[v],v])
    return eused

n,m=map(int,raw_input().split())
g=[[] for _ in xrange(n)]
for i in xrange(m):
    a,b,c=map(int,raw_input().split())
    a-=1;b-=1;
    g[a].append([b,c,i])
    g[b].append([a,c,i])
used_edge=[False]*m
for i in xrange(n):
    tmp=dijkstra(i,g,n)
    for j in xrange(m):
        if (not used_edge[j]) and tmp[j]:
            used_edge[j]=True
ans=0
for i in xrange(m):
    if not used_edge[i]:
        ans+=1
print(ans)

Measured memory_bytes: 32668
#include <iostream>
#include <vector>
#include <map>
#include <string>
#include <utility>
#include <algorithm>
#include <bitset>
#include <numeric>
#include <cmath>
#include <tuple>
#include <queue>
#include <set>

using namespace std;

typedef long long ll;
const ll INF = 1LL<<60;

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

string a[1010][1010];

const ll MOD = 1e9+7;

ll memo[1010][1010];

ll dp(ll h, ll w){
    if(h == 0 && w == 0){
        memo[h][w] = 1;
        return 1;
    }else if(memo[h][w] >= 0){
        return memo[h][w];
    }else{
        ll ans = 0;
        if(h - 1 >= 0 && a[h-1][w] == ".") ans = (ans + dp(h-1, w)) % MOD;
        if(w - 1 >= 0 && a[h][w-1] == ".") ans = (ans + dp(h, w-1)) % MOD;
        memo[h][w] = ans;
        return ans;
    }
}

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

    ll H, W;
    cin >> H >> W;
    
    string tmp_s;
    for(int i = 0; i < H; i++){
        cin >> tmp_s;
        for(int j = 0; j < W; j++){
            a[i][j] = tmp_s[j];
            memo[i][j] = -1;
        }
    }

    ll ans = dp(H-1, W-1);

    cout << ans << endl;


    return 0;
}


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

int a[2010];
long long ans = 0;

int main() {
//#ifndef ONLINE_JUDGE
//	freopen("a.in", "r", stdin);
//	freopen("a.out", "w", stdout);
//#endif
	int n; cin >> n;
	for (int i = 1; i <= n; ++i) cin >> a[i];
	sort(a + 1, a + n + 1);
	for(int i = 1; i <= n; i++) {
    for(int j = i + 1;j <= n; j++) {
      int t = lower_bound(a + j, a + n + 1, a[i] + a[j]) - a;
      ans += (t - j - 1);
    }
  }
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 384
#include <cstring>
#include <cstdio>
#include <iostream>
using namespace std;
int main(void){
  char data[10],out;
  int j;
  while(scanf("%s",data)!=EOF){
    out='d';
    for(int i=0;i<9;i+=3){
      j=i/3;
      if(data[i]==data[i+1]&&data[i]==data[i+2]&&data[i]!='s')out=data[i];
      if(data[j]==data[j+3]&&data[j]==data[j+6]&&data[j]!='s')out=data[j];
    }
    if(data[0]==data[4]&&data[0]==data[8]&&data[0]!='s')out=data[0];
    if(data[2]==data[4]&&data[2]==data[6]&&data[2]!='s')out=data[2];
    printf("%c\n",out);
  }
  return(0);
}

Measured memory_bytes: 1136
#include <cstdio>
#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <string>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <functional>
#include <queue>
#include <stack>
#include <cmath>
#include <iomanip>
#include <list>
#include <tuple>
#include <bitset>
#include <ciso646>
#include <cassert>

using namespace std;

#define int long long
#define double long double

typedef pair<int, int> P;
typedef tuple<int, int, int> T;

template<class T> string tostr(T x){stringstream o;o<<x;return o.str();}
template<class T> T sqr(T x){return x*x;}
template<class T> T mypow(T x,int n){T r=1;while(n>0){if(n&1)r=r*x;x=x*x;n>>=1;}return r;}

int toint(string s){int v; stringstream i(s);i>>v;return v;}
bool check(int y, int x, int h, int w){return y>=0&&x>=0&&y<h&&x<w;}
int gcd(int a,int b){return b ? gcd(b, a%b) : a;}
int lcm(int a,int b){return a / gcd(a, b) * b;}

#define REP(i,a,b)	for(int (i) = (a);i < (b);(i)++)
#define rep(i,n)	REP(i,0,n)
#define PER(i,a,b)	for(int (i) = (a-1);i >= (b);(i)--)
#define per(i,n)	PER(i,n,0)
#define each(i,n)	for(auto &i : n)
#define clr(a)		memset((a), 0 ,sizeof(a))
#define mclr(a)		memset((a), -1 ,sizeof(a))
#define all(a)		(a).begin(),(a).end()
#define sz(a)		(sizeof(a))
#define dump(val) 	cerr << #val " = " << val << endl;
#define dum(val)	cerr << #val " = " << val;
#define Fill(a,v)	fill((int*)a,(int*)(a+(sz(a)/sz(*(a)))),v)

const int dx[8] = { +1,+0,-1,+0,+1,+1,-1,-1 };
const int dy[8] = { +0,-1,+0,+1,-1,+1,-1,+1 };
const int mod = 1e9 + 7;
const int INF = 1e17 + 9;

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

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

	vector<string> a(n), b(m);

	rep(i, n) {
		cin >> a[i];
	}
	rep(i, m) {
		cin >> b[i];
	}

	bool in = false;

	rep(y, n)rep(x, n) {
		bool ok = true;
		rep(ty, m)rep(tx, m) {
			if (!check(y + ty, x + tx, n, n)) {
				ok = false;
				continue;
			}
			if (a[y + ty][x + tx] != b[ty][tx]) {
				ok = false;
			}
		}
		if (ok) in = true;
	}

	if (in) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}

	return 0;
}

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

int main(){
	int n;cin>>n;
	ll sum=0;
	int Min=INT_MAX;
	bool flag=false;
	rep(i,n){
		int a,b;scanf("%d%d",&a,&b);
		if(a!=b)flag=true;
		sum+=b;
		if(a>b)Min=min(Min,b);
	}
	if(!flag){
		puts("0");
	}
	else cout<<sum-Min<<endl;
}

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

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();}
template<class T> inline T sqr(T x) {return x*x;}

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 pb push_back
#define mp make_pair
#define each(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define exist(s,e) ((s).find(e)!=(s).end())
#define range(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  range(i,0,n)
#define clr(a,b) memset((a), (b) ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const double eps = 1e-10;
const double pi  = acos(-1.0);
const ll INF =1LL << 62;
const int inf =1 << 29;

int dfs(int p,int q,int a,int n,int cur=0,int pro=1,int start=1){
	if(p<0||cur>n||pro>a) return 0;
	if(p==0) return 1;
	int res=0;
	for(int i=start;i<=a/pro;++i){
		if(p*i>q*(n-cur)) break;
		int nq=q*i;
		int np=p*i-q;
		int g=__gcd(np,nq);
		np/=g,nq/=g;
		if(nq<0) nq*=-1,np*=-1;
		res+=dfs(np,nq,a,n,cur+1,pro*i,i);
	}
	return res;
}

int main(void){
	int p,q,a,n;
	while(cin >> p >> q >> a >> n){
		if(p==0)
			break;
		cout << dfs(p,q,a,n) << endl;
	}
	return 0;
}

Measured memory_bytes: 1156
/**
*
* Author: MARS
* Lang: GNU C++14
*
**/

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

#define F first
#define S second
#define ii pair < int , int >
#define LS pair < ll , string >

typedef unsigned long long ull;
typedef long double ldbl;
typedef long long ll;
typedef double dbl;

const ldbl E = 2.71828182845904523536;
const ldbl pi = acos(-1);
const dbl eps = 1e-9;
const ll mod = 1e9+7;
const ll inf = 1LL<<60;

/** /////////// ** Code ** /////////// **/

const int N=200200;
ll a[N];
int n;

ll f(ll b){
    ll ans=0;
    for(int i=0 ; i<n ; i++)
        ans+=abs(a[i]-(b+i+1));

    return ans;
}

int main()
{
    scanf("%d",&n);
    for(int i=0 ; i<n ; i++)
        scanf("%lld",&a[i]);


    ll lo=-inf , hi=inf;
    while(hi > lo){
        ll mid=(lo+hi)>>1;
        if(f(mid+1) < f(mid)) lo=mid+1;
        else hi=mid;
    }

    printf("%lld",min(f(lo),f(hi)));

    return 0;
}


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

namespace Atcoder
{
    public class Program
    {
        static void Main(string[] args)
        {
            var n = Read().Int();
            var s = Read();
            var r = 0L;
            var g = 0L;
            var b = 0L;
            for (int i = 0; i < n; i++)
            {
                var str = s[i].ToString();
                if (str == "R")
                {
                    r++;
                }
                else if (str == "G")
                {
                    g++;
                }
                else if (str == "B")
                {
                    b++;
                }
            }
            var ans = r * g * b;
            if (ans == 0)
            {
                WriteRead(ans);
                return;
            }
            var sub = 0L;
            for (int i = 0; i < n; i++)
            {
                for (int j = 1; j < n; j++)
                {
                    var a1 = s[i];
                    if (i + (j * 2) >= n) break;
                    var a2 = s[i + j];
                    var a3 = s[i + (j * 2)];
                    if (a1 != a2 && a1 != a3 && a2 != a3)
                    {
                        sub++;
                    }
                }
            }
            WriteRead(ans - sub);
        }

        public static string Read()
        {
            return Console.ReadLine();
        }

        public static string[] ReadSplit()
        {
            return Console.ReadLine().Split(' ');
        }

        public static void WriteRead(object str)
        {
            Console.WriteLine(str);
            Read();
        }

        public static void Write(object str)
        {
            Console.WriteLine(str);
        }

        private static bool ChangeMin<T>(ref T a, T b) where T : IComparable
        {
            if (a.CompareTo(b) > 0)
            {
                a = b;
                return true;
            }
            return false;
        }

        private static bool ChangekMax<T>(ref T a, T b) where T : IComparable
        {
            if (b.CompareTo(a) > 0)
            {
                a = b;
                return true;
            }
            return false;
        }
    }
}


public static class Extentions
{
    public static int Int(this object obj)
    {
        return int.Parse(obj.ToString());
    }

    public static long Long(this object obj)
    {
        return long.Parse(obj.ToString());
    }

    public static decimal Decimal(this object obj)
    {
        return decimal.Parse(obj.ToString());
    }

    public static double Double(this object obj)
    {
        return double.Parse(obj.ToString());
    }

    public static T2 GetValueZero<T1, T2>(this Dictionary<T1, T2> d, T1 key) where T2 : struct
    {
        T2 value;
        if (d.TryGetValue(key, out value))
        {
            return value;
        }
        return new T2();
    }
}



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

int main(void) {
    string s;
    int k=0;
    cin >> s;
    for(int i=0; i<s.size(); ++i) {
        if(k==0 && s[i]=='C') k=1;
        if(k==1 && s[i]=='F') {k=2; break;}
    }
    if(k==2) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define mod 1000000007
#define ll int
using namespace std;
int dp[101][100001];
int prefix[101][100001];
int main()
{
	int n,k;
	cin>>n>>k;
	int a[n+1];
	a[0]=0;
	for(int i=1;i<=n;i++)
	cin>>a[i];
	//sort(a,a+n+1);
	for(int i=1;i<=k;i++){
	
	dp[0][i]=0;
	prefix[0][i]=1;
	}
	for(int i=0;i<=n;i++){
	
	dp[i][0]=1;
	prefix[i][0]=1;
	}
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=k;j++)
		{
			if(a[i]>=j)
			{
			
			dp[i][j]=(prefix[i-1][j])%mod;
			prefix[i][j]=(prefix[i][j-1]%mod+dp[i][j]%mod)%mod;
			}
			else
			{
			
			dp[i][j]=(prefix[i-1][j]%mod-prefix[i-1][j-a[i]-1]%mod+mod)%mod;
			prefix[i][j]=(dp[i][j]%mod+prefix[i][j-1]%mod)%mod;
			}
		}
	}
	/*for(int i=0;i<=n;i++)
	{
		for(int j=0;j<=k;j++)
		cout<<dp[i][j]<<" ";
		cout<<endl;
	}*/
	cout<<dp[n][k]%mod;

	return 0;
}

Measured memory_bytes: 79104
#include <iostream>

using namespace std;

int main(){
	int group[] = {0,2,0,1,0,1,0,0,1,0,1,0};
	int n1, n2;
	cin >> n1 >> n2;
	if(group[n1-1] == group[n2-1]) cout << "Yes" << endl;
	else cout << "No" << endl;

	return 0;
}


Measured memory_bytes: 888
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define INF (1<<30)
#define INFLL (1ll<<60)
typedef pair<int, int> P;
typedef pair<int, P> E;
#define MOD (1000000007ll)
#define l_ength size

void mul_mod(ll& a, ll b){
	a *= b;
	a %= MOD;
}

void add_mod(ll& a, ll b){
	b += MOD;
	a += b;
	a %= MOD;
}

int main(void){
	int n,i,a[1111],ans;
	cin >> n;
	while(n){
		ans = INF;
		for(i=0; i<n; ++i){
			cin >> a[i];
		}
		sort(a,a+n);
		for(i=1; i<n; ++i){
			ans = min(ans,a[i]-a[i-1]);
		}
		cout << ans << endl;
		cin >> n;
	}
	return 0;
}



Measured memory_bytes: 3052
n, l = (int(i) for i in input().split())
list_ringo = [l + i - 1 for i in range(1, n + 1)]
if 0 in list_ringo: print(sum(list_ringo))
elif max(list_ringo) < 0: print(sum(list_ringo[:n - 1]))
else: print(sum(list_ringo[1:]))

Measured memory_bytes: 9096
#include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <string.h>
#include <vector>
using namespace std;
typedef long long ll;

int main(){
    char S[100];
    ll l;

    cin >> S;
    l = strlen(S);
    for(ll i = 0; i < l; i++){
        cout << 'x';
    }

    cout << endl;

    return 0;
}


Measured memory_bytes: 256
#include<stdio.h>

int main(){
    int i,n;
    scanf("%d",&n);
    int a[n];
    for(i = 0;i < n;i++) 
        scanf("%d",&a[i]);
    if(n >= 1)
        printf("%d",a[n-1]);
    for(i = n-2; i >= 0;i--) 
        printf(" %d",a[i]);

    printf("\n");
    return 0;
}



Measured memory_bytes: 2112
#include <stdio.h>
#include <string.h>
int main () {
	char s[20],t[20];
  	int i,j;
  gets(s);
  gets(t);
  for( i=0; i<strlen(s); i++){
    if(s[i]!=t[i]){
      puts("No");
      return 0;
    }
  }
  puts("Yes");
  return 0;

 
}
  


Measured memory_bytes: 1516
import itertools, bisect

import math
def naive_cmb(n, r):
    if r < 0 or r > n:
        return 0
    return (math.factorial(n) // math.factorial(r)) // math.factorial(n-r)

N = int(input())
L = list(map(int, input().split()))

two_edge_sum = [sum(x) for x in list(itertools.combinations(L,2))]
two_edge_sum.sort()
ans = naive_cmb(N,3)

for l in L:
    ans -= bisect.bisect_right(two_edge_sum, l)

print(max(ans,0))

Measured memory_bytes: 202940
#include <cstdio>
#include <cmath>

int main()
{
  int a,b,c;
  int max, sum;

  scanf("%d%d%d", &a, &b, &c);
  max = fmax(a, fmax(b, c));
  sum = a + b + c;
  printf("%d\n", sum - max);
  return 0;
}

Measured memory_bytes: 128
import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		String S = sc.next();
		
		if(N%2==0) {
			int h = N/2 - 1;
			String bs = S.substring(0,h+1);
			String as = S.substring(h+1,N);
			if(as.equals(bs)) {
				System.out.println("Yes");
				return;
			}
		}
		System.out.println("No");
	}
}


Measured memory_bytes: 21716
import sys
input = sys.stdin.readline

S = input().strip()
K = int(input())
f = 0
if len(set(S)) == 1:
    print(len(S)*K//2)
else:
    c = 0
    first = 0
    _s = ''
    for s in S:
        if s != _s:
            first += c // 2
            c = 1
            _s = s
        else:
            c += 1
    c = 0
    middle = 0
    f = False
    _s = S[0]
    for s in S:
        if s != _s:
            if not f:
                f = True
                c = 1
                _s = s
            else:
                middle += c // 2
                c = 1
                _s = s
        else:
            c += 1
    c = 0
    bit = ''
    _s = ''
    for s in S:
        if _s == '':
            bit = s
            _s = s
        elif s == _s:
            bit += s
        else:
            break
    _s = ''
    for s in S[::-1]:
        if _s == '':
            bit += s
            _s = s
        elif s == _s:
            bit += s
        else:
            break
    if len(set(bit)) == 1:
        bit = len(bit) // 2
    else:
        bit = bit.count(bit[0]) // 2 + bit.count(bit[-1]) // 2
    c = 0
    last = 0
    _s = ''
    for s in S[::-1]:
        if s != _s:
            last += c // 2
            c = 1
            _s = s
        else:
            c += 1

    print(first + bit * (K - 1) + middle * (K - 2) + last)      

Measured memory_bytes: 3064
import bisect

N = int(input())

ARR = list(map(int,input().split()))

def calculate(n,arr):
    arr = sorted(arr)
    sum = 0
    for i in range(n-1):
        for j in range(i+1,n):
            mmm = arr[j] + arr[i] - 1
            nnn = bisect.bisect_right(arr,mmm)
            sum = sum + nnn - (j + 1)

    print(sum)


calculate(N,ARR)


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

#define fill(a,val) memset(a, (val), sizeof a)
#define pb push_back
#define lli long long int
#define scantype int
#define endl "\n"
#define unique(x) x.erase(unique(x.begin(),x.end()), x.end())

lli MOD  = 1000000007;
lli inf = 1e15;

void scan(scantype &x);
lli powermod(lli _a,lli _b,lli _m){lli _r=1;while(_b){if(_b%2==1)_r=(_r*_a)%_m;_b/=2;_a=(_a*_a)%_m;}return _r;}
lli string_to_number(string s){lli x=0; stringstream convert(s); convert>>x; return x;}
lli add(lli a,lli b){lli x = (a+b)%MOD; return x; }
lli mul(lli a,lli b){lli x = (a*b)%MOD; return x; }
lli sub(lli a,lli b){lli x = (a-b+MOD)%MOD; return x; }
lli divi(lli a,lli b){lli x = a;lli y = powermod(b,MOD-2,MOD);lli res = (x*y)%MOD;return res;}

#define N 100003

int main(void)
{
  string st;
  cin>>st;
  lli len = st.length();

  int freq[len][26];
  fill(freq,0);

  for(int i=0;i<len;i++)
  	freq[i][st[i]-'a']++;
  for(int i=len-2;i>=0;i--)
  	for(int j=0;j<26;j++)
  		freq[i][j] += freq[i+1][j];

  lli total = 0,totalSubstring = len * (len+1) / 2LL;
  for(int i=0;i<len;i++) {
  	total += (lli)freq[i][st[i]-'a'];
  }

  cout<<totalSubstring -(total-1LL)<<endl;
  return 0;
}


void scan(scantype &x)
{
    register int c = getchar(); //for negative/positive
    x = 0;
    int neg = 0;
    for(;((c<48 || c>57) && c != '-');c = getchar());
    if(c=='-') {neg=1;c=getchar();}
    for(;c>47 && c<58;c = getchar()) {x = (x<<1) + (x<<3) + c - 48;}
    if(neg) x=-x;
}


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

const ll mod = 2019;

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

int main() {
    string s;
    cin >> s;
    int n = s.size();
    reverse(s.begin(), s.end());
    vector<int> sum(n + 1);
    for (int i = 1; i <= n; ++i) {
        sum[i] = (sum[i - 1] + (s[i - 1] - '0') * modpow(10, i - 1, mod)) % 2019;
    }
    map<int, int> mp;
    for (int i : sum) {
        mp[i]++;
    }
    ll ans = 0;
    for (auto i : mp) {
        if (i.second >= 2) ans += i.second * (i.second - 1) / 2;
    }
    cout << ans << endl;
}


Measured memory_bytes: 4380
require 'prime'
def max(a,b); a > b ? a : b; end
N = gets.to_i
A = gets.split.map(&:to_i)
Amax = A.max

dp = Array.new(Amax + 1, 0)
A.each do |a|
  dp[a] += 1
end

ans = Prime.each(Amax).inject(-1) do |s, i|
  cnt = 0
  j = i
  while j <= Amax
    cnt += dp[j]
    j += i
  end
  max(s, cnt)
end

if ans <= 1
  puts "pairwise coprime"
elsif ans < N
  puts "setwise coprime"
else
  puts "not coprime"
end


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

int main() {
  int n,k;
  cin >> n >> k;
  vector<int> p(n);
  for(int i=0;i<n;i++){
  	cin >> p[i];
  }
  int sum=0;
  sort(p.begin(),p.end());
  for(int i=0;i<k;i++){
  	sum+=p[i];
  }
  cout << sum << endl;
}



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

int main(){
  long long N,K;
  cin >> N >> K;
  vector<int> A(N);
  for(int i=0; i<N; i++){
    cin >> A[i];
  }
  
  int upper=1000000001,lower=1;
  int result;
  while(upper!=lower){
    result=(upper+lower)/2;
    long long count=0;
    for(int i=0; i<N; i++){
      count+=((A[i]+result-1)/result-1);
    }
    if(K<count){
      if(lower==result){
        result++;
        break;
      }else{
        lower=result;
      }
    }else{
      if(upper==result){
        break;
      }else{
        upper=result;
      }
    }
  }
  cout << result << endl;
}

Measured memory_bytes: 3912
#include<bits/stdc++.h>
#define ll long long int
#define ld long double
#define pb push_back
#define for(i,n) for(int i=0;i<n;i++)
using namespace std;

void solve()
{
     ll n;
     cin >> n;
     ll ac=0,wa=0,tle=0,re=0;
     while(n--)
     {
         string s;
         cin >> s;
         if(s=="AC")
             ac++;
         else if(s=="WA")
            wa++;
         else if(s=="TLE")
            tle++;
         else
            re++;
     }
     cout << "AC x " << ac << endl;
     cout << "WA x " << wa << endl;
     cout << "TLE x " << tle << endl;
     cout << "RE x " << re << endl;
}

int main()
{
    int t=1;
    //cin >> t;
    while(t--)
    solve();

    return 0;
}



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

typedef long long ll;
typedef double ld;
typedef pair <ll, ll> pll;

#define pb push_back
#define mp make_pair
#define all(_c) _c.begin(), _c.end()

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

    int n;
    cin >> n;

    ld p[n];
    for (int i = 0; i < n; i++)
        cin >> p[i];
    
    vector <vector <ld> > dp(
        n + 1, vector <ld> (n + 1, 0)
    );

    dp[0][0] = 1;
    for (int i = 1; i <= n; i++) {
        dp[i][0] = dp[i - 1][0]*(1 - p[i - 1]);
        for (int j = 1; j <= i; j++)
            dp[i][j] = dp[i - 1][j]*(1 - p[i - 1]) + dp[i - 1][j - 1]*(p[i - 1]);
    }

    ld ans = 0;
    for (int i = n/2 + 1; i <= n; i++)
        ans += dp[n][i];
    
    cout << fixed << setprecision(20) << ans << '\n';
    return 0;
}


Measured memory_bytes: 70784
#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <float.h>
#include <iomanip>
#include <iostream>
using namespace std;
 
int main(){

    
    int N,A,B;

    cin >> N>>A>>B;

    cout << min(N*A,B)<<endl;    

    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
const int INF=1e9;
const int MOD=1e9+7;
//const int MOD=998244353;
const long long LINF=1e18;
using namespace std;
#define int long long
//template
//main
signed main(){
  string s;cin>>s;
  s[3]='8';
  cout<<s<<endl;
}


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

int main()
{
    int N, M, X;
    std::cin >> N >> M >> X;
    std::vector<std::vector<int>> CA;
    CA.resize(N);
    for (int i = 0; i < N; i++)
    {
        int C;
        std::cin >> C;
        CA[i].push_back(C);
        for (int j = 0; j < M; j++)
        {
            int A;
            std::cin >> A;
            CA[i].push_back(A);
        }
    }
    uint32_t min = UINT32_MAX;
    for (uint16_t pat = 0; pat < 1 << N; pat++)
    {
        std::vector<int> wakari(M);
        for (uint8_t i = 0; i < N; i++)
        {
            if (pat >> i & 1)
            {
                for (int j = 0; j < M; j++)
                {
                    wakari[j] += CA[i][j + 1];
                }
            }
        }

        // check
        bool ok = true;
        for (auto const &e : wakari)
        {
            if (e < X)
                ok = false;
        }
        if (ok)
        {
            uint32_t cost = 0;
            for (uint8_t i = 0; i < N; i++)
            {
                if (pat >> i & 1)
                {
                    cost += CA[i][0];
                }
            }
            min = std::min(min, cost);
        }
    }
    if (min == UINT32_MAX)
        std::cout << -1 << std::endl;
    else
        std::cout << min << std::endl;
}


Measured memory_bytes: 3536
n = input()
a = [0] + map(int, raw_input().split())
b = [0 for _ in range(n + 1)]
used = []

for i in xrange(n, 0, -1):
  sum = 0
  for j in xrange(2 * i, n + 1, i):
    sum += b[j]
  if sum % 2 != a[i]:
    used.append(i)
    b[i] = 1
print len(used)
for x in used: print x,
print


Measured memory_bytes: 12736
import scala.io.StdIn._
object Main extends App {
  val Array(l, r) = readLine.split(" ").map(_.toLong)
  var min = Long.MaxValue
  for {
    i <- l to Math.min(r - 1, l + 2019)
    j <- l + 1 to Math.min(r, l + 2020)
  } min = Math.min(min, i * j % 2019)
  println(min)
}

Measured memory_bytes: 57456
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <string.h>
#include <stack>
using namespace std;

#define ISEQ(c) (c).begin(), (c).end()
typedef long long ll;

int main() {
  int d;
  while (cin >> d) {
    int ans = 0;
    for (int i = d; i < 600; i += d) {
      ans += i * i;
    }
    cout << ans * d << endl;
  }
}

Measured memory_bytes: 1160
n, m =gets.chomp.split.map(&:to_i)
od = []
ev = []
n.times do |i|
  od.push(i)
end
m.times do |i|
  ev.push(i)
end
ans = 0

ans += od.combination(2).count
ans += ev.combination(2).count

puts "#{ans}"


Measured memory_bytes: 1788
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	x := getInt()
	a := getInt()
	b := getInt()

	switch {
	case a >= b:
		fmt.Println("delicious")
	case x >= b-a:
		fmt.Println("safe")
	default:
		fmt.Println("dangerous")
	}

}

// -----------------------------------------

var scanner = wordScanner()

func wordScanner() *bufio.Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	return sc
}

func getInt() int {
	scanner.Scan()
	i, err := strconv.Atoi(scanner.Text())
	if err != nil {
		panic(err)
	}
	return i
}

func getString() string {
	scanner.Scan()
	s := scanner.Text()
	return s
}


Measured memory_bytes: 640
package main

import (
	"bufio"
	"fmt"
	"os"
)

func main() {
	N := ReadInt()
	A := ReadInts(N)
	bitCount := make([]int, 60)
	for _, a := range A {
		for i := 0; i < 60; i++ {
			bitCount[i] += (a >> i) & 1
		}
	}
	ans := 0
	for i := 0; i < 60; i++ {
		zeroNum := N - bitCount[i]
		ans = ModAdd(ans, ModMul(1<<i, zeroNum*bitCount[i]))
	}
	fmt.Println(ans)
}

const Mod = int(1e9) + 7

func ModAdd(a, b int) int { return ((Mod + a%Mod) + (Mod + b%Mod)) % Mod }
func ModMul(a, b int) int { return (Mod + a%Mod) * (Mod + b%Mod) % Mod }

var reader = bufio.NewReader(os.Stdin)

func Scan(a ...interface{}) {
	if _, err := fmt.Fscan(reader, a...); err != nil {
		panic(err)
	}
}
func ReadInt() (i int) { Scan(&i); return }
func ReadInts(n int) []int {
	v := make([]int, n)
	for i := 0; i < n; i++ {
		Scan(&v[i])
	}
	return v
}


Measured memory_bytes: 6964
#include<iostream>
using namespace std;
 
int main (){
int a,b,c0,c1,c2,c3,c4;
cin>>a>>b;
int count=0;
for(int i=a;i<=b;i++){
    c0=i%10;
    c2=i/10;
    c1=c2%10;
    c2/=100;
    c3=c2%10;
    c2/=10;
    c4=c2%10;
    if(c0==c4 && c3==c1)count++;
}
cout<<count<<endl;
return 0;
}

Measured memory_bytes: 256
def solve(N, K, S):
    max_len = 0
    change_sum = 0
    start = 0
    end = 0

    while 1:
        if end == 0:
            if S[end] == '0':
                change_sum = change_sum + 1

        # 切り替え総数がK以下ならこの区間はOK
        if change_sum <= K:
            if max_len < end - start + 1:
                max_len = end - start + 1
            end = end + 1
            # Sの最後までたどり着いたら終了
            if end >= len(S):
                break
            if S[end - 1] == '1' and S[end] == '0':
                change_sum = change_sum + 1
        else:
            start = start + 1
            if start >= len(S):
                break
            if S[start - 1] == '0' and S[start] == '1':
                change_sum = change_sum - 1

        #print(start, end, change_sum, max_len)

    return max_len

input_line = input().rstrip().split(' ')
N = int(input_line[0])
K = int(input_line[1])
S = input()

print(solve(N, K, S))

Measured memory_bytes: 3316
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  string S;
  cin >> N >> S;
  if (N % 2 == 0) {
    int check = 1;
    for (int i = 0; i < N/2; i++) {
      if (S.at(i) != S.at(i + N/2)) {
        check = 0;
        break;
      }
    }
    if (check == 0) {
      cout << "No" << endl;
    }
    else {
      cout << "Yes" << endl;
    }
  }
  else {
    cout << "No" << endl;
  }
  
}

Measured memory_bytes: 256
#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 <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
using namespace std;
typedef long long ll;


void solve(){
	int n,x,t;
	cin >>n>>x>>t;
	cout << t * ((int)ceil(1.0*n/x))<<endl;
}

int main(){
	int TC = 1;
	//cin >> TC;
	for (int tcc = 1; tcc <= TC; tcc++){
		//cout << "Case #"<< tcc << ": ";
		solve();
	}
	return 0;
		
}

Measured memory_bytes: 3616
#include <cstdio>
#include <vector>
#include <algorithm>
#include <unordered_map>
#include <string>
#include <cstdlib>
#include <iostream>
#include <cmath>

using namespace std;

int main() {
  int h,w;
  cin>>h>>w;
  string ss[50];
  for(int i=0;i<h;++i) {
    cin>>ss[i];
  }
  for(int j=0;j<h;++j) {
    for(int i=0;i<w;++i) {
      bool f=
        (ss[j][i]=='.')
        || (i>0&&ss[j][i-1]=='#')
        || (j>0&&ss[j-1][i]=='#')
        || (i<w-1&&ss[j][i+1]=='#')
        || (j<h-1&&ss[j+1][i]=='#');
      if(!f) {
        cout<<"No"<<endl;
        return 0;
      }
    }
  }
  cout<<"Yes"<<endl;
  return 0;
}


Measured memory_bytes: 256
#include <stdio.h>
int main()
{
    int n,i,j,k,l,gcd;
    long long int sum=0;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=n;j++)
        {
            for(k=1;k<=n;k++)
            {
                if(i<=j&&i<=k)
                {
                    for(l=i;l>=1;l--)
                    {
                        if(i%l==0&&j%l==0&&k%l==0)
                        {
                            gcd=l;
                            break;
                        }
                    }
                }
                else if(j<=i&&j<=k)
                {
                    for(l=j;l>=1;l--)
                    {
                        if(i%l==0&&j%l==0&&k%l==0)
                        {
                            gcd=l;
                            break;
                        }
                    }
                }
                if(k<=j&&k<=i)
                {
                    for(l=k;l>=1;l--)
                    {
                        if(i%l==0&&j%l==0&&k%l==0)
                        {
                            gcd=l;
                            break;
                        }
                    }
                }
                sum=sum+gcd;
            }
        }
    }
    printf("%lli\n",sum);
    return 0;
}


Measured memory_bytes: 1736
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
using namespace std;

int n;
int lx[50], ry[50], rx[50], ly[50];
vector<int> vecX;
vector<int> vecY;

bool isExistTate[101][102];	//isExistTate[ymin][x] = 縦線のフラグ.
bool isExistYoko[102][101];	//isExistYoko[y][xmin] = 横線のフラグ.
int label[101][101];		//label[y][x] = (x, y)--(x+1, y+1)を対角線とする正方形領域のラベル番号
int h, w;

void init() {
	int i, j;
	
	vecX.clear();
	vecY.clear();
	for (i = 0; i < 101; i++) for (j = 0; j < 102; j++) isExistTate[i][j] = false;
	for (i = 0; i < 102; i++) for (j = 0; j < 101; j++) isExistYoko[i][j] = false;
	for (i = 0; i < 101; i++) for (j = 0; j < 101; j++) label[i][j] = 0;
}

void solve() {
	int i, j;
	
	for (i = 0; i < n; i++) {
		cin >> lx[i] >> ry[i] >> rx[i] >> ly[i];
		vecX.push_back(lx[i]);
		vecX.push_back(rx[i]);
		vecY.push_back(ly[i]);
		vecY.push_back(ry[i]);
	}
	vecX.push_back(-1);
	vecX.push_back(1145140);
	vecY.push_back(-1);
	vecY.push_back(1145140);
	sort(vecX.begin(), vecX.end());
	vecX.erase(unique(vecX.begin(), vecX.end()), vecX.end());
	sort(vecY.begin(), vecY.end());
	vecY.erase(unique(vecY.begin(), vecY.end()), vecY.end());
	for (i = 0; i < n; i++) {
		lx[i] = lower_bound(vecX.begin(), vecX.end(), lx[i]) - vecX.begin();
		rx[i] = lower_bound(vecX.begin(), vecX.end(), rx[i]) - vecX.begin();
		ly[i] = lower_bound(vecY.begin(), vecY.end(), ly[i]) - vecY.begin();
		ry[i] = lower_bound(vecY.begin(), vecY.end(), ry[i]) - vecY.begin();
	}
	
	h = vecY.size() - 1;
	w = vecX.size() - 1;
	for (i = 0; i < n; i++) {
		for (j = lx[i]; j < rx[i]; j++) {
			isExistYoko[ly[i]][j] = true;
			isExistYoko[ry[i]][j] = true;
		}
		for (j = ly[i]; j < ry[i]; j++) {
			isExistTate[j][lx[i]] = true;
			isExistTate[j][rx[i]] = true;
		}
	}
	
	//labeling
	typedef pair<int, int> P;	//(y, x)
	int labelNum = 0;
	
	for (i = 0; i < h; i++) for (j = 0; j < w; j++) label[i][j] = -1;
	for (i = 0; i < h; i++) {
		for (j = 0; j < w; j++) {
			if (label[i][j] != -1) continue;
			
			queue<P> que;
			que.push(P(i, j));
			label[i][j] = labelNum;
			while (!que.empty()) {
				P now = que.front(); que.pop();
				int y = now.first;
				int x = now.second;
				
				//label[y][x] -> label[y - 1][x]
				if (y > 0 && !isExistYoko[y][x] && label[y - 1][x] == -1) {
					que.push(P(y - 1, x));
					label[y - 1][x] = labelNum;
				}
				
				//label[y][x] -> label[y + 1][x]
				if (y < h - 1 && !isExistYoko[y + 1][x] && label[y + 1][x] == -1) {
					que.push(P(y + 1, x));
					label[y + 1][x] = labelNum;
				}
				
				//label[y][x] -> label[y][x - 1]
				if (x > 0 && !isExistTate[y][x] && label[y][x - 1] == -1) {
					que.push(P(y, x - 1));
					label[y][x - 1] = labelNum;
				}
				
				//label[y][x] -> label[y][x + 1]
				if (x < w - 1 && !isExistTate[y][x + 1] && label[y][x + 1] == -1) {
					que.push(P(y, x + 1));
					label[y][x + 1] = labelNum;
				}
			}
			labelNum++;
		}
	}
	cout << labelNum << endl;
}

int main() {
	while (cin >> n) {
		if (!n) break;
		init();
		solve();
	}
	return 0;
}


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

int main(){

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    int x,n,t;
    cin>>n>>x>>t;
    cout<<(n+x-1)/x*t<<endl;

    return 0;
}

Measured memory_bytes: 3548
abs = []

begin
  while line = $stdin.gets.chomp
    break if line == ""
    a = line.split(" ")
    b = $stdin.gets.chomp.split(" ")
    abs.push({:a => a, :b => b})
  end
rescue
end

abs.each{|ab|
  hit = 0
  blow = 0
  ab[:a].each_with_index{|an, i|
    hit  += 1 if ab[:b][i] == an
    blow += 1 if ab[:b].count(an) > 0
  }
  blow -= hit
  puts "#{hit} #{blow}"
}

Measured memory_bytes: 8636
N,K=map(int,input().split())
A=[int(i) for i in input().split()]
dp=[False]*(K+1)
for i in range(K+1):
  for a in A:
    if i-a>=0:
      if not dp[i-a]:
        dp[i]=True
        break
if dp[K]:
  print("First")
else:
  print("Second")

        

Measured memory_bytes: 41836
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i = a; i < b; i++)
#define REP(i,b) FOR(i,0,b)
#define RFOR(i,a,b) for (int i = a-1; i >= b; i--)
#define RREP(i,a) RFOR(i,a,0)
#define REPALL(i,v) for (int i = 0; i < v.size(); i++)
#define SORT(v) sort(v.begin(), v.end())
#define MIN_ELEMENT(v) min_element(v.begin(), v.end())
#define MAX_ELEMENT(v) max_element(v.begin(), v.end())
#define COUNT(v,n) count(v.begin(), v.end(), n);
typedef long long ll;
typedef unsigned long long ull;
const int INF = 1e7;
const ll MOD = 1e9 + 7;

int l[111];

int main()
{
    int n, sum = 0;
    cin>>n;
    REP(i,n) {
        cin>>l[i];
        sum += l[i];
    }
    REP(i,n) {
        if (sum - l[i] <= l[i]) {
            cout<<"No"<<endl;
            return 0;
        }
    }
    cout<<"Yes"<<endl;

    return 0;
}


Measured memory_bytes: 256
W, H, x, y, r = map(int, input().split())


# if x - r >= 0 and x + r <= W and y - r >= 0 and y + r <= H:
#     print("Yes")
# else:
#     print("No")

if x - r >= 0 and x + r <= W:
    if y - r >= 0 and y + r <= H:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Measured memory_bytes: 7668
import java.util.Scanner;

public class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		sc.close();
		for (int a = 1; a <= 9; a++) {
			if (x % a == 0 && x / a <= 9) {
				System.out.println("Yes");
				return;
			}
		}
		System.out.println("No");
	}
}


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

int main (){
  int A, B, C;
  cin >> A >> B >>C;
  if (((A == 5) || (A == 7)) && 
    ((B == 5) || (B == 7)) &&
    ((C == 5) || (C == 7)) &&
    ( A+B+C == 17)) cout << "YES" << endl;
  else cout << "NO" << endl;
  
  return 0;

}

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

int main() {
  
  string S, T;
  cin >> S >> T;
  int N=0;
  
  for (int i=0; i<3; i++){
    
  if (S.at(i)==T.at(i) ){
    N++;
  }
  }
  
 cout << N << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define P pair
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define V vector
#define RE return
#define ALL(a) a.begin(),a.end()
#define MP make_pair
#define PB push_back
#define PF push_front
#define FILL(a,b) memset(a,b,sizeof(a))
using namespace std;
int main(){
	ios::sync_with_stdio(0);
    cin.tie(0);
	int n,k;
	cin>>n>>k;
	int t=(n-1)*(n-2)>>1;
	if(k>t){
		cout<<-1;RE 0;
	}
	cout<<n-1+t-k<<'\n';
	FOR(i,2,n)cout<<"1 "<<i<<'\n';
	FOR(i,2,n){
		FOR(j,i+1,n){
			if(k==t)RE 0;
			cout<<i<<' '<<j<<'\n';k++;
		}
	}
	RE 0;
}




Measured memory_bytes: 256
[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

let conv (x, y) =
    match y with
    | "BTC" -> x * 380000.0
    | _ -> x

[<EntryPoint>]
let main argv =
    let n = read int
    let xus = List.map (fun _ -> reads id |> fun [x;y] -> (float x, y)) [1..n]
    List.fold (fun x y -> x + conv y) 0.0 xus
    |> printfn "%f"
    0

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

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
typedef vector<ll> Vec;
typedef vector<int> Vi;
typedef vector<string> Vs;
typedef vector<P> VP;
typedef vector<vector<ll>> VV;
typedef vector<vector<int>> VVi;

#define REP(i, a, b) for(ll i=(a); i<(b); i++)
#define PER(i, a, b) for(ll i=(a); i>=(b); i--)
#define rep(i, n) REP(i, 0, n)
#define per(i, n) PER(i, n, 0)
const ll INF=1e18+18;
const ll MAX=100005;
const ll MOD=1000000007;
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl;
#define YES(n) cout << ((n) ? "YES" : "NO") << endl;
#define ALL(v) v.begin(), v.end()
#define rALL(v) v.rbegin(), v.rend()
#define pb(x) push_back(x)
#define mp(a, b) make_pair(a,b)
#define Each(a,b) for(auto &a :b)
#define REPM(i, mp) for (auto i = mp.begin(); i != mp.end(); ++i)
#define dbg(x_) cerr << #x_ << ":" << x_ << endl;
#define dbgmap(mp) cerr << #mp << ":"<<endl; for (auto i = mp.begin(); i != mp.end(); ++i) { cerr << i->first <<":"<<i->second << endl;}
#define dbgarr(n,m,arr) rep(i,n){rep(j,m){cerr<<arr[i][j]<<" ";}cerr<<endl;}
#define dbgdp(n,arr) rep(i,n){cerr<<arr[i]<<" ";}cerr<<endl;
#define dbgmint(n,arr) rep(i,n){cerr<<arr[i].x<<" ";}cerr<<endl;
#define out(a) cout<<a<<endl
#define out2(a,b) cout<<a<<" "<<b<<endl
#define vout(v) rep(i,v.size()){cout<<v[i]<<" ";}cout<<endl
#define Uniq(v) v.erase(unique(v.begin(), v.end()), v.end())
#define fi first
#define se second

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

template<typename T1, typename T2>
ostream &operator<<(ostream &s, const pair<T1, T2> &p) { return s<<"("<<p.first<<", "<<p.second<<")"; }

template<typename T>istream& operator>>(istream&i,vector<T>&v)
{rep(j,v.size())i>>v[j];return i;}

// vector
template<typename T>
ostream &operator<<(ostream &s, const vector<T> &v) {
    int len=v.size();
    for(int i=0; i<len; ++i) {
        s<<v[i];
        if(i<len-1) s<<"	";
    }
    return s;
}

// 2 dimentional vector
template<typename T>
ostream &operator<<(ostream &s, const vector<vector<T> > &vv) {
    int len=vv.size();
    for(int i=0; i<len; ++i) {
        s<<vv[i]<<endl;
    }
    return s;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout<<std::setprecision(10);

    ll n;
    cin>>n;
    map<string,ll>mp;
    ll mx = 0;
    rep(i,n){
        string s;
        cin>>s;
        mp[s]++;
        chmax(mx,mp[s]);
    }
    Vs vs;
    Each(x,mp){
        if(x.se == mx){
            vs.pb(x.fi);
        }
    }
    sort(ALL(vs));
    rep(i,vs.size()){
        cout<<vs[i]<<endl;
    }
    return  0;
}


Measured memory_bytes: 25584