akhauriyash/Code-Regression huggingface dataset:
#include <iostream>

using namespace std;

const int rgb[8][3] = {{0, 0, 0},
                       {0, 0, 255},
                       {0, 255, 0},
                       {0, 255, 255},
                       {255, 0, 0},
                       {255, 0, 255},
                       {255, 255, 0},
                       {255, 255, 255}};
const string name[8] = {"black", "blue", "lime",
                        "aqua", "red", "fuchsia",
                        "yellow", "white"};

int to_decimal(string s) 
{
    int d[2];
    int ret = 0;

    for (int i = 0; i < 2; i++) {
        if ('a' <= s[i] && s[i] <= 'f') 
            d[i] = s[i] - 'a' + 10;
        else
            d[i] = s[i] - '0';
    }

    return d[0] * 16 + d[1];
}

int main()
{
    string inp;

    while (cin >> inp, inp != "0") {
        int r, g, b;
        int d = 200000;
        int idx = 0;
        
        r = to_decimal(inp.substr(1, 2));
        g = to_decimal(inp.substr(3, 2));
        b = to_decimal(inp.substr(5, 2));

        for (int i = 0; i < 8; i++) {
            int tmp;
            tmp = (r - rgb[i][0]) * (r - rgb[i][0]) + 
                (g - rgb[i][1]) * (g - rgb[i][1]) +
                (b - rgb[i][2]) * (b - rgb[i][2]);

            if (tmp < d) {
                d = tmp;
                idx = i;
            }
        }
        cout << name[idx] << endl;
    }

    return 0;
}

Measured memory_bytes: 1188
import sys
for x0,y0,x1,y1,x2,y2,xp,yp in[map(float,l.split()) for l in sys.stdin]:
	a=(x1-x0)*(y1-yp)-(y1-y0)*(x1-xp)
	b=(x2-x1)*(y2-yp)-(y2-y1)*(x2-xp)
	c=(x0-x2)*(y0-yp)-(y0-y2)*(x0-xp)
	print "YES" if a<0 and b<0 and c<0 or a>0 and b>0 and c>0 else "NO"

Measured memory_bytes: 4244
N = int(input())
H = list(map(int, input().split()))

max = 0
count = 0
prev = H[0]
H.pop(0)
for h in H:
    if (prev >= h):
        count += 1
    else:
        if (max < count):
            max = count
        count = 0
    prev = h

if (max < count):
    max = count
print(max)

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

#define rep(i,j,n) for(int i=j;i<n;++i)
#define all(i) i.begin(),i.end()
#define rall(i) i.rbegin(), i.rend()
#define INF 1e9
#define LINF 1e18
const int mod = 1e9 + 7;

typedef long long i64;
typedef pair<int, int> pi;

template <class T> using vt = vector<T>;
template <class T> using vvt = vector<vector<T>>;

i64 gcd(i64 n, i64 m) {return (m == 0? n : gcd(m, n % m));}
i64 lcd(i64 n, i64 m) {return (n / gcd(n, m) * m);}
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};

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

  int m, k;
  cin >> m >> k;

  if((1 << m) <= k) return cout << -1 << endl, 0;
  if(m == 1) {
    if(k == 1) cout << -1 << endl;
    else cout << "0 0 1 1\n";
    return 0;
  }

  vt<int> ans((1 << (m + 1)));
  int idx = 0;
  for(int i = (1 << m) - 1; i >= 0; --i) {
    if(i == k) continue;
    ans[idx] = i;
    ++idx;
  }
  ans[idx] = k;
  ++idx;
  int tmp = 0;
  rep(i, 0, (1 << m)) {
    if(i == k) continue;
    ans[idx] = i;
    ++idx;
  }
  ans[idx] = k;

  rep(i, 0, (1 << (m + 1))) {
    cout << ans[i] << " \n"[i == (1 << (m + 1)) - 1];
  }
}

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

int main()
{
	int N, x;
	cin >> N >> x;
	vector<int> a(N);
	for (int i = 0; i < N; i++)
	{
		cin >> a[i];
	}

	sort(a.begin(), a.end());
	int ans = 0;
	int lasti;
	for (int i = 0; i < N; i++)
	{
		x -= a[i];
		if (x>=0)
		{
			lasti = i;
			ans++;
		}
		else
		{
			break;
		}
	}
	if (lasti==N-1&&x!=0)
	{
		ans--;
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 256
#include"bits/stdc++.h"
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
const long long mod = 1000000007;
const long long inf = 1ll<<61;
typedef pair<int, int> P;
typedef pair<P, int> PP;
typedef pair<int, PP> PPP;
struct edge { int to; int to2; int cost; };

signed main() {
	int a, b, c; cin >> a >> b >> c;
	if (a*c <= b)cout << c << endl;
	else cout << b / a << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main(void) {
  double a,b,h,m;
  cin >> a >> b >> h >> m;
  double a2 = m * 6;
  double b2 = (h*60+m)/2;
  double q = min(abs(a2-b2),(360-abs(a2-b2)));
  double c = cos(q/180*3.14159265358979323846);
  double ans = (a*a) + (b*b) - (2*a*b*c);
  printf("%.15f\n", sqrt(ans));
}

Measured memory_bytes: 4160
#%%

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

N = int(input())
l = make_divisors(N)

ans = 100
for i in range(len(l)):
    a = l[i]
    b = N//l[i]
    tmp = max(len(str(a)), len(str(b)))
    if tmp < ans :
        ans = tmp

print(ans)
    


#%%


#%%


Measured memory_bytes: 3064
#include<bits/stdc++.h>
using namespace std;
#define gc getchar_unlocked
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;k<n?i<n:i>n;k<n?i+=1:i-=1)
#define ll long long
#define si(x)	scanf("%d",&x)
#define sl(x)	scanf("%lld",&x)
#define sc(x)   scanf("%c",&x);
#define ss(s)	scanf("%s",&s)
#define pi(x)	printf("%d\n",x)
#define pl(x)	printf("%lld\n",x)
#define ps(s)	printf("%s\n",s)
#define deb(x) cout << #x << "=" << x << endl
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, a) for(auto it = a.begin(); it != a.end(); it++)
#define PI 3.1415926535897932384626
typedef pair<int, int>	pii;
typedef pair<ll, ll>	pl;
typedef vector<int>		vi;
typedef vector<ll>		vl;
typedef vector<pii>		vpii;
typedef vector<pl>		vpl;
typedef vector<vi>		vvi;
typedef vector<vl>		vvl;

int mpow(int base, int exp); 
bool isprime(ll n);

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

//vi g[N];
//int a[N];

void solve() {
	int ans=0,i;
	string s,w;
	cin>>s>>w;  
	fo(i,s.length())
	{
		if(s[i]!=w[i])
		  ++ans;
	}
  cout<<(ans);
}

int main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    

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

    return 0;
    
}

