akhauriyash/Code-Regression huggingface dataset:
/* be name khoda */

// #define long_enable
#include <iostream>
#include <algorithm>
#include <cstring>
#include <numeric>
#include <vector>
#include <fstream>
#include <set>
#include <map>
using namespace std;

#ifdef long_enable
typedef long long int ll;
#else
typedef int ll;
#endif

typedef pair<ll, ll> pii;
typedef pair<pii, ll> ppi;
typedef pair<ll, pii> pip;
typedef vector<ll> vi;
typedef vector<pii> vpii;

#define forifrom(i, s, n) for (ll i = s; i < n; ++i)
#define forirto(i, n, e) for (ll i = (n) - 1; i >= e; --i)
#define fori(i, n) forifrom (i, 0, n)
#define forir(i, n) forirto (i, n, 0)

#define F first
#define S second
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define smin(a, b) a = min(a, (b))
#define smax(a, b) a = max(a, (b))

#define debug(x) cout << #x << " -> " << (x) << endl
#define debug2(x, y) cout << #x << ' ' << #y << " -> " << (x) << ' ' << (y) << endl
#define debug3(x, y, z) cout << #x << ' ' << #y << ' ' << #z << " -> " << (x) << ' ' << (y) << ' ' << (z) << endl
#define debug4(x, y, z, t) cout << #x << ' ' << #y << ' ' << #z << ' ' << #t << " -> " << (x) << ' ' << (y) << ' ' << (z) << ' ' << (t) << endl
#define debuga(x, n) cout << #x << " -> "; fori (i1_da, n) { cout << (x)[i1_da] << ' '; } cout << endl
#define debugaa(x, n, m) cout << #x << " ->\n"; fori (i1_daa, n) { fori (i2_daa, m) { cout << (x)[i1_daa][i2_daa] << ' '; } cout << '\n'; } cout << endl

const ll MOD = 1000000007;
const ll INF = 2000000000;
const long long BIG = 1446803456761533460LL;

#define XL (x << 1)
#define XR (XL | 1)
#define MD ((l + r) >> 1)
#define Add(a, b) a = ((a) + (b)) % MOD
#define Mul(a, b) a = (1LL * (a) * (b)) % MOD

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

const ll maxn = 100010;
const ll maxa = 15;

ll n, A[maxn], B[maxa + 1], dp[1 << maxa], val[1 << maxa], bt[1 << maxa];

int main() {
    ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
    // ifstream cin(".in");

    cin >> n;
    fori (i, n - 1) {
        ll a, b, c; cin >> a >> b >> c;
        A[a] ^= c, A[b] ^= c;
    }
    fori (i, n) ++B[A[i]];
    ll cm = B[0];
    ll mask = 0;
    fori (i, maxa) {
        cm += B[i + 1] >> 1;
        if (B[i + 1] & 1) mask ^= 1 << i;
    }

    fori (i, maxa) bt[1 << i] = i + 1;
    forifrom (i, 1, 1 << maxa) {
        ll lb = i & -i;
        val[i] = val[i ^ lb] ^ bt[lb];
    }
    forifrom (i, 1, 1 << maxa) {
        for (ll j = i; j; j = (j - 1) & i) {
            smax(dp[i], dp[i ^ j] + (val[j] == 0));
        }
    }

    cm += dp[mask];
    cout << n - cm << '\n';

}


Measured memory_bytes: 4344
n = int(input())
a = sorted(list(map(int, input().split())))

import bisect

arg_max_i = bisect.bisect_left(a, a[n-1] // 2)

if abs(a[n-1] / 2 - a[arg_max_i]) > abs(a[n-1] / 2 - a[arg_max_i-1]):
  arg_max_i -= 1
if arg_max_i == n-1:
  arg_max_i -= 1

print(a[n-1], a[arg_max_i])


Measured memory_bytes: 14428
#include<bits/stdc++.h>
using namespace std;
int n,w[105],ans=1000000007;
int main()
{
	cin>>n;
	for(int i=1;i<=n;i++)
		cin>>w[i];
	for(int t=1;t<=n;t++)
	{
		int s1=0,s2=0;
		for(int i=1;i<=t;i++)
			s1+=w[i];
		for(int i=t+1;i<=n;i++)
			s2+=w[i];
		ans=min(ans,abs(s1-s2));
	}
	cout<<ans<<endl;
	return 0;
}


Measured memory_bytes: 256
// Counting Sort
#include <stdio.h>
#include <stdlib.h>

#define MAX 2000000

void CountingSort(); // 計数ソートを実施する関数

int C[MAX]; // 配列Aの各要素が何回現れるか数える配列

int main(){
  int i, n, *A, *B;

  // 配列Aの入力
  scanf("%d", &n);

  A = malloc(sizeof(int) * n + 1);
  B = malloc(sizeof(int) * n + 1);
  
  for(i=1; i <= n; i++){
    scanf("%d", &A[i]);
  }

  CountingSort(A, B, n); // 計数ソートの実施

  // 結果を出力
  for(i=1; i <= n; i++){
    if(i != 1)printf(" ");
    printf("%d", B[i]);
  }
  printf("\n");
  
  return 0;
}

void CountingSort(int *A, int *B, int n){
  int i;

  // カウンタ配列を初期化
  for(i=0; i < MAX; i++){
    C[i] = 0;
  }
  
  // C[i]にiの出現数を記録する
  for(i=1; i <= n; i++){
    C[A[i]]++;
  }

  // C[i]にi以下の数の出現数を記録する(配列Cの要素数1から昇順に累積和をとる)
  for(i=1; i < MAX; i++){
    C[i] = C[i] + C[i-1];
  }

  // 配列Aの要素を出力配列Bに順にコピーしていく
  for(i=n; i > 0; i--){
    B[C[A[i]]] = A[i];
    C[A[i]]--;
  }
}



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

int main()
{
    int a, b, c, d, t, ao;
    cin >> a >> b >> c >> d;
    if (c % b == 0)
    {
        t = c / b;
    }
    else
    {
        t = c / b + 1;
    }

    if (a % d == 0)
    {
        ao = a / d;
    }
    else
    {
        ao = a / d + 1;
    }

    cout << ((t <= ao) ? "Yes" : "No");
    return 0;
}

Measured memory_bytes: 3620
import sys
# gcd
# from fractions import gcd
# 切り上げ，切り捨て
# from math import ceil, floor
# リストの真のコピー（変更が伝播しない）
# from copy import deepcopy
# 累積和。list(accumulate(A))としてAの累積和
# from itertools import accumulate
# l = ['a', 'b', 'b', 'c', 'b', 'a', 'c', 'c', 'b', 'c', 'b', 'a']
# S = Counter(l)  # カウンタークラスが作られる。S=Counter({'b': 5, 'c': 4, 'a': 3})
# print(S.most_common(2))  # [('b', 5), ('c', 4)]
# print(S.keys())  # dict_keys(['a', 'b', 'c'])
# print(S.values())  # dict_values([3, 5, 4])
# print(S.items())  # dict_items([('a', 3), ('b', 5), ('c', 4)])
# from collections import Counter
# import math
# from functools import reduce
#
# input関係の定義
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())
# template


