akhauriyash/Code-Regression huggingface dataset:
#include<iostream>
#include<algorithm>
#include<functional>
#include<vector>
#include<queue>
#include<map>
#define PP std::pair<int,int>
#define TT std::tuple<int,int,int>
#define MPP std::make_pair
std::vector<int> D[100010];
std::vector<std::vector<PP>> G[100010];
std::vector<PP> A[100010];
std::vector<int> AC[100010];
int N,M;

void input(){
    std::cin>>N>>M;
    for(int i=0;i<M;i++){
        int p,q,c;
        std::cin>>p>>q>>c;
        A[p].emplace_back(PP{q,c});
        A[q].emplace_back(PP{p,c});
        AC[p].emplace_back(c);
        AC[q].emplace_back(c);
    }
}

void build(){
    for(int i=1;i<=N;i++){
        AC[i].emplace_back(-1);
        std::sort(AC[i].begin(),AC[i].end());
        AC[i].erase(std::unique(AC[i].begin(),AC[i].end()),AC[i].end());
        D[i].resize(AC[i].size());
        G[i].resize(AC[i].size());
        for(auto &u:D[i])u=1<<30;
        for(auto &u:G[i])u.emplace_back(PP{i,0});
    }
    for(int i=1;i<=N;i++){
        for(auto &u:A[i]){
            int it=std::lower_bound(AC[i].begin(),AC[i].end(),u.second)-AC[i].begin();
            int to=std::lower_bound(AC[u.first].begin(),AC[u.first].end(),u.second)-AC[u.first].begin();
            G[i][it].emplace_back(PP{u.first,to});
            G[i][0].emplace_back(PP{u.first,to});
        }
    }
}

void solve(){
    std::priority_queue<TT,std::vector<TT>,std::greater<TT>> pq;
    pq.push(TT{0,1,0});//cost,now,c
    D[1][0]=0;
    while(!pq.empty()){
        TT t=pq.top();
        pq.pop();
        int cost,now,c;
        std::tie(cost,now,c)=t;
        if(D[now][c]<cost)continue;
        for(auto u:G[now][c]){
            int add=cost;
            if(c==0)add++;
            if(D[u.first][u.second]>add){
                D[u.first][u.second]=add;
                pq.push(TT{add,u.first,u.second});
            }
        }
    }
}

void output(){
    std::cout<<(D[N][0]==1<<30?-1:D[N][0])<<std::endl;
}

int main(){
    input();
    build();
    solve();
    output();
    return 0;
}

Measured memory_bytes: 60880
#include <iostream>

using namespace std;

