akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <sstream>
#include <iomanip>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <map>

#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;

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;

const ll BIG = 1000000007LL;

int inputValue(){
    int a;
    cin >> a;
    return a;
};

template<typename T>
void inputArray(T* p, int a){
    rep(i, a){
        cin >> p[i];
    }
};

template<typename T>
void inputVector(vector<T> * p, int a){
    rep(i, a){
        T input;
        cin >> input;
        p -> push_back(input);
    }
}

template <typename T>
void output(T a, int precision = 0) {
    if(precision > 0){
        cout << setprecision(precision)  << a << "\n";
    }
    else{
        cout << a << "\n";
    }
}

inline bool starts_with(const std::string& s, const std::string& prefix) {
   auto size = prefix.size();
   if (s.size() < size) return false;
   return std::equal(std::begin(prefix), std::end(prefix), std::begin(s));
}

inline bool ends_with(std::string const & value, std::string const & ending)
{
    if (ending.size() > value.size()) return false;
    return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
}

int N;
map<string, ll> dic;
string agcts[] = {"AA", "AC", "AG", "AT", "CA", "CC", "CG", "CT", "GA", "GC", "GG", "GT", "TA", "TC", "TG", "TT" };
char chars[] = {'A', 'C', 'G', 'T'};

void init() {
    for (auto& agct : agcts) {
        dic[agct] = 1;
    }
}

string take_3(const string& org) {
    int n = org.size();
    int take = min(3, n);
    return org.substr(n - take, take);
}

void increment() {
    map<string, ll> new_dic;
    
    for (auto& d: dic) {
        auto& agct = d.first;
        string first = take_3(agct);
        for (auto& c : chars) {
            new_dic[first + c] += dic[agct];
        }

        if (first == "AAG" || first ==  "ACG" || first ==  "AGG" || first ==  "ATG") {
            new_dic[first + 'C'] -= dic[agct];
        } else if (first == "AGA" || first == "AGC" || first == "AGG" || first == "AGT") {
            new_dic[first + 'C'] -= dic[agct];
        } else if (ends_with(agct, "AG")) {
            new_dic[first + 'C'] -= dic[agct];
        } else if (ends_with(agct, "GA")) {
            new_dic[first + 'C'] -= dic[agct];
        } else if (ends_with(agct, "AC")) {
            new_dic[first + 'G'] -= dic[agct];
        }
    }
    for (auto& d: new_dic) {
        auto& agct = d.first;
         new_dic[agct] %= BIG;
    }
    dic = new_dic;
}

int main(int argc, const char * argv[]) {
    N = inputValue();
    init();

    for (auto i = 3; i <= N; i++) {
        increment();
    }

    ll ans = 0;
    for (auto& d: dic) {
        auto& agct = d.first;
        ans += dic[agct];
        ans %= BIG;
    }
    output(ans);

    return 0;
}

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


int main() {
    int h,w,a,b;
    cin >> h >> w >> a >> b;
    rep(i,h){
        rep(j,w){
            if((i<b || j<a) && !(i<b && j<a))printf("1");
            else printf("0");
        }
        printf("\n");
    }
}

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

const int INF = 1e+8;
const int E_MAX = 1000000;

int main() {
	string s;
	int L;
	while(cin >> s >> L && L){
		int cnt = 0;
		vector<int> data;
		data.push_back(stoi(s));
		while(1){
			++cnt;
			while(s.size() < L){
				s  = "0" + s;
			}
			sort(s.begin(), s.end());
			int r = stoi(s);
			reverse(s.begin(), s.end());
			int l = stoi(s);
			auto it = find(data.begin(), data.end(), l - r);
			if(it != data.end()){
				int index = distance(data.begin(), it);
				cout << index << " " << l - r << " " << cnt - index << endl;
				break;
			}
			data.push_back(l - r);
			s = to_string(l - r);
		}
	}
	return 0;
}

Measured memory_bytes: 1268
#include<bits/stdc++.h>
using namespace std;
int n,a[200005],b[200005];
int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
		b[i]=a[i];
	}
	sort(a+1,a+1+n);
	for(int i=1;i<=n;i++)
		if(b[i]<=a[n/2])
			printf("%d\n",a[n/2+1]);
		else
			printf("%d\n",a[n/2]);
	return 0;
} 

Measured memory_bytes: 3712
#include<stdio.h>
int main(void){
  char str[21];
  int k,n;
  for(k=1;k<=20;k++){
    scanf("%c",&str[k]);
    if(str[k]=='\n') break;
    n++;
  }
  for(k=1;k<=n;k++){
    printf("%c",str[n-k+1]);
  }
  printf("\n");
  return 0;
}

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

namespace AtCoder
{
    public class Program
    {
        public static void Main(string[] args)
        {
            new Program().Solve(new ConsoleInput(Console.In, ' '));
        }

        public void Solve(ConsoleInput cin)
        {
            var N = cin.ReadInt;
            var H = cin.ReadIntArray(N);
            var record = 0;
            var count = 0;
            for (int i = 0; i < N - 1; i++)
            {
                if (H[i] >= H[i + 1])
                {
                    count++;
                }
                else
                {
                    if (count > record)
                    {
                        record = count;
                    }
                    count = 0;
                }
            }
            if (count > record)
            {
                record = count;
            }
            Console.WriteLine(record);
        }
    }

    public class ConsoleInput
    {
        private readonly System.IO.TextReader _stream;
        private char _separator = ' ';
        private Queue<string> inputStream;
        public ConsoleInput(System.IO.TextReader stream, char separator = ' ')
        {
            this._separator = separator;
            this._stream = stream;
            inputStream = new Queue<string>();
        }
        public string Read
        {
            get
            {
                if (inputStream.Count != 0) return inputStream.Dequeue();
                string[] tmp = _stream.ReadLine().Split(_separator);
                for (int i = 0; i < tmp.Length; ++i)
                    inputStream.Enqueue(tmp[i]);
                return inputStream.Dequeue();
            }
        }
        public string ReadLine { get { return _stream.ReadLine(); } }
        public int ReadInt { get { return int.Parse(Read); } }
        public long ReadLong { get { return long.Parse(Read); } }
        public double ReadDouble { get { return double.Parse(Read); } }
        public string[] ReadStrArray(long N) { var ret = new string[N]; for (long i = 0; i < N; ++i) ret[i] = Read; return ret; }
        public int[] ReadIntArray(long N) { var ret = new int[N]; for (long i = 0; i < N; ++i) ret[i] = ReadInt; return ret; }
        public long[] ReadLongArray(long N) { var ret = new long[N]; for (long i = 0; i < N; ++i) ret[i] = ReadLong; return ret; }
    }
}