N, K = mi()
a = lmi()
dp = [False] * (K + 1)

for i in range(1, K + 1):
    for j in a:
        if i >= j and not dp[i - j]:
            dp[i] = True

if dp[K]:
    print("First")
else:
    print("Second")


Measured memory_bytes: 3828
import java.util.Scanner;

public class Main {
    
	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		while(s.hasNext()){
			int area = 0;
			int d = s.nextInt();
			for(int i=0 ; i<600 ;i+=d)
				area += i*i*d;
			System.out.println(area);
		}
    }
}

Measured memory_bytes: 12000
#include <bits/stdc++.h>
using namespace std;
constexpr long long mod = 1e9+7;

const int maxN = 1005;
vector<long long> fac(maxN + 1, 1);
vector<long long> invfac(maxN + 1, 1);

long long pow_mod(long long b, long long p, long long mod = 1'000'000'007){
    long long ret = 1;
    while (p){
        if (p & 1) ret = (ret * b) % mod;
        b = (b * b) % mod;
        p >>= 1;
    }
    return ret;
}

void init_facs(){
    for (long long i = 1; i <= maxN; ++i) fac[i] = (fac[i - 1] * i) % mod;
    invfac[maxN] = pow_mod(fac[maxN], mod - 2, mod);
    for (long long i = maxN; i != 1; --i) invfac[i - 1] = (invfac[i] * i) % mod;
}

long long solve(int N, int A, int B, int C, int D){
    vector<vector<long long>> dp(B + 1, vector<long long>(N + 1, 0));
    dp[A - 1][0] = 1;
    for (int k = A; k <= B; ++k){
        dp[k][0] = 1;
        for (int n = 1; n <= N; ++n){
            long long fkm = pow_mod(invfac[k], C);
            for (int m = C; m <= D and n - k * m >= 0; ++m){
                int r = n - k * m;
                dp[k][n] = (dp[k][n] + (dp[k - 1][r] * fac[N - r] % mod * fkm % mod * invfac[m] % mod)) % mod;
                fkm = fkm * invfac[k] % mod;
            }
            dp[k][n] = dp[k][n] * invfac[N - n] % mod;
            dp[k][n] = (dp[k][n] + dp[k - 1][n]) % mod;
        }
    }
    return dp[B][N];
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    init_facs();
    int N, A, B, C, D;
    cin >> N >> A >> B >> C >> D;
    cout << solve(N, A, B, C, D) << endl;
    return 0;
}

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

#define  fast         ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define  loop(i,m,n)  for(int i=m;i<n;i++)
#define  rloop(i,m,n) for(int i=m;i>=n;i--)
#define  mod          1000000007
#define  mp(x,y)      make_pair(x,y)
#define  pb(x)        push_back(x)
#define  Pop()        pop_back()
#define  F            first 
#define  S            second
#define  B()          begin()
#define  E()          end()

typedef  vector<int>            vi;
typedef  map<int,int>           mi;
typedef  vector<pair<int,int>>  vp;
typedef  pair<int,int>          pi;
typedef  long long              ll;

int main(){
    fast
    int n,x,t;
    cin>>n>>x>>t;
    int res=1,temp=x;
    while(n>temp){
        res++;
        temp+=x;
    }
    cout<<res*t;
    return 0;
}

Measured memory_bytes: 3648
/*
 * zyrch - Rupanshu Yadav
 */
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <fstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <utility>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <cassert>
#include <sstream>
using namespace std;

typedef long long ll;
typedef long double ld;
typedef double db;
typedef string str;

typedef pair<int, int> pi;
typedef pair<ll,ll> pl;
typedef pair<ld,ld> pd;

typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<ld> vd;
typedef vector<str> vs;
typedef vector<pi> vpi;
typedef vector<pl> vpl;

#define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL) 

#define forn(i,a,b) for (int i = (a); i < ll(b); ++i)
#define fo(i,a) forn(i,0,ll(a))
#define rforn(i,a,b) for (int i = (b)-1; i >= (a); --i)
#define ro(i,a) rforn(i,0,a)
#define trav(a,x) for (auto& a: x)

#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define rsz resize
#define ins insert

#define mp make_pair
#define pb push_back
#define eb emplace_back
#define f first
#define s second

ll mod = 1000000007;
inline ll fast_expo(ll base,ll power,ll modulo=mod){
    base%=modulo;
    if (base<0) base+=modulo;
    ll x=base,cnt=power,ans=1;
    while(cnt){
        if (cnt&1) ans=(ans*x)%modulo;
        x=(x*x)%modulo;
        cnt>>=1;
    }
    return ans;
}

void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif

const ll INF = 1e18;
//=========================CODE STARTS HERE=============================//


int main() {
	
	str s;
	cin >> s;
	
	fo(i,3) {
		fo(j , 3) {
			if (s[i] != s[j]) {
				cout << "Yes" << endl;
				return 0;
			}
		}
	}
	
	cout << "No" << endl;
	return 0;
}


Measured memory_bytes: 256
package main

import "fmt"

func main() {
	var n int
	var s string
	fmt.Scan(&n)
	fmt.Scan(&s)
	ans := 0
	max := 0
	for _, v := range s {
		if v == 'I' {
			ans++
			if max < ans {
				max = ans
			}
		} else {
			ans --
			if max < ans {
				max = ans
			}
		}
	}
	fmt.Println(max)
}


Measured memory_bytes: 512
#include<bits/stdc++.h>
using namespace std;
long long n,s,cnt=0;
int main(){
    cin>>n;
    for(int i=int(sqrt(n)) ;i>=1; i--){
        if(n%i==0){
            s=n/i;
            for(; s>0; s/=10)cnt++;
            cout<<cnt<<endl;
            return 0;
        }
    }
    return 0;
}

