akhauriyash/Code-Regression huggingface dataset:
#include <stdio.h>
#include <algorithm>
#include <assert.h>
#include <cmath>
#include <deque>
#include <iostream>
#include <limits.h>
#include<functional>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <stack>

#define LL long long
#define pii pair<int,int>
#define pLL pair<LL,LL>
#define mp make_pair
#define mt make_tuple
#define pq priority_queue<LL>
#define pqg priority_queue<int,vector<int>,greater<int>>
#define pb push_back
#define vec vector<int>
#define vecll vector<LL>
#define vecpii vector<pii>
#define vecpLL vector<pLL>
#define vecbL vector<bool>
#define endl "\n"
#define REP(e,v) for(auto e:v)
#define rep(i, a, n) for(LL i = a; i < n;i++)

using namespace std;

int inp(){
	int x;
	scanf("%d",&x);
	return x;
}
LL linp(){
	LL x;
	scanf("%lld",&x);
	return x;
}

void outp(int i){
	printf("%d",i);
}

void loutp(LL i){
	printf("%lld",i);
}

LL mod(LL i){
	return i % 1000000007;
}


int gcd(int i,int j){
	if(j != 0)
		return gcd(j, i % j);
	else
		return i;

}

int ABC_swap(){
	LL X =linp();
	LL Y =linp();
	LL Z =linp();

	printf("%lld %lld %lld", Z, X, Y);
	return 0;
}

int Popular_vote(){

	 LL N ,M;

	 N = linp();
	 M = linp();

	 priority_queue<LL, vector<LL> > que;

	 int sumV = 0;

	 rep(i , 0, N){
		 LL in = linp();
		que.push(in);
		 sumV += in;
	 }


	 int count = 0;
	 double canV = (double)sumV /( 4.0 * M);

	 while(que.top() >= canV && !que.empty()){
	 	 	count++;
	 	 	que.pop();
	 }

	 if(count >= M){
		 printf("Yes\n");
	 }
	 else{
		 printf("No\n");
	 }


	 return 0;
}

int Replacing_Integer(){

	LL N,K;
	cin >> N >> K;

	loutp(min(N % K, K - N%K));

}

signed main() {

	//ABC_swap();
	//Popular_vote();
	Replacing_Integer();
	return 0;
}



Measured memory_bytes: 256
(eval-when (:compile-toplevel :load-toplevel :execute)
  (defparameter OPT
    #+swank '(optimize (speed 3) (safety 2))
    #-swank '(optimize (speed 3) (safety 0) (debug 0)))
  #+swank (progn (ql:quickload '(:cl-debug-print :fiveam))
                 (shadow :run)
                 (use-package :fiveam)))
#+swank (cl-syntax:use-syntax cl-debug-print:debug-print-syntax)

