akhauriyash/Code-Regression huggingface dataset:
#include <vector> 
#include <list> 
 #include <map>
 #include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <queue>
using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << '=' << (x) << endl;
#define debug(x) cerr << #x << '=' << (x) << '(L' << __LINE__ << ')' << ' ' << __FILE__ << endl;

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

    REP(i,B+1){

        if((i*A-C)%B==0){
            cout<<"YES"<<endl;
            return 0;
        }

    }


    cout<<"NO"<<endl;


}


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

typedef long long int lli;
typedef unsigned long long int ulli;
typedef pair<int,int> pii;
typedef priority_queue< int, vector< int >, greater< int > >  minHeap;

#define ones(x) __builtin_popcount(x)
#define onesl(x) __builtin_popcountl(x)
#define onesll(x) __builtin_popcountll(x)

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define scn(n) scanf("%d",&n)
#define scnll(n) scanf("%lld",&n)
#define scn2(n,m) scanf("%d%d",&n,&m)
#define scn3(n,m,w) scanf("%d%d%d",&n,&m,&w)
#define scn2ll(n,m) scanf("%lld%lld",&n,&m)
#define atoz(v) v.begin(),v.end()
#define ratoz(v) v.rbegin(),v.rend()
#define Fill(a,v) memset(a,v,sizeof(a))
#define sz(v) v.size()
#define fi first
#define se second
#define inf 1e9
#define pi acos(-1.0)
#define sqr(x) x*x
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define ten(n) (int)1e##n
#define tenll(n) (lli)1e##n
#define mod 1000000007
#define FastIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

int Set(int N,int pos)
{
    return N=N | (1<<pos);
}
int reset(int N,int pos)
{
    return N = N & ~(1<<pos);
}
bool check(int N,int pos)
{
    return (bool)(N & (1<<pos));
}


inline int addmod(int x ,int y){return (x%mod + y%mod)%mod;}
inline int submod(int x ,int y){return (x%mod - y%mod + mod)%mod;}
inline int mulmod(int x ,int y){return (x%mod *1LL* y%mod)%mod;}
inline int nextSubMask(int i , int mask) {return (i-1)&mask;} /// returns next smallest submask

template<typename T>
void we_r_done(T mssg){cout<<mssg; exit(0);}


int main()
{
    ///freopen("output.txt","w",stdout);
    ///freopen("input.txt","r",stdin);

    ///FastIO;


    string s;
    cin>>s;
    lli k;
    cin>>k;

    for(int i=0; i<s.size(); i++){
        if(s[i] == '1')continue;
        if(k < i+1){
            cout<<1;
            return 0;
        }
        else{
            cout<<s[i];
            return 0;
        }
    }
    cout<<1;


    return 0;

}

///sin and cos expect input in radians not degrees. so use , sin(degrees * pi / 180)
///using bs = bitset<MX>; // how many distinct number can be form?


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

//#define int long long
typedef long long ll;

typedef unsigned long long ul;
typedef unsigned int ui;
const ll mod = 1000000007;
const ll INF = mod * mod;
const int INF_N = 1e+9;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
#define all(v) (v).begin(),(v).end()
typedef pair<ll, ll> LP;
typedef long double ld;
typedef pair<ld, ld> LDP;
const ld eps = 1e-12;
const ld pi = acos(-1.0);
//typedef vector<vector<ll>> mat;
typedef vector<int> vec;

//繰り返し二乗法
ll mod_pow(ll a, ll n, ll m) {
	ll res = 1;
	while (n) {
		if (n & 1)res = res * a%m;
		a = a * a%m; n >>= 1;
	}
	return res;
}

struct modint {
	ll n;
	modint() :n(0) { ; }
	modint(ll m) :n(m) {
		if (n >= mod)n %= mod;
		else if (n < 0)n = (n%mod + mod) % mod;
	}
	operator int() { return n; }
};
bool operator==(modint a, modint b) { return a.n == b.n; }
modint operator+=(modint &a, modint b) { a.n += b.n; if (a.n >= mod)a.n -= mod; return a; }
modint operator-=(modint &a, modint b) { a.n -= b.n; if (a.n < 0)a.n += mod; return a; }
modint operator*=(modint &a, modint b) { a.n = ((ll)a.n*b.n) % mod; return a; }
modint operator+(modint a, modint b) { return a += b; }
modint operator-(modint a, modint b) { return a -= b; }
modint operator*(modint a, modint b) { return a *= b; }
modint operator^(modint a, int n) {
	if (n == 0)return modint(1);
	modint res = (a*a) ^ (n / 2);
	if (n % 2)res = res * a;
	return res;
}

//逆元(Eucledean algorithm)
ll inv(ll a, ll p) {
	return (a == 1 ? 1 : (1 - p * inv(p%a, a)) / a + p);
}
modint operator/(modint a, modint b) { return a * modint(inv(b, mod)); }

const int max_n = 1 << 18;
modint fact[max_n], factinv[max_n];
void init_f() {
	fact[0] = modint(1);
	for (int i = 0; i < max_n - 1; i++) {
		fact[i + 1] = fact[i] * modint(i + 1);
	}
	factinv[max_n - 1] = modint(1) / fact[max_n - 1];
	for (int i = max_n - 2; i >= 0; i--) {
		factinv[i] = factinv[i + 1] * modint(i + 1);
	}
}
modint comb(int a, int b) {
	if (a < 0 || b < 0 || a < b)return 0;
	return fact[a] * factinv[b] * factinv[a - b];
}
using mP = pair<modint, modint>;

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


// 広義、狭義をフラグで指定できる
template< typename T >
int LIS(const vector< T > &a, bool strict) {
  vector< T > lis;
  for(auto &p : a) {
    typename vector< T >::iterator it;
    if(strict) it = lower_bound(begin(lis), end(lis), p);
    else it = upper_bound(begin(lis), end(lis), p);
    if(end(lis) == it) lis.emplace_back(p);
    else *it = p;
  }
  return lis.size();
}

void solve() {
    int n; cin >> n;
    vec a(n);
    rep(i, n) cin >> a[i];

    cout << LIS(a, true) << endl;
}

signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  //cout << fixed << setprecision(10);
  //init_f();
  //init();
  //int t; cin >> t; rep(i, t)solve();
  solve();
