akhauriyash/Code-Regression huggingface dataset:
#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<cstdlib>
#include<string>
#include<algorithm>
#include<map>
#include<iomanip>
#include<limits>
#include<queue>
#include<set>
#include<cstdio>
#include<climits>
#include<cstring>

using namespace std;


int main(){

    int N,T;
    cin >> N >> T;

    int t[N];

    for(int i = 0;i < N;i++){
    	cin >> t[i];
    }

    int ans = 0;

	for(int i = 0;i < N-1;i++){
	    if(t[i] + T<=t[i+1]){
	    	ans += T;
	    }else{
	    	ans += t[i+1] - t[i];
	    }
	}

	ans += T;

	cout << ans << endl;

    return 0;

}


Measured memory_bytes: 1024
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner s= new Scanner(System.in);
        String a = s.next();
        String b =s.next();
        if(a.length()+1 == b.length()){
            String res = "Yes";
            for(int i = 0;i<a.length();i++) {
                if (a.charAt(i) != b.charAt(i)) {
                    res = "No";
                }
            }
            System.out.println(res);
        }
        else System.out.println("No");
    }
}

Measured memory_bytes: 35632
#include <bits/stdc++.h>
using namespace std;
#define all(c) (c).begin(),(c).end()
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define REP(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++)
#define mem(a) memset(a,0,sizeof(a))
#define pd(a) printf("%.10f\n",a)
#define pb(a) push_back(a)
#define in(a) insert(a)
#define pi M_PI
#define R cin>>
#define F first
#define S second
#define C class
#define ll long long
#define ln cout<<'\n'
#define _(_1,_2,_3,N,...)N
#define pr(...) _(__VA_ARGS__,pr3,pr2,pr1)(__VA_ARGS__)
template<C T>void pr1(T a){cout<<a;ln;}
template<C T,C T2>void pr2(T a,T2 b){cout<<a<<' '<<b;ln;}
template<C T,C T2,C T3>void pr3(T a,T2 b,T3 c){cout<<a<<' '<<b<<' '<<c;ln;}
template<C T>void PR(T a,int n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;}
bool check(int n,int m,int x,int y){return x>=0&&x<n&&y>=0&&y<m;}
const ll MAX=1000000007,MAXL=1LL<<60,dx[4]={-1,0,1,0},dy[4]={0,1,0,-1};
typedef complex<double> P;
typedef pair<P,P> L;
const double EPS = 1e-8;
namespace std {
  bool operator < (const P& a, const P& b){
    return fabs(real(a)-real(b))<EPS?imag(a)<imag(b):real(a)<real(b);
  }
}
double dot(P a, P b){return real(conj(a)*b);}
double cross(P a, P b){return imag(conj(a)*b);}
int ccw(P a, P b, P c){
  b-=a;c-=a;
  if(cross(b,c)>EPS) return 1;
  if(cross(b,c)<-EPS) return -1;
  if(dot(b,c)<-EPS) return 2;
  if(norm(b)<norm(c)) return -2;
  return 0;
}
P crossPoint(L l, L m){
  double A = cross(l.second - l.first, m.second - m.first);
  double B = cross(l.second - l.first, l.second - m.first);
  if(fabs(A) < EPS && fabs(B) < EPS) return m.first;
  else if(fabs(A) >= EPS) return m.first + B / A * (m.second - m.first);
}
double area(vector<P> v){
  double sum=0.0;
  int n=v.size();
  for(int i=0;i<n;i++) sum+=(real(v[i])-real(v[(i+1)%n]))*(imag(v[i])+imag(v[(i+1)%n]));
  return fabs(sum)/2;
}
vector<P> convex_cut(vector<P> G, L l){
  vector<P> ans;
  for(int i=0;i<G.size();i++){
    P A = G[i];
    P B = G[(i+1)%G.size()];
    if(ccw(l.first, l.second, A) != -1) ans.push_back(A);
    if(ccw(l.first, l.second, A) * ccw(l.first, l.second, B) < 0)
      ans.push_back(crossPoint(L(A,B), l));
  }
  return ans;
}

void Main() {
  int n;
  R n;
  vector<P> p;
  rep(i,n) {
    double x,y;
    cin >> x >> y;
    p.pb(P(x,y));
  }
  int m;
  R m;
  rep(i,m) {
    double x1,y1,x2,y2;
    cin >> x1 >> y1 >> x2 >> y2;
    vector<P> v=convex_cut(p,L(P(x1,y1),P(x2,y2)));
    pd(area(v));
  }
}

int main() {
  ios::sync_with_stdio(0);cin.tie(0);
  Main();return 0;
}


Measured memory_bytes: 1292
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
#define REP(i, n) for (ll i = 0; i < (n); ++i)
#define OUT(x) cout << (x) << endl;
#define OUTA(a, n) \
    REP(i, n) { cout << (a[i]) << (i == n - 1 ? "\n" : " "); }
#define ALL(a) (a).begin(), (a).end()
#define SORT(a) sort(ALL(a))
#define RSORT(a) \
    SORT(a);     \
    reverse(ALL(a))

const ll INF = 1e18;
const ll MOD = 1e9 + 7;

ll N;
vi X;

int main()
{
    cin >> N;
    X = vi(N);
    REP(i, N)
    {
        cin >> X[i];
    }

    ll ans = INF;
    REP(i, 101)
    {
        ll s = 0;
        REP(j, N)
        {
            s += (X[j] - i) * (X[j] - i);
        }
        ans = min(s, ans);
    }

    OUT(ans);
}


Measured memory_bytes: 256
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
from pprint import pprint
from copy import deepcopy
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
from pprint import pprint


sys.setrecursionlimit(2147483647)
INF = 10 ** 15
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


n, l = LI()
A = LI()
ret = 0
j = 0
for i in range(n - 1):
    if A[i] + A[i + 1] > ret:
        ret = A[i] + A[i + 1]
        j = i

if ret >= l:
    print('Possible')
    for k in range(j):
        print(k + 1)
    for m in range(n - 1, j + 1, -1):
        print(m)
    print(j + 1)
else:
    print('Impossible')


