akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
using namespace std;

using ld=long double;
using Point=complex<ld>;
const ld eps=1e-9;
ld dot(Point a,Point b){return real(conj(a)*b);}
ld cross(Point a,Point b){return imag(conj(a)*b);}

bool comp(Point lhs,Point rhs){
    return lhs.real()<rhs.real() || lhs.real()==rhs.real() && lhs.imag()<rhs.imag();
}
int ccw(Point a,Point b,Point c){
    b-=a;c-=a;
    if(cross(b,c)>eps) return 1;
    if(cross(b,c)<eps) return -1;
    if(dot(b,c)<0) return 2;
    if(norm(b)<norm(c)) return -2;
    return 0;
}

vector<Point> convexHull(vector<Point> &p){
    int n=p.size();
    int k=0;
    vector<Point> ch(n*2);
    sort(p.begin(),p.end(),comp);
    for(int i=0;i<n;ch[k++]=p[i++]) 
        while(k>=2 && ccw(ch[k-2],ch[k-1],p[i])<=0) --k;
    for(int i=n-2,t=k+1;i>=0;ch[k++]=p[i--]) 
        while(k>=t && ccw(ch[k-2],ch[k-1],p[i])<=0) --k;
    ch.resize(k-1);
    return ch;
}

int main(){
    int n;
    while(cin>>n,n){
        vector<Point> xy(n);
        for(int i=0;i<n;i++){
            double x,y;
            scanf("%lf,%lf",&x,&y);
            xy[i]=Point(x,y);
        }
        vector<Point> ch=convexHull(xy);
        ld res=0;
        for(int i=0;i<ch.size();i++){
            res+=norm(ch[i]-ch[(i+1)%ch.size()]);
        }
        cout<<n-ch.size()<<endl;
    }

    return 0;
}

Measured memory_bytes: 3220
#include<bits/stdc++.h>
using namespace std;
#define N 110
#define ll long long
ll dp[N][4][4][4];
ll mod=1e9+7;
int main()
{
    int n;
    scanf("%d",&n);
    dp[0][3][3][3]=1;
    for(int i=0;i<n;i++)
        for(int a=0;a<4;a++)
        for(int b=0;b<4;b++)
        for(int c=0;c<4;c++)
        for(int d=0;d<4;d++)
    {
        if(b==0&&c==1&&d==2)continue;
        if(b==0&&c==2&&d==1)continue;
        if(b==1&&c==0&&d==2)continue;
        if(a==0&&c==1&&d==2)continue;
        if(a==0&&b==1&&d==2)continue;
        dp[i+1][b][c][d]+=dp[i][a][b][c];
        dp[i+1][b][c][d]%=mod;
    }
    ll ans=0;
        for(int a=0;a<4;a++)
        for(int b=0;b<4;b++)
        for(int c=0;c<4;c++)
            ans+=dp[n][a][b][c],ans%=mod;
        cout<<ans;
    return 0;
}


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

#define debug(x) cout<<#x<<" :: "<<x<<"\n";
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n";
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n";

#define     SPEED       ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define 	setprecn(x) cout<<fixed<<setprecision(x);
#define 	ll          long long int
#define 	pb          push_back
#define 	pll         pair<ll,ll>
#define 	vll         vector<ll>
#define 	ff          first
#define 	ss          second
#define 	all(a)      (a).begin(),(a).end()
#define 	sz(x)       (ll)x.size()
#define 	hell        1000000007
#define 	rep(i,n)    for(i=0;i<n;i++)
#define 	repe(i,a,b) for(i=a;i<b;i++)
#define 	lbnd        lower_bound
#define 	ubnd        upper_bound
#define 	bs          binary_search
#define 	mp          make_pair

ll power(ll a,ll b)
{
	if(b==0)
		return 1;
	if(b==1)
		return a;
	ll c=power(a,b/2);
	if(b%2==0)
		return((c%hell)*(c%hell))%hell;
	return ((((c%hell)*(c%hell))%hell)*(a%hell))%hell;
}

/********************************************************/
//	d.erase(unique(all(d)), d.end());
ll h[100105],dp[100005],n,k;


ll f(ll x)
{
	if(x==n-1) return 0;
	if(x>n-1) return hell;
	if(dp[x]==-1)
	{
		dp[x]=hell;
		ll i;
		rep(i,k)
			dp[x]=min(dp[x],f(x+i+1)+abs(h[x+i+1]-h[x]));
	}
	return dp[x];
}

int main()
{
	SPEED;
	ll t,c=0,i,j,m,cs=0;
	t=1;

	// cin>>t;
	string s;
	while(t--)
	{
		cin>>n>>k;
		// n=s.length();
		// ll a[n];
		rep(i,n)
		{
			cin>>h[i];
			dp[i]=-1;
		}
		// dp[0]=0;dp[1]=abs(h[0]-h[1]);
		// repe(i,2,n)
		// {
		// 	dp[i]=min(dp[i-1]+abs(h[i-1]-h[i]),dp[i-2]+abs(h[i-2]-h[i]));
		// }
		cout<<f(0);
		if(t!=0)
	   		cout<<"\n";
	}
	return 0;
}

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

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

	int n,k,s;

	cin >> n >> k >> s;

	for(int i=1;i<=n;i++)
	{
		if(i<=k)
		{
			cout << s << ' ';
		}
		else
		{
			if(s!=1e9)
			{
				cout << (s+1) << ' ';
			}
			else
			{
				cout << s-1 << ' ';
			}
		}
	}
	cout << '\n';

	return 0;
}

Measured memory_bytes: 1280
#include <iostream>
using namespace std;
int main() {
  long long int a, b, c, d;
  cin >> a >> b >> c >> d;
  long long int p1 = a * c;
  long long int p2 = a * d;
  long long int p3 = b * c;
  long long int p4 = b * d;
  cout << max(max(p1, p2), max(p3, p4)) << endl;
}

Measured memory_bytes: 3632
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <regex>
#include <numeric>
using namespace std;

/*--- Macro ---*/
#define rep(i, n) for(int i=0; i<(int)n; i++)
#define rep1(i, n) for(int i=1; i<(int)n; i++)
#define mp make_pair
#define pb push_back
#define all(a) (a).begin(), (a).end()

/*---  Type ---*/
typedef long long ll;

/*--- Constants ---*/
template <typename T> const T INF = numeric_limits<T>::max() / 10;
const int MOD = (int)1e9 + 7;

