akhauriyash/Code-Regression huggingface dataset:
#ifdef _DEBUG
#include "MyLib.h"
#else
#define main_C main
#include "bits/stdc++.h"
#include <regex>
#define _USE_MATH_DEFINES
#include <math.h>
#define FOR(i,s,e) for (int i = int(s); i < int(e); ++i)
#define REP(i,e) FOR(i,0,e)
#define INF (INT_MAX/2)
#define EPS (1.0e-8)
#define LINF (LLONG_MAX/2)
const int MGN = 8;
const int ARY_SZ_MAX = 10000000;
using namespace std;
using ll = long long; using ull = unsigned long long;
using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>;
using vb = vector<bool>; using vvb = vector<vb>; using vvvb = vector<vvb>;
using vl = vector<ll>; using vvl = vector<vl>;
using vd = vector<double>; using vs = vector<string>;
using pii = pair<int, int>; using pll = pair<ll, ll>;
using psi = pair<string, int>;
// functions

#endif


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

    int N; cin >> N;
    vi D(N); REP(i, N) cin >> D[i];

    if (N%2==1) {
        cout << 0 << endl;
        return 0;
    }

    sort(D.begin(), D.end());

    int b = D[N / 2 - 1];
    int r = D[N / 2];

    int ans = r - b;
    cout << ans << endl;

    return 0;
}

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

int main() {
    int h,w;
    cin >> h >> w;
    vector<vector<char>> a(h, vector<char>(w, 0));
    for(int i = 0; i < h; i++) {
        for(int j = 0; j < w; j++) {
            cin >> a.at(i).at(j);
        }
    }

    vector<bool> t(h,true),y(w,true);

    for(int i = 0; i < w; i++) {
        bool p=true;
        for(int j = 0; j < h; j++) {
            if(a.at(j).at(i)=='#'){
                p=false;
            }
        }
        if(p==true){
            y[i]=false;
        }
    }

    vector<char> q(w,'.');
    for(int i = 0; i < h; i++) {
        if(a[i]==q){
            t[i]=false;
        }
    }

    for(int i = 0; i < h; i++) {
        bool l=false;
        for(int j = 0; j < w; j++) {
            if(t[i]==true && y[j]==true){
                cout << a.at(i).at(j);
                l=true;
            }
        }
        if(l==true){
            cout << endl;
        }
    }



    return 0;
}

Measured memory_bytes: 3600
#include<iostream>
#include<stdio.h>
#include<vector>
#include<algorithm>
#include<set>
#include<string>
#include<map>
#include<string.h>
#include<complex>
#include<math.h>
#include<queue>
#include <functional>
#include<time.h>
#include <stack>
#include<iomanip>
using namespace std;
#define rep(i,a,n) for(int i=(a);i<(n);i++)
#define ll long long
#define llint long long int
#define sort(s) sort(s.begin(),s.end())
#define reverse(v)  reverse(v.begin(), v.end());
#define Yes(ans) if(ans)cout<<"Yes"<<endl; else cout<<"No"<<endl;
#define YES(ans) if(ans)cout<<"YES"<<endl; else cout<<"NO"<<endl;
#define hei(a) vector<a>
#define whei(a) vector<vector<a>>
#define UF  UnionFind
#define rt (a); return (a); 
#define Pint pair<int,int>
#define keta(a)  fixed << setprecision(a)
constexpr auto INF = 1000000000;
constexpr auto mod = 1000000007;
//辞書順はnext_permutation( begin( v ), end( v ) );やで！
llint gcd(llint a, llint b) {
	if (b > a)swap(a, b);
	if (a % b == 0)return b;
	return gcd(b, a % b);
}


int main() {
	int n;
	cin >> n;
	hei(llint) t(n);
	rep(i, 0, n)cin >> t[i];
	llint GCD = t[0];
	rep(i, 1, n) {
		GCD = GCD*(t[i]/gcd(GCD, t[i]));
	}
	cout << GCD << endl;
	return 0;

}


Measured memory_bytes: 256
import java.lang.Long.highestOneBit
import java.util.*

fun main() {
  val n = readLine()!!.toInt()
  val a = readLine()!!.split(' ').map { it.toLong() }
  check(a.size == n)
  println(solve(a))
}

private fun solve(a: List<Long>): Long {
  val xor = a.drop(2).fold(0L, Long::xor)
  val sum = a[0] + a[1]
  if (xor % 2 != sum % 2) return -1
  val and = (sum - xor) / 2
  if (and and xor != 0L) return -1
  if (and > a[0]) return -1
  var res = and
  var bit = highestOneBit(xor)
  while (bit > 0) {
    if (res + bit <= a[0]) res += bit
    bit = highestOneBit(xor and (bit - 1))
  }
  return if (res > 0) a[0] - res else -1
}

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


// type {{{
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using P = pair<int,int>;
using vi = vector<int>;
using vll = vector<ll>;
using vvi = vector<vector<int>>;
using vvll = vector<vector<ll>>;
// }}}


// macro {{{
#define rep(i,n) for (ll i=0, i##_len=(n); i<i##_len; ++i)
#define reps(i,n) for (ll i=1, i##_len=(n); i<=i##_len; ++i)

#define SZ(x) ((ll)(x).size())

#define all(x) begin(x),end(x)
// }}}


// Debug {{{
#define dump(x) cerr<<#x<<" = "<<(x)<<endl
#define debug(x) cerr<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<< endl;

template<typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
    os << "[";
    rep (i, SZ(v)) {
        if (i) os << ", ";
        os << v[i];
    }
    return os << "]";
}

template<typename T, typename U>
ostream& operator<<(ostream& os, const pair<T, U>& p) {
    return os << "(" << p.first << " " << p.second << ")";
}
// }}}


// chmax, chmin {{{
template<class T>
bool chmax(T& a, const T& b) {
    if (a < b) { a = b; return true; }
    return false;
}
template<class T>
bool chmin(T& a, const T& b) {
    if (b < a) { a = b; return true; }
    return false;
}
// }}}



// constants {{{
#define inf(T) numeric_limits<T>::max()

const ll MOD = 1e9+7;
const ld EPS = 1e-9;
// }}}


int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    for (;;) {
        int N; cin >> N;
        if (N == 0) break;
        vector<map<int,bool>> p(N);
        rep (i, N) {
            int M; cin >> M;
            rep (_, M) {
                int tmp; cin >> tmp;
                p[i][tmp] = true;
            }
        }
        int K; cin >> K;
        vi l(K);
        rep (i, K) cin >> l[i];

        vi suspects;
        rep (i, N) {
            bool able = 1;
            rep (j, K) {
                if (p[i].count(l[j]) == 0) {
                    able = 0;
                }
            }
            if (able) suspects.push_back(i);
        }
        if (SZ(suspects) == 1) {
            cout << suspects[0] + 1 << endl;
        } else {
            cout << -1 << endl;
        }
    }

    return 0;
}



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