Measured memory_bytes: 59248
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <vector>
#include <iostream>
#include <cmath>
using namespace std;
#define lson l,(l+r)/2,rt<<1
#define rson (l+r)/2+1,r,rt<<1|1
#define dbg(x) cout<<#x<<" = "<< (x)<< endl
#define pb push_back
#define fi first
#define se second
#define ll long long
#define sz(x) (int)(x).size()
#define pll pair<long long,long long>
#define pii pair<int,int>
int cnt[300];
int main(){
    int n;
    scanf("%d",&n);
    vector<pii> b,r;
    for(int i=1;i<=n;i++){
        int x,y;
        cin>>x>>y;
        r.pb({y,x});
    }
    for(int i=1;i<=n;i++){
        int x,y;
        cin>>x>>y;
        b.pb({y,x});
    }
    sort(b.begin(),b.end());
    sort(r.begin(),r.end());
    int res=0,p=0;
    for(int i=0;i<n;i++){
        while(p<n && r[p]<b[i])cnt[r[p++].se]++;
        for(int j=b[i].se-1;j>=0;j--){
            if(cnt[j]){
                cnt[j]--;
                res++;
                break;
            }
        }
    }
    cout<<res;
    return 0;
}

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

using namespace std;
typedef long long LL;

#define MAXN 300001
#define MOD 1000000007

int N;
char S[MAXN];

int main(int argc, char** argv) {
#ifdef OJ	
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif
    std::ios::sync_with_stdio(false);

    cin >> N >> S;

    int need = 0;
    for (int i = 1; i < N; i++)
        if (S[i] == 'E')
            need++;

    int mn = need;

    for (int i = 1; i < N; i++) {
        if (S[i-1] == 'W')
            need++;
        if (S[i] == 'E')
            need--;

        mn = min(mn,need);
    }

    cout << mn << endl;

    return 0;
} 

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

using namespace std;
using ll = long long;

int main() {
  ll N;
  cin >> N;
  ll ret = 0;
  for (int i = 1; i <= N; ++i) {
    if (to_string(i).length() % 2 == 1)
      ret++;
  }
  cout << ret << endl;
}


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

int cave(vector<vector<int64_t>> sirube, vector<int64_t> &ans){
    int64_t room = 0;//最初の部屋(1だけどずれるから0)
    queue<int> q;
    q.push(room);
    ans.at(room) = 0;//どうせ1の部屋は出力しないけどね

    while(!q.empty()){
        room = q.front();
        q.pop();
        for(int64_t n_room : sirube.at(room)){
            if(ans.at(n_room) == -1){
                ans.at(n_room) = room;
                q.push(n_room);
            }
        }
    }
    return 0;
}

int main() {
    int64_t N, M;
    cin >> N >> M;//Nは部屋の数、Mは通路の数
    vector<int64_t> A(M);
    vector<int64_t> B(M);
    vector<vector<int64_t>> sirube(N,vector<int64_t>(0));//つながっている部屋同士を示す
    vector<int64_t> ans(N,-1);//最短で行くときに次に行く部屋の番号。つながっていない時は-1を返す。
    bool sig = true;

    for(int64_t i = 0; i < M; i++){
        cin >> A.at(i) >> B.at(i);
    }
    for(int64_t i = 0; i < M; i++){
        sirube.at(A.at(i)-1).push_back(B.at(i)-1);
        sirube.at(B.at(i)-1).push_back(A.at(i)-1);
    }
    cave(sirube,ans);

    for(int64_t i = 0; i < N; i++){
        if(ans.at(i) == -1){
            sig = false;
        }
    }

    if(sig){
        cout << "Yes" << endl;
        for(int64_t j = 1; j < N; j++){//1番目の部屋は抜き
            cout << ans.at(j)+1 << endl;
        }
    }else{
         cout << "No" << endl;
    }
}


Measured memory_bytes: 21892
N=int(input())
L=sorted(list(map(int,input().split())))
ans=0
for i in range(0,N-1):
    for j in range(i+1,N):
        D=L[i]+L[j]
        l=j
        r=N
        while r-l>1:
            med=(l+r)//2
            if D>L[med]:
                l=med
            else:
                r=med
        ans+=l-j
print(ans)

Measured memory_bytes: 68416
#include <iostream>
using namespace std;
int main(void)
{
    int i, j, m, n;
    cin >> n >> m;
    int a[n][m], b[m];
    for(i = 0; i < n; i++){
        for(j = 0; j < m; j++){
            cin >> a[i][j];
        }
    }
    for(i = 0; i < m; i++){
        cin >> b[i];
    }
    for(i = 0; i < n; i++){
        int product = 0;
        for(j = 0; j < m; j++){
            product += a[i][j] * b[j];
        }
        cout << product << endl;
    }
}


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

struct CumulativeSum{
    vector<int> data;
    CumulativeSum(int sz) : data(sz, 0) {};
    void add(int k, int x){
        data[k] += x;
    }
    void build(){
        for(int i = 1; i < data.size(); i++){
            data[i] += data[i - 1];
        }
    }
    int query(int k){
        if(k < 0) return 0;
        return (data[min(k, (int)data.size() - 1)]);
    }
    int query(int l, int r){
        return query(r - 1) - query(l - 1);
    }
};

int n, c;

int solve(vector<int> x, vector<int> v){
    CumulativeSum cs(n), csr(n);
    rep(i, 0, n){
        int tmp = x[i] - (i == 0 ? 0 : x[i - 1]);
        cs.add(i, v[i] - tmp);
    }
    cs.build();
    for(int i = n - 1; i >= 0; i--){
        int tmp = (i == n - 1 ? c : x[i + 1]) - x[i];
        csr.add(n - 1 - i, v[i] - 2 * tmp);
    }
    csr.build();
    vector<int> csrm(n);
    int MAX = 0;
    for(int i = 0; i < n; i++){
        MAX = max(MAX, csr.query(0, i + 1));
        csrm[i] = MAX;
    }
    int ans = 0;
    for(int i = 0; i < n; i++){
        int tmp = cs.query(0, i + 1);
        // cout << i << ' ' << tmp << ' ' << csrm[n - 2 - i] << endl;
        if(i != n - 1 && csrm[n - 2 - i] > 0) tmp += csrm[n - 2 - i];
        ans = max(ans, tmp);
    }
    return ans;
}

signed main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cin >> n >> c;
    vector<int> x(n), v(n);
    rep(i, 0, n){
        cin >> x[i] >> v[i];
    }
    int ans = solve(x, v);
    // cout << ans << endl;
    for(int i = 0; i < n; i++) x[i] = c - x[i];
    reverse(x.begin(), x.end());
    reverse(v.begin(), v.end());
    ans = max(ans, solve(x, v));
    cout << ans << endl;
}

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