int main()
{
	int bills, price;
	int man, gosen, sen; //man = 10000, gosen = 5000, sen - 1000
	cin >> bills;
	cin >> price;

	for (man = 0; man <= bills; man++) {
		for (gosen = 0; gosen <= (bills - man); gosen++){
			sen = bills - man - gosen;
			if (10000 * man + 5000 * gosen + 1000 * sen == price) {
				cout << man << " " << gosen << " " << sen << endl;
				return 0;
			}
		}
		
	}

	cout << "-1 -1 -1" << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
 
#define FOR(i, a, b) for (int i = a; i <= b; i++)
#define FORD(i, a, b) for (int i = a; i >= b; i--)
#define REP(i, n) FOR(i, 0, (int)n - 1)
#define pb push_back
#define pi 3.141592653589793
#define sll signed long long int // -10^9 to 10^9
#define ll long long int// for 0 to 10^18
#define ull unsigned long long int // for 0 to 10^18
#define endl "\n"
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define all(x) x.begin(),x.end()
#define MOD 1000000007
template<typename T> T gcd(T a,T b){if(a==0) return b; return gcd(b%a,a);}
template<typename T> T power(T x,T y,ll m=MOD){T ans=1;while(y>0){if(y&1LL) ans=(ans*x)%m;y>>=1LL;x=(x*x)%m;}return ans%m;}
typedef vector<int> vi;
/* 
ll sum_ofGP_modM(ll a , ll n, ll mod)  //// (1 + A^1 +A^2 + A^3 + A^4 + -------+ A^N) % M  usually here n= Total terms in series-1
////and  if series is something for eg 3^2 + 3^4 here a= 9,r=9  our ans can be found out as 
// let a1= first term 3^2 just do ans = a1*sum_ofGP_modM(9 , N-1, ull mod)
	if(n == 0) return 1;
	if(n == 1) return (1 + a) % mod;
	ll res;
	if(n % 2)
		res = (a + 1) * GPSumWithMod((a*a) % mod , (n-1)/2);
	else{ res = (a + 1) * GPSumWithMod((a*a) % mod , n/2 - 1);res %= mod;res = (res * a) + 1;}
    return res % mod;
}
//Whenever we have (a/b)%P == (a * fast_pow(b,P-2))%P
bool isprime(ll a){
  if(a==2)return 1;
  if(!(a&1))return 0;
  for(ll i=3;i*i<=a;i+=2)
    if(a%i==0)return 0;
  return 1;
} */



int main() {
  string s1,s2;cin>>s1>>s2;
  string s3=s1+s2;
  long double i;
  istringstream (s3) >> i;
  long double t = sqrt(i);
  long double p = ceil(t);
  if(t-p==0 ) cout<<"Yes";
  else cout<<"No";
  return 0;
}


Measured memory_bytes: 256
function Main(input) {
  line = input.split(" ");
  W = +line[0]; 
  H = +line[1]; 
  x = +line[2]; 
  y = +line[3]; 

  /*
  切り出し方は「縦」か「横」の２種類しかない。
  どちらの切り方でも、面積が一緒なら1を、
  どちらかの切り方の方が大きいなら、0を出力
  */
  
  const area = W * H / 2;
  if (x === W / 2 && y === H / 2) {
    console.log(area,1);
  } else {
    console.log(area,0);
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));



Measured memory_bytes: 7628
#include <stdio.h>
#include <string.h>

int main() {

  char a[1001][11],kara;
  int i,j,k;
  int m[1002];
  int n;

  n = 1000;

  for(i = 0;i<n;i++) {
    k = 0;
    while(1) {

      scanf("%c",&a[i][k]);

	  if(a[i][k] == '\n') {
	    break;
	  }

	  k++;

	  }
    m[i] = k;
  }

  for(i=0;i<n;i++) {
    k = 0;
    while(1) {

      
      if(a[i][k] == 'A' && a[i][k+1] != 'D' &&  a[i][k+1] != 'B') break;
      else if(a[i][k] == 'B' && a[i][k+1] != 'A' && a[i][k+1] != 'C' && a[i][k+1] != 'E') break;
      else if(a[i][k] == 'C' && a[i][k+1] != 'B' && a[i][k+1] != 'F') break;
      else if(a[i][k] == 'D' && a[i][k+1] != 'A' && a[i][k+1] != 'G' && a[i][k+1] != 'E') break;
      else if(a[i][k] == 'E' &&  a[i][k+1] != 'B' &&  a[i][k+1] != 'D' &&  a[i][k+1] != 'F' &&  a[i][k+1] != 'H') break;
      else if(a[i][k] == 'F' && a[i][k+1] != 'C' && a[i][k+1] != 'E' && a[i][k+1] != 'I') break;
      else if(a[i][k] == 'G' &&a[i][k+1] != 'D' && a[i][k+1] != 'H') break;
      else if(a[i][k] == 'H' && a[i][k+1] != 'E' && a[i][k+1] != 'G' && a[i][k+1] != 'I') break;
      else if(a[i][k] == 'I' && a[i][k+1] != 'H' && a[i][k+1] != 'F') break;

      k++;

    }

    if(k == m[i]-1) {
      for(j=0;j<=k;j++) {
	printf("%c",a[i][j]);
	if(j == k) printf("\n");
      }
    }
  }
  return 0;
}

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

int main() {
 
  int a, b;
  
  cin >> a;
  cin >> b;
  
  int c;
  
  c = a + b;
  
  if ( c % 2 == 0 ){
    cout << c / 2 << endl;
                   }
  else{
    cout << c / 2 + 1 << endl;
  }
}


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

enum { INVALID    = 0x00,
       IS_NUMBER  = 0x01,
       IS_UPPER   = 0x02,
       IS_LOWER   = 0x04,
};

using namespace std;

int checkValidPassword(string password)
{
  int checkPassword = 0;

  if (password.length() < 6) return INVALID;
                             
  for (int i = 0; i < password.length(); i++) {
    if (password[i] >= '0' && password[i] <= '9') {
      checkPassword |= IS_NUMBER;
    } else if (password[i] >= 'A' && password[i] <= 'Z') {
      checkPassword |= IS_UPPER;
    } else {
      checkPassword |= IS_LOWER;
    }
  }

  return checkPassword;
}


int main()
{
  string password;

  cin >> password;

  int checkPass = checkValidPassword(password);

  if (checkPass == 0x07) {
    cout << "VALID" << endl;
  } else {
    cout << "INVALID" << endl;
  }
}



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

int n,k;
set<int> s;
vector<int> d,nc;

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

    cin>>k>>n;
    for(int i=0;i<n;i++)
    {
        int x;
        cin>>x;
        s.insert(x);
    }
    for(int i=0;i<10;i++)
        if(s.count(i)==0)
            d.push_back(i);


    while(k)
    {
        nc.push_back(k%10);
        k/=10;
    }
    reverse(nc.begin(),nc.end());
    //cout<<123<<endl;
    int ind=nc.size();
    for(int i=0;i<nc.size();i++)
    {
        //cout<<nc[i]<<endl;
        int x=lower_bound(d.begin(),d.end(),nc[i])-d.begin();
        //cout<<x<<endl;
        if(x==d.size())
        {
            ind=i;
            break;
        }
    }
    //cout<<ind<<endl;
    if(ind==0)
    {
        for(int i=0;i<=nc.size();i++)
            cout<<d[0];
        cout<<endl;
        return 0;
    }
    else if(ind==nc.size())
    {
        for(int i=0;i<nc.size();i++)
        {
            int x=lower_bound(d.begin(),d.end(),nc[i])-d.begin();
            cout<<d[x];
            if(d[x]>nc[i])
            {
                for(int j=i+1;j<nc.size();j++)
                    cout<<d[0];
                cout<<endl;
                return 0;
            }
        }
        cout<<endl;
        return 0;
    }
    else
    {
        int br=nc.size()-ind;
        for(int i=ind-1;i>=0;i--)
        {
            int x=lower_bound(d.begin(),d.end(),nc[i])-d.begin();
            if(x+1==d.size())
                br++;
            else
            {
                for(int j=0;j<i;j++)
                {
                    int y=lower_bound(d.begin(),d.end(),nc[i])-d.begin();
                    cout<<d[y];
                }
                cout<<d[x+1];
                for(int j=0;j<br;j++)
                    cout<<d[0];
                cout<<endl;
                return 0;
            }
        }
    }
    if(d[0]==0)
    {
        cout<<d[1];
        for(int i=1;i<nc.size()+1;i++)
            cout<<d[0];
        cout<<endl;
        return 0;
    }
    else
    {
        for(int i=0;i<nc.size()+1;i++)
            cout<<d[0];
        cout<<endl;
        return 0;
    }

}


Measured memory_bytes: 3616
import java.util.List;
import java.util.ArrayList;
import java.util.Collections;

import java.util.Scanner;

public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        ArrayList<Integer> list1 = new ArrayList<>();
        ArrayList<Integer> list2 = new ArrayList<>();
        
        for (int i = 0; i < 10; i++) {
            list1.add(sc.nextInt());
        }
        for (int i = 0; i < 10; i++) {
            list2.add(sc.nextInt());
        }
        
        Collections.sort(list1);
        Collections.sort(list2);
        
        int res1 = list1.get(9) + list1.get(8) + list1.get(7);
        int res2 = list2.get(9) + list2.get(8) + list2.get(7);
        
        System.out.println(res1 + " " + res2);
    }
}

Measured memory_bytes: 26060
#include<iostream>
#include<string>
#include<algorithm>
#include<cctype>

using namespace std;

string max(string a, string b){
    if(a.size()>b.size()) return a;
    if(a.size()<b.size()) return b;
    for(int i=0;i<a.size();i++){
        if(a[i] > b[i]) return a;
        if(a[i] < b[i]) return b;
    }
    return a;
}

int main(void){
  int w,h;
  string grid[71],dp[71][71];

  while(cin >> w >> h,w|h){
    for(int i=0;i<71;i++)
      for(int j=0;j<71;j++)dp[i][j].clear();

    for(int i=0;i<h;i++)cin >> grid[i];

    for(int i=0;i<h;i++){
      for(int j=0;j<w;j++){
	if(!isupper(grid[i][j])){
	  dp[i][j]=grid[i][j];
	  string a="",b="";
	  if(i>0 && !dp[i-1][j].empty())a=dp[i-1][j]+grid[i][j];
	  if(j>0 && !dp[i][j-1].empty())b=dp[i][j-1]+grid[i][j];
	  
	  while(a[0]=='0') a.erase(a.begin());
	  while(b[0]=='0') b.erase(b.begin());

	  dp[i][j]=max(dp[i][j],max(a,b));
	}
      }
    }

    string s="";
    for(int i=0;i<h;i++){
      for(int j=0;j<w;j++){
	s=max(s,dp[i][j]);
      }
    }
    cout << s << endl;
  }
  return 0;
}

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