// Floating
const double EPS = 1e-11;
#define EQ0(x) (abs(x) < EPS)
#define EQ(x, y) (abs(a-b) < EPS)

// Util
int max(int a, int b, int c) {return max(a, max(b, c));}
int min(int a, int b, int c) {return min(a, min(b, c));}
ll max(ll x, ll y) {return x > y ? x : y;}
ll min(ll x, ll y) {return x < y ? x : y;}
ll max(ll a, ll b, ll c) {return max(a, max(b, c));}
ll min(ll a, ll b, ll c) {return min(a, min(b, c));}

// How to use 「map」
/*
  - 宣言
    map<{key_type}, {value_type}> salary;
  - 要素の挿入
    salary["Alice"] = 1000;
  - 要素の取得 O(logn)
    salary.at("Alice");
  - 要素の削除
    salary.erase("Alice");
  - キー検索
    salary.find("Alice"); -> true
    salary.find("Bob");   -> false
  - イテレーション
    for(auto& [key, value] : salary) {...}
 */
// -------------------------------------


// How to use 「lower_bound」, 「upper_bound」
/*
  vector<int> a = {1, 2, 3, 4, 5};
  auto iter1 = lower_bound(all(a), 3);  <- 第二引数「以上」の最小イテレータが返る
  auto iter2 = upper_bound(all(a), 3);  <- 第二引数「より大きい」最小のイテレータが返る
 */
// -------------------------------------


// How to use 「struct sort」
/*
  struct Person {
    string name;
    int age;

    Person(string _name, int _age) {
      name = _name;
      age = _age;
    }

    bool operator<(const Person &another) const {
      return age < another.age;
    }
  };

  vector<Person> people;
  people.pb(Person("Alice", 20));
  people.pb(Person("Bob", 19));
  people.pb(Person("John", 40));
  people.pb(Person("Chris", 30));
  sort(all(people));
 */
 // -------------------------------------

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



int main() {
  int n;
  cin >> n;
  vector<int> d(n);
  rep(i, n) cin >> d[i];

  sort(all(d));

  int ans = 0;
  rep(k, d[n-1]+1) {
    auto arc = lower_bound(all(d), k) - d.begin();
    // cout << k << ", " << arc << endl;
    if((n / 2) == arc) {
      ans++;
    }
  }

  cout << ans << endl;

  return 0;
}

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

int main()
{
    long long N, X = 0;
    cin >> N;
    X = ceil(N / 1.08);
    if (floor(X * 1.08) == N)
    {
        cout << ceil(N / 1.08) << endl;
    }
    else
    {
        puts(":(");
    }
}

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

using namespace std;
int bits[100],len;
int check(int sta,int end){
    for(int i=0;sta+i<=end-i;i++)
        if(bits[sta+i]!=bits[end-i])
            return 0;
    return 1;
}
int main()
{
    int n;
    scanf("%d",&n);
    while(n){
        bits[++len]=n%10;
        n/=10;
    }
    if(check(1,len))puts("Yes");
    else puts("No");
}


Measured memory_bytes: 384
using System;
using System.Linq;

class Program {
    static void Main() {
        string[] stdin = Console.ReadLine().Split();
        int n = int.Parse(stdin[0]);
        int m = int.Parse(stdin[1]);
        int l = int.Parse(stdin[2]);
        long[][] a = new long[n][];
        for(int i = 0; i < n; i++) a[i] = Console.ReadLine().Split().Select(s => long.Parse(s)).ToArray();
        long[][] b = new long[m][];
        for(int i = 0; i < m; i++) b[i] = Console.ReadLine().Split().Select(s => long.Parse(s)).ToArray();
        for(int i = 0; i < n; i++) {
            for(int j = 0; j < l; j++) {
                long ans = 0;
                for(int k = 0; k < m; k++) ans += a[i][k] * b[k][j];
                Console.Write("{0}{1}", ans, j == l - 1? '\n' : ' ');
            }
        }
    }
}


Measured memory_bytes: 20600
import { readFileSync } from "fs";

const range = (n: number | bigint) => [...Array(Number(n))].map((_, i) => i);

const getName = (n: bigint): string => {
  const alphabets = [...Array(26)].map((_, i) => String.fromCharCode("a".charCodeAt(0) + i));

  const getName = (n: bigint, l: bigint): string => {
    const m = 26n ** l;

    return n <= m
      ? range(l).reduce(
          ({ num, str }, _) => ({
            num: num / 26n,
            str: alphabets[Number(num % 26n)] + str,
          }),
          { num: n - 1n, str: "" }
        ).str
      : getName(n - m, l + 1n);
  };

  return getName(n, 1n);
};

{
  const input = readFileSync("/dev/stdin", "utf8");
  const N = BigInt(input);
  console.log(getName(N));
}


Measured memory_bytes: 29484
n = int(input())
a = [int(i) for i in input().split()]
for i in range(len(a)):
    a[i] = bin(a[i])
c = 10 ** 9
for i in a:
    b = 0
    for j in range(len(i)):
        if i[- 1 - j] == "0":
            b += 1
        else:
            break
    if b < c:
        c = b
print(c)

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

int main(){
	int a, b;
	int d, r;
	double f;

	cin >> a >> b;

	d = a/b;
	r = a%b;
	f = double(a)/double(b);

	printf("%d %d %.5f", d, r, f);

	return(0);
}

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

const ll INF64 = 1LL << 60;
const int INF32 = 1 << 29;
//const int MOD = 1000000007;
 const int MOD = 998244353;

// Lib
//

int main(){
#ifdef MYLOCAL
    ifstream in("input.txt");
    cin.rdbuf(in.rdbuf());
#endif
    int N, K; cin >> N >> K;

    vector<ll> a(N), S1(N+1, 0), S2(N+1, 0);
    for (int i = 0; i < N; ++i) {
        cin >> a[i];
        S1[i+1] = S1[i] + a[i];
        S2[i+1] = S2[i] + max(0LL, a[i]);
    }

    ll res = -1 * INF64;
    for (int i = 0; i + K <= N; ++i) {
        int left = i, right = i + K;
        ll k = max(0LL, S1[right] - S1[left]); // K区間を黒にするか白にするか
        ll l = S2[left] - S2[0]; // 左側
        ll r = S2[N] - S2[right]; // 右側
        ll tmp = k + l + r;
        res = max(res, tmp);
    }
    
    cout << res << endl;
    return 0;
}


