akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>
#include <fstream>
#include <bitset>
#include <time.h>
#include <tuple>
#include <iomanip>

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<ll> V;
typedef complex<double> Point;

#define PI acos(-1.0)
#define EPS 1e-10
const ll INF = 1e12;
const ll MOD = 1e9 + 7;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,N) for(int i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()) )
#define fi first
#define se second
#define N_SIZE (1LL << 20)
#define NIL -1

ll sq(ll num) { return num*num; }
ll mod_pow(ll x, ll n) {
	if (n == 0)return 1;
	if (n == 1)return x%MOD;
	ll res = sq(mod_pow(x, n / 2));
	res %= MOD;
	if (n % 2 == 1) {
		res *= x;
		res %= MOD;
	}
	return res;
}
ll mod_add(ll a, ll b) { return (a + b) % MOD; }
ll mod_sub(ll a, ll b) { return (a - b + MOD) % MOD; }
ll mod_mul(ll a, ll b) { return a*b % MOD; }

int n;

int main() {
	cin >> n;
	cout << 48 - n << endl;
}

Measured memory_bytes: 256
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n = inp()
a = [input() for i in range(3)]
res = 0
for i in range(n):
    if a[0][i] == a[1][i] == a[2][i]:
        continue
    if a[0][i] == a[1][i] or a[2][i] == a[1][i] or a[0][i] == a[2][i]:
        res += 1
    else:
        res += 2
print(res)

Measured memory_bytes: 38256
import java.util.*;
import java.util.stream.Collectors;

public class Main {
    static Scanner scanner = new Scanner(System.in);

    public static void main(String[]$) {
        List<Integer>[] a = new List[3];
        for (int i = 0; i < 3; i++) {
            a[i] = scanner.next().chars().mapToObj(ch -> ch - 'a').collect(Collectors.toList());
        }
        int turn = 0;
        while (!a[turn].isEmpty()) {
            turn = a[turn].remove(0);
        }
        System.out.println((char)('A' + turn));
    }
}

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

int main() {
    int A, B;
    cin >> A >> B;

    int ans = 0;
    for (int i = A; i <= B; i++) {
        string iString = to_string(i);
        bool isOk = true;
        if (iString.at(0) != iString.at(4)) isOk = false;
        if (iString.at(1) != iString.at(3)) isOk = false;
        if (isOk) ans++;
    }

    cout << ans << endl;

    return 0;
}


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

int main()
{
    int k;
    string s;
    cin >> s >> k;

    vector<string> list;

    for (int i = 0; i < s.length(); i++)
    {
        for (int j = 1; j < 6; j++)
        {
            string q = s.substr(i, j);
            int c = count(list.begin(), list.end(), q);
            if (c == 0)
            {
                list.push_back(q);
            }
        }
    }
    sort(list.begin(), list.end());
    cout << list[k - 1] << endl;
}

Measured memory_bytes: 844
#include<bits/stdc++.h>
#define ll long long
#define ALL(v) (v).begin(),(v).end()
#define REP(i,p,n) for(int i=p;i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define dump(a) (cerr << #a << "=" << (a) << endl)
#define DUMP(list) cout << "{ "; for(auto nth : list){ cout << nth << " "; } cout << "}" << endl;
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; }


using namespace std;

int MAX_V  = 1000000;
int d[10][10];
int V;

void warshall_floyd() {
    for (int k = 0; k < V; k++) {
        for (int i = 0; i < V; i++) {
            for (int j = 0; j < V; j++) d[i][j] = min(d[i][j], d[i][k] + d[k][j]);
        }
    }
}

int main(){
    int H, W;
    cin >> H >> W;
    rep(i, 10){
        rep(j, 10) {
            cin >> d[i][j];
        }
    }
    V = 10;
    warshall_floyd();

    int A[H][W];
    ll ans = 0;
    rep(i, H){
        rep(j, W) {
            cin >> A[i][j];
            if (A[i][j] != -1) {
                ans += d[A[i][j]][1];
            }

        }
    }

    cout << ans << endl;

}

Measured memory_bytes: 384
open Batteries
module EnumL = Enum.Labels
module ListL = List.Labels
module ArrayL = Array.Labels

let dbg0 x = Printf.eprintf "[debug]%s\n" @@ dump x
let dbg1 x = dbg0 x; x

let id = identity

