akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define ADD(a, b) a = (a + ll(b)) % mod
#define MUL(a, b) a = (a * ll(b)) % mod
#define MAX(a, b) a = max(a, b)
#define MIN(a, b) a = min(a, b)
#define rep(i, a, b) for(int i = int(a); i < int(b); i++)
#define rer(i, a, b) for(int i = int(a) - 1; i >= int(b); i--)
#define all(a) (a).begin(), (a).end()
#define sz(v) (int)(v).size()
#define pb push_back
#define sec second
#define fst first
#define debug(fmt, ...) Debug(__LINE__, ":", fmt, ##__VA_ARGS__)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef pair<int, pi> ppi;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vl> mat;
typedef complex<double> comp;
void Debug() {cout << '\n'; }
template<class FIRST, class... REST>void Debug(FIRST arg, REST... rest){
	cout<<arg<<" ";Debug(rest...);}
template<class T>ostream& operator<<(ostream& out,const vector<T>& v) {
	out<<"[";if(!v.empty()){rep(i,0,sz(v)-1)out<<v[i]<<", ";out<<v.back();}out<<"]";return out;}
template<class S, class T>ostream& operator<<(ostream& out,const pair<S, T>& v){
	out<<"("<<v.first<<", "<<v.second<<")";return out;}
const int MAX_N = 200010;
const int MAX_V = 100010;
const double eps = 1e-6;
const ll mod = 1000000007;
const int inf = 1 << 29;
const ll linf = 1LL << 60;
const double PI = 3.14159265358979323846;
///////////////////////////////////////////////////////////////////////////////////////////////////

ll N;
ll dp[63][2][2][2]; //i, kuriagari, u is bigger than N, v is bigger than N

int compare(int at, bool now, bool before) {
	int nat = (N & (1LL << at)) ? 1 : 0;
	if(before == false) {
		if(nat == 0 && now == 1) return 1;
		else return 0;
	}
	else {
		if(nat == 1 && now == 0) return 0;
		else return 1;
	}
}

void solve() {
	cin >> N;
	ll D = 0;
	while(N >= (1LL << D)) D++;

	dp[0][0][0][0] = 1;
	rep(i, 0, D) {
		rep(j, 0, 2) {
			rep(k, 0, 2) {
				rep(l, 0, 2) {
					if(!dp[i][j][k][l]) continue;
					if(j == 0) {
						ADD(dp[i + 1][0][compare(i, 0, k)][compare(i, 0, l)], dp[i][j][k][l]);
						ADD(dp[i + 1][0][compare(i, 1, k)][compare(i, 1, l)], dp[i][j][k][l]);
						ADD(dp[i + 1][1][compare(i, 0, k)][compare(i, 0, l)], dp[i][j][k][l]);
					}
					else if(j == 1){
						ADD(dp[i + 1][0][compare(i, 0, k)][compare(i, 1, l)], dp[i][j][k][l]);
						ADD(dp[i + 1][1][compare(i, 1, k)][compare(i, 0, l)], dp[i][j][k][l]);
						ADD(dp[i + 1][1][compare(i, 0, k)][compare(i, 1, l)], dp[i][j][k][l]);
					}
				}
			}
		}
	}
	cout << dp[D][0][0][0] << "\n";
}

int main() {
#ifndef LOCAL
	ios::sync_with_stdio(false);
    cin.tie(0);
#endif
    cout << fixed;
	cout.precision(20);
	srand((unsigned int)time(NULL));
#ifdef LOCAL
	//freopen("in.txt", "wt", stdout); //for tester
    freopen("in.txt", "rt", stdin);
#endif	
	solve();
#ifdef LOCAL
    cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
#endif
	return 0;
}



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

#define PI acos(-1)
#define hell 1000000007
#define HELL 998244353
#define io ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define fix(n) cout << fixed << setprecision(n)
#define mset(a,n) memset(a,n,sizeof a)
#define rep(i,a,b) for (__typeof((b)) i=(a);i<(b);i++)
#define repp(i,a,b,p) for(__typeof((b)) i=(a);i<(b);i+=p)
#define ren(i,a,b) for(__typeof((a)) i=(a);i>=(b);i--)
#define renn(i,a,b,p) for(__typeof((a) i=(a);i>=(b);i-=p)
#define lbd lower_bound
#define ubd upper_bound
#define ll long long
#define ld long double
#define pb push_back
#define fi first
#define se second
#define vll vector<ll>
#define pll pair<ll,ll>
#define vpll vector<pll>
#define all(v) (v).begin(), (v).end()
#define sz(x) (ll)x.size()
#define endl "\n"
#define out(n) cout<<n<<" "
#define outl(n) cout<<n<<endl
#define line cout<<endl
#define bug(n) {outl(n);return;}
#define N 100005
ll n,k,a[105],dp[105][N],b[N];
void solve(){
	cin>>n>>k;
	if(k==0)bug(1);
  	rep(i,0,n)cin>>a[i];
  	dp[0][0]=1;
  	rep(i,0,n){
  	    rep(j,0,k+1)b[j+1]=(b[j]+dp[i][j])%hell;
  	    rep(j,0,k+1)dp[i+1][j]=(dp[i+1][j]+b[j+1]-b[max(0ll,j-a[i])]+hell)%hell;
  	}
  	bug(dp[n][k]);
}
void prep(){

}
int main(){
    io;
    ll t=1;
    // cin>>t;
    prep();
    fix(12);
    while(t--)
        solve();
    return 0;
}

Measured memory_bytes: 79360
#include<bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<vector>
#include<stdio.h>
#include<cstring>
#include<math.h>
#include<map>
#include<bitset>
#include<iomanip>
#include<queue>
#include<functional>
#include<stack>
#include<tuple>
#include<cassert>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using ll = long long;
using P = pair<int, int>;
using MATRIX = vector< vector<ll> >;

int main() {
  int K;
  int A, B;
  cin >> K;
  cin >> A >> B;
  for(int i = A; i <= B; i++) {
    if(i % K == 0) {
      cout << "OK" <<endl;
      return 0;
    }
  }
  cout << "NG" << endl;
  return 0;
}

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

#define rep(i, a, b) for(int i = (a); i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
#define endl '\n'

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;

const ll mod=1000000007;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
// head

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

    ll k, a, b;
    bool ok = false;
    cin >> k >> a >> b;
    for(int i = a; i <= b; i++) {
        if(i % k == 0) {
            ok = true;
        }
    }
    if(ok) {
        cout << "OK" << endl;
    } else {
        cout << "NG" << endl;
    }

    return 0;
}


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