Measured memory_bytes: 29020
#include <bits/stdc++.h>
#include<list>
#include<algorithm>
#define ll long long int
#define ld long double
#define pb push_back
#define ff first
#define ss second
#define rep(a,b,c) for(a=b;a<c;a++)
#define repj(a,b,c) for(a=b;a<c;a++)
#define repr for(i=n-1;i>=0;i--)
#define pii pair<ll,ll>
#define pll pair<ll, ll>
#define inf 100000001
const double pie  =3.141592653589793238463;
#define mod 1000000007
#define lb lower_bound
#define up upper_bound
#define rep1 for(i=1;i<=n;i++)
#define vr vector
#define POP(x)      __builtin_popcountll(x)
#define zerobits(x)      __builtin_ctzll(x)
#define ef else if
#define all(x) (x).begin(), (x).end()
#define SORT(A) sort(A.begin(),A.end());
#define REV(A) reverse(A.begin(), A.end());
#define lenth length()
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define endl "\n" 
const ll dx[4] = { -1, 1, 0, 0};
const ll dy[4] = {0, 0, -1, 1};
ll XX[] = { -1, -1, -1, 0, 0, 1, 1, 1 };
ll YY[] = { -1, 0, 1, -1, 1, -1, 0, 1 };
#define precise(x) cout<<fixed<<setprecision(x)
#define t1(x)                cerr<<#x<<": "<<x<<endl
#define t2(x, y)             cerr<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define t3(x, y, z)          cerr<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define t4(a, b, c, d)       cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define t5(a, b, c, d, e)    cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<endl
#define t6(a, b, c, d, e, f) cerr<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<" | "<<#e<< ": "<<e<<" | "<<#f<<": "<<f<<endl
using namespace std;
void SieveOfEratosthenes(ll n) 
{ 
    bool prime[n+1]; 
    memset(prime, true, sizeof(prime)); 
  
    for (ll p=2; p*p<=n; p++) 
    { 
        if (prime[p] == true) 
        { 
            for (ll i=p*p; i<=n; i += p) 
                prime[i] = false; 
        } 
    } 
  
    // for (ll p=2; p<=n; p++) 
       // if (prime[p]) 
          // cout << p << " "; 
} 

ll power(ll x, ll y) 
{ 
    ll res = 1; 
    while (y > 0) 
    { 
        if (y & 1) 
            res = res * x; 
        y = y >> 1; 
        x = x * x; 
    } 
    return res; 
}
int main()
{
    // fastio
    ll t,i,j,k,l,m,n,a,x,b,y,z,c,h,d,f,e,p,o,nl,np,q,r,g;
    char ch;
    cin>>ch;
    if(ch>='a' && ch<='z')
    {
        cout<<'a'<<endl;
    }
    else
    {
        cout<<"A"<<endl;
    }
}

Measured memory_bytes: 3548
require 'pp'

h, w = gets.chomp!.split(" ").map(&:to_i)
matrix = {}
h.times do |i|
    v = gets.chomp!.chars

    matrix[i] = v
end

matrix.each do |k, v|
    if v.all?{|ch| ch == "." }
        matrix.delete(k)
    end
end

(w - 1).downto(0) do |i|
    if matrix.all? {|k, v| v[i] == "." }
        matrix.each do |k, v|
            v.delete_at(i)
        end
    end
end

matrix.each do |_, v|
    puts v.join
end


Measured memory_bytes: 2940
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<string>
#include<vector>
using namespace std;
typedef long long LL;
int main()
{
 int a[10]={0};
 for(int i=0;i<3;i++)
 cin>>a[i];
 sort(a,a+3);
 printf("%d",a[0]*a[1]/2);
}



Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
 
#define int long long
#define REP(i, l, r) for (int i=(l); i<(r); ++i)
#define RREP(i, r, l) for (int i=(r); i>(l); --i)
#define CASET int _T; cin >> _T; REP(caset, 0, _T)
#define print(x) cout << to_string(x) << '\n'
#define vi vector<int>
#define vb vector<bool>
#define vs vector<string>
#define vvi vector<vi>
#define vvb vector<vb>
#define pii pair<int,int>
#define t3i tuple<int,int,int>
#define mii map<int,int>
#define vpii vector<pii>
#define vt3i vector<t3i>
#define sq(x) (x)*(x)
#define inv(x) powa(x, MOD-2)
 
long long INF = 1LL<<60;
long long MOD = 1e9+7;
 
string to_string(char &c) {string x(1, c); return x;}
string to_string(const char s[]) {return (string)s;}
string to_string(string &s) {return s;}
string to_string(vb &v) {string res; for (const bool &x : v) res += to_string(x) + ' '; return res;}
template <class C> string to_string(C &v) {string res; for (auto &x : v) res += to_string(x) + ' '; return res;}
template <typename A, typename B> istream &operator>>(istream &is, pair<A, B> &pr) {is >> pr.first >> pr.second; return is;}
template <typename A> istream &operator>>(istream &is, vector<A> &v) {for (auto &x : v) is >> x; return is;}
ostream &operator<<(ostream &os, char &c) {os << (char)c; return os;}
ostream &operator<<(ostream &os, const char s[]) {os << (string)s; return os;}
ostream &operator<<(ostream &os, string &s) {for (char &c : s) os << (char)c; return os;}
template <typename A, typename B> ostream &operator<<(ostream &os, pair<A, B> pr) {os << '(' << pr.first << ", " << pr.second << ')'; return os;}
ostream &operator<<(ostream &os, vb &v) {
    bool first = true;
    os << '[';
    for (const bool &x : v) {
        if (!first) os << ", ";
        first = false;
        os << x;
    }
    os << ']';
    return os;
}
template <class C> ostream &operator<<(ostream &os, C &v) {
    bool first = true;
    os << '[';
    for (auto &x : v) {
        if (!first) os << ", ";
        first = false;
        os << x;
    }
    os << ']';
    return os;
}
string bin_string(int x) {
    const int d = 32;
    string res(d, ' ');
    REP(i, 0, d) res[d-1-i] = '0'+(x>>i & 1LL);
    return res;
}
int powa(int base, int exp) {
    int res = 1;
    while (exp) {
        if (exp&1) res = res*base % MOD;
        base = base*base % MOD;
        exp >>= 1;
    }
    return res;
}

