akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> P;
typedef pair<int,int> Pi;
#define rep(i,n) for(ll i=0;i<n;i++)
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define fi first
#define se second
#define endl "\n"

template<typename T> inline bool chmax(T &a, T b){if(a<b){a=b;return true;}return false;}
template<typename T> inline bool chmin(T &a, T b){if(a>b){a=b;return true;}return false;}
template<typename T> ostream& operator<<(ostream& s,const complex<T>& d) {return s<<"("<<d.real()<<", "<<d.imag()<< ")";}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const pair<T1,T2>& d) {return s<<"("<<d.first<<", "<<d.second<<")";}
template<typename T> ostream& operator<<(ostream& s, const vector<T>& d){int len=d.size();rep(i,len){s<<d[i];if(i<len-1) s<<" ";}return s;}
template<typename T> ostream& operator<<(ostream& s,const vector<vector<T>>& d){int len=d.size();rep(i,len){s<<d[i]<<endl;}return s;}
template<typename T> ostream& operator<<(ostream& s,const set<T>& v){s<<"{ ";for(auto itr=v.begin();itr!=v.end();++itr) {if (itr!=v.begin()) {s<< ", ";}s<<(*itr);}s<<" }";return s;}
template<typename T> ostream& operator<<(ostream& s,const multiset<T>& v){s<<"{ ";for(auto itr=v.begin();itr!=v.end();++itr) {if (itr!=v.begin()) {s<< ", ";}s<<(*itr);}s<<" }";return s;}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const map<T1,T2>& m){s<<"{"<<endl;for(auto itr=m.begin();itr!=m.end();++itr){s<<" "<<(*itr).first<<" : "<<(*itr).second<<endl;}s<<"}"<<endl;return s;}

const ll mod=1'000'000'007;
const ll inf=1'000'000'000'000'000'00;
const int INF=1'000'000'000;
const double EPS=1e-10;
const double PI=acos(-1);

int main(){
    cin.tie(0);ios::sync_with_stdio(false);
    ll n;
    cin>>n;
    if(n==3){
        cout<<2<<' '<<5<<' '<<63<<endl;
        return 0;
    }
    vector<ll> ans;
    if(n>=15001){
        for(ll i=2;i<=30000;i+=2){
            ans.push_back(i);
        }
        n-=15000;
        if(n%2){
            ans.pop_back();
            n++;
        }
        rep(i,n){
            ans.push_back(3+6*i);
        }
    }else{
        rep(i,n-2){
            ans.push_back(2*(i+1));
        }
        if(n%3){
            ans.push_back(3);
            ans.push_back(9);
        }else{
            ans.pop_back();
            ans.pop_back();
            ans.push_back(3);
            ans.push_back(9);
            ans.push_back(15);
            ans.push_back(21);
        }
    }
    cout<<ans<<endl;
}

Measured memory_bytes: 3780
#include<bits/stdc++.h>
#pragma GCC optimize("O999")
#define long long ll
const int INF = 0x3f3f3f3f;
int maxn=5000005;
using namespace std;
int main()
{
 	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	ios::sync_with_stdio(0);
    int n;
    cin>>n;
    cout<<n*n*n;
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll          long long int
#define uu          first
#define vv          second
#define pii         pair<int,int>
#define pll         pair<ll,ll>
#define INF         1e9
#define fastRead    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
using namespace std;

const int MAX = 1e6 + 6;
const ll MOD = 1e9 + 7;

ll n, kk;
ll dp1[70][70][70], dp2[70][70];

ll dfs(int now, int id) {
    
    if(id == -1) return 1;
    if( (kk & (1LL<<id)) == 0 ) return dfs(now, id-1);
    
    ll &ret = dp2[now][id];
    if(ret != -1)  return ret;
    
    ret = 0;
    for(int i = 1; i <=n ; i++ ) {
        ll tmp = (dp1[now][i][id] * dfs(i, id-1) )%MOD;
        ret = (ret + tmp)%MOD;
    }
    return ret;
}

int main()
{
    fastRead;
    cin>>n>>kk;
    for(int i =1 ; i <=n ; i++ ) {
        for(int j =1 ; j <=n ; j++) {
            cin>>dp1[i][j][0];
        }
    }
    
    for(int i = 1 ; i <= 63; i++  ) {
        
        for(int j = 1; j <=n ; j++ ) {
            for(int k = 1; k <= n; k++) {
                for(int l = 1 ; l <=n ; l++ ) {
                    ll tmp = (dp1[j][l][i-1] * dp1[l][k][i-1]);
                    dp1[j][k][i] = (dp1[j][k][i] + tmp) % MOD;
                }
            }
        }
    }
    
//    for(int i = 1; i <=n ; i++ ) dp2[i][0] = 1;
    
//    for(int i =1 ; i <=n ; i++ ) {
//        for(int j= 1 ; j <=n ; j++ ) {
//            dp2[i][0] += dp1[i][j][0];
//        }
////        cout<<1<<" "<<i<<" -- "<<dp2[i][0]<<'\n';
//        if(dp2[i][0] && kk%2 ==0) dp2[i][0] = 1;
//    }
//    
//    for(int i = 0; i <= 63; i++ ) {
//        for(int j =1 ; j <=n ; j++ ) {
//            
//            if( i  && (kk & (1LL<<i ) ) == 0 ) {
//                dp2[j][i] = dp2[j][i-1];
//                continue;
//            }
//            for(int k = 1 ; k <=n ; k++ ) {
//                ll tmp  = dp1[j][k][i] ;
//                if(i) tmp = (tmp * dp2[k][i-1])%MOD;
//                dp2[j][i] = (dp2[j][i] + tmp) % MOD;
//            }
//            cout<<(1LL<<i)<<" "<<j<<" -- "<<dp2[j][i]<<'\n';
//        }
//    }
//
//    
    
//    ll ans = 0;
//    for(int i =1; i <=n ; i++ ) {
//        ans = (ans + dp2[i][63] )%MOD;
//    }

    memset(dp2, -1 , sizeof dp2);
    ll ans = 0;
    for(int i =1; i <=n ; i++ ) {
        ans = (ans + dfs(i, 63) )%MOD;
    }
    cout<<ans<<'\n';
    return 0;
    
}

Measured memory_bytes: 5264
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <math.h>
#include <iomanip>
using namespace std;
#define int long long
#define pie 3.141592653589793238462643383279
int gcd(int x, int y) {
	if (y == 0)return x;
	return gcd(y, x%y);
}
int lcm(int x, int y) {
	return x / gcd(x, y)*y;
}

int n, mu = 1;
vector<int> ta = {};

signed main() {
	cin >> n;
	ta.push_back(n);
	while (1) {
		mu++;
		if (n % 2 == 0)n /= 2;
		else n = n * 3 + 1;
		for (int i = 0; i < ta.size(); i++) {
			if (ta[i] == n) {
				cout << mu << endl;
				return 0;
			}
		}
		ta.push_back(n);
	}
	getchar(); getchar();
	return 0;
}

Measured memory_bytes: 256
from collections import Counter

N = int(input())
ss = []
for i in range(N):
  ss.append(input())

c = Counter(ss)

max_count = max(c.values())

out_k = []
for k, v in c.items():
  if v == max_count:
    out_k.append(k)
out_k.sort()
for k in out_k:
  print(k)

Measured memory_bytes: 35572
// A - Frog 1
#include <bits/stdc++.h>
using namespace std;
#define chmin(x,y) x=min(x,y)

int main(){
	int N; cin>>N;
	vector<int> H(N), dp(N);
	for(int i=0; i<N; ++i) cin>>H[i];

	// for(auto x:H)printf("%3d ",x);///
	// puts("");//
	// puts("---");//

	dp[0] = 0;

	for(int i=1; i<=N-1; ++i){

		dp[i] = dp[i-1] + abs(H[i] - H[i-1]);

		if(0 <= i-2)
			dp[i] = min(
				dp[i],
				// dp[i-1] + abs(H[i] - H[i-1]),
				dp[i-2] + abs(H[i] - H[i-2])
				);

		// for(auto x:dp)printf("%3d ",x);///
		// puts("");//

	}

	cout<< dp[N-1] <<endl;
}


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

using namespace std;

typedef long long ll;

int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; ++i) {
    cin >> A[i];
    A[i] -= (i + 1);
  }
  sort(A.begin(), A.end());
  int med;
  if (N % 2 == 1) med = A[N / 2];
  else med = (A[N / 2 - 1] + A[N / 2]) / 2;
  ll res = 1e18;
  for (int i = -1; i <= 1; ++i) {
    ll sum = 0;
    for (int j = 0; j < N; ++j) sum += abs(A[j] - med - i);
    res = min(res, sum);
  }
  cout << res << endl;
}