N = int(input())
A = [int(x) for x in input().split()]

B = [int(x) for x in A if x % 2 == 0]

for i in B:
    if i % 3 != 0 and i % 5 != 0:
        print("DENIED")
        sys.exit()
print("APPROVED")


Measured memory_bytes: 38256
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            int res = 0;
            while (a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
                int a1 = (b + c) / 2;
                int b1 = (a + c) / 2;
                int c1 = (a + b) / 2;
                a = a1;
                b = b1;
                c = c1;
                ++res;
                if (res > 1000) {
                    out.println(-1);
                    return;
                }
            }
            out.println(res);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}



Measured memory_bytes: 23508
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<math.h>
#include<stdlib.h>
#include<string>
#include<iostream>
#include<set>
#include<map>
#include<deque>
using namespace std;
typedef long long ll;
typedef pair<ll, ll>pii;
typedef pair<pii, ll>pi3;
ll mod = 1000000007;
char a[50][50], b[50][50];
int main()
{
	int na, nb;
	scanf("%d%d", &na, &nb);
	for (int i = 0; i < na; i++)scanf("%s", a[i]);
	for (int i = 0; i < nb; i++)scanf("%s", b[i]);
	for (int i = 0; i < na - nb + 1; i++)
	{
		for (int j = 0; j < na - nb + 1; j++)
		{
			bool f = true;
			for (int k = 0; k < nb; k++)for (int l = 0; l < nb; l++)
				if (a[k + i][l + j] != b[k][l])f = false;
			if (f)
			{
				printf("Yes\n");
				return 0;
			}
		}
	}
	printf("No\n");
}

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

#define MAX 100

void selectionSort(int data[]){
  for(int front = 0; front < 3 - 1; front++){
    int minIndex = front;
    for(int j = front + 1; j < 3; j++){
      if(data[j] < data[minIndex]) minIndex = j;
    }
    int tmp = data[front];
    data[front] = data[minIndex];
    data[minIndex] = tmp;
  }
}

int main(void){
  int data[MAX];

  for(int i = 0; i < 3; i++) cin >> data[i];

  selectionSort(data);

  for(int i = 0; i < 3; i++){
    cout << data[i];
    if(i < 2){
      cout << " ";
    }
  }

  cout << endl;

  return 0;
}

Measured memory_bytes: 1164
/*
    STARK_BOY
*/
#include <bits/stdc++.h>
#include <fstream>
using namespace std;
#define rep(i,a,b) for(ll i=a;i<b;i++)
#define repe(i,a,b) for(ll i=a;i<=b;i++)
#define bac(i,a,b) for(ll i=a;i>=b;i--)
#define pb push_back
#define mp make_pair
#define F first
#define S second
typedef long long ll;
typedef vector< ll > vi;
typedef vector<pair<ll,ll> > vpii;
typedef pair<ll,ll> pii;
#define all(c) c.begin(),c.end()
#define ios ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define setbitc(x) __builtin_popcount(x)
#define init(x,a) memset(x,a,sizeof(x))
#define PI           3.14159265358979323846  /* pi */
mt19937 rng32(chrono::steady_clock::now().time_since_epoch().count());
#define N 1000005
//Variables Start
ll inf=1e18,MOD=1e9+7;
ll n,m,k,ar[N],br[N];
string s,s1;
//Variables End

int main()
{
    ios
    int ti=1;
    //cin>>ti;
    while(ti--)
    {
    	ll ans=0;
		cin>>n>>k;
		vi in(n,0);
		rep(i,0,n)cin>>in[i];
		sort(all(in),greater<ll> ());
		rep(i,k,n)ans+=in[i];
		cout<<ans<<endl;        
    }
    return 0;
        
}

Measured memory_bytes: 1792
#include <bits/stdc++.h>
using namespace std;
#define repr(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define reprrev(i,a,b) for(int i=b-1;i>=a;i--) // [a, b)
#define reprev(i,n) reprrev(i,0,n)
typedef long long ll;
typedef unsigned long long ull;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

const ll mod = 1e9+7;


void chmod(ll &M){
    if(M >= mod) M %= mod;
    else if(M < 0){
        M += (abs(M)/mod + 1)*mod;
        M %= mod;
    }
}

ll modpow(ll x, ll n){
    if(n==0) return 1;
    ll res=modpow(x, n/2);

    if(n%2==0) return res*res%mod;
    else return res*res%mod*x%mod;
}

int getl(int i, int N) { return i==0? N-1:i-1; };
int getr(int i, int N) { return i==N-1? 0:i+1; };

// 線分 ab の偏角 返り値は[-π, π]
template<typename T>
T argument(const pair<T, T> &a, const pair<T, T> &b){
    double ax=a.first, ay=a.second, bx=b.first, by=b.second;
    return atan2(by-ay, bx-ax);
}

/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */
/* <-----------------------------------------------------------------------------------> */

/* 注意 

    1LL<<60 * N とかのオーバーフローに気を付けろ
    制約がヒントになる、ちゃんと全ての制約を見ろ

*/

int const MAX = 2000000;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit(){
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for(int i = 2; i < MAX; i++){
        fac[i] = fac[i-1] * i % mod;
        inv[i] = mod - inv[mod%i] * (mod/i) % mod;
        finv[i] = finv[i-1] * inv[i] % mod;
    }
}
long long COM(int n, int k){
    if(n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n-k] % mod) % mod;
}

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

    COMinit();
    int n, k; std::cin >> n >> k;
    std::cout << COM(n+k-1, k-1) << std::endl;
    
    return 0;
}


Measured memory_bytes: 50088
from collections import deque


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    """
    """
    N = read_int()
    B = read_ints()
    B.sort()
    A = deque(B)
    answer = []
    while len(A) > 1:
        if len(A) == 2:
            x, y = A.pop(), A.popleft()
            A.append(x-y)
        else:
            if A[-2] >= 0:
                x, y = A.popleft(), A.pop()
                A.appendleft(x-y)
            else:
                x, y = A.pop(), A.popleft()
                A.append(x-y)
        answer.append((x, y))
    print(A[0])
    for a in answer:
        print(*a)


if __name__ == '__main__':
    solve()


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