main() {
    ios::sync_with_stdio(0), cin.tie(0);
    
    int n, k;
    cin >> n >> k;
    vi a(n);
    cin >> a;
    sort(a.rbegin(), a.rend());

    REP(i, 0, min(n, k)) {
        a[i] = 0;
    }

    print(accumulate(a.begin(), a.end(), 0LL));
}

Measured memory_bytes: 1792
import java.util.*;

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

    public static void main(String[]$) {
        int n = scanner.nextInt();
        int c = scanner.nextInt();
        int[][] d = new int[c][c];
        for (int i = 0; i < c; i++) {
            for (int j = 0; j < c; j++) {
                d[i][j] = scanner.nextInt();
            }
        }
        int[][] a = new int[3][c];
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                a[(i + j) % 3][scanner.nextInt() - 1]++;
            }
        }

        long ans = Long.MAX_VALUE;
        for (int i = 0; i < c; i++) {
            for (int j = 0; j < c; j++) {
                if (i == j)
                    continue;

                for (int k = 0; k < c; k++) {
                    if (i == k || j == k)
                        continue;

                    long disc = 0;
                    for (int l = 0; l < c; l++) {
                        disc += d[l][i] * a[0][l];
                    }
                    for (int l = 0; l < c; l++) {
                        disc += d[l][j] * a[1][l];
                    }
                    for (int l = 0; l < c; l++) {
                        disc += d[l][k] * a[2][l];
                    }
                    ans = Math.min(ans, disc);
                }
            }
        }

        System.out.println(ans);
    }
}

Measured memory_bytes: 81344
//01/12/miya
#include<iostream>
#include<algorithm>
using namespace std;

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

	if(n==0)break;

	int c[1000000],t[1000000];
	for(int i=0;i<n;i++){		
		int m1,s1,m2,s2,m3,s3,m4,s4;
		cin >> c[i];
		cin >> m1 >> s1 >> m2 >> s2 >> m3 >> s3 >> m4 >> s4;
		t[i] = m1*60+s1+m2*60+s2+m3*60+s3+m4*60+s4;
	}
	for(int i=0;i<n;i++){
		for (int j=n-1;j>i;j--){
			if(t[j]<t[j-1]){
				swap(t[j],t[j-1]);
				swap(c[j],c[j-1]);
			}
		}
	}
	cout << c[0] << endl << c[1] << endl << c[n-2] << endl;
}
return 0;
}

Measured memory_bytes: 3236
#include <stdio.h>

int main(void) {
  int n, a[1000000], b[1000000];
  scanf("%d", &n);

  for (int i = 1; i <= n + 1; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);

  long long cnt = 0;

  for (int i = 1; i <= n; i++) {
    if (a[i] + a[i + 1] >= b[i]) {
      cnt += b[i];
      if (a[i] <= b[i]) {
        a[i + 1] = a[i] + a[i + 1] - b[i];
      }
    }
    else {
      cnt += a[i] + a[i + 1];
      a[i + 1] = 0;
    }
  }

  printf("%lld\n", cnt);

	return 0;
}  

Measured memory_bytes: 6528
#include <stdio.h>
#include <vector>

int main(void) {
  int i, j, k, n, ans = 0;
  scanf("%d", &n);
  std::vector<int> vec;
  vec.push_back(0), vec.push_back(0), vec.push_back(0);
  int be, a;
  for(i = 0; i < n; ++i) {
    scanf("%d", &a);
    if(i) if(be == a) vec.push_back(i);
    be = a;
  }
  vec.push_back(n);
  for(i = 3; i < vec.size(); ++i) if(ans < vec[i] - vec[i - 3]) ans = vec[i] - vec[i - 3];
  printf("%d\n", ans);
  return 0;
}


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

#define rep(a,b) for(int a = 0;a < b;a++)
#define REP(i, x, n) for(int i = x; i < n; i++)
#define P(a) cout << a << endl
#define pb(a) push_back(a)
#define mp(a,b) make_pair(a,b)
#define ssort(v) sort(v.begin(),v.end())
#define rev(v) reverse(v.begin(),v.end())
#define vP(v) for(int i = 0;i < v.size();i++){cout << v[i];if(i != v.size()-1)cout << endl;}
#define vcin(v,n) rep(i,n){int a;cin >> a;v.pb(a);}

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
int dx[] = { 1, -1 , 0 , 0 };
int dy[] = { 0,  0,  1, -1 };
ll MOD = 1000000007;

void solve(){
	string s;
	cin >> s;
	P("ABC"+s);
}

int main() {
    solve();
    return 0;
}


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

int main(){
    int n, x;
    cin >> n >> x;
    ll a[n], ans = 0;
    rep(i, n) cin >> a[i];
    rep(i, n - 1){
        if (a[i + 1] + a[i] > x){
            ans += a[i + 1] - max(x - a[i], ll(0));
            a[i + 1] = max(x - a[i], ll(0));
            if (a[i + 1] == 0 && a[i] > x){
                ans += a[i] - x;
                a[i] = x;
            }
        }
    }
    cout << ans << endl;
}

Measured memory_bytes: 1024
#include <bits/stdc++.h> 
#define pb push_back 
#define gc getchar 
#define mp make_pair
#define pii pair<int,int> 
#define pll pair<lli,lli>
#define vi vector<int>
#define vc vector<char>
#define pdd pair<double,double>
#define rep(i,n) for(int i=0;i<n;i++)
#define repi(i,a,b) for(int i=a;i<=b;i++)
#define repd(i,a,b) for(int i=a;i>=b;i--)
#define vvi vector<vector<int> >
#define vvli vector<vector<long long int> >
#define vli vector<long long int> 
#define pq priority_queue 
#define lli long long int
#define li long int
#define f first
#define len length
#define p(x) cout<<x<<" "
#define pline(x) cout<<x<<"\n"
#define pcase(test) cout<<"Case #"<<test<<": "
#define take(x) cin>>x
#define s second
#define arrtake(n,inp) rep(i,n){int x;cin>>x;inp.pb(x);}
#define ins insert
#define lb lower_bound
#define ub upper_bound
#define M 1000000007
#define PI 3.14159265358979323
using namespace std;
     /*ios_base::sync_with_stdio(false);
         cin.tie(NULL);*/
