akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define int long long
#define io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define rep(i,l,r) for(int i=l;i<r;i++)
#define bep(i,l,r) for(int i=l;i>=r;i--)
#define ff first
#define ss second
#define pii pair<int,int>
#define vi vector<int>
#define vii vector<pii>
#define el '\n'
#define sz(s) s.size()
#define all(v) v.begin(),v.end()
#define mii map<int,int>
#define mr  make_pair

int mod = 1e9+7;
int inf = 4e18;
const int N = 3e5+5;
int powmod(int a,int b) {int res=1;if(a>=mod)a%=mod;for(;b;b>>=1){if(b&1)res=res*a;if(res>=mod)res%=mod;a=a*a;if(a>=mod)a%=mod;}return res;}
int dp[N+10];
signed main()
{
    io
    int tt = 1;
    //cin>>tt;
    while(tt--)
    {
      int arr[] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51};
      int k;
      cin>>k;
      cout<<arr[k-1]<<el;




    }
    return 0;
}


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

class Procon {
  public Procon () { }
  static void Main (string[] agrs) {
    new Procon ().Do ();
  }

  Scanner cin;

  public void Do () {
    cin = new Scanner ();
    int N = cin.nextInt ();
    int M = cin.nextInt ();
    List<int[]> list = new List<int[]> ();

    for (int i = 0; i < N; i++) {
      int[] ab = cin.arrayInt ();
      list.Add (ab);
    }

    list.Sort ((a, b) => a[0] - b[0]);
    long ret = 0;
    int tmp = 0;
    for (int i = 0; i < M;) {
      for (int j = 0; j < list[tmp][1]; j++) {
        ret += list[tmp][0];
        i++;
        if (i == M) {
          break;
        }
      }
      tmp++;
    }

    Console.WriteLine (ret);
  }
}

class Scanner {
  string[] s;
  int i;
  int max_i;

  public Scanner () {
    s = new string[0];
    max_i = 0;
    i = 0;
  }

  public string nextString () {
    if (i >= s.Length) {
      s = Console.ReadLine ().Split (' ');
      max_i = s.Length;
      i = 0;
      if (max_i == 0) {
        return "";
      }
      return s[i++];
    } else {
      return s[i++];
    }
  }

  public int nextInt () {
    return int.Parse (nextString ());
  }

  public long nextLong () {
    return long.Parse (nextString ());
  }

  public double nextDouble () {
    return double.Parse (nextString ());
  }

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

  public int[] arrayInt () {
    string[] str = Console.ReadLine ().Split (' ');
    int[] array = new int[str.Length];
    for (int i = 0; i < str.Length; i++) {
      array[i] = int.Parse (str[i]);
    }
    return array;
  }

  public long[] arrayLong () {
    string[] str = Console.ReadLine ().Split (' ');
    long[] array = new long[str.Length];
    for (int i = 0; i < str.Length; i++) {
      array[i] = long.Parse (str[i]);
    }
    return array;
  }

  public double[] arrayDouble () {
    string[] str = Console.ReadLine ().Split (' ');
    double[] array = new double[str.Length];
    for (int i = 0; i < str.Length; i++) {
      array[i] = double.Parse (str[i]);
    }
    return array;
  }
}

Measured memory_bytes: 24012
#include <bits/stdc++.h>
#include <iomanip>
using namespace std;
#define reps(i,s,n) for(int i = s; i < n; i++)
#define rep(i,n) reps(i,0,n)
#define Rreps(i,n,e) for(int i = n - 1; i >= e; --i)
#define Rrep(i,n) Rreps(i,n,0)
#define ALL(a) a.begin(), a.end()
#define fi first
#define se second
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;

ll N,M,H,W,K,Q,A,B;
string S;
//const ll MOD = 998244353;
const ll MOD = (1e+9) + 7;
const ll INF = 1LL<<60;
typedef pair<ll, ll> P;

int main() {
    vec a(11, 0);
    rep(i,3) {
        cin>>A;
        ++a[A];
    }
    cout<<(a[5] == 2 && a[7] == 1 ? "YES" : "NO")<<endl;
}

Measured memory_bytes: 256
//#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <vector>
#include <map>
#include <queue>

using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<n;++i)
#define mod (ll)(1e9+7)
#define FIX(a) ((a)%mod+mod)%mod
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()
#define INF 1000000000 //1e9
#define LLINF 2000000000000000000LL //2e18
#define fi first
#define se second
#define pb push_back
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a,b;
    cin >> a >> b;
    if(a>=10||b>=10){
        cout << -1 << endl;
    }else{
        cout << a*b  << endl;
    }

    return 0;
}

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

using namespace std;


int main(int argc, char** argv) {
    int H;
    int W;
    int P = 20000;
    cin >> H >> W;
    vector< vector<int> > A(H, vector<int>(W, 0));
    vector< vector<int> > B(H, vector<int>(W, 0));

    for(int i = 0; i < H; i++) {
        for(int j = 0; j < W; j++) {
            cin >> A[i][j];
        }
    }

    for(int i = 0; i < H; i++) {
        for(int j = 0; j < W; j++) {
            cin >> B[i][j];
        }
    }

    vector< vector< vector<bool> > > D(H, vector< vector<bool> >(W, vector<bool>(P + 1, false)));

    for(int i = 0; i < H; i++) {
        for(int j = 0; j < W; j++) {
            for(int k = 0; k <= P; k++) {
                D[i][j][k] = false;
            }
        }
    }

    int t = abs(A[0][0] - B[0][0]);
    D[0][0][t] = true;
    for(int i = 0; i < H; i++) {
        for(int j = 0; j < W; j++) {
            for(int k = 0; k <= P; k++) {
                if ((j >= 1 && D[i][j - 1][k]) || (i >= 1 && D[i - 1][j][k])){
                    t = abs(k + A[i][j] - B[i][j]);
                    if (t <= P) {
                        D[i][j][t] = true;
                    }
                    t = abs(k - A[i][j] + B[i][j]);
                    if (t <= P) {
                        D[i][j][t] = true;
                    }
                }
            }
        }
    }

    int min_value = P;
    for(int k = 0; k <= P; k++) {
        if (D[H - 1][W - 1][k]) {
            min_value = k;
            break;
        }
    }
    cout << min_value << endl;
}


Measured memory_bytes: 16512
#include"bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;
 