int main(){
  int  a;
  int  b;
  int  y;
  cin >> a >> b;
  y=(a+b)/2;
  
  if((a+b)%2==0){
    cout << y;
  }

  else{
    cout << y+1;
  }

}

  
  
  

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <stack>
#include <queue>
#include <functional>
#include <math.h>
#include <stdlib.h>
#include <map>
#include <deque>
#include <list>
#include <sys/timeb.h>
#include <fstream>
#include <set>

using namespace std;

#define repr(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repr(i,0,n)
#define reprrev(i,a,b) for(int i=(int)(b)-1;i>=(int)(a);i--)
#define reprev(i,n) reprrev(i,0,n)
#define repi(itr,ds) for(auto itr=ds.begin();itr!=ds.end();itr++)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define mp make_pair
#define mt make_tuple
#define INF 1050000000
#define INFL 1100000000000000000LL
#define EPS (1e-10)
#define MOD 1000000007
#define PI 3.1415926536
#define RMAX 4294967295

typedef long long ll;
typedef pair<int, int> Pi;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<Pi> vPi;
typedef vector<vector<int> > vvi;
typedef vector<vector<bool> > vvb;
typedef vector<vector<ll> > vvll;
typedef vector<vector<char> > vvc;
typedef vector<vector<string> > vvs;
typedef vector<vector<double> > vvd;
typedef vector<vector<Pi> > vvPi;
typedef priority_queue<int, vector<int>, greater<int> > pqli;
typedef priority_queue<ll, vector<ll>, greater<ll> > pqlll;
typedef priority_queue<Pi, vector<Pi>, greater<Pi> > pqlP;
struct Edge {
	int from, to, cost;
	bool operator<(Edge e) {
		return cost < e.cost;
	}
};
typedef vector<Edge> Edges;
typedef vector<Edges> Graph;
template <class T>
using vec = vector<T>;
template<class T>
using pql = priority_queue<T, vector<T>, greater<T>>;
string debug_show(Pi a) {
	return "(" + to_string(a.first) + "," + to_string(a.second) + ")";
}

template<class T>
struct augEdge {
	T from, to;
	int cost;
	bool operator<(augEdge e) { return cost < e.cost; }
	bool operator>(augEdge e) { return cost > e.cost; }
};
template<class T>
using augGraph = vector<augEdge<T>>;


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

	int a, b;
	cin >> a >> b;
	if (a <= 8 && b <= 8) {
		cout << "Yay!" << endl;
	}
	else {
		cout << ":(" << endl;
	}

	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define int long long
using namespace std;
typedef pair<int, int> P;
const int mod = 1000000007;
const int INF = 1e18;

signed main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n, m;
    cin >> n >> m;
    vector<int> a(n), b(n);
    vector<P> d(n);
    rep(i, 0, n){
        cin >> a[i] >> b[i];
        d[i] = {a[i], b[i]};
    }
    sort(d.begin(), d.end());
    int ans = 0;
    rep(i, 0, n){
        if(m == 0) break;
        int tmp = min(m, d[i].second);
        m -= tmp;
        ans += tmp * d[i].first;
    }
    cout << ans << endl;
}

Measured memory_bytes: 3456
import java.util.*;

class Main {
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);
	int a = sc.nextInt();
	int b = sc.nextInt();
	if((a * b) % 2 == 0)
	    System.out.println("Even");
	else 
	    System.out.println("Odd");
    }
}


Measured memory_bytes: 21844
import java.util.*;

public class Main {
    private static class R {
        public String s;
        public int n;
        public R(String s, int n) { this.s = s; this.n = n; }
    }
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        sc.nextLine();
        Map<String, Integer> mp = new HashMap<>();
        for (int i = 0; i < n; ++i) {
            String s = sc.nextLine();
            if (!mp.containsKey(s)) mp.put(s, 0);
            mp.put(s, mp.get(s) + 1);
        }
        List<R> l = new ArrayList<>(mp.size());
        for (Map.Entry<String, Integer> e : mp.entrySet()) {
            l.add(new R(e.getKey(), e.getValue()));
        }
        Collections.sort(l, (a, b) -> {
            int cmp = b.n - a.n;
            return cmp != 0 ? cmp : (a.s.compareTo(b.s));
        });
        int v = l.get(0).n;
        int p = 0;
        while (p < l.size() && l.get(p).n == v) {
            System.out.println(l.get(p).s);
            p++;
        }
    }
}


Measured memory_bytes: 180588
n = int(input())
a = list(map(int, input().split()))
q = int(input())
m = list(map(int, input().split()))

result = []
# 
for bit in range(1<<n):
    score = 0
    # 
    for i in range((n)):
        # 
        if bit & (1<<i):
            score += a[i]

    result.append(score)

for m_i in m:
    if m_i in result:
        print('yes')
    else :
        print('no')


Measured memory_bytes: 43076
def cal(arr):
    tmp = 0
    for a, b, c, d in cond:
        if arr[b-1] - arr[a-1] == c:
            tmp += d
    return tmp

def dfs(arr):
    global res
    if len(arr) == N:
        res = max(res, cal(arr))
        return
    beg = 1 if len(arr) == 0 else arr[-1]
    for i in range(beg, M+1):
        dfs(arr + [i])

N, M, Q = list(map(int, input().split()))
cond = []
res = 0
for _ in range(Q):
    tmp = list(map(int, input().split()))
    cond.append(tmp)
dfs([])
print(res)

Measured memory_bytes: 73476
#include<stdio.h>
 int main()
{
  int A,B,C,D,sum1,sum2;
  while(scanf("%d %d %d %d",&A,&B,&C,&D)!=EOF){
  sum1=A*B;
  sum2=C*D;
  if(sum1>=sum2) printf("%d\n",sum1);
  else printf("%d\n",sum2);
}
return 0; 
}

Measured memory_bytes: 128
n,y = map(int, input().split())
for i in range(n+1):
    for j in range(n-i+1):
        if 10000*i + 5000*j + (n-i-j)*1000 == y:
            print(i, j, n-i-j)
            exit()
print(-1, -1, -1)


Measured memory_bytes: 2940
#include <iostream>
#include <cmath>
#include <algorithm>
#include <bitset>
#include <iomanip>
#include <cstdio>

using namespace std;