#define ll long long
#define pb push_back
#define iter std::vector<int>::iterator

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

	

	int a, b, t; cin >> a >> b >> t;

	t += 0.5;
	int res = 0;
	int a2 = 0;
	while (a2 + a <= t) {
		res += b;
		a2 += a;

	}

	cout << res;
	return 0;	
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define ld long double
#define pii pair<ll ,ll > 
#define s second
#define f first
#define mod 1000000007
#define boost ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
vector<int> prime;
void seive(int x){
    vector<bool> isprime(x,true);
    for(int p=2;p*p<=x;p++){
        if(isprime[p]){
            for(int i=p*p;i<=x;i+=p) isprime[i]=false;
        }
    }
    for(int i=2;i<=x;i++) prime.push_back(i);
}
/*ll power(ll a,ll b){
    ll res=1;
    while(b>0){
        if(b%2!=0) res=(res*a)%mod;
        a=(a*a)%mod;
        b/=2;
    }
    return res;
}
------------------------------------------------------------
------------------------------------------------------------
ll bsearch(vector<ll> presum,ll sum,int l,int u){
    ll ans;
    while(l<=u){
        int mid=(l+u)/2;
        if(presum[mid]<=sum){
           
            l=mid+1;
        }
        else{
            ans=mid;
            u=mid-1;
        }
    }
    return ans;
}*/
int main(void){
    ld w,h,x,y;
    int cnt=0;
    boost;
    cin>>w>>h>>x>>y;
    ld xcenter=w/2;
    ld ycenter=h/2;
    ld area;
    area=(w*h)/2.0;
    if(x==xcenter && y==ycenter){
        
        cout<<setprecision(10)<<area<<" ";
        cout<<"1"<<endl;
    }
    else{
        cout<<setprecision(10)<<area<<" ";
        cout<<"0"<<endl;
    }
    return 0;
}

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

using namespace std;

class UnionFind {
public:
	explicit UnionFind(int N) : root(N, -1) {}
	int getRoot(int v){ return root[v] == -1 ? v : root[v] = getRoot(root[v]); }
	void merge(int a, int b){
		int p = getRoot(a), q = getRoot(b);
		if(p != q) root[q] = p;
	}
private:
	vector<int> root;
};

int main(){
	int N;
	while(cin >> N){
		map<int,int> mapX, mapY;
		vector<int> dictX, dictY;
		UnionFind uf(N);		
		for(int i=0;i<N;i++){
			int x, y; cin >> x >> y;
			if(mapX.count(x)){
				uf.merge(mapX[x], i);
			} else {
				mapX[x] = i;
			}
			if(mapY.count(y)){
				uf.merge(mapY[y], i);
			} else {
				mapY[y] = i;
			}
			dictX.push_back(x);
			dictY.push_back(y);
		}
		auto toUnique = [](vector<int>& v){
			sort(v.begin(), v.end());
			v.erase(unique(v.begin(), v.end()), v.end());
		};
		toUnique(dictX);
		toUnique(dictY);
		vector<pair<int, pair<int,int>>> vp;
		auto pushCosts = [&](const vector<int>& dict, map<int,int>& mp){
			for(int i=0;i+1<dict.size();i++){
				vp.push_back(make_pair(dict[i+1] - dict[i], make_pair(mp[dict[i]], mp[dict[i+1]])));				
			}
		};
		pushCosts(dictX, mapX);
		pushCosts(dictY, mapY);
		sort(vp.begin(), vp.end());
		UnionFind whole(N);
		long long res = 0;
		for(auto& p : vp){
			int a = uf.getRoot(p.second.first);
			int b = uf.getRoot(p.second.second);
			if(whole.getRoot(a) != whole.getRoot(b)){
				res += p.first;
				whole.merge(a, b);
			}
		}
		cout << res << endl;
	}
}


Measured memory_bytes: 15720
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pr;
typedef vector<pr> vp;
typedef vector<vp> vpp;
typedef vector<vector<ll> > graph;
#define pb push_back
#define mp make_pair
#define maxi INT_MAX
#define mini INT_MIN
#define endl '\n'
void set_val(vector<ll>& v, ll val){for(ll i=0;i<v.size();i++) v[i]=val;}

ll mod = pow(10,9) + 7;
ll modulo = 998244353;
ll i_mov[8] = {-1, 0, 1, 1, 1, 0, -1, -1};
ll j_mov[8] = {1, 1, 1, 0, -1, -1, -1, 0};

vector<vector<int>> g;
vector<int> parent, depth, subsize;

ll power(ll a, ll n)
{
    if(n==0)
    return 1;
    ll temp = power(a,n/2);
    if(n%2==0)
    return (temp*temp)%mod;
    return (((temp*temp)%mod)*a)%mod;
}


int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    // cout<<fixed;
    // cout<<setprecision(18);
    ll n;
    cin>>n;
    int flag=0;
    while(n>0)
    {
        if(n%10 == 7)
        flag=1;
        n/=10;
    }
    if(flag)
    cout<<"Yes";
    else
    cout<<"No";
} 

Measured memory_bytes: 3648
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
int main() {
	int H,W;
	cin >> H >> W;
	
	vector<int> cnt(26, 0);
	for(int i=0; i<H; i++) {
		string s;
		cin >> s;
		for(int j=0; j<W; j++) {
			cnt[s[j] - 'a']++;
		}
	}
	string yes  ="Yes" ;
	string no = "No";
	int odd = 0;
	for(int i=0; i < cnt.size(); i++)
		if(cnt[i] % 2 == 1) odd++;
		
	if(odd != (H%2) * (W%2)) {
		cout << no << endl;
		return 0;
	}
	
	for(auto &c : cnt) c /= 2;
	
	//for(auto &c :cnt) cout << c << endl;
	
	
	int two = H * W - 4 * (H/2) * (W/2) - (H%2) * (W%2);
	two /= 2;
	odd = 0;
	for(auto c: cnt) {
		if(c % 2 == 1)
			odd++;
		
	}
	if(odd <= two) {
		cout << yes << endl;
	}
	else cout << no << endl;
	
	
	return 0;
}

Measured memory_bytes: 256
import math
from functools import reduce
import itertools
#入力:N(int:整数)
def input1():
	return int(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))



#nの素数判定
def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True


X=input1()
n=10**10

for p in range(X, n):
    if is_prime(p):
    	print(p)
    	break
    else:
    	continue

Measured memory_bytes: 4212
/*  -*- coding: utf-8 -*-
 *
 * a.cc: A: Fairness
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

/* typedef */