#define int long long int
#define pb push_back
#define mp make_pair
#define loop(i,x,n) for(int i=x;i<=n;i++)
#define rloop(i,x,n) for(int i=x;i>=n;i--)
#define ff first
#define ss second
#define N4RUTO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
 
typedef tree<int, null_type, less<int>, rb_tree_tag,  
// typedef tree<int, null_type, less_equal<int>, rb_tree_tag,  
tree_order_statistics_node_update>
ordered_set;
 
int func(int i, int j, vector<vector<int>>& dp, vector<int>& a, vector<int>& b, vector<int>& c){
	int n = a.size();
	if(i>=n) return 0;
	if(dp[i][j]!=-1) return dp[i][j];
	if(j==0) dp[i][j] = max({a[i]+func(i+1,1,dp,a,b,c), b[i]+func(i+1,2,dp,a,b,c), c[i]+func(i+1,3,dp,a,b,c)});
	else if(j==1) dp[i][j] = max(b[i]+func(i+1,2,dp,a,b,c), c[i]+func(i+1,3,dp,a,b,c));
	else if(j==2) dp[i][j] = max(a[i]+func(i+1,1,dp,a,b,c), c[i]+func(i+1,3,dp,a,b,c));
	else if(j==3) dp[i][j] = max(b[i]+func(i+1,2,dp,a,b,c), a[i]+func(i+1,1,dp,a,b,c));
	return dp[i][j];
}
int32_t main(){
	N4RUTO;
	int t;
	t=1;
	// cin>>t;
	while(t--){
		int n;
		cin>>n;
		vector<int> a(n), b(n), c(n);
		loop(i,0,n-1) cin>>a[i]>>b[i]>>c[i];
		vector<vector<int>> dp(n,vector<int>(4,-1));
		cout<<func(0,0,dp,a,b,c);
	}
	return 0;
}

Measured memory_bytes: 21908
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define watch(x) cout << #x << " is " << x << endl;
#define print(a, l, r) \
    for (int i = l; i < r; i++) cout << a[i] << (i == (r - 1) ? endl : " ");
const long long M = 1000000007;

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

    long long a, b;
    cin >> a >> b;
    for (int i = 10 * b; i <= 10 * b + 10; i++) {
        if ((i * 8) / 100 == a && (i / 10) == b) {
            cout << i << endl;
            return 0;
        }
    }
    cout << -1 << endl;
    return 0;
}


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

using namespace std;
int main(){
  int n;
  cin >> n;
  vector<long> s(n+1,0);
  
  for(int i=1;i<=n;i++){
   long a;
    cin >> a;
    s[i]=a+s[i-1];
  }
 
  long res=1000000000000000;
  for(int i=1;i<n;i++){
   res=min(abs(2*s[i]-s[n]),res);
  }
  
  cout << res << endl;
  
}

Measured memory_bytes: 1792
a, b, c, x, y = map(int, input().split())

p1 = a*x + b*y
p2 = c * 2 * max(x, y)
if x >= y:
  p3 = c * 2 * y + a*(x-y)
else:
  p3 = c * 2 * x + b*(y-x) 

print(min(p1,p2,p3))

Measured memory_bytes: 3060
from itertools import product
n, m = map(int, input().split())
s = [list(map(lambda x: int(x) - 1, input().split()[1:])) for _ in range(m)]
p = list(map(int, input().split()))
print(sum(all(sum(b[ki] for ki in s[i]) % 2 == p[i] for i in range(m)) for b in product((True, False), repeat=n)))

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

int main() {
  string O,E;
  cin>>O>>E;
  string s="";
  for (int i(0);i<O.size();i++){
    s+=O[i];
    if (i==O.size()-1&&O.size()!=E.size())continue;
    s+=E[i];
  }
  cout << s <<endl;
}


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


int main(){
	int A,B;
	string S;
	cin >> A >> B >> S;
	if(S.size() != A + B + 1){
		cout << "No" << endl;
		return 0;
	}
	for(int i = 0; i < S.size(); i++){
		if(i == A && S[i] != '-'){
			cout << "No" << endl;
			return 0;
		}
		if(i != A && S[i] == '-'){
			cout << "No" << endl;
			return 0;
		}
	}
	cout << "Yes" << endl;

	return 0;
}


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

#define fst(t) std::get<0>(t)
#define snd(t) std::get<1>(t)
#define thd(t) std::get<2>(t)
#define unless(p) if(!(p))
#define until(p) while(!(p))

using ll = std::int64_t;
using P = std::tuple<int,int>;

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

  std::string S, T;
  std::cin >> S >> T;

  int N, M;
  std::cin >> N >> M;

  std::string U;
  std::cin >> U;

  if(S == U){
      N -= 1;
  }else{
      M -= 1;
  }

  std::cout << N << " " << M << std::endl;
}


Measured memory_bytes: 256
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
using namespace std;

int main()
{
    int h, w, n;
    cin >> h >> w >> n;
    vector<int> a(n);
    for(int i=0; i<n; ++i)
        cin >> a[i];

    vector<vector<int> > grid(h, vector<int>(w));
    int i = 0;
    for(int y=0; y<h; ++y){
        for(int x=0; x<w; ++x){
            if(y % 2 == 0)
                grid[y][x] = i + 1;
            else
                grid[y][w-1-x] = i + 1;
            -- a[i];
            if(a[i] == 0)
                ++ i;
        }
    }

    for(int y=0; y<h; ++y){
        cout << grid[y][0];
        for(int x=1; x<w; ++x)
            cout << ' ' << grid[y][x];
        cout << endl;
    }

    return 0;
}


Measured memory_bytes: 384
#include<bits/stdc++.h>
using namespace std;
#define		pb              push_back
#define		PB              pop_back
#define		nn              "\n"
#define     O_O             ios_base::sync_with_stdio(false); cin.tie(NULL)
#define		all(p)          p.begin(),p.end()
#define		zz(v)           v.size()
#define		ss              ' '
#define 	S(a)            scanf("%lld",&a)
#define 	SS(a,b)         scanf("%lld %lld",&a,&b)
#define 	SSS(a,b,c)      scanf("%lld %lld %lld",&a,&b,&c)
#define		gcd(a,b)        __gcd(a,b)
#define		lcm(a,b)        (a*b)/gcd(a,b)
#define		pi              acos(-1.0)
typedef		long long       ll;
typedef		vector<ll>      vll;