Measured memory_bytes: 2560
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define rep(i,n) for( int i = 0; i < n; i++ )
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000


int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int A[3];
    int cnt[11] = {};
    rep(i, 3) {
        cin >> A[i]; 
        cnt[A[i]]++;
    }
    if (cnt[5] == 2 && cnt[7] == 1) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }

    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
string akiba = "AKIHABARA";
void dfs(string s, int x){
    if(x!=-1){
        s.insert(x, "A");
    }
    if(s.size()==9){
        if(akiba==s) {cout<<"YES"<<endl; exit(0);}
        return ;
    } 
    for(int i=0;i<=s.size();i++){
        dfs(s, i);
    }
    return ;
}
int main(void){
    string s; cin>>s;
    if(s.size()>9) {cout<<"NO"<<endl; return 0;}
    dfs(s, -1);
    cout<<"NO"<<endl;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <algorithm>
#include <cstdio>
#include <iomanip>
#include <queue>
#include <deque>
#include <stack>
#include <fstream>
#include <cmath>
#include <random>
#include <complex>
#include <functional>
#include <bitset>
#include <sstream>
#include <cassert>
#include <time.h>

#define ll int64_t
#define Rep(i, n) for (ll i = 0; i < n; i++)
using namespace std;
typedef vector<ll> vec;
typedef vector<vec> mat;

const ll inf = 1LL << 60;

template<class T> inline void chmin(T& a, T b) {
    if (a > b) {
        a = b;
    }
}
template<class T> inline void chmax(T& a, T b) {
    if (a < b) {
        a = b;
    }
}
void printvec (vec &v) {
    Rep (i, (ll)v.size()) {
        cout << v[i] << " \n"[i+1 == (ll)v.size()];
    }
}

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

    ll N;
    cin >> N;
    vec X(N), Y(N), P(N);
    Rep (i, N) {
        cin >> X[i] >> Y[i] >> P[i];
    }

    mat xd(1<<N, vec(N)), yd(1<<N, vec(N));
    Rep (i, 1<<N) {
        Rep (j, N) {
            xd[i][j] = abs(X[j]);
            yd[i][j] = abs(Y[j]);
            Rep (k, N) {
                if ((i>>k) & 1) {
                    chmin(xd[i][j], abs(X[j]-X[k]));
                    chmin(yd[i][j], abs(Y[j]-Y[k]));
                }
            }
        }
    }

    vec ans(N+1, inf);
    Rep (mask, 1<<N) {
        ll cnt = __builtin_popcount(mask);
        for (ll j = mask; j >= 0; j--) {
            j &= mask;
            ll cost = 0;
            Rep (k, N) {
                if (!(mask>>k & 1)) {
                    cost += min(xd[j][k], yd[mask-j][k]) * P[k];
                }
            }
            chmin(ans[cnt], cost);
        }
    }

    Rep (i, N+1) {
        cout << ans[i] << "\n";
    }
}

Measured memory_bytes: 12952
//#include <tourist>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = 1e9;
const ll LINF = ll(1e18) + 1;
const int MOD = 1000000007;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
#define rep(i, n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define debug(v)          \
    cout << #v << ":";    \
    for (auto x : v)      \
    {                     \
        cout << x << ' '; \
    }                     \
    cout << endl;
template <class T>
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T &a, const T &b)
{
    if (b < a)
    {
        a = b;
        return 1;
    }
    return 0;
}
//cout<<fixed<<setprecision(15);有効数字15桁
//-std=c++14
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int n, m;
vector<ll> a;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> n;
    map<ll,ll> count;
    for (int i = 0; i < n; i++)
    {
        ll temp;
        cin >> temp;
        a.push_back(temp);
        count[temp]++;
    }
    ll ans=0;
    for(auto x:count){
        ans+=max(ll(0),x.second*(x.second-1)/2);
    }
    vector<ll> ansa;
    for(int i=0;i<n;i++){
        ll temp=max(ll(0),count[a[i]]*(count[a[i]]-1)/2);
        ans-=temp;
        ans+=max(ll(0),(count[a[i]]-1)*(count[a[i]]-2)/2);
        ansa.push_back(ans);
        ans-=max(ll(0),(count[a[i]]-1)*(count[a[i]]-2)/2);
        ans+=temp;
    }
    rep(i,n)
    cout << ansa[i] << "\n";
}


Measured memory_bytes: 12784
#include <stdio.h>
long int gcd(long int a, long int b) {
	if(a == 0) return b;
	return gcd(b % a, a);
}
long int gdp(long int a, long int b) {
	return a / gcd(a, b) * b;
}
int main() {
	int a[3];
	int m[3];
	while(1) {
		int i;
		for(i = 0; i < 3; ++ i) scanf("%d %d", &a[i], &m[i]);
		for(i = 0; i < 3 && a[i] == 0 && m[i] == 0; ++ i);
		if(i == 3) break;
		long int c[3];
		int x[3] = {1, 1, 1};
		for(i = 0; i < 3; ++ i) {
			for(c[i] = 0; ; c[i] ++) {
				x[i] = a[i] * x[i] % m[i];
				if(x[i] == 1) {
					c[i] ++;
					break;
				}
			}
		}
		printf("%ld\n", gdp(gdp(c[0], c[1]), c[2]));
	}
	return 0;
}

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

int main(){
    int n,x,t;
    cin>>n>>x>>t;

    int c=1;
    while(1){
        if(c*x>=n){
            break;
        }
        c++;
    }

    cout<<c*t<<endl;

}


Measured memory_bytes: 3620
import sys
readline = sys.stdin.readline

N,M = map(int,readline().split())
INF = 10 ** 10
dp = [INF] * (2 ** N)
dp[0] = 0

for i in range(M):
  a,b = map(int,readline().split())
  c = list(map(int,readline().split()))
  key = 0
  for j in range(len(c)):
    key += (1 << (c[j] - 1))
  for j in range(len(dp)):
    if dp[j] == INF:
      continue
    if j | key == j:
      continue
    if dp[j | key] > dp[j] + a:
      dp[j | key] = dp[j] + a

if dp[-1] == INF:
  print(-1)
else:
  print(dp[-1])