Measured memory_bytes: 1024
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int , int> i_i;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> vvl;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvec;
typedef vector<vector<bool>> vveb;
typedef vector<vector<string>> vves;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define rep2(i,n) for(int i=2;i<(int)(n);i++)
#define repk(i,k,n) for(int i=k;i<(int)(n);i++)
#define fs first
#define sc second
#define pb push_back
#define pp pop_back
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define maxel(a) *max_element(all(a))
#define minel(a) *min_element(all(a))
#define acc accumulate
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define mod (1000000007)
typedef long long int64;
//const int64 INF = 1LL << 58;
#define dame { puts("-1"); return 0;}
#define YES { cout << "YES" << endl; return 0; }
#define NO { cout << "NO" << endl; return 0; }
#define Yes { cout << "Yes" << endl; return 0; }
#define No { cout << "No" << endl; return 0; }
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};

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

	int N; cin >> N;
	string S; cin >> S;
	int ans = 0;
	rep(i,N-2) {
		if(S[i] == 'A' and S[i+1] == 'B' and S[i+2] == 'C') ans++;
	}
	cout << ans << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);++i)
#define reps(i,s,n) for(int i=(s); i<(n); i++)
using namespace std;
using ll=long long;
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(){
    ll a,b,c,d,maxx;
    cin>>a>>b>>c>>d;

    if(b==0 && d==0){
        cout<<a*c<<endl;
        return 0;
    }
    if(a<0 && b>0 && c<0 && d>0){
        maxx=max(a*c,b*d);
        cout<<maxx<<endl;
        return 0;
    }
    if(a<0 && b<0 && c<0 && d>0){
        maxx=max(a*c,b*c);
        cout<<maxx<<endl;
        return 0;
    }
    if(a<0 && b>0 && c<0 && d<0){
        maxx=max(a*d,a*c);
        cout<<maxx<<endl;
        return 0;
    }
    else if(b>0 && d>0){
        cout<<b*d<<endl;
        return 0;
    }
    else if(b>0 && d<0){
        cout<<a*d<<endl;
        return 0;
    }
    else if(b<0 && d>0){
        cout<<b*c<<endl;
        return 0;
    }
    else{
        cout<<a*c<<endl;
        return 0;
    }
}

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

#include <iostream>
//#include <algorithm>
// #include <iomanip>
#define ll long long
#define map unordered_map
#define set unordered_set
#define l_l pair<ll, ll>
#define vll vector<ll>
#define mll map<ll, ll>

using namespace std;

const ll MOD = 1000000007LL;
const ll INF = (1LL << 60LL);

int main() {
  // std::cout << std::fixed << std::setprecision(10);
  ll N, K;
  scanf("%lld %lld", &N, &K);

  string str;
  cin >> str;

  ll h = 0;
  for (ll i = 0; i < str.size() - 1; i++) {
    if (str[i] == 'R' && str[i + 1] == 'R') {
      h++;
    }
  }

  for (ll i = str.size() - 1; i >= 0; i--) {
    if (str[i] == 'L' && str[i + 1] == 'L') {
      h++;
    }
  }

  h += K * 2;
  if (h > N - 1) {
    h = N - 1;
  }

  cout << (h) << endl;
}


Measured memory_bytes: 3804
<?php

$w = strtolower(trim(fgets(STDIN))); //英単語W。
$cnt = 0; //回数の変数を初期化。