int main()
{
//O_O ;
    ll n,a,b,ans,temp;

    cin>>n>>a>>b;
    //if(a>b)
    //sort(a,b);


    if((b-a)%2==0)
        cout<<(b-a)/2<<nn;
    else
    {
        ans=min(a-1,n-b);
       // if(2*(n-b)<(b-a)){
            temp=(b-a)/2;
             //cout<<temp<<nn;
            ans+=(temp+1);
           // if()

           // cout<<ans<<nn;

            cout<<ans<<nn;


    }

    return 0;
}


Measured memory_bytes: 256
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {
	private static final int MOD = (int)Math.pow(10, 9);
	public static void main(String[] args) {
		FastReader sc = new FastReader();
		int n = sc.nextInt();
		int[] v = new int[n];
		int[] c = new int[n];
		int[] res = {Integer.MIN_VALUE, 0};
		
		for (int i = 0; i < n; i++) {
			v[i] = sc.nextInt();
		}
		
		for (int i = 0; i < n; i++) {
			c[i] = sc.nextInt();
		}
		pickGem(0, v, c, 0, 0, res);
		System.out.println(res[0]);
	}
	
	private static void pickGem(
			int pos,
			int[] values,
			int[] costs,
			int x,
			int y,
			int[] res) {
		if (pos == values.length) {
			res[0] = Math.max(res[0], x - y);
		} else {
			pickGem(pos + 1, values, costs, x + values[pos], y+ costs[pos], res);
			pickGem(pos + 1, values, costs, x, y, res);
		}
	}
	
    static class FastReader {
	    BufferedReader br;
	    StringTokenizer st;
	
	    public FastReader() {
	      br = new BufferedReader(new InputStreamReader(System.in));
	    }
	  
	    String next() { 
	      while (st == null || !st.hasMoreElements()) {
	        try {
	          st = new StringTokenizer(br.readLine());
	        } catch (IOException  e) {
	          e.printStackTrace();
	        }
	      }
	      return st.nextToken();
	    }
	
	    int nextInt() {
	      return Integer.parseInt(next());
	    }
	
	    long nextLong() {
	      return Long.parseLong(next());
	    }
	
	    double nextDouble() { 
	      return Double.parseDouble(next());
	    }
	
	    String nextLine() {
	      String str = "";
	        try{
	            str = br.readLine();
	        } catch (IOException e) {
	            e.printStackTrace();
	        }
	        return str;
	      }
	  }
}


Measured memory_bytes: 20948
#include<bits/stdc++.h>
#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>
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--)
inline bool EQ(double a, double b) { return fabs(a-b) < 1e-9; }
const int INF = 1<<29;
typedef long long int ll;
inline int two(int n) { return 1 << n; }
inline int test(int n, int b) { return (n>>b)&1; }
inline void set_bit(int & n, int b) { n |= two(b); }
inline void unset_bit(int & n, int b) { n &= ~two(b); }
inline int last_bit(int n) { return n & (-n); }
inline int ones(int n) { int res = 0; while(n && ++res) n-=n&(-n); return res; }
template<class T> void chmax(T & a, const T & b) { a = max(a, b); }
template<class T> void chmin(T & a, const T & b) { a = min(a, b); }
const int MOD=1000000007;

bool isPowerOfTwo (ll x)  
{  
    return x && (!(x&(x-1)));  
}
bool isPrime(int n) 
{ 
    if (n <= 1)  return false; 
    if (n <= 3)  return true; 
    if (n%2 == 0 || n%3 == 0) return false; 
  
    for (int i=5; i*i<=n; i=i+6) 
        if (n%i == 0 || n%(i+2) == 0) 
           return false; 
  
    return true; 
}
int highestPowerof2(unsigned int n) 
{ 
    // Invalid input 
    if (n < 1) 
        return 0; 
  
    int res = 1;
    for (int i=0; i<8*sizeof(unsigned int); i++) 
    { 
        int curr = 1 << i; 
        if (curr > n) 
           break; 
  
        res = curr; 
    } 
  
    return res; 
} 
long long binpow(long long a, long long b) {
    long long res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}       
////////////////////////////////////////////////////////////////////

int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);  
  cout.tie(NULL);
  int t=1;
  while(t--)
  {
      ll l,r;
      cin>>l>>r;
      bool flag=false;
      ll mn=INT64_MAX;
        for(ll i=l;i<r;i++)
        {
            for(ll j=l+1;j<=r;j++)
            {
                ll c=((i%2019)*(j%2019))%2019;
                if(c==0)
                {
                    flag=true;
                    break;
                }
                mn=min(mn,c);
            }
            if(flag)break;
        }
        if(flag)cout<<0;
        else cout<<mn;
  }
  return 0;
}

Measured memory_bytes: 256
//
//  atcoder.cpp
//
//
///
#include <bits/stdc++.h>
#include <boost/optional.hpp>
#include <boost/range/irange.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>
#include <boost/bimap/bimap.hpp>
#include <boost/bimap/multiset_of.hpp>
#include <boost/multi_array.hpp>
#include <boost/math/common_factor.hpp>
#include <boost/icl/interval_map.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/pending/disjoint_sets.hpp>
#include <boost/graph/graph_traits.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/graph/dijkstra_shortest_paths.hpp>
#include <boost/graph/kruskal_min_spanning_tree.hpp>
#include <boost/graph/graph_utility.hpp>
#include <boost/numeric/ublas/vector.hpp>
// ↓これいる？
#include <boost/graph/strong_components.hpp>

#define REP(i, N) for(int i=0; i<(N); i++)
#define REC(f, ...) (void)0; const auto f = [&](const auto f, __VA_ARGS__)
using namespace std;
using namespace boost::math;
using namespace boost::numeric;

using ll = long long;
namespace bst = boost;
template<class T> void fill(T& v) { for (auto&& i : v) cin >> i; }

//#include "atcoder.hpp"

int main() {
    int A1,A2,A3;
    
    cin >> A1 >> A2>>A3;
    
    cout << (A1+A2+A3 >= 22 ? "bust" : "win") << endl;
    
    return 0;
}






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

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

int main(){
  int n;
  std::cin >> n;
  vector<int> d(n);
  ll powsum = 0;
  rep(i,n){
    cin >> d[i];
    powsum += d[i] * d[i];
  }
  int sum = accumulate(d.begin(),d.end(),0);
  cout << ( sum * sum - powsum ) /2  << endl;
}