int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((ll)result * base) % mod;
    base = ((ll)base * base) % mod;
    exp >>= 1;
  }
  return result;
}
bool isprime(ll n){
    if(n<=1)
        return false;
    if(n==2)
        return true;
    if(n%2==0)
        return false;
    ll rt = sqrt(n);
    for(ll i=3;i<rt;i+=2){
        if(n%i==0)
            return false;
    }
    return true;
}



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

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

int i=0;
for(i=0;i<n;i++){
    a[i]=scan.nextInt();
}

Arrays.sort(a);
int sum=0;
for(i=0;i<n-1;i++){
    if(a[i]==a[i+1]){
        sum=sum+1;
    }
}

if(sum==0){
    System.out.println("YES");
}else{
    System.out.println("NO");
}

}
}

Measured memory_bytes: 63328
#include<bits/stdc++.h>
using namespace std;
struct Node
{
	int num;
	int where;
};
int cmp(Node a,Node b)
{
	return a.num>b.num;
}
int main()
{
	int n;
	cin>>n;
	Node x[n];
	int print[n];
	for(int i=0;i<n;i++)
	{
		cin>>x[i].num;
		x[i].where=i;
	}
	sort(x,x+n,cmp);
	int l1=x[n/2-1].num,l2=x[n/2].num;
	for(int i=0;i<n;i++)
	{
		if(i<=n/2-1) print[x[i].where]=l2;
		else print[x[i].where]=l1;
	}
	for(int i=0;i<n;i++) cout<<print[i]<<endl;
	return 0;
}


Measured memory_bytes: 4480
#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<time.h>
using namespace std;
typedef long long int llint;
typedef pair<int, int> pint;
typedef pair<llint, llint> pllint;
typedef vector<int> vint;
typedef vector<llint> vllint;
typedef vector<pint> vpint;
typedef vector<pair<llint, llint>> vpllint;
typedef vector<vector<int>> vvint;
typedef vector<vector<llint>> vvllint;
typedef vector<vector<pint>> vvpint;
typedef vector<bool> vbool;
#define rep(i,n) for(int i=0;i<n;i++)
#define drep(i,n) for(int i=n-1;0<=i;i--)
#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 YES(ans) if(ans)cout<<"YES"<<endl;else cout<<"NO"<<endl;
#define POSSIBLE(ans) if(ans)cout<<"POSSIBLE"<<endl;else cout<<"IMPOSSIBLE"<<endl;
#define Pi 3.1415926535897932384626
#define mod llint(1e9+7)

class UnionFind {
public:
	//親の番号を格納する。親だった場合は-(その集合のサイズ)
	vector<int> Parent;

	//作るときはParentの値を全て-1にする
	//こうすると全てバラバラになる
	UnionFind(int N) {
		Parent = vector<int>(N, -1);
	}

	//Aがどのグループに属しているか調べる
	int root(int A) {
		if (Parent[A] < 0) return A;
		return Parent[A] = root(Parent[A]);
	}

	//自分のいるグループの頂点数を調べる
	int size(int A) {
		return -Parent[root(A)];//親をとってきたい
	}

	//AとBをくっ付ける
	bool connect(int A, int B) {
		//AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
		A = root(A);
		B = root(B);
		if (A == B) {
			//すでにくっついてるからくっ付けない
			return false;
		}

		//大きい方(A)に小さいほう(B)をくっ付けたい
		//大小が逆だったらひっくり返しちゃう。
		if (size(A) < size(B)) swap(A, B);

		//Aのサイズを更新する
		Parent[A] += Parent[B];
		//Bの親をAに変更する
		Parent[B] = A;

		return true;
	}
};

//aとbの最大公約数を求めるよ
long long GCD(long long a, long long b) {
	if (b == 0) return a;
	else return GCD(b, a % b);
}

// 返り値: a と b の最大公約数
// ax + by = gcd(a, b) を満たす (x, y) が格納される
long long extGCD(long long a, long long b, long long& x, long long& y) {
	if (b == 0) {
		x = 1;
		y = 0;
		return a;
	}
	long long d = extGCD(b, a % b, y, x);
	y -= a / b * x;
	return d;
}

bool check(llint a, llint b) {
	return a > b;
}

// mod. m での a の逆元 a^{-1} を計算する
long long modinv(long long a, long long m) {
	long long b = m, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		a -= t * b; swap(a, b);
		u -= t * v; swap(u, v);
	}
	u %= m;
	if (u < 0) u += m;
	return u;
}

//aCbを1000000007で割った余りを求める
llint convination(llint a, llint b) {
	llint ans = 1;
	for (llint i = 0; i < b; i++) {
		ans *= a - i;
		ans %= 1000000007;
	}
	for (llint i = 1; i <= b; i++) {
		ans *= modinv(i, 1000000007);
		ans %= 1000000007;
	}
	return ans;
}

//aのb乗をmodで割った余りを求める
llint power(llint a, llint b) {
	if (b == 1)return a;
	if (b == 0)return 1;
	llint tmp = power(a, b / 2);
	tmp *= tmp;
	tmp %= mod;
	if (b % 2 == 1) {
		tmp *= a;
		tmp %= mod;
	}
	return tmp;
}

int main() {
	string s;
	cin >> s;
	if (s == "Sunny")cout << "Cloudy" << endl;
	if (s == "Cloudy")cout << "Rainy" << endl;
	if (s == "Rainy")cout << "Sunny" << endl;
	return 0;
}

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