//   stop
    return 0;
}



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

using namespace std;

int main()
{
        int n,t,c1,t1,i,k=0,d[1000]={0},p[1000];
        cin>>n>>t;
        for(i=0;i<n;i++)
        {
                cin>>c1>>t1;
                if(t1<=t)
                {
                     p[k]=t1;
                     d[k]=c1;
                     k++;
                }
        }
        sort(d,d+k);
        if(d[0]>0)
        cout<<d[0]<<endl;
        else
                cout<<"TLE"<<endl;
        return 0;
}


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

n, m = map(int, input().split())

root = [-1] * n


def r(x):
    if root[x] < 0:
        return x
    else:
        root[x] = r(root[x])
        return root[x]


def unite(x, y):
    x = r(x)
    y = r(y)
    if x == y:
        return
    root[x] += root[y]
    root[y] = x


def size(x):
    return -1 * root[r(x)]


for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    unite(a, b)

ans = 0
for i in range(n):
    ans = max(ans, size(i))

print(ans)


Measured memory_bytes: 35812
#include <algorithm>
#include <cmath>
#include <climits>
#include <functional>
#include <iostream>
#include <queue>
#include <string>
#include <vector>

using namespace std;
using ll  = long long;
template <typename T> T In() {
    T t;
    cin >> t;
    return t;
}
template <typename T> vector<T> ReadVec1(int N) {
    vector<T> vec(N);
    for(int i = 0; i < N; i++)
        vec[i] = In<T>();
    return move(vec);
}
template <typename T> vector<vector<T>> Vec2(int i, int j, T ini = 0) {
    vector<vector<T>> vec(i, vector<T>(j, ini));
    return move(vec);
}
template <typename T> vector<vector<vector<T>>> Vec3(int i, int j, int k, T ini = 0) {
    vector<vector<vector<T>>> vec(i, vector<vector<T>>(j, vector<T>(k, ini)));
    return move(vec);
}


int main() {
    string S = In<string>();
    if(S[0] == S[1] || S[1]==S[2] || S[2]==S[3]){
        cout << "Bad" << endl;
    }
    else{
        cout << "Good" << endl;
    }
}

Measured memory_bytes: 256
#pragma GCC optimize("Ofast")

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pdd;

#define X first
#define Y second

//#include <boost/unordered_map.hpp>
//using namespace boost;

/*
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> rbtree;
rbtree T;
*/

namespace io{
	const int L = (1 << 20) + 1;
	
	char buf[L], *S , *T, c;
	 
	char getchar() {
		if(__builtin_expect(S == T, 0)) {
			T = (S = buf) + fread(buf, 1, L, stdin);
			return (S == T ? EOF : *S++);
		}
		return *S++;
	}
	
	int inp() {
		int x = 0, f = 1; char ch;
		for(ch = getchar(); !isdigit(ch); ch = getchar())
			if(ch == '-') f = -1;
		for(; isdigit(ch); x = x * 10 + ch - '0', ch = getchar());
		return x * f;
	}
	
	unsigned inpu()
	{
		unsigned x = 0; char ch;
		for(ch = getchar(); !isdigit(ch); ch = getchar());
		for(; isdigit(ch); x = x * 10 + ch - '0', ch = getchar());
		return x;
	}
	
	ll inp_ll() {
		ll x = 0; int f = 1; char ch;
		for(ch = getchar(); !isdigit(ch); ch = getchar())
			if(ch == '-') f = -1;
		for(; isdigit(ch); x = x * 10 + ch - '0', ch = getchar());
		return x * f;
	}
	
	char B[25], *outs=B+20, *outr=B+20;
	template<class T>
	inline void print(register T a,register char x=0){
		if(x) *--outs = x, x = 0;
		
		if(!a)*--outs = '0';
		else 
			while(a)
				*--outs = (a % 10) + 48, a /= 10;
		
		if(x)
			*--outs = x;
		
		fwrite(outs, outr - outs , 1, stdout);
		outs = outr;
	}
};

using io :: print;
using io :: inp;
using io :: inpu;
using io :: inp_ll;

using i32 = int;
using i64 = long long;
using u8 = unsigned char;
using u32 = unsigned;
using u64 = unsigned long long;
using f64 = double;
using f80 = long double;

ll power(ll a, ll b, ll p)
{
	if (!b) return 1;
	ll t = power(a, b/2, p);
	t = t*t%p;
	if (b&1) t = t*a%p;
	return t;
}

const int MAXN = 200010;
const u64 MOD = 1000000007;
const f80 MI = f80(1)/MOD;
const int INF = 1000000010;

int n;
vector<int> a[MAXN];

int main()
{
	
	cin >> n;
	int s = 0;
	for (int k = 1; k <= 1000; ++ k)
	{
		s += k;
		if (s == n)
		{
			int t = 0;
			for (int i = 1; i <= k+1; ++ i)
				for (int j = i+1; j <= k+1; ++ j)
				{
					t ++;
					a[i].push_back(t);
					a[j].push_back(t);
				}
			puts("Yes");
			printf("%d\n", k+1);
			for (int i = 1; i <= k+1; ++ i)
			{
				printf("%d", a[i].size());
				for (auto x : a[i])
					printf(" %d", x);
				puts("");
			}
			return 0;
		}
	}
	puts("No");
	
	return 0;
}


Measured memory_bytes: 7040
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const double eps = 1e-6;

bool ok(double m, int k, vector<int> &a) {
	int n = a.size();
	for (int i = 0; i < n; i++) {
		double cuts = (double)a[i] / m;
		if (cuts > 1)
			k -= (int)cuts;
	}
	if (k < 0)
		return 0;
	return 1;
}

void solve() {
	int n, k;
	cin >> n >> k;
	vector<int> a(n);
	for (int i = 0; i < n; i++)
		cin >> a[i];
	double l = 0, r = 1e9;
	double m;
	while (abs(l - r) > eps) {
		m = (l + r) / 2;
		bool res = ok(m, k, a);
		if (res)
			r = m;
		else
			l = m;
	}
	cout << (int)ceil(l);
}

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
#if defined(_DEBUG)
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int q = 1;
	//cin >> q;
	for (; q > 0; q--) {
		solve();
		cout << endl;
	}
}