Measured memory_bytes: 256
#include<cstdio>
#include<algorithm>
#include<cmath>
using namespace std;
#define MAXN 100005
#define MOD 2019
#define LL long long
int n;
LL a[MAXN],x[MAXN]; 
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
	{
		scanf("%lld",&a[i]);
		if(i%2) x[1]+=2*a[i];
		else x[1]-=2*a[i];
	}
	x[1]/=2;
	for(int i=2;i<=n;i++)
		x[i]=2*a[i-1]-x[i-1];
	for(int i=1;i<n;i++)
		printf("%lld ",x[i]);
	printf("%lld\n",x[n]);
	return 0;
}

Measured memory_bytes: 2816
#include <cstdio>

int i,a,b,c;
int main()
{
	scanf("%d",&i);
		while(i!=0)
		{
			scanf("%d %d %d",&a,&b,&c);
			
			if(a*a+b*b==c*c||b*b+c*c==a*a||c*c+a*a==b*b)
			{
				printf("YES\n");
			}
			else printf("NO\n");
			i--;
		}

	return 0;
}

Measured memory_bytes: 0
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		//int N = Integer.parseInt(args[0]);
		String s = String.valueOf(N);
		int F = 0;
		for (int i = 0; i < s.length(); i++) {
			F = F + Integer.parseInt(s.substring(i, i+1));
		}
		
		if (N % F == 0) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}


Measured memory_bytes: 23636
// AOJ Volume1 0218

#include <stdio.h>

int main(void)
{
    int n;
    int pm, pe, pj;
    int i;
    
    while (1){
        scanf("%d", &n);
        if (n == 0){
            break;
        }
        for (i = 0; i < n; i++){
            scanf("%d%d%d", &pm, &pe, &pj);
            if (pm == 100 || pe == 100 || pj == 100){
                printf("A\n");
            }
            else if (pm + pe >= 180){
                printf("A\n");
            }
            else if (pm + pe + pj >= 240){
                printf("A\n");
            }
            else if (pm + pe + pj >= 210){
                printf("B\n");
            }
            else if (pm + pe + pj >= 150 && (pm >= 80 || pe >= 80)){
                printf("B\n");
            }
            else {
                printf("C\n");
            }
        }
    }
    return (0);
}

Measured memory_bytes: 584
import math
s = input().split() #標準入力　sに値を入れる
n = int(s[0])
root = int(math.sqrt(n))
ans = 10**18
for i in range(1, root + 1):
    if n % i != 0:
        continue
    j = n / i
    ans = min(ans, i + j - 2)
print(int(ans))

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

// input
int H, W, M;
vector<int> h, w;

vector<int> hn, wn;
set<P> s;


void input() {
    cin >> H >> W >> M;
    h = w = vector<int>(M);
    rep(i, M) {
        cin >> h[i] >> w[i];
        h[i]--;
        w[i]--;
    }
}


int main() {
    input();
    hn = vector<int>(H, 0);
    wn = vector<int>(W, 0);
    rep(i, M) {
        hn[h[i]]++;
        wn[w[i]]++;
        s.insert(P(h[i], w[i]));
    }
    int hmax = *max_element(hn.begin(), hn.end());
    int wmax = *max_element(wn.begin(), wn.end());
    vector<int> h_list, w_list;
    rep(i, H) if (hn[i] == hmax) h_list.push_back(i);
    rep(i, W) if (wn[i] == wmax) w_list.push_back(i);

    int ans = hmax + wmax - 1;
    for (int x : h_list) {
        for (int y : w_list) {
            if (s.count(P(x, y)) == 0) {
                ans = hmax + wmax;
                cout << ans << endl;
                return 0;
            }
        }
    }
    cout << ans << endl;
}


Measured memory_bytes: 26112
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Deque;
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
	static int N = 3;
	static int N2 = 9;

	public static void main(String[] args) {
		new Main().run();
	}

	private void run() {
		Puzzle in = new Puzzle();
		Scanner scanner = new Scanner(System.in);
		for (int i = 0; i < N2; i++) {
			in.f[i] = scanner.nextInt();
			if (in.f[i] == 0) {
				in.f[i] = N2;
				in.space = i;
			}
		}
		String ans = bfs(in);
		System.out.println(ans.length());
	}

	int[] dx = { -1, 0, 1, 0 };
	int[] dy = { 0, -1, 0, 1 };
	char[] dir = { 'u', 'l', 'd', 'r' };

	private String bfs(Puzzle s) {
		Deque<Puzzle> Q = new ArrayDeque<Main.Puzzle>();
		Map<Puzzle, Boolean> V = new HashMap<Main.Puzzle, Boolean>();
		Puzzle u = new Puzzle();
		Puzzle v = new Puzzle();
		s.path = "";
		Q.push(s);
		V.put(s, true);
		while (!Q.isEmpty()) {
			u = Q.poll();
			if (isTarget(u))
				return u.path;
			int sx = u.space / N;
			int sy = u.space % N;
			for (int r = 0; r < 4; r++) {
				int tx = sx + dx[r];
				int ty = sy + dy[r];
				if (tx < 0 || ty < 0 || tx >= N || ty >= N)
					continue;
				v = (Puzzle) u.clone();
				swap(v, u.space, tx * N + ty);
				v.space = tx * N + ty;
				if (!V.containsKey(v) || !V.get(v)) {
					V.put(v, true);
					v.path += dir[r];
					Q.offer(v);
				}
			}
		}

		return "unslovable";
	}

	private void swap(Puzzle v, int space, int i) {
		int tmp = v.f[space];
		v.f[space] = v.f[i];
		v.f[i] = tmp;
	}

	private boolean isTarget(Puzzle p) {
		for (int i = 0; i < N2; i++) {
			if (p.f[i] != (i + 1))
				return false;
		}
		return true;
	}
	class Puzzle implements Cloneable {
		int[] f = new int[N2];
		int space;
		String path;
		
		public Puzzle clone() {
			try {
				Puzzle clonePuzzle = (Puzzle) super.clone();
				int[] clonef = Arrays.copyOf(f, f.length);
				clonePuzzle.f = clonef;
				return clonePuzzle;
			} catch (CloneNotSupportedException e) {
				throw new InternalError(e.toString());
			}
		}

		@Override
		public int hashCode() {
			final int prime = 31;
			int result = 1;
			result = prime * result + getOuterType().hashCode();
			result = prime * result + Arrays.hashCode(f);
			return result;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			Puzzle other = (Puzzle) obj;
			if (!getOuterType().equals(other.getOuterType()))
				return false;
			if (!Arrays.equals(f, other.f))
				return false;
			return true;
		}

		private Main getOuterType() {
			return Main.this;
		}
		

	}
}