Measured memory_bytes: 9192
N=input()
N=N[::-1]
n=len(N)
DP=[[0]*2 for i in range(n+1)]
DP[0][1]=float("inf")
for i in range(n):
  nn=int(N[i])
  if nn<9:
    DP[i+1][0]=min(DP[i][0]+nn,DP[i][1]+nn+1)
  else:
    DP[i+1][0]=DP[i][0]+nn
  if nn<9:
    DP[i+1][1]=min(DP[i][0]+(10-nn),DP[i][1]+(10-nn-1))
  else:
    DP[i+1][1]=min(DP[i][0]+(10-nn),DP[i][1])
print(min(DP[n][0],DP[n][1]+1))


Measured memory_bytes: 139568
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.stream.IntStream;
import java.util.StringTokenizer;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.BufferedReader;
import java.util.OptionalInt;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int x = in.nextInt();
            int y = in.nextInt();
            int[] xCities = in.nextIntArray(n);
            int[] yCities = in.nextIntArray(m);

            int maxXCity = IntStream.of(xCities).max().getAsInt();
            int minYCity = IntStream.of(yCities).min().getAsInt();
            out.println(maxXCity < minYCity && x < minYCity && maxXCity < y ? "No War" : "War");
        }

    }

    static class InputReader {
        private BufferedReader br;
        private StringTokenizer st;

        public InputReader(InputStream inputStream) {
            br = new BufferedReader(new InputStreamReader(inputStream));
            st = new StringTokenizer("");
        }

        public String nextString() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine(), " ");
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(nextString());
        }

        public int[] nextIntArray(int n) {
            int[] res = new int[n];
            for (int i = 0; i < n; i++) {
                res[i] = nextInt();
            }
            return res;
        }

    }
}



Measured memory_bytes: 27732
#include <stdio.h>
typedef struct student {
  int num;
  int th;
}S;
int cmp(const void *a, const void *b) {
  return ((struct student*)a)->th - ((struct student*)b)->th;
}
int main(void) { 
  int n;
  scanf("%d",&n);
  S s[n];
  for (int i = 0; i < n; i++) {
    scanf("%d",&s[i].th);
    s[i].num = i+1;
  }
  qsort(s,n,sizeof(struct student),cmp);
  for (int i = 0; i < n; i++) {
    (i == 0)?printf("%d",s[i].num):printf(" %d",s[i].num);
  }
  printf("\n");
  
  return 0;
}

Measured memory_bytes: 1788
#coding:utf-8

n, m =[int(i) for i in input().rstrip().split(" ")]

a =[]
b =[]
#a
for i in range(n):
    d = [int(j) for j in input().rstrip().split(" ")]
    a.append(d)
#b
for i in range(m):
    b.append(int(input().rstrip()))

for i in range(n):
    ai = list(a[i])
    c = [j*k for j,k in zip(ai,b)]
    print(sum(c))

Measured memory_bytes: 7984
from numpy import*
n,m,*a=int_(open(0).read().split())
a=int_(fft.irfft(fft.rfft(bincount(a,[1]*n,2**18))**2)+.5)
c=0
for i in where(a>0)[0][::-1]:
  t=min(m,a[i])
  c+=i*t
  m-=t
  if m<1:break
print(c)

Measured memory_bytes: 32892
# coding: utf-8
# Your code here!

X = int(input())
num = 0

if X <= 99:
    print(0)
    exit()
else:
    num = X // 100 * 100
    sub = X - num
    if sub <= X // 100 * 5:
        print(1)
    else:
        print(0)

Measured memory_bytes: 2940
from functools import lru_cache
n = int(input())
A = list(map(int, input().split(' ')))
q = int(input())
M = list(map(int, input().split(' ')))


@lru_cache(maxsize=None)
def search(i, m):
    if m == 0:
        return True
    if i >= n or m < 0:
        return False
    e = (search(i + 1, m) or search(i + 1, m - A[i]))
    return e


for m in M:
    if search(0, m):
        print('yes')
    else:
        print('no')



Measured memory_bytes: 9912
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
const ll INF=1LL<<60;
const double EPS = 1e-10;
const ll mod=1000000007;
//const ll mod=998244353;

int main(void){
    int x;
    cin>>x;
    if(x>=30) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}

Measured memory_bytes: 3592
#include <bits/stdc++.h>
using namespace std;
typedef pair<long long, long long> P;
#define override_rep(i, l, r, mes, ...) mes
#define rep1(i, n) for (int i = 0; i < n; i++)
#define rep2(i, l, r) for (int i = l; i < r; i++)
#define rep(...) override_rep(__VA_ARGS__, rep2, rep1)(__VA_ARGS__)
#define int long long
signed main(signed argc, char* argv[]) {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    string s,t;
    cin>>s>>t;
    cout<<t<<s<<endl;
}

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


using namespace std;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
#define reps(i,n) for (int i = 1; i <= (int)(n); ++i)
#define repd(i,n) for (int i = (int)(n - 1); i >= 0; --i)
#define repds(i,n) for (int i = (int)(n); i > 0; --i)
#define loop(i,x,n) for (int i = (int)(x); i < (n); ++i)
#define loops(i,x,n) for (int i = (int)(x); i <= (n); ++i)
#define loopd(i,x,n) for (int i = (int)(x); i > (n); --i)
#define loopds(i,x,n) for (int i = (int)(x); i >= (n); --i)
#define itrep(i,s) for (auto i = begin(s); i != end(s); ++i)
#define itrepd(i,s) for (auto i = --end(s); i != begin(s); --i)
#define all(f,x,...) [&](decltype(x)& whole) { return (f)(begin(whole), end(whole), ##__VA_ARGS__); }(x)
#define rall(f,x,...) [&](decltype(x)& whole) { return (f)(rbegin(whole), rend(whole), ##__VA_ARGS__); }(x)
using ll = long long;
using ld = long double;
constexpr ll inf = static_cast<ll>(1e17);
constexpr int iinf = static_cast<int>(1e9);
constexpr double dinf = 1e10;
constexpr ld ldinf = 1e17;
ll mod = static_cast<ll>(1e9 + 7);
std::ostream& endn(std::ostream& os) { return os.put(os.widen('\n')); }
template<class T> constexpr int sz(const T& a) { return (int)a.size(); }
template<class T> constexpr T pow2(const T a) { return a * a; }
template<class T, class ... Args> constexpr T mins(T& a, Args... args) { return a = min<T>({ a, args... }); }
template<class T, class... Args> constexpr T maxs(T& a, Args... args) { return a = max<T>({ a,args... }); }
template<typename A, size_t N, typename T>
void fillArray(A(&array)[N], const T& val) { std::fill((T*)array, (T*)(array + N), val); }