while (true) {
    $strT = trim(fgets(STDIN)); //文字列T。
    if ($strT === "END_OF_TEXT") break;
    $array = explode(" ", $strT);
    foreach ($array as $T) {
        if ($w === strtolower($T)) $cnt++;
    }
}
echo $cnt . "\n";


Measured memory_bytes: 9232
#include<bits/stdc++.h>
using namespace std;
int main(){
    long long n;
    cin>>n;
    long long a=sqrt(n);
    while(n%a)a--;
    a=n/a;
    int d=0;
    while(a){
        d++;
        a/=10;
    }
    cout<<d<<endl;
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <ctime>
#include <cstdlib>
#define rep(i, N) for (int i = 0; i < (N); i++)
#define swap(a, b) (a += b, b = a - b, a -= b)
using namespace std;
int main()
{
    long long  N;
    cin >> N;
    long long  power = 1;
    for (long long i = 1; i <= N; i++)
    {
    power*=i;
    power%=1000000000+7;
    }
    cout << power << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define fastio     ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define debug(x)   cerr<<#x<<": "<<x<<endl;
#define all(x)     (x).begin() , (x).end()
#define rep(i,a,b) for(int i=a;i<b;i++)
#define endl       '\n'
#define MAX        1000000
typedef long long int ll;
using namespace std;

const ll mod = 1e9+7;





void solve(){
    ll n;
    cin>>n;
    ll ans=0;
    for(ll i=1;i<=n;i++)
        if(i%3!=0 && i%5!=0)ans+=(ll)i;
    cout<<ans;
}





int main(){
    fastio
    int test=1;
    while(test--)
        solve();
    return 0;
}


Measured memory_bytes: 3616
#include <stdio.h>

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

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

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

typedef long long ll;
typedef int64_t i6;

#define rep(i, n) for (ll i = 0; i < n; ++i)
#define Sort(x) sort(x.begin(), x.end())
#define Sort_rev(x) sort(x.begin(), x.end(), greater<int>())
#define ALL(v) (v).begin(), (v).end()

//π M_PI
//deg = rad*180/M_PI

int main() {
    string S;
    cin >> S;
    int ans = 0;
    rep(i, S.length()/2) {
        if ( S[i] != S[S.length()-i-1]) {
            ans++;
        }
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 256
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
# def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a=I()
  return a+(a*a)+(a*a*a)

# main()
print(main())


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

#define LOG(variable) cout << #variable":\t" << (variable) << endl
#define LOGCON(i, container) for(int (i) = 0; (i) < (container).size(); ++(i)) cout << (i) << ":\t" << (container)[(i)] << endl
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPS(i, r, n) for (int i = (r); i < (n); ++i)
#define REPR(i, n) for(int i = (n); i >= 0; --i) // from n to 0
#define REPRS(i, n, r) for(int i = (n); i >= (r); --i) // from n to r
#define REPOBJ(itr, obj) for(auto itr = (obj).begin(); itr != (obj).end() ; ++itr)
#define REPROBJ(itr, obj) for(auto itr = (obj).rbegin(), e = (obj).rend(); itr != e; ++itr)
#define COUTB(x) cout << (x) << "\n"
#define COUTS(x) cout << (x) << " "
#define PB push_back
#define SORT(obj) sort((obj).begin(), (obj).end())
#define SORTR(obj) sort((obj).begin(), (obj).end(), greater<>())
#define ALL(obj) (obj).begin(), (obj).end()
#define MOD 1000000007
#define PI (acos(-1))
vector<int> next_to[200005];
vector<int> ans;
int in() {int x; cin>>x; return x;}
string stin() {string s; cin>>s; return s;}
void dfs(int current, int from=-1) {
  for(auto& next : next_to[current]) {
    if(next == from) continue;
    ans[next] += ans[current];
    dfs(next, current);
  }
}
/***** MAIN *****/
signed main() {
  int n = in();
  int q = in();
  ans.reserve(n);
  REP(i,n-1) {
    int edge_a = in();
    int edge_b = in();
    --edge_a; --edge_b; // 0-index
    next_to[edge_a].PB(edge_b);
    next_to[edge_b].PB(edge_a);
  }
  REP(i,q) {
    int edge = in();
    int num = in();
    --edge;
    ans[edge] += num;
  }
  dfs(0);
  for(int i = 0; i < n; ++i) {
    cout << ans[i];
    if(i < n-1) cout << " ";
  }
  cout << "\n";
  return 0;
}
/***** MAIN *****/


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

using namespace std;

int main()
{
    int n, i, j, a, b, l, cnt = 1;

    string s;

    cin >> n;
    cout.precision(10);
    if(n%2 == 0)
        cout << (double)(n/2)/n << endl;
    else
        cout << (double)((n/2)+1)/n << endl;

    return 0;
}


Measured memory_bytes: 256
/**
 * neb, sw=8, ts=8
 */

#include <iostream>
#include <vector>
#include <algorithm>

typedef long long ll;
typedef unsigned long long ul;
typedef unsigned int ui;

using std::cout;	using std::cin;
using std::endl;

template<typename T>
inline T max(const T &x, const T &y) { if (x > y) return x; else return y; }

template<typename T>
inline T min(const T &x, const T &y) { if (x < y) return x; else return y; }

template<typename T>
inline void print_vec(const std::vector<T> &a) { for (auto i: a) { std::cout << i << " "; } std::cout << std::endl; }

int main()
{
	ul r, d, x;
	cin >> r >> d >> x;

	ul sum = x;
	for (int i = 1; i <= 10; ++i)
	{
		sum = sum * r - d;
		cout << sum << endl;
	}
}


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

int N, A[20], Q;

bool fn(int n, int q)
{
	if(q == 0)
	{
		return true;
	}
	
	if(q < 0)
	{
		return false;
	}
	
	for(int i = n; i < N; ++i)
	{
		if(fn(i + 1, q - A[i]))
		{
			return true;
		}
	}
	
	return false;
}

int main()
{
	cin >> N;
	for(int i = 0; i < N; ++i)
	{
		cin >> A[i];
	}
	
	int QT;
	cin >> QT;
	for(int i = 0; i < QT; ++i)
	{
		cin >> Q;
		cout << (fn(0, Q) ? "yes" : "no") << endl;
	} 

    return 0;
}



Measured memory_bytes: 3104
#include <bits/stdc++.h>
using namespace std;
#define GET_MACRO(_1, _2, _3, NAME, ...) NAME
#define _repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define _rep(i,n) _repl(i,0,n)
#define rep(...) GET_MACRO(__VA_ARGS__, _repl, _rep)(__VA_ARGS__)
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back((a))
#define all(x) (x).begin(),(x).end()
#define uniq(x) sort(all(x)),(x).erase(unique(all(x)),end(x))
#define fi first
#define se second
#define dbg(...) _dbg(#__VA_ARGS__, __VA_ARGS__)
void _dbg(string){cout<<endl;}
template<class H,class... T> void _dbg(string s,H h,T... t){int l=s.find(',');cout<<s.substr(0,l)<<" = "<<h<<", ";_dbg(s.substr(l+1),t...);}
template<class T,class U> ostream& operator<<(ostream &o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;}
template<class T> ostream& operator<<(ostream &o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;}

#define INF 1120000000
#define long long long // for codeforces

int main(){
  int n; long k;
  cin>>n>>k;

  vector<long> w(n), d(n);
  rep(i,n) cin>>w[i]>>d[i];

  long l = 0, r = LLONG_MAX/3;
  // l の位置はk未満, rがk以上
  while(r-l>1){
    long m = (r-l)/2+l;
    long cnt = 0;
    rep(i,n) if(w[i]<=m){
      cnt += (m-w[i]+d[i])/d[i];
    }
    // dbg(l,r,m,cnt);
    if(cnt >= k) r = m;
    else l = m;
  }

  cout << r << endl;

  return 0;
}


Measured memory_bytes: 1792
using System;
using System.Linq;

class Program
{
    static void Main(string[] args)
    {
        double n = int.Parse(Console.ReadLine());

        int count = 0;
        for (int i = 1; i <= n; i++)
        {
            if (i % 2 != 0)
            {
                count++;
            }
        }
        Console.WriteLine((double)count / n);
    }
}


Measured memory_bytes: 11092
n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))

count = 0
pre = -1
for i in range(n):
    count += b[a[i]-1]
    if a[i] == pre+1:
        count += c[pre-1]
    pre = a[i]
print(count)


Measured memory_bytes: 3064
#include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstring>
#define rep(i, s, g) for (i = s; i <= g; i++)
using namespace std;
using ll = long long;
const ll MOD = 1e9 + 7;

int N, K;

int main()
{
    int i, j, k;
    vector<int> dp(200010, -1);
    int a[105];
    int MIN = 9999999;
    int n;

    cin >> N >> K;

    rep(i, 0, N - 1)
    {
        cin >> a[i];
    }

    rep(i, 0, K)
    {
        rep(j, 0, N - 1)
        {
            if (dp[i] == -1)
            {
                dp[i + a[j]] = 1;
            }
        }
    }

    if (dp[K] == -1)
    {
        cout << "Second" << endl;
    }
    else
    {
        cout << "First" << endl;
    }
}

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

#define REP(i, n) for(int (i) = 0; (i) < (n); ++(i))
#define REPR(i, n) for(int (i) = (n); (i) >= 0; --(i))
#define FOR(i, n, m) for(int (i) = (n); (i) < (m); ++(i))

constexpr int INF = 1e9;
// constexpr ll INF = 1LL<<61;
constexpr ll mod = 1e9+7;


int main(){
  int L, R, d;
  cin >> L >> R >> d;
  cout << R / d - (L-1) / d << endl;
  return 0;
}

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

int main() {
	
	int n;
	scanf("%d", &n);

	if (n == 1) {
		printf("1\n");
	}
	else if (2 <= n && n <= 3) {
		printf("2\n");
	}
	else if (4 <= n && n <= 7) {
		printf("4\n");
	}
	else if (8 <= n && n <= 15) {
		printf("8\n");
	}
	else if (16 <= n && n <= 31) {
		printf("16\n");
	}
	else if (32 <= n && n <= 63) {
		printf("32\n");
	}
	else{
		printf("64\n");
	}


	return 0;
}


Measured memory_bytes: 128
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int n = sc.nextInt();
		
		// 計算
		int result = 0;
		for(int i = 0; i <= n; i++){
		    if(i*i > n) break;
		    result = i*i;
		}
		
		// 出力
		System.out.println(result);
	}
}