typedef long long ll;

/* global variables */

/* subroutines */

/* main */

/*
  let a0-b0=d -> a0=b0+d
  a1=b0+c0, b1=c0+a0=(b0+c0)+d -> a1-b1=-d
 */

int main() {
  ll a, b, c, k;
  scanf("%lld%lld%lld%lld", &a, &b, &c, &k);

  printf("%lld\n", (k & 1) ? b - a : a - b);
  return 0;
}


Measured memory_bytes: 256
#include<stdio.h>

int main(){

           char st[4];
           gets(st);
           int k=0;
           for(int i=0;st[i]!='\0';i++){

            if(st[i]=='7'){
                k=k+1;
            }
            else{

                k=k+0;

            }

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



}





Measured memory_bytes: 1644
n = int(input())
p = input()
q = input()

import itertools
x = [str(i) for i in range(1,n+1)]

y = []
for i in itertools.permutations(x):
    y.append(''.join(i))

p = list(p)
q = list(q)
p = [a for a in p if a != ' ']
q = [a for a in q if a != ' ']
p = ''.join(p)
q = ''.join(q)
#print(p,q,y)
print(abs(y.index(p) - y.index(q)))


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

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

ll N,A,B;
ll h[100005];

bool check(ll t){
    ll cnt = 0;
    for (int i = 0;i < N;i++){
        if(h[i]-t*B > 0) cnt += (h[i]-t*B-1)/(A-B) +1;
    }
    return cnt <= t;
}

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

    cin >> N >> A >> B;

    for (int i = 0;i < N;i++){
        cin >> h[i];
    }

    ll high = 1e10, low = 0; // (low, mid]

    while(high-low > 1){
        ll mid = (high+low)/2;
        if(check(mid)) high = mid;
        else low = mid;
    }

    cout << high << endl;

    return 0;

}

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


int main() {
    int a,b,c,x,cnt = 0;
    cin >> a >> b >> c >> x;
    rep(i,a){
        rep(j,b){
            rep(k,c){
                if(500*i + 100*j + 50*k == x){
                    cnt++;
                }
            }
        }
    }
    cout << cnt;
}


Measured memory_bytes: 256
n = int(input())
h = list(map(int,input().split()))

if n == 1:
    print("Yes")

else:
    x = h[0]
    for i in range(1,n):
        if h[i] <= x-2: #今までの最大値より2以上小さかったら
            print("No")
            break
        else:
            if i == n-1:
                print("Yes")
            if h[i] > x: #今までの最大値より大きかったら
                x = h[i] #最大値を更新

Measured memory_bytes: 15020
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


INF = float('inf')


n, x = LI()
l = LI()
cnt = 1
d = 0
for i in range(n):
    # print(f'{(d, l[i])=}')
    if d + l[i] <= x:
        cnt += 1
        d += l[i]
    else:
        break
print(cnt)


Measured memory_bytes: 9100
#include <bits/stdc++.h>
using namespace std;
long long t,n,m,x,i,j,kt,a[1000001],b,c,d;
double r,pi=3.14;
int main()
{
    cin>>n>>m;
    t=0;
    for(i=1;i<=m;i++)
    {
        cin>>a[i];
        t=t+a[i];
    }
    if(t>n) cout<<"-1";
    else cout<<n-t;
}



Measured memory_bytes: 3704
N, M, X = map(int, input().split())
A = list(map(int, input().split()))

i = 0
j = 0
while 1:
  if j in A and j < X:
    i = j
    j += 1
  elif j < X:
    j += 1
  else:
    break
    
smaller = 0
bigger = 0
if i == 0:
  print(0)
else:
  for k in range(A.index(i) + 1):
    smaller += 1
  
  for k in range(A.index(i) + 1, M, 1):
    bigger += 1

  print(min(smaller, bigger))

Measured memory_bytes: 9120
#include <stdio.h>
int main(void) {
    int num,year,month,day,i,count,leap,last;
    scanf("%d",&num);
    for (i=0; i<num; i++) {
        count=0;
        scanf("%d %d %d",&year,&month,&day);
        while (year!=1000) {
            if (month==1&&day==1) {
                leap=(999-year)/3+1;
                count+=leap*20*10+(1000-year-leap)*(20*5+19*5);
                year=1000;
            } else if (day==1) {
                last=11-month;
                if (year%3==0) {
                    count+=last*20;
                } else {
                    if (month%2==0) {
                        count+=(last/2+1)*19+(last/2)*20;
                    } else {
                        count+=(last/2)*(19+20);
                    }
                }
                month=1,year++;
            } else {
                last=10-month;
                if (year%3==0) {
                    count+=(21-day)+last*20;
                } else {
                    if (month%2==0) {
                        count+=20-day+(last/2)*(19+20);
                    } else {
                        count+=21-day+(last/2+1)*19+(last/2)*20;
                    }
                }
                month=1,day=1,year++;
            }
        }
        printf("%d\n",count);
    }
    return 0;
}

Measured memory_bytes: 596
#include<iostream>
#include<stdio.h>

using namespace std;

int main() {
	int a, b;
	int d, r;
	double f;

	cin >> a >> b;

	d = a / b;
	r = a%b;
	f = (double)a / b;

	printf("%d %d %f\n", d, r, f);

	return 0;
}

Measured memory_bytes: 1184
#include <bits/stdc++.h> 
using namespace std; 
int main(){
int n,count=0,ans=0;
cin>>n;
int a[n];
for(int i=0;i<n;i++){
    cin>>a[i];
}
for(int i=0;i<n-1;i++){
    if(a[i]>=a[i+1]){
        count++;
        ans=max(count,ans);
    }
    else{
    count=0;
}
}
cout<<ans<<endl;

    return 0;
}


Measured memory_bytes: 640
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<iostream>
#include<algorithm>

using namespace std;
typedef long long ll;
const int maxx = 1e5 + 5;

int n, m;

int main(){
	while(scanf("%d", &n) == 1){
		cout << 3 * n * n << endl;
	}
	return 0;
}

Measured memory_bytes: 256
import math
x=int(input())

m=dict()
for a in range(-100000,100001):
    a5=int(math.pow(a,5))
    m[a5]=a

for b in range(-100000,100001):
    b5=int(math.pow(b,5))
    a5=b5+x
    if a5 in m:
        a=m[a5]
        print(a,b)
        break