Measured memory_bytes: 256
#include <stdio.h>
#define N 200005
int n, m, i, j, k, a, b, x, y, p, q;
int u[N], v[N];
char s[N];
void f(int k, int n){
	if(n == 0) printf("%d\n", k);
	else{
		int m=n, c=0;
		while(m){
			c += m&1;
			m >>= 1;
		}
		f(k+1, n%c);
	}
}
int main(){
	scanf("%d%s", &n, s+1);
	for(i=1; i<=n; i++){
		a += s[i] & 1;
	}
	b = a + 1;
	if(a) a--;
	u[n] = v[n] = 1;
	for(p=q=1, i=n; i>=1; i--){
		if(s[i] & 1){
			if(a) x = (x+p) % a;
			y = (y+q) % b;
		}
		if(a) u[i-1] = p = (p+p) % a;
		v[i-1] = q = (q+q) % b;
	}
	for(i=1; i<=n; i++){
		if(s[i]&1){
			if(a) f(1, (x-u[i]+a)%a);
			else printf("0\n");
		}
		else f(1, (y+v[i])%b);
	}
	return 0;
}

Measured memory_bytes: 3484
if __name__ == '__main__':
    l = []

    IN = input().split()
    for c in IN:
        if c.isnumeric():
            l.append(int(c))
        else:
            b = l.pop()
            a = l.pop()

            if c == '+':
                ans = a + b
            elif c == '*':
                ans = a * b
            elif c == '-':
                ans = a - b

            l.append(ans)

    print(l[0])



Measured memory_bytes: 5600
#include "bits/stdc++.h"
using namespace std;
#define rep(i,n)for(int i=0;i<(int)(n);i++)
//#define PI 3.141592653589793
//vector < vector<int>>a(0, vector<int>(0));二次元配列宣言


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

	int i=10000, cnt = 0;
	int j, k, l;
	int a = 0;
	int y = 0;
	vector<int>w(10005);
	for (j = 1; j <= 100; j++)
	{
		if (j * j + j + j >= i)
		{
			break;
		}
		for (k = 1; k <= 100; k++)
		{
			if (j * j + k * k + j * k + k >= i)
			{
				break;
			}
			for (l = 1; l <= 100; l++)
			{
				a++;
				if (j * j + k * k + l * l + j * k + k * l + l * j > i)
					break;
				w.at(j * j + k * k + l * l + j * k + k * l + l * j)++;
			}
		}
	}
	for (i = 1; i <= n; i++)
	{
		cout << w.at(i) << endl;
		a++;
	}
	//cout << a << endl;
}
	
	

	
	
/**/
/*#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

#define PI 3.141592653589793

int main(void) {
	return 0;
}
*/

Measured memory_bytes: 3632
#include <stdio.h>

int main(int argc, const char * argv[]) {
    int h, i, k, n;
    
    int b, f, r, v;
    int count[4][3][10];//１フロア１０部屋、３階建ての公舎４棟
    
    //入居者の数をカウント
    for(h=0; h<4; h++){
        for(i=0; i<3; i++){
            for(k=0; k<10; k++){
                count[h][i][k]=0;
            }
        }
    }
    
    scanf("%d\n",&n);
    for(i=0; i<n; i++){
        scanf("%d %d %d %d\n",&b,&f,&r,&v);
        count[b-1][f-1][r-1]+=v;
    }
    
    for(h=0; h<4;  h++){
        for(i=0; i<3; i++){
            for(k=0; k<10; k++){
                printf(" %d", count[h][i][k]);
                
                if (k==9) {
                    printf("\n");
                    
                    if (k==9 && i==2 && h<3) {
                        printf("####################\n");
                    }
                }

            }
        }
    }

    return 0;
}



Measured memory_bytes: 2096
#include <cstdio>
#include <iostream>
#include <cmath>
#include <cstring>
#include <sstream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>
#include <memory.h>
#include <iomanip>
#include <bitset>
#include <list>
#include <stack>

using namespace std;

#define mod 1000000007

int main()
{
	long long int a, b, x;
	cin >> a >> b >> x;
	long long int ans = b / x - a / x;
	if(a % x == 0) ans++;
	cout << ans << endl;
}

Measured memory_bytes: 256
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <bits/stdc++.h>
#define ll long long
using namespace std;
void put(int x){
	if(x<0) {
		putchar('-');
		x*=-1;
	}
	if(x==0) {
		putchar('0');
	}
	int num=0;
	char c[15];
	while(x) {
		c[++num]=(x%10)+48;
		x/=10;
	}
	while(num) {
		putchar(c[num--]);
	}
	putchar('\n');
}
inline void in(int &x){
	char ch=getchar();
	int flag=1;
	while(!(ch>='0'&&ch<='9')) {
		if(ch=='-')
			flag*=-1;
		ch=getchar();
	}
	x=ch-'0';
	ch=getchar();
	while(ch>='0'&&ch<='9') {
		x=((x<<3)+(x<<1))+ch-'0';
		ch=getchar();
	}
	x*=flag;
}
int a,b;
int main(){
//	freopen("1.in","r",stdin);
//	freopen("1.out","w",stdout);
	in(a);in(b);printf("%d\n",6-a-b);
	return 0;
}

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

int main() {
    double N, M;
    cin >> N >> M;
    double pm = powf(1.0/2, M);
    double numpm = 1.0 / pm;
    cout << numpm * 1900 * M + numpm * 100 * (N-M) << endl;
}


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

using namespace std;

#define INF 100000000
#define YJ 1145141919
#define INF_INT_MAX 2147483647
#define INF_LL 9223372036854775
#define INF_LL_MAX 9223372036854775807
#define EPS 1e-10
#define MOD 1000000007
#define MOD9 998244353
#define Pi acos(-1)
#define LL long long
#define ULL unsigned long long
#define LD long double

#define int long long

using II = pair<int, int>;

int gcd(int a, int b) { return b != 0 ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a * b / gcd(a, b); }
int extgcd(int a, int b, int &x, int &y) { int g = a; x = 1; y = 0; if (b != 0) g = extgcd(b, a % b, y, x), y -= (a / b) * x; return g; }

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(a)  begin((a)), end((a))
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())

const int MAX_N = 100005;
int N;
int M;
int S, T;

vector<int> edge[MAX_N];

int dist[MAX_N][3];