Measured memory_bytes: 93320
#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;

template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define int long long
#define double long double
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define mod 1000000007
#define ceil(a,b) (a+b-1)/b
#define endl "\n"
const int N=100005;
const int inf=1e18;
const double eps=1e-9;

#define oa(A) for(auto i:A)   cout<<i<<" ";cout<<endl;
#define o1(a) cout<<" "<<#a<<" : "<<a<<"\n"
#define o2(a,b) cout<<" "<<#a<<" : "<<a<<" "<<#b<<" : "<<b<<"\n"
#define o3(a,b,c) cout<<" "<<#a<<" : "<<a<<" "<<#b<<" : "<<b<<" "<<#c<<" : "<<c<<"\n"
#define o4(a,b,c,d) cout<<" "<<#a<<" : "<<a<<" "<<#b<<" : "<<b<<" "<<#c<<" : "<<c<<" "<<#d<<" : "<<d<<"\n"

int power(int a,int b){
    int res=1;
    while(b>0){
        if(b&1){
        	res=res*a;
		}
        a=a*a;
        b>>=1;
    }
    return res;
}
int pow1(int a,int b){
    int res=1;
    while(b>0){
        if(b&1){
            res=res*a;
            res%=mod;
        }
        a=a*a;
        a%=mod;
        b>>=1;
    }
    return res;
}
signed main(){
	ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
	
	string s;
    cin>>s;
    int c=0;
    int ans=0;
    for(int x=0;x<3;x++){
        if(s[x]=='R'){
            c++;
            ans=max(ans,c);
        }else{
            c=0;
        }
    }
    cout<<ans;








	
return 0;
}


Measured memory_bytes: 3572
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using static System.Console;
using static System.Math;

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            var ab = ReadInts();
            if (ab[0] * ab[1] % 2 == 0)
            {
                WriteLine("Even");
            }
            else
            {
                WriteLine("Odd");
            }
        }
        private static string Read() { return ReadLine(); }
        private static string[] Reads() { return (Read().Split()); }
        private static int ReadInt() { return int.Parse(Read()); }
        private static long ReadLong() { return long.Parse(Read()); }
        private static double ReadDouble() { return double.Parse(Read()); }
        private static int[] ReadInts() { return Array.ConvertAll(Read().Split(), int.Parse); }
        private static long[] ReadLongs() { return Array.ConvertAll(Read().Split(), long.Parse); }
        private static double[] ReadDoubles() { return Array.ConvertAll(Read().Split(), double.Parse); }
    }
}


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

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll int64_t

using namespace std;

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

	vector<int> a(n);
	rep(i,n){
		cin >> a[i];
	}

	ll ans =0;

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

	queue<int> conf;
	conf.push(a[n-1]);
	
	for(int i = n-2;i>=0;i--){
		int c = conf.front();conf.pop();
		ans +=c;

		conf.push(a[i]);
		conf.push(a[i]);

	}

	cout << ans;

	return 0;
}

Measured memory_bytes: 4788
// Problem : D - .. (Double Dots)
// Contest : AtCoder - AtCoder Beginner Contest 168
// URL : https://atcoder.jp/contests/abc168/tasks/abc168_d
// Memory Limit : 1024.000000 MB 
// Time Limit : 2000.000000 milisec 
// Powered by CP Editor (https://github.com/coder3101/cp-editor2)

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
double PI = 3.141592653589;

#define REP(i,n) for (ll i = 0; i < n; i++)
#define REPR(i,n) for(ll i = n-1; i >= 0; i--)
#define FOR(i,a,b) for (ll i = a; i < b; i++)
#define FORR(i,a,b) for(ll i = a-1; i>= b; i--)
#define ff first
#define ss second
#define MAXN (ll)1000002
#define MODN (ll)1000000007
#define mp make_pair
#define pb push_back
#define LN(x) (ll)x.length()
#define SZ(x) (ll)x.size()
#define bg(x) (x.begin())
#define rbg(x) (x.rbegin())
#define ENDL cout<<endl
ll n,t=1,a,b,m;
ll vis[MAXN];
vector<ll> adj[MAXN];
ll lsp[MAXN];
void bfs() {
	queue<pair<ll,ll> > q;
	q.push(mp(1,0));
	while(!q.empty()) {
		pair<ll,ll> cp = q.front();
		q.pop();
		if(vis[cp.ff]) continue;
		vis[cp.ff]=1;
		lsp[cp.ff]=cp.ss;
		for(auto el: adj[cp.ff]) {
			if(!vis[el]) {
				q.push(mp(el,cp.ff));
			}
		}
	}
}
int main() {
    cin>>n>>m;
	REP(i,m) {
		cin>>a>>b;
		adj[a].pb(b);
		adj[b].pb(a);
	}
	bfs();
	bool f=1;
	FOR(i,2,n+1) {
		if(lsp[i] == 0) {f=0;break;}
	}
	if(f) {
		cout<<"Yes"<<endl;
		FOR(i,2,n+1) {
			cout<<lsp[i]<<endl;
		}
	}	else {
		cout<<"No"<<endl;
	}	
}

Measured memory_bytes: 36056
N = int(input())
A = [int(i) for i in input().split()]

mean = 0

for i in range(len(A)):
    mean += A[i]

mean /= len(A)

min_value = 1000
min_frame = 0
for i in range(len(A)):
    tmp_value = abs(A[i] - mean)
    if min_value > tmp_value:
        min_value = tmp_value
        min_frame = i

print(min_frame)

Measured memory_bytes: 3064
#include<iostream>
using namespace std;
int main (void)
{
 int n,m,i,j,k,a[1000000];
  cin>>n>>m;
  for(i=0;i<m;i++){cin>>a[i];}
  for(i=0;i<m;i++){n=n-a[i];}
  if(n>=0){cout<<n;}
  else{cout<<"-1";}

}

Measured memory_bytes: 3636
// And Then the GOD Entered..   
#include<bits/stdc++.h>
 using namespace std;
 
typedef long long int ll;
#define endl "\n"
#define fi first
#define sec second 
#define pb push_back
#define test cout<<"debuged\n";
#define INF ll(1e18)
#define MOD 998244353
#define debug(x) cout<<x<<"\n";
#define pll pair<ll,ll>
#define mp make_pair
#define Minato_Namikaze ios_base::sync_with_stdio(false) , cin.tie(NULL);
#define all(v) v.begin(),v.end()
#define MAX 200015