int main() {
	double pai = 3.141592653589793;

	int64_t r;
	cin >> r;

	cout << r * 2 * pai << endl;
	return 0;
}

Measured memory_bytes: 3780
#include <cstdio>
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <sstream>
#include <queue>
#include <iomanip>
#include <algorithm>
using namespace std;

const int Maxn = 300005;

int k, n;
int arr[Maxn];

int main()
{
	scanf("%d %d", &k, &n);
	if (k % 2 == 0) {
		printf("%d", k / 2);
		for (int i = 2; i <= n; i++)
			printf(" %d", k);
		printf("\n");
	} else {
		int x = (k + 1) / 2;
		for (int i = 0; i < n; i++)
			arr[i] = x;
		int cum = 0;
		for (int i = n - 1; i >= 0; i--)
			if (i % 2) cum++;
		int lst = n - 1;
		while (cum--) {
			while (arr[lst] == 0) lst--;
			if (arr[lst] == 1) arr[lst]--;
			else {
				arr[lst]--;
				for (int i = lst + 1; i < n; i++)
					arr[i] = k;
				lst = n - 1;
			}
		}
		vector <int> seq;
		for (int i = 0; i < n; i++)
			if (arr[i] != 0) seq.push_back(arr[i]);
		for (int i = 0; i < seq.size(); i++)
			printf("%d%c", seq[i], i + 1 < seq.size()? ' ': '\n');
	}
	return 0;
}

Measured memory_bytes: 4720
//in dp prefix suffix sum helps..
#include<iostream>
#include<vector>
#include<string.h>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<stack>
#include <iterator>
#include <map>
#include<list>
#include <fstream>
#include<unordered_map>
#include<set>
#include<queue>
#define int  long long
#define double long double
#define pb   push_back
#define mp   make_pair
#define pii  pair<int,int>
#define pip pair<int, pair<int, int> >
#define viv vector<vector<int> >
#define vip vector< pair<int, int> >
#define vi vector<int>
#define mii  map<int, int>
#define li list<int>
#define qu deque<int>
#define vd vector<double>
#define set set<int>
#define stack stack<int>
#define fi first
#define se second
#define mem(x, y) memset(x, y, sizeof(x))
#define ps(x,y) fixed<<setprecision(y)<<x
using namespace std;
// author :: Anurag Anand.
using namespace std;
int z= 1000000007;
//int z= 998244353;
int gcd(int a, int b){
    if(a==0)return b;
    if(b==0)return a;
    return gcd(b, a%b);
}
int power(int a,int b)
{
	int res=1;
	while(b)
	{
		if(b&1)
		{
			res=(res*a)%z;
			b--;
		}
		else
		{
			a=(a*a)%z;
			b=b>>1;
		}
	}
	return res;
}
int32_t main()
{
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);
    cout.tie(NULL);
	int t;
	t=1;
	//cin>>t;
	while(t--){
		int k;
		cin>>k;
		string s;
		s="ACL";
		while(k--) cout<<s;
		cout<<"\n";
	}
}

Measured memory_bytes: 3616
#include "bits/stdc++.h"
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << "\n"; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
// debug() << imie(x) imie(y)
//debugging ends


int solve(){
    string s;
    cin>>s;
    int lres=0,res=0;
    for (int i = 0; i < s.length(); i++)
    {
      if(s[i]=='R') lres++;
      else lres=0;
      res=max(res,lres);
    }
    cout<<res;
    return 0;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cerr<<fixed<<setprecision(10);
  auto start = chrono::high_resolution_clock::now();
  int t=1;
  //cin>>t;
  while(t--)
    solve(),cout<<"\n";

  auto stop = chrono::high_resolution_clock::now(); 
  auto duration = chrono::duration_cast<chrono::nanoseconds>(stop - start); 
  cerr << "Time taken : " << ((long double)duration.count())/((long double) 1e9) <<"s \n";      
  
  return 0;
}


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

using namespace std;

#define pb push_back
#define ff first
#define ss second
#define sz(x) (int)x.size()
#define all(x) (x).begin(),(x).end()
#define F(i,x,n,y) for(i=x;i<n;i+=y)
#define fi(i,x,n) for(i=x;i<n;++i)
#define f(n) for(int i=0;i<n;++i)
#define fr(i,x,n) for(i=x;i>=n;--i)
#define endl '\n'

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    set<string> s;
    s.insert("abc");
    s.insert("acb");
    s.insert("bac");
    s.insert("bca");
    s.insert("cab");
    s.insert("cba");
    string tm;
    cin>>tm;
    if(s.find(tm)!=s.end()){
        cout<<"Yes";
    }else cout<<"No";
    cout<<endl;
    return 0;
}



Measured memory_bytes: 256
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  int A,B;
  cin>> A >> B ;
  if(A+B<10){
    cout<<A+B<<endl;
  }
  else cout<<"error"<<endl;
}
    

   
  
   
 

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
#define MAX 10000005
#define MOD 1000000007
#define endl "\n"

lli divs[MAX];
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	divs[0] = 1;
	divs[1] = 1;
	for(lli i = 2; i<10000005; i++){
		divs[i] = 2;
	}
	for(lli i = 2; i<10000005; i++){
		for(lli j = i+i; j<10000005; j+=i){
			divs[j]++;
		}
	}
	lli n;
	cin>>n;
	lli ans = 0;
	for(lli i = 1; i<=n; i++){
		ans += i*divs[i];
	}
	cout<<ans<<endl;
}

Measured memory_bytes: 81716
package main

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

const (
	initialBufSize = 1e4
	maxBufSize     = 1e6 + 7
)

var buf []byte = make([]byte, maxBufSize)
var sc = bufio.NewScanner(os.Stdin)

func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(buf, maxBufSize)
}

// 解説を参考にした

func main() {
	N := nextInt()
	var ans int
	for i := 1; i <= N; i++ {
		j := N / i
		ans += j * (j + 1) / 2 * i
	}
	fmt.Println(ans)
}

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func abs(a int) int {
	if a > 0 {
		return a
	} else {
		return -a
	}
}

func pow(p, q int) int {
	res := p
	if q == 0 {
		return 1
	}
	for i := 0; i < q-1; i++ {
		res *= p
	}
	return res
}

func MinOf(vars ...int) int {
	min := vars[0]
	for _, i := range vars {
		if min > i {
			min = i
		}
	}
	return min
}

func MaxOf(vars ...int) int {
	max := vars[0]
	for _, i := range vars {
		if max < i {
			max = i
		}
	}
	return max
}

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

func lcmof2numbers(a int, b int) int {
	return a / gcdof2numbers(a, b) * b
}