Measured memory_bytes: 21844
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _0005
{
    public class Program

    {
        public static void Main(string[] a6mnbrgs)
        {
            while (true)
            {
                string line = ReadSt();
                if (line == null) break;

                int[] items = Array.ConvertAll(line.Split(' '), e => int.Parse(e));
                Console.WriteLine("{0} {1}", Gcd(items[0], items[1]), Lcm(items[0], items[1]));
            }
           
        }

        /// <summary>
        ///最小公倍数
        /// </summary>
        public static long Lcm(long a, long b)
        {
            return a / Gcd(a, b) * b;
        }

        /// <summary>
        ///最大公約数
        /// </summary>
        public static long Gcd(long a, long b)
        {
            if (a < b) return Gcd(b, a);  // 引数を入替えて自分を呼び出す
            if (b == 0) return a; //一方が0の場合は、もう片方の数自身がGCD

            long d = 0;
            do
            {
                d = a % b;
                a = b;
                b = d;
            } while (d != 0);
            return a;
        }

        static string ReadSt() { return Console.ReadLine(); }
        static int ReadInt() { return int.Parse(Console.ReadLine()); }
        static long ReadLong() { return long.Parse(Console.ReadLine()); }
        static double ReadDouble() { return double.Parse(Console.ReadLine()); }
        static string[] ReadStAr(char sep = ' ') { return Console.ReadLine().Split(sep); }
        static int[] ReadIntAr(char sep = ' ') { return Array.ConvertAll(Console.ReadLine().Split(sep), e => int.Parse(e)); }
        static long[] ReadLongAr(char sep = ' ') { return Array.ConvertAll(Console.ReadLine().Split(sep), e => long.Parse(e)); }
        static double[] ReadDoubleAr(char sep = ' ') { return Array.ConvertAll(Console.ReadLine().Split(sep), e => double.Parse(e)); }
        static string WriteAr(int[] array, string sep = " ") { return String.Join(sep, array.Select(x => x.ToString()).ToArray()); }
        static string WriteAr(double[] array, string sep = " ") { return String.Join(sep, array.Select(x => x.ToString()).ToArray()); }
        static string WriteAr(long[] array, string sep = " ") { return String.Join(sep, array.Select(x => x.ToString()).ToArray()); }

    }

}