typedef long long ll;

ll n,a,b;

int main()
{
    scanf("%lld%lld%lld",&n,&a,&b);
    if(a>b||(n<2&&a!=b))
    {
        puts("0");
        return 0;
    }
    n-=2;
    printf("%lld\n",n*b-n*a+1);
    return 0;
}

Measured memory_bytes: 3708
#include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define LOOP(i) while(i--)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto pitr=c.begin();pitr!=c.end();++pitr){cout<<*pitr;if(next(pitr,1)!=c.end())cout<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

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

	int N=in(),M=in();
	vector<vector<int>> A(N,vector<int>(N,0)),B(M,vector<int>(M,0));
	REP(i,N){
		string S=in<string>();
		REP(j,N){
			if(S[j]=='#') A[i][j]=1;
		}
	}
	REP(i,M){
		string S=in<string>();
		REP(j,M){
			if(S[j]=='#') B[i][j]=1;
		}
	}

	REP(i,N-M+1){
		REP(j,N-M+1){
			int C=0;
			REP(v,M){
				REP(u,M){
					if(A[i+v][j+u]==B[v][u]) C++;
				}
			}
			if(C==M*M){
				out("Yes");
				return 0;
			}
		}
	}
	out("No");
	return 0;
}


Measured memory_bytes: 256
n = int(input())
a = list(input())
b = list(input())
c = list(input())

count = 0
for i in range(n):
    if a[i] == b[i] == c[i]:
        continue 
    elif a[i] == b[i]:
        c[i] = a[i]
        count+=1
    elif a[i] == c[i]:
        b[i] = a[i]
        count+=1        
    elif b[i] == c[i]:
        a[i] = b[i]
        count+=1        
    else:
        c[i] = a[i]
        b[i] = a[i]
        count+=2        

print(count)
        

Measured memory_bytes: 3064
#include <iostream>
 #include <string>
 using std::cin;
 using std::cout;
 using std::endl;
 using std::string;

 int main(void){
 string s;


 cin >> s;


 bool isgood = true;
 if (s[0] == s[1]) isgood = false;
 if (s[1] == s[2]) isgood = false;
 if (s[2] == s[3]) isgood = false;


 if (isgood) {
 cout << "Good" << endl;

} else {
 cout << "Bad" << endl;
 }

 return 0;
 }

Measured memory_bytes: 3572
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
#define ll long long
#define dd double
#define MOD1 1000000007
#define MOD2 998244353
#define nl cout<<endl
#define rt ll Q[100005]={0}
#define mp make_pair
#define test() ll t;cin>>t;while(t--)
#define pb push_back
#define ff first    
#define ss second
#define all(v) v.begin(),v.end()
#define s(ar,n) sort(ar,ar+n)
#define rs(ar,n) sort(ar, ar+n, greater<ll>()) 
#define oa(a,n) for(ll i=0;i<n;i++)cout<<a[i]<<" ";nl
#define cn(a,n) for(ll i=0;i<n;i++)cin>>a[i];
#define ov(a,n) for(ll i=n-1;i>=0;i--)cout<<a[i]<<" ";nl
#define ovp(a,n) for(ll i=0;i<n;i++)cout<<a[i].ff<<" "<<a[i].ss<<endl;
#define maxa(ar,N) *max_element(ar,ar+N)
#define mina(ar,N) *min_element(ar,ar+N)
#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
typedef pair<ll,ll> pii;
ll powe(ll n,ll m){if(m==0)return 1;ll t=powe(n,m/2);if(m%2==0)return (t*t);return (((t*t))*n);}
ll mpowe(ll n,ll m,ll MOD){if(m==0)return 1;ll t=mpowe(n,m/2,MOD);t%=MOD;if(m%2==0)return (t*t)%MOD;return (((t*t)%MOD)*n)%MOD;}
ll logtwo(ll n){if(n==1)return 0;return logtwo(n/2)+1;}
int main()
{
    fastio();
    
    int n;
    cin>>n;
    int f=0;
    while(n>0)
    {
        if(n%10==7)
            f=1;
        n=n/10;
    }
    if(f==1)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;

}

Measured memory_bytes: 3640
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define pb push_back
#define mp make_pair
#define f first
#define s second
#define sc(n) scanf("%d",&n)
#define scl(n) scanf("%lld",&n)
#define pr(n) printf("%d",n)
#define prl(n) printf("%lld",n)
#define nl printf("\n")
#define fast_io ios_base::sync_with_stdio(false);cin.tie(NULL)
ll pow1(ll a, ll b)
{
	ll ans=1;
	while(b)
	{
		if(b&1)
		{
			ans=ans*a;
		}
		a=a*a;
		b=b>>1;
	}
	return ans;
}
int main()
{
	ll i,j,k,a,b;
	cin>>a>>b;
	for(i=1;i<=3;i++)
	{
		if((a*b*i)&1)
		{
			cout<<"Yes\n";
			return 0;
		}
	}
	cout<<"No\n";
	return 0;
}

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

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

ll M[100005][3];
ll func(ll A[][3],ll n,ll x){
	if(n==-1)
		return 0;
	ll &ans=M[n][x];
	if(ans==-1){
		for(ll i=0;i<3;i++){
			if(x!=i)
				ans=max(ans, func(A,n-1,i)+A[n][i]);
		}
	}
	return ans;
}

int main() {

	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	ll n;
	cin>>n;
	ll A[n][3];
	memset(M,-1,sizeof M);
	for(ll i=0;i<n;i++)
		cin>>A[i][0]>>A[i][1]>>A[i][2];
	
	ll ans=INT_MIN;
	for(ll i=0;i<3;i++)
		ans=max(ans, func(A,n-2, i)+A[n-1][i]);
	cout<<ans<<endl;
}


Measured memory_bytes: 16108
////////////////////////////////////////////////////////////////////
// This source code is for Visual Studio
////////////////////////////////////////////////////////////////////
#include <iostream>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <sstream>
#include <iterator>
#include <stack>
#include <functional>
#include <iomanip>
#include <string>
#include <cstring>
#include <deque>
#include <math.h>
#include <assert.h>

#define	numberof(a)	(sizeof(a) / sizeof(a[0]))
#define	INF32		INT32_MAX
#define	INF64		INT64_MAX
#define Rep(i,n) for(int i = 0; i < (n); ++i )

using namespace std;

typedef vector< vector<int> > MAT;
typedef pair<int, int> PINT;
typedef long long ll;
typedef uint32_t u32;
typedef uint64_t u64;
typedef int32_t s32;
typedef int64_t s64;

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