// マイナスの場合は考慮していない
func fuctorial(a int) int {
	if a == 1 || a == 0 {
		return 1
	} else {
		return fuctorial(a-1) * a
	}
}

func NextPermutation(x sort.Interface) bool {
	n := x.Len() - 1
	if n < 1 {
		return false
	}
	j := n - 1
	for ; !x.Less(j, j+1); j-- {
		if j == 0 {
			return false
		}
	}
	l := n
	for !x.Less(j, l) {
		l--
	}
	x.Swap(j, l)
	for k, l := j+1, n; k < l; {
		x.Swap(k, l)
		k++
		l--
	}
	return true
}

// 素因数分解したmapを返す
func primeFuctorize(n int) map[int]int {
	pf := map[int]int{}
	for i := 2; i*i <= n; i++ {
		for n%i == 0 {
			pf[i]++
			n /= i
		}
	}
	if n != 1 {
		pf[n]++
	}
	return pf
}


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

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

	if (s.size() % 2 == 0) s = s.substr(0, s.size() - 2);
	else s = s.substr(0, s.size() - 1);

	while (true) {
		if (s.substr(0, s.size() / 2) == s.substr(s.size() / 2, s.size() / 2)) {
			cout << s.size() << endl;
			return 0;
		}
		s = s.substr(0, s.size() - 2);
	}
	return 0;
}

Measured memory_bytes: 256
fun main(args: Array<String>) {
    val (n, x, y) = readLine()!!.split(" ").map { it.toInt() }

    val results = Array(n) { 0 }
    (1 until n).forEach { i ->
        (i + 1..n).forEach { j ->
            val d1 = j - i
            val d2 = Math.abs(i - x) + Math.abs(j - y) + 1
            val d = Math.min(d1, d2)
            results[d] = results[d] + 1
        }
    }

    (1 until n).forEach { println(results[it]) }
}


Measured memory_bytes: 43256
"use strict"

function initBuilding(bMax, fMax, rMax) {
	var o = Array(bMax);
	for (var b = 0; b < bMax; b++) {
		o[b] = Array(fMax);
		for (var f = 0; f < fMax; f++) {
			o[b][f] = Array(rMax);
			for (var r = 0; r < rMax; r++) {
				o[b][f][r] = 0;
			}
		}
	}
	return o;
}

function toString(o) {
	return o.map(function(b) {
		return b.map(function(f) {
			return ' ' + f.join(' ');
		}).join('\n');
	}).join('\n####################\n');
}

const input = require('fs').readFileSync('/dev/stdin','utf8');
var lines = input.trim().split('\n');
var o = initBuilding(4, 3, 10);
lines.shift();
lines.forEach(function(line) {
	var bfrv = line.split(' ').map(Number);
	var b = bfrv[0], f = bfrv[1], r = bfrv[2], v = bfrv[3];
	o[b-1][f-1][r-1] += v;
});

console.log(toString(o));


Measured memory_bytes: 16144
#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a,b,c;
    cin >> a;
    cin >> b;
    cin >> c;
    if(a<b&&b<c){
        cout << "Yes" <<endl;
    }
    else{
        cout << "No" <<endl;
}
}



Measured memory_bytes: 3096
#include <bits/stdc++.h>
using namespace std;
#define PII pair<int, int>
#define PLL pair<LL, LL>
#define VI vector<int>
#define VPII vector<PII>
#define LL long long
#define LD long double
#define f first
#define s second
#define MP make_pair
#define PB push_back
#define pb pop_back
#define ALL(c) (c).begin(), (c).end()
#define SIZ(c) (int)(c).size()
#define REP(i, n) for(int i = 0; i < (int)(n); ++i)
#define FOR(i, b, e) for(int i = (b); i <= (int)(e); ++i)
#define FORD(i, b, e) for(int i = (b); i >= (int)(e); --i)

#define Sim template<class n
Sim, class s> ostream & operator << (ostream &p, pair<n, s> x)
{return p << "<" << x.f << ", " << x.s << ">";}
Sim> auto operator << (ostream &p, n y) -> 
typename enable_if<!is_same<n, string>::value, decltype(y.begin(), p)>::type 
{int o = 0; p << "{"; for(auto c: y) {if(o++) p << ", "; p << c;} return p << "}";}
void dor() {cerr << endl;}
Sim, class...s> void dor(n p, s...y) {cerr << p << " "; dor(y...);}
Sim, class s> void mini(n &p, s y) {if(p>y) p = y;}
Sim, class s> void maxi(n &p, s y) {if(p<y) p = y;}
#ifdef DEB
#define debug(...) dor(__FUNCTION__, ":", __LINE__, ": ", __VA_ARGS__)
#else
#define debug(...)
#endif 

#define I(x) #x " = ", (x), " "
#define A(a, i) #a "[" #i " = ", i, "] = ", a[i], " "
const int M = 1024 * 128;

int n, m;
int in[M], vis[M];
VI G[M];

bool DFS(int v, int w)
{
	if (v == w)
	{
		return true;
	}
	if (vis[v])
	{
		return false;
	}
	vis[v] = 1;
	
	for (auto x : G[v])
	{
		if (DFS(x, w))
		{
			return true;
		}
	}
	return false;
}

int main()
{
	//ios_base::sync_with_stdio(0);
	//cin.tie(NULL);
	scanf("%d%d", &n, &m);
	FOR(i, 1, m)
	{
		int a, b;
		scanf("%d%d", &a, &b);
		in[a]++;
		in[b]++;
		G[a].PB(b);
		G[b].PB(a);
	}
	int ile = 0;
	vector<int> V;
	FOR(i, 1, n)
	{
		if (in[i] % 2)
		{
			ile = -1e9;
		}
		else
		{
			ile += in[i] / 2 - 1;
			if (in[i] > 2)
			{
				V.PB(i);
			}
		}
	}
	debug(SIZ(V), ile, V);
	if (SIZ(V) == 2 && ile == 2)
	{
		bool boo = false;
		vis[V[0]] = 1;
		for (auto x : G[V[0]])
		{
			if (!vis[x] && !DFS(x, V[1]))
			{
				debug(V[0], x, V[1]);
				boo = true;
			}
		}
		if (boo)
		{
			printf("Yes\n");
		}
		else
		{
			printf("No\n");
		}
		return 0;
	}
	if (ile >= 2)
	{
		printf("Yes\n");
	}
	else
	{
		printf("No\n");
	}
	return 0;
}