Measured memory_bytes: 13852
//Keep pluggin',this is your only outlet.
#include<bits/stdc++.h>
#define max(x,y) (x>y?x:y)
#define min(x,y) (x<y?x:y)
#define MM(x,y) memset(x,y,sizeof(x))
#define MCPY(a,b) memcpy(a,b,sizeof(b))
#define mp make_pair
#define pb push_back
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define per(i,b,a) for(int i=b;i>=a;i--)
#define fi first
#define se second
#define int long long
using namespace std;

inline int quickpow(int m,int n,int p){int b=1;while(n){if(n&1)b=b*m%p;n=n>>1;m=m*m%p;}return b;}
inline int getinv(int x,int p){return quickpow(x,p-2,p);}
inline int read(void){
	int x=0,f=1;char ch=getchar();
	while(!isdigit(ch)){f=ch=='-'?-1:1;ch=getchar();}
	while(isdigit(ch)){x=(x<<3)+(x<<1)+ch-'0';ch=getchar();}
	return x * f;
}
int n,a[101],x,ans = 0;
///------------------head------------------
signed main(signed argc, char *argv[]){
    n = read(); x = read();
    rep(i,1,n) a[i] = read();
    sort(a+1,a+n+1);
    rep(i,1,n - 1) if (x >= a[i]) x -= a[i],++ans;
    if (x == a[n]) ++ans;
    printf("%lld\n",ans);
	return 0;
}

/* Examples: */
/*

*/

/*

*/


Measured memory_bytes: 384
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <functional>
#include <numeric>
#include <math.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(void) {
	int tmp,ans;
	for (int i = 1; i < 6; i++) {
		cin >> tmp;
		if (tmp == 0) ans = i;
	}
	cout << ans << endl;
	return 0;
}

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

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

int main() {
  int n;
  cin >> n;
  vector<int>a(n);
  rep(i,n) cin >> a[i];
  ll x=1000;
  rep(i,n-1){
    int s=a[i];
    int t=a[i+1];
    if(s<t){
      ll k=x/s;
      x%=s;
      x+=k*t;
    }
  }
  cout << x << endl;
  return 0;

}


Measured memory_bytes: 3624
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cctype>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <functional>
#include <bits/stdc++.h>
#include <stdio.h>
#include <string.h>
using namespace std;
#define DEBUG(x) cout << '>' << #x << ':' << x << endl;
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define FORD(i,a,b) for(int i=(a);i>(b);i--)
typedef long long ll;
const ll mod =1e9 +7;

int main(){
    int n;
    cin>>n;
    vector<int> arr(n);
    ll sum=0;
    FOR(i,0,n){
        cin>>arr[i];
        sum=(sum+arr[i])%mod;
    }
    
    vector<ll> suff(n);
    ll d=0;

    ll ans=0;
    FOR(i,0,n){
        d=(d+arr[i])%mod;
        suff[i]=(sum-d)%mod;
        if(suff[i]<0) suff[i]=(suff[i]+mod)%mod;
        ans=(ans+(arr[i]%mod*suff[i]%mod)%mod)%mod;
    }
    cout<<ans<<endl;


    return 0;
}


Measured memory_bytes: 5628
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <numeric>

using namespace std;

int main(){
    int h,w;

    cin >> h >> w;
    
    vector<vector<int>> a(h,vector<int>(w,0));
    queue<vector<int>> que;

    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++){
            char tmp;
            cin >> tmp;
            if(tmp=='.'){
                a[i][j]=-1;
            }else{
                que.push({i,j});
            }
        }
    }

    vector<int> x = {1,-1,0,0};
    vector<int> y = {0,0,1,-1};

    while(!que.empty()){
        auto now = que.front();
        que.pop();

        for(int k=0; k<4; k++){
            if(now[0]+x[k]<0 || now[0]+x[k]>h-1 || now[1]+y[k]<0 || now[1]+y[k]>w-1) continue;

            if(a[now[0]+x[k]][now[1]+y[k]]==-1){
                a[now[0]+x[k]][now[1]+y[k]]=a[now[0]][now[1]]+1;
                que.push({now[0]+x[k],now[1]+y[k]});
            }
        }
    }

    int num=-1;
    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++){
            num=max(num,a[i][j]);
        }
    }

    cout << num << endl;
    return 0;
}

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

int main(){
    int n;
    cin>>n;
    vector<double> dp(n+1);
    dp[0]=1;
    for(int i=0;i<n;i++){
        double x;
        cin>>x;
        for(int j=i+1;j>=0;j--){
            dp[j]=(j==0? 0: dp[j-1]*x) + dp[j]*(1-x);
        }
    }
    double ans=0;
    for(int i=0;i<=n;i++){
        int t=n-i;
        if(i>t){
            ans+=dp[i];
        }
    }
    cout<<setprecision(15)<<fixed<<ans<<endl;
}

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