let (++) n m = List.range n `To m
let (++-) n m = if n >= m then List.range n `Downto m else []
let (++^) n m = if n < m then List.range n `To (pred m) else []

module ModOp = struct
  let prime = 1_000_000_007
  let (-) a b = (a + prime - b) mod prime
  let (+) a b = (a + b) mod prime
  let ( * ) a b = (a * b) mod prime

  let rec pow x n =
    if n = 0 then 1
    else if n mod 2 = 0 then pow (x*x) (n/2)
    else x * pow (x*x) (n/2)
end

let scan fmt = Scanf.sscanf (read_line ()) fmt

let scan_lines n fmt f =
  if n = 0 then []
  else List.map (fun _ -> scan fmt f) (1 ++ n)

let scan_list ?sep cnv =
  let line = read_line () in
  (match sep with
   | None -> List.map String.of_char @@ String.to_list line
   | Some sep -> String.split_on_char sep line)
  |> List.map cnv

let scan_array ?sep cnv = Array.of_list @@ scan_list ?sep cnv

let scan_matrix n m e ?sep conv =
  let arr = Array.make_matrix n m e in
  ListL.iter (0 ++^ n)
    ~f:(fun i -> arr.(i) <- Array.of_list @@ scan_list ?sep conv);
  arr

let atoi c = Char.code c - Char.code '0'

let rec powerset = function
  | [] -> [[]]
  | hd::tl ->
    let pws =  powerset tl in
    pws @ ListL.map pws ~f:(fun pw -> hd::pw)

let permutations l =
  let rec interleave x = function
    | [] -> [[x]]
    | (hd::tl) as l ->
      (x::l) :: (interleave x tl |> ListL.map ~f:(fun l -> hd::l)) in
  let rec aux = function
    | [] -> [[]]
    | a::rest ->
      aux rest |> ListL.map ~f:(interleave a) |> List.concat in
  aux l

let intersection l =
  EnumL.filter ~f:(fun x -> EnumL.exists ~f:((=) x) @@ Enum.clone l)

let zip l m =
  let n = min (List.length l) (List.length m) in
  List.combine (List.take n l) (List.take n m)

let lower_bound n f =
  let rec aux l u =
    if u - l > 1 then
      let m = (l + u) / 2 in
      if f m then aux l m
      else aux m u
    else u in aux (-1) n

let between n x m = n <= x && x < m

let (k,n) = scan "%d %d" Tuple2.make
let ls = scan_list ~sep:' ' Int.of_string

let () =
  let ms = ls@[k+List.first ls] in
  ListL.map (zip ms (List.drop 1 ms)) ~f:(fun (a, b) -> b - a)
  |> List.max
  |> ((-) k)
  |> Printf.printf "%d\n"


Measured memory_bytes: 43280
#include<bits/stdc++.h>
using namespace std;
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define rep(i,n) for(int i=0; i<(n); ++i)
#define per(i,n) for(int i=n-1;i>=0;++i)
#define rep1(i,n) for(int i=1; i<=n; ++i)
#define per1(i,n) for(int i=n; i>=1; ++i)
#define debug cout << "line : " << __LINE__ << " debug" << endl
#define Dcout(N) cout << setprecision(20) << N << endl
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() ) //被り削除
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define INF 1e9
const int mod = 1000000007;
typedef long long ll;
//------------------------------------------------------------------------



int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  ll N,T; cin >> N >> T;
  vector<ll> t(N);
  ll ans=0;
  rep(i,N){
    cin >> t[i];
    if(i==0) continue;
    if(t[i]-t[i-1]>=T) ans += T;
    else ans += t[i]-t[i-1];
  }
  
  cout << ans+T << endl;
  
  return 0;
}










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

int main ()
{
    int s;
    cin>>s;
    vector<long long> lucas(87);
    lucas.at(0)=2;
    lucas.at(1)=1;
    for(int i=2;i<s+1;i++)
    {
        lucas.at(i)=lucas.at(i-2)+lucas.at(i-1);
    }

    cout<<lucas.at(s)<<endl;
}

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

N_sub = N
if N % 2 == 0:
    pass
else:
    N = N-1

num = int(N*(N-1)/2-N/2)
all_num = N*(N+1)/2

arr = []
for i in range(1,N+1):
    for j in range(1,N+1):
        if i < j:
            arr.append([i, j])

for i in range(1,int(N/2+1)):
    arr.remove([i, N+1-i])

if N_sub == N:
    print(num)
    for i in range(len(arr)):
        print(arr[i][0],arr[i][1]) 

else:
    for i in range(1,N_sub):
        arr.append([i,N_sub])
    print(num+N_sub-1)
    for i in range(len(arr)):
        print(arr[i][0],arr[i][1])


Measured memory_bytes: 4124
#include <bits/stdc++.h>
#include <vector>
#include <iostream>
#include<algorithm>
#include<string>
#include <map>
#include <queue>
#include <stack>
#include<set>
#include<tuple>
#include<time.h>

#define DIV 1000000007
using namespace std;
using ll = long long;
using ldb = long double;

int main() {
	ll N, X, M; cin >> N >> X >> M;

	vector<ll> A(M + 1);
	vector<int> used(M);
	A[1] = X, used[X] = 1;
	ll ans = 0;

	if (N <= M) {
		for (ll i = 2; i <= N; i++) {
			A[i] = A[i - 1] * A[i - 1] % M;
			ans += A[i];
		}
		ans += A[1];
		cout << ans << endl;
	}
	else {
		for (ll i = 2; i <= M; i++) {
			
			A[i] = A[i - 1] * A[i - 1] % M;
			A[i] %= M;
			//printf("A[%lld]=%lld \n", i, A[i]);
			if (used[A[i]]) {
				for (ll j = 1; j <= i; j++) {
					ans += A[j];
				}

				if (A[i] == 0)break;
				else if (A[i] == 1) {
					ans += N - i;
					break;
				}

				else {
					ll st = used[A[i]];
					ll temp = 0;
					for (int k = st; k < i; k++) {
						temp += A[k];
					}
					ans -= A[i];
					ans += temp * ((N - i + 1) / (i - st));
					for (int k = 0; k < (N - i + 1) % (i - st); k++) {
						ans += A[st + k];
					}
				
					//cout << "st=" << st << " i=" << i << " amari=" << (N - i + 1) % (i - st) << endl;
					break;
				}
			}

			else used[A[i]] = i;

		}

		cout << ans << endl;
	}
}

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

using namespace std;

typedef long long ll;

//そのまま行うとオーバーフローするし、倍精度不動小数点数で計算を行うと精度が足りない。、多倍長整数で最後まで計算するとTLEするので(pythonならOK)、10^18を超えないように

//乗算でなく、除算で求める。
//
int main(){
  ll n;
  cin>>n;

  ll a[n];
  ll ans=1;
  for(int i=0; i<n; i++){ 
    cin>>a[i];
    if(a[i]==0) ans=0;
  }

  for(int i=0; i<n; i++){
    if(ans==0){
      break;
    }else{
      if(a[i]<=1000000000000000000/ans){
        ans=ans*a[i];
      }else{
        ans=-1;
        break;
      }
    }
  }
  
  cout<<ans<<endl;

  
}


Measured memory_bytes: 4392
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i,n) for(int i=0;i<(n);++i)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define all(x) (x).begin(), (x).end()
#define PI 3.14159265358979323846264338327950L
using namespace std;
typedef long long ll;
typedef long double ld;
int main() {
    int n,m;
    ll total=0;
    cin>>n;
    vector<int> t(n);
    rep(i,n){
        cin>>t[i];
        total+=t[i];
    }
    cin>>m;
    vector<int> p(m),x(m);
    rep(i,m) cin>>p[i]>>x[i];
    rep(i,m){
        ll ans=total-t[p[i]-1]+x[i];
        cout<<ans<<endl;
    }
}

Measured memory_bytes: 3556
#include<bits/stdc++.h>
using namespace std;
int main(){
  	int h,w;
  	cin >> h >> w;
  	auto c = vector<string>(h);
  	for(int i=0;i<h;i++){
    	cin >> c[i];
    }
  	for(int i=0;i<h*2;i++){
    	cout << c[i/2]<<endl;
    }
  
	return 0;
}	

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

using ll = int64_t;
#define int ll

#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define ddrep(i, n) for (int i = n; i > 0; --i)
#define srep(i, s, t) for (int i = s; i < t; ++i)

#define rng(a) a.begin(), a.end()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second

#define chmax(x, y) (x = max(x, y))
#define chmin(x, y) (x = min(x, y))

using pi = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vi>;
using ld = long double;

template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
  os << "(" << p.first << "," << p.second << ")";
  return os;
}

template <class T> ostream &operator<<(ostream &os, const vector<T> &v) {
  os << "{";
  rep(i, (int)v.size()) {
    if (i)
      os << ",";
    os << v[i];
  }
  os << "}";
  return os;
}

template <typename T, size_t S> void printArray(const T (&array)[S]) {
  for (auto val : array)
    std::cout << val << ", ";
  std::cout << "\n";
}

void printSpace() { printf(" "); }

void printEoln() { printf("\n"); }

void print(ll x, int suc = 1) {
  printf("%" PRId64, x);
  if (suc == 1)
    printEoln();
  if (suc == 2)
    printSpace();
}

const int mod = 1e9 + 7;
const int inf = 1e9 + 5;

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

  int n, x;
  std::cin >> n >> x;
  vi candys(n);
  rep(i, n) cin >> candys[i];
  int ans = 0;
  srep(i, 1, n) {
    int tmp = max(candys[i - 1] + candys[i] - x, (int)0);
    ans += max(tmp, (int)0);
    candys[i] = max(candys[i] - tmp, (int)0);
  }
  print(ans);
}


Measured memory_bytes: 1024
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<n; i++)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
long long mo = 1e9 + 7;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;
template<class T, class S> void cmin(T &a, const S &b) { if (a > b)a = b; }
template<class T, class S> void cmax(T &a, const S &b) { if (a < b)a = b; }
template<class A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}cout << "\n";}

int main(){
    ll a,b,x;
    string S,T;
    cin >> a >> b >> x;
    ll ans = ll(b/x) - ll((a-1)/x);
    if(a == 0)ans = ll(b/x) + 1;
    cout << ans << endl;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<set>
#include<unordered_set>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef unordered_set<ll> uset;
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=0;i<=n;i++)
#define chmin(a,b) a=min(a,b)
#define chmax(a,b) a=max(a,b)
#define all(x) x.begin(),x.end()
#pragma gcc optimize("O3")
#pragma gcc optimize("unroll-loops")
#pragma gcc target("avx2,see4")
int n;
bool thedge(ll a,ll b){//頂点aと頂点bの間に辺があるか
	string s="";
	rep(i,n)s+="0";
	s[a]=s[b]='1';
	cout<<"? "<<s<<"\n"<<flush;
	ll res;
	cin>>res;
	return res==1;
}
int main(){
	cin>>n;
	vector<P> ans;
	rep(i,n)for(int j=i+1;j<n;j++){
		/*string s;
		rep(k,n)s+="0";
		s[i]=s[j]='1';
		cout<<"? "<<s<<"\n"<<flush;
		ll res;
		cin>>res;
		if(res==1)ans.push_back(make_pair(i,j));*/
		if(thedge(i,j))ans.push_back(make_pair(i,j));
	}
	cout<<"!";
	for(auto e:ans){
		cout<<" ("<<e.first<<","<<e.second<<")";
	}
	cout<<"\n"<<flush;
}


Measured memory_bytes: 852
package main

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

func max(a, b int64) int64 {
	if a > b {
		return a
	}
	return b
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Split(bufio.ScanWords)
	scanInt := func() int {
		scanner.Scan()
		num, err := strconv.Atoi(scanner.Text())
		if err != nil {
			log.Fatal(err)
		}
		return num
	}

	N, W := scanInt(), scanInt()
	w, v := make([]int, N), make([]int, N)
	for i := 0; i < N; i++ {
		w[i], v[i] = scanInt(), scanInt()
	}
	memo := make([][]int64, N)
	for i := 0; i < N; i++ {
		memo[i] = make([]int64, W+1)
	}
	for i := 0; i <= W; i++ {
		if i >= w[0] {
			memo[0][i] = int64(v[0])
		}
	}

	for i := 1; i < N; i++ {
		for j := 1; j <= W; j++ {
			if w[i] > j {
				memo[i][j] = memo[i-1][j]
				continue
			}
			memo[i][j] = max(memo[i-1][j], memo[i-1][j-w[i]]+int64(v[i]))
		}
	}

	fmt.Println(memo[N-1][W])
}


Measured memory_bytes: 82560
x = int(input())
if 400 <= x <= 599:
  print(8)
elif 600 <= x <= 799:
  print(7)
elif 800 <= x <= 999:
  print(6)
elif 1000 <= x <= 1199:
  print(5)
elif 1200 <= x <= 1399:
  print(4)
elif 1400 <= x <= 1599:
  print(3)
elif 1600 <= x <= 1799:
  print(2)
elif 1800 <= x <= 1999:
  print(1)


Measured memory_bytes: 9176
#include "bits/stdc++.h"
using namespace std;

const long long INF = 1LL << 61;

int main() {
    long long N, K;
    cin >> N >> K;
    vector<long long> A(N);
    for (int i = 0; i < N; ++i) cin >> A[i];

    sort(A.begin(), A.end());

    vector<long long> Am;
    vector<long long> Az;
    vector<long long> Ap;
    for (int i = 0; i < N; ++i) {
        if (A[i] < 0)Am.push_back(A[i]);
        else if (A[i] > 0)Ap.push_back(A[i]);
        else Az.push_back(A[i]);
    }

    long long right = INF;
    long long left = -INF;

    while ((right - left) > 1) {
        long long x = (right + left) / 2;
        long long S = 0;

        if (x >= 0)S += (N - Az.size()) * Az.size() + Az.size() * (Az.size() - 1) / 2;

        // 正の数同士
        int end = 0;
        long long num = 0;
        for (int i = Ap.size() - 1; i >= 0; --i) {
            while (end < Ap.size() && Ap[i] * Ap[end] <= x) {
                ++end;
            }
            num += end;
            if (i <= end - 1)num -= 1;
        }
        num /= 2;
        S += num;

        // 負の数同士
        end = 0;
        num = 0;
        for (int i = 0; i < Am.size(); ++i) {
            while (end < Am.size() && Am[i] * Am[Am.size() - 1 - end] <= x) {
                ++end;
            }
            num += end;
            if (i >= (Am.size() - end))num -= 1;
        }
        num /= 2;
        S += num;

        // 正と負の組み合わせ
        end = 0;
        for (int i = 0; i < Ap.size(); ++i) {
            while (end < Am.size() && Ap[i] * Am[end] <= x) {
                ++end;
            }
            S += end;
        }

        if (S >= K)right = x;
        else left = x;
    }

    cout << right;
}

Measured memory_bytes: 4340
#include<bits/stdc++.h>
using namespace std;
const int N=2e5+5;
int n,m,d[N][2],tot,head[N],nex[N<<1],to[N<<1];
void add(int u,int v){to[++tot]=v;nex[tot]=head[u];head[u]=tot;}
bool vis[N];
struct edge
{
    int u,v;
}e[N];
char s[N];
int main()
{
    scanf("%d%d",&n,&m);
    scanf("%s",s+1);
    for(int i=1;i<=m;i++)
    {
        scanf("%d%d",&e[i].u,&e[i].v);
        d[e[i].u][s[e[i].v]-'A']++;
        d[e[i].v][s[e[i].u]-'A']++;
        add(e[i].u,e[i].v),add(e[i].v,e[i].u);
    }
    queue<int>q;
    for(int i=1;i<=n;i++)
        if(!(d[i][0]&&d[i][1])) q.push(i),vis[i]=true;
    while(!q.empty())
    {
        int u=q.front();q.pop();
        for(int i=head[u];i;i=nex[i])
        {
            int v=to[i];if(vis[v]) continue;
            d[v][s[u]-'A']--;
            tot--;
            if(!(d[v][0]&&d[v][1])) q.push(v),vis[v]=true;
        }
    }
    int tot=0;
    for(int i=1;i<=n;i++)
        if(!vis[i]) tot++;
    if(tot) printf("Yes\n");
    else printf("No\n");
}


Measured memory_bytes: 7936
#include <iostream>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <list>
#include <unordered_map>
#include <unordered_set>
#include <iomanip> // cout<<setprecision(n)
#include <functional> // std::function<void(int)>
using namespace std;
#define All(v) (v).begin(),(v).end()
const long long mod = 1000000007;
const long long inf = mod*mod;
using Int = long long;
const double EPS=1e-10;
const double INF=1e+10;
const double PI=acos(-1.0);
signed main(){
    int n;
    cin>>n;
    vector<int> A(n);
    deque<int> res;
    for(int i=0;i<n;i++){
        cin>>A[i];
    }
    if(n%2==0){
        for(int i=0;i<n;i++){
            if(i%2==0)res.push_back(A[i]);
            else res.push_front(A[i]);
        }
    }
    else{
        for(int i=0;i<n;i++){
            if(i%2==0)res.push_front(A[i]);
            else res.push_back(A[i]);
        }
    }
    for(auto a:res){
        cout<<a<<' ';
    }
    cout<<endl;
}

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

int main() {
    int n;
    scanf("%d", &n);
    int64_t a, b;
    scanf("%lld%lld", &a, &b);

    vector<int64_t> s(n + 2);
    constexpr int64_t kInf = 1'000'000'000'000'000'000;
    s[0] = s[1] = -kInf;
    for (int i = 2; i < n + 2; ++i) scanf("%lld", &s[i]);

    constexpr int kMod = 1'000'000'000 + 7;
    vector<vector<int>> tree((n + 2) * 4, vector<int>(2, 0));
    vector<vector<bool>> tag((n + 2) * 4, vector<bool>(2, false));

    auto Push = [&](int o, int p) {
        if (!tag[o][p]) return;
        for (int v = 1; v <= 2; ++v) {
            tree[o * 2 + v][p] = 0;
            tag[o * 2 + v][p] = true;
        }
        tag[o][p] = false;
    };

    auto Query = [&](auto self, int l, int r, int ql, int qr, int p, int o = 0) {
        if (l >= qr || ql >= r) return 0;
        if (l >= ql && r <= qr) return tree[o][p];
        Push(o, p);
        int m = (l + r) >> 1;
        return (self(self, l, m, ql, qr, p, o * 2 + 1) + self(self, m, r, ql, qr, p, o * 2 + 2)) % kMod;
    };

    auto Modify = [&](auto self, int l, int r, int x, int v, int p, int o = 0) {
        if (r - l == 1) {
            tree[o][p] += v;
            if (tree[o][p] >= kMod) tree[o][p] -= kMod;
            return;
        }
        Push(o, p);
        int m = (l + r) >> 1;
        if (x < m) self(self, l, m, x, v, p, o * 2 + 1);
        else self(self, m, r, x, v, p, o * 2 + 2);
        tree[o][p] = (tree[o * 2 + 1][p] + tree[o * 2 + 2][p]) % kMod;
    };

    auto Reset = [&](int p) {
        tree[0][p] = 0;
        tag[0][p] = true;
    };

    Modify(Modify, 0, n + 2, 0, 1, 0);
    for (int i = 2, j = 0, k = 0; i < n + 2; ++i) {
        while (j + 1 < i && s[i] - s[j + 1] >= a) j++;
        while (k + 1 < i && s[i] - s[k + 1] >= b) k++;
        int x = Query(Query, 0, n + 2, 0, k + 1, 0);
        int y = Query(Query, 0, n + 2, 0, j + 1, 1);
        if (s[i] - s[i - 1] < a) Reset(0);
        if (s[i] - s[i - 1] < b) Reset(1);
        Modify(Modify, 0, n + 2, i - 1, x, 1);
        Modify(Modify, 0, n + 2, i - 1, y, 0);
    }
    int ans = (Query(Query, 0, n + 2, 0, n + 2, 0) + Query(Query, 0, n + 2, 0, n + 2, 1)) % kMod;
    printf("%d\n", ans);
    return 0;
}


Measured memory_bytes: 53120
#include<stdio.h>
int main(void)
{
	int r,g,b,n;
	scanf("%d %d %d",&r,&g,&b);
	r*=100;
	g*=10;
	n=r+g+b;
	if(n%4==0){
		printf("YES\n");
	}
	else{
		printf("NO\n");
	}
	return 0;
}


Measured memory_bytes: 128
import Foundation

let X = Int(readLine()!)!

if X >= 1800 {
    print("1")
} else if X >= 1600 {
    print("2")
} else if X >= 1400 {
    print("3")
} else if X >= 1200 {
    print("4")
} else if X >= 1000 {
    print("5")
} else if X >= 800 {
    print("6")
} else if X >= 600 {
    print("7")
} else if X >= 400 {
    print("8")
}


Measured memory_bytes: 13036
import sys
sys.setrecursionlimit(100000)

def ii(): return int(input())
def iil(): return list(map(int, input().split()))
def ins(): return input().split()
def lin(): return list(input())

a = lin()
b = lin()
t = map(lambda x,y:x==y,a,b)
print(sum(t))

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

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

    int i = 0;

    while(a>0 && c>0) {

        if(i%2 == 0) {
            c -= b;

        }else{
            a -= d;
        }
        i++;
    }

    if(a>0)
     cout<<"Yes";
    else cout<<"No"; 


    return 0;
}

Measured memory_bytes: 3036
#include <bits/stdc++.h>
#define x first
#define y second
#define fastio ios_base::sync_with_stdio(0), cin.tie(0)
using namespace std;

typedef pair<int, int> pii;
typedef long long ll;
typedef pair<ll, ll> pll;

int n, m;
int a[80][80];
int b[80][80];
bool cache[80][80][12805];

const int dx[] = { 1, 0 };
const int dy[] = { 0, 1 };

void f(int x, int y, int k)
{
	if (cache[x][y][k]) return;
	cache[x][y][k] = true;
	
	for (int d = 0; d < 2; d++)
	{
		int nx = x + dx[d], ny = y + dy[d];
		if (!(0 <= nx && nx < n && 0 <= ny && ny < m)) continue;
		int t = abs(a[nx][ny] - b[nx][ny]);
		f(nx, ny, k + t);
		f(nx, ny, abs(k - t));
	}
}

int main()
{
	fastio;
	cin >> n >> m;
	for (int i = 0; i < n; i++)
		for (int j = 0; j < m; j++)
			cin >> a[i][j];
	
	for (int i = 0; i < n; i++)
		for (int j = 0; j < m; j++)
			cin >> b[i][j];
			
	f(0, 0, abs(a[0][0] - b[0][0]));
	
	for (int i = 0; i <= 12800; i++)
		if (cache[n - 1][m - 1][i])
		{
			cout << i << '\n';
			return 0;
		}
}

Measured memory_bytes: 79488
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a, b, k, p, i, j;
    cin>>a>>b;
    k=max((b-a+1), -1000000);
    p=min((b+a-1), 1000000);
    for(i=k; i<=p; i++){
        cout<<i<<" ";
    }
    cout<<endl;
    return 0;
}



Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef set<int> si;
typedef pair<int,int> pii;
#define rep(i,a,b) for(int i=(a); i<(b); ++i)
#define per(i,a,b) for(int i=(b)-1; i>=(a); --i)
#define all(x) (x).begin(),(x).end()
#define sz(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define F first
#define S second
const int INF = 1000000007;
const int MOD = (int)1e9+7;
const long double PI = (acos(-1));
const long double EPS = 0.0000000001;
int dy[4] = {-1, 0, 1, 1};
int dx[4] = {0, 1, 0, 1};

int main(void) {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	//freopen("in.txt", "r", stdin);
	int n;
	string s;
	cin >> n >> s;
	char pre = s[0];
	string ret(1,s[0]);
	rep(i,1,n) {
		if(pre != s[i]) {
			ret += s.substr(i,1);
			pre = s[i];
		}
	}
	cout << sz(ret);
	return 0;
}

Measured memory_bytes: 592
#include<iostream>
#include<cmath>
#include<cstdlib>
#include<string>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>
#include<iomanip>

using namespace std;

typedef long long ll;

typedef std::pair<int, int> ipair;

int main() {
   int N;
   cin >> N;
   ll a[N];
   map<int, int> log;
   for (int i = 0; i < N; i++) {
      cin >> a[i];
      log[a[i]]++;
   }
   if (log[0] == N) {
      cout << "Yes" << endl;
      return 0;
   }
   if (N % 3 != 0) {
      cout << "No" << endl;
      return 0;
   }

   vector<int>  log2;
   for (auto& it : log) {
      for (int i = 0; i < it.second / (N / 3); i++) {
         log2.push_back(it.first);
      }
   }
   if ((int)log2.size() == 3 && (log2[0] ^ log2[1] ^ log2[2]) == 0) {
      cout << "Yes" << endl;
   } else {
      cout << "No" << endl;
   }
   return 0;
}


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

if a+b <= 2*c:
        print(a*x + b*y)
elif a+b > 2*c:
        if x == y:
                print(c * 2*x)
        elif x < y:
                print(min(c*2*x + b*(y-x), c*2*y))
        else:
                print(min(c*2*y + a*(x-y), c*2*x))

Measured memory_bytes: 38384
import math

a, b, h, m = map(int, input().split())

p = float(math.pi)
h_sita = h*p/6 + m*p/360
m_sita = m*p/30
cosine = math.cos((h_sita - m_sita))
c = (a**2 + b**2 - 2*a*b*cosine)**(0.5)
print(c)

Measured memory_bytes: 9500
from collections import deque 
import sys
input = sys.stdin.readline
q = deque([])
h,w=map(int,input().split())
a=[list(input()) for i in range(h)]
x=[[-1,0],[1,0],[0,-1],[0,1]]
for i in range(h):
    for j in range(w):
        if a[i][j]=="#":
            for k in x:
                if 0<=i+k[0]<h and 0<=j+k[1]<w and a[i+k[0]][j+k[1]]==".":
                    a[i+k[0]][j+k[1]]="0"
                    q.append([i+k[0],j+k[1],1])
ans=0
while q:
    v=q.popleft()
    for k in x:
        if 0<=v[0]+k[0]<h and 0<=v[1]+k[1]<w and a[v[0]+k[0]][v[1]+k[1]]==".":
            a[v[0]+k[0]][v[1]+k[1]]="0"
            q.append([v[0]+k[0],v[1]+k[1],v[2]+1])
            ans=v[2]+1
print(ans)

Measured memory_bytes: 135260
#include<bits/stdc++.h>
using namespace std;
#define nn 1008
int str[nn][nn];
int n,m,a,b;
void output(){
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++) printf("%d",str[i][j]);
		puts("");
	}
	exit(0);
}
int main(){
	cin>>n>>m>>a>>b;swap(a,b);
	if(a==0 and b==0) output();
	if(a==0){
		for(int i=1;i<=n;i++) for(int j=1;j<=b;j++) str[i][j]=1;
		output();
	}
	if(b==0){
		for(int i=1;i<=a;i++) for(int j=1;j<=m;j++) str[i][j]=1;
		output();
	}
	
	for(int i=1;i<=n;i++) for(int j=1;j<=m;j++){
		if(i<=a and j<=b) str[i][j]=1;
		if(i>a and j>b) str[i][j]=1;
	}
	output();
	
	return 0;
}

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

using namespace std;

int main()
{
    string S;
    
    cin >> S;
    
    if(S != "0")
    {
        int A = 0;
        
        for(int i = 0; i < S.size(); i++)
        {
            A += S[i] - 48;
        }
        
        cout << A << endl;
        
        main();
    }
    
    return 0;
}

Measured memory_bytes: 1200
#include <bits/stdc++.h> 
const int N = 30000, K = 405, mod = 1000000007;
typedef long long LL;

int n, m, k, A[N], ans;

void reduce(int &x) { x += x >> 31 & mod; }
int pow(int x, int y, int ans = 1) {
	for (; y; y >>= 1, x = (LL) x * x % mod)
		if (y & 1) ans = (LL) ans * x % mod;
	return ans;
}

int cnt[K], num;
void insert(int x) { num += !cnt[x]++; }
void remove(int x) { num -= !--cnt[x]; }

int dp[N][K], s[K], g[N][K];
void calc0(int init, int len, int *res) {
	for (int i = 0; i <= k; ++i) dp[0][i] = 0; dp[0][init] = 1;
	for (int i = k - 1; i; --i) reduce(s[i] = dp[0][i] + s[i + 1] - mod);
	res[0] = s[1];
	for (int i = 1; i <= len; ++i) {
		for (int j = 1; j < k; ++j)
			dp[i][j] = ((LL) dp[i - 1][j - 1] * (k - j + 1) + s[j]) % mod;
		for (int j = k - 1; j; --j)
			reduce(s[j] = dp[i][j] + s[j + 1] - mod);
		res[i] = s[1];
	}
}
void calc1(int len, int m) {
	for (int i = 1; i <= k; ++i) dp[0][i] = 0; dp[0][0] = 1;
	for (int i = k - 1; i; --i) reduce(s[i] = dp[0][i] + s[i + 1] - mod);
	for (int i = 1; i <= len; ++i) {
		for (int j = 1; j < k; ++j)
			dp[i][j] = ((LL) dp[i - 1][j - 1] * (k - j + 1) + s[j]) % mod;
		for (int j = k - 1; j; --j)
			reduce(s[j] = dp[i][j] + s[j + 1] - mod);
	}
	for (int i = 0; i <= k; ++i) s[i] = 0;
	for (int i = 1; i <= len; ++i) {
		for (int j = 1; j < k; ++j)
			g[i][j] = ((LL) g[i - 1][j - 1] * (k - j + 1) + s[j] + (j >= m ? dp[i][j] : 0)) % mod;
		for (int j = k - 1; j; --j) reduce(s[j] = g[i][j] + s[j + 1] - mod);
	}
}
int solve(int n, int m) {
	calc1(n, m); int ans = s[1];
	for (int i = 1; i <= m; ++i) ans = pow(k - i + 1, mod - 2, ans);
	return ans;
}
int solve(int n, int m, int L, int R) {
	static int dpL[N], dpR[N], ans = 0;
	calc0(L, n - m, dpL), calc0(R, n - m, dpR);
	for (int i = 0; i <= n - m; ++i)
		ans = (ans + (LL) dpL[i] * dpR[n - m - i]) % mod;
	return ans;
}
int solve() {
	// check if A is colorful
	for (int i = 0; i < k; ++i) insert(A[i]);
	for (int i = k; i <= m; ++i) {
		insert(A[i]), remove(A[i - k]);
		if (num == k) return 0;
	}
	// check if A is pairwise distinct
	for (int i = 0; i <= m; ++i) cnt[A[i]] = 0; num = 0;
	for (int i = 1; i <= m; ++i) insert(A[i]);
	if (num == m) return solve(n, m);
	// find L, R
	for (int i = 0; i <= m; ++i) cnt[A[i]] = 0; num = 0;
	int L, R;
	for (int i = 1; i <= m; ++i) {
		insert(A[i]);
		if (num != i) { L = i - 1; break; }
	}
	for (int i = 0; i <= m; ++i) cnt[A[i]] = 0; num = 0;
	for (int i = 1; i <= m; ++i) {
		insert(A[m - i + 1]);
		if (num != i) { R = i - 1; break; }
	}
	return solve(n, m, L, R);
}
int main() {
	std::ios::sync_with_stdio(0), std::cin.tie(0);
	std::cin >> n >> k >> m, ans = pow(k, n - m, n - m + 1);
	for (int i = 1; i <= m; ++i) std::cin >> A[i];
	reduce(ans -= solve()), std::cout << ans << '\n';
	return 0;
}

Measured memory_bytes: 82176
while True:
    n = input()
    if n == 0: break
    a = map(int, raw_input().strip().split(" "))
    sum = 0; ret = 0;
    for j in range(n):
        sum += a[j]
    for j in range(n):
        if a[j] > 0:
            ret+=1
            sum-=1
    if sum == 0: print "NA"
    else: print ret+1

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

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)n; ++i)
#define FOR(i, a, b) for(int i = a; i < (int)b; ++i)
#define rrep(i, n) for(int i = ((int)n - 1); i >= 0; --i)

using ll = long long;
using ld = long double;

const ll INF = 1e18;
const int Inf = 1e9;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;

ll res = INF;

void calc(ll h, ll w) {
    ll a, b, c;
    rep (i, h + 1) {
        // horizon
        ll mx = -1, mi = INF;
        ll rest = h - i;
        a = i * w;
        b = (rest / 2) * w, c = (rest - (rest / 2)) * w;
        mx = max(mx, max(a, max(b, c))), mi = min(mi, min(a, min(b, c)));
        res = min(res, mx - mi);

        //vertical
        mx = -1, mi = INF;
        ll width = w / 2;
        b = rest * width, c = rest * (w - width);
        mx = max(mx, max(a, max(b, c))), mi = min(mi, min(a, min(b, c)));
        res = min(res, mx - mi);
    }
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(0);
    ll h, w;
    cin >> h >> w;
    calc(h, w);
    calc(w, h);
    cout << res << endl;
    
    return 0;
}



Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
typedef pair<int, int> P;
ll Mod = 1000000007;
int main() {
  int N,x;
  cin >> N >> x;
  int ans[(2*N) - 1];
  if (x == 1 || x == (2*N) - 1) {
    cout << "No" << endl;
    return 0;
  } else {
    cout << "Yes" << endl;
  }
  if (x == 2 && N == 2) {
    cout << 1 << endl;
    cout << 2 << endl;
    cout << 3 << endl;
    return 0;
  }
  if (x == 2) {
    ans[N-3] = 3;
    ans[N-2] = 2;
    ans[N-1] = 1;
    ans[N] = 4;
    int cnt = 5;
    for (int i = 0; i < (2*N) - 1; i++) {
      if (i > N || i < N - 3) {
        ans[i] = cnt;
        cnt++;
      }
    }
  } else {
    ans[N-3] = x - 1;
    ans[N-2] = x;
    ans[N-1] = x + 1;
    ans[N] = x - 2;
    int cnt = 1;
    if (x == 3) {
      cnt = 5;
    }
    for (int i = 0; i < (2*N) - 1; i++) {
      if (N - 3 <= i && i <= N) {
        continue;
      }
      ans[i] = cnt;
      if (cnt == x - 3) {
        cnt = x + 2;
      } else {
        cnt++;
      }
    }
  }

  for (int i = 0; i < (2*N) - 1; i++) {
    cout << ans[i] << endl;
  }
  return 0;
}

Measured memory_bytes: 2304
#include<stdio.h>

int main(){
  int n,k,v,u,V[101][101]={};
  int i,j;
  
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d%d",&u,&k);
    for(j=0;j<k;j++){
      scanf("%d",&v);
      V[u][v] = 1;
    }
  }
    
  for(i=1;i<=n;i++){
    for(j=1;j<=n;j++){
      printf("%d",V[i][j]);
      if(j!=n) printf(" ");
    }
    printf("\n");
  }
  
  return 0;
}



Measured memory_bytes: 2112
#include<iostream>
#include<vector>
#include<algorithm>

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

struct UnionFind {
	vector<int> par; // par[i]:iの親の番号　(例) par[3] = 2 : 3の親が2
	int cnt;

	UnionFind(int N) : par(N) { //最初は全てが根であるとして初期化
		for (int i = 0; i < N; i++) par[i] = i;
		cnt = N;
	}

	int root(int x) { // データxが属する木の根を再帰で得る：root(x) = {xの木の根}
		if (par[x] == x) return x;
		return par[x] = root(par[x]);
	}

	void unite(int x, int y) { // xとyの木を併合
		int rx = root(x); //xの根をrx
		int ry = root(y); //yの根をry
		if (rx == ry) return; //xとyの根が同じ(=同じ木にある)時はそのまま
		par[rx] = ry; //xとyの根が同じでない(=同じ木にない)時：xの根rxをyの根ryにつける
		cnt--;
	}

	bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
		int rx = root(x);
		int ry = root(y);
		return rx == ry;
	}
};

int N, M;
P ar[100000];
ll cost[100000];

int main() {
	cin >> N >> M;
	for (int i = 0; i < N; i++) {
		cin >> cost[i];
	}
	UnionFind uf(N);
	for (int i = 0; i < M; i++) {
		ll a, b;
		cin >> a >> b;
		uf.unite(a, b);
	}
	if (N - 1 == M) {
		cout << 0 << endl;
		return 0;
	}
	for (int i = 0; i < N; i++) {
		ar[i].first = cost[i];
		ar[i].second = uf.root(i);
	}
	sort(ar, ar + N);
	
	ll ans = 0;
	int A = 2 * (uf.cnt - 1);
	bool used[100000] = {};
	bool Sused[100000] = {};
	for (int i = 0; i < N; i++) {
		if (!Sused[uf.root(ar[i].second)]) {
			A--;
			Sused[uf.root(ar[i].second)] = true;
			used[i] = true;
			ans += ar[i].first;
		}
	}
	for (int i = 0; i < N && A != 0; i++) {
		if (!used[i]) {
			A--;
			ans += ar[i].first;
		}
	}
	if (A > 0)cout << "Impossible" << endl;
	else cout << ans << endl;
	return 0;
}

Measured memory_bytes: 3200
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, s, n) for (int i = (s); i < (n); ++i)
#define rrep(i, n, g) for (int i = (n)-1; i >= (g); --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define len(x) (int)(x).size()
#define dup(x, y) (((x) + (y)-1) / (y))
#define pb push_back
#define Field(T) vector<vector<T>>
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
  int a;
  cin >> a;
  if(a < 1000) cout << "ABC" << endl;
  else cout << "ABD" << endl;
}

Measured memory_bytes: 3596
using System;
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text;

public class Program
{

    public void Proc()
    {
        int inputCount = int.Parse(Reader.ReadLine());

        Dictionary<char, long> cnt = new Dictionary<char, long>();
        for (int i = 0; i < inputCount; i++) {
            string name = Reader.ReadLine();
            if(!March.Contains(name[0])) {
                continue;
            }
            if(!cnt.ContainsKey(name[0])) {
                cnt.Add(name[0], 1);
            } else {
                cnt[name[0]]++;
            }
        }

        long ans = 0;

        for (int i = 0; i < March.Length-2; i++) {
            if(!cnt.ContainsKey(March[i])) {
                continue;
            }
            for (int j = i + 1; j < March.Length - 1; j++) {
                if(!cnt.ContainsKey(March[j])) {
                    continue;
                }
                for (int k = j + 1; k < March.Length; k++) {
                    if(!cnt.ContainsKey(March[k])) {
                        continue;
                    }
                    ans += cnt[March[i]] * cnt[March[j]] * cnt[March[k]];
                }
            }
        }
        Console.WriteLine(ans);
    }



    private string March = "MARCH";


    public class Reader
    {
        static StringReader sr;
        public static bool IsDebug = false;
        public static string ReadLine()
        {
            if (IsDebug)
            {
                if (sr == null)
                {
                    sr = new StringReader(InputText.Trim());
                }
                return sr.ReadLine();
            }
            else
            {
                return Console.ReadLine();
            }
        }
        private static string InputText = @"


4
ZZ
ZZZ
Z
ZZZZZZZZZZ

";
    }

    public static void Main(string[] args)
    {
#if DEBUG
        Reader.IsDebug = true;
#endif
        Program prg = new Program();
        prg.Proc();
    }
}


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

int main() {
    ll x;
    cin >> x;

    for (int a = -1000; a < 1000; a++) {
        for (int b = -1000; b < 1000; b++) {
            if (pow(a, 5) - pow(b, 5) == x) {
                cout << a << ' ' << b << endl;
                return 0;
            }
        }
    }

    return 0;
}


Measured memory_bytes: 4060
#include<bits/stdc++.h>
#define u 1000000
#define  ll long long
using namespace std;
int main()
{
   int d,t,s;
   cin>>d>>t>>s;
   //int l=d/s;
   if(d<=s*t)
        cout<<"Yes"<<endl;
   else
    cout<<"No"<<endl;



    return 0;
}


Measured memory_bytes: 3584
// clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<string> vs;
typedef vector<pii> vpii;
typedef vector<vi> vvi;
typedef vector<vb> vvb;
typedef vector<vpii> vvpii;
const int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
const int MOD = 1000000007;
const double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
bool odd(const int &n) { return n & 1; }
bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  goto yarudake;
yarudake:
  int n;
  while (cin >> n, n) {
    vi a(n);
    rep(i, n) cin >> a[i];
    int totalSwapTime = 0;
    for (;;) {
      int partialSwapTime = 0;
      loop(i, 1, n) {
        if (a[i - 1] <= a[i]) continue;
        swap(a[i - 1], a[i]);
        partialSwapTime++;
      }
      totalSwapTime += partialSwapTime;
      if (!partialSwapTime) break;
    }
    cout << totalSwapTime << endl;
  }
}

Measured memory_bytes: 3008
#include<stdio.h>
int main(void)
{
	int i,j;
	int n,k;
	int a,b,c[5];
	int min;
	
	scanf("%d",&n);
	scanf("%d",&k);
	for(i=0;i<k;i++){
		scanf("%d %d",&a,&b);
		c[0]=a-1;
		c[1]=b-1;
		c[2]=n-a;
		c[3]=n-b;
		min=c[0];
		for(j=1;j<4;j++){
			if(min>c[j]){
				min=c[j];
			}
		}
		if(min%3==0){
			printf("1\n");
		}
		else if(min%3==1){
			printf("2\n");
		}
		else if(min%3==2){
			printf("3\n");
		}		
	}
	return 0;
}

Measured memory_bytes: 580
#include<bits/stdc++.h>
using namespace std;
using ull=unsigned long long;
#define mod 1000000007
#define mod2 998244353 
#define PI 3.14159265
#define ll long long
#define ld long double
#define pi pair<ll,ll>
#define pb push_back
#define vi vector<ll>
#define sz size()
#define setbits(x)  __builtin_popcount(x)
#define fi first
#define se second
#define lz length()
#define all(x) (x).begin(),(x).end()
#define scf(x) scanf("%lld",&x)
#define rep(i,n) for(ll i=0;i<n;i++)
const int INF = (int)1e9;
const ll IINF=1LL<<62;
const int maxn=10000005;

//int divr[maxn];
/**/
/*void divisor()
{for(int i=2;i<sqrt(maxn);i++)
     {
          if(!divr[i])
          {
               for(int j=i*i;j<maxn;j+=i)if(!divr[j])divr[j]=i;     
          }
     }
     for(int i=1;i<maxn;i++)if(!divr[i])divr[i]=i;
}*/
 
/*const int N=1000005;
ll n;
struct line {
    long long m, c;
    long long eval(long long x) { return m * x + c; }
    long double intersectX(line l) { return (long double) (c - l.c) / (l.m - m); }
};
vector<pair<pi,ll>> rect;
deque<line> dq;
*/
ll modexpo(ll a,ll b)
{
     ll res=1LL;
     while(b>0)
     {
          if(b&1)res=(res*a)%mod;
          a=(a*a)%mod;
          b>>=1;
     }
     return res;
}
 
 
 
 
 
 
 




bool s[405][405];
bool used[405][405];
int dx[]={1,-1,0,0};
int dy[]={0,0,1,-1};
int main()
{
     ll n;
     cin>>n;
     ll a[n+1];
     for(int i=1;i<=n;i++)cin>>a[i];
     ll res=1LL<<62;
     ll sum=0;
     ll ct=0;
     for(int i=1;i<=n;i++){
          sum+=a[i];
         if(i%2==0){
              if(sum>=0){ct+=abs(sum)+1;
              sum=-1;}
         }
         else if(i%2==1){
              if(sum<=0){ct+=abs(sum)+1;
              sum=1;}
         }
     }
    // cout<<ct<<"\n";
     res=min(res,ct);
     sum=0;ct=0;
     for(int i=1;i<=n;i++){
          sum+=a[i];
          if(i%2==0){
               if(sum<=0){ct+=abs(sum)+1;
               sum=1;}
          }
          else{
               if(sum>=0){ct+=abs(sum)+1;
               sum=-1;}
          }
     }
     res=min(res,ct);
     cout<<res;

}



































Measured memory_bytes: 4408
#include <bits/stdc++.h>
using namespace std;
int const MX = 2e5 + 2, MOD = 1e9 + 7;

int main()
{
    int t = 1;
//    cin>>t;
    while(t--){
        long long  x, k , d;
        cin>>x>>k>>d;
        x = abs(x);
        long long n = x/d;
        if(k < n) cout<<x - k*d;
        else{
            long long s = x - n*d, cnt = k - n;
            if(cnt % 2 == 0) cout<<s;
            else cout<<abs(d - s);
        }
    }
}




Measured memory_bytes: 3644
#include <iostream>
#include <algorithm>
#include <stack>
#include <string>
#include <queue>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <vector>
#include <list>
#include <string.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <map>
#define INFTY (1<<30)
#define MAX 100000000

using namespace std;

int main() {
	int n, m[101][101] = {};
	cin >> n;
	for( int i = 1; i <= n; i++) {
		int u, k;
		cin >> u >> k;
		for( int j = 1; j <= k; j++) {
			int v;
			cin >> v;
			m[i][v] = 1;
		}
	}
	for( int i = 1; i <= n; i++) {
		for( int j = 1; j <= n; j++) {
			if( j < n) cout << m[i][j] << ' ';
			else cout << m[i][j];
		}
		cout << endl;
	}

    return 0;
}

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

	typedef long long ll;
	typedef long double ld;

	#define imx INT_MAX
	#define imn INT_MIN
	#define llmx LLONG_MAX
	#define llmn LLONG_MIN

	#define fi first
	#define se second
	#define pb push_back



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


	////////////////////SIEVE OF ERATOSTHENES//////////////////////
	vector<int> sieveoferatosthenes(int n)
	{
		vector<bool> prime(n+1, true);
		for(int i = 2; i <= sqrt(n); i++)
		{
			if(prime[i])
			{
				for(int j = i*i; j<=n; j+=i)
				{
					prime[j]=false;
				}
			}
		}
		vector<int> all_primes;
		for(int i = 2; i <=n; i++)
		{
			if(prime[i]) all_primes.pb(i);
		}
		return all_primes;
	}



	int main()
	{
		ios_base::sync_with_stdio(false);
		cin.tie(NULL);
		int n; 	
		cin>>n;
		cout<<fixed<<setprecision(13)<<2*M_PI*n<<endl;
	}

Measured memory_bytes: 3852
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int CountMultiplicationB(int *inputK, int *inputB)
{
   return *inputB / *inputK;
}

int CountMultiplicationA(int *inputK, int *inputA)
{
   return *inputA / *inputK;
}

void PrintOutput(int *inputK,int multiplyA,int multiplyB, int *inputA, int *inputB)
{
    if(*inputK * multiplyA  == *inputA)
    {
        printf("OK \n");
    }
    else if(*inputK * (multiplyA + 1) <= *inputB)
    {
        printf("OK \n");
    }
    else
    {
        printf("NG \n");
    }
}

void ReadInput(int *inputK, int *inputA, int *inputB)
{
    //printf("Enter the value of K: \n");
    scanf("%d", inputK);
    //printf("Enter the value of A and B: \n");
    scanf("%d %d", inputA, inputB);

}

int main(int argc, const char * argv[])
{
    int *inputK = malloc(sizeof(int)),
    *inputA = malloc(sizeof(int)),
    *inputB = malloc(sizeof(int));
    
    ReadInput(inputK, inputA, inputB);
    
    int multiplyA = CountMultiplicationA(inputK, inputA);
    int multiplyB = CountMultiplicationB(inputK, inputB);
    
    PrintOutput(inputK, multiplyA, multiplyB,  inputA, inputB);
    
    return 0;
}


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

int main() {
  int h, w;
  cin >> h >> w;
  
  vector<string> table(h);
  for (int i = 0; i < h; i++) {
    cin >> table.at(i);
  }
  
  vector<bool> row(h, false);
  vector<bool> column(w, false);
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      if (table.at(i).at(j) == '#') {
        row.at(i) = true;
        column.at(j) = true;
      }
    }
  }
  for (int i = 0; i < h; i++) {
    if (row.at(i)) {
      for (int j = 0; j < w; j++) {
        if (column.at(j)) cout << table.at(i).at(j);
      }
      cout << endl;
    }
  }
}

Measured memory_bytes: 3656
#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int N;
	int ans=0;
	int a = 10;
	scanf("%d", &N);
	for (int i = 1; i <= N; i++) {
		if (i < a) {
			ans++;
		}
		if (i == a*10) {
			ans++;
			a *= 100;
		}
		
	}
	printf("%d", ans);
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define MOD 1000000007
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
using P = pair<int,int>;

int main()
{
  ll A;
  string B;
  cin >> A >> B;
  string b;
  REP(i,4){
    if(i!=1){
      b.push_back(B[i]);
    }
  }
  int C = atoi(b.c_str());
  cout << (A*C)/100 << endl;
}

Measured memory_bytes: 3612