int n;
void solve() {
    cin >> n;
    cout << (n + 2 - 1) / 2 << endn;
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    solve();
    cout << flush;
    return 0;
}


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

using namespace std;

int main() {
  int idx = -1;
  for (int i = 0; i < 5; ++i) {
    int x;
    cin >> x;
    if (x == 0) idx = i + 1;
  }

  cout << idx << '\n';
  return 0;
}



Measured memory_bytes: 3568
/*
ID: rchalam1
LANG: C++14
TASK:
*/
// For train.usaco.org, fill the template above.

// Competitive Coding Template

// GCC OPTIMIAZTION FLAGS
#ifdef ONLINE_JUDGE
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#endif

#include <bits/stdc++.h>

/*
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
*/
// All Includes for Competitive Coding Template

using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;

using vi = std::vector<int>;
using vll = std::vector<long long>;
using vull = std::vector<unsigned long long>;

#define FOR(i, a, b) for (auto i = (a); i < (b); ++i)
#define F0R(i, a) FOR(i, 0, a)
#define ROF(i, a, b) for (auto i = (a); i >= (b); --i)
#define R0F(i, a) ROF(i, a, 0)
#define ITR(a, x) for (auto& a: x)

#define FSRT(set) sort((set).begin(),(set).end())
#define RSRT(set) sort((set).rbegin(),(set).rend())
#define CSRT(set, function) sort((set).begin(),(set).end(), (function))
#define TRS(set) sort((set).begin(),(set).end(), greater<>())
#define REV(set) reverse((set).begin(),(set).end());

#define ALL(set) (set).begin(), (set).end()

#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
#define ff first
#define ss second

// For stdio, call setIO() or setIO("").
void setIO(std::ifstream &readFile, std::ofstream &writeFile, const std::string &name = "", bool stdIO = false)
{
	std::ios_base::sync_with_stdio(false);
	std::cin.tie(nullptr);
	std::cout.tie(nullptr);
	if(!name.empty() && !stdIO)
	{
		readFile.open(name + ".in");
		if(readFile.fail()) return;
		writeFile.open(name + ".out");
		std::cin.rdbuf(readFile.rdbuf());
		std::cout.rdbuf(writeFile.rdbuf());
	}
}

// To time program, create object Timer  to start timing, and call Timer.elapsed().
#include <chrono>

class Timer
{
	std::chrono::time_point<std::chrono::high_resolution_clock> m_beg;
public:
	Timer() : m_beg(std::chrono::high_resolution_clock::now())
	{}

	void reset()
	{ m_beg = std::chrono::high_resolution_clock::now(); }

	[[nodiscard]] long double elapsed() const
	{
		return std::chrono::duration_cast<std::chrono::duration<long double, std::ratio<1> >>(
				std::chrono::high_resolution_clock::now() - m_beg).count();
	}
};

// Defines datatype
using dt = int;
// Defines MAXN value
constexpr dt MAXN = 1e5 + 1;
// Defines Modulus
constexpr dt MOD = 1e9 + 7;
// Defines Floating Point Correction
constexpr long double EPS = 1e-9;

//*****
//START CODE BELOW
//*****

int main(int argc, char *argv[])
{
	static std::ifstream readFile;
	static std::ofstream writeFile;
	setIO(readFile, writeFile);
	string o, e;
	cin >> o >> e;
	for(int i = 0; i < e.size(); ++i) cout << o[i] << e[i];
	if(o.size() > e.size()) cout << o[o.size() - 1];
	cout << '\n';
}

Measured memory_bytes: 3616
#include<iostream>
#include<stdio.h>
using namespace std;

int main(){
    int a,b;
    cin>>a>>b;
    if(a>b) printf("a > b\n");
    else if (a==b) printf("a == b\n");
    else printf("a < b\n");
    
    return 0;
}


Measured memory_bytes: 3028
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef vector<VI> VVI;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;

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

    int x = 1;
    REP(i,n){
        if (2 * x < x + k) x *= 2;
        else x += k;
    }
    cout << x << endl;
    return 0;
}


Measured memory_bytes: 256
S = str(input())
K = int(input())

li = []
cnt = 1
for i in range(len(S)-1):
  if S[i] == S[i+1]:
    cnt += 1
  else:
    li.append(cnt)
    cnt = 1
li.append(cnt)
  
ans = 0
first = li[0]
last = li[-1]
if (S[0]==S[-1]) and (len(li)>1):
  li[-1] += first
  li.pop(0)
  for l in li:
    ans += l // 2
  ans *= K
  ans -= li[-1] // 2
  ans += first//2 + last//2
elif S[0] == S[-1]:
  ans = li[0] * K // 2
else:
  for l in li:
    ans += l // 2
  ans *= K
print(ans)

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

// clang-format off
#define  range(i, l, r) for (int i = (int)(l); i < (int)(r); ++(i))
#define rrange(i, l, r) for (int i = (int)(r) - 1; i >= (int)(l); --(i))

#define  whole(f, x, ...) ([&](decltype((x)) container) { return (f)(  begin(container),  end(container), ## __VA_ARGS__); })(x)
#define rwhole(f, x, ...) ([&](decltype((x)) container) { return (f)( rbegin(container), rend(container), ## __VA_ARGS__); })(x)

#define endl '\n'
#define debug(x) cerr << "(" << __LINE__ << ")" << #x << ": " << (x) << endl

using i32 = int;
using u32 = unsigned int;
using i64 = long long;
using u64 = unsigned long long;

constexpr i32 mod   = 1e9 + 7;
constexpr i32 inf   = 1001001001;
constexpr i64 infll = 1001001001001001001ll;

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

struct IoSetup { IoSetup(int x = 15){ cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(x); cerr << fixed << setprecision(x); } } iosetup;

template <typename T = i64> T input() { T x; cin >> x; return x; }

template <typename T> ostream &operator<<(ostream &os, vector<T> &v) { range(i, 0, v.size()) { os << v[i] << (i + 1 != v.size() ? " " : ""); } return os; } 
template <typename T> istream &operator>>(istream &is, vector<T> &v) { for (T &in : v) is >> in; return is; }

template <typename T1, typename T2> ostream &operator<<(ostream &os, pair<T1, T2> p) { os << "(" << p.first << ", " << p.second << ")"; return os; }
template <typename T1, typename T2> istream &operator>>(istream &is, pair<T1, T2> &p) { is >> p.first >> p.second; return is; }