Measured memory_bytes: 8192
//
/*==========================================================*/
/*    Template ver 2017-0720    |    Created by JollyBee    */
/* DOMINUS pascit me, et nihil mihi deerit (Psalmorum 23:1) */
/*==========================================================*/
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<pii> vii;
const double EPS=(double)1e-9;
const double PI=(double)acos(-1.0);
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define pob pop_back
#define pf push_front
#define pof pop_front
#define FOR(i,n) for(int i=0;i<n;i++)
#define REPP(i,l,r,c) for(int i=l;i<=r;i+=c)
#define REP(i,l,r) REPP(i,l,r,1)
#define FORD(i,n) for(int i=n-1;i>=0;i--)
#define REVV(i,l,r,c) for(int i=l;i>=r;i-=c)
#define REV(i,l,r) REVV(i,l,r,1)
//random
int irand(int lo, int hi){
    return (((double)rand())/(RAND_MAX+1.0)) * (hi-lo+1) + lo;
}
//ll to string
string toString(ll x) {
    stringstream ss;
    ss << x;
    return ss.str();
}
//string to ll
ll toNumber(string S) {
    ll ret;
    sscanf(S.c_str(),"%lld",&ret);
    return ret;
}
// std::fill(start, end, value);
// for(auto it: DS){}

const int INF=(int)2e9;
const ll MOD=(ll)1e9+7;
/*==========================================================*/
/*                     END OF TEMPLATE                      */
/* DOMINUS pascit me, et nihil mihi deerit (Psalmorum 23:1) */
/*==========================================================*/

int dislike[15];

int is_like(int n){
    for(; n != 0; n/=10) {
        if(dislike[n%10]) return 0;
    }
    return 1;
}

int main(){
    // reset
    FOR(i,13) dislike[i] = 0;
    // input
    int n,k; scanf("%d %d", &n, &k);
    REP(i,1,k){
        int a; scanf("%d", &a);
        dislike[a] = 1;
    }
    for(; !is_like(n); n++);
    printf("%d\n", n);
    return 0;
}


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

long long sum = 0;

int main() {
    string s; cin >> s;
    int ss = s.size();
    long long sum = 0;
    for (long long bit = 0; bit < (1 << ss-1); ++bit) {
        long long num = s[ss-1] - '0';
        long long t = 10;
        for (int i = 2; i <= ss; ++i) {
            if (bit & (1 << i-2)) {
                num += s[ss-i] - '0';
                t = 10;
            }
            else {
                num += (s[ss-i] - '0') * t;
                t *= 10;
            }
        }
        sum += num;
    }
    cout << sum << endl;
}

Measured memory_bytes: 256
from collections import defaultdict

N = int(input())
As = map(int, input().split())

counts = defaultdict(int)
for a in As:
    counts[a] += 1

total = 0
for n, c in counts.items():
    if n < c:
        total += c - n
    elif n > c:
        total += c

print(total)

Measured memory_bytes: 23660
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools
import itertools
import math
import sys

INF = float('inf')


def solve(C: str):
    return chr(ord(C)+1)


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    C = next(tokens)  # type: str
    print(f'{solve(C)}')


if __name__ == '__main__':
    main()


Measured memory_bytes: 75360
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define PI 3.14159265358979323846264338327950L
#define MOD 1000000007
#define sz 100005
ll inf = 1e9;
ll power(ll x, ll n, ll mod)
{
  ll res = 1;
  x %= mod;
  while (n)
  {
    if (n & 1)
      res = (res * x) % mod;
    x = (x * x) % mod;
    n >>= 1;
  }
  return res;
}
ll dir[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
int main()
{
 
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  #ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  #endif
  ll n;
  cin>>n;
  ll a[n];
  ll c=0;
  for(ll i=0;i<n;i++)
    cin>>a[i];
  for(ll i=0;i<n;i++)
  {
    if((i+1)%2!=0 && a[i]%2!=0)
      c++;
  }
  cout<<c;
  return 0;
}


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

int main() {
  int N;
  cin >> N;
  
  int a;
  vector<int> A;
  A.reserve(N);
  for (int i = 0; i < N; i++) {
    cin >> a;
	A.emplace_back(a);
  }
  sort(A.begin(), A.end(), greater<int>());
  
  int sum = 0;
  for (int i = 0; i < N; i++) {
    if(i % 2 == 0) {
      sum += A[i];
    } else {
      sum -= A[i];
    }
    //cerr << A[i] << ' ' << sum << endl;
  }
  
  cout << sum << endl;
    
  return 0;
}


Measured memory_bytes: 256
N = int(input())
max_count = 0
ans = 1
for i in range(1,N+1):
    count = 0
    num = i
    while(1):
        if(num%2 == 0):
            num = int(num/2)
            count += 1
        else:
            break
    if(count > max_count):
        max_count = count
        ans = i
print(ans)

Measured memory_bytes: 3060
def ABC121B():
    N, M, C = map(int, input().split())
    B = list(map(int, input().split()))
    A = [list(map(int, input().split())) for _ in range(N)]
    ans = 0
    for L in A:
        s = 0
        for a, b in zip(L, B):
            s += a * b
        if s + C > 0:ans += 1
    print(ans)

ABC121B()


Measured memory_bytes: 3060
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rectangle
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');

            int num1 = int.Parse(input[0]);
            int num2 = int.Parse(input[1]);

            Console.WriteLine(num1 * num2 + " " + (num1 + num2) * 2);
        }
    }
}



Measured memory_bytes: 15828
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    string s;
    cin>>s;
    int num=0;
    string pre="";
    for (int i=0;i<n;i++)
    {
        if (s[i]==')')
        {
            if (num)num--;
            else
                pre='('+pre;
        }
        else
            num++;
    }
    string suf="";
    s=pre+s;
    while(num)
        s+=')',num--;
    cout<<s<<endl;
}


Measured memory_bytes: 256
#pragma GCC optimize("Ofast")
// #pragma GCC target("avx,avx2,fma") 
 
#include<bits/stdc++.h>
 
#define CFOR(i, str) for(int i = 0; (str)[i]!='\0'; (i)++)
#define FOR(i, s, r) for(int i = (s); i < (r); i++)
#define INF 1e9
#define NINF -1e9
#define SUM(a) accumulate(a.begin(), a.end(), 0)
#define vsort(v) sort(v.begin(), v.end())
#define rvsort(v) sort(v.rbegin(), v.rend())
#define vmax(v) *max_element(v.begin(), v.end())
#define vmin(v) *min_element(v.begin(), v.end())
#define cnt(v, n) count(v.begin(), v.end(), (n))
#define vi vector<int>
#define vvi vector<vi>
#define vvvi vector<vvi>
#define vpii vector<pair<int, int>>
#define vpic vector<pair<int, char>>
#define mp make_pair
#define rot(s, k) rotate(s.begin(), s.begin()+ s.size()-(k%s.size()), s.end()); //+ve = right, -ve = left
#define lld long long int
#define ulld unsigned long long int
typedef long long ll;
using namespace std;
 