template <typename T>
void printvec(vector<T>& vec){
   rep(i,vec.size()){
       cout<<vec[i]<<" ";
   }
   cout<<endl;
}



int main() {

    ios_base::sync_with_stdio(false);

   	lli n,x,t;
   	cin>>n>>x>>t;

   	lli ans = n/x;

   	if(n%x!=0) ans++;
   	ans = ans*t;

   	cout<<ans<<"\n";

}



Measured memory_bytes: 3588
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
	public static void main(String[] args) throws NumberFormatException,
			IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(
				System.in));
		StringBuilder builder = new StringBuilder();
		String data;
		int[][] nums = new int[14][14];
		while ((data = reader.readLine()) != null) {
			if(data.isEmpty())
				break;
			StringTokenizer tokenizer = new StringTokenizer(data, ",");
			int x = Integer.parseInt(tokenizer.nextToken()) + 2;
			int y = Integer.parseInt(tokenizer.nextToken()) + 2;
			int size = Integer.parseInt(tokenizer.nextToken());

			nums[x][y]++;
			nums[x - 1][y]++;
			nums[x][y - 1]++;
			nums[x][y + 1]++;
			nums[x + 1][y]++;
			if (size == 2 || size == 3) {
				nums[x - 1][y - 1]++;
				nums[x - 1][y + 1]++;
				nums[x + 1][y - 1]++;
				nums[x + 1][y + 1]++;
			}
			if (size == 3) {
				nums[x - 2][y]++;
				nums[x][y - 2]++;
				nums[x][y + 2]++;
				nums[x + 2][y]++;
			}
		}
		int count = 0;
		int max = 0;
		for (int i = 2; i < 12; i++) {
			for (int j = 2; j < 12; j++) {
				max = Math.max(max, nums[i][j]);
				if (nums[i][j] == 0) {
					count++;
				}
			}
		}
		System.out.println(count);
		System.out.println(max);
	}
}

Measured memory_bytes: 16868
# include <stdio.h>
# include <string.h>
# include <stdlib.h>
# include <iostream>
# include <vector>
# include <queue>
# include <stack>
# include <map>
# include <math.h>
# include <algorithm>
using namespace std;
# define pi acos(-1.0)
# define mem(a,b) memset(a,b,sizeof(a))
# define FOR(i,a,n) for(int i=a; i<=n; ++i)
# define FO(i,a,n) for(int i=a; i<n; ++i)
typedef long long LL;
typedef unsigned long long ULL;

int main()
{
    char a[105][105];
    mem(a,'#');
    int h,w;
    cin>>h>>w;
    for(int i=1;i<=h;i++)
        for(int j=1;j<=w;j++)
            cin>>a[i][j];
    for(int i=0;i<=h+1;i++)
    {
        for(int j=0;j<=w+1;j++)
            cout<<a[i][j];
        cout<<endl;
    }
    return 0;
}





















Measured memory_bytes: 256
W1 = {'Sunny': 0, 'Cloudy': 1, 'Rainy': 2}
W2 = ('Sunny', 'Cloudy', 'Rainy')
while True:
    try:
        S = input()
        t = W1[S]
        t += 1
        if t > 2:
            t = 0
        print(W2[t])
    except EOFError:
        break

Measured memory_bytes: 3060
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  FOR(i,0,n)
#define pai 3.14159265358979323846
const int INF = 1001001001;
typedef long long ll;
int A[3][3], N;
bool punched[3][3];
bool ok[3][3];
int a[3][3],n;
using Graph = vector<vector<int>>;
vector<vector<int>> field;
vector<bool> seen;

const int MOD = 1000000007;
typedef pair<int,int> P;

int gcd(int a,int b){
	if (a%b == 0){
		return b;
	}
	else{
		return gcd(b,a%b);
	}

}
int lcm(int a,int b){
	return a /gcd(a,b) * b;
}







int main() {
    long long N; cin >> N;
    vector<long long> A(5);
    long long mi = 2LL<<60;
    //cout << mi << endl;
    for (int i = 0; i < 5; ++i) cin >> A[i], mi = min(mi, A[i]);
    cout << (N + mi - 1) / mi + 4 << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
  ll a,b,c,d;
  cin>>a>>b>>c>>d;
  ll ans = b*d;
  ll x2 = b*c;
  ll x3 = a*d;
  ll x4 = a*c;
  ans = max(ans,x2);
  ans = max(ans,x3);
  ans = max(ans,x4);
  cout<<ans<<"\n";
}

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

const int INF = 2e9;

int main(){
    vector<vector<int>> c(3,vector<int>(3));
    rep(i,3){
        rep(j,3) cin >> c[i][j];
    }
    bool ok = true;
    if (c[0][0] - c[0][1] != c[1][0] - c[1][1]) ok = false;
    if (c[0][0] - c[0][1] != c[2][0] - c[2][1]) ok = false;
    if (c[0][0] - c[0][2] != c[1][0] - c[1][2]) ok = false;
    if (c[0][0] - c[0][2] != c[2][0] - c[2][2]) ok = false;
    if(ok) cout << "Yes" << endl;
    else cout << "No" << endl;
}

Measured memory_bytes: 3596
import java.io.*;
import java.util.*;
import java.lang.*;

public class Main {
    public static class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(String s) {
            try {
                br = new BufferedReader(new FileReader(s));
            } catch (FileNotFoundException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }

        public FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String nextToken() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(nextToken());
        }

        long nextLong() {
            return Long.parseLong(nextToken());
        }

        double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }

    public static void main(String[] args) {
        FastScanner fs = new FastScanner();
        int n = fs.nextInt();
        int[][] charsCount = new int[n][26];
        for (int i = 0; i < n; ++i) {
            String s = fs.nextToken();
            for (int j = 0; j < s.length(); ++j) {
                charsCount[i][s.charAt(j) - 'a']++;
            }
        }
        StringBuilder sb = new StringBuilder();
        for (int j = 0; j < 26; ++j) {
            int min = Integer.MAX_VALUE;
            for (int i = 0; i < n; ++i) {
                min = Math.min(min, charsCount[i][j]);
            }
            while (min-- > 0) {
                sb.append((char)(j + 'a'));
            }
        }
        System.out.println(sb.toString());
    }
}


Measured memory_bytes: 21076
#include <iostream>
#include <string>
#include <utility>
#include <stack>
#include <vector>
#include <queue>
#include <algorithm>
#include <map>
#include <climits>
#include <set>
#include <cmath>
#include <numeric>