int main()
{
    Minato_Namikaze
  
    
    ll n, m;
    cin >> n >> m;
    if(n == m)
        cout << "Yes";
    else
        cout << "No";         

    return 0;
    
}

Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static System.Console;
using static System.Math;

namespace AtTest.ABC_173
{
    class C
    {
        static void Main(string[] args)
        {
            var sw = new System.IO.StreamWriter(OpenStandardOutput()) { AutoFlush = false };
            SetOut(sw);

            Method(args);

            Out.Flush();
        }

        static void Method(string[] args)
        {
            int[] hwk = ReadInts();
            int h = hwk[0];
            int w = hwk[1];
            int k = hwk[2];

            bool[,] grid = new bool[h, w];
            for (int i = 0; i < h; i++)
            {
                string s = Read();
                for (int j = 0; j < w; j++)
                {
                    if (s[j] == '#')
                    {
                        grid[i, j] = true;
                    }
                }
            }

            int all = 1 << (h + w);
            int res = 0;
            for (int i = 0; i < all; i++)
            {
                int tmp = 0;
                for (int j = 0; j < h; j++)
                {
                    for(int l = 0; l < w; l++)
                    {
                        if((i&(1<<j))>0
                            || (i & (1 << (h + l))) > 0)
                        {
                            continue;
                        }

                        if (grid[j, l])
                        {
                            tmp++;
                        }
                    }
                }

                if (tmp == k)
                {
                    res++;
                }
            }

            WriteLine(res);
        }

        private static string Read() { return ReadLine(); }
        private static char[] ReadChars() { return Array.ConvertAll(Read().Split(), a => a[0]); }
        private static int ReadInt() { return int.Parse(Read()); }
        private static long ReadLong() { return long.Parse(Read()); }
        private static double ReadDouble() { return double.Parse(Read()); }
        private static int[] ReadInts() { return Array.ConvertAll(Read().Split(), int.Parse); }
        private static long[] ReadLongs() { return Array.ConvertAll(Read().Split(), long.Parse); }
        private static double[] ReadDoubles() { return Array.ConvertAll(Read().Split(), double.Parse); }
    }
}


Measured memory_bytes: 27424
#include <bits/stdc++.h>
#define fi first
#define se second
#define mod 1000000007
#define pb push_back
using namespace std;
typedef long long LL;
typedef vector<int> vi;
typedef pair<int,int> pi;

int n,x,t;

int main() {
	scanf("%d%d%d",&n,&x,&t);
	int times = (n/x) + ( (n%x > 0) ? 1 : 0 );
	printf("%d\n",times*t);
	return 0;
}

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

int road_array[100001];

int root(int n)
{
    if (road_array[n] != n)
    {
        road_array[n] = root(road_array[n]);
    }

    return road_array[n];
}

void uni(int x, int y)
{
    int x_root, y_root;

    x_root = root(x);
    y_root = root(y);

    if (x_root != y_root)
    {
        road_array[x_root] = y;
    }
}

int main()
{
    int n, m, a_indx, b_indx;
    long long int a = 0;

    scanf("%d %d", &n, &m);

    for (int i = 0; i<n; i++)
    {
        road_array[i] = i;
    }

    for (int i = 0; i<m; i++)
    {
        scanf("%d %d", &a_indx, &b_indx);

        uni((a_indx-1), (b_indx-1));
    }



    for (int i = 0; i<n; i++)
    {
        if (road_array[i] == i)
        {
            a ++;
        }
    }


    printf("%lld", (a-1));


    return 0;
}

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

#define int long long
using namespace std;
#define rep(i, n) for(int i=0;i<(n);++i)
typedef pair<int, int> pii;
const int INF = 1l << 60;
#define u_b upper_bound
#define l_b lower_bound


signed main() {
    int M, D;
    cin >> M >> D;
    int ans = 0;
    for (int m = 1; m <= M; ++m) {
        for (int d = 1; d <= D; ++d) {
            int d1 = d % 10;
            int d10 = d / 10;
            if (d1 >= 2 && d10 >= 2 && d1 * d10 == m)ans++;
        }
    }
    cout << ans << endl;
    return 0;
}


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

int main() {
	// your code goes here
int array[2][101],n,highest=0,sum=0;
cin>>n;
for(int i=0;i<2;i++)
for(int k=0;k<n;k++)
{
	cin>>array[i][k];
}
int right=n-1;
for(int l=0;l<n;l++)
{
	sum=0;
	for(int a=0;a<=l;a++)
	{
		sum+=array[0][a];
	}
	for(int b=l;b<n;b++)
	{
		sum+=array[1][b];
	}
	if(sum>highest)
	highest=sum;
}
cout<<highest;
return 0;
}

Measured memory_bytes: 256
#include<cstdio>
long long a,b,c,d,t,g,s;
long long gcd(long long x,long long y)
{
	if(y==0)return x;
	return gcd(y,x%y);
}
int main()
{
	scanf("%lld%lld%lld%lld",&a,&b,&c,&d);
	if(a%c==0||a%d==0)s--;
	s+=b-a+1;
	g=d/gcd(d,c)*c;
	t=b/c-a/c+b/d-a/d;
	t-=(b/g-a/g);
	printf("%lld",s-t);
}


Measured memory_bytes: 128
#include<iostream>
#include<stdio.h>
//#include <bits/stdc++.h>
#include<vector>
#include<float.h>
#include<iomanip>
#include<algorithm>
#include<string>
#include<cstring>
#include<math.h>
#include<cmath>
#include<sstream>
#include<set>
#include<map>
#include<queue>
#include<cassert>
#include<cmath>
#include<cstdint>
     
#define INF 1e9
#define LINF 1e19
#define rep(i,n)for(int i=0;(i)<(int)(n);i++)
#define REP(i,a,b)for(int i=(int)(a);(i)<=(int)(b);i++)
#define VEC(type, c, n) std::vector<type> c(n);for(auto& i:c)std::cin>>i;
#define vec(type,n) vector<type>(n)
#define vvec(m,n) vector<vector<int>> (int(m),vector<int>(n))
#define ALL(a)  (a).begin(),(a).end()
#define chmin(a, b) a = min(a, b)
#define chmax(a, b) a = max(a, b)
     
using namespace std;
using ll = long long;
using Graph = vector<vector<int>>;
using P = pair<ll, ll>;
     