Measured memory_bytes: 38392
package main

import (
        "fmt"
        "sort"
)

func main() {
        var s, t string
        fmt.Scan(&s, &t)
        sSlice, tSlice := []byte(s), []byte(t)
        sortAsc(sSlice)
        sortDesc(tSlice)
        sortedSStr := string(sSlice)
        sortedTStr := string(tSlice)
        if sortedSStr < sortedTStr {
                fmt.Printf("Yes")
        } else {
                fmt.Printf("No")
        }
}

func sortAsc(input []byte) {
        sort.Sort(ByteSlice(input))
}
func sortDesc(input []byte) {
        sort.Sort(sort.Reverse(ByteSlice(input)))
}

type ByteSlice []byte

func (s ByteSlice) Len() int {
        return len(s)
}
func (s ByteSlice) Less(i, j int) bool {
        return []byte(s)[i] < []byte(s)[j]
}
func (s ByteSlice) Swap(i, j int) {
        []byte(s)[i], []byte(s)[j] = []byte(s)[j], []byte(s)[i]
}

Measured memory_bytes: 512
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
	ll n, k; cin >> n >> k;
	ll wa[n + 1] = {}, ookii[n + 1] = {};
	for(ll i = 0; i < n; ++i){
		ll a; cin >> a;
		wa[i + 1] += wa[i] + a;
		ookii[i + 1] += ookii[i] + max<ll>(a, 0);
	}
	ll ans = -1145148931919810;
	for(ll i = 0; i + k <= n; ++i) ans = max<ll>(ans, ookii[i] + max<ll>(0, wa[i + k] - wa[i]) + ookii[n] - ookii[i + k]);
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 1792
import java.util.*;

public class Main {

	/**
	 * @param args
	 */
	public static Scanner sc = new Scanner(System.in);
	
	
	void run() {
		int a, b, c, d, e, f;
		double x, y;
		while (sc.hasNextInt()) {
			a = sc.nextInt();
			b = sc.nextInt();
			c = sc.nextInt();
			d = sc.nextInt();
			e = sc.nextInt();
			f = sc.nextInt();
			x = (double)(e*c-b*f)/(a*e-b*d);
			y = (double)(a*f-c*d)/(a*e-b*d);
			if (Math.abs(x) < 10E-5) x = 0.0;
			if (Math.abs(y) < 10E-5) y = 0.0;
			System.out.printf("%.3f %.3f\n",x, y);
		}
		
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		new Main().run();
	}

}

Measured memory_bytes: 18192
c=[list(map(int,input().split())) for _ in range(3)]
if not(c[0][0]-c[0][1]==c[1][0]-c[1][1]==c[2][0]-c[2][1]):
    print('No')
elif not(c[0][1]-c[0][2]==c[1][1]-c[1][2]==c[2][1]-c[2][2]):
    print('No')
elif not(c[0][0]-c[1][0]==c[0][1]-c[1][1]==c[0][2]-c[1][2]):
    print('No')
elif not(c[1][0]-c[2][0]==c[1][1]-c[2][1]==c[1][2]-c[2][2]):
    print('No')
else:
    print('Yes')

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

#define bolt ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define F first
#define S second
#define pb push_back
#define endl "\n"
#define lb lower_bound
#define ub upper_bound

typedef long long ll;
typedef long double ld;

const ld pi=3.1415926535897932384626433;
const int mod = 1000000007;
const ll inf=3e18;

int main ()
{
   bolt;
   ll n;
   cin>>n;
   ll k;
   cin>>k;
   set <ll>  s;
   for (ll i=1;i<=n;i++)
   {
      s.insert(i);
   }
   while (k--)
   {
      ll a;
      cin>>a;
      for (ll i=0;i<a;i++)
      {
         ll b;
         cin>>b;
         if (s.find(b)!=s.end())
         s.erase(b);
      }

   }
   cout<<s.size();
}


Measured memory_bytes: 3664
data = Array.new(4)
i = 0
 
#p data
=begin
 
File.open("test/0277","r") do |input|
    while data[i] = input.gets do
        #p data[i]
        i += 1
    end
end
=end
 
 
    while data[i] = gets do
        #p data[i]
        i += 1
    end
 
     
for i in data
    if i == nil 
        break
    end
    a,b = (i.chomp).split(" ").map(&:to_i)
 
    case a 
    when 1 
        a = 6000
    when 2
        a = 4000
    when 3
        a = 3000
    when 4
        a = 2000
    end
    p a*b
end

Measured memory_bytes: 8644
import sys
sys.setrecursionlimit(10**9)

MOD = 10**9 + 7
N = int(input())
paths = {i:[] for i in range(N+1)}
for _ in range(N-1):
    x, y = map(int, input().split())
    paths[x].append(y)
    paths[y].append(x)

dpt = [[-1] * 2 for i in range(N+1)]

def count_cc(prev, node, color):
    if dpt[node][color] != -1:
        return dpt[node][color]
    if paths[node] == [prev]:
        dpt[node][color] = 1
        return 1
    result = 1
    if color == 0:
        for nxt in paths[node]:
            if nxt == prev:
                continue
            result *= (count_cc(node, nxt, 0) + count_cc(node, nxt, 1))
            result %= MOD
    else:
        for nxt in paths[node]:
            if nxt == prev:
                continue
            result *= count_cc(node, nxt, 0)
            result %= MOD

    dpt[node][color] = result
    return result

print((count_cc(0, 1, 0) + count_cc(0, 1, 1)) % MOD)


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

char ans[200][82];
int main(){
	char str[82];
	int cor = 0;
	while(gets(str) != NULL){	//改行は読まない。はず!??
		int len;
		//char tran;
		len = strlen(str);
		//tran = 0;
		while(strstr(str,"this") == NULL && strstr(str,"that") == NULL && strstr(str,"the") == NULL){ 
			//tran++;
			for(int i = 0;i < len;i++){
				if(str[i] == 'z'){
					str[i] = 'a';
					continue;
				}
				if(str[i] == ' ' || str[i] == '.')
					continue;
				//str[i] = str[i]+tran;
				str[i]++;
			}
			//printf("%s\n",str);
		}
		strcpy(ans[cor],str);
		cor++;
	}
	for(int i = 0;i < cor;i++){
		printf("%s\n",ans[i]);
	}
	return 0;
}

Measured memory_bytes: 936
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;