Measured memory_bytes: 3920
#include<iostream>
#include<stdio.h>
#include<cstring>
#include<vector>
#include<set>
#include<map>
#include<algorithm>
#include<cmath>
#define ll long long 
#define d double
using namespace std;

int main()
{
	
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
    int a[3];
    int i;
    for(i=0;i<3;i++){
    	cin>>a[i];
	}
	int count=0;
	for(i=0;i<3;i++){
	  int j;
	  for(j=i+1;j<3;j++){
	  	if(a[i]==a[j]){
	  		count++;
		  }	
	  }	
	}
	
	if(count==1){
		cout<<"Yes"<<endl;
	}
	
	else{
		cout<<"No"<<endl;
		
	}
    return 0;   
}

Measured memory_bytes: 3636
#include<bits/stdc++.h>
#define int long long
#define REP(i,n) for(int i=0;i<(n);i++)
#define ALL(v) (v).begin(),(v).end()
using namespace std;
typedef vector<int>   vint;
typedef pair<int,int> pint;

signed main()
{
        string s; cin>>s;
        map<char,int> cnt;
        REP(i,s.size()){
                cnt[s[i]]++;
        }
        for(auto p:cnt){
                if(p.second%2==1){
                        cout<<"No"<<endl;
                        return 0;
                }
        }
        cout<<"Yes"<<endl;
}


Measured memory_bytes: 256
#include <iostream>
#include <string>
using namespace std;
int main(void){
    int s;
    std::cin>>s;
    int a=s/100,b=s%100;
    string ans="aaaa";
    if(0<a && a<13){
        if(0<b && b<13){
            ans="AMBIGUOUS";
        }
        else{
            ans="MMYY";
        }
    }
    else{
         if(0<b && b<13){
            ans="YYMM";
        }
        else{
            ans="NA";
        }
    }
    std::cout<<ans<<"\n";
    return 0;
}


Measured memory_bytes: 256
// Problem : D - Knapsack 1
// Contest : AtCoder - Educational DP Contest
// URL : https://atcoder.jp/contests/dp/tasks/dp_d
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#include<bits/stdc++.h>
using namespace std;

#define int long long
#define endl "\n"
#define ff first
#define ss second
#define pb push_back
#define pii pair<int,int>
#define vi vector<int>
#define mod 1000000007
#define inf 1e18
#define setbits(x) __builtin_popcount(x)
#define zrbits(x) __builtin_ctzll(x)
#define ps(x,y) fixed<<setprecision(y)<<x
#define fi(i,n) for(int i = 0;i < n;i++)
#define fd(i,n) for(int i = n;i >= 0;i--)
int dif(int a,int b){if(a > b)return a - b;else return b - a;}
int gcd(int a, int b){if(b == 0)return a;return gcd(b, a%b);}

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL),cout.tie(NULL);
//    freopen("input.txt","r",stdin);
//    freopen("output.txt","w",stdout);
    int n,c;
    cin>>n>>c;
    int val[n],w[n];
    for(int i = 0;i < n;i++)
    {
    	cin>>w[i]>>val[i];
    }
    int arr[n + 1][c + 1];
    for(int i = 0;i <= n;i++)
    arr[i][0] = 0;
    for(int i = 0;i <= c;i++)
    arr[0][i] = 0;
    for(int i = 1;i <= n;i++)
    {
    	for(int j = 1;j <= c;j++)
    	{
    		if(w[i - 1] <= j)
    		arr[i][j] = max(arr[i - 1][j - w[i - 1]] + val[i - 1],arr[i - 1][j]);
    		else arr[i][j] = arr[i - 1][j]; 
    	}
    }
    cout<<arr[n][c];
	return 0;
}


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

typedef long long ll;
const int MOD = 1e9 + 7;
const int INF = 1e9;

int main() {
  int n;
  cin >> n;
  vector<int> b(n - 1);
  for (int i = 0; i < n - 1; i++) {
    cin >> b[i];
  }
  vector<int> a(n);
  a[0] = b[0];
  for (int i = 1; i < n - 1; i++) {
    a[i] = min(b[i - 1], b[i]);
  }
  a[n - 1] = b[n - 2];

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


Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <stack>
#include <deque>
#include <cmath>
#include <map>
using ll = long long;
using namespace std;

int main() {
  int n;
  cin >> n;
  string ans="";
  while(n != 0) {
    int r = n % 2;
    if (r < 0) r += 2;

    n = (n - r) / (-2);
    ans = (char)('0' + r) + ans;
  }
  if (ans == "") ans = "0";
  cout << ans << endl;
}


Measured memory_bytes: 256
i = int(input())
x = "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51".split(", ")
print(x[i-1])

Measured memory_bytes: 2940
char*r,*g,R[99],G[99],m;main(c){for(;scanf("%s%s\n",R,G),*R-45;putchar(m),puts(g))for(r=R,g=G,m=*g++;c=getchar(),c-10;m=*r++)for(;c!=m;m=*g++)putchar(m);exit(0);}

Measured memory_bytes: 0
using System;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
using System.Runtime.CompilerServices;
using static MyUtil;

class MyUtil
{
    public static int[] ReadIntArray()
    {
        return ReadLine().Split().Select(x => int.Parse(x)).ToArray();
    }
}

class Program
{
    public static void Main()
    {
        int n = int.Parse(ReadLine());
        int[] a = ReadIntArray();

        int c_all = 1, c_odd = 1;

        for (int i = 0; i < n; i++)
        {
            c_all *= 3;

            if ((a[i]&1)==1) // Even
            {
                c_odd *= 1;
            }
            else
            {
                c_odd *= 2;
            }
        }

        int ans = c_all - c_odd ; // Complement
        WriteLine(ans);
    }
}



Measured memory_bytes: 13268
package main

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

var (
	scanner *bufio.Scanner
	buffer  *bufio.Writer
	writer  io.Writer
)

func main() {
	defer flush()
	initWordScanner()
	initBufWriter()

	n := readInt()
	k := readInt()
	var a []int
	for i := 0; i < n; i++ {
		a = append(a, readInt())
	}

	for i := 0; i < n-k; i++ {
		if a[i] < a[i+k] {
			println("Yes")
		} else {
			println("No")
		}
	}
}

func initLineScanner() {
	scanner = bufio.NewScanner(os.Stdin)
	buf := make([]byte, 1e4)
	scanner.Buffer(buf, bufio.MaxScanTokenSize)
}

func initWordScanner() {
	initLineScanner()
	scanner.Split(bufio.ScanWords)
}

func readLine() string {
	if scanner.Scan() {
		return scanner.Text()
	}
	return ""
}

func readInt() int {
	scanner.Scan()
	n, err := strconv.Atoi(scanner.Text())
	if err != nil {
		panic(err)
	}
	return n
}

func readFloat() float64 {
	scanner.Scan()
	n, err := strconv.ParseFloat(scanner.Text(), 64)
	if err != nil {
		panic(err)
	}
	return n
}

func readRunes() []rune {
	scanner.Scan()
	var ns []rune
	for _, v := range scanner.Text() {
		ns = append(ns, v)
	}
	return ns
}

func readString() string {
	if scanner.Scan() {
		return scanner.Text()
	}
	return ""
}

func readStrings() []string {
	scanner.Scan()
	var ss []string
	for _, v := range scanner.Text() {
		ss = append(ss, string(v))
	}
	return ss
}

func initWriter() {
	buffer = nil
	writer = os.Stdout
}

func initBufWriter() {
	buffer = bufio.NewWriter(os.Stdout)
	writer = buffer
}

func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(writer, f, args...)
}