const ll MOD = 1e9 + 7;


int main(){
    string s;
    cin >> s;
    int n = s.size();
    if(s[0] == s[n - 1])n++;
    cout << (n % 2 == 0 ? "Second" : "First") << endl;
}



Measured memory_bytes: 3752
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;

int main() {
	int n;
	cin >> n;
	int A[110];
	for (int i = 0; i < n; ++i)
		cin >> A[i];
	sort(A, A + n, greater<int>());

	int ans = 0;
	for (int i = 0; i < n; i++) {
		if (i % 2 == 0) ans += A[i];
		else ans -= A[i];
    }

	cout << ans << endl;
}

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

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

const int N = 2e6 + 5, mod = 1e9 + 7;

ll fact[N], rev[N];

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

void prep() {
	fact[0] = 1;
	for (int i = 1; i < N; i++)
		fact[i] = (fact[i - 1] * i) % mod;
	rev[N - 1] = pw(fact[N - 1], mod - 2);
	for (int i = N - 2; ~i; i--)
		rev[i] = (1LL * rev[i + 1] * (i + 1)) % mod;
}

ll c(int n, int k) {
	if(k > n)
		return 0;
	ll ans = (fact[n] * rev[k]) % mod;
	ans *= rev[n - k];
	return ans % mod;
}

int main() {
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);	
	prep();
	int r1, c1, r2, c2;
	cin >> r1 >> c1 >> r2 >> c2;
	ll ans = 0;
	for (int i = r1; i <= r2; i++) {
		ll t = c(i + c2 + 1, i + 1) - c(i + c1, i + 1);
		t = ((t % mod) + mod) % mod;
		ans += t;
		ans %= mod;
	}
	cout << ans << "\n";
}

Measured memory_bytes: 31488
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <string.h>
#include <cstdio>
#include <tuple>
#include <numeric>
using namespace std; using ll = long long; using ld = long double;  using pll = pair<ll, ll>;
using vl = vector<ll>; using vll = vector<vl>; using vpll = vector<pll>;
using vs = vector<string>; using tll = tuple<ll, ll, ll>; using vtll = vector<tll>;
const ld PI = 3.1415926535897932;
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define co(i) cout << i << endl;
#define co2(i,j) cout << i << " " << j << endl;
#define co3(i) cout << i << " ";
#define po(i) cout << i.first << " " << i.second << endl;
void in() {}
void debug_out() { cerr << endl; }
template<typename Head, typename... Tail>
void debug_out(Head h, Tail... t) {
	cerr << " " << h;
	if (sizeof...(t) > 0) cerr << " :";
	debug_out(t...);
}
template <typename T>
ostream& operator<<(ostream& os, vector<T> vec) {
	for (size_t i = 0; i < vec.size(); i++)os << vec[i] << (i + 1 == vec.size() ? "" : " ");
	return os;
}
ll ctoi(char c) {
	switch (c) {
	case '0': return 0; case '1': return 1; case '2': return 2;
	case '3': return 3; case '4': return 4; case '5': return 5;
	case '6': return 6; case '7': return 7; case '8': return 8;
	case '9': return 9;  default: return 0;
	}
}
bool pairCompare(const pll firstElof, pll secondElof)
{
	return firstElof.first > secondElof.first;
}
//**Snippetリスト**//
//rep, vin, all, iteLoop, bitSearch, bitList, nod, digitDP, treeDP//
//gcdlcm, isPrime, eratos, primeFactorize, Npow, combination, divisor, modinv, doubling//
//dfs, bfs, dijkstra, WarshallFloyd, BellmanFord, UnionFind, Kruskal, RMQ, LCA//
ll i, j, k, l; ll N, M, K, H, W, L, X, Y, Z, R, Q;
ll MOD = 1000000007, INF = 1LL << 60, ans = 0, z = 0, o = 1;
vl flag, D; vll path;
//***********//
int main() {
	cin >> N;
	vl F(N);
	for (i = 0; i < N; i++) {
		ll a, b;
		cin >> a >> b;
		ans -= b;
		F[i] = a + b;
	}
	sort(F.begin(), F.end());
	reverse(F.begin(), F.end());
	for (i = 0; i < N; i++) {
		if (i % 2 == 0) ans += F[i];
	}
	co(ans);
}

Measured memory_bytes: 4056
#include "bits/stdc++.h"

using namespace std;
typedef long long ll;
#define next asdnext
#define prev asdprev
#define all(x) (x).begin(), (x).end()
#define out(ans) cout << ans << endl;
const long long mod = 1e9 + 7;

int main(int argc, char const *argv[]) {
  float n;
  cin>>n;
  float ans;
  ans = (float)((float)((int)n/2+(int)n%2)/n);
  cout << ans;

  return 0;
}


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

#define REP(i,n) for(int i=0;i<(n);i++)
#define REAP(i,a,n) for(int i=(a);i<(n);i++)
#define YES cout<<"Yes"<<endl
#define NO cout<<"No"<<endl
#define fr first
#define sc second
#define pb push_back
#define All(v) v.begin(),v.end()
typedef long long ll;

int main(){
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    int k,p;
    REP(i,n){
        cin >> k >> p;
        k--;
        cout << k%p+1 << endl;
    }
}



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

int main()
{
    char B;
    cin >> B;
    
    if (B == 'A') {
        cout << "T" << endl;
    }else if(B == 'T'){
        cout << "A" << endl;
    }else if (B == 'G') {
        cout << "C" << endl;
    }else{
        cout << "G" << endl;
    }
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main(void){
    int n, x, b;
    long long ans = 0;
    cin >> n >> x >>b;
    if(b > x){
        ans += b-x;
        b = x;
    }
    for(int i=1;i<n;i++){
        int a, r = 0;
        cin >> a;
        if(a+b>x)r = a+b-x;
        ans += r;
        b = a-r;
    }
    cout << ans << endl;
}


Measured memory_bytes: 256
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
	int n,m;
	bool edge[8][8];
	scanf("%d %d",&n,&m);
	fill(edge[0],edge[0]+64,false);
	for(int i=0;i<m;i++){
		int a,b;
		scanf("%d %d",&a,&b);
		edge[a-1][b-1] = true;
		edge[b-1][a-1] = true;
	}
	int a[n];
	for(int i=0;i<n;i++) a[i] = i;
	int cnt = 0;
	do{
		bool flag = true;
		for(int i=1;i<n;i++){
			if(!edge[a[i-1]][a[i]]) flag = false;
		}
		if(flag) cnt++;
	}while(next_permutation(a+1,a+n));
	printf("%d\n",cnt);
	return 0;
}


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