int main()
{
    int n; cin >> n;
    int ans = 0, inf = 1, sup = 10;

    while(n >= sup){
        ans += (sup - inf);
        inf = inf * 100;
        sup = sup * 100;
    }
    if(n >= inf) ans += (n - inf) + 1;

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


Measured memory_bytes: 3560
#include <bits/stdc++.h>
using namespace std;
#define maxn 102
int n, m, XX, YY, ans; 
int a[maxn][maxn], b[maxn][maxn];
short f[maxn][maxn][maxn][maxn];

void Getmax(int &x, int y) { if(y > x) x = y; }
bool Mid(int K, int l, int r) { return (K >= l) && (K <= r); }

int main()
{
    scanf("%d%d", &n, &m);
    for(int i = 1; i <= n; i ++)
        for(int j = 1; j <= m; j ++)
        {
            char c; cin >> c; int tem = 0;
            if(c == 'o') tem = 1;
            else if(c == 'E') XX = i, YY = j;
            a[i][j] = a[i][j - 1] + tem;
            b[j][i] = b[j][i - 1] + tem;
        }
    for(int u = 0; u < XX; u ++)
        for(int d = 0; d <= n - XX; d ++)
            for(int l = 0; l < YY; l ++)
                for(int r = 0; r <= m - YY; r ++)
                {
                    int ret = 0, tem1 = XX - u, tem2 = XX + d;
                    int tem3 = YY - l, tem4 = YY + r;
                    int p1 = min(YY + r, m - l), p2 = max(YY - l, r + 1); // line
                    int q1 = min(XX + d, n - u), q2 = max(XX - u, d + 1); // row
                    if(u) Getmax(ret, f[u - 1][d][l][r] + ((Mid(tem1, q2, q1)) ? max(a[tem1][p1] - a[tem1][p2 - 1], 0) : 0));
                    if(d) Getmax(ret, f[u][d - 1][l][r] + ((Mid(tem2, q2, q1)) ? max(a[tem2][p1] - a[tem2][p2 - 1], 0) : 0));
                    if(l) Getmax(ret, f[u][d][l - 1][r] + ((Mid(tem3, p2, p1)) ? max(b[tem3][q1] - b[tem3][q2 - 1], 0) : 0));
                    if(r) Getmax(ret, f[u][d][l][r - 1] + ((Mid(tem4, p2, p1)) ? max(b[tem4][q1] - b[tem4][q2 - 1], 0) : 0)); 
                    f[u][d][l][r] = ret;
                    ans = max(ans, (int) f[u][d][l][r]);
                }
    printf("%d\n", ans);
    return 0;
}

Measured memory_bytes: 205184
#include <iostream>
#include <vector>
#include <list>
#include <set>
#include <queue>
#include <map>
#include <algorithm>
#include <functional>
#include <string>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;

#define REP(i,p,n) for(int i=p;i<n;++i)
#define rep(i,n) REP(i,0,n)

typedef long long int ll;
typedef pair<int,int> pii;
typedef vector<int> vint;
typedef vector<pii> vpii;
typedef vector<vint> det1;
typedef vector<vpii> det2;

int main()
{
    int ins[4];
    rep(i, 4) { cin >> ins[i]; }

    sort(ins, ins + 4);

    const bool ok = ins[0] == 1 && ins[1] == 4 && ins[2] == 7 && ins[3] == 9;
    cout << (ok ? "YES" : "NO") << endl;

    return 0;
}


Measured memory_bytes: 256
import itertools
import math
import string
import collections
from collections import Counter
from collections import deque
from operator import itemgetter
import sys
sys.setrecursionlimit(2*10**5)
INF = 2**60


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
n = int(input())
a = []
for _ in range(n):
    a.append(int(input()))
# print(a)
cnt = 1
x = a[0]-1
if a[0] == 2:
    print(cnt)
    exit()
for _ in range(10**5+10):

    if a[x] == 2:
        cnt += 1
        print(cnt)
        exit()
    else:
        x = a[x]-1
        cnt += 1
print(-1)


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

int a,b;

int main(){
    cin>>a>>b;
    if(a > b){
        cout<<"a > b"<<endl;
    }
    else if(a < b){
        cout<<"a < b"<<endl;
    }
    else if(a == b){
        cout<<"a == b"<<endl;
    }
    return 0;
}


Measured memory_bytes: 3060
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0;i < (int)(n);i++)
#define rep2(i, s, n) for (int i = s; i < (int)(n);i++)

int main() {
  int A, B;
  int ans = 0;
  cin >> A >> B;
      B--;
  rep(i, 30){
    if(B < 1)
      break;
  B -= A - 1;
    ans++;
  }
  cout << ans << endl;
}


Measured memory_bytes: 256
#include<iostream>
using namespace std;
int main(){
	int a, b, k, i, Count;
	cin >> a >> b >> k;
	if(b-a < 2*k){
		for(i = a; i <= b; i++){
			cout << i << endl;
		}
		return 0;
	}
	for( i = a, Count = 1;Count<=k&&i <= b;Count++, i++){
		cout << i << endl;
	}
	for( i = b-k+1, Count = 1;Count<=k&&i <= b;Count++, i++){
		cout << i << endl;
	}
	return 0;
} 
// 1 
// 1

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

using namespace std;

#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
#define find(v,x) (lower_bound(ALL(v), x) - v.begin())

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<ii> vii;

const int MX = (1<<18)+1;

int n, a[MX], res = 0;
ii dp[MX];

ii twomin (ii &p, ii &q) {
	vi v = {p.fi, p.se, q.fi, q.se};
	sort(ALL(v), [&] (int i, int j) {
		return a[i] > a[j];
	});
	v.erase(unique(ALL(v)), v.end());
	return {v[0], v[1]};
}

int main () {
	ios_base::sync_with_stdio(0); cin.tie(0);
	
	cin >> n;
	for (int i = 0; i < (1<<n); i++) cin >> a[i];
	a[1<<n] = 0;

	dp[0] = {0, (1<<n)};
	for (int i = 1; i < (1<<n); i++) {
		dp[i] = {i, (1<<n)};
		for (int j = 0; j < n; j++)
			if (i & (1 << j))
				dp[i] = twomin(dp[i], dp[i^(1<<j)]);
		res = max(res, a[dp[i].fi]+a[dp[i].se]);
		cout << res << endl;
	}

	return 0;
}