template <typename T> vector<T> make_vector(size_t a, T b) { return vector<T>(a, b); }
template <typename... Ts> auto make_vector(size_t a, Ts... ts) { return vector<decltype(make_vector(ts...))>(a, make_vector(ts...)); }

template <typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
template <typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }
// clang-format on

void solver() {
    int n = input(), m = input();
    
    cout << n * (n - 1) / 2 + m * (m - 1) / 2 << endl;
}

signed main(int argc, char *argv[]) {
    solver();
}


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

int main()
{
    int N;
    cin >> N;
    vector<long long> H(N);
    for (int i = 0; i < N; i++)
        cin >> H[i];
    int c = 0;
    int d = c;
    for (int i = 0; i < N - 1; i++)
    {
        if (H[i] >= H[i + 1])
            c++;
        else
        {
            d = max(c, d);
            c = 0;
        }
    }
    cout << max(c, d) << endl;
    return 0;
}

Measured memory_bytes: 1024
using System;
class abc163_c{
  public static void Main(){
    int n = int.Parse(Console.ReadLine());
    String[] str = Console.ReadLine().Split(' ');
    int[] counter = new int[n];
    for(int i=0; i<n; i++){
      counter[i] = 0;
    }
    for(int i=0; i<n-1; i++){
      counter[int.Parse(str[i])-1]++;
    }
    for(int i=0; i<n; i++){
      Console.WriteLine(counter[i]);
    }
  }
}


Measured memory_bytes: 38224
#include <bits/stdc++.h>
using namespace std;
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define mp(a,b) make_pair((a),(b))
#define pb(a) push_back((a))
#define all(x) (x).begin(),(x).end()
#define uniq(x) sort(all(x)),(x).erase(unique(all(x)),end(x))
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;}
template<class T> ostream& operator<<(ostream& o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;}

#define INF 2147483600

double solve(int n, int m){
  vector<vector<double>> tbl(n,vector<double>(n));
  rep(i,n) rep(j,n) cin>>tbl[i][j];

  vector<vector<double>> dp(m, vector<double>(n, -INF));
  rep(i,n) dp[0][i] = 1.0;
  repl(i,1,m) rep(j,n) rep(k,n) dp[i][j] = max(dp[i][j], dp[i-1][k] * tbl[k][j]);
  return *max_element(all(dp[m-1]));
}

int main(){
  int n,m;
  while(cin>>n>>m, n|m){
    printf("%.2f\n", solve(n,m));
  }

  return 0;
}

Measured memory_bytes: 3156
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  int w = N / 100;
  int e = (N - w * 100) / 10;
  int r = (N - w * 100 - e * 10);
  if(w == 7) {
    cout << "Yes" << endl;
  }
  else if(e == 7) {
    cout << "Yes" << endl;
  }
  else if(r == 7) {
    cout << "Yes" << endl;
  }
  else {
    cout << " No" << endl;
  }
}

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

int main(){

  int d,n;
  cin >> d >> n;
  if(n==100) n++;
  if(d == 0) cout << n;
  else if(d == 1) cout << n * 100;
  else cout << n * 10000;
  cout << endl;

	return 0 ;
}


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

#define REP(i, x, n) for (int i = x; i < (int)(n); i++)
#define rep(i, n) REP (i, 0, n)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x.size())
#define popcount(x) __builtin_popcount(x)
#define popcountll(x) __builtin_popcountll(x)
#define uniq(x) x.erase(unique(x.begin(), x.end()), x.end())
#define F first
#define S second
#define mp make_pair
#define eb emplace_back

using namespace std;

typedef long long ll;

const int INF = 1 << 29;

int main() {
    int n;
    cin >> n;
    vector<int> vi(2 * n);
    rep (i, 2 * n) {
        cin >> vi[i];
    }
    sort(all(vi));
    int ans = 0;
    for (int i = 0; i < 2 * n; i += 2) {
        ans += vi[i];
    }
    cout << ans << endl;
}


Measured memory_bytes: 256
/*
░░░░░░░░░░░░░░░░▄▄█▀▀██▄▄░░░░░░░
░░░░░░░░░░░░░▄█▀▀░░░░░░░▀█░░░░░░
░░░░░░░░░░░▄▀░░░░░░░░░░░░░█░░░░░
░░░░░░░░░▄█░░░░░░░░░░░░░░░█░░░░░
░░░░░░░██▀░░░░░░░▄▄▄░░▄░█▄█▄░░░░
░░░░░▄▀░░░░░░░░░░████░█▄██░▀▄░░░
░░░░█▀░░░░░░░░▄▄██▀░░█████░██░░░
░░░█▀░░░░░░░░░▀█░▀█▀█▀▀▄██▄█▀░░░
░░░██░░░░░░░░░░█░░█░█░░▀▀▄█▀░░░░
░░░░█░░░░░█░░░▀█░░░░▄░░░░░▄█░░░░
░░░░▀█░░░░███▄░█░░░░░░▄▄▄▄█▀█▄░░
░░░░░▀██░░█▄▀▀██░░░░░░░░▄▄█░░▀▄░
░░░░░░▀▀█▄░▀▄▄░▄░░░░░░░███▀░░▄██
░░░░░░░░░▀▀▀███▀█▄░░░░░█▀░▀░░░▀█
░░░░░░░░░░░░▄▀░░░▀█▄░░░░░▄▄░░▄█▀
░░░▄▄▄▀▀▀▀▀█▀░░░░░█▄▀▄▄▄▄▄▄█▀▀░░
░▄█░░░▄██▀░░░░░░░░░█▄░░░░░░░░░░░
█▀▀░▄█░░░░░░░░░░░░░░▀▀█▄░░░░░░░░
█░░░█░░░░░░░░░░░░░░░░░░█▄░░░░░░░
*/
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define dbg(x) cout << #x << '=' << x << '\n';
#define ll long long
#define x first
#define y second
#define pi pair <int, int>
#define vi vector <int>
#define L nod<<1
#define R ((nod<<1)|1)
#define mp make_pair
const ll mod = 1000000007;
const ll nmax=500003;
int n, k, ans;
string s;


int32_t main(){
    ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cin>>n>>k;
    cin>>s;
    for(int i=2; i<=n; i++) if(s[i-1]==s[i-2]) ans++;
    ans+=2*k;
    cout<<min(ans, n-1);

}