struct Node {
  Node(int pos, int p, int c) : pos(pos), p(p), c(c) {}
  int pos, p, c;
  bool operator > (const Node& n) const
  {
    return c > n.c;
  }
 };

signed main()
{
  cin >> N >> M;
  REP(m,M) {
    int a, b; cin >> a >> b;
    edge[a].push_back(b);
  }
  cin >> S >> T;

  memset(dist, -1, sizeof(dist));
  priority_queue<Node, vector<Node>, greater<Node>> pq;
  pq.push(Node(S,0,0));
  dist[S][0] = 0;

  while(pq.size()) {
    Node node = pq.top(); pq.pop();

    if(dist[node.pos][node.p] < node.c) continue;

    for(int next : edge[node.pos]) {
      if(dist[next][(node.p+1)%3] == -1) {
        dist[next][(node.p+1)%3] = node.c+1;
        pq.push(Node(next, (node.p+1)%3, node.c+1));
      }
    }
  }

  if(dist[T][0] == -1) {
    cout << -1 << endl;
  } else {
    cout << dist[T][0]/3 << endl;
  }

  return 0;
}


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

int main(){
	long n,sum=0;
	cin>>n;
	vector<long>vec(n);
	for(int i=0;i<n;i++){
		long a;
		cin>>a;
		vec.at(i)=a;
	}
	int j=0;
	int b;
	for(int i=0;i<n;i++){
		
		j=0;
		b=vec.at(i);
		while(b%2==0){
			
			b=b/2;
			j++;
			
		}
	sum+=j;
	}
	cout<<sum<<endl;
	return 0;
}	

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

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

typedef int _loop_int;
#define REP(i,n) for(_loop_int i=0;i<(_loop_int)(n);++i)
#define FOR(i,a,b) for(_loop_int i=(_loop_int)(a);i<(_loop_int)(b);++i)
#define FORR(i,a,b) for(_loop_int i=(_loop_int)(b)-1;i>=(_loop_int)(a);--i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define CHMIN(a,b) a=min((a),(b))
#define CHMAX(a,b) a=max((a),(b))

// mod
const ll MOD = 1000000007ll;
#define FIX(a) ((a)%MOD+MOD)%MOD

// floating
typedef double Real;
const Real EPS = 1e-11;
#define EQ0(x) (abs(x)<EPS)
#define EQ(a,b) (abs(a-b)<EPS)
typedef complex<Real> P;

int x,y,z,k;
ll a[1252], b[1252], c[1252];

int main(){
  scanf("%d%d%d%d",&x,&y,&z,&k);
  REP(i,x)scanf("%lld",a+i);
  REP(i,y)scanf("%lld",b+i);
  REP(i,z)scanf("%lld",c+i);
  multiset<ll> Q;
  Q.insert(0);
  int aaa[] = {x,y,z};
  ll *bbb[] = {a,b,c};
  REP(t,3){
    int n = aaa[t];
    ll *ar = bbb[t];
    multiset<ll> R;
    while(Q.size()){
      ll v = *Q.begin(); Q.erase(Q.begin());
      REP(i,n){
        R.insert(v+ar[i]);
      }
      while(R.size() > k){
        R.erase(R.begin());
      }
    }
    Q = R;
  }
  auto it = Q.rbegin();
  while(it != Q.rend()){
    printf("%lld\n", *it); it++;
  }
  return 0;
}


Measured memory_bytes: 640
import heapq
n, m = map(int, input().split())
goods = []
for a in map(int, input().split()):
    heapq.heappush(goods, -a)