Measured memory_bytes: 6144
#include <bits/stdc++.h>
using intl = long long;
using itnl = long long;//typo用
using uintl = unsigned long long;
using itn = int;//typo用
using ld = long double;
using namespace std;
#define rep(i, n) for(intl i = 0; i < (intl)(n); i++)
#define rrep(i, n) for(intl i = (intl)(n) - 1; i >= 0; i--)
#define repi(i, a, b) for(intl i = (intl)(a); i < (intl)(b); i++)
#define rrepi(i, a, b) for(intl i = (intl)(a) - 1; i >= (intl)(b); i--)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define m0(x) memset(x,0,sizeof(x))
#define m1(x) memset(x,1,sizeof(x))
#define fill(x,y) memset(x,y,sizeof(x))
#define alength(a) (sizeof(a) / sizeof(a[0]))
#define debug(x) cout << #x << ":" << x << endl
#define rdebug(i,x) rep(i, alength(x))cout << #x << "[" << i << "]:" << x[i] << endl//1次元配列の出力
#define rrdebug(i, j, x) rep(i, alength(x))rep(j, alength(x[i]))cout << #x << "[" << i << "][" << j << "]:" << x[i][j] << endl//二次元配列の出力
#define pb push_back
#define mp make_pair
#define pii pair<intl,intl>
const intl INF = 1e9;
const intl MOD = 1e9+7;
const ld EPS = 1.0e-14;//-9
const ld PI = acos(-1);
void fp(bool f){cout << (f ? "Yes" : "No") << endl;}
void fp(bool f, string s, string t){cout << (f ? s : t) << endl;}
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; }
intl gcd(intl a, intl b){ if(!b)return a; return gcd(b, a % b); }
intl lcm(intl a,intl b){ return a / gcd(a, b) * b; }
intl kai(intl k){//k!を求める関数,
    intl a = 1;
    for(int i = 2; i <= k; i++){
        a *= i;
    }
    return a;
}
intl digit10(intl a){//aを10進数で表したときの桁数を求める関数
    intl b = 0;
    do{
        a /= 10;
        b++;
    }while(a);
    return b;
}

//--------------入力受け取る場所----------------------------------------------------
intl a,v,b,w,t;
void input_var(){
    cin >> a >> v >> b >> w >> t;
}
//-------------------------------------------------------------------------------


signed main(){
    cout << fixed << setprecision(10);
    input_var();
    string ans = "NO";
    intl c = v - w;
    a += INF;
    b += INF;
    if(c > 0){
        intl d;
        if(a > b)d = a - b;
        else d = b - a;
        //if(!(d % c)){
            if(ceil((double)d / c) <= t)ans = "YES";
        //}
    }
    cout << ans << endl;
    return 0;
}


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

typedef long long ll;

ll h, w, h1, w1;
 
int main() {
	cin >> h >> w >> h1 >> w1;
	cout << h*w - h1*w - w1*h + h1*w1;
	
	return 0;
}


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

int main(){
	long long n,a,sum=0;
	cin >> n;
	vector<long long> x(n+1);
	for(long long i = 0 ; i <= n ; i += 1){
		cin >> x[i];
	}
	for(long long i = 0 ; i < n ; i += 1){
		cin >> a;
		long long m = min(a,x[i]);
		sum += m;
		a -= m;
		x[i] -= a;
		m = min(x[i+1],a);
		sum += m;
		a -= m;
		x[i+1] -= m;
	}
	cout << sum << endl;
}

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

int main() {
    int N; cin >> N;
    long long Li=1,Li1=1,Li2=2;
    for(int i=2; i<N+1; i++){
        Li=Li1+Li2;
        Li2=Li1;
        Li1=Li;
    }
    cout << Li << endl;
}


Measured memory_bytes: 3636
#include<iostream>
#include<string>
#include<stdio.h>
#include<cctype>
#include<algorithm>
#include<climits>
#include<cmath>
#include<map>
#define INF INT_MAX
using namespace std;

int X;

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

	return 0;
}

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

X,K,D=map(int,input().split())

if abs(X)>K*D: 
    ans=abs(X)-K*D
else:
    N=abs(X)//D
    if (K-N)%2==0:
        ans=abs(X)-N*D
        if ans > abs(abs(X)-(N-2)*D):ans = abs(abs(X)-(N-2)*D)
        if ans > abs(abs(X)-(N+2)*D):ans = abs(abs(X)-(N+2)*D)

    if (K-N)%2!=0:
        ans=(N+1)*D-abs(X)
        if ans > abs(abs(X)-(N-1)*D):ans = abs(abs(X)-(N-2)*D)
        if ans > abs(abs(X)-(N+3)*D):ans = abs(abs(X)-(N+2)*D)

print(ans)


Measured memory_bytes: 9240
using System;
using System.Windows;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;

class Program
{
    static void Main(string[] args)
    {
      //入力を受け取る
      var N = int.Parse(Console.ReadLine());
      var h = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();
      var count = h[N-1];
      
      for(long i = 1 ; i < N ; i++){
        if(h[i-1] > h[i]){
          count += h[i-1]-h[i];
        }
      }
      
      Console.WriteLine(count);
    }

}




Measured memory_bytes: 13396
#include<stdio.h>

#define MAX 10000
#define NIL -1

struct Node {int p, l, r;};
struct Node T[MAX];
int n;

void preParse(int u){
    if(u == NIL) return;
    printf(" %d", u);
    preParse(T[u].l);
    preParse(T[u].r);
}

void inParse(int u){
    if(u == NIL) return;
    inParse(T[u].l);
    printf(" %d", u);
    inParse(T[u].r);
}

void postParse(int u){
    if(u == NIL) return;
    postParse(T[u].l);
    postParse(T[u].r);
    printf(" %d", u);
}

int main(void){

    int i, v, l, r, root;

    scanf("%d", &n);
    for(i = 0; i < n; i++) T[i].p = NIL;
    
    for(i = 0; i < n; i++){
        scanf("%d%d%d", &v, &l, &r);
        T[v].l = l;
        T[v].r = r;
        if(l != NIL) T[l].p = v;
        if(r != NIL) T[r].p = v;
    }

    for(i = 0; i < n; i++ ) if(T[i].p == NIL) root = i;
    
    printf("Preorder\n");
    preParse(root);
    printf("\n");
    printf("Inorder\n");
    inParse(root);
    printf("\n");
    printf("Postorder\n");
    postParse(root);
    printf("\n");

    return 0;
}