const int MAX_H=51,MAX_W=51;
const int dh[4]={1,0,-1,0};
const int dw[4]={0,1,0,-1};

int w,h,cnt,surrounded,x,y,nh,nw,ansb,answ;
vector<string> a(MAX_H);
vector<vector<int>> visited(MAX_H,vector<int>(MAX_W));
queue<pair<int,int>> que;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    while (cin >> w >> h,w){
        for (int i=0;i<h;++i) cin >> a[i];
        for (int i=0;i<h;++i)
            for (int j=0;j<w;++j)
                visited[i][j]=0;
        ansb=answ=0;
        for (int i=0;i<h;++i){
            for (int j=0;j<w;++j){
                if (a[i][j]!='.') continue;
                if (visited[i][j]) continue;
                cnt=0,surrounded=0;
                visited[i][j]=1;
                que.emplace(i,j);
                while(!que.empty()){
                    ++cnt;
                    auto p=que.front(); que.pop();
                    x=p.first,y=p.second;
                    for (int k=0;k<4;++k){
                        nh=x+dh[k],nw=y+dw[k];
                        if (nh<0||h<=nh||nw<0||w<=nw) continue;
                        if (visited[nh][nw]) continue;
                        if (a[nh][nw]=='B'){surrounded|=1; continue;}
                        if (a[nh][nw]=='W'){surrounded|=2; continue;}
                        visited[nh][nw]=1;
                        que.emplace(nh,nw);
                    }
                }
                if (surrounded==1) ansb+=cnt;
                if (surrounded==2) answ+=cnt;
            }
        }
        cout << ansb << ' ' << answ << '\n';
    }
}


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

int main(){
  int n,m;
  cin>>n>>m;
  vector<P> edge[n];
  rep(i,0,m){
    int a,b,c;
    cin>>a>>b>>c;
    edge[a-1].push_back(P(b-1,c));
    edge[b-1].push_back(P(a-1,c));
  }
  set<P> st;
  rep(i,0,n){
    int d[n];
    rep(j,0,n) d[j]=1e5;
    d[i]=0;
    priority_queue<P,vector<P>,greater<P>> q;
    q.push(P(0,i));
    int prev[n];
    rep(j,0,n) prev[j]=-1;
    while(q.size()){
      P p=q.top();
      q.pop();
      int v=p.second;
      if(d[v]<p.first) continue;
      for(P s:edge[v]){
        if(d[s.first]>d[v]+s.second){
          d[s.first]=d[v]+s.second;
          q.push(P(d[s.first],s.first));
          prev[s.first]=v;
        }
      }
    }
    rep(j,0,n){
      if(j==i) continue;
      int t=j;
      for(;t!=i;t=prev[t]){
        st.insert(P(t,prev[t]));
        st.insert(P(prev[t],t));
      }
    }
  }
  cout<<m-st.size()/2<<endl;
}

Measured memory_bytes: 384
while b = gets.to_i
    break if b == 0
    m = 1
    n = b
    (2..b).each do |k|
        break if (k + 1) * k / 2 > b
        x = b * 2
        next if x % k > 0
        x /= k
        x -= k - 1
        next if x < 2 || x.odd?
        m = k
        n = x / 2
    end
    puts "#{n} #{m}"
end


Measured memory_bytes: 6852
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
#define SortAsc(c) std::sort(c.begin(), c.end())
#define SortDesc(c) std::sort(c.rbegin(), c.rend())
int dx[8] = {0, 1, 0, -1, 1, 1, -1, -1};
int dy[8] = {1, 0, -1, 0, 1, -1, 1, -1};

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

    vector<int> d(n);
    for (int i = 0; i < n; i++)
    {
        cin >> d[i];
    }

    SortAsc(d);

    int c = n / 2;
    int res = d[c] - d[c - 1];

    cout << res << endl;
}

Measured memory_bytes: 3788
N = int(input())
V = list(map(int,input().split()))
C = list(map(int,input().split()))

W = [V[i]-C[i] for i in range(0,N,1)]

ans =0

for i in range(0,N,1):
    if W[i]>0:
        ans += W[i]
print(ans)

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

typedef unsigned long long int ll;

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

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

int comp(const pair<ll,ll>&i,const pair<ll,ll>&j){
    return i.second<j.second;
}

int main(){
   int n;
   cin>>n;
   vector<pair<ll,ll>>v;
   for(int i=0;i<n;i++){
       ll a,b;
       cin>>a>>b;
       v.push_back({a,b});
   }
   ll t=0;
   sort(v.begin(),v.end(),comp);
    int c=1;
   for(int i=0;i<n;i++){
       if(t+v[i].first <= v[i].second){
           t+=v[i].first;
       }else{
           c=0;
           break;
       }
   }
   if(c){
       cout<<"Yes"<<endl;
   }else{
       cout<<"No"<<endl;
   }

}

Measured memory_bytes: 6512
package main

import (
	"fmt"
	"strings"
)

func main() {
	var n int
	var s string

	fmt.Scan(&n, &s)

	r := strings.Count(s, "R")
	g := strings.Count(s, "G")
	b := strings.Count(s, "B")

	var exclude int
	for i := 0; i < n; i++ {
		for j := i + 1; j < n; j++ {
			k := j + j - i
			if k >= len(s) {
				continue
			}
			if s[i] != s[j] && s[i] != s[k] && s[j] != s[k] {
				exclude++
			}
		}
	}

	fmt.Println(r*g*b - exclude)
}


Measured memory_bytes: 1900
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		for(int i=1; i<=n; i++){
			if((int)(i*1.08)==n){
				System.out.println(i);
				return;
			}
		}
		System.out.println(":(");
	}
}


Measured memory_bytes: 21712
package main

import (
	"fmt"
	"strconv"
	"strings"
)

var bomb = "#"

func main() {
	var H, W int
	fmt.Scan(&H)
	fmt.Scan(&W)

	inputs := scanStrings(H)
	res := createMap(inputs, H, W)

	for _, s := range res {
		fmt.Println(strings.Join(s, ""))
	}

}