func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(writer, args...)
}

func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

func flush() {
	if writer != nil {
		buffer.Flush()
	}
}

func string2int(s string) int {
	n, e := strconv.Atoi(s)
	if e != nil {
		panic(e)
	}
	return n
}

func int2string(n int) string {
	s := strconv.Itoa(n)
	return s
}

func string2float(s string) float64 {
	n, e := strconv.ParseFloat(s, 64)
	if e != nil {
		panic(e)
	}
	return n
}

func sum(ns []int) int {
	s := 0
	for _, n := range ns {
		s += n
	}
	return s
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}

func abs(n int) int {
	if n < 0 {
		return -n
	}
	return n
}

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

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


Measured memory_bytes: 9504
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <math.h>
#include <stack>
#include <queue>
#include <functional>
#include <limits.h>
using namespace std;

#define ll long long
#define ull unsigned long long
#define rep(i,N) for (int i=0;i<N;i++)

//変数
int A,B,K;
vector<int> vec;

//解法
void solve() {

	if (B - A + 1 <= K * 2) {
		rep(i, B - A+1) {
			cout << A + i << endl;
		}
		return;
	}


	rep(i, K) {
		cout << A+i << endl;
	}
	rep(i, K) {
		cout << B -K+ i + 1 << endl;
	}

	return;
}

int main() {
	//入力
	cin >> A >> B >> K;
	solve();
	cout << endl;
	return 0;
}


Measured memory_bytes: 256
'use strict';
const main = arg => {
  const input = arg.trim().split(' ');
  const A = parseInt(input[0], 10);
  const B = parseInt(input[1], 10); // 攻撃力
  const C = parseInt(input[2], 10);
  const D = parseInt(input[3], 10); // 攻撃力
  // 高橋の攻撃回数
  const timesTakahashi = Math.ceil(C / B);
  // 青木の攻撃回数
  const timesAoki = Math.ceil(A / D);

  // 青木が下回ったら青木のかち、同じなら高橋が先行でかち
  if (timesTakahashi > timesAoki ) {
    console.log('No');
  } else {
    console.log('Yes');
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));

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

#define ff              first
#define fo(i,n)         for(i=0;i<n;i++)
#define Fo(i,k,n)       for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define deb(x)          cout << #x << "=" << x << endl
#define deb2(x, y)      cout << #x << "=" << x << "," << #y << "=" << y << endl
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define w(x)            int x; cin>>x; while(x--)
#define FIO             ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;

const int N = 3e5, M = N;
//=======================

// vi g[N];

void solve() {
	int i, j, n, m;
	int d, t, s;
	cin >> d >> t >> s;
	if (t * s >= d) cout << "Yes\n";
	else cout << "No\n";

}

int32_t main()
{
	FIO;
#ifndef ONLINE_JUDGE
	freopen("input1.txt", "r", stdin);
	freopen("output1.txt", "w", stdout);
#endif
	solve();
	return 0;
}


Measured memory_bytes: 3656
using System;
using System.Linq;
using System.Collections.Generic;

namespace ConsoleApp2
{
    public class Program
    {
        public static void Main(string[] args)
        {
            int N = int.Parse(Console.ReadLine());
            int[] height = Read(Console.ReadLine());
            int ans = 1;
            int max = height[0];
            for (int i = 1; i < N; i++)
            {
                if (max <= height[i])
                {
                    ans++;
                    max = height[i];
                }
            }
            Console.WriteLine(ans);
        }


        private static int[] Read(string input)
        {
            string[] inputs = input.Split(' ');
            int num = inputs.Length;
            int[] ints = new int[num];
            for (int i = 0; i < num; i++)
            {
                ints[i] = int.Parse(inputs[i]);
            }
            
            return ints;
        }


    }
}


Measured memory_bytes: 13140
n, k = map(int,input().split())
a, b = 0, 0
for i in range(1,n+1):
  if i % k == 0:
    a += 1
for i in range(1, n+1):
  if i % k == k // 2:
    b += 1
if k % 2 == 0:
  print(a**3 + b**3)
else:
  print(a**3)
    
  

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

const int N=101;

int h,w,n,a[N*N],col[N][N],c[N*N],tot;

int main()
{
	cin>>h>>w;
	cin>>n;
	for(int i=1;i<=n;i++)
		cin>>a[i];
	for(int i=1;i<=n;i++)
		for(int j=1;j<=a[i];j++)
			c[++tot]=i;
	int cur=0,nowx=w,nowy=0,fi=w;
	while(cur<=tot)
	{
		cur++;
		if(fi==w)
		{
			fi=0;
			nowy++;
			if(nowy&1)
				nowx=1;
			else
				nowx=w;
		}
		else
		{
			if(nowy&1)
				nowx++;
			else
				nowx--;
		}
		fi++;
		col[nowy][nowx]=c[cur];
	}
	for(int i=1;i<=h;i++)
	{
		for(int j=1;j<=w;j++)
			cout<<col[i][j]<<" ";
		cout<<endl;
	}
}

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