;; BEGIN_INSERTED_CONTENTS
(declaim (inline split-ints-into-vector))
(defun split-ints-into-vector (string dest-vector &key (offset 0))
  (declare (string string)
           ((simple-array * (*)) dest-vector)
           ((integer 0 #.most-positive-fixnum) offset))
  (loop for idx from offset below (length dest-vector)
        for pos1 = 0 then (1+ pos2)
        for pos2 = (position #\space string :start pos1 :test #'char=)
        do (setf (aref dest-vector idx)
                 (parse-integer string :start pos1 :end pos2))
        finally (return dest-vector)))

(defmacro define-int-types (&rest bits)
  `(progn
     ,@(mapcar (lambda (b) `(deftype ,(intern (format nil "UINT~A" b)) () '(unsigned-byte ,b))) bits)
     ,@(mapcar (lambda (b) `(deftype ,(intern (format nil "INT~A" b)) () '(signed-byte ,b))) bits)))
(define-int-types 2 4 7 8 15 16 31 32 62 63 64)

(defmacro println (obj &optional (stream '*standard-output*))
  `(let ((*read-default-float-format* 'double-float))
     (prog1 (princ ,obj ,stream) (terpri ,stream))))

;; Hauptteil

(defun main ()
  (let* ((n (read))
         (a (read))
         (b (read))
         (table (make-array n)))
    (dotimes (i n) (setf (aref table i) (read)))
    (println
     (min (count-if (lambda (x) (<= x a)) table)
          (count-if (lambda (x) (<= (+ a 1) x b)) table)
          (count-if (lambda (x) (<= (+ b 1) x)) table)))))

#-swank(main)


Measured memory_bytes: 21988
N, M, X = map(int,input().split())

C = list()
A = list()
for i in range(N):
	temp = list(map(int,input().split()))
	C.append(temp[0])
	A.append(temp[1:])	


MAX = 100000000000	

def func(cost,a,i):
	if min(a) >= X:
		return cost
	elif i == N:
		return MAX
	total_A = [x+y for (x,y) in zip(a,A[i])]
    
	return min(func(cost + C[i],total_A,i+1),func(cost,a,i+1))
	
ans = func(0,[0]*M,0)

if ans == MAX:
	print(-1)
else:
	print(ans)


Measured memory_bytes: 9228
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <stack>
#include <queue>
#include <functional>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <vector>
#include <array>
#include <tuple>
#include <utility>
#include <numeric>
#include <iomanip>
#include <cctype>
#include <cmath>
#include <assert.h>
#include <cstdlib>
#include <list>
using namespace std;

using ll = long long;
using ull = unsigned long long;
using PII = pair<int, int>;
using PLL = pair<ll, ll>;

template<typename T1, typename T2> ostream& operator<<(ostream& s, const pair<T1, T2>& p) {
    return s << "(" << p.first << ", " << p.second << ")";
}
template<typename T> ostream& operator<<(ostream& s, const vector<T>& v) {
    s << "[";
    for (int i = 0; i < v.size(); i++) s << (i == 0 ? "" : ", ") << v[i];
    s << "]";
    return s;
}

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

int main() {
    int N;
    cin >> N;
    map<ll, int> counter;
    for (int i = 0; i < N; i++) {
        ll A;
        cin >> A;
        counter[A]++;
    }

    ll tate = 0,
       yoko = 0;
    for (auto mapping : counter) {
        if (mapping.second >= 2) {
            tate = mapping.first;
        }
    }

    if (tate > 0) {
        counter[tate] -= 2;
    }

    for (auto mapping : counter) {
        if (mapping.second >= 2) {
            yoko = mapping.first;
        }
    }

    cout << tate * yoko << endl;

    return 0;
}


Measured memory_bytes: 6528
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#define llint long long

using namespace std;

int n;
vector<int> G[100005];
vector<int> vec;
bool used[100005];

void bfs()
{
  queue<int> Q;
  used[1] = true;
  Q.push(1);

  while(Q.size()){
    int v = Q.front();
    Q.pop();
    vec.push_back(v);
    for(int i = 0; i < G[v].size(); i++){
      if(used[G[v][i]]) continue;
      Q.push(G[v][i]);
      used[G[v][i]]= true;
    }
  }
}

int Prev[100005][17];
int depth[100005];

void dfs(int v, int p, int d)
{
  depth[v] = d;
  Prev[v][0] = p;
  for(int i = 0; i < G[v].size(); i++){
    dfs(G[v][i], v, d+1);
  }
}

int getLCA(int u, int v){
  int x = u, y = v;
  if(depth[y] > depth[x]) swap(x, y);

  for(int i = 16; i >= 0; i--){
    if(depth[x] - (1<<i) >= depth[y]) x = Prev[x][i];
  }
  if(x == y) return x;
  for(int i = 16; i >= 0; i--){
    if(Prev[x][i] != Prev[y][i]){
      x = Prev[x][i];
      y = Prev[y][i];
    }
  }
  x = Prev[x][0];
  return x;
}

int main(void)
{
  cin >> n;
  int p;
  for(int i = 2; i <= n; i++){
    cin >> p;
    G[p].push_back(i);
  }
  for(int i = 1; i <= n; i++) sort(G[i].begin(), G[i].end());

  bfs();
  dfs(1, 0, 0);

  //or(int i = 0; i < vec.size(); i++) cout << vec[i] << " "; cout << endl;

  for(int i = 1; i < 17; i++){
    for(int j = 1; j <= n; j++){
      Prev[j][i] = Prev[Prev[j][i-1]][i-1];
    }
  }

  llint ans = depth[vec[0]];
  for(int i = 1; i < vec.size(); i++){
    ans += depth[vec[i-1]] + depth[vec[i]] - 2 * depth[getLCA(vec[i-1], vec[i])];
    //cout << vec[i] << " " << ans << endl;
  }
  cout << ans << endl;
}



Measured memory_bytes: 20712
#include<bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
#define rep2(i,s,n) for (int i = s; i < n; ++i)
#define all(a) a.begin(),a.end()
#define tmax(a,b,c) max(a,max(b,c))
#define tmin(a,b,c) min(a,min(b,c))
#define pb push_back
#define fi first
#define se second
using namespace std;
using ll = long long;
using P = pair<int,int>;
template<class T> inline bool chmin(T& a,T b) {if(a > b){a = b; return true;} return false;}
template<class T> inline bool chmax(T& a,T b) {if(a < b){a = b; return true;} return false;}
const int inf = 1001001001;

int main() {
    int n,k;
    cin >> n >> k;
    int ans = 0;
    rep(i,n) {
        int h;
        cin >> h;
        if(h >= k) ans++;
    }
    cout << ans << endl;
}

Measured memory_bytes: 256
#include <stdio.h> 
int main(void) {
  int n, y, m, d, i, ans, j;
  scanf("%d",&n);
  for(i = 0; i < n; i++ ) {
    ans = 0;
    scanf("%d%d%d",&y,&m,&d);
    for(j = 1; j + y < 1000; j++ ) {
      if((y + j) % 3) {
	ans += 195;
      } else {
	ans += 200;
      }
    }
    if(y % 3)  {
      for(j = 1; m + j < 11; j++ ) {
	if((m + j) % 2) {
	  ans += 20;
	} else {
	  ans += 19;
	}
      }
    } else {
      for(j = 1; j + m < 11; j++ ) {
	ans += 20;
      }
    }
    if(y % 3) {
      if(m % 2) {
	ans += (20 - d);
      } else {
	ans += (19 - d);
      }
    } else {
      ans += (20 - d);
    }
    ans++;
    printf("%d\n",ans);
  }
  return 0;
}

Measured memory_bytes: 596
#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
using namespace std;

vector<int> G[100001];
int N;
int root;
int MAX_LOG_V = 17;
int POW[18];

int** parent;
int* depth;

void dfs(int node_id,int parent_id,int d){
	parent[0][node_id] = parent_id;
	depth[node_id] = d;
	for(int i = 0; i < G[node_id].size(); i++){
		if(G[node_id][i] != parent_id)dfs(G[node_id][i],node_id,d+1);
	}
}

void init(){

	dfs(root,-1,0);

	for(int k = 0; k + 1 < MAX_LOG_V; k++){
		for(int node_id = 0; node_id < N; node_id++){
			if(parent[k][node_id] < 0)parent[k+1][node_id] = -1;
			else{
				parent[k+1][node_id] = parent[k][parent[k][node_id]];
			}
		}
	}
}


int lca(int left,int right){

	if(depth[left] > depth[right])swap(left,right);

	for(int k = MAX_LOG_V-1; k >= 0; k--){
		if(depth[right]-depth[left] >= POW[k]){
			right = parent[k][right];
		}
	}

	if(left == right)return left;

	for(int k = MAX_LOG_V-1; k >= 0; k--){
		if(parent[k][left] != parent[k][right]){
			left = parent[k][left];
			right = parent[k][right];
		}
	}
	return parent[0][left];
}



int main(){

	for(int i = 0; i <= 17; i++)POW[i] = pow(2,i);

	scanf("%d",&N);

	int num,child;

	for(int i = 0; i < N; i++){
		scanf("%d",&num);
		for(int k = 0; k < num; k++){
			scanf("%d",&child);
			G[i].push_back(child);
		}
	}

	parent = new int*[MAX_LOG_V];
	for(int i = 0; i < MAX_LOG_V;i++)parent[i] = new int[N];
	depth = new int[N];
	root = 0;
	init();

	int Q;
	scanf("%d",&Q);

	int left,right;

	for(int i = 0; i < Q; i++){
		scanf("%d %d",&left,&right);
		printf("%d\n",lca(left,right));
	}

	return 0;
}



Measured memory_bytes: 20572
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり


N = I()
T = LI()
A = LI()
mod = 10**9+7

minimum = [1]*N  # 山i(0-index)の高さとしてありうる最小値
maximum = [0]*N  # 山i(0-index)の高さとしてありうる最大値

for i in range(N):
    if i == 0:
        minimum[i] = T[i]
        maximum[i] = T[i]
    else:
        if T[i] != T[i-1]:
            minimum[i] = T[i]
            maximum[i] = T[i]
        else:
            maximum[i] = T[i]

for i in range(N-1,-1,-1):
    if i == N-1:
        minimum[i] = max(minimum[i],A[i])
        maximum[i] = min(maximum[i],A[i])
    else:
        if A[i] != A[i+1]:
            minimum[i] = max(minimum[i],A[i])
            maximum[i] = min(maximum[i],A[i])
        else:
            maximum[i] = min(maximum[i],A[i])

ans = 1
for i in range(N):
    if maximum[i] >= minimum[i]:
        ans *= maximum[i]-minimum[i]+1
        ans %= mod
    else:
        print(0)
        exit()
print(ans)


Measured memory_bytes: 97736
#!/usr/bin/env python3

#import
#import math
#import numpy as np
N, M = map(int, input().split())
Q = [list(map(int, input().split())) for _ in range(M)]

R = [False] * (N + 1)
num = [1] * (N + 1)

R[1] = True

for x, y in Q:
    R[y] = R[x] or R[y]
    num[x] -= 1
    num[y] += 1

    if num[x] <= 0:
        R[x] = False

print(R.count(True))

Measured memory_bytes: 28632
#include <iostream>
#include <climits>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
 
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;

#define MOD 1000000007LL

int main()
{
  int d, t, s;

  cin >> d >> t >> s;
  if (t*s >= d) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }

  return 0;
}


Measured memory_bytes: 3596
#include <iostream>
#include <map>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <queue>
#include <set>
#include <math.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<ll, P> Q;
const ll mod = 1000000007;
const ll INF = 1000000000000000;
ll bit[100010], num;
ll par[100010], sz[100010];
ll s;


struct edge { ll to, cost; };
ll V;
vector<edge> G[300010];
ll d[300010];

ll root(int x) { // �f�[�^x��������؂̍����ċA�œ���Froot(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�̍��������łȂ�(=�����؂ɂȂ�)���Fx�̍�rx��y�̍�ry�ɂ���
}

bool same(int x, int y) { // 2�̃f�[�^x, y��������؂������Ȃ�true��Ԃ�
	int rx = root(x);
	int ry = root(y);
	return rx == ry;
}

ll sum(ll i)
{
	ll s = 0;
	while (i > 0)
	{
		s += bit[i];
		i -= i & -i;
	}
	return s;
}

void add(ll i, ll x)
{
	while (i <= num)
	{
		bit[i] += x;
		i += i & -i;
	}
}

ll po(ll x, ll y)
{
	if (y == 0) return 1;
	if (y % 2)
	{
		return po(x, y - 1) * x % mod;
	}
	else
	{
		ll yyy = po(x, y / 2);
		return yyy * yyy % mod;
	}
}

ll pow_mod(ll x, ll y)
{
	ll res = 1;
	while (y > 0)
	{
		if (y % 2 == 1)
		{
			(res *= x) %= mod;
		}
		(x *= x) %= mod;
		y /= 2;
	}
	return res;
}

ll div(ll x)
{
	return po(x, mod - 2);
}



int main(void)
{
	cin >> s;
	cout << 0 << ' ' << 0 << ' ';
	ll p = s % 1000000000;
	ll q = s / 1000000000;
	cout << 1000000000 << ' ' << 1 << ' ';
	if (p == 0)
	{
		cout << 0 << ' ' << q << endl;
	}
	else
	{
		cout << 1000000000 - p << ' ' << q + 1 << endl;
	}
	int www;
	cin >> www;
}


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

using namespace std;

int main(){
	int n;

	cin >> n;
	
	for(int i = 0; i < n; i++){
		int tate,yoko,naname;
		cin >> tate >> yoko >> naname;

		if(tate > naname){
			swap(tate,naname);
		}
		if(yoko > naname){
			swap(yoko,naname);
	}

		if(naname * naname == tate * tate + yoko * yoko)
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}
	return 0;
}

Measured memory_bytes: 1152
#include <bits/stdc++.h>
using namespace std;
map<string,int> m;
map<string,int>::iterator it;
int main()
{
	string str1;
	char tmp[11];
	int n,t,i,ma=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%s",tmp);
		//printf("%s %d\n",str1.c_str(),m.count(str1));
		str1=tmp;
		if(m.count(str1)==0)
			m[str1]=1;
		else
			m[str1]++;
		//printf("%s %d\n",str1.c_str(),m[str1]);
	}
	scanf("%d",&t);
	for(i=0;i<t;i++)
	{
		scanf("%s",tmp);
		str1=tmp;
		if(m.count(str1)==0)
			m[str1]=-1;
		else
			m[str1]--;
	}
	for(it=m.begin();it!=m.end();it++)
	{
		ma=max(ma,it->second);
	}
	printf("%d",ma);
	return 0;
}

Measured memory_bytes: 256
#include<cstdlib>
#include<iostream>
#include<string.h>
using namespace std;

int main()
{
	int n,A[200];
	int i,sum=0;
	int T[1000];
	for (i=1;i<=1000;i++)
	  T[i]=0;
    cin >> n;
	for (i=1;i<=n;i++)
	  {
	  	cin >> A[i];
	  	if (T[A[i]]==0) {
	  		sum++;
	  		T[A[i]]=1;
		  }
	  }
	cout << sum; 
	return 0; 
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
int main(){
	ll N,T,a,t,A;
	cin>>N;
	t=a=1;
	for(ll n=0;n<N;n++){
		cin>>T>>A;
		ll k=max((t+T-1)/T,(a+A-1)/A);
		t=k*T;
		a=k*A;
		//cout<<t<<" "<<a<<endl;
	}
	cout<<t+a;
	return 0;
}


Measured memory_bytes: 384
#pragma region header
#include <bits/stdc++.h>
using namespace std;
#define int long long
#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 rev(i, n) for(int i = (int)(n - 1); i >= 0; i--)
#define rev1(i, n) for(int i = (int)(n); i > 0; i--)
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define resort(v) sort((v).rbegin(), (v).rend())
#define vi vector<int>
#define vvi vector<vector<int>>
#define vc vector<char>
#define vvc vector<vector<char>>
#define vb vector<bool>
#define vvb vector<vector<bool>>
using ll = long long;
using P = pair<int, int>;
/* ----------------よく使う数字や配列----------------- */
int dx[] = {1,0,-1,0};
int dy[] = {0,1,0,-1};
constexpr ll mod = 1e9+7;
constexpr int inf = INT32_MAX/2;
constexpr ll INF = LLONG_MAX/2;
constexpr long double eps = DBL_EPSILON;
constexpr long double pi = 3.141592653589793238462643383279;
/* ----------------------end----------------------- */

/* --------------------テンプレート------------------ */
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
/* ----------------------end----------------------- */

/* --------------------ライブラリ-------------------- */
ll fact(int i) {       //階乗
    if (i == 0) return 1;
    return (fact(i - 1)) * i % mod;
}
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 keta(ll n) {        //桁数を求める
    if(n == 0) return 1;
    int count = 0;
    while(n != 0) {
        n /= 10;
        count++;
    }
    return count;
}
ll ketasum(ll n) {    //各桁の和
    ll sum = 0;
    while(n != 0) {
        sum += n % 10;
        n /= 10;
    }
    return sum;
}
/* ----------------------end----------------------- */
#pragma endregion
signed main() {
    int n,k;cin >> n >> k;
    vi a(n);
    int GCD;
    int ma = -1;
    rep(i, n) {
        cin >> a[i];
        chmax(ma,a[i]);
        if(i==0) {
            GCD = a[0];
        }
        else {
            GCD=gcd(GCD,a[i]);
        }
    }
    if(k%GCD==0&&k<=ma) cout << "POSSIBLE" << endl;
    else cout << "IMPOSSIBLE" << endl;
    return 0;
}

Measured memory_bytes: 3940
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cassert>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <algorithm>
using namespace std;
typedef long long ll;

int main(){
  int a, b, c;
  cin >> a >> b >> c;
  if (a == b + c || b == a + c || c == a + b) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}


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

int f[50];

int fib(int n) {
	if (n == 0)return 1;
	if (n == 1)return 1;
	if (f[n] != 0)return f[n];
	f[n] = fib(n - 1) + fib(n - 2);
	return f[n];
}

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

	fill(f, f + 50, 0);

	int N; cin >> N;
	cout << fib(N) << endl;
}


Measured memory_bytes: 3160
#include <algorithm>
#include <cctype>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <string>

using namespace std;

int main() {
	string str;
	getline(cin, str);
	for (int i = 0; i < str.size(); i++) {
		char c = str[i];
		if (islower(c)) str[i] = toupper(c);
		else str[i] = tolower(c);
	}
	cout << str << endl;
	return 0;
}



Measured memory_bytes: 3148
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using p = pair<int,int>;
const long long INF = 1ll << 60;



int main() {
  int X; cin >> X;
  if ( X == 7 || X==5 || X== 3) cout << "YES" << endl;
  else cout << "NO" << endl;

	return 0;
}


Measured memory_bytes: 3576
#include <stdio.h>
int main(){
    int n,m,l,a,b;
    int vA[101][101]={};
    int vB[101][101]={};
    long long vC[101][101]={};
    
    scanf("%d%d%d",&n,&m,&l);
    
    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
            scanf("%d",&a);
            vA[i][j]=a;
        }
    }
    
    for(int i=1;i<=m;i++){
        for(int j=1;j<=l;j++){
            scanf("%d",&b);
            vB[i][j]=b;
        }
    }
    
    for(int j=1;j<=n;j++){
        for(int k=1;k<=l;k++){
            for(int i=1;i<=m;i++){
                vC[j][k]+=vA[j][i]*vB[i][k];
            }
        }
    }
    
    for(int i=1;i<=n;i++){
        for(int j=1;j<=l;j++){
            if(j!=1) printf(" ");
            printf("%lld",vC[i][j]);
    }
    printf("\n");
    }
    return 0;
}


Measured memory_bytes: 2108
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(50000)
def ryuka(n):
    dp = [0]*(n+1)
    
    def ryu(n):
        if n < 2:
            return 2 - n
        if dp[n] != 0:
            return dp[n]
        dp[n] = ryu(n-1)+ryu(n-2)
        return dp[n]

    return ryu(n)
print(ryuka(int(input())))


Measured memory_bytes: 9100
import java.util.Scanner;

public class Main {
    static Scanner stdIn = new Scanner(System.in);
    public static void main(String[] args){
        String s = stdIn.next();
        char[] cs = s.toCharArray();
        if(cs[s.length() - 1] == 's'){
            System.out.print(s);
            System.out.println("es");
        }else{
            System.out.print(s);
            System.out.println("s");
        }
    }
}

Measured memory_bytes: 35728
let readInt _ = stdin.ReadLine() |> int

readInt ()
|> fun x ->
    seq { x .. -1 .. 1 }
    |> Seq.filter (fun a ->
        a
        |> float
        |> System.Math.Sqrt
        |> int
        |> pown
        <| 2
        |> (=) a)
    |> Seq.head
|> printfn "%d"


Measured memory_bytes: 30036
import sys
sys.setrecursionlimit(10**7)
def f(n):
    if dp[n] != -1:
        return dp[n]
    res = N
    for i in range(N):
        if n < 6**i:
            break
        res = min(res, f(n-6**i)+1)
    for i in range(N):
        if n < 9**i:
            break
        res = min(res, f(n-9**i)+1)
    dp[n] = res
    return res

N = int(input())
dp = [-1]*(N+1)
dp[0] = 0
f(N)
print(dp[N])

Measured memory_bytes: 202224
#include <bits/stdc++.h>
#define ll long long int
#define MOD 1000000007
#define INF 1e18

using namespace std;

int main(void){
  ll h, w, k;
  cin >> h >> w >> k;
  
  vector<string> s(h);
  for (int i = 0; i < h; i++){
    cin >> s[i];
  }

  vector<vector<ll>> sum(h, vector<ll>(w + 1, 0));
  for (int i = 0; i < h; i++){
    for (int j = 0; j < w; j++){
      sum[i][j+1] = sum[i][j] + (s[i][j] == '1' ? 1 : 0);
    }
  }

  ll res = INF;
  int bit = 0;
  while (bit < (1 << (h - 1))){
    vector<vector<ll>> kabe(1, vector<ll>(0));
    kabe[0].emplace_back(0);
    for (int i = 0; i < h-1; i++){
      ll a = kabe.size();
      if ((bit >> i) & 1){
        kabe.emplace_back(vector<ll>(1, i + 1));
      }
      else {
        kabe[a-1].emplace_back(i + 1);
      }
    }
    int iw = 0;
    int a = 0;
    int nw = 0;
    ll n = kabe.size();
    int dekiru = 1;
    while (iw < w){
      int ok = 1;
      vector<ll> tsum(n, 0);
      for (int i = 0; i < n; i++){
        for (int j = 0; j < kabe[i].size(); j++){
          tsum[i] += sum[kabe[i][j]][iw+1] - sum[kabe[i][j]][a];
        }
        if (tsum[i] > k)
          ok = 0;
      }

      if (ok){
        iw++;
      }
      else {
        if (a == iw){
          dekiru = 0;
          break;
        }
        a = iw;
        nw++;
      }
    }

    if (dekiru)
      res = min(res, n - 1 + nw);
    bit++;
  }


  cout << res << endl;

  return 0;
}


Measured memory_bytes: 384
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repI(i, d, n) for (int i = (d); i < (n); ++i)
#define reps1(i, n) for (int i = 1; i < (n); ++i)
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

using ll = long long;
using P = pair<int, int>;
using Pl = pair<ll, ll>;
using M = map<int, int>;
using Ml = map<ll, ll>;
ll const INF = 1ll<<61;
double pi = 3.141592653589793238;

int main() {
  vector<string> c(3);

  rep(i, 3) cin >> c[i];
  rep(i, 3) cout << c[i][i];
  cout << endl;

  return 0;
}


Measured memory_bytes: 3588
import math
import fractions
import collections
import itertools
S=list(input())
cnt=0
ans=0
if S[0]=="R":
    cnt=1
for i in range(1,len(S)):
    if S[i]=="R":
        cnt=cnt+1
    else:
        ans=max(ans,cnt)
        cnt=0
ans=max(ans,cnt)
print(ans)

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

int main(){
    int n;
    cin>>n;
    int x=0,ans=0;
    for(int i=0;i<n;i++){
        char c; cin>>c;
        c=='I'?x++:x--;
        ans=max(ans,x);
    }
    cout<<ans<<endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define SZ(x) ((int) (x).size())
using namespace std;

typedef long long i64;

int main() {
    #ifdef LOCAL_RUN
    freopen("task.in", "r", stdin);
    freopen("task.out", "w", stdout);
    //freopen("task.err", "w", stderr);
    #endif // ONLINE_JUDGE
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n;
    string S, T;
    cin >> n >> S >> T;

    vector<pair<int, int>> A;
    for (int i = n - 1, j = n - 1; i >= 0; --i) {
        if (i < n - 1 && T[i] == T[i + 1] && j <= i) {
            continue;
        }
        j = min(j, i);
        while (j >= 0 && S[j] != T[i]) {
            --j;
        }
        if (i == j) {
            continue;
        }
        if (j < 0) {
            cout << "-1\n";
            return 0;
        }
        A.push_back(make_pair(j, i));
    }

    int last = n - 1;
    vector<int> vals;
    int ans = 0, add = 0;
    for (const auto& p: A) {
        if (!vals.empty()) {
            vals.pop_back();
        }
        add++;
        while (last >= p.first) {
            vals.push_back(1 - add);
            last--;
        }
        ans = max(ans, add + vals[SZ(vals) - (p.second - p.first) - 1]);
    }
    cout << ans << '\n';
}

Measured memory_bytes: 11412
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <vector>
#include <iostream>
#include <limits.h>
#include <math.h>
#include <unordered_set>
#include <assert.h>
using namespace std;

#define ran(i, a, b) for ((i) = (a); (i) < (b); (i)++)
#define rep(i, a) ran ((i), 0, (a))
#define rep1(i, a) ran ((i), 1, (a)+1)
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef long long ll;
#define _0 first
#define _1 second
#define _pb(x) push_back(x)
#define _mp(x, y) make_pair(x, y)
#if defined(SHIROKO1_LOCAL) && !defined(NDEBUG)
#define DEBUG(...) fprintf(stderr, "[DEBUG] " __VA_ARGS__)
#else
#define DEBUG(...) ((void)0)
#endif



int main()
{
	int N;
	unordered_set<int> s;
	cin >> N;
	while (N--) {
		int x;
		cin >> x;
		if (s.count(x))
			s.erase(x);
		else
			s.insert(x);
	}
	cout << s.size() << endl;
	return 0;
}


Measured memory_bytes: 4388
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0;i<(int)(n);i++)
#define all(x)    (x).begin(),(x).end()
typedef long long ll;
const int MOD = (int)1e9 + 7;

ll gcd(ll a,ll b){
  while(b!=0){
    ll a_ = a / b;
    ll b_ = a - b*a_;
    a = b;
    b = b_;
  }
  return a;
}

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

int main(){
  ll a,b,c,d;
  cin >> a >> b >> c >> d;
  ll c_l = (a-1) / c;
  ll c_r = b / c;
  ll d_l = (a-1) / d;
  ll d_r = b / d;

  ll e = lcm(c,d);
  ll e_l = (a-1) / e;
  ll e_r = b / e;
  cout << (b-a+1) - ( (c_r-c_l)+(d_r-d_l)-(e_r-e_l) )<< endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define lld long long int

using namespace std;
int min(int a,int b){
    return (a>b)?b:a;
}
int main() {
    ios::sync_with_stdio(0); cin.tie(0);
// 	freopen("input.txt", "r", stdin); 
// 	freopen("output.txt", "w", stdout);
    int n;
    cin>>n;
    int h[n];
    int minC[n];
    for(int i=0;i<n;i++){
        cin>>h[i];
    }
    minC[n-1]=0;
    minC[n-2]=abs(h[n-1]-h[n-2]);
    for(int i=n-3;i>=0;i--){
        minC[i] = min(abs(h[i]-h[i+2])+minC[i+2],abs(h[i]-h[i+1])+minC[i+1]);
    }
    cout<<minC[0];
	return 0;
}


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

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

using ll = long long;
using P = pair<int,int>;
using mp =  map<int,int>;

const int MOD = 1e9 + 7;

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

    int n;
    cin >> n;
    map<string, int> ms;
    vector<string> vs(n);
    rep(i, n){
        string s;
        cin >> s;
        vs[i] = s;
        ms[s]++;
    }

    if(ms.size() != n) {
        cout << "No" << endl;
    }else{
        rep(i, n-1){
            string s1 = vs[i], s2 = vs[i+1];
            if(s1[s1.size()-1] != s2[0]) {
                cout << "No" << endl;
                return 0;
            }
        }
        cout << "Yes" << endl;
    }

    return 0;
}


Measured memory_bytes: 256
#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
char q[100001],p[100001],a[100001],b[100001];
int main()
{
	int n,m,i,j;
	while(cin>>n)
	{
		if(n==0)break;
		else
		{
		     for(i=1;i<=n;i++)cin>>q[i]>>p[i];
			 cin>>m;
			 for(i=1;i<=m;i++)
			 {
			      cin>>a[i];
				  for(j=1;j<=n;j++)
				  {
				      if(a[i]==q[j])
					  {
					      a[i]=p[j];
					      break;
					  }
				  }	
			 }	
		}
		for(i=1;i<=m;i++)cout<<a[i];
		cout<<endl;
	}
	return 0;
}

Measured memory_bytes: 3116
//shara's here
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(){
    string s;
    ll t;
    cin>>t>>s;
    string is="ABC",te="";
    int cnt=0;
    for(ll i=0;i<s.size();i++){
        te=s.substr(i,3);
        if(te==is)cnt++;
    }
    cout<<cnt<<endl;
	return 0;
}
/*
███████████████████████████████████████████████████
███████████████████████████████████████████████████
██████████████████████████████████▀████████████████
██████████████████████████████████░▀███████████████
██████████████████████████████▌███░░░▀▀████████████
██▀████████████████████▐██████░▐██░░░░░░▀▀█████████
██░████████████████████▐█████▌░██▌▄░░░░▄▄░▄████▀███
█▌░███████████████████▀░█████░░░█░░░▄████░░███▀▐███
█▌░▐██████████████████░░████▌░░░▀░░▀███▀▀░▐███▄████
██░▀██████████████▌▐█▐▄▄████▌░░░░░░░░░░░░░▌████████
███░███████████████▀░▄▄██▀█▐░░░░░░░░░░░░░░▐████████
███▄░██████████████▄░░░░░░▀▀▀░░░░░░░░░░░░░█▐███████
████▄░██████████████████▄▄▄▄▄▄▐▄░░░░░░░░░░░████████
█████▄█████████████████▀▀▀▀▀▀░░░░░░░░░░░░░░████████
████████████████████████▄░░░░░░░░░░░░░░░▄░░████████
██████████████████████████▄▄▄░░░░░░░░░▄█░▄█████████
████████████████████████████████▄░░░░██▄███▀░░▀████
█████████████████████████████▀█████▄███▀▀▀░░▄▄░████
████████████████████████████▀░░▀░░▀▀░░░░▄▄▄██▀░░▀▀█
███████████████████████████▌░░░░░░░░░░░███████░░░▄█
███████████████▄░▀████████▀░░░░░░▀░░░░███████▌░░░██
███▄▄████████████▄░▀██████▄░░░░░█░░░░████████░░░▀▀
░▀█████████████████▄░▀█████░░░░██░░░░▀██████░░░░░▄█
▐█▄▀█████████████████▄░▀████░░░██▌░░░▐████▀░░░░▄███
▐███▄▀▀█████████████████▄░▀▀░░░░▀██▌▄█▀▀░░░▄▄██████
▀▀▀▀▀░░░▀▀▀▀▀░░░▀▀▀▀▀▀▀▀▀▀▀░░░░░░░▀▀░░░░░░▀▀▀▀▀▀▀▀▀
*/


Measured memory_bytes: 256
n = int(input())
t = [[] for _ in range(n)]
s = [[] for _ in range(n)]

for i in range(n):
    a = int(input())
    for j in range(a):
        x, y = map(int, input().split())
        if y == 1:
            t[i].append(x - 1)
        else:
            s[i].append(x - 1)
res = 0
for k in range(pow(2, n)):
    judge = True
    cnt = 0
    for i in range(n):
        if (k >> i) & 1 == 1:
            for e in t[i]:
                if (k >> e) & 1 == 0:
                    judge = False
            for e in s[i]:
                if (k >> e) & 1 == 1:
                    judge = False
            cnt += 1
    if judge:
        res = max(res, cnt)

print(res)

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

int main () {

	int N;
	cin >> N;

	int X = static_cast<int>(N / 1.08);

	bool none = true;

	int N1 = static_cast<int>(X * 1.08);
	int N2 = static_cast<int>((X + 1) * 1.08);
	if (N1 == N) {
		cout << X << endl;
		none = false;
	}
	if (N2 == N) {
		cout << X + 1 << endl;
		none = false;
	}
	if (none) {
		cout << ":(" << endl;
	}
}

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

typedef long long ll;
#define REP(i, n, m) for(int i = n; i < m; i++)
#define REPR(i, n, m) for(int i = n; i >= m; i--)
#define LREP(i, n, m) for(ll i = n; i < m; i++)
#define LREPR(i, n, m) for(ll i = n; i >= m; i--)

#define P pair<int, int >


const int INF = 1e9 + 1;
const int MOD = 1e9 + 7;



//---functions---//
int gcd(int a, int b){
    if(a < b) swap(a, b);
    return b?gcd(b, a%b):a;
}

int s2i(string num){stringstream ss; ss << num << flush; int n; ss >> n; return n;}
string i2s(int n){stringstream ss; ss << n << flush; return ss.str();}

bool firstCompare(const P& firstElof, const P& secondElof){
    return firstElof.first < secondElof.first;
}
bool secondCompare(const P& firstElof, const P& secondElof){
    return firstElof.second < secondElof.second;
}
//---------------//

ll L, R;
int main(){
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);
    cin >> L >> R;
    if(R >= 2019 + L - 1){
        cout << 0 << '\n';
        return 0;
    }
    ll l, r;
    l = L % 2019;
    r = R % 2019;
    if(l > r) r += 2019;
    ll ans = 2018;
    LREP(i, l, r){
        LREP(j, i + 1, r + 1){
            ans = min(ans, i * j % 2019);
        }
    }
    cout << ans << '\n';
    return 0;
}


Measured memory_bytes: 256
#include<stdio.h>

int atgc_q(char s) {
	char atgc[4] = { 'A','T','G','C' };
	int i;
	for (i = 0; i < 4; i++) {
		if (atgc[i] == s) {
			return 1;
			
		}
	}
	return 0;
}

int main(void) {
	int flag[11];
	char s[11];
	int cnt = 0;
	int max = 0;

	scanf("%s", &s);

	for (int i = 0; i < 10; i++) {
		flag[i] = atgc_q(s[i]);
	}

	for (int i = 0; i < 10; i++) {
		for (int j = i; j <= 10; j++) {
			if (flag[j] == 1) {
				cnt++;
			}
			else {
				if (cnt > max) {
					max = cnt;
				}
				cnt = 0;
			}
		}
	}

	printf("%d\n", max);
	
	return 0;
}

Measured memory_bytes: 128
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;

public class Main{
	public static void main(String[] args) throws IOException {
		try (BufferedReader br = new BufferedReader(
				new InputStreamReader(System.in))) {

			String in = br.readLine();
			String chr[] = in.split(" ");
			BigDecimal h = new BigDecimal(chr[0]);
			BigDecimal a = new BigDecimal(chr[1]);

			BigDecimal div = h.divide(a, BigDecimal.ROUND_UP);
			 System.out.println(div);
		}
	}
}

Measured memory_bytes: 25488
import java.io.*;
import java.util.*;

public class Main {
    public static final long mod = (long)1e9+7;
    public static final long INF = Long.MAX_VALUE/2;
    public static final int inf = Integer.MAX_VALUE/2;
    //abc064 b
    static void solve(InputReader in, PrintWriter out){
        int n = in.ni();
        int[] a = in.ni(n);
        Arrays.sort(a);
        out.println(a[n-1]-a[0]);
    }

    public static void main(String[] args){
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        solve(in, out);
        out.close();
    }
    public static class InputReader{
        private BufferedReader br;
        private StringTokenizer st;
        public InputReader(InputStream is){
            br = new BufferedReader(new InputStreamReader(is));
            st = null;
        }
        public String ns(){
            if(st == null || !st.hasMoreTokens()){
                try{
                    st = new StringTokenizer(br.readLine());
                }catch (Exception e){
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }
        public int ni(){
            return Integer.parseInt(ns());
        }
        public long nl(){
            return Long.parseLong(ns());
        }
        public double nd(){
            return Double.parseDouble(ns());
        }
        public char nc(){
            return ns().toCharArray()[0];
        }
        public int[] ni(int n){
            int[] a = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public long[] nl(int n){
            long[] a = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = nl();
            }
            return a;
        }
        public double[] nd(int n){
            double[] a = new double[n];
            for (int i = 0; i < n; i++) {
                a[i] = nd();
            }
            return a;
        }
    }
}

Measured memory_bytes: 20948
#include<bits/stdc++.h>
using namespace std;
long long n,ans,t;
string s;
int main(){
	cin>>s;
	n=s.size();
	for(int i=0;i<n;i++)
		if(s[i]=='B')
			t++;
		else
			ans+=t;
	cout<<ans;
}


Measured memory_bytes: 640
n = int(input())
l = 0
r = float("INF")
w = 0
LR = sorted([list(map(int,input().split())) for i in range(n)])
rm = [float("INF")]*(n+1)
for i in range(n):
    rm[-2-i] = min(rm[-1-i],LR[-1-i][1])
for i in range(n):
    x,y = LR[-1-i]
    l = max(l,x)
    r = min(r,y)
    w = max(w,y-x+1)
    rm[-2-i] = min(rm[-1-i],y)
ans = max(r-l+1,0)+w
for k in range(n-1):
    i,j = LR[k]
    a = max(r-i+1,0)
    b = max(rm[k+1]+1-l,0)
    ans = max(ans,a+b)
print(ans)

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

int main(){
	int N;
	cin >> N;
	string S;
	cin >> S;

	int l = 0, r = 0;
	int cnt = 0;
	for (int i = 0; i < S.size(); i++){
		if (S[i] == ')') cnt++;
		else {
			if (cnt > 0){
				l += cnt;
				cnt = -1;
			} else {
				cnt--;
			}
		}
	}
	if (cnt > 0) l += cnt;

	cnt = 0;
	for (int i = S.size()-1; i >= 0; i--){
		if (S[i] == '(') cnt++;
		else {
			if (cnt > 0){
				r += cnt;
				cnt = -1;
			} else {
				cnt--;
			}
		}
	}
	if (cnt > 0) r += cnt;

	for (int i = 0; i < l; i++){
		cout << '(';
	}
	cout << S;
	for (int i = 0; i < r; i++){
		cout << ')';
	}

	cout << endl;
	return 0;
}


Measured memory_bytes: 256
import java.io.*;
public class Main{
    public static void main(String[] args) throws IOException{
        Reader r = new Reader();    
        long N = r.l();
        int limit = (int)Math.pow(N+1, 0.5);
        long ans = 0;
        for(int i = 1; i < limit; i++){
            if(N%i == 0){
                ans += N/i-1;
            }
        }
        print(ans);
    }
    
    static void print(Object o){
        System.out.println(o.toString());
    }
    static class Reader extends BufferedReader{
        Reader(){
            super(new InputStreamReader(System.in));
        }
        String s() throws IOException{
            return readLine();
        }
        String[] ss() throws IOException{
            return s().split(" ");
        }
        long Long(String s){
            return Long.parseLong(s);
        }
        long l() throws IOException{
            return Long(s());
        }
    }
}


Measured memory_bytes: 23380
#include<bits/stdc++.h>
#define REP(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
typedef long long int ll;
const ll MOD = 1000000007;

int main() {
  int n, o;
  cin >> n;
  o = n / 2 + (n % 2 != 0);
  cout << o / (float)n << endl;
  return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<vector>

using namespace std;

int main(){
    int n;
    string s;
    cin >> n;
    cin >> s;
    int i=0;
    char cur;
    int cnt=0;
    while( i < s.size() ){
        cur = s[i];
        while( i<s.size() && s[i] == cur) i++;
        cnt++;
    }
    cout << cnt;
    return 0;
}


Measured memory_bytes: 512
import numpy as np
N = int(input())
arr = list(map(int,input().split()))
#print(sum([1 for i in range(len(arr)) if arr[i]>=K]))
s =np.zeros(N)
for i in range(len(arr)):
  s[arr[i]-1]=i+1

#s.insert(arr[i]-1,i+1)
print(' '.join(map(str,list(map(int,s)))))

Measured memory_bytes: 27592
import java.util.*;

public class Main {

    private static int mod = 1000000007;
    private static int[][] c;

    public static void main(String[] args){

        prepare();

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        int l = n - k;

        for(int i=1; i<=k; i++) {

            if(l+1<i) {
                System.out.println(0);
                continue;
            }

            long a = c[l+1][i];

            int rem = k - i;
            if(rem > 0) {
                a *= c[rem+i-1][i-1];
                a %= mod;
            }

            System.out.println(a);


        }

    }

    private static void prepare() {
        c = new int[2002][2002];
            c[0][0] = 1;
        for(int i=1; i<2002; i++) {
            c[i][0] = 1;
            for(int j=1; j<=i; j++) {
                c[i][j] = (c[i-1][j] + c[i-1][j-1]) % mod;
            }
        }

    }

}


Measured memory_bytes: 53076
#include <bits/stdc++.h>
#define REP(i,n) for (int i = 0; i <(n); ++i)
#define REP2(i,x,n) for (int i = x; i <(n); ++i)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
using namespace std;
using ll = long long;
using P = pair<int,int>;
static const double PI = acos(-1);
static const int INF = 1e9+7;
#define REP(i,n) for (int i = 0; i <(n); ++i)
//debug 
#ifdef _DEBUG
#define debug(var)  do{cout << #var << " :";view(var);}while(0)
#else
#define debug(...)
#endif
template<typename T> void view(T e){cout << e << endl;}
template<typename T> void view(const vector<T>& v){for(const auto& e : v){ cout << e << " "; } cout << endl;}
template<typename T> void view(const vector<vector<T> >& vv){ for(const auto& v : vv){ view(v); } }


int main(){
  string s;
  cin >> s;
  map<char,int> mp;
  REP(i,s.size()){
    mp[s[i]]++;
    if(mp[s[i]] > 1){
      cout << "no" << endl;
      return 0;
    }
  }

  cout << "yes" << endl;
  
  return 0;
}

Measured memory_bytes: 3572
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random,resource

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()
    n %= 1000
    if n == 0:
        return 0

    return 1000 - n


print(main())




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

#define ll long long int
#define ld long double

using namespace std;

int main(){

    ll n,m;
    cin >> n >> m;
    if(n==m){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }

}


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

public class Main {	
	private static void solve(){
		//Implement solution here.
		int a = ni();
		int b = ni();
		StringBuilder sba = new StringBuilder();
		for(int i = 0; i < b; i++) {
			sba.append(a);			
		}
		StringBuilder sbb = new StringBuilder();
		for(int i = 0; i < a; i++) {
			sbb.append(b);
		}
		if(sba.toString().compareTo(sbb.toString()) < 0) {
			System.out.println(sba.toString());
		} else {
			System.out.println(sbb.toString());
		}
	}

	//Switch input source (stdin/file)
	private static BufferedReader br;
	public static void main(String[] args){
		br = new BufferedReader(new InputStreamReader(System.in));
		String debugDataPath = System.getenv("DD_PATH");        
		if(debugDataPath != null){
			try{
				br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(debugDataPath))));
			}catch(Exception e){
				throw new RuntimeException(e);
			}
		}
		solve();
	}

	//Input read utility
	private static StringTokenizer tokenizer = null;
	public static String next() {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			try {
				tokenizer = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
	//Get next single int
	private static int ni() {
		return Integer.parseInt(next());
	}
	//Get next single long
	private static long nl() {
		return Long.parseLong(next());
	}
	//Get next single double
	private static double nd() {
		return Double.parseDouble(next());
	}
	//Get next int array from one line
	private static int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
	//Get next char array from one line
	private static char[] ns() {
		return next().toCharArray();
	}
	//Get next long array from one line
	private static long[] nal(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++)
			a[i] = nl();
		return a;
	}
}


Measured memory_bytes: 21204
#include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <cstring>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int MOD = 1000000007;

int main() {
  int A[3]; cin >> A[0] >> A[1] >> A[2];
  sort(A, A+3);

  int result = A[2]-A[0];
  cout << result << endl;
  return 0;
}

Measured memory_bytes: 256
S = gets.chomp.split("")
$debug = false

### DFS: Depth-First Search = 深さ優先探索
# スタックによる実装
def iterative_dfs(patterns, limit)
  # スタックとなる配列を用意し、初期状態である空文字列を格納する
  stack = [""]
  until stack.empty?
    # スタックから1つ取り出す（末尾から取り出すのでpopを使う）
    string = stack.pop

    if string.length == limit
      # 頂点に達した際、文字列を配列に格納する
      patterns << string.split("").to_a.unshift(nil) unless string.empty?
    else
      # 分岐処理
      stack << string + " "
      stack << string + "+"
    end
  end
end

patterns = [] # 結果を格納する配列を用意しておく
iterative_dfs(patterns, S.size - 1)
p patterns if $debug # 組み合わせの表示

answer = 0
patterns.each do |pattern|
  expression = S[0]
  (1...S.length).each do |i|
    expression += "+" if pattern[i] == "+"
    expression += S[i]
  end
  p expression if $debug
  p eval expression if $debug
  answer += eval expression
end

# 入力が1桁の場合の考慮を忘れていた……。
if S.size == 1
  answer = S[0].to_i
end

puts answer


Measured memory_bytes: 2428
#include <iostream>
#include <vector>
#include <algorithm>
#include <ctime>
#include <cmath>
#include <string>
#include <stdlib.h>
#include <fstream>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <iterator>
#include <iomanip>
using namespace std;


int main() {
  long long n, k;
  cin >> n >> k;
  const long long mod = 1e9 + 7;
  long long ans = 0;
  for(long long i = k; i <= n + 1; ++i){
    long long mn = ((i - 1) * i  / 2);
    long long mx = ((2 * n - i + 1) * i / 2);
    ans += (mx - mn + 1) % mod;
    ans %= mod;
  }
  cout << ans % mod;
}

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

#define ll long long
#define Fi first
#define Se second
#define Pb push_back
#define vi vector<int>
#define vvi vector<vector<int>>
#define vvp vector<vector<pair<int,int>>>

const int INF = 1e9;
const int MOD = 1e9+7;

#define all(v) v.begin(),v.end()
#define output_s(a) printf("%s\n",(a).c_str())

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define Rep(i,n,m) for(int i=(int)(n);i<(int)(m);i++)
#define RepS(i,n,m) for(int i=(int)(n);i<=(int)(m);i++)
#define RRepS(i,n,m) for(int i=(int)(n);i>=(int)(m);i--)
#define RepA(x) for(auto &item:(x))

void CINT(){}
template <class Head,class... Tail>
void CINT(Head&& head,Tail&&... tail){
    cin>>head;
    CINT(move(tail)...);
}    
#define CIN(...) int __VA_ARGS__;CINT(__VA_ARGS__)
#define LCIN(...) ll __VA_ARGS__;CINT(__VA_ARGS__)
#define SCIN(...) string __VA_ARGS__;CINT(__VA_ARGS__)

template<typename TypeInt> //最大公約数
TypeInt GCD(TypeInt a,TypeInt b){
    if(a%b==0) return b;
    else return GCD(b,a%b);
}
template<typename TypeInt> //最小公倍数
TypeInt LCM(TypeInt a,TypeInt b){
    return a*b/GCD(a,b);
}

//library----------------------------------------------


int main(){
    CIN(N,k);
    int h;
    int ans=0;
    int m=N+1/2;
    rep(i,m){
        scanf("%d",&h);
        if(h>=k)ans++;
    }
    Rep(i,m,N){
        scanf("%d",&h);
        if(h>=k)ans++;
    }
    printf("%d\n",ans);

    return 0;
}

Measured memory_bytes: 256