func createMap(inputs [][]string, H int, W int) (res [][]string) {
	for i := 0; i < H; i++ {
		line := make([]string, 0)
		for j := 0; j < W; j++ {
			if inputs[i][j] == bomb {
				line = append(line, bomb)
				continue
			}
			point := 0
			if i-1 >= 0 {
				if j-1 >= 0 {
					if inputs[i-1][j-1] == bomb {
						point++
					}
				}
				if inputs[i-1][j] == bomb {
					point++
				}
				if j+1 <= W-1 {
					if inputs[i-1][j+1] == bomb {
						point++
					}
				}
			}
			if j-1 >= 0 {
				if inputs[i][j-1] == bomb {
					point++
				}
			}
			if j+1 <= W-1 {
				if inputs[i][j+1] == bomb {
					point++
				}
			}
			if i+1 <= H-1 {
				if j-1 >= 0 {
					if inputs[i+1][j-1] == bomb {
						point++
					}
				}
				if inputs[i+1][j] == bomb {
					point++
				}
				if j+1 <= W-1 {
					if inputs[i+1][j+1] == bomb {
						point++
					}
				}
			}
			line = append(line, strconv.Itoa(point))
		}

		res = append(res, line)
	}
	return
}

func scanStrings(len int) (inputs [][]string) {
	var str string
	for i := 0; i < len; i++ {
		fmt.Scanf("%s", &str)
		line := make([]string, 0)
		for _, s := range str {
			line = append(line, string(s))
		}

		inputs = append(inputs, line)
	}
	return
}


Measured memory_bytes: 896
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <numeric>
#include <queue>
#include <sstream>
#include <string>
#include <tuple>
#include <type_traits>
#include <utility>
#include <vector>

#define REP(i, n) for(int i = 0, i##_MACRO = (n); i < i##_MACRO; i++)
#define RANGE(i, a, b) for(int i = (a), i##_MACRO = (b); i < i##_MACRO; i++)
#define EACH(e, a) for(auto&& e : a)
#define ALL(a) (a).begin(), (a).end()
#define AALL(a, n) (a), ((a) + (n))
#define FILL(a, n) memset((a), n, sizeof(a))
#define FILLZ(a) FILL(a, 0)
#define MODNUM (static_cast<int>(1e9 + 7))
#define MOD(x) ((x) % MODNUM)

using namespace std;

using ll = long long;
using VI = vector<int>;
using VI2D = vector<vector<int>>;

const int INF = 2e9;
const double EPS = 1e-10;
const double PI = acos(-1.0);

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

inline int toInt(string s) {
	int v;
	istringstream sin(s);
	sin >> v;
	return v;
}

// mod_pow ここから
ll mod_pow(ll a, ll n) {
#ifndef MOD
	static_assert(false, "MOD() is not defined.");
#endif

	ll ret = 1;
	while(n != 0) {
		if(n % 2) {
			ret = MOD(ret * a);
		}
		a = MOD(a * a);
		n /= 2;
	}
	return ret;
}
// mod_pow ここまで

int main() {
        int a, b;
        scanf("%d %d", &a, &b);
        printf("%lld\n", mod_pow(a, b));
	return 0;
}


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

using namespace std;

