akhauriyash/Code-Regression huggingface dataset:
;;; Utils (quoted from https://competitive12.blogspot.com/2020/03/common-lisp.html)


;; Read fixnum

(declaim (ftype (function * (values fixnum &optional)) read-fixnum))
(defun read-fixnum (&optional (in *standard-input*))
  (declare (inline read-byte)
           #-swank (sb-kernel:ansi-stream in))
  (macrolet ((%read-byte ()
               `(the (unsigned-byte 8)
                     #+swank (char-code (read-char in nil #\Nul))
                     #-swank (read-byte in nil 0))))
    (let* ((minus nil)
           (result (loop (let ((byte (%read-byte)))
                           (cond ((<= 48 byte 57)
                                  (return (- byte 48)))
                                 ((zerop byte) ; #\Nul
                                  (error "Read EOF or #\Nul."))
                                 ((= byte #.(char-code #\-))
                                  (setq minus t)))))))
      (declare ((integer 0 #.most-positive-fixnum) result))
      (loop
        (let* ((byte (%read-byte)))
          (if (<= 48 byte 57)
              (setq result (+ (- byte 48) (the (integer 0 #.(floor most-positive-fixnum 10)) (* result 10))))
              (return (if minus (- result) result))))))))

;; fast read-line

(defmacro buffered-read-line (&optional (buffer-size 30) (in '*standard-input*) (term-char #\Space))
  (let ((buffer (gensym))
        (character (gensym))
        (idx (gensym)))
    `(let* ((,buffer (load-time-value (make-string ,buffer-size :element-type 'base-char))))
       (declare (simple-base-string ,buffer)
                (inline read-byte))
       (loop for ,character of-type base-char =
             ,(if (member :swank *features*)
                  `(read-char ,in nil #\Newline) ; on SLIME
                `(code-char (read-byte ,in nil #.(char-code #\Newline))))
             for ,idx from 0
             until (char= ,character #\Newline)
             do (setf (schar ,buffer ,idx) ,character)
             finally (when (< ,idx ,buffer-size)
                       (setf (schar ,buffer ,idx) ,term-char))
             (return (values ,buffer ,idx))))))


;;; invoke child process

#-swank
(unless (member :child-sbcl *features*)
  (quit
    :unix-status
    (process-exit-code
      (run-program *runtime-pathname*
                   `("--control-stack-size" "128MB"
                     "--noinform" "--disable-ldb" "--lose-on-corruption" "--end-runtime-options"
                     "--eval" "(push :child-sbcl *features*)"
                     "--script" ,(namestring *load-pathname*))
                                                                 :output t :error t :input t))))



;-------------------
; Write code here
;-------------------



(defun solve (a b c k)
  (- (min a k)
     (max (- k a b) 0)))

(defun main ()
  (let ((a (read))
        (b (read))
        (c (read))
        (k (read)))
    (princ (solve a b c k))
    (fresh-line)))

(main)


Measured memory_bytes: 25604
N, *AB = map(int, open(0).read().split())
AB = list(zip(*[iter(AB)] * 2))

for (a, b), (c, d), (e, f) in zip(AB, AB[1:], AB[2:]):
    if a == b and c == d and e == f:
        print("Yes")
        quit()

print("No")

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

typedef long long int ll;
typedef long int li;

const ll mod = 1000000007;
const ll inf = 1000000000000000000;

typedef vector<int> vi;
typedef vector<li> vli;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<vi> vvi;
typedef vector<vli> vvli;
typedef vector<vll> vvll;
typedef vector<vs> vvs;
typedef map<ll, ll> mll;
typedef map<ll, string> mls;
typedef map<string, ll> msl;

#pragma GCC optimize ("-O3")
#define FAST ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); 
#define PI 3.14159265358979323846
#define pb push_back
#define mp make_pair
#define fs first
#define sec second
#define pq priority_queue
#define lb lower_bound
#define ub upper_bound
#define tol(s) transform(s.begin(), s.end(), s.begin(), ::tolower);
#define tou(s) transform(s.begin(), s.end(), s.begin(), ::toupper);
#define all(v) v.begin(), v.end()
#define FOR(i, j, k, in) for(li i=j; i<k; i+=in)
#define RFOR(i, j, k, de) for(li i=j; i>=k; i-=de)
#define rep(i,j,k) FOR(i, j, k, 1)
#define rrep(i,j,k) RFOR(i, j, k, 1)
#define repc(v) for(auto it=v.begin(); it!=v.end(); it++)
#define T ll t; cin>>t; while(t--)

int main(){
  FAST

    ll n,s=0;
  cin>>n;
  rep(i,1,n+1){
  	if(i%15 !=0 && i%3 !=0 && i%5 !=0)
      s+=i;
  }
  
  cout<<s;
  
  return 0;
}







Measured memory_bytes: 3648
//#pragma GCC optimize "trapv"
#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef unsigned long long int ulli;
typedef long double ld;
#define S 2000005
#define M 10000000007
#define nl cout<<"\n";
#define er  cout<<"\n***********\n";
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define test lli t;  cin>>t; while(t--)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define Y cout<<"Yes\n";
#define N cout<<"No\n";
#define print(x)                 cout<<#x<<": "<<x<<endl;
#define print2(x, y)             cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl;
#define print3(x, y, z)          cout<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl;
#define print4(a, b, c, d)       cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl;
#define print5(a, b, c, d, e)    cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl;
#define print6(a, b, c, d, e, f) cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl;
lli n,k;
lli arr[S];
bool check(lli len)
{
     lli cut=0;

     for(lli i=1;i<=n;i++)
     {
          cut=cut+arr[i]/len-(arr[i]%len==0);

     }

     return cut<=k;
}
lli bin_src()
{
     lli l=1,r=M;
     lli ans=1e15;
     while(l<=r)
     {
          lli mid=(l+r)/2;

          bool res=check(mid);

          if(res)
          {
               r=mid-1;

               ans=min(ans,mid);
          }
          else
          {
               l=mid+1;
          }

     }

     return ans;

}
void solve()
{
     

     cin>>n>>k;

     for(lli i=1;i<=n;i++)
     {
          cin>>arr[i];
     }
     lli ans=bin_src();
     cout<<ans;



}
int main()
{
    fast
    #ifndef ONLINE_JUDGE
     freopen("inputa.txt", "r", stdin);
     freopen("outputa.txt", "w", stdout);
    #endif    
     
     // test
     {
          solve();
          nl
     }
}
//a+b=a?b+2?(a&b)
//__builtin_popcount(number)
//cout<<fixed<<setprecision(8)<<output<<"\n";




Measured memory_bytes: 5128
#include <bits/stdc++.h>
typedef long long ll;

using namespace std;

int main() {
	double n, m, d;
	cin >> n >> m >> d;

	double res = 0.0;
	if (d == 0) {
		res = (m - 1) / n;
	} else {
		res = ((m - 1) * (n - d) * 2) / (n * n);
	}

	cout.precision(10);
	cout << fixed << res << endl;
	return 0;
}


Measured memory_bytes: 256
import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int oneStart = 0;
    int zeroStart = 0;
    for (int i = 0; i < S.length(); i += 2) {
      if (S.charAt(i) == '0')
        oneStart++;
    }
    for (int i = 1; i < S.length(); i += 2) {
      if (S.charAt(i) == '1')
        oneStart++;
    }

    for (int i = 0; i < S.length(); i += 2) {
      if (S.charAt(i) == '1')
        zeroStart++;
    }
    for (int i = 1; i < S.length(); i += 2) {
      if (S.charAt(i) == '0')
        zeroStart++;
    }
    System.out.println(Math.min(oneStart, zeroStart));
  }
}


Measured memory_bytes: 24824
#include <iostream>
#include <vector>
#include <string>
#include <cfenv>
#include <cmath>
#include <string>
#include <algorithm>
#include <cassert>
#include <functional>
#include <deque>
#define rep(i,n) for(int i=0; i<(n); i++)
using ll = long long;
using namespace std;

int main(){
  int n,m;
  int sum = 0;
  cin >> n >> m;
  vector<int> v(n);
  rep(i,n){
    cin >>v[i];
    sum += v[i];
  }
  sort(v.begin(),v.end());
  if(4*m*v[n-m] < sum){
    cout << "No";
  }
  else{
    cout << "Yes";
  }
  return 0;
}


Measured memory_bytes: 256
import java.util.*;
public class Main {
    
    static void solve(){
        Scanner sc = new Scanner(System.in);
        int fives = 0, seven = 0;
        int[] a = {sc.nextInt(),sc.nextInt(),sc.nextInt()};
        for(int i : a){
            if(i==5) fives++;
            if(i==7) seven++;
        }
        System.out.println(((fives==2)&&(seven==1)) ? "YES" : "NO");
        sc.close();
    }
    
    public static void main(String args[]) {
        solve();
    }
}

Measured memory_bytes: 35508
N = int(input())

n = 0
while N//(10**n)>0:
    n += 1

    
l = [3,5,7]

ans = 0

while l[0]<=10**n:
    m = []
    for i in l:
        m.append(i*10+3)
        m.append(i*10+5)
        m.append(i*10+7)
    for i in m:
        if i <= N and len(set(list(str(i))))==3:
            ans += 1
    l = m[:]

print(ans)

Measured memory_bytes: 7108
#include "iostream"
#include <stdio.h>
#include <algorithm>
#include <stdlib.h>
#include <cstring>
#include <math.h>
#include <cctype>
#include <stack>
#include <vector>
#include <list>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <iomanip>
using namespace std;
using ll=long long;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define MOD  1000000007

int F[110][20],P[110][20];
int main(int argc, char const *argv[]) {
  int n; std::cin >> n;
  for(int i=0; i<n; i++){
    for(int j=0; j<10; j++){
      std::cin >> F[i][j];
    }
  }
  for(int i=0; i<n; i++){
    for(int j=0; j<11; j++){
      std::cin >> P[i][j];
    }
  }
  ll ans=-(1<<30);

  for(int bit=1; bit<(1<<10); bit++){
    ll can=0;
    for(int i=0; i<n; i++){
      int cnt=0;
      for(int j=0; j<10; j++){
        if(bit & (1<<j) && F[i][j]) cnt++;
      }
      can+=P[i][cnt];
    }
    if(ans<can) ans=can;
  }

  std::cout << ans << '\n';

  return 0;
}


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

struct state{
  int n,lx,ly,ux,uy;
  state(int n=0,int lx=0,int ly=0,int ux=0, int uy=0):n(n),lx(lx),ly(ly),ux(ux),uy(uy){}
  bool operator < (const state &s) const {
    return lx == s.lx ? ly < s.ly : lx < s.lx;
  }
};

int n,a[10],cnt;
bool f[10];
vector<state> in;

void func(vector<state> v){
  int c;
  sort(v.begin(), v.end());

  for(int i=0;i<v.size();i++){
    if(f[v[i].n]) continue;
    vector<state> v2;
    
    a[v[i].n] = cnt++;
    f[v[i].n] = true;

    c = v.size();
    for(int j=i+1;j<v.size();j++){
      if(v[j].ly < v[i].uy && v[j].uy > v[i].uy){
	c = j;
	break;
      }
    }
    for(int j=i+1;j<c;j++){
      if(!f[v[j].n] && (c == v.size() || v[c].lx >= v[j].ux) && v[j].uy <= v[i].uy){
	v2.push_back(v[j]);
      }
    }
    if(v2.size() > 0) func(v2);

  }

}

void solve(){
  fill(a,a+10,0);
  fill(f,f+10,false);
  cnt = 1;
  func(in);

  for(int i=0;i<n;i++) cout << a[i] << endl;
}

int main(){
  bool f = false;
  while(cin >> n && n){
    in.clear();
    if(f) cout << endl;
    else f = true;
    for(int i=0;i<n;i++){
      int x,y,x2,y2;
      cin >> x >> y >> x2 >> y2;
      in.push_back(state(i,min(x,x2),min(y,y2),max(x,x2),max(y,y2)));
    }
    solve();
  }
}

Measured memory_bytes: 1200
#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define fio ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;

const int N = 4005;
string a,b;
int n;

int pl[N],pr[N];
int pfl[N],pfr[N];

vector<pii> v;

int main() {
	fio;
	cin >> a >> b;
	if(a==b) {
		cout << "0\n";
		return 0;
	}
	n = a.size();
	int last = -1;
	for(int i = 0; i < 2*n; ++i) {
		if(b[i%n] == '1')
			last = i;
		if(i >= n)
			pl[i-n] = i-last;
	}
	if(last == -1) {
		cout << "-1\n";
		return 0;
	}
	last = 2*n;
	for(int i = 2*n-1; i >= 0; --i) {
		if(b[i%n] == '1')
			last = i;
		if(i < n)
			pr[i] = last-i;
	}

	int ans = 1<<26;
	for(int s = 1-n; s < n; ++s) {
		string c = a;
		for(int i = 0; i < n; ++i) {
			int j = (i+s+n)%n;
			c[i] = a[j];
		}
		v.clear();
		for(int i = 0; i < n; ++i) {
			if(c[i] != b[i]) {
				v.emplace_back(pl[i],pr[i]);
			}
		}
		int base_l=0,base_r=0;
		if(s < 0) base_l = -s;
		if(s > 0) base_r = s;
		sort(v.begin(),v.end());
		pfl[0] = pfr[0] = 0;
		for(int i = 1; i <= v.size(); ++i) {
			pfl[i] = max(pfl[i-1],v[i-1].fi);
			pfr[i] = max(pfr[i-1],v[v.size()-i].se);

		}

		//iter on max l
		for(int i = 0; i <= v.size(); ++i) {
			int max_l = pfl[i], max_r = pfr[v.size()-i];
			int r = v.size();
			r += 2*(max(base_r,max_r) - base_r);
			r += base_r;
			r += 2*(max(base_l,max_l) - base_l);
			r += base_l;
			ans = min(ans,r);
		}
	}
	cout << ans << "\n";
}

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

using namespace std;

int main(void) {
  string s[2];
  cin >> s[0] >> s[1];

  bool yes = true;
  for (int i = 0; i < 3; i++) {
    yes &= s[0][i] == s[1][2 - i];
  }
  cout << (yes ? "YES" : "NO") << endl;

  return 0;
}

Measured memory_bytes: 256
#pragma region macro
#include <bits/stdc++.h>
using i64 = int_fast64_t;
#define repeat(i, a, b) for(int i = (a); (i) < (b); ++(i))
#define rep(i, n) repeat(i, 0, n)

namespace std {
template <typename A, typename B>
string to_string(pair<A, B> p);

string to_string(const string &s) {
    return '"' + s + '"';
}

string to_string(const char *s) {
    return to_string((string)s);
}

string to_string(bool b) {
    return (b ? "true" : "false");
}

string to_string(vector<bool> v) {
    bool first = true;
    string res = "{";
    for(int i = 0; i < static_cast<int>(v.size()); i++) {
        if(!first) {
            res += ", ";
        }
        first = false;
        res += to_string(v[i]);
    }
    res += "}";
    return res;
}

template <size_t N>
string to_string(bitset<N> v) {
    string res = "";
    for(size_t i = 0; i < N; i++) {
        res += static_cast<char>('0' + v[i]);
    }
    return res;
}

template <typename A>
string to_string(A v) {
    bool first = true;
    string res = "{";
    for(const auto &x : v) {
        if(!first) {
            res += ", ";
        }
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
    return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
};  // namespace std
#pragma endregion

void solve() {
    i64 n, k;
    std::cin >> n >> k;
    std::vector<std::pair<i64, i64>> p(n);
    rep(i, n) {
        std::cin >> p[i].first >> p[i].second;
    }
    std::sort(p.begin(), p.end());
    i64 now = 0;
    rep(i, n) {
        now += p[i].second;
        if(now >= k) {
            std::cout << p[i].first << std::endl;
            return;
        }
    }
}

int main() {
    // std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    solve();
    return 0;
}

Measured memory_bytes: 1792
#include <stdio.h>

int Fibonacci(int);
int F[45];

int main(){
    int n,f;
    scanf("%d",&n);
    f = Fibonacci(n);
    printf("%d\n",f);
    
    return 0;    
}

int Fibonacci(int n){
    int i;
    F[0] = 1;
    F[1] = 1;
    for(i=2; i<=n; i++){
        F[i] = F[i-1] + F[i-2];
    }
     return F[n];
}

Measured memory_bytes: 596
#include<stdio.h>
int main(){
    int a, b, c, k;
    scanf("%d %d %d %d", &a, &b, &c, &k);
    int *higher = &a;
    if(b>*higher) higher = &b;
    if(c>*higher) higher = &c;
    for(int i=0; i<k;i++){
        *higher *= 2;
    }
    printf("%i\n", a+b+c);
    return 0;
} 

Measured memory_bytes: 128
#include<cmath>
#include<cstdio>
using namespace std;

inline int read()
{
	int x = 0, f = 1; char ch = getchar();
	for (; ch < '0' || ch > '9'; ch = getchar()) if (ch == '-') f = -1;
	for (; ch >= '0' && ch <= '9'; ch = getchar()) x = (x << 1) + (x << 3) + ch - '0';
	return x * f;
}

const double pi = acos(-1.0);
const int N = 3e3 + 5;

double t[N];

int main()
{
	int n = read();
	int L = read();
	for (int i = 1; i <= n; ++i) t[i] = read();
	
	double ansx = 0.0;
	double ansy = 0.0;
	for (int i = 1; i <= n; ++i)
		for (int j = i + 1; j <= n; ++j)
		{
			double ang = 1.0 * (t[i] + t[j]) * pi / L;
			double x = cos(ang);
			double y = sin(ang);
			
			ansx += x * (n - 2 * (j - i));
			ansy += y * (n - 2 * (j - i));
		}
	
	long long m = 1LL * n * (n - 1) * (n - 2) / 6;
	printf("%.12f %.12f\n", ansx / m, ansy / m);
	
	return 0;
}


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

int main() {
  int n;
  cin >> n;
  vector<vector<int>> a(2, vector<int>(n));
  rep(i, 2) {
    rep(j, n) {
      cin >> a[i][j];
    }
  }
  int tot = a[1][n - 1];
  rep(i, n) {
    tot += a[0][i];
  }
  int ans = tot;
  for (int i = n - 1; i > 0; i--) {
    tot += a[1][i - 1] - a[0][i];
    ans = max(ans, tot);
  }
  cout << ans << endl;
  return 0;
}

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

using namespace std;

using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for(ll i=0;i<(ll)(n);i++)
#define rep2(i, m, n) for(ll i=m;i<(ll)(n);i++)
#define rrep(i, n, m) for(ll i=n;i>=(ll)(m);i--)
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
const int ddx[8] = {0, 1, 1, 1, 0, -1, -1, -1};
const int ddy[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const ll MOD = 1000000007;
const ll INF = 1000000000000000000L;
#ifdef __DEBUG

/**
 * For DEBUG
 * https://github.com/ta7uw/cpp-pyprint
 */
#include "cpp-pyprint/pyprint.h"

#endif

void solve() {
    ll A, B, C;
    cin >> A >> B >> C;
    ll K;
    cin >> K;
    bool ok = false;
    rep(i, K + 1) {
        rep(j, K - i + 1) {
            rep(k, K - i - j + 1) {
                ll a = A * pow(2, i);
                ll b = B * pow(2, j);
                ll c = C * pow(2, k);
                if (c > b && b > a) {
                    ok = true;
                }
            }
        }
    }
    if (ok) {
        cout << "Yes" << '\n';
    } else {
        cout << "No" << '\n';
    }
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    solve();
    return 0;
}


Measured memory_bytes: 4112
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
const int INF=1e9,MOD=1e9+7,ohara=1e6+10;
const ll LINF=1e18;
using namespace std;
    
#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define Size(n) (n).size()
#define Cout(x) cout<<(x)<<endl
#define doublecout(a) cout<<fixed<<setprecision(15)<<a<<endl;
#define Cerr(x) cerr<<(x)<<endl
#define fi first
#define se second
#define P pair<ll,ll> 
#define m_p make_pair
#define V vector<ll> 
#define U_MAP unordered_map<ll,ll>
#define pq priority_queue<ll>
#define rpq priority_queue<ll,vector<ll>,greater<ll>>
#define p_b push_back
    
ll n,cnt,ans,a,b,c,d,tmp,tmpp,m,h,w,x,y,sum,pos,k;
ld doua;
int dy[]={1,0,-1,0};
int dx[]={0,1,0,-1};
//int dy[]={-1,0,1,-1,1,-1,0,1};
//int dx[]={-1,-1,-1,0,0,1,1,1};
string alph("abcdefghijklmnopqrstuvwxyz"),s;
bool fl;
struct edge{int to,cost;};
    
//-------------------------↓↓↓↓↓↓------------------------
    
//------ 自分を天才だと信じる ------
    
int main(void){
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    
    cin>>a>>b>>c>>d;
    if(c==-1||d==-1){
        if(a==b)Cout("Draw");
        else if(a>b)Cout("Bob");
        else Cout("Alice");
    }
    else{
        if(c==d)Cout("Draw");
        else if(c<d)Cout("Bob");
        else Cout("Alice");
    }
    return 0;
}


Measured memory_bytes: 3220
def main():
    n=int(input())
    s=input()
    ans=0
    f00=[False if str(i) in set(str(s)) else True for i in range(10)]
    f0=f00.copy()
    for i0 in range(n-2):
        if all(f0):
            break
        if not f0[int(s[i0])]:
            f1=f00.copy()
            for i1 in range(i0+1,n-1):
                if all(f1):
                    break
                if not f1[int(s[i1])]:
                    ans+=len( set( s[i1+1:] ) )
                    f1[int(s[i1])]=True
        f0[int(s[i0])]=True
    print(ans)
if __name__ == '__main__':
    main()

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

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<vpii> vvpii;

#define mt make_tuple
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sqr(x) ((ll)(x) * (x))

const int MAXN = 2e5;

int l[MAXN+1], r[MAXN+1];

void debug(int granica)
{
    for(int i = 1; i <= granica; ++i)
    {
        cout << l[i] << ' ';
    }
    cout << '\n';
    for(int j = 1; j <= granica; ++j)
    {
        cout << r[j] << ' ';
    }
    cout << '\n';
}

int main()
{
    int n, k, c;
    cin >> n >> k >> c;
    string s;
    cin >> s;

    int pokazivac = 1;

    for(int i = 0; i < n && pokazivac <= k; ++i)
    {
        if(s[i]=='o')
        {
            l[pokazivac++]=i+1;
            i += c;
        }
    }

    pokazivac = k;

    for(int i = n-1; i >= 0 && pokazivac > 0; --i)
    {
        if(s[i]=='o')
        {
            r[pokazivac--]=i+1;
            i -= c;
        }
    }

    //debug(20);

    for(int i = 1; i <= k; ++i)
    {
        if(l[i]==r[i])
        {
            cout << l[i] << '\n';
        }
    }

    return 0;
}


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

int main() {
  size_t N;
  std::cin >> N;

  std::vector<size_t> V;
  std::vector<size_t> C;
  for (size_t i = 0; i < N; i++) {
    size_t v;
    std::cin >> v;
    V.emplace_back(v);
  }
  for (size_t i = 0; i < N; i++) {
    size_t c;
    std::cin >> c;
    C.emplace_back(c);
  }

  size_t result = 0;
  for (size_t i = 0; i < N; i++) {
    if (V[i] > C[i]) {
      result += (V[i] - C[i]);
    }
  }

  std::cout << result << std::endl;
  return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <utility>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <string.h>
#include <deque>
#define REP(i,j,n) for(int i=j;i<n;i++)
#define SORT(x) sort(x.begin(),x.end())

using namespace std;



int main() {
	vector<int> v(5);
	REP(i, 0, 5) cin >> v[i];
	SORT(v);
	for (int i = 4; i > -1;i--) {
		if(i!=0)  cout << v[i] <<" ";
		else cout << v[i] << endl;
	}

	return 0;
}

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

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


Measured memory_bytes: 256
from bisect import bisect_left, bisect_right

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
a.sort()
b.sort()
c.sort()
len_c = len(c)
total = 0
for num in b:
    idx_a = bisect_left(a, num)
    idx_c = bisect_right(c, num)
    cnt = idx_a * (len_c - idx_c)
    total += cnt
print(total)


Measured memory_bytes: 29364
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i,x) for(int i=0;i<x;i++)
#define repn(i,x) for(int i=1;i<=x;i++)
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
ll n;
ll rec(ll x){
	ll ans = 0;
	while(x){
		ans += x/5;
		x /= 5;
	}
	return ans;
}
int main(){
	cin >> n;
	if(n%2 == 0){
		cout << rec(n/2) << endl;
	}
	else{
		cout << 0 << endl;
	}
}

Measured memory_bytes: 256
def solve4():
    N, A, B, C, D = [int(_) for _ in raw_input().split()]
    A -= 1
    B -= 1
    C -= 1
    D -= 1
    S = raw_input()
    R2 = False
    E3 = False
    for i in range (A+1, max(C,D)-1):
        if S[i:(i+2)] == '##':
            R2 = True
            break
    if C == D or R2:
        return False
    elif C < D:
        return True
    elif C > D:
        for i in range (B - 1, D):
            if S[i:(i+3)] == '...':
                E3 = True
                break
        ret = E3
        return ret

if __name__ == '__main__':
    ret = solve4()
    if ret:
        print 'Yes'
    else:
        print 'No'


Measured memory_bytes: 29804
#include<bits/stdc++.h>
    using namespace std;
    #define ll long long
    #define ld double
    #define vv vector<ll>
    #define pp pair<ll,ll>
    #define ff first
    #define ss second
    #define vp vector<pp>
    #define pb push_back
    #define mp make_pair
    #define fast ios_base::sync_with_stdio(false);cin.tie(NULL);
    #define maxn 105
    const ll mod=1e9+7;
    #define N 2750135
    bool prime[N];
    ll p[N];
    ll n,m;
    void isprime()
    {
        memset(prime,true,N);
        memset(p,-1,sizeof(p));
        for(ll i=2;i<N;i++)
        {
            if(p[i]==-1)
            {
            	p[i]=i;
                for(ll j=i*i;j<N;j+=i)
                {
                    if(p[j]==-1)
                    {
                    	p[j]=i;
					}
                }
            }
        }
    }
    ll power(ll a,ll n)
    {
        ll ans=1;
        a=a%mod;
        while(n>0)
        {
            if(n&1)
            {
                ans=(ans*a)%mod;
            }
            n=n>>1;
            a=(a*a)%mod;
        }
        return ans;
    }
    ll gcd(ll a,ll b)
    {
        if(b==0)
        return a;
        
        return gcd(b,a%b);
    }
    
 
    int main()
    {
    	fast;
        ll l,r;
        cin>>l>>r;
        if(r-l-1 >=2019)
        {
        	cout<<"0"<<endl;
		}
		else
		{
			ll min=INT_MAX;
			for(ll i=l;i<r;i++)
			{
				for(ll j=l+1;j<=r;j++)
				{
					if((i*j)%2019 < min)
					{
						min=(i*j)%2019;
					}
				}
			}
			cout<<min;
		}
        
		return 0;
	}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0, i##_len = (n); i < i##_len; i++)
#define reps(i, s, n) for(ll i = (s), i##_len = (n); i < i##_len; i++)
#define rrep(i, n) for(ll i = (n) - 1; i >= 0; i--)
#define rreps(i, e, n) for(ll i = (n) - 1; i >= (e); i--)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((ll)(x).size())
#define len(x) ((ll)(x).length())

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    // ifstream in("input.txt");
    // cin.rdbuf(in.rdbuf());
    ll h;
    cin >> h;
    ll cur = 1, sum = 0;
    while(h > 0) {
        sum += cur;
        cur *= 2;
        h /= 2;
    }
    cout << sum << endl;
    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
const int maxn=2*1e5+5;
int a,n,boss[maxn]={0};
int main()
{
  cin>>n;
  for(int i=2;i<=n;i++){
    cin>>a;
    boss[a]++;
  }
  for(int i=1;i<=n;i++){
    cout<<boss[i]<<endl;
  }
  return 0;
}

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

namespace AtCoder
{
    public class ABC_080_B
    {
        public static int SumDigits(int num)
        {
            int sum = 0;
            while (num != 0)
            {
                sum += num % 10;
                num /= 10;
            }
            return sum;
        }

        public static void Main()
        {
            var n = int.Parse(Console.ReadLine());
            var sum = SumDigits(n);
            if(n%sum==0)
            {
                Console.WriteLine("Yes");
            }
            else{
                Console.WriteLine("No");
            }
            Console.Read();
        }
    }
}

Measured memory_bytes: 13140
#include<bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define int long long
#define vec(a,n) vector<int> (a)((n))
#define Vec(a,n) vector<string> (a)((n))
using namespace std;
signed main(){
	int n,ans;
	cin >> n;
	int m = n/11;
	int o = n%11;
	if(o == 0){
		cout << m*2;
	}
	else{
	(o > 6)? cout << m*2 + 2 : cout << m*2 + 1;
	}
    return 0;
}

Measured memory_bytes: 256
n,k=[int(i) for i in input().split()]
a=[0]*n
for i in range(0,n,1):
    a[i]=int(input())
a.sort(reverse=True)
sa=[1000000000]*100001
j=0
while(n!=(j+k-1)):
    sa[j]=a[j]-a[j+k-1]
    j=j+1

print(min(sa))

Measured memory_bytes: 10948
import java.util.Arrays;

public class Main {
	public static void main(String args[]) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		double N = sc.nextLong();
		double[] a = new double[5];

		for (int i = 0; i < 5; i++) {
			a[i] = sc.nextLong();
		}

		Arrays.sort(a);

		long result = (long)Math.max(Math.ceil(N/a[0]),1) + 4;

		System.out.println(result);
	}
}


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

int main() {
  int DIV = 1e+9 + 7;
  int N, M; cin >> N >> M;
  int A[N]; for (int i = 0; i < N; i++) cin >> A[i];
  bool s[N]; for (int i = 0; i < N; i++) s[i] = true;
  for (int i = 0; i < M; i++) s[A[i]-1] = false;
  long d[N+1]; d[0] = 1; d[1] = s[0];
  for (int i = 2; i <= N; i++) d[i] = s[i-1] * (d[i-1] + d[i-2]) % DIV;
  cout << d[N] << endl;
}

Measured memory_bytes: 1536
#include <iostream>
#include <map>

using namespace std;

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

  map<int, int> mp;

  for(int i = 0; i < n-1; i++){
    int a;
    cin >> a;

    mp[a]++;
  }

  int temp = 1;
  for(auto p : mp){
    for(int i = 0; i < p.first - temp; i++){
      cout << "0" << endl;
    }

    temp += p.first - temp + 1;

    cout << p.second << endl;
  }

  temp--;
  while(temp - n){
    cout << "0" << endl;
    temp++;
  }

  return 0;
}

Measured memory_bytes: 12864
#include<stdio.h>
int main() {
  int n, ans;
  while (1) {
    scanf("%d", &n);
    if (!n) break;
    for (ans = 0; n != 1; ans ++) {
      if (n % 2) {
	n *= 3; n ++;
      } else n /= 2;
    }
    printf("%d\n", ans);
  }
  return 0;
}

Measured memory_bytes: 600
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <functional>
#include <algorithm>
using namespace std;

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

#define rep(i,a) for(int i=0;i<(a);++i)
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl;

int w, h;
int field[51][51];
int dx[] = { -1, -1, -1, 0, 1, 1, 1,  0};
int dy[] = { -1,  0,  1, 1, 1, 0, -1, -1};

bool infield(int x, int y)
{
    return x >= 1 && x <= w && y >= 1 && y <= h;
}

int bfs(int sx, int sy)
{
    queue<P> que;
    que.push(P(sx, sy));
    while(!que.empty()) {
        P p = que.front(); que.pop();
        int x = p.first, y = p.second;
        if(!infield(x, y) || field[y][x] == 0)
            continue;

        field[y][x] = 0;
        for(int i = 0; i < 8; i++) {
            int nx = x + dx[i], ny = y + dy[i];
            que.push(P(nx, ny));
        }
    }
}

int main()
{
    while(cin >> w >> h && w && h) {
        for(int i = 1; i <= h; i++) 
            for(int j = 1; j <= w; j++) 
                cin >> field[i][j];

        int ans = 0;
        for(int i = 1; i <= h; i++) {
            for(int j = 1; j <= w; j++) {
                if(field[i][j] == 1) { 
                    bfs(j, i);
                    ans++;
                }
            }
        }

        cout << ans << endl;
    }
}

Measured memory_bytes: 0
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<string> vs;
#define rep(i,n) for(int i=0;i<(n);i++)
#define rep1(i,n) for(int i=1;i<=(n);i++)
#define all(x) (x).begin(),(x).end()
vi dy = { 0,0,1,-1 };
vi dx = { 1,-1,0,0 };
constexpr auto INF = INT_MAX/2;
constexpr auto MOD = 1000000007;

int main() {
	ll n;
	cin >> n;
	ll ans = 0;
	ll sqn = sqrt(n);

	rep1(i, sqn) {
		if (n % i)continue;
		if (i >= n / i - 1)continue;
		ans += n / i - 1;
	}

	cout << ans << endl;
}

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

#define _GLIBCXX_DEBUG
#define _LIBCPP_DEBUG 0

int main() {
  string s;
  cin >> s;
  if (s.at(s.size() - 1) == 's') {
    s += "es";
  } else {
    s += 's';
  }
  cout << s << endl;
}


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

using namespace std;
using ll = long long;

using Graph = vector<vector<pair<int, ll>>>;

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

  int n;
  cin >> n;
  Graph graph(n);
  for (int i = 0; i < n - 1; i++) {
    int a, b;
    ll c;
    cin >> a >> b >> c;
    a--;
    b--;
    graph[a].push_back({b, c});
    graph[b].push_back({a, c});
  }

  int q, k;
  cin >> q >> k;
  k--;

  const ll inf = 1e18;
  vector<ll> d(n, inf);

  function<void(int, ll)> dfs = [&](int cur, ll cost) {
    if (d[cur] <= cost)
      return;

    d[cur] = cost;
    for (auto [e, c] : graph[cur]) {
      dfs(e, cost + c);
    }
  };
  dfs(k, 0);

  for (int i = 0; i < q; i++) {
    int x, y;
    cin >> x >> y;
    x--;
    y--;

    cout << d[x] + d[y] << endl;
  }

  return 0;
}


Measured memory_bytes: 18744
import java.util.Scanner;


// 149_c
public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String s = sc.next();
        String t = sc.next();

        StringBuilder ans = new StringBuilder("");;

        for (int i = 0; i < n; i++) {
            ans.append(s.charAt(i));
            ans.append(t.charAt(i));
        }
        out(ans.toString());

    }

    /*
     * 以下メソッド集
     */

    static long gcd(long a, long b) {

        return (b == 0) ? a : gcd(b, a % b);
    }

    static int gcd(int a, int b) {

        return (b == 0) ? a : gcd(b, a % b);
    }

    static void out(String info) {

        System.out.println(info);
    }

    static void out(int info) {

        System.out.println(info);
    }

    static void out(double info) {

        System.out.println(info);
    }

    static void out(long info) {

        System.out.println(info);
    }

}


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

typedef long long ll;
typedef long double ld;

#define all(x) (x).begin(),(x).end()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)

ll gcd(ll a, ll b){return b ? gcd(b, a % b) : a;}

int main(){

    vector<ll> a(3);

    rep(i, 3)
        cin >> a[i];
    
    sort(all(a));

    cout << a[0] + a[1] << endl;

    return 0;
}

Measured memory_bytes: 256
#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 rep3(i, x, n) for(int i = x; i >= n; i--)
#define elif else if
#define sp(x) fixed << setprecision(x)
#define pb(x) push_back(x)
#define all(x) x.begin(), x.end()
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const ll MOD = 1e9+7;
//const ll MOD = 998244353;
const int inf = 1e9;
const ll INF = 1e18;
const ld EPS = 1e-10;

int main(){
    int N, K;
    cin >> N >> K;
    int A[N], sum = 0;
    rep(i, N){
        cin >> A[i];
        sum += A[i];
    }
    vector<int> ds;
    for(int i = 1; i*i <= sum; i++){
        if(sum%i == 0){
            ds.pb(i), ds.pb(sum/i);
        }
    }
    sort(all(ds), greater<int>());
    for(int e: ds){
        vector<int> memo;
        int s = 0;
        rep(i, N){
            memo.pb(A[i]%e);
            s += A[i]%e;
        }
        sort(all(memo), greater<int>());
        int cnt = 0;
        rep(i, s/e) cnt += e-memo[i];
        if(cnt <= K){
            cout << e << endl;
            break;
        }
    }
}

Measured memory_bytes: 256
package main

import "fmt"

func main() {
        var n, a int
        fmt.Scan(&n)
        fmt.Scan(&a)
        if a/500 > 1 {
                fmt.Println("Yes")
                return
        }
        if n%500 <= a {
                fmt.Println("Yes")
                return
        }
        fmt.Println("No")
}

Measured memory_bytes: 512
import sys
readline = sys.stdin.readline
write = sys.stdout.write
def solve():
    N = int(readline())
    if N == 0:
        return False
    P = [list(map(float, readline().split())) for i in range(N)]
    CS = []
    R = [-1]*N
    for i in range(N):
        pxi, pyi, pzi, vxi, vyi, vzi, ri, vri = P[i]
        R[i] = ri / vri
    for i in range(N):
        pxi, pyi, pzi, vxi, vyi, vzi, ri, vri = P[i]
        for j in range(i+1, N):
            pxj, pyj, pzj, vxj, vyj, vzj, rj, vrj = P[j]
            X0 = pxi - pxj; X1 = vxi - vxj
            Y0 = pyi - pyj; Y1 = vyi - vyj
            Z0 = pzi - pzj; Z1 = vzi - vzj
            R0 = ri + rj; R1 = - vri - vrj
            A = X1**2 + Y1**2 + Z1**2 - R1**2
            B = 2*X0*X1 + 2*Y0*Y1 + 2*Z0*Z1 - 2*R0*R1
            C = X0**2 + Y0**2 + Z0**2 - R0**2
            D = B**2 - 4*A*C
            if D < 0:
                continue
            DS = D**.5
            if - B - DS > 0:
                t = (- B - DS) / (2*A)
                if t < R[i] and t < R[j]:
                    CS.append((t, i, j))
    CS.sort()
    U = [0]*N
    for t, a, b in CS:
        if U[a] or U[b]:
            continue
        U[a] = U[b] = 1
        R[a] = R[b] = t
    for i in range(N):
        write("%.16f\n" % R[i])
    return True
while solve():
    ...


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

int N, K;
int num = 1, ans = 0;
bool D[10];

int main () {
  cin >> N >> K;
  ans = N;

  for (int i = 0; i < K; i++){
    int n;
    cin >> n; 
    D[n] = 1;
  }
  
  while(1){
    num = ans;
    
    while(num > 0){
      if (D[num % 10]) {
        break;
      }
      num /= 10;
    }
    if(num == 0) {
      break;
    }
    ans++;
  }
  cout << ans << endl;
}

Measured memory_bytes: 256
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<climits>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<numeric>
#include<map>
#include<set>
#include<bitset>
using namespace std;
#define REP(i,m,n) for(int i = m; i < n; i++)
#define rep(i,n) REP(i,0,n)
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a)  (a).rbegin(),(a).rend()
#define MOD 1000000007
typedef long long LL;
template<class T> inline void chmax(T & a, T b) { if (a < b) { a = b; } }
template<class T> inline void chmin(T& a, T b) { if (a > b) { a = b; } }
template<class T> void print_vector(vector<T> vec) {
	cout << "[ ";
	for (int i = 0; i < vec.size(); i++) {
		cout << vec[i] << " ";
	}
	cout << "]" << endl;
}
template<class T> void print_pair_vector(vector<pair<T, T> > vec) {
	cout << "[ ";
	for (int i = 0; i < vec.size(); i++) {
		cout << "(" << vec[i].first << "," << vec[i].second << ") ";
	}
	cout << "]" << endl;
}

int main(void) {
	int x, y, p, q;
	cin >> x >> y >> p >> q;

	vector<int> vertical_vec = { q - y, -(p - x) };
	printf("%d %d %d %d\n", p - vertical_vec[0], q - vertical_vec[1], x - vertical_vec[0], y - vertical_vec[1]);
	return 0;
}


Measured memory_bytes: 256
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

s = ns()
k = ni()
ans = []

for i in range(len(s)):
    ans.append(s[i])
    if i < len(s)-1:
        t = i+2
        while True:
            ans.append(s[i:t])
            if t == len(s):
                break
            t += 1
            if t - i > 5:
                break

ans = list(set(ans))
ans.sort()
print(ans[k-1])


Measured memory_bytes: 5084
#include<stdio.h>

void main(){
	int i;
  	int x[5];
  	(void)scanf("%d %d %d %d %d", &x[0], &x[1], &x[2], &x[3], &x[4]);
	for(i=0;i<5;i++){
    	if(x[i]==0){
        	printf("%d",i+1);
        }
    }
}
  

Measured memory_bytes: 1728
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>

int N;
std::map<int,int> D;
int M;

int main(){
    std::cin >> N;
    for(int i=0; i<N; ++i){
        int d;
        std::cin >> d;
        D[d]++;
    }
    bool f = true;
    std::cin >> M;
    for(int i=0; i<M; ++i){
        int t;
        std::cin >> t;
        if(D[t] > 0){
            D[t]--;
        }else{
            f = false;
            break;
        }
    }
    std::cout << (f ? "YES" : "NO") << std::endl;
    return 0;
}

Measured memory_bytes: 9600
#include <iostream>

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

  if (a * b > d * c) {
    std::cout    <<  a * b  << std::endl;
  } else {
    std::cout << c * d << std::endl;
  }
  return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
 
 
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3") 
#pragma GCC optimization ("unroll-loops")
 
// #include <ext/pb_ds/detail/standard_policies.hpp>
using namespace std;
using namespace __gnu_pbds;
// const ll RANDOM = chrono::high_resolution_clock::now().time_since_epoch().count();
// gp_hash_table<int, int> table;
 
#define ll  long long
#define vii vector< ll >
#define pb push_back
#define pii pair<ll,ll>
#define ppi pair<pii,ll>
#define all(x) x.begin(),x.end()
#define S second
#define F first
#define ins insert
#define ld long double
#define lp(l,r) for(i=l;i<=r;++i)
 
#define lpj(l,r) for(j=l;j<=r;++j)
#define lpr(l,r) for(i=r;i>=l;--i)
#define lprj(l,r) for(j=r;j>=l;--j)
 
#define swap(a,b){ auto _t=a;a=b,b=_t;}
#define flush() cout.flush()
#define popcount __builtin_popcount
#define die() return 0;
#define sz() size() 


 
 
#define TRACE
 
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif
 
#define MD          1000000007
#define M 			100011
#define LN             14
#define fftmod      998244353
#define EPS         (double)1e-10
 
long long  md=MD;
ll inf=1e18;
 
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); 
 
 
inline ll exp(ll a,ll b){if(a==0&&b==0)return 1ll;if(a==0)return 0ll;ll r=1LL;while(b>0){if(b&1){r=(r%md)*(a%md);r=(r+md)%md;}b/=2;a=(a%md)*(a%md);a=(a+md)%md;}return (r+md)%md;}
ll gcd(ll a,ll b){if(b==0)return a;if(a==0)return b;return gcd(b,a%b);}
inline ll poww(ll a,ll b){ll r=1LL;while(b>0){if(b&1)r=r*a;b/=2;a=a*a;}return (ll)r;}
 
using cd=complex<double>;
const double PI=acos(-1);
 
inline ll rand(ll l,ll r){
    return l+rng()%(r-l+1);
 
}

ll a[M],b[M];



int main(){
 
     
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
 
 
   // ifstream fin("input.txt");ofstream fout("outut.txt");
    ll t,i,j,m,n,s,z,k,p;string s1,s2;ll q;ll x,y;
    cin>>n;
    lp(1,n)cin>>a[i],b[i]=a[i];
    lp(1,n)a[i]=gcd(a[i],a[i-1]);
    lpr(1,n)b[i]=gcd(b[i],b[i+1]);
    p=0;
    lp(1,n)p=max(p,gcd(b[i+1],a[i-1]));
    cout<<p<<"\n";



    	






    

}



Measured memory_bytes: 1792
#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define All(V) v.begin(), v.end()
typedef long long int ll;
typedef pair<int, int> P;
const ll MOD = 1e9+7, INF = 1e9;

int main()
{
  string s, t; cin >> s >> t;
  int u = stoi(s+t);
  for(int i = 1; i*i <= u; i++){
    if(i == pow(u, 0.5)){
      cout << "Yes" << endl;
      return 0;
    }
  }
  cout << "No" << endl;
  system("pause");
}


Measured memory_bytes: 504
#include<bits/stdc++.h>
#define int long long
#define p pair<int, int>
#define endl '\n'
const int INF = 1000000001;
const long double E = 0.00000001;

using namespace std;

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int n, k;
    cin >> n;
    map<int, int> a;
    int sum = 0;
    for (int q = 0; q < n; q++){
        int w;
        cin >> w;
        sum += w, a[w]++;
    }
    cin >> k;
    for (int q = 0; q < k; q++){
        int x, y;
        cin >> x >> y;
        if (a.find(x) != a.end()){
            sum += a[x]*(y-x);
            a[y] += a[x];
            a.erase(x);
        }
        cout << sum << endl;
    }
    return 0;
}


Measured memory_bytes: 7572
#include <fstream>
#include <iostream>
#include <functional>
#include <algorithm>
#include <sstream>
#include <cstring>
#include <vector>
#include <string>
#include <cstdio>
#include <cmath>
#include <queue>
#include <stack>
#include <deque>
#include <ctime>
#include <list>
#include <set>
#include <map>
#include <bitset>
using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#define CASET int ___T; scanf("%d", &___T); for(int cs=1;cs<=___T;cs++)
#define MS0(X) memset((X), 0, sizeof((X)))
#define MS1(X) memset((X), -1, sizeof((X)))
#define EPS 1e-8
#define LL_INF 0x3fffffffffffffff
#define INF 0x3f3f3f3f3f3f3f3f
#define MEM(a, b) memset(a, b, sizeof(a))
#define PPER(i, n, m) for (int i = n; i >= m; i--)
#define REPP(i, n, m) for (int i = n; i <= m; i++)
#define REP(i, n, m) for (int i = n; i < m; i++)
#define PER(i, n, m) for (int i = n; i > m; i--)
#define SA(n) scanf("%d", &(n))
#define SLLA(n) scanf("%lld", &(n))
#define MP make_pair
#define FF first
#define SS second
#define PB push_back
#define DE(val) cout << #val << ": " << val << endl;

const int dx44[6] = {0, -1, -1, 1, 1};
const int dy44[6] = {0, -1, 1, -1, 1};
const int dx4[6] = {0, 1, 0,-1};
const int dy4[6] = {-1, 0, 1,0};
const int dx8[9] = {0, -1, 0, 1, 0, 1, 1, -1, -1};
const int dy8[9] = {0, 0, 1, 0, -1, 1, -1, 1, -1};
const int dx82[9] = {0, -1, -1, 1, 1, 2, 2, -2, -2};
const int dy82[9] = {0, 2, -2, 2, -2, 1, -1, 1, -1};
void update(ll& x,ll v){
    if(x==-1)x=v;
    else if(x>v)x=v;
}

ll po(ll a, ll b, ll mod)
{
    ll res = 1;
    a %= mod;
    for (; b; b >>= 1)
    {
        if (b & 1)
            res = res * a % mod;
        a = a * a % mod;
    }
    return res;
}
ll gcd(ll a, ll b)
{
    if (a == 0)
    {
        return b;
    }
    else
    {
        return gcd(b % a, a);
    }
}
void extgcd(ll a, ll b, ll &d, ll &x, ll &y)
{
    if (!b)
    {
        d = a;
        x = 1;
    }
    else
    {
        extgcd(b, a % b, d, y, x);
        y -= x * (a / b);
    }
}
ll inverse(ll a, ll n)
{
    ll d, x, y;
    extgcd(a, n, d, x, y);
    return d == 1 ? (x + n) % n : -1;
}
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
const int maxn = 3e5 + 5;
const double PI = acos(-1.0);
const ll mod = 1e9 + 7;
/*************************************************************************/


void solve() {
    std::vector<string> v = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
    string cur;
    cin>>cur;
    if(cur == "SUN") {
        cout<<7<<endl;
    } else {
        REP(i,0,v.size()) {
            if(v[i] == cur) {
                cout<<7-i<<endl;
            }
        }
    }
}


int main()
{
#ifndef ONLINE_JUDGE
  //freopen("i.txt", "r", stdin);
  //freopen("o.txt", "w", stdout);
#endif
  solve();
  return 0;
}





Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
#define pb push_back
#define mod 1000000007
#define inf 10000000007
#define ff first
#define ss second
#define endl "\n"
#define IOS ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

int main()
{
    IOS
    int a,b,c;
    cin>>a>>b>>c;
    int ans = a*10 + b + c;
    ans = max(ans,b*10 + a+c);
    ans = max(ans,c*10 + a+b);
    cout<<ans;
    return 0;

}


Measured memory_bytes: 256