// main function
int main()
{
	string ans = "Yay!";	// ":("
	ll A = 0;
	ll B = 0;

	cin >> A >> B;

	if (A <= 8 && B <= 8) {
		ans = "Yay!";
	}
	else {
		ans = ":(";
	}

	cout << ans << endl;

	return 0;
}

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


int main(){
  int a,b,c,aa,bb,cc;
  cin >> a >> b >> c;
  long long ans=0;
  if(a==b && b==c && a%2!=1){
    ans=-1;
    cout << ans << endl;
    return 0;
  }
  while(a%2==0 && b%2==0 && c%2==0){
    aa=a/2;
    bb=b/2;
    cc=c/2;
    a=bb+cc;
    b=aa+cc;
    c=bb+aa;
    ans++;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 256
n, k = map(int, input().split())
h = list(map(int, input().split()))
dp = [10**9] * (n+k+10)
dp[0] = 0

for i in range(n):
    for j in range(1, k+1):
        if 0<=i+j<n: dp[i+j] = min(dp[i+j], dp[i] + abs(h[i]-h[i+j]))
print(dp[n-1])

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

import itertools

# 初日以外は何も気にせず動けるとしてよい。初日に到達可能な場所のうち、最もゴールに近いものはどこか

H,W,K = map(int,input().split())
A = '#' * (W+2)
for _ in range(H):
    A += '#' + input().rstrip() + '#'
A += '#' * (W+2)

start = A.find('S')
dxs = [1,-1,(W+2),-(W+2)]

visited = set()
q = [start]
visited.add(start)
for _ in range(K):
    qq = []
    for dx,x in itertools.product(dxs,q):
        y = x+dx
        if A[y] == '#':
            continue
        if y in visited:
            continue
        visited.add(y)
        qq.append(y)
    q = qq

nearest = 10**9
for x in visited:
    row,col = divmod(x,W+2)
    d = min(row-1,H-row,col-1,W-col)
    if nearest > d:
        nearest = d

answer = 1 + (nearest+K-1)//K
print(answer)

Measured memory_bytes: 40112
#include <algorithm>
#include <cmath>
#include <iostream>
#include <numeric>
#include <vector>

using namespace std;

int main() {
  int x;
  int mt;
  vector<int> m;

  cin >> x;
  m.push_back(1);
  for (int i = 1; i < sqrt(x); ++i) {
    for (int j = 2; j <= 20; ++j) {
      long long ttt = pow(i, j);
      if (ttt <= x) m.push_back(ttt);
    }
  }
  int maxx = *max_element(m.begin(), m.end());
  cout << maxx << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main()
{
    long long n;
    long long i,sum;
    cin>>n;
    if(n>=1&&n<=1000000)
    {
        sum=0;
        for(i=1;i<=n;i++)
        {
            if(i%3!=0&&i%5!=0&&i%15!=0)
                sum=sum+i;
        }
    }
    cout<<sum<<endl;
    return 0;
}


Measured memory_bytes: 3632
#include <assert.h>
#include <bits/stdc++.h>
#include <math.h>
#include <string.h>
#include <algorithm>
#include <bitset>
#include <fstream>
#include <unordered_map>
#include <iostream>
#include <list>
#include <set>
#include <stack>
#include <string>
#include <vector>

 
using namespace std;

typedef string str;
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
typedef long long ll;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef vector<int> vi;
typedef vector<ll> vl;

#define mp make_pair
#define pb push_back
#define sz(x) (int)x.size()
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound
#define trav(a, x) for (auto &a : x)
#define F0R(i, a) for (int i = 0; i < (a); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define FORd(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define F0Rd(i, a) for (int i = (a)-1; i >= 0; i--)
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define PRINT_ARRAY(a, N)        \
  F0R(z, N) cout << a[z] << " "; \
  cout << "\n"
 
const int MOD = 1000000007;  // 998244353;
const ll INF = 1e18;
const ld PI = 4 * atan((ld)1);


int main() {
		ll A, B, H, M;
		cin >> A >> B >> H >> M;
		ld theta1 = 0.5 * (60 * H + M);
		ld theta2 = 6 * M;
		ld delta = fabs(theta1 - theta2);
		delta = MIN(delta, 360 - delta);

		// are they superimposed?
		// we have a triangle.
		ld ans = sqrtl(A*A + B*B - 2*A*B*cos(delta * PI / 180.0));
		cout << fixed << setprecision(20) << ans << endl;

}


Measured memory_bytes: 4160
#include <algorithm>  // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <bitset>     // bitset
#include <cctype>     // isupper, islower, isdigit, toupper, tolower
#include <cstdint>    // int64_t, int*_t
#include <cstdio>     // printf
#include <deque>      // deque
#include <iomanip>    // fixed, setprecision
#include <iostream>   // cout, endl, cin
#include <map>        // map
#include <queue>      // queue, priority_queue
#include <set>        // set
#include <stack>      // stack
#include <string>     // string, to_string, stoi
#include <tuple>      // tuple, make_tuple
#include <unordered_map>  // unordered_map
#include <unordered_set>  // unordered_set
#include <utility>        // pair, make_pair
#include <vector>         // vector
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

int main() {
  ll N, k = 0, a, n = 1;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> a;
    if (a == n) {
      n++;
    } else {
      k++;
    }
  }
  cout << (k == N ? -1 : k) << endl;
}


Measured memory_bytes: 3180
#include <iostream>
#include <queue>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <iomanip>

using namespace std;

#define REP(i,n) for(ll (i) = (0); (i) < (n); ++i)
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define ALL(v) v.begin(),v.end()
#define INF 1100000000
#define LLINF 1000000000000000000LL
#define MOD 1000000007
#define Decimal fixed << setpresicion(20)
#define SHOWP(x) cerr<<"["<<(x).FI<<", "<<(x).SE<<"]";
#define SHOWX(x) cerr<<#x<<": "<<x<<endl;
#define SHOWVEC(v, e) REP(i, e) cerr << (v[i]) << ' '; cerr << endl;
#define SHOW2D(a, h, w) REP(i, h){REP(j, w)cerr<<setw(3)<<(a[i][j])<<' ';cerr<<endl;}

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


int main()
{
  string S; cin >> S;
  int one = 0, zero = 0;
  REP(i, S.size()) {
    if (S[i] == '0') zero++;
    else one++;
  }
  if (zero < one) cout << zero*2 << endl;
  else cout << one*2 << endl;

  return 0;
}

Measured memory_bytes: 512
#include<iostream>

using namespace std;

int main()
{
	int W, H;
	char field[100][100];
	bool passed[100][100];
	while(1)
	{
		cin >> H >> W;
		if(H == 0 && W == 0) break;
		for(int y = 0;y < H;y++)
		{
			for(int x = 0;x < W;x++)
			{
				cin >> field[y][x];
				passed[y][x] = false;
			}
		}
		
		int cx = 0, cy = 0;
		bool loop = false;
		while(1)
		{
			int dx = 0, dy = 0;
			char cell = field[cy][cx];
			if(passed[cy][cx])
			{
				loop = true;
				break;
			}
			else if(cell == '>') dx++;
			else if(cell == '<') dx--;
			else if(cell == '^') dy--;
			else if(cell == 'v') dy++;
			else if(cell == '.') break;
			passed[cy][cx] = true;
			cx += dx;
			cy += dy;
		}
		if(loop) cout << "LOOP" << endl;
		else cout << cx << ' ' << cy << endl;
	}
	return 0;
}

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

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

    int n,m;
    cin >> n >> m;
    vector<long long int> height;
    vector<vector<int>> load(n);

    rep(i,n){
        int h;
        cin >> h;
        height.push_back(h);
    }
    
    rep(i,m){
        int a,b;
        cin >> a >> b;
        a--;
        b--;
        if(height[a] < height[b]) load[a].push_back(b);
        else if(height[b] < height[a]) load[b].push_back(a);
     	else if(height[a] == height[b]) {
        	load[a].push_back(b);
        	load[b].push_back(a);
        }
    }

    int ans =0;
    rep(i,n){
        if(load.at(i).size() == 0){
            ans++;
        }
    }
    cout << ans;
}


Measured memory_bytes: 8132
import itertools

N = int(input())
P = list(map(int, input().split()))
Q = list(map(int, input().split()))

cnt = 0
a, b = 0, 0
perms = itertools.permutations(range(1, N+1))
for perm in perms:
  cnt += 1
  # P
  is_P = True
  for i in range(N):
    if perm[i] != P[i]:
      is_P = False
      break
  if is_P:
    a = cnt
  # Q
  is_Q = True
  for i in range(N):
    if perm[i] != Q[i]:
      is_Q = False
      break
  if is_Q:
    b = cnt
print(abs(a-b))


Measured memory_bytes: 3064
#include <algorithm>
#include <cmath>
#include <vector>
#include <functional>
#include <cstdlib>
#include <map>
#include <set>
#include <iostream>
#include <string>
#include <ctype.h>
#include <climits>
#include <queue>
using namespace std;
typedef long long ll;
#define REP(i, n) for(ll i = 0; i < (ll)(n); ++i)
template<class T> inline bool chmax(T& a, T b) { if(a < b){ a=b; return 1; } return 0;}
template<class T> inline bool chmin(T& a, T b) { if(a > b){ a=b; return 1; } return 0;}

int main(){
	int n,k;
	cin >> n >> k;
	
	long double ans=0;
	for(int i=1; i<=min(n,k-1); ++i){
		ans += 1/pow(2.0, ceil(log2((double)k/i)));
	}
	if(n <= k-1){
		ans /= (double)n;
	}else{
		ans /= (double)n;
		ans += (double)(n-k+1)/n;
	}
	
	printf("%.12Lf\n",ans);
	
	return 0;
}

Measured memory_bytes: 4236
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#define pb push_back
#define mp make_pair
using namespace std;
const int N=1e4+5;

int n;
int a[N],b[N];


int main()
{
   int i;
   long long sa,sb;
   sa=sb=0;

   scanf("%d", &n);
   for(i=1;i<=n;i++)
   {
       scanf("%d", &a[i]);
       sa+=a[i];
   }
   for(i=1;i<=n;i++)
   {
       scanf("%d", &b[i]);
       sb+=b[i];
   }

   if(sa > sb)
   {
       printf("No\n");
       return 0;
   }

   long long moves=sb-sa;
   long long need=0;
   for(i=1;i<=n;i++)
   {
       if(a[i] > b[i])
       {
        need+=a[i]-b[i];
        b[i]=a[i];
       }
   }

   for(i=1;i<=n;i++)
   {
       if(a[i] < b[i])
       {
           need-=(b[i]-a[i])/2;

       }
   }
   //cerr<<need<<endl;

   if(need > 0)
   {
       printf("No\n");
       return 0;
   }


   printf("Yes\n");

   return 0;
}


Measured memory_bytes: 384
//by rng_59
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <memory.h>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
using namespace std;

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

const int MAXN = 10;
int a[MAXN],b[MAXN];

int main(void) {
	int N,M;
	bool ans = true;
	cin >> N >> M;
	string s = string(N, 'a');
	REP(i,M) {
		int pos, c;
		cin >> pos >> c;
		if (s[pos-1] == 'a') s[pos-1] = c + '0';
		else if (c+'0' != s[pos-1]) ans = false;
	}
	for (int i=1; i<N; i++)
		if (s[i] == 'a') s[i] = '0';
	if (s[0]=='0' && N>1) ans = false;
	else if (s[0] == 'a') {
		if (N > 1) s[0] = '1';
		else s[0] = '0';
	}
	if (ans == true) cout << s << endl;
	else cout << -1 << endl;
	return 0;
}


Measured memory_bytes: 256
#include<iostream>

using namespace std;

int main(){
  int temp=0;
  int ans=1;
  int n,x,l[101];
  
  cin >> n >> x;
  
  for(int i=0;i<n;i++){
    cin >> l[i];
    temp += l[i];
    if(x >= temp) ans ++;
  }
  
  
  cout << ans << endl;
  
  return 0;
}


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

vector<pair<int, int>> g[6000];
bool f[6000];
//int dist[6000][2010];

int main()
{
	int n, m, cap;
	while (cin >> n >> m >> cap, n){
		for (int i = 0; i < 6000; i++) g[i].clear();
		memset(f, 0, sizeof(f));
		cap *= 10;
		string src, dst;
		cin >> src >> dst;
		map<string, int> mp;
		mp[src] = mp.size() - 1;
		mp[dst] = mp.size() - 1;
		for (int i = 0; i < n; i++){
			string a, b;
			int c;
			cin >> a >> b >> c;
			if (!mp.count(a)) mp[a] = mp.size() - 1;
			if (!mp.count(b)) mp[b] = mp.size() - 1;
			g[mp[a]].emplace_back(mp[b], c);
			g[mp[b]].emplace_back(mp[a], c);
		}
		for (int i = 0; i < m; i++){
			string s;
			cin >> s;
			f[mp[s]] = true;
		}
		vector<vector<int>> dist(mp.size(), vector<int>(cap + 1, 1 << 28));
		//fill_n(*dist, 6000 * 2010, 1 << 28);
		priority_queue<tuple<int, int, int>, vector<tuple<int, int, int>>, greater<tuple<int, int, int>>> pq;
		dist[0][cap] = 0;
		pq.push(make_tuple(0, 0, cap));
		int goal = mp[dst];
		int res = -1;
		while (pq.size()){
			int s, v, r;
			tie(s, v, r) = pq.top(); pq.pop();
			if (v == goal){
				res = s;
				break;
			}
			if (dist[v][r] < s) continue;
			if (f[v]) r = cap;
			for (pair<int, int> &e : g[v]){
				if (r < e.second) continue;
				if (dist[e.first][r - e.second] > s + e.second){
					dist[e.first][r - e.second] = s + e.second;
					pq.push(make_tuple(s + e.second, e.first, r - e.second));
				}
			}
		}
		cout << res << endl;
	}
}

Measured memory_bytes: 52232
#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(){
  int N;
  cin >> N;
  
  int maxj = 0;
  vector<int>A(N);
  
  rep(i,N)cin >> A[i];
  int nowj = 0;
  
  for(int i = 1; i < N; i++){
    if(A[i] <= A[i-1]){
      nowj++;
    }
    else{
      maxj = max(maxj,nowj);
      nowj = 0;
    }
  }
  maxj = max(nowj,maxj);
  cout << maxj << endl;
  
}