int main(){
	int a, b;

	scanf("%d %d", &a, &b);

	if((a & 1) == (b & 1)){
		printf("%d\n", (a + b) >> 1);
	}else{
		printf("IMPOSSIBLE\n");
	}

	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<numeric>

using namespace std;

#define all(i) i.begin(), i.end()
#define rep(i,n) for(int i=0;i<n;i++)

int main()
{
	int num = 0; cin >> num;
	string dat[12] = { "", ".,!? ", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz" };
	rep(i, num)
	{
		string str; cin >> str;
		vector<int> hit(10, 0);
		rep(j, (int)str.size())
		{
			hit[str[j] - '0'] += 1;
			if (j == 0 || str[j - 1] == '0') {}
			else if (str[j] == '0')
			{
				int tmp = str[j - 1] - '0', n = hit[tmp];
				while (1)
				{
					if (n <= (int)dat[tmp].size()) { break; }
					n -= (int)dat[tmp].size();
				}
				printf("%c", dat[tmp][n - 1]);
				rep(i, 10){ hit[i] = 0; }
			}
		}
		printf("\n");
	}
	return 0;
}

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

	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep2(i, m, n) for(int i=int(m); i<int(n); ++i)
#define drep2(i, m, n) for(int i=int(m-1); i>=int(n); --i)
#define rep(i, n) rep2(i, 0, n)
#define drep(i, n) drep2(i, n, 0)
#define all(a) a.begin(), a.end()
using ll = long long;
using ld = long double;
using V = vector<int>;
using Vll = vector<ll>;
using Vld = vector<ld>;
using Vbo = vector<bool>;
using VV = vector<V>;
using VVll = vector<Vll>;
using VVld = vector<Vld>;
using VVbo = vector<Vbo>;
using P = pair<int, int>;
using Pll = pair<ll, ll>;
using Pld = pair<ld, ld>;
struct fast_ios { fast_ios(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_;
template<typename T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; }
template<typename T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; }
template<typename T1, typename T2> istream &operator>>(istream &is, pair<T1, T2> &p) { is >> p.first >> p.second; return is; }
template<typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &p) { os << "(" << p.first << ", " << p.second << ")"; return os; }
template<typename T> istream &operator>>(istream &is, vector<T> &v) { for (auto &e : v) is >> e; return is; }
template<typename T> ostream &operator<<(ostream &os, const vector<T> &v) { for (auto &e : v) os << e << endl; return os; }
template<typename T> inline int count_between(vector<T> &a, T l, T r) { return lower_bound(all(a), r) - lower_bound(all(a), l); } // [l, r)
inline int Log2(ll x) { int k; for (k = 0; x > 0; ++k) x >>= 1; return k; } // number of binary digits
const int INF  = 1<<30;
const ll INFll = 1ll<<62;
const ld EPS   = 1e-10;
const int MOD  = int(1e9)+7;


int main() {
  ll n; cin >> n;
  
  vector<Pll> a(n);
  rep(i, n) {
    int x; cin >> x;
    a[i] = Pll(x, i);
  }
  sort(all(a));
  drep(i, n-1) chmin(a[i].second, a[i+1].second);

  Vll ans(n);
  ans[0] = a[0].first * n;
  rep2(i, 1, n) ans[a[i].second] += (a[i].first - a[i-1].first) * (n-i);

  cout << ans;
  return 0;
}


Measured memory_bytes: 3456
import numpy as np
import sys
input = sys.stdin.readline
N, K = map(int, input().split())
h = [int(x) for x in input().split()]
h = np.array(h)
dp = np.zeros(N, dtype=int)
for i in range(1, N):
  j = max(0, i-K)
  dp[i] = min(dp[j:i]+np.abs(h[i]-h[j:i]))
print(dp[N-1])

Measured memory_bytes: 23096
#include "bits/stdc++.h"
#define in std::cin
#define out std::cout
#define rep(i,N) for(LL i=0;i<N;++i)
typedef long long int LL;

int main()
{
	int N, H, W;
	in >> N >> H >> W;
	out << (N - H + 1)*(N - W + 1) << std::endl;
}


Measured memory_bytes: 256
// This file is a "Hello, world!" in C++ language by GCC for wandbox.
#include <iostream>
#include <cstdlib>
#include <iomanip>
#include <cmath>
using namespace std;

int main()
{
    double a,b;
    double f;
    cin >> a >> b;
    f = a / b;
    cout << (int)( a / b) << " " << fmod(a, b) << " " << fixed << setprecision(8) << f << endl;
}


Measured memory_bytes: 3356
package main

import (
	"fmt"
)

func main() {
	H, Count := readInt(), readInt()
	loop(0, Count, func(i int) {
		H -= readInt()
	})

	if H <= 0 {
		fmt.Println("Yes")
		return
	}
	fmt.Println("No")
}

func loop(start, end int, f func(i int)) {
	for i := start; i < end; i++ {
		f(i)
	}
}

func readInt() int {
	var v int
	fmt.Scan(&v)
	return v
}

Measured memory_bytes: 5504
#include <stdio.h>
#include <math.h>
 
int s[1002];
 
#define gc() getchar_unlocked()
int in()
{
    int n = 0, c = gc();
    do n = 10*n + (c & 0xf), c = gc();
    while (c >= '0');
    return n;
}
 
int main()
{
    int n, i, is;
    double m, fs, a;
     
    while (n = in()) {
        is = 0; for (i = 0; i < n; i++) is += s[i] = in();
        m = (double)is/n;
        fs = 0; for (i = 0; i < n; i++) {
            a = s[i]-m;
            fs += a*a;
        }
        printf("%.8lf\n", sqrt(fs/n));
    }
    return 0;
}


Measured memory_bytes: 2068
#include<iostream>
using namespace std;
int main() {
    int N, T;
    cin >> N >> T;
    int c[N], t[N];
    int min_cost = 1<<30;
    bool is_TLE = true;
    for (int i=0;i<N;i++) {
        cin >> c[i] >> t[i];
        if (t[i]<=T) {
            is_TLE = false;
            if(c[i]<min_cost) min_cost = c[i];
        }
    }
    if (is_TLE) cout << "TLE" << endl;
    else cout << min_cost << endl;
    return 0;
}

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

using namespace std;

typedef long long ll;

const ll mod = 1e9 + 7;

int main() {
  int N;
  cin >> N;
  ll res = 1;
  for (int i = 1; i <= N; ++i) res = (res * i) % mod;
  cout << res << endl;
}

Measured memory_bytes: 256
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#define REP(i, m, n) for(int i=int(m);i<int(n);i++)
#define EACH(i, c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s, e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

//#define LOCAL 1
#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl
#define dump(x)  cerr << #x << " = " << (x) << endl
#define BR cout << endl;
#else
#define DEBUG(s) do{}while(0)
#define dump(x) do{}while(0)
#define BR
#endif


//改造
typedef long long int ll;
using namespace std;


//ここから編集する



int main() {
//    int gr1[] = {1,3,5,7,8,10,12};
    vector<int> v1({1,3,5,7,8,10,12});
//    int gr2[] = {4,6,9,11};
    vector<int> v2({4,6,9,11});
//    int gr3[] = {2};
    vector<int> v3({2});
    int gr[13];
    gr[0] = -1;
    REP(i,0,v1.size()){
        gr[v1[i]] = 1;
    }
    REP(i,0,v2.size()){
        gr[v2[i]] = 2;
    }
    REP(i,0,v3.size()){
        gr[v3[i]] = 3;
    }

    int a,b;
    cin >> a >> b;
    if(gr[a] == gr[b]){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }

}


Measured memory_bytes: 256
import java.util.Scanner;

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

		while (true)
		{
			// data input
			String str = sc.next();
			if (str.equals("-"))
			{
				break;
			}
			int m = sc.nextInt();
			int[] shuffle = new int[m];
			for (int i = 0; i < m; i++)
			{
				shuffle[i] = sc.nextInt();
			}

			// shuffle
			String after = str;
			String before;
			for (int i = 0; i < m; i++)
			{
				before = after;
				after = before.substring(shuffle[i]) + before.substring(0, shuffle[i]);
			}

			System.out.println(after);
		}
	}
}


Measured memory_bytes: 26476
#include <bits/stdc++.h>
typedef unsigned long long ull;
typedef long long ll;
#define __TRUE "Even"
#define __FALSE "Odd"
#define cout(x) cout << (x) << endl
#define MAX 100001
using namespace std;

int main() {
  int a,b;
  cin >> a >> b;
  if( (a*b)%2==0) cout(__TRUE);
  else cout(__FALSE);
}

Measured memory_bytes: 256
program main
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32)x,y
    integer(int32):: g(12) = [0,2,0,1,0,1,0,0,1,0,1,0]

    read*, x,y

    if (g(x)==g(y)) then
        print'(a)', 'Yes'
    else
        print'(a)', 'No'
    end if
    

end program main

Measured memory_bytes: 256
"use strict"

function Main(input) {
  const args = input.split('\n'); // args = ["2", "3 1 2", "6 1 1"]
  const N = parseInt(args[0], 10); // N = 2

  const points = [[0, 0, 0]];
  args.slice(1, N + 1).forEach(element => {
    let number = element.split(' ');
    points.push([parseInt(number[0], 10), parseInt(number[1], 10), parseInt(number[2], 10)]);
  });

  let check = true;

  for (var i = 0; i < N; i++) {
    let dist = points[i + 1];
    let cur = points[i];

    let t = dist[0] - cur[0];
    let x = Math.abs(dist[1] - cur[1]);
    let y = Math.abs(dist[2] - cur[2]);

    if (!(t >= (x + y) && ((t % 2) === ((x + y) % 2)))) {
      check = false;
      break;
    }
  }

  if (check) {
    console.log('Yes');
  } else {
    console.log('No');
  }
}

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

Measured memory_bytes: 50668
#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
#include<algorithm>//next_permutation
#define rep(i,n) for (int i = 0;i < (n);i++)
#define all(v) v.begin(),v.end()
#define dec(n) cout << fixed << setprecision(n);
#define large "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define small "abcdefghijklmnopqrstuvwxyz"
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using vl = vector<ll>;
using vvl = vector<vl>;

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

const ll MOD = 1000000007;
const ll MAX = 2000001;

ll mod(ll a){
  return a % MOD;
}

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

ll fac[MAX], finv[MAX], inv[MAX];

void nCrprep() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