Measured memory_bytes: 2104
//#include <bits/stdc++.h>
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
//#include "boost/multiprecision/cpp_int.hpp"
//typedef boost::multiprecision::cpp_int ll;
typedef long double dd;
#define i_7 (ll)(1E9+7)
//#define i_7 998244353
#define i_5 i_7-2
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
typedef pair<ll,ll> l_l;
typedef pair<dd,dd> d_d;
ll inf=(ll)1E16;
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
void Max(ll &pos,ll val){pos=max(pos,val);}//Max(dp[n],dp[n-1]);
void Min(ll &pos,ll val){pos=min(pos,val);}
void Add(ll &pos,ll val){pos=mod(pos+val);}
dd EPS=1E-9;
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define fi first
#define se second
///////////////////////////

int main(){fastio
    string s;cin>>s;
    reverse(s.begin(),s.end());
    s+='0';
    ll n=s.size();
    ll dp[n][2];rep(i,0,n-1)rep(j,0,1)dp[i][j]=inf;
    dp[0][0]=s[0]-'0';
    dp[0][1]=10-(s[0]-'0');
    rep(i,1,n-1){
        ll c=s[i]-'0';
        dp[i][0]=dp[i-1][0]+c;
        Min(dp[i][0],dp[i-1][1]+c+1);
        dp[i][1]=dp[i-1][0]+(10-c);
        Min(dp[i][1],dp[i-1][1]+(10-(c+1)));
    }
    cout<<dp[n-1][0]<<endl;
    
    return 0;
}


Measured memory_bytes: 17052
// https://codeforces.com/blog/entry/64250?#comment-483308
#include<bits/stdc++.h>
using namespace std;

#define INF 0x3f3f3f3f
#define int long long
#define pii pair<int, int>

const int N = 305;

int n;
int cnt[4];
double dp[N][N][N];

double solve(int one, int two, int three) {
    if(!one and !two and !three)
        return 0.0;
    if(one < 0 or two < 0 or three < 0)
        return 0.00;
    if(dp[one][two][three] != -1)
        return dp[one][two][three];

    double p0 = (double)(n-(one+two+three)) / (double) n;
    double p1 = (double)one / (double) n;
    double p2 = (double)two / (double) n;
    double p3 = (double)three / (double) n;
    dp[one][two][three] = ((p1 * solve(one-1, two, three)) + (p2 * solve(one+1, two-1, three)) +
                            (p3 * solve(one, two+1, three-1)) + 1.0) / (1.0-p0);
    return dp[one][two][three];
}

int32_t main() {
    int i, j, k, x;
    for(i = 0 ; i < 305 ; i++)
        for(j = 0 ; j < 305 ; j++)
            for(k = 0 ; k < 305 ; k++)
                dp[i][j][k] = -1.0f;
    cin >> n;
    for(i = 0 ; i < n ; i++) {
        cin >> x;
        cnt[x]++;
    }
    cout << setprecision(10) << solve(cnt[1], cnt[2], cnt[3]) << endl;
    return 0;
}


Measured memory_bytes: 221952
s = input()
t = input()
min_c = len(t)
for i in range(len(s)-len(t)+1):
    cnt = 0
    for j in range(len(t)):
        if s[i+j] != t[j]:
            cnt += 1
    min_c = min(min_c, cnt)
print(min_c)


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

int main()
{
    string N;
    cin >> N;
    bool flag = false;
    for (int i = 0; i < 3; i++)
    {
        if (N[i] == '7')
        {
            flag = true;
            break;
        }
    }
    if (flag)
    {
        printf("Yes");
    }
    else
    {
        printf("No");
    }
    return 0;
}

Measured memory_bytes: 3700
import java.util.*;

class Main {
	Scanner sc = new Scanner(System.in);

	public void run() {
		while (sc.hasNext()) {
			int[] a=new int[4],b=new int[4];
			for(int i=0;i<4;i++){
				a[i]=sc.nextInt();
			}
			for(int i=0;i<4;i++){
				b[i]=sc.nextInt();
			}
			int hit=0,blow=0;
			for(int i=0;i<4;i++){
				for(int j=0;j<4;j++){
					if(a[i]==b[j]){
						if(i==j)hit++;
						else blow++;
					}
				}
			}
			ln(hit +" "+blow);
		}
	}

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

	public static void pr(Object o) {
		System.out.print(o);
	}

	public static void ln(Object o) {
		System.out.println(o);
	}

	public static void ln() {
		System.out.println();
	}
}

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

typedef long long ll;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    const int INF = 1e9;
    int n, k;
    cin>>n>>k;
    int h[n];
    for (int i=0;i<n;++i) cin>>h[i];

    int dp[n+1];
    dp[0] = dp[1] = 0;
    for (int i=2;i<=n;++i){
        dp[i] = INF;
        for (int j=1;j<=min(k, n);++j){
            
            if (i>j) dp[i] = min(dp[i-j] + abs(h[i-1]-h[i-1-j]), dp[i]);
        }
    }
    cout<<dp[n]<<endl;
    
    return 0;
}

Measured memory_bytes: 1024
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<n; ++i)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using namespace std;
using ll = int64_t;
using ld = long double;
using P = pair<int, int>;
using vs = vector<string>;
using vi = vector<int>;
using vvi = vector<vi>;
template<class T> using PQ = priority_queue<T>;
template<class T> using PQG = priority_queue<T, vector<T>, greater<T> >;
const int INF = 100010001;
const ll LINF = (ll)INF*INF*10;
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) {return a < b && (a = b, true);}
template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) {return a > b && (a = b, true);}
template<typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) { return is >> p.first >> p.second;}
template<typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) { return os << p.first << ' ' << p.second;}

const int mod = 1000000007;
//const int mod = 998244353;