#define FOR(i,n) for(int i=0;i<n;i++)
#define PRINT(a) cout<<a<<"\n"
 
int main(){

	int a,b;
	cin>>a>>b;

	if(a==b)PRINT("Draw");
	else if(a==1||(a>b&&b!=1))PRINT("Alice");
	else PRINT("Bob");

	
	

	return 0;
}

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

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

  // vector<int> p(n);
  map<int,int> p;
  for (int i = 0; i < n; i++)
  {
    int j;
    cin >> j;
    p[j]++;
  }

  int maxx = 1000;
  int ans = 1000;
  for (int i = x-110; i <= x+110; i++)
  {
    if(p[i]>0) continue;
    // if(i==8){
    //   cout << abs(x-i) << endl;
    //   cout << abs(maxx) << endl;
    // }
    if(abs(x-i) < abs(maxx)){
      // cout << i << endl;
      maxx = x-i;
      ans = i;
    }
    // cout << i << endl;
  }
  cout << ans << endl;  
}

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

int main() {
  int a,b;
  cin >> a >> b;
  if(a*b%3==0 || (a+b)%3==0){
    cout << "Possible"  << endl;
  }else{
    cout << "Impossible"  << endl;
  }
}

Measured memory_bytes: 256
#include <stdio.h>
 
int main(void) {
char s[3];
scanf("%s",s);
if(s[0]==82&&s[1]==82&&s[2]==82)
{
  printf("3");
}
else if((s[0]==82&&s[1]==82)||(s[1]==82&&s[2]==82))
{
  printf("2");
}
else if((s[0]==82&&s[2]==82)||s[0]==82||s[1]==82||s[2]==82)
printf("1");
else
{
  printf("0");
}
}

Measured memory_bytes: 1656
#import <Foundation/Foundation.h>
typedef long long Int;
int compare(const void *a, const void *b) {
    return *(Int *)a - *(Int *)b;
}
int main() {
    Int n;
    scanf("%lld", &n);
    Int *a = malloc(sizeof(Int) * n);
    for (Int i = 0; i < n; i++) scanf("%lld", a + i);
    Int m;
    scanf("%lld", &m);
    Int *b = malloc(sizeof(Int) * m);
    for (Int i = 0; i < m; i++) scanf("%lld", b + i);
    qsort(a, n, sizeof(Int), compare);
    qsort(b, m, sizeof(Int), compare);
    Int j = 0;
    for (Int i = 0; i < m; i++) {
        while (b[i] > a[j]) {
            j++;
            if (j >= n) {
                puts("NO");
                return 0;
            }
        }
        if (b[i] == a[j]) {
            j++;
            continue;
        } else {
            puts("NO");
            return 0;
        }
    }
    puts("YES");
}

Measured memory_bytes: 7116
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define eps 1e-9
#define maxp 220000
#define mod 1000000007
#define pi 3.141592653589793238
#define sin(s) scanf("%lld",&s);
#define sout(s) printf("%lld\n",s);
#define in(s) cin>>s
#define in2(a,b) cin>>a>>b
#define in3(a,b,c) cin>>a>>b>>c
#define vll vector<ll>
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define endl '\n'
#define sp ' '
#define gear_change ios_base::sync_with_stdio(false),cin.tie(0)
#define nfl(i,n) for(i=0;i<n;i++)
#define sfl(i,s,e) for(i=s;i<e;i++)
#define ufl(i,n) for(i=n-1;i>=0;i--)
ll power(ll x,ll y){
    ll ret=1;
    while(y>0){
        if(y&1)
            ret=(ret*x);
        y/=2;
        x=(x*x);
    }
    return ret;
}
vector<ll> divs(ll n){
	vector<ll>ret;
	for(int i=1;i*i<=n;i++){
		if(n%i==0){
			if(i*i==n){
				ret.push_back(i);
			}
			else{
				ret.push_back(i);
				ret.push_back(n/i);
			}
		}
	}
	return ret;
}
vector<ll>pows;
void solve(){
	ll n,i,xr=0;
	cin>>n;
	vector<ll>vec(n);
	nfl(i,n){
		cin>>vec[i];
		xr^=vec[i];
	}
	nfl(i,n){
		cout<<(xr^vec[i])<<sp;
	}
	cout<<endl;

}	
int main(){
	gear_change;
	ll test=1;
	// in(test);
	while(test--){
		solve();
	}
}	


Measured memory_bytes: 4728
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef map<int,int> mii;
typedef map<ll,ll> mll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll>   vl;
#define f(i,n)  for(i=0;i<n;i++)
#define f1(i,n)  for(i=1;i<n;i++)
#define fr(i,n) for(i=n-1;i>=0;i--)
#define em emplace_back
#define mp make_pair
#define in insert
#define fi first
#define sc second
#define b begin
#define e end
#define er erase
#define l length
#define c clear
#define si size
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);
const double pi=3.141592653;
const ll infi=1000000001;
const ll MOD=1000000007;
const ll mod=998244353;
const string no="NO\n",yes="YES\n";

// ll gcd(ll a,ll b){
//     if(a==0)    return b;
//     gcd(b%a,a);
// }

// void dfs(vl v[],ll node,ll hai[]){
//     hai[node]=1;
//     for(auto i:v[node]){
//         if(hai[i]==0){
//             dfs(v,i,hai);
//         }
//     }
// }

// ll con(vl v[],ll hai[],ll sz){
//     ll count=0;
//     for(int i=1;i<sz;i++){
//         if(hai[i]==0){
//             count++;
//             dfs(v,i,hai);
//         }
//     }
    // return count;
// }

// void gcde(int a,int b,int *x,int *y){
//     if(a==0){
//         *x=0;
//         *y=1;
//         return;
//     }    
//     int x1,y1;
//     gcde(b%a,a,&x1,&y1);
    
//     *x=y1-(b/a)*x1;
//     *y=x1;
// }


// ll recur(vl v,ll in,ll m,ll n){
//     if(in==-1)  return 1000000000001;
//     ll d,e,c;
//     d=max(m/v[in],n*v[in]);
//     c=recur(v,in-1,m/v[in],n*v[in]);
//     e=recur(v,in-1,m,n);
//     return min(c,min(e,d));
// }