Measured memory_bytes: 512
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return [LIST() for _ in range(n)]


INF = float("inf")
MOD = 10**9 + 7


def main():
    N = INT()
    A = LIST()
    A.sort()
    M = A[-1] + 1
    table = [0] * (M)

    for i in A:
        if table[i] == 0:
            table[i] = -1
            for j in range(i + i, M, i):
                table[j] = 1
        elif table[i] == -1:
            # 重複しているということ
            table[i] = -2
    # print(table)
    cnt = 0
    for i in range(N):
        if table[A[i]] == -1:
            cnt += 1
    print(cnt)

    return


if __name__ == '__main__':
    main()


Measured memory_bytes: 32304
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <cctype>
#define len length()
#define sz size()
#define rng(i, a, b) for(int i = a; i < b; i++)
#define rep(i, n) rng(i, 0, n)
#define srt(v) sort(v.begin(), v.end())
#define rev(s) reverse(s.begin(), s.end())
#define vi(a, n) vector<int> a(n)
#define vs(a, n) vector<string> a(n)
#define vc(a, n) vector<char> a(n)
#define psb(a) push_back(a)
#define ppb pop_back()
#define erc(S, i) S.erase(S.begin() + i)
#define ers(S, i, j) S.erase(S.begin() + i, S.begin() + j)
#define sp(n) cout << setprecision(n) << fixed
#define fst(s) s.at(0)
#define lst(s) s.at(s.len - 1)
using namespace std;

int main(){
    int N;
    cin >> N;
    vi(p,N);
    int sum=0;
    rep(i,N){
        cin >> p[i];
        sum += p[i];
    }
    srt(p);
    sum -= round(p[N-1] / 2);
    cout << sum << endl;
    return 0;
}

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

int main() {
	int n;
	while(cin >> n, n) {
		vector<string> in;
		for(int i = 0; i < n; i++) {
			string s;
			cin >> s;
			in.push_back(s);
		}

		int longest = 0;
		for(int i = 0; i < n; i++) {
			int a = 0, b = 0;
			for(int j = 0; j < n; j++) {
				if(in[i][j] == '1') {
					a++;
					longest = max(a, longest);
				}
				else
					a = 0;
				if(in[j][i] == '1') {
					b++;
					longest = max(b, longest);
				}
				else
					b = 0;
			}
		}
		for(int i = -1 * n + 1; i < n; i++) {
			int a = 0, b = 0;
			for(int j = 0; j < n; j++) {
				if(i + j >= 0 && i + j < n && in[i + j][j] == '1') {
					a++;
					longest = max(a, longest);
				}
				else
					a = 0;
				if(i + j >= 0 && i + j < n && in[i + j][n - j - 1] == '1') {
					b++;
					longest = max(b, longest);
				}
				else
					b = 0;
			}
		}
		cout << longest << endl;
	}
}

Measured memory_bytes: 1292
#include <algorithm>
#include <cstdlib>
#include <iostream>
#include <limits>
#include <vector>

int main() {
    int N;
    std::cin >> N;
    std::vector<int> S(N + 1);
    S[0] = 0;
    for (int i = 1; i <= N; ++i) {
        int W;
        std::cin >> W;
        S[i] = S[i - 1] + W;
    }
    int ans = std::numeric_limits<int>::max();
    for (int i = 1; i < N; ++i) {
        int abs = std::abs(S[i] - (S[N] - S[i]));
        ans = std::min(ans, abs);
    }
    std::cout << ans << "\n";
    return 0;
}


Measured memory_bytes: 256
n, K = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
sum = 0

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n]*g2[r] *g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 10**5
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル
 
for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )
    
for i in range(n):
  sum+=A[i]*cmb(i,K-1,mod)-A[i]*cmb(n-i-1,K-1,mod)
  
print(sum%(10**9+7))  

Measured memory_bytes: 76968
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define int long long
#define endl "\n"
#define pii pair<int,int> 
#define ff first
#define ss second
#define mii map<int,int>
#define si set<int>
#define sti stack<int>
#define qi queue<int>
#define vi vector<int>
#define pq priority_queue<int>
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
const int M=1e9+7;

void solve(){
	int n,m;
	cin>>n>>m;
	cout<<n*m<<endl;
}

int32_t main(){
	IOS;
	int t=1;
	//cin>>t;
	while(t--){
		solve();	
	}
}

Measured memory_bytes: 3580
fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}

fn read_vec2<T: std::str::FromStr>(n: u32) -> Vec<Vec<T>> {
    (0..n).map(|_| read_vec()).collect()
}

fn main() {
    let ab :Vec<i32>= read_vec();
    let (a,b) = (ab[0],ab[1]);
    let ans = if (a * b) % 2 == 0 {
        "Even".to_string()
    } else {
        "Odd".to_string()
    };
    println!("{}",ans);
}

Measured memory_bytes: 4352
#include "bits/stdc++.h"
using namespace std;
#define ll long long int
#define rep(i,n) for( int i = 0; i < n; i++ )
#define rrep(i,n) for( int i = n; i >= 0; i-- )
#define REP(i,s,t) for( int i = s; i <= t; i++ )
#define RREP(i,s,t) for( int i = s; i >= t; i-- )
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000


int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    string S; cin >> S;
    int len = S.length();
    deque<char> s;
    rep(i, len) {
        if (S[i] == 'B') {
            if(s.size()) s.pop_back();
        }
        else s.push_back(S[i]);
    }
    while(s.size()) {
        cout << s.front();
        s.pop_front();
    }
    cout << endl;

    return 0;
}


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

#define llint long long int

using namespace std;