using namespace std;
const long long MOD = 1000000007;
long long A[2000];
map <long long, long long> smaller_num;
int main(){
    int N;
    long long K;
    cin >> N >> K;
    for(int i = 0; i < N; i++){
        cin >> A[i];
    }
    long long flip_no_one = 0;
    for(int i = 0; i < N - 1; i++){
        for(int j = i + 1; j < N; j++){
            if(A[i] > A[j]){
                flip_no_one ++;
            }
        }
    }

    for(int i = 0; i < N; i++){
        if(smaller_num.find(A[i]) != smaller_num.end()){
            continue;
        }
        smaller_num[A[i]] = 0;
        for(int j = 0; j < N; j++){
            if(A[i] > A[j]){
                smaller_num[A[i]]++;
            }
        }
    }


    long long ans = (flip_no_one * K) % MOD;
    for(int i = 0; i < N; i++){
        long long tmp_times = ((K * (K - 1)) / 2) % MOD;
        long long tmp = (smaller_num[A[i]] * tmp_times) % MOD;
        ans = (ans + tmp) % MOD;
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 384
#include <iostream>
#include <algorithm>
#include <string>
#include <map>
#include <cmath>

using namespace std;

int main(){
	string s, t;
	cin >> s >> t;

	int len = s.size();
	int flag = 0;

	for(int i = 0; i < len; i++){
		if(s[i] != t[i]){
			flag = 1;
			break;
		}
	}
	
	if(!flag && s.size() + 1 == (t.size() )){
		cout << "Yes" << endl;
	}
	else cout << "No" << endl;

	return 0;
}

Measured memory_bytes: 3640
#include<iostream>
#include<set>
#include<algorithm>
using namespace std;

int main(){
  
  int q, com, x, l, r;
  multiset<int> S;
  
  cin >> q;
  for(int i = 0;i < q;i++){
    cin >> com;
    
    if(com == 0){
      cin >> x;
      S.insert(x);
      cout << S.size() << endl;
    }else if(com == 1){
      cin >> x;
      cout << S.count(x) << endl;
    }else if(com == 2){
      cin >> x;
      S.erase(x);
    }else if(com == 3){
      set<int>::iterator itl, itr;
      
      cin >> l >> r;
      itl = S.lower_bound(l);
      itr = S.upper_bound(r);
      
      for(set<int>::iterator it = itl;it != itr;it++) cout << *it << endl;
    }
  }
  
  return 0;
}


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

using namespace std;

typedef long long ll;

#define sz(x) ((int)(x).size())
#define in(x) int x;cin>>x
#define inn(x, y) int x,y;cin>>x>>y
#define innn(x, y, z) int x,y,z;cin>>x>>y>>z
#define bit(n) (1<<(n))

#define out(x) cout<<(x)<<endl;
#define err(x) cerr<<(x)<<endl;
#define errr(x,y) cerr<<(x)<<" "<<(y)<<endl;

#define rep(i,n) for (int i=0;i<(n);i++)
#define repp(i,n) for (int i=1;i<=(n);i++)
#define reppp(j, i, n) for (int j=i+1; j<n; j++)

#define lim5 100002
#define lim9 1000000002

#define deg(rad) (((rad)/2/M_PI)*360)
#define pow(x) (x)*(x)
#define mid(min, max) ((min + max) / 2)

int main() {
	in(n);
	int a[200000] = {};
	rep(i, n) cin >> a[i];

	int cnt = 0;
	bool f = false;

	rep(i, n) {
		if (a[i] - cnt == 1) {
			if (cnt == -1) cnt = 0;
			++cnt;
			f = true;
		}
	}

	if (f)
		out(n - cnt)
	else
		out(-1);

	return 0;
}


Measured memory_bytes: 1024
//Bismillahir rahmanir rahim
#include<bits/stdc++.h>
using namespace std;
#define ll long long
string s,t;
int dp[3005][3005];
int solve(int i,int j)
{
    if(i==s.size() || j==t.size()) return 0;
    int &ret=dp[i][j];
    if(ret!=-1) return ret;
    ret=0;
    if(s[i]==t[j]) ret=solve(i+1,j+1)+1;
    else{
        ret=max(solve(i+1,j),solve(i,j+1));
    }
    return ret;
}
void print(int i,int j)
{
    if(i==s.size() || j==t.size()) return;
    if(s[i]==t[j]){
        printf("%c",s[i]);
        print(i+1,j+1);
        return;
    }
    if(dp[i+1][j]<dp[i][j]){
        print(i,j+1);
    }
    else{
        print(i+1,j);
    }
}
int main()
{
    cin >> s >> t;
    memset(dp,-1,sizeof(dp));
    solve(0,0);
    print(0,0);
    printf("\n");
    return 0;
}


Measured memory_bytes: 35840
import java.util.Scanner;
import java.util.stream.IntStream;

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

        int N = sc.nextInt();
        
        if(IntStream.range(1, 10).anyMatch(s -> N % s == 0 && N / s <= 9)){
            System.out.println("Yes");
        }else{
            System.out.println("No");
        }

    }
}


Measured memory_bytes: 36088
#include <stdio.h>

int main(void)
{
    int n,i,m,not=0;
    double a[100000],b=0;

    scanf("%d %d", &n, &m);
    if (n >= m)
    {
        for (i = 0; i < n; i++)
        {
            scanf("%lf", &a[i]);
            b += a[i];
        }

        for (i = 0; i < n; i++)
        {
            if (a[i] < (b / (4 * m)))
            {
                not++;
            }
        }
        if (n - not < m)
        {
            printf("No\n");
        }
        else
        {
            printf("Yes\n");
        }
    }else{
        printf("No\n");
    }
    return 0;
}

Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
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;
}

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
const ll mod = 1000000007;
ll S;
ll ans = 0;

ll beki(ll a, ll b) {
    if(b == 0) return 1;
    ll ret = beki(a, b / 2);
    ret = ret * ret % mod;
    if(b & 1) ret = ret * a % mod;
    return ret;
}
int sum[30000001];
int val[30000001];
bool f(ll l) {
    ll ok = 3e7;
    ll ng = l - 1;
    while((abs(ok-ng) > 1)) {
        ll mid = (ok + ng) / 2;
        if(sum[mid] - sum[l-1] >= S) ok = mid;
        else ng = mid;
    }
    return sum[ok] - sum[l-1] == S;
}