ll nCr(ll n, ll r){
    if (n < r) return 0;
    if (n < 0 || r < 0) return 0;
    return fac[n] * (finv[r] * finv[n - r] % MOD) % MOD;
}

ll nCrcheep(ll n,ll r){
  if(r == 0) return 1;
  else if(r == 1) return n;
  else return nCrcheep(n-1,r-1)*n/r;
}

vector<pair<ll,ll>> prime_factorize(ll n){
  vector<pair<ll,ll>> res;
  
  for(ll i=2; i*i <= n; i++){
    if(n % i != 0) continue;
    
    ll ex = 0;
    while(n % i == 0){
      ex++;
      n /= i;
    }
    
    res.push_back({i,ex});
  }
  
  if(n != 1) res.push_back({n,1});
  
  return res;
  
}


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

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

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

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

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




int main(){
  ll n; string s; cin >> n >> s;
  
  ll rcnt = 0; ll ans = 0;
  rep(i,n){
    if(s[i] == 'R') rcnt++;
  }
  
  ans = rcnt;
  rep(i,ans){
    if(s[i] == 'R') rcnt--;
  }
  
  cout << rcnt << endl;
  
  
}

Measured memory_bytes: 3756
H,W=input().split()
H=int(H)
W=int(W)

#配列の定義
arr = [[0 for c in range(W)] for r in range(H)]

#配列へ入力
for r in range(H):
    Sh=input()
    for c in range(W):
        arr[r][c]=Sh[c]

#判定
for r in range(H):
    for c in range(W):
        if arr[r][c]=='.':
            #置き換え実施
            #周りの#の数を確認
            counter=0 #初期化
            #一つ上の行
            #行があるか？
            if r-1>=0:
                #一つ上の行、一つ前の列
                #列があるか？
                if c-1>=0:
                    if arr[r-1][c-1]=='#':
                        counter+=1
                #一つ上の行、同一の列
                if arr[r-1][c]=='#':
                    counter+=1
                #一つ上の行、一つ後の列
                #列があるか？
                if c+1<=W-1:
                    if arr[r-1][c+1]=='#':
                        counter+=1
            #同一行
            #同一行、一つ前の列
            #列があるか？
            if c-1>=0:
                if arr[r][c-1]=='#':
                    counter+=1
            #同一行、一つ後の列
            #列があるか？
            if c+1<=W-1:
                if arr[r][c+1]=='#':
                    counter+=1
            #一つ下の行
            #行があるか？
            if r+1<=H-1:
                #一つ下の行、一つ前の列
                #列があるか？
                if c-1>=0:
                    if arr[r+1][c-1]=='#':
                        counter+=1
                #一つ下の行、同一の列
                if arr[r+1][c]=='#':
                    counter+=1
                #一つ下の行、一つ後の列
                #列があるか？
                if c+1<=W-1:
                    if arr[r+1][c+1]=='#':
                        counter+=1
            #置き換え
            arr[r][c]=counter

#出力する
for r in range(H):
    for c in range(W):
        print(arr[r][c],end='')
    print()

Measured memory_bytes: 3572
#include<stdio.h>
int main() {
  double v, y;
  unsigned long long int n;
  while (scanf("%lf", &v) != EOF) {
    y = v / 19.6 * v;
    if (y - (int) y / 5) n = (int) (y / 5) + 2;
    else n = (int) (y / 5) + 1;
    printf("%llu\n", n);
  }
  return 0;
}

Measured memory_bytes: 632
#include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
const int INF = 1 << 30;
int main() {
	int n, m;
	int A[100];
	int T[50000 + 10];
	scanf("%d %d", &n, &m);
	for (int i = 0; i < m; i++)
		scanf("%d", &A[i]);
	for (int i = 0; i <= n; i++)
		T[i] = INF;
	T[0] = 0;
	for (int i = 0; i < m; i++) {
		for (int j = A[i]; j <= n; j++)
			T[j] = min(T[j], T[j - A[i]] + 1);
	}
	printf("%d\n", T[n]);
	return 0;
}


Measured memory_bytes: 3396
import java.util.Scanner;

public class Main {
	static final long MOD = 1_000_000_007;

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		long ans = modPow(10,n) - modPow(9,n)-modPow(9,n) +modPow(8, n);
		ans %= MOD;
		ans = (ans+MOD) %MOD;

		System.out.println(ans);

	}

	static long modPow(long base, long n) {
		long re = 1;
		for (int i = 0; i < n; i++) {
			re = re*base % MOD;
		}
		return re;
	}
}


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

int main(){
	int n,m;
	scanf("%d%d", &n, &m);
	int times = pow(2,m);
	int ans = times * (m * 1900 + (n - m) * 100);
	cout << ans << endl;
}

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

int main() {
	int n;
	string s;
	vector<string> S;
	cin >> n;
	cin >> s;
	S.push_back(s);
	char end = s[s.length() - 1];
	for (int i = 1; i < n; i++) {
		cin >> s;
		S.push_back(s);
		if (end != s[0]) {
			cout << "No" << endl;
			return 0;
		}
		end=s[s.length() - 1];
	}
	for (int i = 0; i < n-1; i++) {
		for (int j = i + 1; j < n; j++) {
			if (S[i] == S[j]) {
				cout << "No" << endl;
				return 0;
			}
		}
	}
	cout << "Yes" << endl;
	return 0;
}