int main() {
  int n;
  cin >> n;
  vector<pair<pair<string,int>,int>> a(n);
  rep(i,n){
    string s;
    int p;
    cin >> s >> p;
    a.at(i) = make_pair(make_pair(s,-p),i+1);
  }
  sort(a.begin(),a.end());
  rep(i,n) cout << a.at(i).second << endl;
  
}


Measured memory_bytes: 3624
import sys
sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
from collections import defaultdict
def resolve():
    N = ir()
    S = defaultdict(int)
    for i in range(N):
        S[sr()] += 1
    max_value = max(S.values())
    max_k_list = sorted([kv[0] for kv in S.items() if kv[1] == max_value])
    for l in max_k_list:
        print(l)
resolve()

Measured memory_bytes: 33364
public class Main {
	
	public void run(java.io.InputStream in, java.io.PrintStream out) {
		final java.util.Scanner sc = new java.util.Scanner(in);
		String s, p;
		
		s = sc.next();
		p = sc.next();
		
		if ((s + s).contains(p)) {
			out.println("Yes");
		} else {
			out.println("No");
		}
	}

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

}

Measured memory_bytes: 26064
#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>
#include <vector>
#include <queue>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
#define rep(i, n) for(ll i = 0; i < n; i++)
#define exrep(i, a, b) for(ll i = a; i <= b; i++)
#define out(x) cout << x << endl
#define exout(x) printf("%.10f\n", x)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define pb push_back
#define re0 return 0
const ll mod = 1000000007;
const ll INF = 1e16;

const ll N = 81;

bool dp[N][N][2*N*N];

int main() {
    ll h, w;
    cin >> h >> w;

    vvl a(h, vl(w)), b(h, vl(w));
    rep(i, h) {
        rep(j, w) {
            cin >> a[i][j];
        }
    }
    rep(i, h) {
        rep(j, w) {
            cin >> b[i][j];
        }
    }
    
    dp[0][0][abs(a[0][0] - b[0][0])] = true;
    rep(i, h) {
        rep(j, w) {
            rep(k, 2*N*N) {
                if(!dp[i][j][k]) {
                    continue;
                }
                if(i < h-1) {
                    ll x = abs(a[i+1][j] - b[i+1][j]);
                    dp[i+1][j][abs(k + x)] = true;
                    dp[i+1][j][abs(k - x)] = true;
                }
                if(j < w-1) {
                    ll x = abs(a[i][j+1] - b[i][j+1]);
                    dp[i][j+1][abs(k + x)] = true;
                    dp[i][j+1][abs(k - x)] = true;
                }
            }
        }
    }

    ll ans = INF;
    rep(k, 2*N*N) {
        if(dp[h-1][w-1][k]) {
            chmin(ans, k);
        }
    }

    out(ans);
    re0;
}

Measured memory_bytes: 83456
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
  int n,m,a[1000],b[1000],vote[1000];
  scanf("%d %d",&n,&m);
  for(int i=0;i<n;i++) scanf("%d",a+i);
  for(int i=0;i<n;i++) vote[i] = 0;
  for(int i=0;i<m;i++) scanf("%d",b+i);
  for(int i=0;i<m;i++){
    for(int j=0;j<n;j++){
      if(b[i]>=a[j]){
        vote[j]++;
        break;
      }
    }
  }
  int ans = -1;
  for(int i=0;i<n;i++){
    if(ans==-1||vote[ans]<vote[i]) ans = i;
  }
  printf("%d\n",ans+1);
  return 0;
}

Measured memory_bytes: 2736
module Main (main) where

import qualified Data.Map.Strict as M
import Data.Char
import Text.Printf

main :: IO ()
main = interact $ unlines . f . g l . filter (`elem` k) . map toLower

k :: String
k = map (\a -> chr a) [97..122]

l :: M.Map Char Int
l = M.fromList $ map (\a -> (a, 0)) k

g :: M.Map Char Int -> String -> M.Map Char Int
g m (x:xs) = g (M.insertWith (+) x 1 m) xs
g m [] = m

f :: M.Map Char Int -> [String]
f = M.foldrWithKey' (\k a b -> printf "%c : %d" k a : b) []

Measured memory_bytes: 4196
#include<iostream>
#include<algorithm>

using namespace std;