int main() {
    //cout.precision(10);
    cin.tie(0);
    ios::sync_with_stdio(false);
    for(int i = 0; i <= 7; i++) {
        val[beki(10, i)]++;
    }
    for(int i = 1; i <= 3e7; i++) {
        val[i] += val[i-1];
        sum[i] = sum[i-1] + val[i];
    }
    cerr << sum[1000000] << endl;
    cerr << sum[20000000] << endl;
    cerr << sum[30000000];
    cin >> S;
    for(ll i = 1; i < 1e6; i++) {
        if(f(i)) ans++;
    }
    ll undernum = 1e6 - 1e5;
    //cerr << ans << endl;
    for(ll under = 7; under <= 5e7; under++) {
        //cerr << under << "\n";
        undernum *= 10;
        //while(undernum >= mod) undernum -= mod;
        undernum %= mod;
        if(S % under == 0 and (under >= 9 or undernum >= S / under)) {
            ll tmp = S / under;
            ans += undernum - tmp + 1 + mod;
            ans %= mod;
            //cerr << "A " << undernum - tmp + 1 << endl;
            //ans += undernum - tmp + 1;
        }
        ll overmini = S % under;
        if(overmini == 0) overmini += under;
        ll undermaxi = (S - (under+1)*overmini) / under;
        if(undermaxi <= 0) continue;
        if(under <= 8) {
            while(undermaxi > undernum) {
                undermaxi -= (under + 1);
            }
            while(true) {
                if(undermaxi <= 0) break;
                ll overnum = (S - under * undermaxi) / (under + 1);
                undermaxi -= under + 1;
                if(overnum > undernum * 10) continue;
                if(overnum <= 0) continue;
                ans++;
            }
            continue;
        }
        ll tmp = (undermaxi - 1) / (under+1) + 1;
        //cerr << under << " " << undermaxi << " " << tmp << endl;
        ans += tmp;
        //while(ans >= mod) ans -= mod;
        ans %= mod;
    }
    if(S > 5e7) {
        ans += beki(10, S);
        ans -= beki(10, S - 1);
        ans %= mod;
        ans += mod;
        ans %= mod;
    }
    ans %= mod;
    cout << ans;
    return 0;
}


Measured memory_bytes: 234752
#include<iostream>
#include<algorithm>
#include<set>
using namespace std;
int N_MAX = 100001;
typedef long long ll;
int main()
{
  ll n,m=1,t,i,r1,r2,l1,l2,res=0;
  ll r[N_MAX];
  set<ll> s;
  decltype(s)::iterator it;
  cin >> n;
  for(i=0;i<n;i++){
    cin >> t;
    r[t]=i;
  }
  s.insert(r[n]);
  for(i=n-1;i>0;i--){
    it=s.lower_bound(r[i]);
    if(it==s.end()){
      r1=n;
      r2=n;
    }else{
      r1=*it;
      it++;
      if(it==s.end()){
        r2=n;
      }else{
        r2=*it;
      }
      it--;
    }
    if(it==s.begin()){
      l1=-1;
      l2=-1;
    }else{
      it--;
      l1=*it;
      if(it==s.begin()){
        l2=-1;
      }else{
        it--;
        l2=*it;
      }
    }
    res+=i*((r2-r1)*(r[i]-l1)+(r1-r[i])*(l1-l2));
    s.insert(r[i]);
  }
  cout << res << endl;
  return 0;
}

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