for _ in range(m):
    a = -heapq.heappop(goods)
    heapq.heappush(goods, -(a // 2))
print(-sum(goods))


Measured memory_bytes: 14380
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<vector>
#include<functional>
#include<algorithm>
#include<stdlib.h>
#include<string>
#include<string.h>
#define _USE_MATH_DEFINES
#include<math.h>
#include<deque>
#include<set>
#include<iostream>
using namespace std;
typedef long long ll;
#define rep(i,a,b) for(auto i=a;i<b;i++)
#define all(_x) _x.begin(), _x.end()
#define r_sort(_x) sort(_x.begin(), _x.end(), std::greater<int>())
#define vec_cnt(_a, _n) (upper_bound(all(_a), _n) - lower_bound(all(_a), _n))
#define INF 1 << 30
#define MAX 1000000000
#define SIZE 1000000000
int main() {
	int n;
	int s = 0;
	scanf("%d", &n);
	set<int> b;
	vector<int> a(n);
	rep(i, 0, n)scanf("%d", &a[i]), b.insert(a[i]);
	sort(all(a));
	for (auto it : b) {
		int c = vec_cnt(a, it);
		if (c < it)s += c;
		else s += c - it;
	}
	printf("%d\n", s);
	return 0;
}

Measured memory_bytes: 5120
#include <stdio.h>

int main()
{
    long long n, k, i; 
    long long min, max;
    long long num = 0;
    scanf("%lld%lld", &n, &k);

    for (i = k; i <= n + 1; i++) {
        min = (i * (i-1) / 2);
        max = ((2*n-i+1) * i / 2);
        num += max - min + 1;
    }

    printf("%lld\n", num % 1000000007);

    return 0;
}

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

int n;
vector<int> a(110);
int res = 0;

int main(){
  cin >> n;
  rep(i, n)cin >> a[i];
  sort(a.begin(), a.end());
  reverse(a.begin(), a.end());
  rep(i, n){
    if(i % 2 == 0){ //alice
      res += a[i];
    }else{
      res -= a[i];
    }
  }
  cout << res << endl;
  return 0;
}

Measured memory_bytes: 256
/*input
1
1

*/
 
/*
                                                    ______________
                                                          |       )
                                                          |   )   /
                                                          |______/
                                                    |     |      \
                                                    |     |   )   \
                                                    |_____|_______)
 
*/
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <queue>
#include <bitset>
#include <iomanip>
#include <fstream>
#include <stack>

using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> PII;
typedef pair<ll , ll> PLL;
typedef long double ld;
 
#define pb push_back
#define all(c) c.begin(),c.end()
#define allr(c) c.rbegin(),c.rend()
int mod = 1000000007;
const int inf = 1034567891;
const ll LL_INF = 1234567890123456789ll;
#define PI 3.14159265
#define endl '\n'
#define F first
#define S second
#define debug(x) cout << #x << " = " << x << endl;
#define TRACE
 
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
  cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
  const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif
 
#define out(container) for (auto it : container) cout << it << " "; cout << endl;
 
 
template < typename T > T GCD(T a, T b)            { ll t; while(a) { t = a; a = b % a; b = t; } return b; }
template < typename T > string toString(T a)       { return to_string(a); }
template < typename T > void toInt(string s, T &x) { stringstream str(s); str >> x;}
inline int add(int x, int y){ x += y; if(x >= mod) x -= mod; return x;}
inline int sub(int x, int y){ x -= y; if(x < 0) x += mod; return x;}
inline int mul(int x, int y){ return (x * 1ll * y) % mod;}
inline int powr(int a, ll b){
  int x = 1 % mod;
  while(b){
    if(b & 1) x = mul(x, a);
    a = mul(a, a);
    b >>= 1;
  }
  return x;
}
inline int inv(int a){ return powr(a, mod - 2);}

int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  
  int k;
  cin >> k;
  string str;
  cin >> str;
  int n = str.size();
  if (k >= n) {
    cout << str << endl;
  } else {
    cout << str.substr(0, k) << "..." << endl;
  }
  
  return 0;
}

Measured memory_bytes: 3660
#include <iostream>

using namespace std;

using ll = long long;
const int MAX_A = 100000;
ll cnt[MAX_A + 1];

int main() {
    int N;
    ll K;
    cin >> N >> K;

    for (int i = 0; i < N; ++i) {
        int a, b;
        cin >> a >> b;
        cnt[a] += b;
    }

    for (int ans = 1; ans <= MAX_A; ++ans) {
        if (K <= cnt[ans]) {
            cout << ans << endl;
            break;
        }
        K -= cnt[ans];
    }
    return 0;
}

Measured memory_bytes: 1024
/******************************************************************************

                         بسم الله الرحمن الرحيم
                     Author: Mst: Mhamuda Khatun
                               RUCSE27

*******************************************************************************/

#include<bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define ll long long
#define pi 2*acos(0.0)
#define f first
#define s second
#define pb push_back
#define gap ' '
#define fastio {ios_base::sync_with_stdio(false);cin.tie(NULL);}
#define mod 1000000007
#define MAX 1000000000000
#define N 305

int main()
{
    fastio;
    ll a,b,c,k,sum,x;
    cin>>a>>b>>c>>k;

    x=min(a,k);
    sum=x;
    k-=x;

    if(k>0)
    k-=b;

    if(k>0)
    sum-=k;

    cout<<sum;
    cout<<"\n";
    return 0;   //:D
}




Measured memory_bytes: 3672
list = []

while 1:
    n,x = map(int,input().split())
    if n==0 and x==0:
        break
    else:
        cnt = 0
        for i in range(1,n+1):
            for j in range(i+1,n+1):
                for k in range(j+1,n+1):
                    if i+j+k==x:
                        cnt += 1
        list.append(cnt)

for i in list:
    print(i)

Measured memory_bytes: 7640
import java.util.*;

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

		int dataSetCount = 0;

		while (minYear != 0) {
			int leapYearCount = 0;

			if (dataSetCount > 0) {
				System.out.println("");
			}

			for (int year = minYear;year <= maxYear;++year) {
				if (year % 400 == 0 || year % 100 != 0 && year % 4 == 0) {
					System.out.println(year);
					++leapYearCount;
				}
			}
			if (leapYearCount == 0) {
				System.out.println("NA");
			}

			dataSetCount++;
			minYear = sc.nextInt();
			maxYear = sc.nextInt();
		}
	}
}



Measured memory_bytes: 27372
#include<set>
#include<map>
#include<list>
#include<queue>
#include<stack>
#include<string>
#include<math.h>
#include<time.h>
#include<vector>
#include<bitset>
#include<memory>
#include<utility>
#include<fstream>
#include<stdio.h>
#include<sstream>
#include<iostream>
#include<stdlib.h>
#include<string.h>
#include<algorithm>
using namespace std;
vector<int> ans;
int main()
{
    #ifdef absi2011
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
    int n;
    scanf("%d",&n);
    if (n==3)
    {
        puts("2 5 63");
        return 0;
    }
    int cnt=2;
    ans.push_back(3);
    ans.push_back(9);
    int i;
    for (i=2;i<=30000;i+=6)
    {
        if (cnt+1>=n) break;
        ans.push_back(i);
        ans.push_back(i+2);
        cnt+=2;
    }
    for (i=15;i<=30000;i+=12)
    {
        if (cnt+1>=n) break;
        ans.push_back(i);
        ans.push_back(i+6);
        cnt+=2;
    }
    for (i=6;i<=30000;i+=6)
    {
        if (cnt>=n) break;
        ans.push_back(i);
    }
    for (i=0;i<n;i++)
    {
        printf("%d ",ans[i]);
    }
    return 0;
} 


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