Measured memory_bytes: 3692
import java.math.BigDecimal;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        @SuppressWarnings("resource")
        Scanner sc = new Scanner(System.in);
        BigDecimal a = new BigDecimal(sc.next());
        BigDecimal b = new BigDecimal(sc.next());
        System.out.println(a.multiply(b).setScale(0, BigDecimal.ROUND_DOWN));

    }

}


Measured memory_bytes: 35972
#include<cstdio>
#include<cctype>
#include<cmath>
#include<cstring>
#include<iostream>
#define LL long long
const LL mod = 998244353;
const int N = 3e5 + 3;
LL p[N],inv[N];
inline LL quick(LL a,LL b){
	LL res = 1;
	while(b){
		if(b & 1) res = res * a % mod;
		b >>= 1;
		a = a * a % mod;
	}	
	return res;
}
inline LL C(LL n,LL m){
	return p[n] * inv[m] % mod * inv[n - m] % mod;	
} 
inline LL mo(LL X){
	if(X >= mod) X -= mod;
	return X;
}
int main(){
	p[0] = 1;p[1] = 1;inv[0] = 1;inv[1] = 1;
	for(int i = 2;i <= 300000;++i){
		p[i] = p[i - 1] * i % mod;
		inv[i] = quick(p[i],mod - 2);	
	}
	LL n,a,b,k;LL ans = 0;
	std::cin >> n >> a >> b >> k;
	for(int i = 0;i <= n;++i){
		LL t = k - a * i;
		if(t < 0 || t % b != 0) continue;
		LL g = t / b;
		if(g > n) continue;
		ans = mo(ans + C(n,i) * C(n,g) % mod);
	}
	printf("%lld\n",ans);
	return 0;
}

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

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

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

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

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

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

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