int main()
{
    bool ok = true;
    string s;
    cin >> s;
    for(int i = 0; i != (int)s.size(); ++i)
    {
        if(i & 1)
        {
            if(s[i] == 'R')
            {
                ok = false;
            }
        }
        else
        {
            if(s[i] == 'L')
            {
                ok = false;
            }
        }
    }
    cout << (ok ? "Yes\n" : "No\n");
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int freq[55];
int main() {
  int n, m; cin >> n >> m;
  for (int i = 0; i < m; i++) {
    int a, b; cin >> a >> b;
    freq[a]++, freq[b]++;
  }
  for (int i = 1; i <= n; i++) {
    cout << freq[i] << endl;
  }
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++)
#define VL vector<ll>
#define VS vector<string>
#define VB vector<bool>
#define VP vector<pair<ll,ll>>
#define VVL vector<vector<ll>>
#define VVP vector<vector<pair<ll,ll>>>
#define PL pair<ll,ll>
#define ALL(v) (v).begin(), (v).end()
ll d1[4] = {1, -1, 0, 0};
ll d2[4] = {0, 0, 1, -1};

int main(){
  ll n, m, c;
  cin >> n >> m >> c;
  ll ans = 0;
  VL b(m);
  rep(i, 0, m) cin >> b[i];
  rep(i, 0, n){
    ll cur = c;
    rep(j, 0, m){
      ll a;
      cin >> a;
      cur += a * b[j];
    }
    if(cur > 0) ans++;
  }
  cout << ans << endl;
    return 0;
}


Measured memory_bytes: 3624
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep2(i, x, n) for (int i = x; i < (n); i++)
#define all(n) begin(n), end(n)
struct cww
{
    cww()
    {
        ios::sync_with_stdio(false);
        cin.tie(0);
    }
} star;
const long long INF = numeric_limits<long long>::max();
typedef long long ll;
typedef vector<int> vint;
typedef vector<char> vchar;
typedef vector<vector<int>> vvint;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;

int main()
{
    int N, M;
    bool flag = true, flag2 = false;
    cin >> N >> M;
    vector<string> A(N), B(M); //0-indexed

    rep(i, N)
    {
        cin >> A[i];
    }
    rep(j, M)
    {
        cin >> B[j];
    }
    for (int x = 0; x + M <= N;x++)
    {
        for (int y = 0; y + M <= N;y++)
        {
            flag = true;
            for (int i = x; i < x + M; i++)
            {
                for (int j = y; j < y + M;j++)
                {
                    if(A[i][j] != B[i-x][j-y])
                    {
                        flag = false;
                        goto L;
                    }
                }
            }
            L:
            if(flag)
                flag2 = true;
        }
    }
    if(flag2)
    {
        cout << "Yes";
    }
    else
        cout << "No";
    return 0;
}

Measured memory_bytes: 256
# AOJ 1044 CamelCase

def underscored(s)
  s.gsub(/([A-Z])/, '_\1').gsub(/_{2,}/, "_").sub(/^_/, "").downcase
end

def upper_camel_case(s)
  s = underscored(s)
  words = s.split("_").map {|word| word.capitalize}
  words.join("")
end

def lower_camel_case(s)
  s = underscored(s)
  words = s.split("_").map {|word| word.capitalize}
  words[0].downcase!
  words.join("")
end

ARGF.each_line do |line|
  line.chomp!
  name, type = line.split(" ")

  case type
  when "X"
    break
  when "U"
    puts upper_camel_case(name)
  when "L"
    puts lower_camel_case(name)
  when "D"
    puts underscored(name)
  end
end

Measured memory_bytes: 6112
#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define int long long
using namespace std;
typedef pair<int, int> P;
const int mod = 1000000007;
const int INF = 1e18;

signed main(){
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i, 0, n){
        cin >> a[i];
    }
    double sum = 0;
    rep(i, 0, n){
        sum += (double)1.0 / (double)a[i];
    }
    double ans = 1.0 / sum;
    printf("%.12f\n", ans);
}

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

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define FOR(i,n,m) for(int i=(int)(n); i<=(int)(m); i++)
#define RFOR(i,n,m) for(int i=(int)(n); i>=(int)(m); i--)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define RITR(x,c) for(__typeof(c.rbegin()) x=c.rbegin();x!=c.rend();x++)
#define setp(n) fixed << setprecision(n)

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

#define ll long long
#define vll vector<ll>
#define vi vector<int>
#define pll pair<ll,ll>
#define pi pair<int,int>

#define all(a) (a.begin()),(a.end())
#define rall(a) (a.rbegin()),(a.rend())
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define ins insert

using namespace std;

/* Some Libraries */

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

int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n; cin>>n;
    ll a,b; cin>>a>>b;
    ll d = a-b;
    vll h(n);
    rep(i,n) cin>>h[i];
    ll l=0, r=1e9;
    while(r-l>1){
        ll c = (l+r)/2;
        ll sum=0;
        rep(i,n){
            ll rest = h[i]-c*b;
            sum+=max(0ll,(rest+d-1)/d);
        }
        if (sum<=c){
            r = c;
        }else{
            l = c;
        }
    }
    cout<<r<<"\n";
    return 0;
}


Measured memory_bytes: 1024
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <cstdio>

using namespace std;

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

  auto   nd = div(a, b);
  double rd = static_cast<double>(a) / b;

  printf("%d %d %.5f\n", nd.quot, nd.rem, rd);
  fflush(stdout);
  return 0;
} 



Measured memory_bytes: 3224
#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <map>
#include <set>
using namespace std;
typedef long long ll;
#define rep(i,s,n)for(ll i = s;i<n;i++)
#define repe(i,s,n)for(ll i = s;i<=n;i++)