ll binpow(ll a, ll b) { 
ll res = 1; while (b > 0) { if (b & 1) res = res * a; a = a * a; b >>= 1; } return res;
}
 
ll lcm(ll a, ll b) { return a / __gcd(a, b) * b; }
 
bool isPrime(ll n) { 
    if (n <= 1) return false; 
    if (n <= 3) return true; 
    if (n % 2 == 0 || n % 3 == 0) return false; 
    for (ll i = 5; i * i <= n; i = i + 6) if (n % i == 0 || n % (i + 2) == 0) return false; 
    return true; 
}
void solve(){
    char c;
    cin>>c;
   if(c>='A'&&c<='Z')
   cout<<"A\n";
   else
   {
       cout<<"a\n";
   }
   
}
int main(){
   ios::sync_with_stdio(0);
   cin.tie(0);
   ll t;
   t=1;
   while(t--)
   { 
   solve();
   }
   return 0;
}

Measured memory_bytes: 3560
n,k = map(int, input().split())
nums = [0] * n
for _ in range(k):
    d = int(input())
    A = map(int, input().split())
    for a in A:
        nums[a-1] += 1
ans = 0
for num in nums:
    if num == 0:
        ans += 1
print(ans)

Measured memory_bytes: 9072
#include <iostream>
#include <iomanip>
#include <algorithm>
using namespace std;
int main(){
    char c;
    cin >> c;
    if(c=='a' || c=='e' || c=='i' || c=='o' || c=='u')
        cout << "vowel\n";
    else
        cout << "consonant\n";
    return 0;
}

Measured memory_bytes: 256
require 'prime'
require 'set'
Q = gets.to_i
queries = Q.times.map { gets.split.map(&:to_i) }

MAX = 10 ** 5
primes = Set.new(Prime.each(MAX).to_a)

list = Array.new(MAX + 1)
count = 0
list[0] = count
(1..MAX).each do |n|
  if n.even?
    list[n] = count
    next
  end
  count += 1 if primes.include?(n) && primes.include?((n + 1) / 2)
  list[n] = count
end

queries.each do |l, r|
  puts list[r] - list[l - 1]
end


Measured memory_bytes: 11832
#include <iostream>
#include <set>

using namespace std;

long long A, B, C, D, E, F;
set<long long> W, S;
double per = 0;
long long ans, sub;

int main(){
	cin >> A >> B >> C >> D >> E >> F;

	for(int i = 0; i*(100*A) <= F; i++){
		for(int j = 0; j*(100*B) <= F; j++){
			W.insert((long long)(i*100*A+j*100*B));
		}
	}

	for(int i = 0; i*C <= F; i++){
		for(int j = 0; j*D <= F; j++){
            S.insert((long long)(i*C+j*D));
		}
	}

	for(long long w : W){
		for(long long s : S){
			if((0 < w+s && w+s <= F) && (w*E/100 >= s)){
				double res = (double)100 * (double)s / (double)(w+s);
				if (res >= per){
					ans = w+s;
					sub = s;
					per = res;
				}
			}
		}
	}
	
	cout << ans << " " << sub << endl;


	return 0;
}

Measured memory_bytes: 512
#include "bits/stdc++.h"
using namespace std;
int N;
//n??????, dep:depth, o:operator< 0:= +, 1:= *>, str "
int calc(int& n,int dep, char o,vector<string>& str) {
	int ret;
	if (o == '+') ret = 0;
	else ret = 1;
	
	for (;n < N;) {
		if (str[n].length() != dep + 1) { break; }
		if (str[n][dep] >= '0' && str[n][dep] <= '9') {
			if (o == '+') { ret += str[n][dep] - '0'; n++; }
			else { ret *= str[n][dep] - '0';n++; }
		}
		else {
			n++;
			if (o == '+') { ret += calc(n, dep + 1, str[n-1][dep], str); }
			else { ret *= calc(n, dep + 1, str[n - 1][dep], str); }
		}
	}
	return ret;
}
int main() {
	cin.tie(0); ios::sync_with_stdio(false);
	while (cin >> N, N) {
		vector<string> str(N);
		for (int i = 0; i < N;i++)cin >> str[i];
		int n = 0;
		cout << calc(n, 0, '+', str) << endl;
	}
}

Measured memory_bytes: 3220
#include<bits/stdc++.h>
#define ll long long int
#define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n)
#define MAX 10000
#define NIL -1

using namespace std;

int main() {
  int n;
  cin >> n;
  int F[50];
  F[0] = F[1] = 1;
  FOR(i, 2, n + 1) {
    F[i] = F[i - 1] + F[i - 2];
  }

  cout << F[n] << endl;

  return 0;
}

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

class Dice {
private:
    int d[7];
public:
    void set_number(int i, int num) {
        d[i] = num;
    }

    int get_number(int i) {
        return d[i];
    }

    void roll_dice(char c) {
        int buf;
        switch(c) {
            case 'N':
            buf = d[6];
            d[6] = d[5];
            d[5] = d[1];
            d[1] = d[2];
            d[2] = buf;
            break;
            case 'E':
            buf = d[6];
            d[6] = d[3];
            d[3] = d[1];
            d[1] = d[4];
            d[4] = buf;
            break;
            case 'S':
            buf = d[6];
            d[6] = d[2];
            d[2] = d[1];
            d[1] = d[5];
            d[5] = buf;
            break;
            case 'W':
            buf = d[6];
            d[6] = d[4];
            d[4] = d[1];
            d[1] = d[3];
            d[3] = buf;
        }
    }

    bool compare_direction(Dice another_dice) {
        for(int i=1;i<7;i++) {
            if(d[i] != another_dice.d[i]) return false;
        }
        return true;
    }
    
    bool compare_4times(Dice another_dice) {
        for(int i=0;i<4;i++)
        {
            another_dice.roll_dice('E');
            if(this->compare_direction(another_dice)) return true;
        }
        return false;
    }
    
    bool is_same_dice(Dice another_dice) {
        if(compare_4times(another_dice)) return true;

        another_dice.roll_dice('N');
        if(compare_4times(another_dice)) return true;

        another_dice.roll_dice('N');
        if(compare_4times(another_dice)) return true;

        another_dice.roll_dice('N');
        if(compare_4times(another_dice)) return true;

        another_dice.roll_dice('E');
        another_dice.roll_dice('N');
        if(compare_4times(another_dice)) return true;
        
        another_dice.roll_dice('N');
        another_dice.roll_dice('N');
        if(compare_4times(another_dice)) return true;        
        
        return false;
    }
};