struct mint {
	int64_t x;
	mint(int64_t x=0):x((x%mod+mod)%mod){}
	mint operator-() const { return mint(-x);}
	mint& operator+=(const mint a) {
		if ((x += a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator-=(const mint a) {
		if ((x += mod-a.x) >= mod) x -= mod;
		return *this;
	}
	mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
	mint operator+(const mint a) const { return mint(*this) += a;}
	mint operator-(const mint a) const { return mint(*this) -= a;}
	mint operator*(const mint a) const { return mint(*this) *= a;}
	mint pow(int64_t t) const {
		if (!t) return 1;
		mint a = pow(t>>1);
		a *= a;
		if (t&1) a *= *this;
		return a;
	}

	//for prime mod
	mint inv() const { return pow(mod-2);}
	mint& operator/=(const mint a) { return *this *= a.inv();}
	mint operator/(const mint a) {return mint(*this) /= a;}
};

istream& operator>>(istream& is, mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

//head

int n;
string s;
int al[26];
mint ans = 1;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin >> n >> s;
	rep(i, n) {
		al[s[i]-'a']++;
	}
	rep(i, 26) ans *= al[i]+1;

	cout << ans-1 << endl;
}

Measured memory_bytes: 3764
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int (i) = 0; (i) < (n); ++(i))
#define rrep(i,n) for(int (i) = (n) - 1; (i) >= 0; --(i)) //Reversi rep
#define nfor(i,a,b) for(int (i) = (a); (i) < (b); ++(i)) //Natural for
#define rfor(i,a,b) for(int (i) = (b); (i) >= (a); --(i)) //Reversi for

int main()
{
    int a,b;
    cin >> a >> b;
        if ((a + b)%2 == 0) {
            cout << (a + b)/2 << endl;
        }else{
            cout << "IMPOSSIBLE" << endl;
        }
}


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

using namespace std;

int main() {
    int sx, sy;
    int tx, ty;
    vector<int> v;
    
    cin >> sx >> sy >> tx >> ty;
    
    
    for (int i=sx; i<tx; i++) {
        cout << 'R';
    }
    for (int i=sy; i<ty; i++) {
        cout << 'U';
    }
    
    
    
    for (int i=sx; i<tx; i++) {
        cout << 'L';
    }
    for (int i=sy; i<ty; i++) {
        cout << 'D';
    }
    
    
    cout << 'D';
    for (int i=sx; i<tx+1; i++) {
        cout << 'R';
    }
    for (int i=sy; i<ty+1; i++) {
        cout << 'U';
    }
    cout << 'L';
    
    
    cout << 'U';
    for (int i=sx; i<tx+1; i++) {
        cout << 'L';
    }
    for (int i=sy; i<ty+1; i++) {
        cout << 'D';
    }
    cout << 'R';
    
    cout << endl;
    
    
    return 0;
}

Measured memory_bytes: 256
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#define _GLIBCXX_DEBUG
#define INF 100000010
using namespace std;
const int mod = 1000000007;


int main(){
  int N,M;
  cin>>N>>M;
  //vector<int> A(N);
  //for(int i=0; i<N; i++){cin>>A[i];}
  //vector<vector<int>> A(N,vector<int>(M));
  //for(int i=0; i<N; i++){for(int j=0; j<M; j++){cin>>A[i][j];}}
  //sort(A.begin(),A.end());
  //for (int i = 0; i < N; i++) { maximum = max(maximum , A[i]);}
  //for (int i = 0; i < N; i++) { minimum = min(minimum , A[i]);}
  if (M>=N)cout << "unsafe" << endl;
  else cout<<"safe"<<endl;
 }

Measured memory_bytes: 3624
#include<iostream>
#include<string>
#include<utility>
#include<cmath>
#include<algorithm>
using namespace std;
int main (){
	int n,k,h[100000],ans=1000000000;
	cin>>n>>k;
	for(int a=0;a<n;a++)cin>>h[a];
	sort(h,h+n);
	for(int i=n-1;i>k-2;i--){
		if(h[i]-h[i-k+1]<ans){
			ans=h[i]-h[i-k+1];
			}
		}
	cout<<ans<<endl;
	return 0;
}


Measured memory_bytes: 640
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let  s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}
macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}
macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    ipt_1_2_b();
}

fn ipt_1_2_b() {
    input! {
        a: i32,
        b: i32,
        c: i32
    }

    let text = if a < b && b < c { "Yes" } else { "No" };

    println!("{}", text);
}


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

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

a, b, x = MAP()

# 区間和っぽくやる
l = (a-1) // x
r = b // x
print(r - l)


Measured memory_bytes: 3064
import Control.Applicative
import Control.Monad
import Control.Monad.ST
-- import qualified Data.ByteString as BS
import Data.Functor
import Data.Function
import Data.Monoid
import Data.Maybe
import Data.List
import qualified Data.Foldable as Foldable
--import qualified Data.Set as Set
--import qualified Data.Sequence as Sequence
import Data.List.Split
import Data.Bits
import Data.Char
import Data.Ix
import Data.Ratio
import Data.Ord
import Data.Fixed
import Data.Tuple
import Data.Array
--import Data.Array.Unboxed
--import Data.Array.IArray
import Data.Array.MArray
import Data.Array.IO
import Data.Array.ST
import Data.IORef
import Data.STRef
import Text.Printf
import System.IO
-- import System.IO.Unsafe
 
-- templete
readInt = read :: String -> Int
readInteger = read :: String -> Integer
readDouble = read :: String -> Double
getInt = readLn :: IO Int
getInts = map readInt . words <$> getLine
getInteger = readLn :: IO Integer
getIntegers = map readInteger . words <$> getLine
getDouble = readLn :: IO Double
getDoubles = map readDouble . words <$> getLine
sjoin :: (Show a) => [a] -> String
sjoin = unwords . map show
tjoin :: (Show a, Show b) => (a, b) -> String
tjoin (x, y) = show x ++ (' ' : show y)
cond :: a -> a -> Bool -> a
cond t f c = if c then t else f
apply2 :: (a -> a -> b) -> [a] -> b
apply2 f [x,y] = f x y
apply3 :: (a -> a -> a -> b) -> [a] -> b
apply3 f [x,y,z] = f x y z
apply4 :: (a -> a -> a -> a -> b) -> [a] -> b
apply4 f [x,y,z,w] = f x y z w
fnTuple :: (a -> b, a -> c) -> a -> (b, c)
fnTuple (f,g) a = (f a, g a)
replace :: (Eq a) => a -> a -> [a] -> [a]
replace x y = map (\z -> if z==x then y else z)
binMap :: (a -> a -> b) -> [a] -> [b]
binMap f (x:xs@(y:_)) = f x y : binMap f xs
binMap _ _ = []
splitRec :: Int -> [a] -> [[a]]
splitRec _ [] = []
splitRec n xs = let (y,ys) = splitAt n xs in y : splitRec n ys
infixl 7 `divCeil`
divCeil :: Integral a => a -> a -> a
x `divCeil` y = (x+y-1) `div` y
coverC :: Ord a => (a, a) -> a -> Bool
coverC (l,r) x = l<=x && x<=r
coverH :: Ord a => (a, a) -> a -> Bool
coverH (l,r) x = l<=x && x<r
ibsearch :: (Int -> Bool) -> (Int,Int) -> Int
ibsearch f (ok,ng) = if abs (ok-ng) <= 1 then ok else let mid = (ok + ng) `div` 2 in ibsearch f (if f mid then (mid,ng) else (ok,mid))
whenM :: Monad m => m Bool -> m () -> m ()
whenM c a = c >>= flip when a
unconsU :: [a] -> (a, [a])
unconsU (x:xs) = (x, xs)
-- templete