// ll bexpo(ll a,ll p){
//     ll x=1;
//     while(p){
//     if(p&1){
//         x=(x*a)%mod;
//     }
//     a=(a*a)%mod;
//     p>>=1;
//     }
//     return x;
// }
// ll fact[500001],invf[500001];
// int dx[8]{-1,0,0,1,-1,-1,1,1};
// int dy[8]{0,-1,1,0,-1,1,-1,1};
// ll dp[200001];


int main() {
    fastio
    double d,t,s,ch;
    cin>>d>>t>>s;
    ch=d/s;
    if(t>=ch)    cout<<"Yes";
    else cout<<"No";

	return 0;
}

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

int main(void)
{
	char abacus[10][9] = { "* = ****",
						   "* =* ***",
						   "* =** **",
						   "* =*** *",
						   "* =**** ",
						   " *= ****",
						   " *=* ***",
						   " *=** **",
						   " *=*** *",
						   " *=**** " };
	char ans[5][9];
	int num;
	int i, j;
	int kisuu;
	char visit;
	
	visit = 0;
	while (scanf("%d", &num) != EOF){
		kisuu = 10000;
		for (i = 0; i < 5; i++){
			strcpy(ans[i], abacus[(num / kisuu) % 10]);
			kisuu /= 10;
		}
		if (visit == 1){
			printf("\n");
		}
		for (i = 0; i < 8; i++){
			for (j = 0; j < 5; j++){
				printf("%c", ans[j][i]);
			}
			printf("\n");
		}
		visit = 1;
	}
	
	return (0);
}

Measured memory_bytes: 0
#include<iostream>
#define N 32768
long a[N],b[N],c[N]={},n,k,i=N;
int main(){
for(std::cin>>n>>k;--i;a[i]=i<n?i:n)b[i]=n/i;
while(--k){
for(;++i<N;)c[i]=c[i-1]+b[i];
for(b[--i]=c[n/i];--i;a[i]=c[i])b[i]=(b[i+1]+a[i]*(n/i-n/(i+1)))%0x3B9ACA07;
//for(*b=c[n/--i];--i;a[i]=c[i])*b=b[i]=(*b+a[i]*(n/i-n/(i+1)))%0x3B9ACA07;
}
std::cout<<b[1];
}


Measured memory_bytes: 1024
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int cmp(const void* x, const void* y) {
	return strcmp((const char*)x, (const char*)y);
}

int N, L;
char S[128][128];

int main(void) {
	int i;
	if (scanf("%d%d", &N, &L) != 2) return 1;
	for (i = 0; i < N; i++) {
		if (scanf("%127s", S[i]) != 1) return 1;
	}
	qsort(S, N, sizeof(*S), cmp);
	for (i = 0; i < N; i++) {
		fputs(S[i], stdout);
	}
	putchar('\n');
	return 0;
}


Measured memory_bytes: 128
k = int(input())
n = 50

q, r = divmod(k, n)
A = [n-1]*n
for i in range(n):
    A[i] += q

for i in range(r):
    A[i] += n+1
    for j in range(n):
        A[j] -= 1

print(n)
print(*A)


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

int main(){
    int n;
    cin >> n;
    int p[100];
    for (int i=0;i<n;++i) cin >> p[i];
    
    int min = p[0];
    int max = p[0];
    for (int i=1;i<n;++i){
        if (min > p[i]) min = p[i];
    }
    for (int i=1;i<n;++i){
        if (max < p[i]) max = p[i];
    }
    cout << max - min << endl;
}


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

using namespace std;

int main(){
    int n, k;
    cin >> n >> k;
    string s;
    cin >> s;
    int l = 0, r = 0;
    // 範囲内の連続した0の数
    int num0 = 0;
    // 0が連続で続いているかのフラグ
    bool flag = false;
    if (s[0] == '0') {
        num0++;
        flag = true;
    }
    
    int num = 1;
    int ans = num;
    r++;
    while(r < n){
        if (s[r] == '1') {
            num++;
            flag = false;
        }else{
            if (flag) {
                num++;
            }else{
                if (num0 < k) {
                    num0++;
                    num++;
                    flag = true;
                }else{
                    l++;
                    num--;
                    while(l == 0 || !(s[l-1] == '0' && s[l] == '1')){
                        l++;
                        num--;
                    }
                    flag = true;
                    num++;
                    
                }
            }
        }

        if (ans < num) {
            ans = num;
        }
        // cout << num << '\n';
        // cout << "num0 = " << num0 << '\n';
        // cout << "l = " << l << '\n';
        // cout << "r = " << r << '\n';
        r++;
    }
    cout << ans << '\n';
    
}

Measured memory_bytes: 512
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define rep(i,n) for (int i=0; i<(n); i++)
#define reps(i,s,n) for (int i=(s); i<(n); i++)
#define rep1(i,n) for (int i=1; i<=(n); i++)
#define repr(i,s,n) for (int i=(s)-1; i>=(n); i--)
#define print(a) cout << (a) << endl;
#define all(v) v.begin(), v.end()


int main() {
  int N;
  cin >> N;
  string S, R[4] = {"AC", "WA", "TLE", "RE"};
  int cnt[4];
  fill(cnt, cnt+4, 0);
  rep(i, N) {
    cin >> S;
    rep(j, 4) {
      if (S.compare(R[j]) == 0)
        cnt[j]++;
    }
  }
  rep(i, 4) {
    cout << R[i] << " x " << cnt[i] << endl;
  }
  return 0;
}

Measured memory_bytes: 3624
#include<stdio.h>
int main(){
    int n, i = 0;
    scanf("%d",&n);
    int a[n], b[n + 1];
    for(; i < n; i++){
        scanf("%d",&a[i]);
        b[i] = -1;
    }
    b[n] = -1;
    for(i = 0; i < n; i++){
        int color = 0;
        while(a[i] <= b[color])
            color ++;
        b[color] = a[i];
    }
    for(i = 0; i <= n; i++)
        if(b[i] == -1){
            printf("%d\n",i);
            return 0;
        }
}

Measured memory_bytes: 896
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int[] count = new int[26];

		while(sc.hasNext()) {
			String input = sc.nextLine();
			String tmp = input.toLowerCase().replace(" ", "");

			for(char c : tmp.toCharArray()) {
				if('a' <= c && c <= 'z') {
					count[(int)c - (int)'a']++;
				}
			}
		}
		sc.close();

		for (int i = 0; i < 26; i++) {
			char now = (char)( (int)'a' + i );

			System.out.println(now + " : " + count[i]);
		}
	}
}

Measured memory_bytes: 26140