int main() {
	ll N; cin >> N;
	ll p = 0;
	for (int i = 1; i*i <= N; i++) {
		p = i * i;
	}
	cout << p << endl;

	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll; //int:2*10**9
typedef long double ld;
typedef pair<ll,ll> P;
#define REP(i,n) for(ll i = 0; i<(ll)(n); i++)
#define REPS(i,n) for (ll i = 1; i<=(ll)(n); i++)
#define REPD(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=(a);i<=(b);i++)
#define FORD(i,a,b) for(ll i=(a);i>=(b);i--)
#define vec2(name,i,j) vector<vector<ll>> name(i,vector<ll>(j))
#define vec2f(name,i,j,k) vector<vector<ll>> name(i,vector<ll>(j,k))
#define vec3(name,i,j,k) vector<vector<vector<ll>>> name(i,vector<vector<ll>>(j,vector<ll>(k)))
#define vec3f(name,i,j,k,l) vector<vector<vector<ll>>> name(i,vector<vector<ll>>(j,vector<ll>(k,l)))
#define vec4(name,i,j,k,l) vector<vector<vector<vector<ll>>>> name(i,vector<vector<vector<ll>>>(j,vector<vector<ll>>(k,vector<ll>(l))))
#define vec4f(name,i,j,k,l,m) vector<vector<vector<vector<ll>>>> name(i,vector<vector<vector<ll>>>(j,vector<vector<ll>>(k,vector<ll>(l,m))))
#define pb push_back
#define MOD 1000000007
#define MOD2 998244353
#define PI 3.141592653
#define INF 100000000000000 //14
//cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);

int main(){
    ll n; cin >> n;
    vector<ll> a(n);
    REP(i,n){
        cin >> a[i];
    }
    ll x = a[0];
    FOR(i,1,n-1) x = x^a[i];

    REP(i,n) {
        ll y = x^a[i];
        cout << y << " ";
    }
    cout << endl;
}

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

using namespace std;

typedef unsigned long long ull;


int main()
{
    int n,m,k;
    cin >> n >> m >> k;
    for(int i=0;i<=n;++i)
    {
        for(int j=0;j<=m;++j)
        {
            if(n*j+m*i-2*i*j == k)
            {
                cout <<"Yes";
                return 0;
            }
        }
    }
    cout << "No";

}


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

int main()
{
    int N;
    int sum = 0;
    int flag = 0;
    char S[11],T[11];


    cin >> S >> T;

    for (int i = 0; i < strlen(S); i++)
    {
        if (T[i] != S[i])
            flag = 1;
    }


    if (flag == 0) {
        printf("Yes");
    }
    else {
        printf("No");
    }

    return 0;
}

Measured memory_bytes: 3660
// 0205
#include <iostream>
using namespace std;

int main(){
	while(1){
		int j[5], rps[3] = {0};

		cin>>j[0];
		if(j[0] == 0)
			break;
		
		for(int i=1;i<5;i++)
			cin>>j[i];

		for(int i=0;i<5;i++)
			rps[j[i]-1]++;

		if((rps[0] != 0) && (rps[1] != 0) && (rps[2] != 0)){
			for(int i=0;i<5;i++)
				j[i] = 3;
		}else if((rps[0] == 5) || (rps[1] == 5) || (rps[2] == 5)){
			for(int i=0;i<5;i++)
				j[i] = 3;
		}else if(rps[0] == 0){
			for(int i=0;i<5;i++)
				if(j[i] == 2)
					j[i] = 1;
				else
					j[i] = 2;
		}else if(rps[1] == 0){
			for(int i=0;i<5;i++)
				if(j[i] == 3)
					j[i] = 1;
				else
					j[i] = 2;
		}

		for(int i=0;i<5;i++)
			cout<<j[i]<<endl;
	}

	return 0;
}

Measured memory_bytes: 1160
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {
	public static void main(String args[]) {

		FastScanner sc = new FastScanner();

		int a = sc.nextInt();
		int b = sc.nextInt();

		System.out.println((a >= 10 || b >= 10) ? -1 : a * b);
	}
}

class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

	private int readByte() {
		if (hasNextByte())
			return buffer[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
		return hasNextByte();
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
            }

	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}

Measured memory_bytes: 21204
#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
typedef double dd;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef pair<ll , ll> lli;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;
typedef vector<lli> vlli;
 
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define in insert
#define f0(b) for(int i=0;i<(b);i++)
#define f00(b) for(int j=0;j<(b);j++)
#define f1(b) for(int i=1;i<=(b);i++)
#define f11(b) for(int j=1;j<=(b);j++)
#define f2(a,b) for(int i=(a);i<=(b);i++)
#define f22(a,b) for(int j=(a);j<=(b);j++)
#define sf(a) scanf("%lld",&a)
#define sff(a,b) scanf("%lld %lld", &a , &b)
#define pf(a) printf("%lld\n",a)
#define pff(a,b) printf("%lld %lld\n", a , b)
#define PI 3.14159265359
#define bug printf("**!\n")
#define mem(a , b) memset(a, b ,sizeof(a))
#define front_zero(n) __builtin_clzll(n)
#define back_zero(n) __builtin_ctzll(n)
#define total_one(n) __builtin_popcountll(n)

const ll mod = (ll)1e9+7;
const ll maxn = (ll)2e5+5;
const int nnn = 1048590;
const int inf = numeric_limits<int>::max()-1;
//const ll INF = numeric_limits<ll>::max()-1;
const ll INF = 1e18;

ll dx[]={0,1,0,-1};
ll dy[]={1,0,-1,0};
ll dxx[]={0,1,0,-1,1,1,-1,-1};
ll dyy[]={1,0,-1,0,1,-1,1,-1};

ll bm(ll a , ll b){
	ll ans = 1;
	while(b){
		if(b&1) ans = (ans*a)%mod;
		a *= a;
		a %= mod;
		b /= 2;
	}
	return ans;
}

void solve(){
	ll n,k;
	cin >> n >> k;
	ll ans = 0;
	ll pre[k+5];
	mem(pre, 0);
	for(ll i = k; i >= 1; i--){
		ll res = (bm(k/i , n));
		ll res2 = 0;
		for(ll j = i; j <= k; j += i) res2 += pre[j] , res2 %= mod;
		ans += i*(res-res2 +mod)%mod;
		pre[i] = (res-res2+mod)%mod;
		ans %= mod;
		//cout << ans << '\n';
	}
	cout << ans;
	return;
}


int main() {
   
    ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
    ll T;
    T=1;
   // cin >> T;
    //scanf("%lld",&T);
    ll CT = 0;
    //work();
    while(T--){
    	//cout << "Case " << ++CT <<": " ;
    	//printf("Case %lld: ",++CT);
		solve();
	}
    
    return 0;
}


Measured memory_bytes: 4384
#include<stdio.h>
char a[10000][10000];
int main ()
{
	int h,w,i,j;
	
	scanf("%d%d",&h,&w);
	for(i=0;i<h;i++)
	{
		scanf("%s",&a[i]);
	}
	for(i=0;i<w+1;i++)
	{
		printf("#");
	}
	printf("#\n");
	for(i=0;i<h;i++)
	{
		printf("#");
		for(j=0;j<w;j++)
		{
			printf("%c",a[i][j]);
		}
		printf("#\n");
	}
	for(i=0;i<w+1;i++)
	{
		printf("#");
	}
	printf("#\n");
	return 0;
 } 

Measured memory_bytes: 512
#include <bits/stdc++.h>
using namespace std;
int main(){
    long long a, b, k;
    cin >> a >> b >> k;
    
    if (k < a) {
        cout << a - k << " " << b << endl;
    } else if ( (k - a) < b ) {
        cout << 0 << " " << b - (k - a) << endl;
    } else {
        cout << 0 << " " << 0 << endl;
    }
}

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

//#define int long long
struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);}} fast;