using namespace std;

typedef long long ll;

typedef std::pair<int, int> ipair;
bool lessPair(const ipair& l, const ipair& r){return l.second < r.second;}
bool morePair(const ipair& l, const ipair& r){return l.second > r.second;}

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

const ll MOD = 1e9 + 7;
// const long long INF = 1LL<<60;
void add(long long &a, long long b) { a += b; if (a >= MOD) a -= MOD; }
void sub(long long &a, long long b) { a -= b; if (a < 0) a += MOD; }
void mul(long long &a, long long b) { a *= b; a %= MOD; }
ll llmin(ll a, ll b) { if (a < b) return a; else return b; }
ll llmax(ll a, ll b) { if (a < b) return b; else return a; }
ll llabs(ll a) { if (a >= 0) return a; else return - a; }
ll llmodpow(ll a, ll n) {
   if (n == 0) return 1;
   ll tmp = llmodpow(a, n / 2);
   mul(tmp, tmp);
   if (n & 1) mul(tmp, a);
   return tmp;
}

int main() {
   int N;
   cin >> N;
   cout << N * 800 - N / 15 * 200 << endl;
   return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define Rep(i, m,n) for (int i = m; i < (int)(n); i++)
int main(){
int K,N; cin>>K>>N; vector<int>d(N);
  rep(i,N){cin>>d.at(i);}
  int a=0; sort(d.begin(),d.end());
  rep(i,N-1){a=max((d.at(i+1)-d.at(i)),a);}
  a=max(a,K-(d.at(N-1)-d.at(0)));
  cout<<K-a<<endl;
}

Measured memory_bytes: 1024
#include<iostream>
#include<string>
int main(){
  size_t len,idx;
  std::string input;
  std::cin>>len>>input>>idx;
  char pin{input[idx-1]};
  for (auto& ch:input){
    if (ch!=pin)
      ch='*';
  }
  std::cout<<input;
  return 0;
}


Measured memory_bytes: 256
def jug(a):
    if a <= 48.0:
        print "light fly"
    elif a <= 51.0:
        print "fly"
    elif a <= 54.0:
        print "bantam"
    elif a <= 57.0:
        print "feather"
    elif a <= 60.0:
        print "light"
    elif a <= 64.0:
        print "light welter"
    elif a <= 69.0:
        print 'welter'
    elif a <= 75.0:
        print "light middle"
    elif a <= 81.0:
        print "middle"
    elif a <= 91.0:
        print "light heavy"
    else:
        print "heavy"

while True:
    try:

        a = float(raw_input())
        jug(a)

    except EOFError:
        break

Measured memory_bytes: 4244
#include <bits/stdc++.h>
#define ll long long

using namespace std;

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

    int k, a, b, t;
    cin >> k >> a >> b;
    for(int i = a; i <= b; i++) {
        if(i % k == 0) {
            cout << "OK";
            return 0;
        }
    }
    cout << "NG";
}

Measured memory_bytes: 3648
# 数え上げ問題

NM = input()
N = int(NM.split(' ')[0])
M = int(NM.split(' ')[1])

a = []
for i in range(M):
    a.append(int(input()))

a = sorted(a)
a.append(0)

dp = [0] * (N+1)
dp[0] = 1


for i in range(1,N+1):
    # 階段が壊れていたらそこに至る手段の数は０
    if(a[0] == i):
        dp[i] = 0
        del a[0]
        continue

    if(i>1):
        dp[i] = dp[i-1] + dp[i-2]
    else:
        dp[i] = dp[i-1]

print(dp[N]%(10**9 + 7))


Measured memory_bytes: 460020
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
 *
 * @author Hamadneh
 */
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);
        ACalc solver = new ACalc();
        solver.solve(1, in, out);
        out.close();
    }

    static class ACalc {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            out.print(n + n * n + n * n * n);
        }

    }

    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: 32812
#include<bits/stdc++.h>
typedef long long ll;

int main()
{
    std::ios::sync_with_stdio(0);
    std::cin.tie(0); std::cout.tie(0);
    //freopen("input.txt", "r", stdin);
    long long n;
    long double m;
    std::cin >> n >> m;
    long double ans = n*m;
    std::cout << (long long)ans << '\n';
    return 0;
}


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

int main()
{
  string s1,s2; cin>>s1>>s2;
  int ans=0;
  for(int i=0;i<s1.size();i++)
    if(s1[i]!=s2[i]) ans++;
  cout<<ans;
}

Measured memory_bytes: 3916
// #pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define N 1000000007
#define N2 998244353
#define Nmax 1000005
#define INF (ll)1e18
#define pll pair<ll,ll>
#define mp make_pair
#define fi first
#define se second
#define vv vector
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(ll i=m;i<(n);i++)
#define repr(i,n) repr2(i,n,0)
#define repr2(i,m,n) for(ll i=m;i>=(n);i--)
#define get(n) ll (n); scanf("%lld",&(n));
#define get2(n,k) ll (n),(k); scanf("%lld%lld",&(n),&(k));
#define get3(n,m,k) ll (n),(m),(k); scanf("%lld%lld%lld",&(n),&(m),&(k));
#define gets(s) string (s); cin >> (s);
#define ALL(c) (c).begin(),(c).end()
#define fill_nums(A,n) vector<ll> A((n)); for(ll i=0;i<n;i++) scanf("%lld",&A[i]);
#define fill_edges(adj,m) for(ll i=0;i<m;i++) {ll a, b; scanf("%lld %lld",&a,&b); adj[a-1].pb(b-1); adj[b-1].pb(a-1);}
#define fill_direct(adj,m) for(ll i=0;i<m;i++) {ll a, b; scanf("%lld %lld",&a,&b); adj[a-1].pb(b-1);}
#define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); //cout.tie(0);
#define pi 3.1415926535897
#define db double
#define noop
#define flu fflush(stdout)
#define imp {cout<<"NO\n"; return 0;}
#define debug_vec(vec,n) {rep(idxi,n) cout<<vec[idxi]<<" "; cout<<"\n";}
#define debug_pvec(vec,n) {rep(idxi,n) cout<<vec[idxi].fi<<"-"<<vec[idxi].se<<"  "; cout<<"\n";}
#define debug_set(seta) {cout<<seta.size()<<"\n"; for(auto idxi:seta) cout<<idxi<<" "; cout<<"\n";}
#define debug_map(mappa) {cout<<mappa.size()<<"\n";for(auto idxi:mappa) cout<<idxi.fi<<"-"<<idxi.se<<"  "; cout<<"\n";}