int main(){
    string s; cin >> s;
    ll k; cin >> k;
    int ans=1;
    for(int i=0; i<k; i++){
        if(s.at(i)=='1') continue;
        else{
            ans = s.at(i) - '0';
            break;
        }
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 3616
#include<iostream>
#include<string>
#include<stack>/*** LIFO *** stack<type> var;
push(), top():to get data, pop():to remove, size(), empty() ***/
using namespace std;

#define Fp(I, STAT, END) for(int I = STAT; I < END; I++)
#define Fm(I, STAT, END) for(int I = STAT; I > END; I--)

int main(){
    int A,B;
    cin >> A >> B;
    if(A != 1 && B != 1) cout << 1 << endl;
    else if(A != 2 && B != 2) cout << 2 << endl;
    else cout << 3 << endl;
    return 0;
}


Measured memory_bytes: 256
import numpy as np

bingo = np.zeros([3,3])
check = np.zeros([3,3])
choice = []
flag = "No"

for i in range(3):
    a = input().split()
    a = [int(x) for x in a]
    bingo[i] = a
N = int(input())
for i in range(N):
    choice.append(int(input()))

convert = bingo.reshape([9])
for i in range(9):
    for j in choice:
        if(convert[i] == j):
            check[i//3][i%3] = 1
            continue

            
for i in range(3):
    if(check[i][0] == 1 and check[i][1] == 1 and check[i][2] == 1):
        flag = "Yes"
    elif(check[0][i] == 1 and check[1][i] == 1 and check[2][i] == 1):
        flag = "Yes"
if(check[0][0] == 1 and check[1][1] == 1 and check[2][2] == 1):
    flag = "Yes"
elif(check[2][0] == 1 and check[1][1] == 1 and check[0][2] == 1):
    flag = "Yes"

print(flag)



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

int main() {
	string T = "YAKI";
	vector<char>S(11, ' ');
	for (int i = 0; i < 11; i++) {
		cin >> S.at(i);
	}
	for (int i = 0; i < 4; i++) {
		if (S.at(i) != T.at(i)) {
			cout << "No" << endl;
			return 0;
		}
	}
	cout << "Yes" << endl;
	return 0;
}

Measured memory_bytes: 256
<?php
fscanf(STDIN, "%d%d", $N, $K);
$A = array_map("intval", explode(" ", trim(fgets(STDIN))));
$F = array_map("intval", explode(" ", trim(fgets(STDIN))));
rsort($A);
sort($F);

$ng = -1;
$ok = 10**12;
while($ok > $ng+1){
    $mid = floor(($ok+$ng)/2);
    if(isOK($mid)){
        $ok = $mid;
    }else{
        $ng = $mid;
    }
}
echo $ok;

function isOK($t){
    global $A, $F, $N, $K;
    $needed = 0;
    for($i = 0; $i < $N; ++$i){
        $needed += max(0,$A[$i] - (int)($t/$F[$i]));
    }
    return $needed <= $K;
}

Measured memory_bytes: 37360
#include <bits/stdc++.h>
#define name "test"
#define fi first
#define se second
#define ll long long
#define db double
#define pb push_back
#define wrln cout<<'\n';
#define ii pair<int,int>
#define li pair<long long,int>
#define iii pair<int,ii>

using namespace std;
const int N=2e3+100;

ll n,res,dem,d,sum;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    if ( fopen(name".inp","r") )
    {
        freopen(name".inp","r",stdin);
        freopen(name".out","w",stdout);
    }
    cin>>n;
    for (int i=1; i<=n; i++)
    {
        d=n-i;
        sum=1;
        for (int i=2; i*i<=d; i++)
        {
            dem=0;
            while (d%i==0)
            {
                d/=i; dem++;
            }
            sum*=dem+1;
        }
        if (d>1) sum*=2;
        res+=sum;
    }
    cout<<res-1;
}


Measured memory_bytes: 3652
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n,d,a,b;
  cin >> n >> d;
  a=2*d+1;
  if (n%a==0) {
    b=n/a;
  }
  else {
    b=n/a+1;
  }
  cout << b << endl;
  return 0;
}


Measured memory_bytes: 256
from collections import deque
n, m = map(int, input().split())

graph = [[] for _ in range(n+1)]
for _ in range(m):
    u, v = map(int, input().split())
    graph[u].append(v)

s, t = map(int, input().split())

dist = [[-3] * 3 for _ in range(n+1)]
dist[s][0] = 0

q = deque([(s, 0)])

while q:
    now, c = q.popleft()
    ne = (c+1) % 3
    for node in graph[now]:
        if dist[node][ne] != -3:
            continue
        dist[node][ne] = dist[now][c] + 1
        q.append((node, ne))

print(dist[t][0] // 3)


Measured memory_bytes: 42656
A,B,C,D = map(int,input().split())
def GCD(x,y):
    if y == 0:
        return x
    return GCD(y,x%y)
A -= 1
GCF = C*D // GCD(C,D)
ans =B-A - (B//C + B//D - (B//GCF) - (A//C + A//D -(A//GCF)))
print(ans)


Measured memory_bytes: 2940
#include<stdio.h>
 main(){ 
		char S[3];
		int i;
		gets(S);
		if(S[1]=='B')
		 S[1]='R';
		else if(S[1]=='R')
		 S[1]='B';
		for(i=0;i<3;i++)
		 printf("%c",S[i]);
 }

Measured memory_bytes: 1516
#include <bits/stdc++.h>
#include <stdio.h>
#include <vector>
#include <algorithm> // sort
#include <map>
using namespace std;

int main(){
    int n;
    cin>>n;
    int xyh[3][n];
    int c;
    for(int i=0;i<n;i++){
        cin>>xyh[0][i]>>xyh[1][i]>>xyh[2][i];
        if(xyh[2][i]>0)c=i;
    }
    int h;
    for(int i=0;i<=100;i++){
        for(int j=0;j<=100;j++){
            h=xyh[2][c]+max(i-xyh[0][c],xyh[0][c]-i)+max(j-xyh[1][c],xyh[1][c]-j);
            for(int k=0;k<n;k++){
                if(xyh[2][k]==max(0,h-max(i-xyh[0][k],xyh[0][k]-i)-max(j-xyh[1][k],xyh[1][k]-j))){
                    if(k==n-1){
                        cout<<i<<' '<<j<<' '<<h<<endl;
                        return 0;
                    }
                }else{
                    break;
                }
            }
        }
    }
}

Measured memory_bytes: 256
#include <cstdio>

int main()
{
	int n;
	int d1,d2;
	scanf("%d",&n);
	int i;
	int count = 0;
	for (i = 0; i < n; i++) {
		scanf("%d%d", &d1, &d2);
		if (d1 == d2)
			count++;
		else
			count = 0;
		
		if (count == 3) {
			printf("Yes\n");
			return 0;
		}
	}
	printf("No\n");
	return 0;
}


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

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

    int x, a;
    cin >> x >> a;

    if(x<a) cout << 0 << endl;
    else cout << 10 << endl;

    return 0;
}

Measured memory_bytes: 256
import math
import fractions
n,m = map(int,input().split())
lis = []
nn = n
mm = m
for i in range(2,math.ceil(math.sqrt(max(n,m)))+1):
  while nn % i == 0 and mm % i == 0:
    nn = nn // i
    mm = mm // i
num = (n * m)// fractions.gcd(n,m)
s = str(input())
t = str(input())
s = s[::nn]
t = t[::mm]
if s == t:
  print(num)
else:
  print("-1")

Measured memory_bytes: 5576
package main

import (
	"fmt"
	"strconv"
)

func main() {
	var a float64
	fmt.Scan(&a)

	mensaki := a * a * 3.141592653589
	ensyu := 2 * 3.141592653589 * a

	fmt.Println(strconv.FormatFloat(mensaki, 'f', 5, 64), strconv.FormatFloat(ensyu, 'f', 5, 64))
}



Measured memory_bytes: 1124
N = int(input())
l = list(map(int, input().split()))
M = max(l)

h = [1]*(M+1)
g = [0]*(M+1)

for v in l:
    if g[v] == 1:
        h[v] = 0
    g[v] = 1
    s = v*2
    while s <= M:
        h[s] = 0
        s += v
cnt = 0
for v in l:
    if h[v] == 1:
        cnt += 1
print(cnt)

Measured memory_bytes: 35132
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <queue>
#include <iomanip>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstring>
#include <climits>

using namespace std;

#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())

typedef long long ll;
typedef pair<int, int> P;
typedef vector<int> V;
typedef map<int, int> M;

constexpr ll INF = 1e18;
constexpr ll MOD = 1e9 + 7;
constexpr double PI = 3.14159265358979323846;
constexpr int di[] = {0, 0, 1, -1};
constexpr int dj[] = {1, -1, 0, 0};

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

    int n;

    string s;

    cin >> n >> s;

    int cnt = 0;

    REP(i, n)
    {
        cnt += (s[i] == 'R');
    }

    if (cnt > n - cnt)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;

    return 0;
}

Measured memory_bytes: 256
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.Iterator;

public class Main {

	static BufferedReader reader;
	final static boolean MODE_DEBUG = false;
	static int[] read_line_int;
	static int read_line_int_ptr;
	//static field here
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		reader = new BufferedReader(new InputStreamReader(System.in));
		//code here
		String[] s = readLine();
		long A = Long.parseLong(s[0]);
		int B = Integer.parseInt(s[1].replace(".",""));
		print(A*B/100);
	}
	
	//functions here
	//note that all methods should be STATIC

	private static int readInt() {
		if(read_line_int==null||read_line_int_ptr==read_line_int.length) {
			read_line_int = readLineInt();
			read_line_int_ptr=0;
		}
		return read_line_int[read_line_int_ptr++];
	}

	private static <T> int arraySearch(T needle, T[] heystack) {
		for(int i=0;i<heystack.length;i++) {
			if(needle.equals(heystack[i])) {
				return i;
			}
		}
		return -1;
	}
	private static int[] sort(int[] base) {
		int[] copy = array_copy(base);
		Arrays.sort(copy);
		return copy;
	}
	private static int[] array_copy(int[] base) {
		int[] copy = new int[base.length];
		for(int i=0;i<base.length;i++) {
			copy[i] = base[i];
		}
		return copy;
	}
	private static int[] asArray(ArrayList<Integer> ints) {
		int[] intlist = new int[ints.size()];
		for(int i=0;i<intlist.length;i++) {
			intlist[i] = ints.get(i);
		}
		return intlist;
	}
	private static String[] readLine(){
		try{
			return reader.readLine().split(" ");
		}catch(Exception e){
			e.printStackTrace();
			return new String[]{e.getMessage()};
		}
	}
	private static int[] readLineInt(){
		try{
			String[] s = readLine();
			int[] ints = new int[s.length];
			for(int i=0;i<ints.length;i++) {
				ints[i] = Integer.parseInt(s[i]);
			}
			return ints;
		}catch(Exception e){
			e.printStackTrace();
			return null;
		}
	}
	private static long[] readLineLong(){
		try{
			String[] s = readLine();
			long[] ints = new long[s.length];
			for(int i=0;i<ints.length;i++) {
				ints[i] = Long.parseLong(s[i]);
			}
			return ints;
		}catch(Exception e){
			e.printStackTrace();
			return null;
		}
	}
	private static byte[] readLineByte(){
		try{
			String[] s = readLine();
			byte[] bytes = new byte[s.length];
			for(int i=0;i<bytes.length;i++) {
				bytes[i] = Byte.parseByte(s[i]);
			}
			return bytes;
		}catch(Exception e){
			e.printStackTrace();
			return null;
		}
	}
	private static char[] readLineChar(){
		try{
			String[] s = readLine();
			char[] chars = new char[s.length];
			for(int i=0;i<chars.length;i++) {
				chars[i] = (char)Integer.parseInt(s[i]);
			}
			return chars;
		}catch(Exception e){
			e.printStackTrace();
			return null;
		}
	}
	private static void print(Object o){
		System.out.println(o);
	}
	private static void print(){
		System.out.println();
	}
	private static void printd(Object o){
		if(MODE_DEBUG)System.err.println(o);
	}
	private static void printd(){
		if(MODE_DEBUG)System.err.println();
	}
}


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