/* cpp template {{{ */

/* short */
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
#define X real()
#define Y imag()

/* REPmacro */
#define REPS(i, a, n) for (ll i = (a); i < (ll)(n); ++i)
#define rep(i, n) REPS(i, 0, n)
#define REP0(i,n) for (ll i = 0; i <= (ll)(n); ++i)
#define REP1(i,n) for (ll i = 1; i <= (ll)(n); ++i)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n) for (ll i = (a); i >= (ll)(n); --i)
#define DEP(i, n) DEPS(i, n, 0)
#define EACH(i, n) for (auto&& i : n)

/* debug */
#define debug(x) cerr << x << " " << "(L:" << __LINE__ << ")" << '\n';

/* alias */
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
using D = double;
using P = complex<D>;
using vs = vector<string>;
template <typename T> using PQ = priority_queue<T>;
template <typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>;

/* const */
const int INF = 1001001001;
const ll LINF = 1001001001001001001ll;
const int MOD = 1e9 + 7;
const D EPS = 1e-9;
const int dx[] = {0, 1, 0, -1, 1, -1, 1, -1}, dy[] = {1, 0, -1, 0, 1, -1, -1, 1};

/* func */
inline bool inside(int y, int x, int H, int W) {return y >= 0 && x >= 0 && y < H && x < W;}
inline int in() {int x; cin >> x; return x;}
inline ll IN() {ll x; cin >> x; return x;}
inline vs split(const string& t, char c) {vs v; stringstream s(t); string b; while(getline(s, b, c)) v.eb(b); return v;}
template <typename T> inline bool chmin(T& a, const T& b) {if (a > b) a = b; return a > b;}
template <typename T> inline bool chmax(T& a, const T& b) {if (a < b) a = b; return a < b;}
template <typename T, typename S> inline void print(const pair<T, S>& p) {cout << p.first << " " << p.second << endl;}
template <typename T> inline void print(const T& x) {cout << x << '\n';}
template <typename T, typename S> inline void print(const vector<pair<T, S>>& v) {for (auto&& p : v) print(p);}
template <typename T> inline void print(const vector<T>& v, string s = " ") {rep(i, v.size()) cout << v[i] << (i != (ll)v.size() - 1 ? s : "\n");}
template<typename T>
istream& operator >> (istream& is, vector<T>& vec){
  for(T& x: vec) is >> x;
  //for(int i=0; i<vec.size(); i++) is >> x[i]; とかでもいいです。
  return is;
}
template<typename T>
ostream& operator << (ostream& os, vector<T>& vec){
  for(int i=0; i<vec.size(); i++){
    os << vec[i] << ( i+1 == vec.size() ? "" : " " );
  }
  return os;
}
/* }}} */

signed main() 
{
  int x,a,b;
  cin >> x >> a >> b;
  (a*10+b)%4==0?print("YES"):print("NO");
  return 0;
}

Measured memory_bytes: 256
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);


		while(true){
			int a = sc.nextInt();
			String op = sc.next();
			int b = sc.nextInt();

			if(op.equals ("?")){
				break;
			}


		if ( op.equals ("+") ){
			 System.out.println(a + b);
			} else if ( op.equals ("-") ){
			 System.out.println(a - b);
			} else if ( op.equals ("*") ){
			 System.out.println(a * b);
			} else if ( op.equals ("/") ){
			 System.out.println(a / b);
			}
		}

	}
}

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

public static class Program
{
    public static void Main(string[] args)
    {
        var n = long.Parse(Console.ReadLine());
        var list = Enumerable.Range(0, 5).Select(x => long.Parse(Console.ReadLine())).ToList();
        Console.WriteLine(Math.Ceiling(((decimal)n / list.Min())) + 4);
    }
}

Measured memory_bytes: 13396
#include <bits/stdc++.h>
//#include <boost/multiprecision/cpp_int.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
#pragma GCC optimize("O3")
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define EPS (1e-9)
#define INF (1e17)
#define PI (acos(-1))
//const double PI = acos(-1);
//const double EPS = 1e-15;
//long long INF=(long long)1E17;
#define i_7 (long long)(1e9+7)
//#define i_7 998'244'353
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
long long po(long a, long b){
    if(b==0){
        return 1;
    }
    
    long long z = po(a,b/2);
    z = mod(z*z);
    if(b%2!=0){
        z = mod(a*z);
    }
    return z;
}

bool prime_(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=std::sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}

long long gcd_(long long a, long long b){
  if(a<b){
    std::swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd_(b,a%b);
  }
}
 
long long lcm_(long long x, long long y){
  return (x/gcd_(x,y))*y;
}

//using namespace std;
//using namespace boost::multiprecision;
//using namespace __gnu_pbds;

int main(){
  using namespace std;
  char c;
  cin>>c;
  c++;
  cout<<c<<endl;
  return 0;
}


Measured memory_bytes: 256
package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)

	ans := ""
	for n != 0 {
		if n%2 != 0 {
			n--
			ans = "1" + ans
		} else {
			ans = "0" + ans
		}
		n /= -2
	}
	if ans == "" {
		ans = "0"
	}
	fmt.Println(ans)
}

Measured memory_bytes: 512