Measured memory_bytes: 256
(let* ((d-read (read))
    (c (make-array 27))
    (s (make-array '(366 27)))
    (score 0)
    (max_ 0)
    (max_contest 0)
    (last (make-array 27 :initial-element -1)))

    (loop for i from 1 to 26 do
        (setf (aref c i) (read))
    )
    (loop for i from 1 to d-read do
        (loop for j from 1 to 26 do
            (setf (aref s i j) (read))
        )
    )

    (loop for d from 1 to d-read do
        (loop for contest from 1 to 26 do
            (setq score (aref s d contest))
            (loop for i from 1 to 26 do
                (if (not (= i contest))
                (decf score (* (aref c i) (- d (aref last i)))))
            )
            (if (or (= contest 1) (> score max_))
                (progn
                (setq max_ score)
                (setq max_contest contest)
                )
            )
        )
    (setf (aref last max_contest) d)
    (format t "~D~%" max_contest)
    )
)

Measured memory_bytes: 29600
N, = [int(x) for x in input().strip().split(" ")]
As = [int(x) for x in input().strip().split(" ")]

ave = float(sum(As))/N
diss = [abs(ave-a) for a in As]
minn = sorted(diss)[0]
for i, x in enumerate(diss):
    if x == minn:
        aaa = i
        break
print(aaa)


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

class graph{
    public:
    ll n;
    vector<ll>* adjList;
    vector<ll> visited;
    graph(ll x){
        n = x;
        adjList = new vector<ll>[x];
        visited.resize(x);
    }
    void addEdge(ll u, ll v){
        adjList[u].push_back(v);
        adjList[v].push_back(u);
    }
    void dfs(int node){
        visited[node]=1;
        for(auto& ch: adjList[node]){
            if(!visited[ch]){
                dfs(ch);
            }
        }
    }
};

int main(){
    ll n, m;
    cin>>n>>m;
    graph g(n);
    for(int i=0; i<m; i++){
        ll u, v;
        cin>>u>>v;
        g.addEdge(--u, --v);
    }
    int ans = 0;
    for(int i=0; i<n; i++){
        if(g.visited[i]==0){
            ans++;
            g.dfs(i);
        }
    }
    cout<<(ans-1)<<endl;
}


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

#define     FasterIO        ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define     bug(a,b)        cout<<a<<"\t"<<b<<"\n";
#define     Case(a,b)       cout<<"Case "<<a<<": "<<b<<"\n";
#define     precision(a,b)  fixed<<setprecision(a)<<b
#define     lp(i,a,b)       for(int i=a;i<b;i++)
#define     Endl            "\n"
#define     tab             "\t"
#define     reset(a,b)      memset(a,b,sizeof(a));
#define     sf(a)           scanf(" %d", &a);
#define     sfl(a)          scanf(" %lld", &a);
#define     srt(a)          sort(a.begin(),a.end());
#define     ALL(a)          a.begin(),a.end()
#define     pb(a)           push_back(a)
#define     pi              2*acos(0.0)

typedef long long int ll;
typedef unsigned long long int ull;

const int sz=1e5+9 , infP=INT_MAX , infN=INT_MIN ,mod=1e9+7, eps=1e-9;


void ini(){

    return;
}

vector<int> g[sz];
int vis[sz],dp[sz],n,m,x,y,ans=0;

void dfs(int u){
    // bug(u,dp[u]);
    vis[u]=1;
    for(auto &v:g[u]){
        if(!vis[v])dfs(v);
        dp[u]=max(dp[u],1+dp[v]);
    }
    // bug(u,dp[u]);
}


void solve(){

    cin>>n>>m;
    for(int i=0;i<m;i++){
        cin>>x>>y;
        g[x].pb(y);
    }

    for(int i=1;i<=n;i++)if(!vis[i])dfs(i);
    
    
    for(int i=1;i<=n;i++)ans=max(ans,dp[i]);
    

    cout<<ans<<Endl;

}

int main(){
    FasterIO;
    #ifndef ONLINE_JUDGE
        freopen("input.in","r",stdin);
        freopen("output.in","w",stdout);
    #endif
    // ini();
    int t=1;
    // cin>>t;
    while(t--)
        solve();
}


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

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;  // or pb_ds;

using namespace std;

#define ff first
#define ss second
#define pb push_back
#define eb emplace_back
#ifndef DEBUG
// #define endl "\n"
#endif
#define fff ff
#define sss ss.ff
#define ttt ss.ss
#define INF (1 << 30)
#define LLF (1ll << 60)
#define PRIME (1000000007)
#define FASTIO std::ios::sync_with_stdio(false)
#ifdef DEBUG
#define debug(x) cerr << #x << " = " << x << endl
#else
#define debug(x)
#endif
#define rep(i, begin, end)                            \
  for (__typeof(end) i = (begin) - ((begin) > (end)); \
       i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))

#define FILE_INPUT                  \
  freopen("input.txt", "r", stdin); \
  freopen("output.txt", "w", stdout)

#define all(x) x.begin(), x.end()

typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef tuple<int, int, int> iii;
typedef vector<ii> vii;
typedef vector<iii> viii;
typedef vector<string> vs;

template <typename T, typename B = null_type>
using oset =
    tree<T, B, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order / order_of_key

const ld eps = 1e-12;

/*-----------------END TEMPLATE-----------------*/

void solve() {
  string s;
  cin >> s;
  for (auto c : s) {
    if (c == '7') {
      cout << "Yes" << endl;
      return;
    }
  }
  cout << "No" << endl;
}

int(((((((((((((((main)))))))))))))))() {
  FASTIO;
  int n;
  // cin >> n;
  n = 1;
  int i = 1;
  while (n--) {
    solve();
  }
}

/*


00100
00

*/

Measured memory_bytes: 3616
#include <stdio.h>
#include <stdlib.h>

#include <iostream>
#include <iomanip>
#include <sstream>
#include <fstream>
#include <stdint.h>
#include <string.h>

#define _USE_MATH_DEFINES
#include <math.h>

#include <vector>
#include <list>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <stack>
#include <deque>
#include <string>

#include <algorithm>
#include <functional>
#include <bitset>
#include <functional>
#include <chrono>
#include <random>
#define sqr(x) (x) * (x)

typedef unsigned int u32;
typedef int i32;
typedef unsigned long long int u64;
typedef long long int i64;
typedef uint16_t u16;
typedef int16_t i16;
typedef uint8_t u8;
typedef int8_t i8;

using namespace std;
using namespace std::chrono;

const i64 mod = 1000000007ll;
const i64 smod = 998244353ll;
const i64 inf = 10000000000000007ll;

const double eps = 1e-10;


const i64 MAXN = 300005;

i64 n;
i64 a[MAXN];
int main(int argc, char* argv[]) {
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cout.precision(15); cout.setf(ios::fixed);

    i64 n, m;
    cin >> n  >> m;

    if (n == m) {
        cout << "Yes" << endl;
    }
    else {
        cout << "No" << endl;

    }

    return 0;
}

Measured memory_bytes: 256
n = int(input())
a = list(map(int,input().split()))
x = [0,0,0]
c = 1
for i in range(n):
  cc = 0
  k = 0
  for j in range(3):
    if a[i] == x[j]:
      cc += 1
      k = j
  c = (c*cc)%1000000007
  x[k] += 1
print(c)
      
      
      

Measured memory_bytes: 52952
import java.util.Scanner;

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

        if(a>b){
            System.out.println("a > b");
        } else if(a<b){
            System.out.println("a < b");           
        } else {
            System.out.println("a == b");
        }
    }
}