Measured memory_bytes: 256
#include<cstdio>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<queue>
#include <bitset>
using namespace std;
long long int p1mod[200006];
long long int m1mod[200006];
long long int itteme[200006];
int main(){
    int N;
    string S;
    cin>>N>>S;
    long long int cou1=0;
    for(int i=0;i<N;i++){
        if(S[i]=='1')cou1++;
    }

    reverse(S.begin(),S.end());

    long long int p1moto=0,m1moto=0;



    p1mod[0]=1ll%(cou1+1ll);
    if(S[0]=='1')p1moto=(p1moto+p1mod[0]);
    for(int i=1;i<N;i++){
        p1mod[i]=(p1mod[i-1]*2ll)%(cou1+1ll);
        if(S[i]=='1')p1moto=(p1moto+p1mod[i]);
    }


    if(2<=cou1){
        m1mod[0]=1ll%(cou1-1ll);
        if(S[0]=='1')m1moto=(m1moto+m1mod[0]);
        for(int i=1;i<N;i++){
            m1mod[i]=(m1mod[i-1]*2ll)%(cou1-1ll);
            if(S[i]=='1')m1moto=(m1moto+m1mod[i]);
        }
    }

    /*
    puts("p1mod");
    for(int i=0;i<N;i++){
        printf("[%d]",p1mod[i]);
    }
    puts("");

    puts("m1mod");
    for(int i=0;i<N;i++){
        printf("[%d]",m1mod[i]);
    }
    puts("");

    printf("p1moto:[%lld]\nm1moto:[%lld]\n",p1moto,m1moto);
    */
    for(int i=0;i<N;i++){
        if(S[i]=='0'){
            itteme[i]=(p1moto+p1mod[i])%(cou1+1ll);
        }
        else{
            if(cou1==1)itteme[i]=-1;
            else if(cou1==0)itteme[i]=0;
            else{
                itteme[i]=(m1moto-m1mod[i]+(cou1-1ll))%(cou1-1ll);
            }
        }
    }

    for(int i=N-1;0<=i;i--){
        long long int kari;
        kari=itteme[i];
        if(kari==-1ll){
            cout<<0<<endl;
            continue;
        }

        long long int cou=1;
        while(kari!=0){
            int bitcou=0;
            for(int j=0;j<30;j++){
                if(kari&(1<<j))bitcou++;
            }
            kari%=bitcou;
            cou++;
        }
        cout<<cou<<endl;
    }


    /*実験
    for(int i=1;i<=1000;i++){
        int kari=i;
        int cou=0;
        while(kari!=0){
            int bitcou=0;
            for(int j=0;j<30;j++){
                if(kari&(1<<j))bitcou++;
            }
            kari%=bitcou;
            cou++;
        }
        //printf("[%d]:[%d]\n",i,cou);
        cout<<'['<<bitset<16>(i)<<"]:"<<cou<<endl;
    }
    */
    return 0;
}


Measured memory_bytes: 8444
#include <stdio.h>

int main(){
  int n,k,q;
  scanf("%d %d %d",&n,&k,&q);
  int i;
  int member[n+1];
  member[0]=0;
  for(i=1;i<=n;i++){
    member[i]=0;
  }

  int buf[q+1];
  buf[0]=0;
  int p;
  for(i=1;i<=q;i++){
  scanf("%d",&p);
  buf[i]=p;
  member[p]++;
  }
  for(i=1;i<=n;i++){
    if(q-member[i]<k){
      printf("Yes\n");
    }else{
      printf("No\n");
    }
  }

  return 0;

}


Measured memory_bytes: 1280
from fractions import gcd
from functools import reduce

def lcm_base(x, y):
    return (x * y) // gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N = int(input())
T = []
for _ in range(N):
    T.append(int(input()))

print(lcm(*T))

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

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

    long long ans = n;
    for (long long i = 2; i * i <= n; i++) {
        if (n % i == 0) {
            ans -= ans / i;
            while (n % i == 0) n /= i;
        }
    }
    if (n > 1) ans -= ans / n;

    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 3076
#include <bits/stdc++.h>
using namespace std;
struct fast_ios { fast_ios(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_;
#define FOR(i, begin, end) for(int i=(begin);i<(end);i++)
#define REP(i, n) FOR(i,0,n)
#define IFOR(i, begin, end) for(int i=(end)-1;i>=(begin);i--)
#define IREP(i, n) IFOR(i,0,n)
#define Sort(v) sort(v.begin(), v.end())
#define Reverse(v) reverse(v.begin(), v.end())
#define all(v) v.begin(),v.end()
#define SZ(v) ((int)v.size())
#define Lower_bound(v, x) distance(v.begin(), lower_bound(v.begin(), v.end(), x))
#define Upper_bound(v, x) distance(v.begin(), upper_bound(v.begin(), v.end(), x))
#define Max(a, b) a = max(a, b)
#define Min(a, b) a = min(a, b)
#define bit(n) (1LL<<(n))
#define bit_exist(x, n) ((x >> n) & 1)
#define debug(x) cout << #x << "=" << x << endl;
#define vdebug(v) cout << #v << "=" << endl; REP(i_debug, v.size()){ cout << v[i_debug] << ","; } cout << endl;
#define mdebug(m) cout << #m << "=" << endl; REP(i_debug, m.size()){ REP(j_debug, m[i_debug].size()){ cout << m[i_debug][j_debug] << ","; } cout << endl;}
#define pb push_back
#define f first
#define s second
#define int long long
#define INF 1000000000000000000
template<typename T> istream &operator>>(istream &is, vector<T> &v){ for (auto &x : v) is >> x; return is; }
template<typename T> ostream &operator<<(ostream &os, vector<T> &v){ for(int i = 0; i < v.size(); i++) { cout << v[i]; if(i != v.size() - 1) cout << endl; }; return os; }
template<typename T> void Out(T x) { cout << x << endl; }
template<typename T1, typename T2> void Ans(bool f, T1 y, T2 n) { if(f) Out(y); else Out(n); }

using vec = vector<int>;
using mat = vector<vec>;
using Pii = pair<int, int>;
using PiP = pair<int, Pii>;
using PPi = pair<Pii, int>;
using bools = vector<bool>;
using pairs = vector<Pii>;

//int dx[4] = {1,0,-1,0};
//int dy[4] = {0,1,0,-1};
//char d[4] = {'D','R','U','L'};

const int mod = 1000000007;
//const int mod = 998244353;
#define Add(x, y) x = (x + (y)) % mod
#define Mult(x, y) x = (x * (y)) % mod



signed main(){

    int A, P; cin >> A >> P;
    Out((3 * A + P) / 2);

    return 0;
}


Measured memory_bytes: 256
#include<stdio.h>
int main(){
  int i, k, K=0, a, b;
  scanf("%d",&k);
  scanf("%d%d",&a,&b);
  while(K<a){
    K+=k;
  }
  if((a<=K)&&(K<=b)){
    printf("OK");
  }else{
    printf("NG");
  }
  return(0);
}

Measured memory_bytes: 1724
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstring>
#include <queue>
#include <set>
#include <map>
#include <functional>
#include <cmath>
#include <cassert>
#include <string>
#include<iostream>

using namespace std;

int main(){

   int n;
   string s;

   cin >> n;
   cin >> s;

   int r=0,b=0;
   for(int i = 0 ; i < n ; i++){
      if(s[i] == 'R'){
         r++;
      }else{
         b++;
      }
   }

   if(r > b){
      cout << "Yes" << endl;
   }else{
      cout << "No" << endl;
   }

}

Measured memory_bytes: 256
import java.io.*;
import java.util.Arrays;

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
		stdin.readLine();
		int[] nums = Arrays.stream(stdin.readLine().split(" ")).mapToInt(Integer::parseInt).toArray();
		Arrays.sort(nums);
		System.out.println(nums[nums.length-1] - nums[0]);
	}

}