int main() {

    get(n);
    fill_nums(A,n);

    ll mini = INF, count = 0;
    rep(i,n) {
        if(A[i]<=mini) count++;
        mini = min(A[i],mini);
    }
    cout<<count<<endl;
    return 0;  
}

Measured memory_bytes: 1792
#include <iostream>
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cstring>
#include <deque>
#include <functional>
#include <initializer_list>
#include <math.h>
#include <map>
#include <set>
#include <stack>
#include <tuple>
#include <queue>
#include <vector>

#define FOR(i, a, b) for(int (i) = (a); (i) < (b); ++(i))
#define rFOR(i, a, b) for(int (i) = (b); (i) >= (a); --(i))
#define REP(i, n) FOR(i, 0, n)
#define rREP(i, n) rFOR(i, 0, (n-1))
#define SORT(A) std::sort((A).begin(), (A).end())
#define ALL(A) (A).begin(), (A).end()
// 座標圧縮 (for vector) : ソートしてから使うのが一般的 ; SORT(A) => COORDINATE_COMPRESSION(A)
#define COORDINATE_COMPRESSION(A) (A).erase(unique((A).begin(),(A).end()),(A).end())

using lli = long long int;
using pii = std::pair<int, int>;

void VintOut(std::vector<int>& A){
    const int n = A.size();
    if(n == 0){putchar('\n'); return;}
    printf("%d", A[0]);
    for(int i = 1; i < n; ++i) printf(" %d", A[i]);
    putchar('\n');
}
void VintOut(std::vector<long long int>& A){
    const int n = A.size();
    if(n == 0){ putchar('\n'); return;}
    printf("%lld", A[0]);
    for(int i = 1; i < n; ++i) printf(" %lld", A[i]);
    putchar('\n');
}

template <typename T>
inline bool chmin(T& a, T b){
    if(b < a){ a = b; return true;}
    return false;
}

template <typename T>
inline bool chmax(T& a, T b){
    if(a < b){ a = b; return true;}
    return false;
}

inline bool bitUP(int state, int k){ return (state >> k) & 1; }
inline bool bitUP(long long int state, int k){ return (state >> k) & 1;}


// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


constexpr int N = 2e5;
char str[10];
std::vector<int> A;
std::bitset<N + 1> P;


int main(void){
    int n, m; std::cin >> n >> m;
    std::string S;
    A.resize(n+1, 0);
    REP(i, m){
        int idx; std::cin >> idx >> S; idx--;
        if(P[idx]) continue;
        if(S[0] == 'W') A[idx]++;
        else P[idx] = true;
    }
    lli cnt = 0, res = 0;
    REP(i, n) if(P[i]) cnt++, res += A[i];
    printf("%lld %lld\n", cnt, res);

    




    return 0;
}

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

int main()
{
	int N,T,t,c;
	cin >> N >> T;
	vector<int> cost;
	for(int i(0);i<N;++i){
		cin >> c >> t;
		if(t <= T){
			cost.push_back(c);
		}
	}
	if(cost.size() == 0){
		cout << "TLE" << endl;
		return 0;
	}
	sort(begin(cost), end(cost));
	cout << cost[0] << endl;
	return 0;
}

Measured memory_bytes: 256
N = int(input())
A = list(map(int, input().split()))
A.sort()
def divisors(n):
    div = set()
    A = 1
    while A*A <= n:
        if n%A == 0:
            if A*A == n:
                div.add(A)
            else:
                B = n//A
                div.add(A)
                div.add(B)
        A += 1
    return div
div = list(divisors(A[0]) | divisors(A[1]))
m = 0
for x in div:
    count = 0
    for a in A:
        if a%x != 0:
            count += 1
    if count <= 1:
        m = max(m, x)
print(m)

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

using namespace std;

#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
#define all(c) (c).begin(), (c).end()
#define zero(a) memset(a, 0, sizeof a)
#define minus(a) memset(a, -1, sizeof a)
#define watch(a) { std::cout << #a << " = " << a << "\n"; }
template<class T1, class T2> inline bool minimize(T1 &a, T2 b) { return b < a && (a = b, 1); }
template<class T1, class T2> inline bool maximize(T1 &a, T2 b) { return a < b && (a = b, 1); }
template<class T, class V> istream& operator>> (istream& ist, pair<T, V>& p) { return ist >> p.first >> p.second; }
template<class T> ostream& operator<< (ostream& ost, pair<T, T>& p) { return ost << p.first << ", " << p.second; }
template<class T> istream& operator>> (istream& ist, vector<T>& vs) { for(auto& e: vs) ist >> e; return ist; }

typedef long long ll;
int const inf = INT_MAX / 2;

int N, M, Q;
vector<int> a, b, c, d;

int ans = 0;

int count(deque<int> const& A) {
  int ret = 0;
  rep(i, Q) {
    if (A[b[i]] - A[a[i]] == c[i]) {
      ret += d[i];
    }
  }
  return ret;
}

void dfs(deque<int>& deq) {
  if (deq.size() == N) {
    ans = max(ans, count(deq));
  }
  else if (deq.empty()) {
    REP(curr, 1, M + 1) {
      deq.push_back(curr);
      dfs(deq);
      deq.pop_back();
    }
  }
  else {
    REP(curr, deq.back(), M + 1) {
      deq.push_back(curr);
      dfs(deq);
      deq.pop_back();
    }
  }
}

int main() {
  cin >> N >> M >> Q;
  a.resize(Q), b.resize(Q), c.resize(Q), d.resize(Q);
  rep(i, Q) {
    cin >> a[i] >> b[i] >> c[i] >> d[i];
    a[i]--, b[i]--;
  }
  deque<int> d;
  dfs(d);
  cout << ans << endl;
}


Measured memory_bytes: 3596
'use strict';
const p = s => console.log(s);

// inputに入力データ全体が入る
function Main(input) {
  // 1行目がinput[0], 2行目がinput[1], …に入る
  input = input.split("\n");
  let N = input[0].split(" ")[0];
  let M = input[0].split(" ")[1];
  let A = input[1].split(" ");
  let max,sum = 0;

  for(let i =0; i < A.length ; i++) {
    sum += parseInt(A[i]);
  }

  if(N === sum) p(0);
  else if(N < sum) p(-1);
  else p(N - sum);
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


Measured memory_bytes: 30788