// ---- ----

int n;
vector<int> v[100000];

int main() {
	cin >> n;
	
	int x = 0;
	inc1(q, 10000) {
		x += q;
		if(n == x) {
			int k = q + 1;
			cout << "Yes" << endl;
			cout << k << endl;
			
			int c = 0;
			inc(i, k) {
			inc(j, i) {
				c++;
				v[i].PB(c);
				v[j].PB(c);
			}
			}
			
			inc(i, k) {
				cout << v[i].size() << " ";
				inc(j, v[i].size()) { cout << v[i][j] << " "; }
				cout << endl;
			}
			
			return 0;
		}
	}
	
	cout << "No" << endl;
	
	return 0;
}


Measured memory_bytes: 4608
#include <bits/stdc++.h>
#include <stdio.h>
 
using namespace std;
 
#define int long long
 
void solve();
 
signed main () {
    // cout << fixed << setprecision(1);
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    #ifdef LOCAL
        freopen("input.txt", "r", stdin);
    #endif
    int t = 1; 
    // cin >> t;
    int tt = t;
    while (t--) { 
        solve();
    }
    return 0;
}
int n;
vector<pair<int, int>> divs;
void solve() {
    cin >> n;
    for (int i = 1; i * i <= n; ++i) {
        if (n % i)
            continue;
        divs.push_back({i, n / i});
        if (i * i != n)
            divs.push_back({n / i, i});
    }
    int ans = 1e18;
    for (auto j : divs) {
        ans = min(ans, j.first + j.second - 2);
    }
    cout << ans;
}       

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

using namespace std;

#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define REV(i,n) for(ll (i) = (n) - 1;(i) >= 0;--i)
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v,n) {REP(WW,n)cerr << v[WW] << ' ';cerr << endl << endl;}
#define SHOW2d(v,WW,HH) {REP(W_,WW){REP(H_,HH)cerr << v[W_][H_] << ' ';cerr << endl;}cerr << endl;}
#define ALL(v) v.begin(),v.end()
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL
#define MOD 998244353

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

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

	ll a, b;cin >> a >> b;

	if(abs(a - b) % 2){
		cout << "IMPOSSIBLE" << endl;
	}
	else {
		cout << (a + b) / 2 << endl;
	}

	return 0;
}


Measured memory_bytes: 256
import java.util.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] h = new int[n];
        int cnt = 1;
        

        for(int i = 0 ;i<n;i++){
            h[i] = sc.nextInt();
        }
        int max = h[0];

        for(int i = 1;i<n;i++){
            if(h[i]>=max){
                cnt++;
            max = h[i];
            }
        }
       System.out.println(cnt);
    }
}


Measured memory_bytes: 23124
#include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define rep2(i, s, n) for (ll i = s; i < (ll)(n); i++)
#define repr(i, n) for (ll i = n; i >= 0; i--)
#define pb push_back
#define COUT(x) cout << (x) << endl
#define COUTF(x) cout << setprecision(15) << (x) << endl
#define ENDL cout << endl
#define DF(x) x.erase(x.begin())  // 先頭文字削除
#define ALL(x) x.begin(), x.end()
#define SORT(x) sort(ALL(x))
#define REVERSE(x) reverse(ALL(x))
#define init() \
  cin.tie(0);  \
  ios::sync_with_stdio(false)
#define debug(x) cerr << "[debug] " << #x << ": " << x << endl;
#define debugV(v)                       \
  cerr << "[debugV] " << #v << ":";     \
  rep(i, v.size()) cerr << " " << v[i]; \
  cerr << endl;