int main()
{
    Dice dice1, dice2;
    int buf;
    for(int i=1;i<7;i++)
    {
        cin >> buf;
        dice1.set_number(i, buf);
    }

    for(int i=1;i<7;i++)
    {
        cin >> buf;
        dice2.set_number(i, buf);
    }

//    dice2.set_number(1, 6);
//    dice2.set_number(2, 2);
//    dice2.set_number(3, 4);
//    dice2.set_number(4, 3);
//    dice2.set_number(5, 5);
//    dice2.set_number(6, 1);

//    for(int i=1;i<7;i++)
//    {
//        cout << i << ": " << dice2.get_number(i) << endl;
//    }
    
    if(dice1.is_same_dice(dice2)) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }

    return 0;
}



Measured memory_bytes: 3136
#include <bits/stdc++.h>
#define MOD 1000000007
#define INF 1000000000
#define LINF 1000000000000000000
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define bit(n) (1LL<<(n))
using namespace std;

typedef pair<int, int> P;
typedef pair<long long, long long> LLP;

int main() {

    string S;
    cin >> S;

    int odd = 0;
    int even = 0;
    int now_R = -1;
    vector<int> ans(S.length(), 0);

    rep(i,S.length()) {
        swap(odd, even);
        if (S[i] == 'R') {
            odd++;
            now_R = i;
        } else {
            ans[now_R] += even;
            ans[now_R + 1] += odd;
            even = 0; odd = 0;
            if ((now_R - i) % 2 == 0) ans[now_R]++;
            else ans[now_R + 1]++;
        }
    }

    rep(i,S.length()) {
        if (i != S.length() - 1) cout << ans[i] << " ";
        else cout << ans [i] << endl;
    }
    
    return 0;
}

Measured memory_bytes: 1024
/**********************************************
 * author : deepak nayan
 * file   : e:/Solutions/atcoder/abc085_a.cpp
 * time   : Thu Apr 30 16:09:47 2020
 * quest  : A - Already 2018
 *********************************************/
#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>

using namespace std;

int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); ++i) {
    if (i == 3)
      cout << '8';
    else
      cout << s[i];
  }
  cout << "\n";
  return 0;
}


Measured memory_bytes: 256
#define  _CRT_SECURE_NO_WARNINGS
#pragma comment (linker, "/STACK:526000000")

#include "bits/stdc++.h"

using namespace std;
typedef string::const_iterator State;
#define eps 1e-11L
#define MAX_MOD 1000000007LL
#define GYAKU 500000004LL

#define MOD 998244353LL
#define seg_size 262144*2LL
#define pb push_back
#define mp make_pair
typedef long long ll;
#define REP(a,b) for(long long (a) = 0;(a) < (b);++(a))
#define ALL(x) (x).begin(),(x).end()

unsigned long xor128() {
	static unsigned long x = 123456789, y = 362436069, z = 521288629, w = time(NULL);
	unsigned long t = (x ^ (x << 11));
	x = y; y = z; z = w;
	return (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)));
}

void init() {
	iostream::sync_with_stdio(false);
	cout << fixed << setprecision(20);
}
#define int ll

void solve(){
	while (true) {
		int n;
		cin >> n;
		vector<tuple<int, int, int>> inputs;
		map<pair<int, int>, int> next;
		REP(i, n) {
			int a, b, c;
			cin >> a >> b >> c;
			next[mp(a, b)] = c;
			inputs.push_back(make_tuple(c, a, b));
		}
		sort(ALL(inputs));
		int ans = 0;
		REP(i, inputs.size()) {
			int dx[4] = { 1,-1,-1,1 };
			int dy[4] = { 1,1,-1,-1 };
			REP(t, 4) {
				int cnter = 0;
				REP(q, 2) {
					REP(j, 2) {
						int x = get<1>(inputs[i]) + q * dx[t];
						int y = get<2>(inputs[i]) + j * dy[t];
						cnter += next[mp(x, y)];
					}
				}
				ans = max(ans, cnter);
			}
		}
		cout << ans << " / 1" << endl;
		return;
	}
}

#undef int
int main() {
	init();
	solve();
}


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

#define rng(i, a, b) for (int i = int(a); i < int(b); i++)
#define rep(i, b) rng(i, 0, b)
#define gnr(i, a, b) for (int i = int(b) - 1; i >= int(a); i--)
#define per(i, b) gnr(i, 0, b)

using namespace std;

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

int main() {
  vector<vector<int>> c(3, vector<int>(3));
  rep(i, 3) {
    rep(j, 3) {
      cin >> c.at(i).at(j);
    }
  }
  bool ok = true;
  vector<int> i0 = c.at(0);
  int dif01 = i0.at(1) - i0.at(0);
  int dif02 = i0.at(2) - i0.at(0);
  for (int i = 1; i < 3; i++) {
    vector<int> ii = c.at(i);
    int tDif01 = ii.at(1) - ii.at(0);
    int tDif02 = ii.at(2) - ii.at(0);
    if (dif01 != tDif01) {
      ok = false;
      break;
    }
    if (dif02 != tDif02) {
      ok = false;
      break;
    }
  }
  cout << (ok ? "Yes" : "No") << endl;
  return 0;
}


Measured memory_bytes: 256
N = int(input())

H = list(map(int, input().split()))

for i in range(N-1):
    if H[i]>H[i+1]: H[i+1]+=1

ans = 'Yes'

for i in range(N-1):
    if H[i]>H[i+1]:
        ans = 'No'
print(ans)


Measured memory_bytes: 14396
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		
		if(N % 2 == 0) {
			System.out.println(N);
		} else {
			System.out.println(2 * N);
		}
	}
}


Measured memory_bytes: 22740
#include <stdio.h>

int main(void)
{
	int a;
	int i, j;
	int x[5];

	for (i = 0; i < 5; i++)
		scanf("%d", &x[i]);
	for (i = 0; i < 5; i++) { 
		for (j = i + 1; j < 5; j++)
			if (x[i] < x[j]) {
				a = x[i]; x[i] = x[j]; x[j] = a;
			}
		if (i > 0)
			putchar(' ');
		printf("%d", x[i]);
	}
	putchar('\n');

	return 0;
}

Measured memory_bytes: 600
//Bismillahir Rahmanir Rahim
#include <bits/stdc++.h>
using namespace std;

typedef long long              ll;
typedef long double            ld;
typedef pair<int, int>         pi;
typedef vector<int>            vi;
typedef vector<pair<int, int>> vpi;