using namespace std;
typedef long long ll;
#define tr(container, it) \
	for (auto it = container.begin(); it != container.end(); it++)
#define scontains(c,x) ((c).find(x) != (c).end())   //O(log n) 
#define contains(c,x) (find((c).begin(),(c).end(),x) != (c).end()) //O(n)
#define Ichar(_x) char _x;scanf("%c",&_x);
#define Iint(_x) int _x;scanf("%d",&_x); 
#define Ill(_x)  ll _x;scanf("%lld",&_x);
#define inc(a,b,x)(x)>a && (x)<b	
#define incE(a,b,x)(x)>=a && (x)<=b	
//freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
const double pi = 3.14159265358979323846;

int arr[3];
int main()
{
	std::cin >>	arr[0];
	std::cin >>	arr[1];
	std::cin >>	arr[2];
	sort(arr, arr + 3);
	std::cout << arr[2]-arr[1] +(arr[1]-arr[0])/2+((arr[1] - arr[0]) % 2 == 0 ? 0 : 2);

}




Measured memory_bytes: 256
MOD = 1000000007
FACT = []
def calc_fact(n)
  FACT[0] = 1
  for i in 1..n
    FACT[i] = FACT[i-1] * i
    FACT[i] = FACT[i] % MOD
  end
end
n,m = gets.chomp.split(" ").map(&:to_i)
calc_fact([n,m].max)
if (n-m).abs >= 2
  puts 0
  exit
elsif (n-m).abs == 1
  puts FACT[n] * FACT[m] % MOD
else
  puts FACT[n] * FACT[m] * 2 % MOD
end


Measured memory_bytes: 15344
#include "bits/stdc++.h"
using namespace std;
#define watch(x) cout << (#x) << " is " << (x) << endl

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

  int n,m;
  cin>>n>>m;
  int a[m];
  long long sum=0;
  for(int i=0;i<m;i++){
  cin>>a[i];
  sum+=a[i];
  }

  if(sum>n){
    cout<<-1;
    return 0;
  }
  cout<<n-sum<<endl;

  return 0;
}


Measured memory_bytes: 3672
#include <cstdio>
#include <iostream>
#include <string>
#include <math.h>
#include <iomanip>

using namespace std;
int main(){
    int N, K;
    cin >> N >> K;
    double val = 0;
    for(int n = 1; n < N+1; n++){
        double t_d = log((double)K/n)/log(2);
        if (t_d <= 0)t_d = 0;
        if(t_d - (int)t_d > 0)val += (double)1/N * pow(0.5, ((int)(t_d)+1));
        else val += (double)1/N * pow(0.5, ((int)(t_d)+0));
    }
    cout << setprecision(20) << val << endl;
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define int long long
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define sz(a) a.size()
#define re return 
#define MP make_pair
#define pb push_back
#define pii pair<int,int>
#define se second
#define fi first
using namespace std;
const int MOD=1e9+7;
int ans;
int n,a[200005],sum[200005];
signed main(){
	ios_base::sync_with_stdio(0);
	cin>>n;
	for(int i=0;i<n;i++) cin>>a[i];
	sum[n-1]=a[n-1];
	for(int i=n-2;i>0;i--) sum[i]=(a[i]+sum[i+1])%MOD; 
	//for(int i=1;i<n;i++) cout<<i<<':'<<sum[i]<<"\n";
	for(int i=0;i+1<n;i++){
		int cur=a[i]*sum[i+1]%MOD;
		ans=(ans+cur)%MOD;
	}
	cout<<ans;
	re 0;
}

Measured memory_bytes: 6756