int main(){
	int N,T;
	int ci[1000],ti[1000];
	cin >> N >> T;
	for(int i=0;i<N;++i){ 
		cin >> ci[i] >> ti[i]; 
	}
	int ans=2000;
	for(int i=0;i<N;++i){
	    if(ans>ci[i]&&ti[i]<=T)
			ans=ci[i];
	}
	if(ans==2000) cout << "TLE" <<endl;
	else cout << ans <<endl;
	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <cstdio>
#include <algorithm>
#include <functional>
#include <string>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define rep(i, N) for(int i = 0; i < N; i++)

int A, B, C;

int main() {
    cin >> A >> B >> C;
    int ans = 0;
    ans += B;
    ans += (C > A + B)? A + B + 1 : C;
    cout << ans << endl;
}

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

long long g1(long long n, long long p) {
    if (n == 0) return 0;
    return n / p + g1(n / p, p);
}

long long g2(long long n, long long p) {
    if (n % 2 == 1) {
        return 0;
    }
    if (p == 2) {
        return g1(n / 2, p) + n / 2;
    } else {
        return g1(n / 2, p);
    }
}
void solve(long long N) { cout << min(g2(N, 2), g2(N, 5)) << endl; }

// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can
// remove this line by using your custom template)
int main() {
    long long N;
    scanf("%lld", &N);
    solve(N);
    return 0;
}


Measured memory_bytes: 256
//Zory-2019
#include<bits/stdc++.h>
using namespace std;
namespace mine
{
    typedef long long ll;
    #define pr pair<int,int>
    #define FR first
    #define SE second
    #define MP make_pair
    #define PB push_back
    #define vc vector
    #define all(x) (x).begin(),(x).end()
    #define sz(x) ((int)(x).size())
    #define bin(x) (1ll<<(x))
    #define GG(x) if(x) {puts("error");exit(666);}
    #define fo(i,l,r) for(int i=(l),I=(r);i<=I;i++)
    #define fd(i,r,l) for(int i=(r),I=(l);i>=I;i--)
    ll qread()
    {
        ll ans=0,f=1;char c=getchar();
        while(c<'0' or c>'9') {if(c=='-')f=-1;c=getchar();}
        while('0'<=c and c<='9') ans=ans*10+c-'0',c=getchar();
        return ans*f;
    }
    void write(ll num)
    {
        if(num<0) putchar('-'),num=-num;
        if(num>=10) write(num/10);
        putchar('0'+num%10);
    }
    void write1(ll num){write(num);putchar(' ');}
    void write2(ll num){write(num);putchar('\n');}
    template<typename T> void chmax(T &x,const T y) {x=(x>y?x:y);}
    template<typename T> void chmin(T &x,const T y) {x=(x<y?x:y);}
    ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}

    const int INF=0x3f3f3f3f;
    const int MOD=998244353;
    int mm(const int x){return x>=MOD?x-MOD:x;}
    template<typename T> void add(T &x,const int &y){x=(x+y>=MOD?x+y-MOD:x+y);}
    ll qpower(ll x,ll e,int mod=MOD){ll ans=1;GG(e<0)while(e){if(e&1)ans=ans*x%mod;x=x*x%mod;e>>=1;}return ans;}
    ll invm(ll x){return qpower(x,MOD-2);}
    const int N=1e5+10;

    pair<int,int> a[N];
	void main()
	{
	    int n=qread();fo(i,1,n) {int x=qread(),y=qread();a[i]={x-y,x+y};}
	    sort(a+1,a+n+1);int rmx=-INF,cnt=0;
	    fo(i,1,n) if(rmx<=a[i].FR) rmx=a[i].SE,cnt++; else chmin(rmx,a[i].SE);write(cnt);
	}
};//(ans+MOD)%MOD
signed main()
{
//	freopen("z.txt","r",stdin);
    srand(time(0));
    mine::main();
}


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

public class Main {

	private class HashSet {

		private int M = 1046527;
		private String[] H = new String[M];
		
		private int getChar(char ch) {
			if (ch=='A') return 1;
			else if (ch=='C') return 2;
			else if (ch=='G') return 3;
			else if (ch=='T') return 4;
			else return 0;
		}
		
		private int getKey(String str) {
			int sum = 0, p = 1;
			for (int i = 0; i < str.length(); i++) {
				sum += p*(getChar(str.charAt(i)));
				p *= 4;
			}
			return sum;
		}

		private int h1(int key) {return key % M;}
		private int h2(int key) {return 1 + (key % (M-1));}

		public boolean find(String str) {
			int key, i, h;
			key = getKey(str);
			for (i = 0 ;; i++) {
				h = (h1(key) + i * h2(key)) % M;
				if (H[h] != null && H[h].equals(str)) return true;
				else if (H[h] == null || H[h].length() == 0) return false;
			}
		}
		
		public void insert(String str) {
			int key, i, h;
			key = getKey(str);
			for (i = 0 ;; i++) {
				h = (h1(key) + i * h2(key)) % M;
				if (H[h] != null && H[h].equals(str)) return;
				else if (H[h] == null || H[h].length() == 0) {
					H[h] = new String(str);
					return;
				}
			}
		}
	}
	
	public static void main(String[] args) throws IOException {
		new Main().run();
	}
	
	private void run() throws IOException {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		HashSet set = new HashSet();
		int n = Integer.parseInt(reader.readLine());
		for (int i = 0; i < n; i++) {
			StringTokenizer st = new StringTokenizer(reader.readLine());
			String cmd = st.nextToken();
			String str = st.nextToken();
			if (cmd.equals("insert")) {
				set.insert(str);
			} else if (cmd.equals("find")) {
				if (set.find(str)) {
					System.out.println("yes");
				} else {
					System.out.println("no");
				}
			}
		}
		reader.close();
	}
}


Measured memory_bytes: 125104
using System;


class Program
{
    static void Main()
    {
        for (int i = 1; i <= 9; i++)
        {
            for (int j = 1; j <= 9; j++)
            {
                Console.WriteLine(String.Format("{0}x{1}={2}", i, j, i * j));
            }
        }
    }
}

Measured memory_bytes: 9040
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
template<class T>inline bool chmax(T &a, const T &b){if(a < b){a = b; return 1;}return 0;}
template<class T>inline bool chmin(T &a, const T &b){if(a > b){a = b; return 1;}return 0;}
typedef long long ll;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N, D; cin >> N >> D;
  int a = 2*D+1;
  cout << (N+a-1)/a << endl;
}

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

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  string S;
  cin >> S;
  reverse(S.begin(), S.end());
  S.push_back('0');
  int res = 0;
  for (int i = 0; i < (int)S.size(); i++) {
    if (S[i] > '5' || (S[i] == '5' && S[i + 1] >= '5')) {
      res += 10 - (S[i] - '0');
      int p = i + 1;
      while (S[p] == '9') {
        S[p++] = '0';
      }
      S[p]++;
    } else {
      res += S[i] - '0';
    }
  }
  cout << res << '\n';
  return 0;
}


Measured memory_bytes: 1948
#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main()
{
    double n;
    char bin[12]={'0','0','0','0','0','0','0','0','0','0','0','0'};
    double dbin[12]={128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.5, 0.25, 0.125, 0.0625};
    cin>>n;
    while (n>0.0){
        for(int i=0;i<12;i++){
            if(n>=dbin[i]){
                n-=dbin[i];
                bin[i]='1';
            }else{
                bin[i]='0';
            }
        }
        if(n==0.0){
            cout<<bin[0]<<bin[1]<<bin[2]<<bin[3]<<bin[4]<<bin[5]<<bin[6]<<bin[7];
            cout<<'.'<<bin[8]<<bin[9]<<bin[10]<<bin[11]<<endl;
        }else{
            cout<<"NA"<<endl;
        }
        cin>>n;
    }
}

Measured memory_bytes: 1216
#include <iostream>
#include <algorithm>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <queue>
#include <cmath>
#include <bitset>
#include <complex>
#include <functional>