int main(){
    llint K;
    int X, Y;

    cin >> K >> X >> Y;

    bool X_is_minus = false;

    if(X < 0){
        X_is_minus = true;
        X = -X;
    }
    bool Y_is_minus = false;

    if(Y < 0){
        Y_is_minus = true;
        Y = -Y;
    }
    bool XY_is_replaced = false;

    if(X < Y){
        XY_is_replaced = true;

        int t = X;

        X = Y;
        Y = t;
    }
    if(K % 2 == 0 && (X + Y) % 2 == 1){
        cout << -1 << endl;

        return 0;
    }
    vector<int> x, y;

    x.push_back(0);
    y.push_back(0);

    if(X + Y == K){
        x.push_back(X);
        y.push_back(Y);
    }else if(X + Y < K){
        if((X + Y) % 2 == 0){
            llint D = K - (X + Y) / 2;

            x.push_back(K - D);
            y.push_back(-D);

            x.push_back(X);
            y.push_back(Y);
        }else{
            llint D1 = (K - X + Y) / 2;
            llint D2 = K - Y;

            x.push_back(-D1);
            y.push_back(D1 - K);

            x.push_back(2 * (K - D1) - D2);
            y.push_back(-D2);

            x.push_back(X);
            y.push_back(Y);
        }
    }else{
        int n = (X + Y) / K;

        while(true){
            llint t = n * K - X - Y;

            if(t >= 0 && t % 2 == 0){
                break;
            }
            n ++;
        }
        llint D = (n * K - X - Y) / 2;

        for(int i = 0; y[i] > - D; i ++){
            if(y[i] - K >= - D){
                x.push_back(0);
                y.push_back(y[i] - K);
            }else{
                x.push_back(K - y[i] - D);
                y.push_back(-D);
            }
        }
        for(int i = x.size() - 1; x[i] < X; i ++){
            if(x[i] + K <= X){
                x.push_back(x[i] + K);
                y.push_back(-D);
            }else{
                x.push_back(X);
                y.push_back(x[i] + K - X - D);
            }
        }
        for(int i = x.size() - 1; y[i] < Y; i ++){
            x.push_back(X);
            y.push_back(y[i] + K);
        }
    }
    cout << x.size() - 1 << endl;

    for(int i = 1; i < x.size(); i ++){
        if(XY_is_replaced){
            int t = x[i];

            x[i] = y[i];
            y[i] = t;
        }
        if(X_is_minus){
            x[i] = -x[i];
        }
        if(Y_is_minus){
            y[i] = -y[i];
        }
        cout << x[i] << " " << y[i] << endl;
    }
}

Measured memory_bytes: 4076
#include <bits/stdc++.h>
#define ll long long
#define inf 0x3f3f3f3f 
#define il inline 
#define in1(a) read(a)
#define in2(a,b) in1(a),in1(b)
#define in3(a,b,c) in2(a,b),in1(c)
#define in4(a,b,c,d) in2(a,b),in2(c,d)
il void readl(ll &x){
    x=0;ll f=1;char c=getchar();
    while(c<'0'||c>'9'){if(c=='-')f=-f;c=getchar();}
    while(c>='0'&&c<='9'){x=x*10+c-'0';c=getchar();}
    x*=f;
}
il void read(int &x){
    x=0;int f=1;char c=getchar();
    while(c<'0'||c>'9'){if(c=='-')f=-f;c=getchar();}
    while(c>='0'&&c<='9'){x=x*10+c-'0';c=getchar();}
    x*=f;
}
using namespace std;
/*===================Header Template=====================*/
#define N 100010
int a,b;
int main(){
	cin>>a>>b;
	for(int i=1;i<=3;i++){
		if((a*b*i)%2)return puts("Yes"),0; 
	}
	return puts("No"),0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ldb = long double;
using pa = pair < ll, ll >;
using vec = vector < ll >;
#define pb push_back
#define F  first
#define S  second
#define f(i,x,n) for(ll i=x;i<n;i++) 
#define all(c) c.begin(),c.end()
#define edl "\n"
#define ceils(s,n) (s+n-1)/n
#define str string
#define add insert
#define fast() ios_base::sync_with_stdio(false);cin.tie(NULL)
const int MOD = 1e9 + 7, N = 1e5 + 10;
const ll LINF = LLONG_MAX;
ll a,b,c,n,s;
str s1,s2;

int main() {
    fast();
    // #ifndef ONLINE_JUDGE
    //   freopen("input.txt", "r", stdin);
    //   freopen("output.txt","w",stdout);
    // #endif
    cin >> a >> b;
    if(a<10 and b<10){
        cout<<a*b;
    }  
    else
        cout<<-1;
    

    cerr << "Time taken: " << int((clock() * 1000.) / CLOCKS_PER_SEC) << "ms\n";
    return 0;
}
 

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

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		String input = sc.next();
		String ans;
		String [] vowel = {"a", "e", "i", "o", "u"};
		List<String> aa = Arrays.asList(vowel);
		if (aa.contains(input)) {
			ans = "vowel";
		} else {
			ans = "consonant";
		}
		System.out.println(ans);
		sc.close();
	}
}

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

#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define pii pair<int,int>
#define data pair<int,pii>

int N;
vector<data> V;

signed main()
{
    cin >> N;
    rep(i, N)
    {
        int a, b;
        cin >> a >> b;
        V.push_back({a + b, {a, b}});
    }

    sort(V.rbegin(), V.rend());

    int ans = 0;
    rep(i, N)
    {
        if(i & 1)ans -= V[i].second.second;
        else ans += V[i].second.first;
    }

    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 6308
import sys

n = int(input())

for a in range(1,3501):
  for b in range(1,3501):
    if((4*a*b - n*b - n*a) > 0):
      c = (n*a*b) / (4*a*b - n*b - n*a)
      if(c.is_integer()):
        print('%d %d %d' % (a, b, c))
        sys.exit()

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

ll solve()
{
	ll a, b, c, d;
	cin >> a >> b >> c >> d;

	ll ans = LONG_LONG_MIN;

	if ((a <= 0 && b >= 0) || (c <= 0 && d >= 0))
		ans = 0;

	if ((b >= 0 && d >= 0) || (a <= 0 && c <= 0))
	{
		ans = max(ans, b * d);
		ans = max(ans, a * c);
	}
	else
	{
		if (b <= 0 && d >= 0)
			ans = max(ans, b * max(ll(0), c));
		else
			ans = max(ans, d * max(ll(0), a));
	}

	return ans;
}

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

	ll t;
	// cin >> t;
	t = 1;
	for (ll i = 1; i <= t; i++)
		cout << solve() << "\n";

	return 0;
}


Measured memory_bytes: 3648
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		//int n = sc.nextInt();
		String s = sc.next();
		
		String ss = s.toUpperCase();
		
		if(s.equals(ss)) {
			System.out.println("A");
		} else {
			System.out.println("a");
		}
		//long n = sc.nextLong();
		//double n = sc.nextDouble();
		
		//for(int i = 0; i < ; i++)

		//System.out.println("Yes");
		//System.out.println("No");
		

	}
}


Measured memory_bytes: 35748