Measured memory_bytes: 27732
#include<bits/stdc++.h>
using namespace std;
int n,a[200001],b[200001];
map<int,vector<int> > mp;
int main()
{
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>a[i]>>b[i];
		mp[b[i]].push_back(i);
	}
	sort(b,b+n);
	long long last=0;
	for(int i=0;i<n;i++)
	{
		if(i!=0)
		if(b[i]==b[i-1])
		continue;
		for(int j=0;j<mp[b[i]].size();j++)
		{
			last+=a[mp[b[i]][j]];
			if(last>b[i])
			{
				cout<<"No";
				return 0;
			}
		}
	}
	cout<<"Yes";
	return 0;
}

Measured memory_bytes: 23680
import java.io.*;

class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    double x = Double.parseDouble(str);
    double result = Math.pow(x, 3.0);
    System.out.println((int)result);
  }
}

Measured memory_bytes: 24268
# -*- coding: utf-8 -*-

import sys
import os
import math


tate = int(input())
yoko = int(input())
values = [i for i in range(tate)]
#print(values)

for _ in range(yoko):
    a, b = map(int, input().split(','))
    a -= 1
    b -= 1
    values[a], values[b] = values[b], values[a]

for i in values:
    print(i+1)

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

int main(){
  int X;
  cin >> X;
  for(int i=0;;i++){
    if(pow(i,5)==X){
      cout << i << " " << 0 << endl;
      return 0;
    }else if(pow(i,5)>X){
      for(int j=0;j<=i;j++){
        int64_t p=pow(i,5)-pow(j,5);
        if(p==X){
          cout << i << " " << j << endl;
          return 0;
        }else if(p<X){
          break;
        }
      }
    }else{
      for(int j=-1;;j--){
        int64_t p=pow(i,5)-pow(j,5);
        if(p==X){
          cout << i << " " << j << endl;
          return 0;
        }else if(p>X){
          break;
        }
      }
    }
  }
  return 0;
}


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

long long Calc(long long A, long long B, long long C) {
	if (B == 0) return 1;
	if (B % 2 == 0) {
		long long D = Calc(A, B / 2, C);
		return (D * D) % C;
	}
	return (A * Calc(A, B - 1, C)) % C;
}

int main() {
	long long ANS = 0, COUNT = 0, MOD = 1000000007;
	string S;
	cin >> S;
	for (int i = 0; i < S.size(); i++) {
		if (S[i] == '1') {
			long long X = 1;
			X *= Calc(2, COUNT, MOD);
			X *= Calc(3, S.size() - i - 1, MOD);
			X = X % MOD;
			ANS += X;
			ANS = ANS % MOD;
			COUNT++;
		}
	}
	ANS += Calc(2, COUNT, MOD);
	ANS = ANS % MOD;
	cout << ANS;
}

Measured memory_bytes: 512
#include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <queue>
#include <algorithm> // sort
#include <math.h>

#define DEBUG 0

#define REP(i, n) for (long long i = 0; i < (n); i++) 
typedef long long ll;
static const ll mod = 1000000007;
static const ll INF = 1000000000000000000LL;
                    //999999997000000003
                    //1000000000000000000

using namespace std;

int main(){
#if DEBUG
    std::ifstream in("input.txt");
    std::cin.rdbuf(in.rdbuf());
#endif
    int N,M;
    cin >> N >> M;

    int res = N * M;
    cout << res << endl;
    return 0;
}



Measured memory_bytes: 3112
/*
problem's name:
statue:
writer:Chris
*/
#include <iostream>
#include <map>
#include <vector>
#include <cstring>
#include <utility>
#include <algorithm>
#include <cstdio>
#include <queue>
#include <string>
#include <stack>
#include <set>
#include <deque>
#include <cctype>
#include <sstream>
#include <math.h>
#include <stdio.h>
#include <time.h>
#define mp make_pair
typedef long long ll;
using namespace std;
const ll INF=1e9;
/*------------main part------------*/
inline ll read()
{
    ll x=0,f=1;char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
    while(ch>='0'&&ch<='9'){x=(x<<3)+(x<<1)+ch-'0';ch=getchar();}
    return x*f;
}
ll a[100005];
ll b[100005];
ll n;
ll sum[200005];
ll need;
ll ss(ll x)
{
	ll res=0;
	while(x>0)
	{
		res+=sum[x];
		x&=x-1;
	}
	return res;
}
void update(ll x)
{
    for(;x<=n*2;x+=x&-x)
        sum[x]++;
}
bool check(ll x)
{
	memset(sum,0,sizeof(sum));
	ll s=n;
	update(s);
	ll ans=0;
	for(ll i=1;i<=n;i++)
	{
		if(a[i]>=x)
		{
			s++;
		}
		else
		{
			s--;
		}
		ans+=ss(s);
		update(s);
	}
	return ans>=need/2+need%2;
}
int main()
{
	cin>>n;
	need=1*n*(n+1)/2;
	for(ll i=1;i<=n;i++)
	{
		cin>>a[i];
		b[i]=a[i];
	}
	sort(b+1,b+n+1);
	ll l=1;
	ll r=n;
	while(r>=l)
	{
		ll mid=(l+r)/2;
		if(!check(b[mid]))
		{
			r=mid-1;
		}
		else
		{
			l=mid+1;
		}
	}
	cout<<b[r];
	return 0;
}


Measured memory_bytes: 3328
#![allow(unused_imports, unused_variables, dead_code)]
use std::io::*;
use std::io::Write;
use std::fmt::*;
use std::str::*;
use std::cmp::*;
use std::collections::*;

trait InputValue {
    fn parse(s: &str) -> Self;
}

fn read<T: InputValue>() -> T {
    let mut buf = String::new();
    let _ = stdin().read_line(&mut buf);
    T::parse(&buf.trim())
}

fn readnc<T: InputValue>() -> Vec<T> {
    let mut vec = vec![];
    let line: String = read();
    for token in line.split_whitespace() {
        vec.push(T::parse(token));
    }
    vec
}

fn readn<T: InputValue>(n: usize) -> Vec<T> {
    let mut vec = vec![];
    for _ in 0..n {
        vec.push(read());
    }
    vec
}

macro_rules! parse_single_value {
    ($($t:ty),*) => {
        $(
            impl InputValue for $t {
                fn parse(s: &str) -> $t { s.parse().unwrap() }
            }
        )*
	}
}
parse_single_value!(i32, i64, f32, f64, usize, String);