// output
#define SPBR(w, n) std::cout<<(w + 1 == n ? '\n' : ' ');
#define YES cout << "YES" << endl
#define Yes cout << "Yes" << endl
#define NO cout << "NO" << endl
#define No cout << "No" << endl
// utility
#define ALL(i) (i).begin(), (i).end()
#define FOR(i, a, n) for(int i=(a);i<(n);++i)
#define RFOR(i, a, n) for(int i=(n)-1;i>=(a);--i)
#define REP(i, n) for(int i=0;i<int(n);++i)
#define RREP(i, n) for(int i=int(n)-1;i>=0;--i)
#define IN(a, x, b) (a<=x && x<b)
#define OUT(a, x, b) (x<a || b<=x)
template<class T> inline T chmax(T & a, const T b) { return a = (a < b) ? b : a; }
template<class T> inline T chmin(T& a, const T b) { return a = (a > b) ? b : a; }

// type/const
#define int ll
using ll = long long;
using ull = unsigned long long;
using ld = long double;
const int MOD = 1000000007;
/* const int MOD = 998244353; */
const int INF = 1e18;
const double PI = acos(-1);

using namespace std;


signed main() {
  int N; 
  cin >> N;

  vector<int> A(N);
  REP(i, N) cin >> A[i];

  vector<int> cnt(3, 0);
  REP(i, N){
    if(A[i]%4 == 0) cnt[0]++;
    else if(A[i]%2 == 0) cnt[1]++;
    else cnt[2]++;
  }
  
  bool ans = false;
  if(cnt[1] > 0){
    if(cnt[0] >= cnt[2]) ans = true;
  }else{
    if(cnt[0]+1 >= cnt[2]) ans = true;
  }

  ans? Yes: No;

  return 0;
}

Measured memory_bytes: 1024
#include <cstdio>
#include <iomanip>    // setw 控制输出间隔函数
#include <iostream>   // cin, cout, abs
#include <algorithm>  // max, min, swap, sort
#include <cmath>      // pow
#include <cstring>    // strlen, memset
#include <set>        // set 集合
#include <stack>      // stack 栈
#include <queue>      // queue 队列
#include <string>     // string 字(yang)符(rou)串, substr
#include <map>
#include <fstream>
using namespace std;
int main()
{
    int n;
    scanf("%d", &n);
    int t = 1;
    while(1)
    {
        t *= 2;
        if( t > n) break;
    }
    t /= 2;
    printf("%d\n", t);
    return 0;
}


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

constexpr int inf = 0x3f3f3f3f;
constexpr ll linf = 0x3f3f3f3f3f3f3f3fLL;

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

    int r, g, b, n; cin >> r >> g >> b >> n;
    int ans = 0;
    for (int i = 0; i <= n; i++) {
        for (int j = 0; j <= n; j++) {
            int k = n - r * i - g * j;
            if (k >= 0 && k % b == 0) ans++;
        }
    }
    cout << ans << endl;
    return 0;
}

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

int main(){
  long int a,b,d;
  double f;
  std::cin >> a >> b;
  d = a / b; f = (double)a / b;
  cout << d << ' ' << a % b << ' ';
  cout << fixed << f << '\n';
  return 0;
}


Measured memory_bytes: 3268
#include<bits/stdc++.h>
#include<algorithm>
#include<math.h>
#include<iostream>
using namespace std;
long long int lcm(long long int a,long long int b){
  long long int n;
  n=a*b/__gcd(a,b);
  return n;
}
using ll =long long int;
#define ci(a) cin>>a
#define co(a) cout<<a<<endl
#define gcd(a,b) __gcd(a,b)
#define vec vector<ll>
#define For(i,a,b) for(ll i=a;i<b;i++)
#define rFor(i,a,b) for(ll i=a;i>b;i--)
#define wFor(i,a,b) for(ll i=a;i<b;i+=2)
#define wrFor(i,a,b) for(ll i=a;i>b;i-=2)
#define sort(a,b) sort(a.begin(),b.end())
#define reverse(a,b) reverse(a.begin(),b.end())
//gcd 最大公約数
//lcm 最小公倍数
//double 少数（変数）
//string 文字列（変数）
//sqrt 平方根
//ceil 天井関数
//floor 床関数
//abs 絶対値
//pow 累乗
//cbrt  立方根
//hypot 平方和の平方根
//(string-'0') 文字列を数字に変換
//(char-'0') 数字に変換
//vector<vector<int>> data(a,vector<int>(b)) a×b行列
//for(int i=0;i<a;i++)
//for(int j=0;j<b;j++)
//cin>>data.at(i).at(j)  a×b行列の入力
//floor(log10(a)+1) aの10進法での桁数
//ceil(log10(a)) aの10進法での桁数

int main() {
  ll a;
  ci(a);
  co((a-1)/2);
}

Measured memory_bytes: 256
#include <cstdio>
#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>
#include <cmath>
#include <iomanip>
#include <deque>
#include <queue>
#include <unordered_map>
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)

using namespace std;
ll intpow(ll N, ll P){
    if(P==0) return 1;
    if(P%2==0){
        ll t = intpow(N, P/2);
        return t*t;
    }
    return N * intpow(N, P-1);
}
ll modpow(ll N, ll P,ll k){
    if(P==0) return 1;
    if(P%2==0){
        ll t = modpow(N, P/2,k)%k;
        return t*t%k;
    }
    return N * modpow(N, P-1,k)%k;
}
ll modkai(ll n,ll m,ll k){//n*(n-1)*(n-2)*...(m+1)%k
    if(n == m)return 1;
    return modkai(n-1,m,k)*n%k;
}
ll mod_cnb(ll n,ll m,ll k){//nCm%k,kは十分大きい素数
  int m_=modkai(m,0,k);
  return modkai(n,n-m,k)*modpow(m_,k-2,k)%k;
}
ll gcd(ll n,ll m){
    ll n_ = max(n,m);
    ll m_ = min(n,m);
    if(n_%m_ == 0)return m_;
    return gcd(m_,n_%m_);
}
ll lcm(ll n,ll m){
    return n*m/gcd(n,m);
}
int main(){
    int n;cin>>n;
    bool flag=0;
    rep(i,3){
        if(n%10==7)flag=1;
        n/=10;
    }
    if(flag){
        cout<<"Yes"<<endl;
    }
    else cout<<"No"<<endl;
}


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

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;
}
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define INF 999999999

    /*Solve*/