data Page = PSingle Int | PSeq Int Int deriving (Eq)
instance Show Page where
    show (PSingle x) = show x
    show (PSeq x y) = show x ++ '-' : show y

cite :: [Int] -> [Page]
cite [] = []
cite (x:xs) = sub x x xs
  where
    sub from t [] = if from==t then [PSingle from] else [PSeq from t]
    sub from t ya@(y:ys)
      | y==t+1 = sub from y ys
      | from==t = PSingle from : cite ya
      | otherwise = PSeq from t : cite ya

main = do
    n <- getInt
    unless (n==0) $ do
        ps <- getInts
        putStrLn $ sjoin $ cite ps
        main


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

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define REP(i, n) for(int i = 0; i < (n); ++i)
#define REPr(i, n) for(int i = (n)-1; i >= 0; --i)
#define FORq(i, m, n) for(int i = (m); i <= (n); ++i)
#define FORqr(i, m, n) for(int i = (n); i >= (m); --i)
#define MP make_pair
#define SIN(x, S) (S.count(x) != 0)
#define M0(x) memset(x, 0, sizeof(x))
#define FILL(x, y) memset(x, y, sizeof(x))
#define MM(x) memset(x, -1, sizeof(x))
#define ALL(x) (x).begin(), (x).end()
#define DB(x) cerr << #x << " = " << x << endl
#define DB2(x, y)                                                              \
    cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n";
#define DEBUG                                                                  \
    int x12345;                                                                \
    cin >> x12345;
typedef pair<int, int> PII;
typedef pair<long long, long long> PLL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<long long> VL;
typedef long long ll;
typedef long long integer;
///////////////////////////////////////////////
const long long MOD = 1e9 + 7;
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;
}

///////////////////////////////////////////////
/// 🍈( '-' 🍈 |AC|
int main() {
    int N,M;
    cin >> N >> M;
    int sum = 0;
    REP(k,M){
        int a; cin >> a;
        sum += a;
    }

    if (sum > N){
        cout << -1 << endl;
    }else{
        cout << N - sum << endl;
    }

}

Measured memory_bytes: 3604
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ABC113_B
{
    public class Program

    {

        public struct Point
        {
            public int index;
            public double DifferenceWithTargetTemperature;

            public Point(int i, double v) 
            {
                this.index = i;
                this.DifferenceWithTargetTemperature = v;
            }
        }

        public static void Main(string[] args)
        {
            int n = ReadInt();
            int[] line = ReadIntAr();
            int t = line[0];
            int a = line[1];
            int[] points = ReadIntAr();

            List<Point> items = new List<Point>();

            for (int i = 0 ; i < points.Count() ; i++)
            {
                items.Add(new Point(i, Math.Abs(a - (t - 0.006 * points[i]))));
            }

            Console.WriteLine(items.OrderBy(x => x.DifferenceWithTargetTemperature).First().index + 1);
        }

        static string ReadSt() { return Console.ReadLine(); }
        static int ReadInt() { return int.Parse(Console.ReadLine()); }
        static long ReadLong() { return long.Parse(Console.ReadLine()); }
        static double ReadDouble() { return double.Parse(Console.ReadLine()); }
        static string[] ReadStAr(char sep = ' ') { return Console.ReadLine().Split(sep); }
        static int[] ReadIntAr(char sep = ' ') { return Array.ConvertAll(Console.ReadLine().Split(sep), e => int.Parse(e)); }
        static long[] ReadLongAr(char sep = ' ') { return Array.ConvertAll(Console.ReadLine().Split(sep), e => long.Parse(e)); }
        static double[] ReadDoubleAr(char sep = ' ') { return Array.ConvertAll(Console.ReadLine().Split(sep), e => double.Parse(e)); }

    }

}


Measured memory_bytes: 13420
#include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
#define rb(a,b,c) for(int a=b; a<=c; a++)
#define rl(a,b,c) for(int a=b; a>=c; a--)
#define vbe(v) v.begin()
#define ven(v) v.end()
#define all(v) v.begin(), v.end()
#define ll long long
#define vi vector<int>
#define vf vector<float>
#define vd vector<double>
#define vs vector<string>
#define vl vector<long>
#define PB push_back
#define POB pop_back

using namespace std;
const int INF=1e9, MOD=1e9+7;

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

Measured memory_bytes: 256
#include<stdio.h>

int main(void)
{
   int n, i, a=0;

   scanf("%d",&n);

   for(i=1;i<10;i++)
      if((n%i==0)&&(n/i<=9)){
         a=1;
   }
   if(a==1)
      printf("Yes\n");
   else
      printf("No\n");
   return 0;
}

Measured memory_bytes: 128
while 1:
    try:
        inp=int(input())
        if inp==0:break
        m_list=[]
        for i in range(4):
            for j in range(5):
                for k in range(6):
                    for l in range(3):
                        for m in range(4):
                            for n in range(5):
                                if i*1500+j*1200+k*1000+l*500+m*300+n*200==inp:
                                    m_list.append(i*2244+j*1870+k*1520+l*850+m*550+n*380)
        print(min(m_list))
    except:break


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

#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;

int n;
ll arr[100005];

ll getans(){
	ll ans = 0;
	ll cur = arr[0];
	for (int i = 1; i < n; i++){
		if (cur < 0){
			cur += arr[i];
			if (cur <= 0){
				ans += abs(1-cur);
				cur = 1;
			}
		} else if (cur > 0){
			cur += arr[i];
			if (cur >= 0){
				ans += abs(-1-cur);
				cur = -1;
			}
		} else assert(cur);
	}
	return ans;
}