macro_rules! parse_tuple {
	($($t:ident),*) => {
		impl<$($t),*> InputValue for ($($t),*) where $($t: InputValue),* {
			fn parse(s: &str) -> ($($t),*) {
				let mut tokens = s.split_whitespace();
				let t = ($($t::parse(tokens.next().unwrap())),*);
				t
			}
		}
	}
}
parse_tuple!(A, B);
parse_tuple!(A, B, C);

// ===

fn question(a: usize, b: usize) -> bool {
    println!("? {} {}", a, b);
    stdout().flush();
    let s: String = read();
    return s == "Y";
}

fn main() {
    let (mut a, mut b): (usize, usize) = read();
    if a <= b {
        println!("Impossible");
        return
    }

    let mut chain: Vec<usize> = vec![];

    let n = a + b;
    let mut seen: Vec<bool> = vec![false; n];

    loop {
        let mut ask = n;
        let mut target = n;
        if chain.len() == 0 {
            for i in 0..n {
                if !seen[i] {
                    ask = i;
                    seen[i] = true;
                    break;
                }
            }
        } else {
            ask = chain[chain.len()-1];
        }
        for i in 0..n {
            if !seen[i] {
                seen[i] = true;
                target = i;
                break
            }
        }
        if target == n {
            chain.push(ask);
            break;
        }

        let ok = question(ask, target);
        if ok {
            if chain.len() == 0 {
                chain.push(ask);
            }
            chain.push(target);
        } else {
            if chain.len() >= 1 {
                let l = chain.len()-1;
                chain.remove(l);
            }
            b -= 1;
        }

        if chain.len() > b {
            break;
        }
    }

    let honest = chain[chain.len()-1];
    let mut ans = vec![false; n];
    for i in 0..n {
        if question(honest, i) {
            ans[i] = true;
        }
    }

    print!("! ");
    for i in 0..n {
        if ans[i] {
            print!("1");
        } else {
            print!("0");
        }
    }
    println!();
}

Measured memory_bytes: 4820
#include <bits/stdc++.h>
#include <unistd.h>
#include <sys/time.h>
#include <stdlib.h>
 
using namespace std;
 
typedef long long ll;
typedef pair<ll,ll> P;
typedef pair<P, ll> T;
typedef pair<long double , ll> Ps;
 
const ll INF = 2e18;
const ll fact_table = 3200008;
long double Pi = 3.1415926535897932384626;

priority_queue <ll> pql;
priority_queue <P> pqp;
priority_queue <P> bag;
//big priority queue
priority_queue <ll,vector<ll>,greater<ll> > pqls;
priority_queue <P,vector<P>,greater<P> > pqps;
//small priority queue
//top pop
 
ll dx[8]={1,0,-1,0,1,1,-1,-1};
ll dy[8]={0,1,0,-1,1,-1,-1,1};
char dir[] = "DRUL";
//↓,→,↑,←

#define endl "\n"
#ifdef ENJAPMA
    #undef endl
#endif
#define p(x) cout<<x<<endl;
#define el cout<<endl;
#define pe(x) cout<<x<<" ";
#define ps(x) cout<<fixed<<setprecision(25)<<x<<endl;
#define pu(x) cout<<(x);
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define CLEAR(a) a = decltype(a)(); 
#define pc(x) cout << x << ",";
#define rep(i, n) for (ll i = 0; i < (n); i ++)

// const ll mod = 998244353ll;
const ll mod = 1000000007ll;

ll mypow(ll a, ll b, ll mod){ll x=1;while(b){while(!(b&1)){(a*=a)%=mod;b>>=1;}(x*=a)%=mod;b--;}return x;}
void YES(bool cond){ if(cond){ p("YES");}else{ p("NO");} return;}
void Yes(bool cond){ if(cond){ p("Yes");}else{ p("No");} return;}

/*
ll fact[fact_table + 5],rfact[fact_table + 5]; 
 
void c3_init(){
    fact[0] = rfact[0] = 1;
    for(ll i=1; i<=fact_table; i++){
        fact[i] = (fact[i-1]*i) % mod;
    }
    rfact[fact_table] = mypow(fact[fact_table],mod - 2, mod);
    for(ll i=fact_table; i>=1; i--){
       rfact[i-1] = rfact[i] * i;
       rfact[i-1] %= mod;
    }
    return;}
ll c3(ll n,ll r){
    return (((fact[n] * rfact[r]) % mod ) * rfact[n-r]) % mod;}
*/

bool multicase = false;

ll n,m,num,a,b,c,d,e,h,q;
ll w, k, ans;

ll x[500005], y[500005], z[500005];
string s;

void solve(){
    ll a, v, b, w, t;
    cin >> a >> v >> b >> w >> t;
    if(w >= v){
        p("NO");
    }else{
        ll dis = abs(a - b);
        if(t * (v - w) >= dis){
            p("YES");
        }else{
            p("NO");
        }
    }
    return;
}

int main(){
    // init();
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll q, testcase = 1;
    if(multicase){
        cin >> q;
    }else{
        q = 1; 
    }
    while(q--){
        // pu("Case ");pu("#");pu(testcase);pu(": ");
        solve();
        testcase++;
    }
    // solve();
    return 0;
}
















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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N,A,B=MI()
    h=[0]*N
    for i in range(N):
        h[i]=I()
        
    def ch(X):
        #X回で達成できるか?
        temp=0
        for i in range(N):
            hp=h[i]-X*B
            if hp>0:
                temp+=(hp+A-B-1)//(A-B)
        if temp<=X:
            return True
        return False
    
    ng=0
    ok=10**9
    
    while abs(ok-ng)>1:
        x=(ok+ng)//2
        if ch(x):
            ok=x
        else:
            ng=x
    print(ok)
        

main()


Measured memory_bytes: 41308
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <utility>
#include <stack>
#include <queue>
typedef long long ll;
using namespace std;

int main(){
  ll i,j,k,n,m;
  cin >> n;
  vector<pair<pair<string,ll> ,ll> > v(n);
  for(i=0;i<n;i++){
    ll x;
    cin >> v[i].first.first >> x;
    v[i].first.second = -x;
    v[i].second = i+1;
  }
  sort(v.begin(),v.end());
  for(i=0;i<n;i++){
    cout << v[i].second << endl;
  }
  return 0;
}


Measured memory_bytes: 256
N = int(input())
A = input()
B = input()
C = input()

ans = 0
for a, b, c in zip(A, B, C):
    if a != b and b != c and c != a:
        ans += 2
    elif a == b and b == c:
        ans += 0
    else:
        ans += 1

print(ans)


Measured memory_bytes: 2940