int d;
string str = "Eve";

int main(){
    cin >> d;
    rep(i,25-d+1){
        if(i==0){cout << "Christmas";
        }else{cout << " " << "Eve";}
    }
    return 0;
}

Measured memory_bytes: 256
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

N = inp()
if N%2 == 0: print(0.5)
else: print((N//2+1)/N)


Measured memory_bytes: 4084
#include<iostream>
#include<vector>
using namespace std;
const int INF = 1e9+5;
int main(){
  int n;
  scanf("%d", &n);
  int stones[n];
  
  for(int i=0;i<n;i++)
    scanf("%d", &stones[i]);

  vector<int>dp(n,INF);
  dp[0]=0;
  for(int i = 0; i<n; i++){
    for(int j: {i+1,i+2}){
        if(j<n)
    	    dp[j] = min(dp[j], dp[i]+abs(stones[j]-stones[i]));  	
    }
  }
  printf("%d\n", dp[n-1]);
//  return 0; 
}

Measured memory_bytes: 1024
#include <bits/stdc++.h>
//---------------------------
using namespace std;
//---------------------------
#define REP(i,n) for(int i = 0; i < (n); i++)
#define P(x) cout << (x) << "\n"

#define MOD 1e9+7
#define PI acos(-1.0)
#define ll long long
#define INF 1000000001

int dx[4]={1,-1,0,0};
int dy[4]={0,0,1,-1};
//---------------------------

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

  // ifstream in("input.txt");
  // cin.rdbuf(in.rdbuf());

  int a,b,c;cin>>a>>b>>c;
  if(a==b){
    P(c);
  }else if(b==c){
    P(a);
  }else{
    P(b);
  }
  return 0;
}


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

#define ll long long
#define vvi vector<vector<int>>
#define vec vector
#define pq priority_queue
#define all(v) (v).begin(), (v).end()
#define rep(i, n) for (int (i) = (0); (i) < (n); ++(i))
#define repp(i, m, n) for (int (i) = (m); (i) < (n); ++(i))
#define debug(x) cerr << #x << ": " << x << endl;
#define debug2(x, y) cerr<<"("<<#x<<", "<<#y<<") = "<<"("<<x<<", "<<y<<")"<<endl;
#define debug3(x, y, z) cerr<<"("<<#x<<", "<<#y<<", "<<#z<<") = "<<"("<<x<<", "<<y<<", "<<z<<")"<<endl;
#define debugB(x, y) cerr<<#x<<": "<<bitset<y>(x) << endl;
#define line() cerr << "---------------" << endl;

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

template<typename T>
void printA(vector<T> &printArray, char between = ' ') {
   int paSize = printArray.size();
   for (int i = 0; i < paSize; i++) { cerr << printArray[i] << between;}
   if (between != '\n') {cerr << endl;}
}

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

int main() {
   ll a, b, c;
   cin >> a >> b >> c;
   ll t = a * (b/2) * c;
   ll s = a * ((b+1)/2) * c;
   ll x = abs(t - s);

   t = a * (c/2) * b;
   s = a * ((c+1)/2) * b;
   ll y = abs(t - s);

   t = b * (a/2) * c;
   s = b * ((a+1)/2) * c;
   ll z = abs(t - s);

   cout << min({x, y, z}) << endl;

   return 0;
}

Measured memory_bytes: 256
import java.util.Arrays;
import java.util.Scanner;

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

        int N = sc.nextInt();
        long[] A = new long[N];
        for (int i = 0; i < N; i++) {
            A[i] = sc.nextLong();
        }

        Arrays.sort(A);

        long ans = 0;
        if (N % 2 == 0) {
           for (int i = 0; i < N/2 - 1; i++) {
               ans = ans + A[N/2 + i] + A[N/2 + i + 1] - 2*A[i];
           }
           ans = ans + A[N-1] - A[N/2 -1];
        } else {
            for (int i = 0; i < N/2 - 1; i++) {
                ans = ans + A[N/2 + i + 1] + A[N/2 + i + 2] - 2*A[i];
            }
            ans = ans + A[N-1] - A[N/2 -1];
            ans += Math.max(A[N/2 + 1] - A[N/2], A[N/2] - A[N/2 - 1]);
        }

        System.out.println(ans);
    }
}

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

int main(){
	int num;
	double h, w;
	while( scanf(" %d,%lf,%lf", &num, &w, &h) != EOF )
		if(w/h/h >= 25.0) printf("%d\n", num);
	return 0;
}

Measured memory_bytes: 1212
#include<bits/stdc++.h>
#define mo 1000000007
#define ll long long
using namespace std;
template<typename T> void read(T &x){
	char c=getchar();x=0;int f=1;
	while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
	while(c>='0'&&c<='9'){x=x*10+c-'0';c=getchar();}x*=f;
}
const int N=1e5+7;
ll po(ll x,ll y){
	ll t=1,tt=x;
	while(y){
		if(y&1)t=t*tt%mo;
		tt=tt*tt%mo;y>>=1;
	}return t;
}
int n,x,a[N];
ll f[300][N],g[300],ans;
int main(){
	read(n);read(x);
	for(int i=1;i<=n;i++)read(a[i]);
	sort(a+1,a+n+1);reverse(a+1,a+n+1);
	for(int i=1;i<=n;i++)g[i]=po(n-i+1,mo-2);
	f[0][x]=1;
	for(int i=0;i<n;i++)
		for(int j=x;j>=0;j--)
			if(f[i][j]){
				f[i+1][j%a[i+1]]+=g[i+1]*f[i][j]%mo;
				if(f[i+1][j%a[i+1]]>mo)f[i+1][j%a[i+1]]-=mo;
				f[i+1][j]+=(mo+1-g[i+1])*f[i][j]%mo;
				if(f[i+1][j]>mo)f[i+1][j]-=mo;
			}
	for(int i=0;i<=x;i++){
		ans+=f[n][i]*i%mo;if(ans>mo)ans-=mo;
	}
	for(int i=1;i<=n;i++)ans=ans*i%mo;
	cout<<ans<<"\n";return 0;
}

Measured memory_bytes: 155904