#define pb       push_back
#define all(x)   begin(x), end(x)
#define sz(x)    (int)(x).size()
#define ff       first
#define ss       second
#define mp       make_pair
#define lb       lower_bound
#define ub       upper_bound
#define tcase()  int t; cin >> t; while(t--)

const int MOD = 1e9 + 7; // 998244353;
const int MX  = 2e5 + 5;
const ll  INF = 1e18;
const ld  PI  = acos((ld) -1);

void setIO(string name = "") {
    ios_base::sync_with_stdio(0); cin.tie(0);
    if(sz(name)){
        freopen((name+".in").c_str(), "r", stdin);
        freopen((name+".out").c_str(), "w", stdout);
    }
}

int main(){

    setIO();

    int n;
    cin >> n;

    vi pls;
    vi mns;

    int Ans = 0;

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

        int a, b;
        cin >> a >> b;

        pls.pb(a + b);
        mns.pb(a - b);
    }

    sort(all(pls));
    sort(all(mns));

    cout << max(pls[n - 1] - pls[0], mns[n - 1] - mns[0]);
}


Measured memory_bytes: 5100
#include <iostream>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <string>
#include <cmath>
#include <limits>
#include <algorithm>
#include <memory>
#include <climits>

constexpr long long MOD = 1000000007;

struct State
{
  int i, j, d;
};

int main()
{
  int H, W;
  std::cin >> H >> W;
  std::vector<std::vector<int>> a(H, std::vector<int>(W));
  std::queue<State> q;
  for (int i = 0; i < H; ++i)
  {
    std::string str;
    std::cin >> str;
    for (int j = 0; j < W; ++j)
    {
      if (str[j] == '#')
      {
        a[i][j] = 0;
        q.push({i, j, 0});
      }
      else
        a[i][j] = INT_MAX;
    }
  }

  while (!q.empty())
  {
    auto state = q.front();
    q.pop();
    int i = state.i;
    int j = state.j;
    int d = state.d;
    if (0 <= i - 1 && d + 1 < a[i - 1][j])
    {
      a[i - 1][j] = d + 1;
      q.push({i - 1, j, d + 1});
    }
    if (0 <= j - 1 && d + 1 < a[i][j - 1])
    {
      a[i][j - 1] = d + 1;
      q.push({i, j - 1, d + 1});
    }
    if (i + 1 < H && d + 1 < a[i + 1][j])
    {
      a[i + 1][j] = d + 1;
      q.push({i + 1, j, d + 1});
    }
    if (j + 1 < W && d + 1 < a[i][j + 1])
    {
      a[i][j + 1] = d + 1;
      q.push({i, j + 1, d + 1});
    }
  }

  int ans = 0;
  for (auto& v: a)
  {
    for (auto val: v)
    {
      ans = std::max(ans, val);
    }
  }

  std::cout << ans << std::endl;

  return 0;
}



Measured memory_bytes: 16400
N,K=map(int,input().split())
res={0}
for i in range(K):
    d=int(input())
    if d==1:
        res|={int(input())}
    else:
        res|=set(map(int,input().split()))
res=[x for x in res if x!=0]
print(N-len(res))

Measured memory_bytes: 9104
'use strict'

const main = (input) => {
    input = input.split(' ').map(v => parseInt(v))
    const N = input[0]
    const A = input[1]
    const B = input[2]

    let sum = 0
    for(let i = 0; i <= N; i++){
        let add = i.toString().split('').map(v => parseInt(v)).reduce((p, c) => p + c)
        if(A <= add && add <= B){
            sum += i
        }
    }
    console.log(sum)
}

main(require('fs').readFileSync('/dev/stdin', 'utf-8'))

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

#define o(output) cout << output << endl
#define priolity_queue pq
#define push p
#define top t

using namespace std;

string s,t;
int a,b,c,d;

int main(){
  cin >> s;
  if (s[0]=='9'||s[1]=='9'){
    o("Yes");
  }else{
    o("No");
  }
}
  

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

#define rep(i, n) for(int i = 0; i < (n); i++)
#define repp(i, l, r) for(int i = (l); i < (r); i++)
#define per(i, n) for(int i = ((n)-1); i >= 0; i--)
#define perr(i, l, r) for(int i = ((r)-1); i >= (l); i--)
#define all(x) (x).begin(),(x).end()
#define MOD 1000000007
#define IINF 1000000000
#define LINF 1000000000000000000
#define SP <<" "<<
#define CYES cout<<"Yes"<<endl
#define CNO cout<<"No"<<endl
#define CFS cin.tie(0);ios::sync_with_stdio(false)

typedef long long LL;
typedef long double LD;

int main(){
  while(1){
    int n,m;
    cin >> n >> m;
    if(n==0) return 0;
    vector<int> v;
    int tmp=m;
    while(tmp) v.push_back(tmp%10),tmp/=10;
    reverse(all(v));
    m=v.size();
    int count=0,aa=-1;
    vector<int> ans;
    rep(i,1<<(m-1)){
      vector<int> x;
      x.push_back(v[0]);
      rep(j,m-1){
        if(i&(1<<j)){
          x.push_back(v[j+1]);
        }else{
          x[x.size()-1]=x[x.size()-1]*10+v[j+1];
        }
      }
      int sum=0;
      rep(j,x.size()) sum+=x[j];
      if(sum<=n){
        if(aa<sum){
          ans=x;
          aa=sum;
          count=1;
        }else if(sum==aa){
          count++;
        }
      }
    }
    if(count==0){
      cout << "error" << endl;
    }else if(count>1){
      cout << "rejected" << endl;
    }else{
      int aaa = ans.size();
      cout << aa << " ";
      rep(i,aaa-1){
        cout << ans[i] << " ";
      }
      cout << ans[aaa-1] << endl;
    }
  }
  return 0;
}



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

int main() {
  std::string s,ans;
  cin >> s;
  int m = (s[0]-48)*10+s[1]-48;
  int n = (s[2]-48)*10+s[3]-48;
  if(m<13&&m>0){
    if(n<13&&n>0){
      ans = "AMBIGUOUS";
    }else{
      ans = "MMYY";
    }
  }else{
    if(n<13&&n>0){
      ans = "YYMM";
    }else{
      ans = "NA";
    }
  }
  cout << ans << endl;
}


Measured memory_bytes: 256
import collections

n=int(input())
A=list(map(int,input().split()))
A.sort()
md=0
j=0
for i in range(n-1):
    while j<n:
        if A[j]-A[i]<=2:
            md = max(j-i,md)
            j+=1
        else:
            break
print(md+1)



Measured memory_bytes: 20804