int main(){
	//freopen("stl.gir", "r", stdin);
	
	cin >> n;
	for (int i = 0; i < n; i++) cin >> arr[i];
	
	ll ans1 = 0;
	ll cur = 0;
	for (int i = 0; i < n; i++){
		if (i % 2 == 0){
			cur += arr[i];
			if (cur >= 0){
				ans1 += abs(-1-cur);
				cur = -1;
			}
		} else {
			cur += arr[i];
			if (cur <= 0){
				ans1 += abs(1-cur);
				cur = 1;
			}
		}
	}
	
	ll ans2 = 0;
	cur = 0;
	for (int i = 0; i < n; i++){
		if (i % 2 == 1){
			cur += arr[i];
			if (cur >= 0){
				ans2 += abs(-1-cur);
				cur = -1;
			}
		} else {
			cur += arr[i];
			if (cur <= 0){
				ans2 += abs(1-cur);
				cur = 1;
			}
		}
	}
	
	cout << min(ans1, ans2) << endl;
}

Measured memory_bytes: 1024
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
typedef long long ll;
typedef pair<int, int> P;
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
struct Edge {
  ll to;
  ll cost;
};
map<ll, ll> prime_factorization(long long n) {
  // map<ll,ll> first=素因数 second=first素因数の数
  map<ll, ll> res;
  for (int i = 2; i <= n / i; i++) {
    while (n % i == 0) {
      res[i]++;
      n /= i;
    }
  }
  if (n != 1) res[n]++;
  return res;
}
std::vector<bool> IsPrime;
void sieve(size_t max) {
  if (max + 1 > IsPrime.size()) {  // resizeで要素数が減らないように
    IsPrime.resize(max + 1, true);  // IsPrimeに必要な要素数を確保
  }
  IsPrime[0] = false;  // 0は素数ではない
  IsPrime[1] = false;  // 1は素数ではない

  for (size_t i = 2; i * i <= max; ++i)      // 0からsqrt(max)まで調べる
    if (IsPrime[i])                          // iが素数ならば
      for (size_t j = 2; i * j <= max; ++j)  // (max以下の)iの倍数は
        IsPrime[i * j] = false;              // 素数ではない
}
ll const mx = 1000010;
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  //map<int, int> mp{};
  unordered_map<int, int> tyouhukuC;
  REP(i, N) {
    cin >> A[i];
    // mp[A[i]]++;
    tyouhukuC[A[i]] += 1;
  }
  sieve(mx);
  if (tyouhukuC[1] != 0) {
    if (tyouhukuC[1] == 1) {
      cout << 1 << endl;
    } else {
      cout << 0 << endl;
    }
    return 0;
  }
  sort(A.begin(), A.end());
  A.erase(unique(A.begin(), A.end()), A.end());
  int ans = 0;
  REP(i, A.size()) {
    int num = A[i];
    if (1 < tyouhukuC[num]) continue;
    bool ok = true;
    if (IsPrime[A[i]] != true) {
      for (int j = 2; j <= num / j; j++) {
        if (num % j != 0) continue;
        if (tyouhukuC[j] != 0 || tyouhukuC[num / j] != 0) {
          ok = false;
          break;
        }
      }
    }
    if (ok) ans++;
  }
  cout << ans << endl;
}
/*sort(A.begin(), A.end());
  A.erase(unique(A.begin(), A.end()), A.end());
  REP(i,A.size())*/

Measured memory_bytes: 32672
#include<bits/stdc++.h>
using namespace std;
typedef     long long    ll;
typedef     vector<int> vi;
typedef     vector<long long> vl;
typedef     pair<int, int>pi;
typedef     pair<long long, long long>pl;
#define F   first
#define S   second
#define pb  push_back
#define     all(x)      x.begin() , x.end()
#define mp  make_pair
#define       FOR(i,a,b) for(i=a;i<=b;i++)
#define     mem(a)      memset(a , 0 ,sizeof a)
#define     memn(a)     memset(a , -1 ,sizeof a)
int main()
{
  ll n,i,x,y,c=0,f=0;
  cin>>n;
  for(i=1;i<=n;i++)
  {
    cin>>x>>y;
     if(x==y) 
      {
        c++;
      }else
      {
        if(c>=3) f=1;
        c=0;
      }

  }
  if(c>=3) f=1;
   if(f==1)  cout<<"Yes"<<endl;
   else cout<<"No"<<endl;

}


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

ll gcd(ll a, ll b){return b!=0 ? gcd(b, a%b) : a;}
ll lcm(ll a, ll b){return a / gcd(a, b) * b;}

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

int main(){
	int h, w;
	cin >> h >> w;
	vector<vector<char>> g(h, vector<char>(w, '.'));
	rep(i, h) rep(j, w) cin >> g[i][j];
	
	int black = 0;
	rep(i, h) rep(j, w) if(g[i][j] == '#') black++;
	
	vector<vector<int>> dist(h, vector<int>(w, INF));
	dist[0][0] = 0;
	queue<P> q;
	q.push(P(0, 0));
	while(!q.empty()){
		auto p = q.front();
		q.pop();
		int y = p.first;
		int x = p.second;
		for(int i = 0; i < 4; ++i){
			if(y + dy[i] < 0 || h <= y + dy[i] || x + dx[i] < 0 || w <= x + dx[i]) continue;
			if(g[y + dy[i]][x + dx[i]] == '#') continue;
			if(dist[y + dy[i]][x + dx[i]] != INF) continue;
			dist[y + dy[i]][x + dx[i]] = 1 + dist[y][x];
			q.push(P(y + dy[i], x + dx[i]));
		}
	}
	
	if(dist[h-1][w-1] == INF) cout << -1 << endl;
	else cout << h * w - dist[h-1][w-1] - 1 - black << endl;
	
	return 0;
}



Measured memory_bytes: 256
#pragma region template
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const long long MOD = 1e9 + 7, MAX = 1e18, larg = 1e5, INF = -1e9;
long long A, B, C, D, E, F, G, H, I, J, K, L, N, M, O, P, Q, R, S, T, U, V, W, x, y, z;
long long max_value = INF, max_index = -1;
long long min_value = MAX, min_index = -1;
typedef long long ll;
typedef pair<ll, ll> Pa;

int main() {
	cin >> N;
	ll _count[200000] = {0};
	rep(i, N-1){
		int num;
		cin >> num;
		_count[num-1]++;
	}
	rep(i, N){
		cout << _count[i] << endl;
	}
}

Measured memory_bytes: 5184