using namespace std;
using ll = long long;
using ld = long double;
using vll = vector<ll>;
using P = pair<ll, ll>;
constexpr ll INF = 0x3f3f3f3f3f3f3f3f;
constexpr ld PI = 3.141592653589793238462643383279;
ll get_digit(ll x) {
  return to_string(x).size();
}

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

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

vector<P> factorize(ll n) {
  vector<P> result;
  for (ll i = 2; i * i <= n; ++i) {
    if (n % i == 0) {
      result.pb({i, 0});
      while (n % i == 0) {
        n /= i;
        result.back().second++;
      }
    }
  }
  if (n != 1) {
    result.pb({n, 1});
  }
  return result;
}

vll divisor(ll n) {
  vll ret;
  for (ll i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  SORT(ret);
  return (ret);
}

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

signed main() {
  init();
  vll a(3);
  rep(i, 3) {
    cin >> a[i];
  }
  SORT(a);
  ll ans = 0;

  rep(i, 3) {
    if (i == 0) continue;
    ans += a[i] - a[i - 1];
  }
  COUT(ans);
  return 0;
}

Measured memory_bytes: 3640
#include <bits/stdc++.h> 
using namespace std;
int a[1000005],b[1000005];
int n;
int check(int x)
{
	for(int i = 1;i < n<<1;i ++) b[i] = a[i] >= x;
    int p = !(n&1);int cur = 1e9;
    int ret = b[n]^p;
    for(int i = n-1;i >= 1;i --)
        if(b[i] == b[i+1] && n-i < cur)
            cur = n-i,ret = b[i];
    for(int i = n+1;i <= 2*n-1;i ++)
        if (b[i] == b[i-1] && i-n < cur)
		{
            cur = i-n;
            ret = b[i];
        }
    return ret;
}
int main()
{
	scanf("%d",&n);
    for(int i = 1;i < 2*n;i ++) scanf("%d",&a[i]);
    int l = 1,r = 2*n-1;
    while(l < r)
	{
        int mid = (l+r+1)>>1;
        if(check(mid)) l = mid;
		else r = mid-1;
    }
    printf("%d\n",l);
    return 0;
}

Measured memory_bytes: 5248
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <queue>
#include <string>
#define REP(i,n) for(ll i = 0; i < (ll)n; i++)
using namespace std;
typedef long long ll;

int main(){
  string s;
  cin >> s;
  ll ans = 0;
  REP(i,4){
    if(s[i]=='2') ans++;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long ll;

int main()
{
	ll X;
	cin >> X;
	ll sum = 100;
	int cnt = 0;
	while(sum < X)
	{
		sum += sum * 0.01;
		cnt++;
	}
	printf("%d",cnt);
	return 0;
}

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

#define fs first
#define sc second
#define pb emplace_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()

const int32_t inf = 1001001001;
const int64_t infll = 1001001001001001001ll;
const int dx[] = {0, -1, 1, 0, -1, 1, -1, 1}, dy[] = {-1, 0, 0, 1, -1, -1, 1, 1};

template <typename T> using vector2d = vector<vector<T>>;

// clang-format off
template <typename T> void sort(vector<T> &v) { sort(all(v)); }
// ostream &operator<<(ostream &os, __int128_t value) { if (ostream::sentry(os)) { __uint128_t tmp = value < 0 ? -value : value; char buffer[64]; char *d = end(buffer); do { --d; *d = "0123456789"[tmp % 10]; tmp /= 10; } while (tmp != 0); if (value < 0) { --d; *d = '-'; } int len = end(buffer) - d; if (os.rdbuf()->sputn(d, len) != len) { os.setstate(ios_base::badbit); }} return os; }
// istream &operator>>(istream &is, __int128_t &value) { string in; is >> in; value = 0; for (const char &c : in) { if ('0' <= c && c <= '9') value = 10 * value + (c - '0'); } if (in[0] == '-') value *= -1; return is; }
// ostream &operator<<(ostream &os, __uint128_t value) { if (ostream::sentry(os)) { char buffer[64]; char *d = end(buffer); do { --d; *d = "0123456789"[value % 10]; value /= 10; } while (value != 0); int len = end(buffer) - d; if (os.rdbuf()->sputn(d, len) != len) { os.setstate(ios_base::badbit); }} return os; }
// istream &operator>>(istream &is, __uint128_t &value) { string in; is >> in; value = 0; for (const char &c : in) { if ('0' <= c && c <= '9') value = 10 * value + (c - '0'); } return is; }
template <typename T> ostream &operator<<(ostream &os, vector<T> &v) { os << v[0]; for (int i = 1; i < v.size(); ++i) os << " " << v[i]; return os; }
template <typename T> istream &operator>>(istream &is, vector<T> &v) { for (T &in : v) is >> in; return is; }
template <typename T1, typename T2> ostream &operator<<(ostream &os, pair<T1, T2> p) { os << p.fs << " " << p.sc; return os; }
template <typename T1, typename T2> istream &operator>>(istream &is, pair<T1, T2> &p) { is >> p.fs >> p.sc; return is; }

struct IoSetup { IoSetup(){ cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(10); cerr << fixed << setprecision(10); } } iosetup;

inline int64_t in() { int64_t x = 0; cin >> x; return x; }
template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }
// clang-format on

signed main(int argc, char *argv[]) {
  int64_t ans = 0;
  int64_t n = in(), k = in();

  if (k == 0) {
    cout << n * n << endl;
    return 0;
  }

  for (int b = k + 1; b <= n; ++b) {
    ans += (n / b) * (b - k);
    ans += max(n % b + 1 - k, int64_t(0));
    // cout << b << " " << ans << endl;
  }

  cout << ans << endl;
}


Measured memory_bytes: 256
R, G, B, N = map(int, input().split())

org_list = [R, G, B]
org_list.sort()
first_num = org_list[2]
second_num = org_list[1]
third_num = org_list[0]

count = 0

for i in range(N // first_num + 1):
  for j in range((N-i*first_num) // second_num + 1):
    if (N - i*first_num - j*second_num) % third_num == 0:
      count += 1
 
print(count)

Measured memory_bytes: 3064
#include <iostream>
#include <stdio.h>
using namespace std;

void maxHeapify(int a[],int i,int n){
    int l=i*2,r=i*2+1;
    int largest=i;

    if(r<=n){
        if(a[r]>a[largest]){
            largest=r;
        }
        if(a[l]>a[largest]){
            largest=l;
        }
    }
    else if(l<=n){
        if(a[l]>a[largest]){
            largest=l;
        }
    }

    if(largest!=i){
        int tmp=a[largest];
        a[largest]=a[i];
        a[i]=tmp;
        maxHeapify(a,largest,n);
    }
    return;
}

void buildMaxHeap(int a[],int n){
    int m=n/2;
    for(;m>0;m--){
        maxHeapify(a,m,n);
    }
    return;
}

int main(void){
    int n,i;
    int a[500001];
    
    cin>>n;
    
    for(i=1;i<=n;i++){
        cin>>a[i];
    }

    buildMaxHeap(a,n);
    
    for(i=1;i<=n;i++){
        printf(" %d",a[i]);
    }
    printf("\n");

    return 0;
}


Measured memory_bytes: 5100
#include<stdio.h>

int main(void){
  int n;
  long long k;
  scanf("%d %lld",&n,&k);
  
  long long a[100001] = {0};
  int b1 , b2;
  
  for(int i = 0;i < n;i ++){
    scanf("%d",&b1);
    scanf("%d",&b2);
    a[b1] += b2;
  }
  
  
  long long ans = 0 , c;
  for(int i = 1;i <= 100000;i ++){
    ans += a[i];
    if(ans >= k){
      c = i;
      i = 10000000;
    }
  }
  printf("%lld\n",c);
  
  return 0;
}

Measured memory_bytes: 896
package main

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

func main() {
	sc := bufio.NewScanner(os.Stdin)
	for sc.Scan() {
		str := strings.Split(sc.Text(), " ")
		if len(str) != 2 {
			return
		}
		a, err1 := strconv.ParseInt(str[0], 10, 64)
		b, err2 := strconv.ParseInt(str[1], 10, 64)
		if err1 != nil || err2 != nil {
			return
		}
		a += b
		for b = 0; a > 0; a /= 10 {
			b++
		}
		fmt.Println(b)
	}
}



Measured memory_bytes: 1064
#include <stdio.h>

int alg (int x, int y) {
	if (x % y == 0) {
		return y;
	}
	else {
		alg(y, x % y);
	}
}
int main(void) {
	int a, b, k, memo;
	int ans[100];
	scanf("%d %d %d", &a, &b, &k);
	if (a < b) {
		memo = b;
		b = a;
		a = memo;
	}

	ans[0]=alg(a, b);
	int n = 0;
	for (int i = ans[0]-1; i  ; --i) {
		if (a % i == 0 && b % i == 0) {
			ans[++n] = i;
		}
	}
	printf("%d", ans[k - 1]);

	return 0;
}

Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
int main(){
    string s;
    getline(cin, s);
    for(int i = 0; i < s.length(); i++){
        if(islower(s[i])) s[i] = toupper(s[i]);
        else  if(isupper(s[i])) s[i] = tolower(s[i]);
    }
    cout << s << endl;
}


Measured memory_bytes: 3152
#include <bits/stdc++.h>
#define nmax 200002
#define f first
#define s second
using namespace std;

int k,n,arr[nmax],pos,marc;
pair<int,int>p;
long long cont;

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

    cin>>k>>n;
    for(int i=0;i<n;i++){
        cin>>arr[i];
    }
    sort(arr,arr+n);
    for(int i=0;i<n;i++){
        if(i==0){
            if(arr[i]+k-arr[n-1] > p.s-p.f){
                p.f=arr[n-1];
                p.s=arr[i]+k;
                pos=n-1;
            }
            continue;
        }
        if(arr[i]-arr[i-1] > p.s-p.f){
            p.f=arr[i-1];
            p.s=arr[i];
            pos=i-1;
        }
    }
    for(int i=pos;i>0;i--){
       cont+=arr[i]-arr[i-1];
       marc++;
    }
    if(marc<n-1){
        for(int i=n-1;i>pos && marc<n-1;i--){
            if(i==n-1) {
              cont+=arr[0]+k-arr[i];
              marc++;
            }
            if(marc<n-1) {
                cont+=arr[i]-arr[i-1];
                marc++;
            }
        }
    }
    cout<<cont;
}


Measured memory_bytes: 1024
#include <bits/stdc++.h>
#define FOR(i, begin, end) for(int i=(begin);i<(end);i++)
#define REP(i, n) FOR(i,0,n)
#define IFOR(i, begin, end) for(int i=(end)-1;i>=(begin);i--)
#define IREP(i, n) IFOR(i,0,n)
#define SORT(a) sort(a.begin(), a.end())
#define REVERSE(a) reverse(a.begin(), a.end())
#define Lower_bound(v, x) distance(v.begin(), lower_bound(v.begin(), v.end(), x))
#define Upper_bound(v, x) distance(v.begin(), upper_bound(v.begin(), v.end(), x))
#define int long long
#define INF 1000000000000000000
using namespace std;

typedef vector<int> vec;
typedef vector<vec> mat;
typedef pair<int, int> Pii;

template<typename T>
void readvec(vector<T> &a);
void readindex(vector<int> &a);



signed main(){

    int N; cin >> N;
    vec a(3 * N); readvec(a);
    SORT(a);
    int ans = 0;
    REP(i, N) ans += a[3 * N - 2 - 2 * i];
    cout << ans;
    
    return 0;
}


template<typename T>
void readvec(vector<T> &a){
    REP(i, a.size()){
        cin >> a[i];
    }
}
void readindex(vector<int> &a){
    REP(i, a.size()){
        cin >> a[i];
        a[i]--;
    }
}

Measured memory_bytes: 2560
#pragma GCC optimize(2)
#include <bits/stdc++.h>
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define debug  freopen("in.txt","r",stdin),freopen("out.txt","w",stdout);
#define pb push_back
#define all(x) x.begin(),x.end()
#define fs first
#define sc second
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
const int maxn = 1e6+10;
const int maxM = 1e6+10;
const int inf = 0x3f3f3f3f;
const ll inf2 = 0x3f3f3f3f3f3f3f3f;
const int mod = 1000000007;
template<class T>void read(T &x){
    T s=0,w=1;
    char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=getchar();}
    while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar();
    x = s*w;
}
template<class H, class... T> void read(H& h, T&... t) {
    read(h);
    read(t...);
}

ll N;
void solve(){
	if(N <= 1) printf("%d\n",0);
	else{
		ll ans = 1;
		for(int i =1;i<=N;i++){
			ans = (ans *10)%mod;
		}
		ll not0 = 1;
		for(int i =1 ;i<=N;i++){
			not0 = (not0 * 9)%mod;
		}
		ll not9 = 1;
		for(int i =1 ;i<=N;i++){
			not9 = (not9 * 9) %mod;
		}
		ll not09 = 1;
		for(int i = 1;i<=N;i++) not09 = (not09 * 8)%mod;
		ll res = (ans - not0 - not9 + not09 + 2 * mod)%mod;
		printf("%lld\n",res);
	}
}	
int main(){
	// debug;
	
	read(N);
	solve();
	

	
	return 0;
}


Measured memory_bytes: 3664