Measured memory_bytes: 26112
#include <bits/stdc++.h>
using namespace std;
typedef pair<int,int> P;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define INF 2000000000
#define LLINF 1000000000000000ll
#define sz(x) ((int)(x).size())
#define fi first
#define sec second
#define all(x) (x).begin(),(x).end()
#define sq(x) ((x)*(x))
#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define repn(i,a,n) for(int (i)=(a);(i)<(int)(n);(i)++)
#define EQ(a,b) (abs((a)-(b))<eps)
#define dmp(x) cerr << __LINE__ << " " << #x << " " << x << endl;
template<class T> void chmin(T& a,const T& b){if(a>b)a=b;}
template<class T> void chmax(T& a,const T& b){if(a<b)a=b;}
template<class t,class u>
ostream& operator << (ostream& os,pair<t,u> p){
	return os << p.fi << ',' << p.sec;
}
template<class T>
void dump(vector<T> &vec){
	for(int i=0;i<vec.size();i++){
		cout << vec[i];
		if(i+1<vec.size())cout << ' ';
		else cout << endl;
	}
	return;
}
template<class T>
void input(vector<T>& vec,int n){
	vec.resize(n);
	for(int i=0;i<n;i++){
		cin >> vec[i];
	}
}
void fastio(){
	cin.tie(0);
	ios::sync_with_stdio(0);
	cout<<fixed<<setprecision(20);
}
int N;
string s;
int dp[200100][2];
int main(){
	cin >> N;
	cin >> s;
	for(int i=0;i<=N;i++){
		dp[i][0]=dp[i][1]=INF;
	}
	dp[0][0] = 0;
	for(int i=0;i<N;i++){
		if(s[i]=='.'){
			chmin(dp[i+1][1],dp[i][1]+1);
			chmin(dp[i+1][0],dp[i][0]);
		}else{
			chmin(dp[i+1][1],dp[i][0]);
			chmin(dp[i+1][1],dp[i][1]);
			chmin(dp[i+1][0],dp[i][0]+1);
		}
	}
	cout << min(dp[N][0],dp[N][1]) << endl;
	return 0;
}


Measured memory_bytes: 2180
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<long long> vl;
typedef vector<int> vi;
#define pb push_back
#define en "\n"
#define forn(i,e) for(ll i=0; i<e; i++)
#define forsn(i,s,e) for(ll i=s; i<e; i++)
#define rforn(i,e) for(ll i=e; i>=0; i--)
#define rforsn(i,s,e) for(ll i=e; i>=s; i--)
#define asort(arr,n) sort(arr,arr+n)
#define vsort(v) sort(v.begin(), v.end())
#define rvsort(v) sort(v.begin(), v.end(),greater<int>())
#define ff first
#define ss second
#define aout(a) for (auto u:a) {cout<<u<<" ";}cout<<en;

 
#define out(x1) cout << x1 << en
#define out2(x1,x2) cout << x1 << " " << x2 << en
#define out3(x1,x2,x3) cout << x1 << " " << x2 << " " << x3 << en

 
#define in(x1) cin >> x1
#define in2(x1,x2) cin >> x1 >> x2
#define in3(x1,x2,x3) cin >> x1 >> x2 >> x3
 
#define arrin(a,n) forn(i,n) cin >> a[i];
#define arrout(a,n) forn(i,n) {cout << a[i] << " ";} cout << en;
 

int main(){
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

ios_base::sync_with_stdio(false);
    cin.tie(NULL);

ll n;
in(n);
double arr[n];
arrin(arr,n);
double dp[n+1][n+1];
for (ll i = 0; i <= n; i++)
{for (ll j = 0; j <= n; j++)
{
if (i==0 and j==0){dp[i][j]=1;}
else if (i==0){dp[i][j]=0;}
else if (j==0){dp[i][j]=(1-arr[i-1])*dp[i-1][j];    }
else{
	dp[i][j]=dp[i-1][j-1]*arr[i-1]+dp[i-1][j]*(1-arr[i-1]);
}







}
	
}
double sum=0;





for (ll i = 1+n/2; i <= n; i++)
{
	sum+=dp[n][i];
}
// out(sum);
cout<<fixed<<setprecision(10)<<sum;
    return 0;
}


Measured memory_bytes: 74104
import core.bitop;
import std.algorithm;
import std.ascii;
import std.bigint;
import std.conv;
import std.functional;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.random;
import std.typecons;
import std.container;

alias sread = () => readln.chomp();
alias Point2 = Tuple!(long, "y", long, "x");

T lread(T = long)()
{
    return readln.chomp.to!T();
}

T[] aryread(T = long)()
{
    return readln.split.to!(T[])();
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}

void minAssign(T, U = T)(ref T dst, U src)
{
    dst = cast(T) min(dst, src);
}

enum MOD = 10 ^^ 9 + 7;

void main()
{
    long X, Y, Z, K;
    scan(X, Y, Z, K);
    auto A = aryread();
    auto B = aryread();
    auto C = aryread();
    A.sort!"b<a"();
    B.sort!"b<a"();
    C.sort!"b<a"();
    bool f(long[3] a, long[3] b)
    {
        return A[a[0]] + B[a[1]] + C[a[2]] < A[b[0]] + B[b[1]] + C[b[2]];
    }

    BinaryHeap!(long[3][], f) priority_queue = BinaryHeap!(long[3][], f)(new long[3][K * 3], 0);
    priority_queue.insert([0, 0, 0]);
    // writeln(priority_queue);
    // while (priority_queue.length < K)
    bool[Tuple!(long, long, long)] S;
    S[tuple(0L, 0L, 0L)] = true;
    foreach (_; 0 .. K)
    {
        auto x = priority_queue.front;
        writeln(A[x[0]] + B[x[1]] + C[x[2]]);
        priority_queue.removeFront();
        if (x[0] + 1 < X && !(tuple(x[0] + 1, x[1], x[2]) in S))
        {
            S[tuple(x[0] + 1, x[1], x[2])] = true;
            priority_queue.insert([x[0] + 1, x[1], x[2]]);
        }
        if (x[1] + 1 < Y && !(tuple(x[0], x[1] + 1, x[2]) in S))
        {
            S[tuple(x[0], x[1] + 1, x[2])] = true;
            priority_queue.insert([x[0], x[1] + 1, x[2]]);
        }
        if (x[2] + 1 < Z && !(tuple(x[0], x[1], x[2] + 1) in S))
        {
            S[tuple(x[0], x[1], x[2] + 1)] = true;
            priority_queue.insert([x[0], x[1], x[2] + 1]);
        }
    }
}


Measured memory_bytes: 3196