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

using namespace std;

#define INF 1001000100010001000
#define MOD 1000000007
#define EPS 1e-10
#define int long long
#define rep(i, N) for (int i = 0; i < N; i++)
#define Rep(i, N) for (int i = 1; i < N; i++)
#define For(i, a, b) for (int i = (a); i < (b); i++)
#define pb push_back
#define eb emplece_back
#define mp make_pair
#define i_i pair<int, int>
#define vi vector<int>
#define vvi vector<vi >
#define vb vector<bool>
#define vvb vector<vb >
#define vp vector< i_i >
#define Edge pair< i_i, int>
#define all(a) (a).begin(), (a).end()
#define Int(x) int x; scanf("%lld", &x);
#define int2(x, y) int x, y; scanf("%lld %lld", &x, &y);
#define fir first
#define sec second
#define ffir first.first
#define fsec first.second
#define sfir second.first
#define ssec second.second
 
//int dxy[5] = {0, 1, 0, -1, 0};
// assign
 
signed main()
{
    Int(n);
    vi data(n);
    int sum = 0;
    rep(i, n) {
        cin >> data[i];
        sum += data[i];
    }

    sort(all(data));

    if (sum % 10) {
        cout << sum << endl;
    } else {
        rep(i, n) {
            if (data[i] % 10) {
                sum -= data[i];
                cout << sum << endl;
                return 0;
            }
        }
        cout << 0 << endl;
    }




    return 0;
}



Measured memory_bytes: 256
using System;
using static System.Console;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

class Program
{
    static void Main(string[] args)
    {
        List<int> input = new List<int>();
        for(int i = 0; i < 5; i++)
        {
            input.Add(int.Parse(ReadLine()));
        }
        int k = int.Parse(ReadLine());
        input.Sort();

        if (input[4] - input[0] > k)
        {
            WriteLine(":(");
        }
        else
        {
            WriteLine("Yay!");
        }
        ReadKey();
    }
}

static class MyUtil
{
    public static int[] ReadIntArray()
    {
        return ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
    }

    /// <summary>
    /// <see cref="IEnumerable{T}"/>の各要素を並べてコンソールに出力します。各要素の間には半角スペースが一つ入ります。
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <param name="ts"></param>
    public static void WriteToConsole<T>(this IEnumerable<T> ts)
    {
        StringBuilder stringBuilder = new StringBuilder();
        foreach (T t in ts)
        {
            stringBuilder.Append(t.ToString());
            stringBuilder.Append(" ");
        }
        stringBuilder.Remove(stringBuilder.Length - 1, 1);
        Console.WriteLine(stringBuilder.ToString());
    }
}


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

int main() {
	int H, W;
	cin >> H >> W;
	vector<bool> yck(H, false);
	vector<bool> xck(W, false);
	vector<vector<char>> a(H, vector<char>(W));
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			cin >> a.at(i).at(j);
			if (a.at(i).at(j) == '#') {
				yck.at(i) = true;
				xck.at(j) = true;
			}
		}
	}

	for (int i = 0; i < H; i++) {
		if (yck.at(i) == false) {
			continue;
		}
		for (int j = 0; j < W; j++) {
			if (xck.at(j) == false) {
				continue;
			}
			cout << a.at(i).at(j);
		}
		cout << endl;
	}
}

Measured memory_bytes: 256
#ifdef DEBUG

#else

#    pragma GCC optimize("O3,no-stack-protector")
#    pragma GCC optimize("unroll-loops")

#    if __cplusplus >= 201703L
#        pragma GCC target("avx2")
#    else
#        pragma GCC target("avx")
#    endif

#endif
// 実数の場合
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
#define dump(x) cout << x << endl
typedef int64_t Int;
typedef long double Ld;

using namespace std;
using Graph = vector<vector<Int>>;

const double pi = M_PI;
const Int MOD = 1000000007;

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

    Ld n;
    cin >> n;

    cout << (Int)floorl(powl(floorl(sqrtl(n)), 2.0)) << endl;

    return 0;
}


Measured memory_bytes: 256
n = gets.to_i
a = gets.split.map(&:to_i).sort

m = a.uniq.size
ans = 'No'
if m == 1
  ans = 'Yes' if a[0] == 0
elsif m == 2
  ans = 'Yes' if a[0] == 0 && a.count(0) * 3 == n
elsif m == 3
  x, y, z = a.uniq
  ans = 'Yes' if x ^ y == z && a.count(x) * 3 == n && a.count(y) * 3 == n
end
puts ans


Measured memory_bytes: 13216
BEST = 22

def bmi(h, w)
  return w / (h * 0.01) ** 2
end

while true
  n, tmp1, best = gets.to_i, Float::INFINITY, nil
  
  break if n == 0
  
  n.times do
    i, h, w = gets.split.map(&:to_i)
    tmp2 = (BEST - bmi(h, w)).abs
    
    if tmp2 < tmp1
      best = i
      tmp1 = tmp2
    end
  end
  
  puts best
end

Measured memory_bytes: 6140
#include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define rer(i,l,n) for(int i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int,int> pii;

int main(){
	int n;
	while(cin>>n && n>0){
		int c=0;
		while(1){
			if(n==1) break;
			if(n%2) n=3*n+1;
			else n/=2;
			c++;
		}
		o(c);
	}
}

Measured memory_bytes: 1160
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
  int N;
  cin>>N;
  vector<int> A(10000,0);
  int k=0;
  for(int i=2;i*i<=N;i++)
    if(N%i==0){
      for(;N%i==0;N/=i){
        A[k]++;
      }
      k++;
    }
  if(N!=1){
    A[k]++;
  }
  int l=0;
  for(int i=0;A[i]!=0;i++){
    int j=1;
    for(k=0;k<=A[i];j++)
      k+=j;
    l+=j-2;
  }
  cout<<l<<endl;
}

Measured memory_bytes: 3676
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<queue>
#include<map>
#include<climits>
using namespace std;
#define MAXN 200000
#define LL long long
int n;LL ans;
int father[MAXN+5];
int cntL[MAXN+5],cntR[MAXN+5];
int xfind(int p)
{
    if(father[p]!=p)father[p]=xfind(father[p]);
    return father[p];
}
int bin(int p1,int p2){father[p2]=p1;}
int main()
{
	scanf("%d",&n);
	for(int i=1;i<=MAXN;i++)father[i]=i;
	for(int i=1;i<=n;i++)
	{
		int r,c;
		scanf("%d%d",&r,&c);
		int FA=xfind(r),FB=xfind(c+MAXN/2);
		//printf("%d %d\n",FA,FB);
		if(FA!=FB)bin(FA,FB);
	}
	for(int i=1;i<=MAXN;i++)
	{
		int F=xfind(i);
		if(i<=MAXN/2)cntL[F]++;
		else cntR[F]++;
		//printf("%d %d %d\n",F,cntL[F],cntR[F]);
	}
	for(int i=1;i<=MAXN;i++)
	ans+=(LL)cntL[i]*cntR[i];
	printf("%lld",ans-n);
}

Measured memory_bytes: 2048
a = int(input())
b = int(input())
c = int(input())
x = int(input())
answer_values = []

for a_value in range(a + 1):
    for b_value in range(b+1):
        for c_value in range(c+1):
            answer_values.append(a_value * 500 + b_value * 100 + c_value * 50)

print(answer_values.count(x))

Measured memory_bytes: 13996
while True:
    R, N = map(int, input().split())
    if not (R | N):
        break
    geta = 20
    buildings = [0] * (geta * 2)
    for _ in range(N):
        xl, xr, h = map(int, input().split())
        for i in range(xl + geta, xr + geta):
            buildings[i] = max(buildings[i], h)

    print(min(buildings[i] - pow(R ** 2 - (i - geta + (i < geta)) ** 2, 0.5) + R for i in range(-R + geta, R + geta)))

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

int main()
{
    int n;
    cin >> n;
    vector<int> ans(20000,0);
    
    for (int x = 1; x <= 100; x++)
    {
        for (int y = 1; y <= 100; y++)
        {
            for (int z = 1; z <= 100; z++)
            {
                int tmp=pow(x + y + z, 2) - x * y - y * z - z * x;
                if ( tmp<=n)
                    ans[tmp]++;
            }
        }
    }
    for (int i = 1; i <= n; i++)
    {
        cout << ans[i] << endl;
    }
    return 0;
}

Measured memory_bytes: 3672
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
#define rep(i,j,k) for(int i=j;i<k;i++)
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
const int  COMMAX = 510000;

long long fac[COMMAX], finv[COMMAX], inv[COMMAX];

// テーブルを作る前処理
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < COMMAX; i++){
    fac[i] = fac[i - 1] * i % MOD;
    inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
    finv[i] = finv[i - 1] * inv[i] % MOD;
  }
}

// 二項係数計算
long long COM(int n, int k){
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

struct UnionFind {
  vector<int> par; // par[i]:iの親の番号　(例) par[3] = 2 : 3の親が2
  vector<int> rank;
  int num;
  UnionFind(int N) : par(N) , rank(N) { //最初は全てが根であるとして初期化
    num = N;
    for(int i = 0; i < N; i++){
      par[i] = i;
      rank[i] = 0;
    }
  }

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

  void unite(int x, int y) { // xとyの木を併合
    int rx = root(x); //xの根をrx
    int ry = root(y); //yの根をry
    if (rx == ry) return; //xとyの根が同じ(=同じ木にある)時はそのまま
    if(rank[rx] < rank[ry]){
      par[rx] = ry;  
    }else{
      par[ry] = rx;
      if(rank[rx] == rank[ry])rank[rx]++;
    }
    num--;
  }

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

const int MS = 2;
const long long mod[] = {999999937LL, 1000000007LL}, base = 9973;
struct rolling_hash {
    int n;
    vector<long long> hs[MS], pw[MS];
    rolling_hash(){}
    rolling_hash(const string &s) {
        n = s.size();
        for (int i = 0; i < MS; i++) {
            hs[i].assign(n+1,0);
            pw[i].assign(n+1,0);
            hs[i][0] = 0;
            pw[i][0] = 1;
            for (int j = 0; j < n; j++) {
                pw[i][j+1] = pw[i][j]*base%mod[i];
                hs[i][j+1] = (hs[i][j]*base+s[j])%mod[i];
            }
        }
    }

    long long hash(int l, int r, int i) { return ((hs[i][r]-hs[i][l]*pw[i][r-l])%mod[i]+mod[i])%mod[i]; }

    bool match(int l1, int r1, int l2, int r2) {
        bool ret = 1;
        for (int i = 0; i < MS; i++) ret &= hash(l1,r1,i)==hash(l2,r2,i);
        return ret;
    }

    bool match(int l, int r, long long h[]) {
        bool ret = 1;
        for (int i = 0; i < MS; i++) ret &= hash(l,r,i)==h[i];
        return ret;
    }
};
vector<int>hako[26];
int main(){
  string s,t;
  cin >> s >> t;
  LL n = s.length();
  rep(i,0,n){
    hako[s[i]-'a'].push_back(i);
  }
  LL tn = t.length();
  LL count = -1;
  LL resa = 0;
  rep(i,0,tn){
    LL base = t[i] - 'a';
    if(hako[base].size() == 0){
      cout << -1 << endl;
      return 0;
    }
    auto ite = upper_bound(hako[base].begin(),hako[base].end(),count);
    LL mo = ite - hako[base].begin();
    if(mo == hako[base].size()){
      resa += n;
      count = hako[base][0];
    }else{
      count = hako[base][mo];
    }
  }
  count++;
  cout << resa + count << endl;
  return 0;
}


Measured memory_bytes: 1216
#include<iostream>
#include<vector>
#include<string>
#include<math.h>
#include<algorithm>

using namespace std;

class MYCP {
public:
	//数値を標準出力
	static void Print_Int(long long number) {
		std::cout << number << std::endl;
	}

	static void Print_Ints(vector<long long> numbers) {
		std::cout << numbers[0];
		for (int i = 1;i < numbers.size();i++) {
			std::cout << " " << numbers[i];
		}

		std::cout << std::endl;
	}

	static vector<string> MyReadLineSplit(int n) {
		vector<string> str(n);
		for (int i = 0;i < n;i++) {
			std::cin >> str[i];
		}

		return str;
	}

	static vector<long long> ReadInts(long long number) {
		vector<long long> a(number);
		for (int i = 0;i < number;i++) {
			std::cin >> a[i];
		}

		return a;
	}

	//渡された自然数が素数ならtureを返す
	static bool PrimeCheck_Int(long number) {
		if (number < 2)return false;

		for (int i = 2;i*i <= number;i++) {
			if (number%i == 0)return false;
		}

		return true;
	}
};


int main(void) {
	cin.tie(0);
	ios::sync_with_stdio(false);
	long long n;
	cin >> n;
	vector<long long> a = MYCP::ReadInts(n);
	sort(a.begin(), a.end());
	cout << a[n - 1] - a[0];
}

Measured memory_bytes: 256
//問題URL
//http://abc077.contest.atcoder.jp/tasks/arc084_b

//解き方メモ
//twitter参照
//https://twitter.com/turnJP/status/932970103041179649

#include<iostream>
#include<deque>
#include<set>
#include<utility>
#include<algorithm>
using namespace std;

int main(){
  int k;

  //input
  cin >> k;
  
  deque<pair<int,long long>> q;
  set<int> st;

  //幅優先探索
  int val = 1;
  long long digits_sum = 1;
  
  //Kの倍数なら終了
  while (val%k != 0) {
    //余りが既出でないなら、キューに値を入れて探索継続
    if(st.count(val) == 0){
      //既出の余りとしてセットに追加
      st.insert(val);

      if(val%10 != 9){
	//+1（桁総和+1）をキュー末尾に追加。桁上がりする値なら追加しない。既出のため。
	q.push_back(make_pair((val+1)%k,digits_sum+1)); 
      }
      //*10（桁総和同じ）をキュー先頭に追加
      q.push_front(make_pair(val*10%k,digits_sum)); 
    }

    pair<int,long long> p = q.front();
    q.pop_front();

    val = p.first;
    digits_sum = p.second;
  }

  cout << digits_sum << endl;
  
  return 0;
}


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

#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, n) for (int i = 1; i <= (n); i++)
#define all(x) begin(x), end(x)
#define uniq(x) (x).erase(unique(all(x)), end(x))
#define bit(n) (1LL << (n))
#define dump(x) cerr << #x " = " << (x) << endl
using vint = vector<int>;
using vvint = vector<vint>;
using pint = pair<int, int>;
using vpint = vector<pint>;
template<typename T> using priority_queue_rev = priority_queue<T, vector<T>, greater<T>>;
constexpr double pi = 3.1415926535897932384626433832795028L;
constexpr int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int gcd(int a, int b) {
    while (b) { swap(a %= b, b); }
    return a;
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
template<typename T> void fin(T mes) {
    cout << mes << endl;
    exit(0);
}
template<typename T, typename U> bool chmax(T &a, const U &b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
template<typename T, typename U> bool chmin(T &a, const U &b) {
    if (b < a) {
        a = b;
        return true;
    }
    return false;
}
template<typename T, typename U> ostream &operator<<(ostream &os, const pair<T, U> &rhs) {
    os << "(" << rhs.first << ", " << rhs.second << ")";
    return os;
}
template<typename T> ostream &operator<<(ostream &os, const vector<T> &rhs) {
    os << "{";
    for (auto itr = rhs.begin(); itr != rhs.end(); itr++) {
        os << *itr << (next(itr) != rhs.end() ? ", " : "");
    }
    os << "}";
    return os;
}
struct setup {
    static constexpr int PREC = 20;
    setup() {
        cout << fixed << setprecision(PREC);
        cerr << fixed << setprecision(PREC);
    };
} setup;

string S;
signed main() {
    cin >> S;
    if (S == "hi" || S == "hihi" || S == "hihihi" || S == "hihihihi" || S == "hihihihihi") { cout << "Yes" << endl; }
    else { cout << "No" << endl; }
}

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

struct RollingHash {
    typedef long long LL;
    typedef std::pair<long long, long long> hash_type;
    private:
        LL base1, base2;
        LL mod1, mod2;
        std::vector<LL> hash1, hash2;
        std::vector<LL> pow1, pow2;
    public:
        RollingHash(): base1(1009), base2(1013), mod1(1000000007), mod2(1000000009) {}

        void init(const std::string& s) {
            int N = s.size();

            hash1.assign(N+1, 0);
            hash2.assign(N+1, 0);
            pow1.assign(N+1, 1);
            pow2.assign(N+1, 1);

            for(int i=0; i<N; ++i) {
                hash1[i+1] = (hash1[i] + s[i]) * base1 % mod1;
                hash2[i+1] = (hash2[i] + s[i]) * base2 % mod2;
                pow1[i+1] = pow1[i] * base1 % mod1;
                pow2[i+1] = pow2[i] * base2 % mod2;
            }
        }

        inline LL get_hash1(int l, int r) {
            return ( (hash1[r] - hash1[l]*pow1[r-l]) % mod1 + mod1) % mod1;
        }

        inline LL get_hash2(int l, int r) {
            return ( (hash2[r] - hash2[l]*pow2[r-l]) % mod2 + mod2) % mod2;
        }

        hash_type get_hash_pair(int l, int r) {
            return std::make_pair(get_hash1(l, r), get_hash2(l, r));
        }
};

std::string T, P;
int main() {
    std::cin >> T >> P;

    auto rht = new RollingHash(), rhp = new RollingHash();
    rht->init(T);
    rhp->init(P);

    int tp = T.size(), lp = P.size();
    auto hashP = rhp->get_hash_pair(0, lp);
    for(int i=0; i<tp-lp+1; ++i) {
        auto hashT = rht->get_hash_pair(i, i + lp);
        if(hashP == hashT) {
            std::cout << i << std::endl;
        }
    }
}


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

a.sort()
b_c = [list(map(int, input().split())) for _ in range(m)]
b_c.sort(key=lambda x: x[1], reverse=True)

j = 0
for i in range(m):
    b = b_c[i][0]
    c = b_c[i][1]
    for _ in range(b):
        if j >= n:
            print(sum(a))
            exit()
        if a[j] < c:
            a[j] = c
            j += 1
        else:
            break

print(sum(a))


Measured memory_bytes: 81608
using System;
using System.Linq;
using System.Collections.Generic;
using static System.Console;
using System.Text;
using System.IO;
using static System.Math;
using System.Numerics;

namespace AtCoder
{
    public class Program
    {
        public static void Main(string[] args)
        {
            //SetOut(new StreamWriter(OpenStandardOutput()) { AutoFlush = false });
            Solve();
            //Out.Flush();
            Read();
        }

        static void Solve()
        {
            var abc = Sarray();
            Array.Sort(abc);
            WriteLine(abc[0] + abc[1]);
        }

        static long Mod = (long)1e9 + 7;
        static public long[] Sarray() { return ReadLine().Split().Select(long.Parse).ToArray(); }
        static public List<long> Slist() { return ReadLine().Split().Select(long.Parse).ToList(); }
        static public (T1 a, T2 b) Slice<T1, T2>()
        {
            var t = ReadLine().Split();
            return (
            (T1)Convert.ChangeType(t[0], typeof(T1)),
            (T2)Convert.ChangeType(t[1], typeof(T2)));
        }
        static public (T a, T b) Slice2<T>()
        {
            var t = ReadLine().Split();
            return (
            (T)Convert.ChangeType(t[0], typeof(T)),
            (T)Convert.ChangeType(t[1], typeof(T)));
        }
        static public (T a, T b, T c) Slice3<T>()
        {
            var t = ReadLine().Split();
            return (
            (T)Convert.ChangeType(t[0], typeof(T)),
            (T)Convert.ChangeType(t[1], typeof(T)),
            (T)Convert.ChangeType(t[2], typeof(T)));
        }
    }
}

Measured memory_bytes: 28172
n = int(input())
s = []
for i in range(n):
    s.append(input())
s.sort()
s.append('#')
x = 1
ls = []
for i in range(n):
    if s[i] == s[i+1]:
        x += 1
    else:
        ls.append((x,s[i]))
        x = 1
ls.sort()
ls.reverse()
ls.append((0,'#'))
ans = []
ans.append(ls[0][1])
for i in range(1,n):
    if ls[i-1][0] == ls[i][0]:
        ans.append(ls[i][1])
    else:
        break
ans.sort()
for x in ans:
    print(x)

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

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n,x,t;
    cin >> n >> x >> t;
    if(n%x!=0){
        cout << (n/x)*t+t << "\n";
        return 0;
    }else{
        cout << (n/x)*t << "\n";
        return 0;
    }
}   

Measured memory_bytes: 3648
/*
　　　　 ∧＿∧　にっぽんちゃちゃちゃ
　／＼（　・∀・）／ヽ
（ ●　と　　　つ　● ）　にっぽんちゃちゃちゃ
　＼/⊂、 ノ　　＼ノ
　　　　　し'
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define repone(i,n) for(int i=1;i<(int)(n);++i)
#define repo(i,o,n) for(int i=o;i<(int)(n);++i)
#define Rep(j,n) for(int j=0;j<(int)(n);++j)
#define Repo(j,o,n) for(int j=o;j<(int)(n);++j)
#define Repone(j,n) for(int j=1;j<(int)(n);++j)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define int long long
#define MOD 1000000007
#define INF 9223372036854775807

signed main(){
int x=0,y=0,z=0,w=0;
std::vector<int> v(12);
rep(i,12)std::cin >> v[i];
sort(all(v));
rep(i,12){
if(v[i]!=v[i-i%4])x++;
}
if(x==0)std::cout << "yes" << '\n';
else std::cout << "no" << '\n';
}



Measured memory_bytes: 3152
#include <stdio.h>

int     main(void)
{
    int n;
    float ans;

    scanf("%d", &n);
    if (n < 0 || n > 101)
        return (0);
    ans = n * 2 * 3.14159265358979323846264338327950288;
    printf("%f\n", ans);
    return (0);
}


Measured memory_bytes: 1732
#include <iostream>
using namespace std;
int main() {
	int N,A,B,i,j,k,l,m,n,o,p,sum;
	sum = 0;
	cin >> N >> A >> B;
	for (i = 1;i <= N;i++) {
		j = i;
		k = j / 10000;
		j = j-k * 10000;
		l = j / 1000;
		j = j-l * 1000;
		m = j / 100;
		j = j - m * 100;
		n = j / 10;
		j = j - n * 10;
		o = j;
		p = k + l + m + n + o;
		if (A <= p&&p <= B) {
			sum = sum + i;
		}
	}
	cout << sum << endl;
}

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

using namespace std ;

#define sz(v) (int)v.size()
#define ll long long
#define all(v)  v.begin() , v.end()
#define rall(v)  v.rbegin() , v.rend()
#define pf push_front
#define pb push_back
#define fast FastInputOutput() ;
#define Clear( container , value ) memset( container , value , sizeof container )
#define PI acos( -1.0 )
#define forn( t , v , be , n ) for( t v = be ; v < n ; v++ )
#define fore( x , j ) for( auto x : j )
#define se second
#define fr first
//#define c_b fflush(stdin);
#define debug(x , y) cerr << #x << " = " << x << y ;

const ll Long_max = numeric_limits < ll > :: max() ;
const int Int_max = numeric_limits < int > :: max() ;

void File_input( string pathIn ) {
    freopen( pathIn.c_str(), "r", stdin ) ;
}

void File_output( string pathOut ) {
    freopen( pathOut.c_str(), "w", stdout ) ;
}

int msg() {
    srand( time( 0 ) ) ;
    vector < string > st = {
        "Wish everyone high ratings!",
        "Good luck!",
        "Have fun!",
        "Please, read all the problems!",
        "Go Go fight!"
    } ;
    cerr << st[ rand() % sz( st ) ] ;
    return 0 ;
}

void FastInputOutput() {
    ios_base :: sync_with_stdio( 0 ) ;
    cin.tie( 0 ) ;
    cout.tie( 0 ) ;
}


ll n ;
string str ;
map < char , ll > a ;
map < map < char , ll > , ll > cnt ;

int main(){
 fast
 cin >> n ;
 while( n-- ){
    cin >> str ;
    a.clear() ;
    fore( i , str ) a[ i ]++ ;
    cnt[ a ]++ ;
 }

 ll ans = 0 ;

 fore( i , cnt ){
    ans += i.second * ( i.second - 1 ) / 2 ;
 }

 cout << ans ;

 return 0 ;
}

/*
A B C D
try to solve A , B in 30 min as possible
If their is subtask try to solve the second one first if the constraints are only differ
Read all Problem so you could find an ex that you can solve fast
A -- don't write big code focus again
B -- greedy , math , bit mask , tricks , DP
C -- solve A , B first then solve C but fast as possible
greedy
DP
binary search
DFS , BFS , DSU( detect a cycle , make sets )
bit mask
number theory , math
meet in the middle
focus on the problem and constraints.
*/


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

int min(int, int);

int main(){
    int N;
    int sum = 0;
    int s;
    int minimum = 999;
    int result;

    cin >> N;
    for(int i=0; i<N; ++i){
        cin >> s;
        sum += s;
        if(s % 10 != 0){ minimum = min(s, minimum); }
    }
    if(minimum == 999){ result = 0; }
    else if(sum % 10 == 0){ result = sum - minimum; }
    else{ result = sum;}
    cout << result << endl;
}

int min(int s, int minimum){
    return (s<minimum)?s:minimum;
}


Measured memory_bytes: 256
/*
[abc168] E - ∙ (Bullet)
*/

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;
#define ALL(c) (c).begin(), (c).end()

const int MAX_N = 2e5;
const int MOD = 1000000007;
const double INF = 2e18;
const double EPS = 1e-10;

class gf {
public:
    int n;
    gf() : n(0) {}
    gf(int n) : n(n < 0 ? n % MOD + MOD : n % MOD) {}
    gf operator+(gf x) { return gf((n + x.n) % MOD); }
    gf operator-(gf x) { return gf((n - x.n + MOD) % MOD); }
    gf operator*(gf x) { return gf((1LL * n * x.n) % MOD); }
    gf& operator+=(gf x) { return *this = (*this + x); }
    gf& operator-=(gf x) { return *this = (*this - x); }
    gf& operator*=(gf x) { return *this = (*this * x); }
};

int N;
ll A[MAX_N], B[MAX_N];

ll gcd(ll a, ll b) {
    a = abs(a), b = abs(b);
    while (b != 0) {
        swap(b, a %= b);
    }
    return a;
}

ll solve() {
    gf p2[MAX_N + 1];
    p2[0] = 1;
    for (int i = 0; i < N; i++) {
        p2[i + 1] = p2[i] * 2;
    }

    int z = 0;
    map<pii, int> m;
    for (int i = 0; i < N; i++) {
        if (A[i] == 0 && B[i] == 0) {
            z++;
            continue;
        }
        ll g = gcd(A[i], B[i]);
        pii p = B[i] >= 0 ? pii(A[i] / g, B[i] / g) : pii(-A[i] / g, -B[i] / g);
        m[p]++;
    }

    gf ans = 1;
    while (!m.empty()) {
        auto p = *m.begin();
        pii k = p.first;
        int x = p.second;
        int y = m[pii(-k.second, k.first)] + m[pii(k.second, -k.first)];
        ans *= p2[x] + p2[y] - 1;
        m.erase(k);
        m.erase(pii(-k.second, k.first));
        m.erase(pii(k.second, -k.first));
    }
    ans += z - 1;

    return ans.n;
}

int main() {
    cin >> N;
    for (int i = 0; i < N; i++) {
        cin >> A[i] >> B[i];
    }

    cout << solve() << endl;

    return 0;
}


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

using namespace std;

const int MAXN = 100 + 10;

int64_t f[MAXN][4][2][2];
char N[MAXN];
int K;

int64_t dfs(int len, int nonZeroCount, bool started, bool sameWithN) {
    if (!len) {
        return nonZeroCount == K ? 1 : 0;
    }
    if (nonZeroCount > K) {
        return 0;
    }
    int64_t& now = f[len][nonZeroCount][started][sameWithN];
    if (~now) {
        return now;
    }
    now = 0;
    int upper = sameWithN ? N[len] - '0' : 9;
    for (int i = 0; i <= upper; ++i) {
        now += dfs(len - 1, nonZeroCount + (i != 0), started | (i != 0), sameWithN & (i == upper));
    }
    return now;
}

int main() {
    ios::sync_with_stdio(false);
    cin >> (N + 1) >> K;
    memset(f, -1, sizeof(f));
    int len = strlen(N + 1);
    reverse(N + 1, N + 1 + len);
    cout << dfs(len, 0, false, true) << endl;
}

Measured memory_bytes: 256
#include <stdio.h>

int main() {
  int n, m;
  int A[10000], B[500];
  int i, j;
  int count = 0;

  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &A[i]);
  }
  scanf("%d", &m);
  for (i = 0; i < m; i++) {
    scanf("%d", &B[i]);
  }

  for (i = 0; i < m; i++) {
    for (j = 0; j < n; j++) {
      if (A[j] == B[i]) {
	count++;
	break;
      }
    }
  }

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


Measured memory_bytes: 2100
import java.util.*;
import java.io.*;
import java.lang.reflect.Array;

public class Main {
	public static void main(String[] args) {
		FastReader r = new FastReader();		
		int count = r.ri();
		int[] houses = r.ria();
		Arrays.sort(houses);
		print(houses[count-1]-houses[0]);
	}

	public static void rolling(int[] arr) {
		if (arr.length < 2)
			return;
		for (int i = 1; i < arr.length; i++)
			arr[i] += arr[i - 1];
	}
	
	public static void rolling(long[] arr) {
		if (arr.length < 2)
			return;
		for (int i = 1; i < arr.length; i++)
			arr[i] += arr[i - 1];
	}

	public static void reverse(int[] arr) {
		for (int i = 0; i < arr.length / 2; i++) {
			int temp = arr[i];
			arr[i] = arr[arr.length - 1 - i];
			arr[arr.length - 1 - i] = temp;
		}
	}
	
	public static String al(String s) {
		return s + "\n";
	}

	public static void print(String s) {
		System.out.println(s);
	}

	public static void print(long s) {
		System.out.println(s);
	}

	public static void print(int s) {
		System.out.println(s);
	}

	static class FastReader {
		BufferedReader br;
		StringTokenizer st;

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		int ri() {
			return Integer.parseInt(str());
		}

		long rl() {
			return Long.parseLong(str());
		}

		double rd() {
			return Double.parseDouble(str());
		}

		String str() {
			String str = "";
			try {
				str = br.readLine();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return str;
		}

		String[] rsa() {
			return str().split(" ");
		}

		int[] ria() {
			String[] s = rsa();
			int[] arr = new int[s.length];
			for (int i = 0; i < arr.length; i++)
				arr[i] = Integer.parseInt(s[i]);
			return arr;
		}

		long[] rla() {
			String[] s = rsa();
			long[] arr = new long[s.length];
			for (int i = 0; i < arr.length; i++)
				arr[i] = Long.parseLong(s[i]);
			return arr;
		}

		char[] rca() {
			String s = str();
			char[] arr = new char[s.length()];
			for (int i = 0; i < arr.length; i++)
				arr[i] = s.charAt(i);
			return arr;
		}
		
		String[] rsaml(int m) {
			String[] arr = new String[m];
			for (int i = 0; i < arr.length; i++)
				arr[i] = str();
			return arr;
		}

		int[] riaml(int m) {
			int[] arr = new int[m];
			for (int i = 0; i < arr.length; i++)
				arr[i] = Integer.parseInt(str());
			return arr;
		}

		long[] rlaml(int m) {
			long[] arr = new long[m];
			for (int i = 0; i < arr.length; i++)
				arr[i] = Long.parseLong(str());
			return arr;
		}
	}
}

class Node {
	public int val;
	public boolean visited;
	public Node(int v) { val=v; }
}

Measured memory_bytes: 21076
use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {
        mut a: i32,
        mut b: i32,
        mut c: i32,
        mut k: i32,
    }

    let ans = if k <= a {
        k
    } else if k <= a + b {
        a
    } else {
        a - (k - (a + b))
    };

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


Measured memory_bytes: 2164
#include<vector>
#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
#include<queue>
#include<stack>
#include<string.h>
#include<list>
#include<limits>
#define MOD 10000
#define INF 1000000000
#define MAX 101
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
int main() {
    ll N,W;
    cin>>N>>W;
    int w;
    vector<ll> v1,v2,v3,v4;
    for(int i=0;i<N;i++){
        ll ww,v;
        cin>>ww>>v;
        if(i==0){
            w=ww;
        }
        if(ww==w){
            v1.push_back(v);
        }else if(ww-w==1){
            v2.push_back(v);
        }else if(ww-w==2){
            v3.push_back(v);
        }else{
            v4.push_back(v);
        }
    }
    sort(v1.begin(),v1.end(),greater<ll>());
    sort(v2.begin(),v2.end(),greater<ll>());
    sort(v3.begin(),v3.end(),greater<ll>());
    sort(v4.begin(),v4.end(),greater<ll>());
    ll ans=0;
    for(ll i=0;i<=v1.size();i++){
        for(ll j=0;j<=v2.size();j++){
            for(ll k=0;k<=v3.size();k++){
                for(ll l=0;l<=v4.size();l++){
                    ll ws=w*i+(w+1)*j+(w+2)*k+(w+3)*l;
                    if(ws>W){
                        continue;
                    }
                    ll a=0;
                    for(int m=0;m<i;m++){
                        a+=v1[m];
                    }
                    for(int m=0;m<j;m++){
                        a+=v2[m];
                    }
                    for(int m=0;m<k;m++){
                        a+=v3[m];
                    }
                    for(int m=0;m<l;m++){
                        a+=v4[m];
                    }
                    if(a>ans){
                        ans=a;
                    }
                }
            }
        }
    }
    cout<<ans<<endl;
}
                           

Measured memory_bytes: 256
n = int(input())
if n==10**5:
    print('90909')
elif n >= 10000:
    print(str(910 + n-10000))
elif n >= 1000:
    print('909')
elif n >= 100:
    print(str(10 + n-100))
elif n >= 10:
    print('9')
else:
    print(str(n))

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

using namespace std;

int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  string s;
  cin >> s;
  n = s.size();
  vector<vector<int>> idx(26);
  for (int i = 0; i < n; i++) {
    idx[s[i] - 'a'].push_back(i);
  }
  for (int ch = 0; ch < 26; ch++) {
    int sz = idx[ch].size();
    for (int i = 0; i < sz; i++) {
      int l = idx[ch][i];
      int lo = i + 1, hi = sz - 1;
      while (lo <= hi) {
        int mid = (lo + hi) >> 1;
        int r = idx[ch][mid];
        int len = r - l + 1;
        int cnt = mid - i + 1;
        if (2 * cnt > len) {
          cout << l + 1 << " " << r + 1 << "\n";
          exit(0);
        } else {
          hi = mid - 1;
        }
      }
    }
  }
  cout << "-1 -1\n";
  return 0;
}

/*
0, 3, 4, 5, 7
0 1 2 3 4 5 6 7
e     e e e   e 
^      
*/


Measured memory_bytes: 1104
#include <bits/stdc++.h>
#include <stdio.h>
#include <numeric>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define repone(i,n) for(int i=1;i<(int)(n);++i)
#define repo(i,o,n) for(int i=o;i<(int)(n);++i)
#define Rep(j,n) for(int j=0;j<(int)(n);++j)
#define Repo(j,o,n) for(int j=o;j<(int)(n);++j)
#define Repone(j,n) for(int j=1;j<(int)(n);++j)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define int long long
#define pb(a) push_back(a)
#define eraser(v,i) (v).erase(v.begin()+(i))
#define pbpair(a,b) push_back(make_pair(a,b))
#define MOD 1000000007
#define INF 9223372036854775807
#define pairint pair<int,int>
int num[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
bool uru(int checkyear){if(checkyear%4==0){if(checkyear%100!=0||checkyear%400==0)return true;}return false;}
int gcd( int x, int y ){return y ? gcd(y, x%y) : x;}
signed main() {
    int z=0,w=0,n=0,m=0;
    char x,y;
    cin >>x>>y;
    if((int)x>(int)y)cout << ">";
    else if((int)x==(int)y)cout << "=";
    else cout << "<";
    return 0;
}

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

#define pb push_back
#define sz size()
#define clr clear()
#define rep(i,a) for(int i=0;i<(int)(a);i++)

using namespace std;

typedef vector<double> vec;
typedef vector<vec> mat;
const double EPS = 1e-8;

vec gauss_jordan(const mat& A, const vec& b){
  int n = A.size();
  mat B(n,vec(n+1));
  rep(i,n)rep(j,n)B[i][j] = A[i][j];
  rep(i,n)B[i][n] = b[i];

  rep(i,n){
    int p = i;
    for(int j=i;j<n;j++)
      if(abs(B[j][i]) > abs(B[p][i]))p = j;
    swap(B[i],B[p]);
    
    if(abs(B[i][i]) < EPS)return vec();
    
    for(int j=i+1;j<=n;j++)B[i][j] /= B[i][i];
    rep(j,n)
      if(i != j)
	for(int k=i+1;k<=n;k++)B[j][k] -= B[j][i] * B[i][k];
  }
  vec x(n);
  rep(i,n)x[i] = B[i][n];
  return x;
}

int main(){
  mat m(3,vec(3));
  vec v(3),x(3);
  
  rep(i,3)cin >> x[i];
  rep(i,3){
    cin >> v[i]; v[i] -= x[i];
  }
  rep(i,3)rep(j,3){
    cin >> m[j][i]; m[j][i] -= x[j];
  }
  
  vec s = gauss_jordan(m,v);
  bool f = false;
  rep(i,3)if(s[i]<-EPS)f = true;
  if(accumulate(s.begin(),s.end(),0.0)+EPS<1.0)f = true;
  cout << (f?"HIT":"MISS") << endl;
}

Measured memory_bytes: 1240
#include <bits/stdc++.h>
#define int long long
#define N 100010
using namespace std;
const int INF = 1LL<<55;
const int mod = (1e9)+7;
const double EPS = 1e-8;
const double PI = 6.0 * asin(0.5);
template<class T> T Max(T &a,T b){return a=max(a,b);}
template<class T> T Min(T &a,T b){return a=min(a,b);}
int n;
int mod_pow(int x,int n,int mod){
  int res=1;
  while(n){
    if(n%2) res=res*x%mod;
    x=x*x%mod;
    n/=2;
  }
  return res;
}

int f(int a){return mod_pow(a,n,n);}
int F(int a,int k){
  if(k == 1) return f(a);
  return F(f(a),k-1);
}

int mem[100];
int F2(int a,int k){
  if(k == 1) return mem[a] = f(a);
  return mem[a] = mod_pow(mem[a],n,n);
}

double calcTime(){
  static clock_t start = clock();// ??????????????????
  clock_t end = clock();     // ????????????
  return (double)(end - start) / CLOCKS_PER_SEC;
}

bool check(int k){
  int res = 1;
  for(int i=2;i<min(5LL,n);i++){
    int a = i;
    if(F(a,k) != a) res = 0;
  }
  return res;
}


int solve(){
  int cnt = 0;
  for(int k=1; calcTime() < 1000;k++,cnt++) if(check(k)) return k;
  return -1;
}
void factor(int n){
  for(int i=1;i<=n;i++){
    if(n % i == 0) cout<<i<<" ";
  }
  cout<<endl;
}

int lcm(int a,int b){return (a/__gcd(a,b)) * b;}
int carmichealLambda(int n){
  int res = 1;
  if(n % 8 == 0) n/=2;

  auto compute = [&](int i){
    int sub = i - 1;
    n/=i;
    while(n%i == 0) n/=i, sub *=i;
    res = lcm(res,sub);
  };

  for(int i=2;i*i<=n;i++) if( n % i == 0) compute(i);
  if(n != 1) compute(n);
  return res;
}

signed main(){
  cin>>n;
  int car = carmichealLambda(n);
  int car2 = carmichealLambda(car);
  if(car == 1) {cout<<1<<endl;return 0;}
  
  //cout<<"car="<<car<<endl;
  //cout<<"car2="<<car2<<endl;
  //cout<<"mod"<<mod_pow(n,car2,car)<<endl;

  int ans = car2;
  if(mod_pow(n,1,car)==1) ans = 1;

  for(int i=1;i*i<=car2;i++){
    if(mod_pow(n,car2/i,car) == 1) Min(ans,car2/i);
    if(mod_pow(n,i,car) == 1) Min(ans,i);
  }
  if(mod_pow(n,car2,car) !=  1)cout<<-1<<endl;
  else cout<<ans<<endl;
  return 0;
}

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

typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;

#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define mod (ll)(1e9+7)
#define int ll

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

signed main() {
  int w, h, n;
  cin >> w >> h >> n;
  P wd[100001], yd[100001];
  int ans = 1145141919810;
  int kx = 0, ky = 0;
  rep(i, 0, n) {
    int x, y;
    cin >> x >> y;
    wd[i] = {x, y};
    yd[i] = {y, x};
    // kx = max(kx, x);
    // ky = max(ky, y);
  }

  //ans = min(kx, ky);

  sort(wd, wd + n);
  sort(yd, yd + n);
  int mx = 0, my = 0;
  dep(i, n - 1, 0) {
    ans = min(ans, wd[i].first + my);
    my = max(my, wd[i].second);
  }
  dep(i, n - 1, 0) {
    ans = min(ans, yd[i].first + mx);
    mx = max(mx, yd[i].second);
  }
  cout << ans << endl;
}



Measured memory_bytes: 6356
// https://atcoder.jp/contests/abcXXX/tasks/abcXXX_x

#include <iostream>
#include <vector>

using namespace std;
using ll = long long;

struct C {
    vector<ll> A_{};
    vector<ll> B_{};

    explicit C(vector<ll> A, vector<ll> B) : A_(move(A)), B_(move(B)){}
    ll resolve() {
        ll N = B_.size();
        ll amount=0;
        for(int i=0; i < N; ++i) {
            ll B0 = min(B_[i], A_[i]);
            amount += B0;
            ll B1 = min(A_[i+1], B_[i] - B0);
            amount += B1;
            A_[i+1] -= B1;
        }
        return amount;
    };
};

int main() {
    ll N;
    cin >> N ;
    vector<ll> A{};
    vector<ll> B{};
    for (int i=0; i < N+1; ++i) {
        ll x;
        cin >> x;
        A.emplace_back(x);
    }
    for (int i=0; i < N; ++i) {
        ll x;
        cin >> x;
        B.emplace_back(x);
    }
    C c{move(A), move(B)};
    cout << c.resolve() << endl;
    return 0;
}


Measured memory_bytes: 2548
#include<stdio.h>
#include<stdlib.h>

int cmp(const void*a,const void *b){
  return *(int*)b - *(int*)a;
}

int main(){
  int n,a[100],i,s=0;
  scanf("%d",&n);
  for(i=0;i<n;i++)scanf("%d",&a[i]);
  qsort(a,n,sizeof(int),cmp);
  for(i=0;i<n;i++){
    if(i%2) s-=a[i];
    else s+=a[i];
  }
  printf("%d",s);
}

Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
const int mxN=10;
int n;
pair<int,int> v[mxN];
int fat[mxN];
int mapa[mxN];
double resp;
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cin>>n;
    for(int i=0;i<n;i++){
        mapa[i]=n-i-1;
        cin>>v[i].first>>v[i].second;
    }
    fat[0]=1;
    for(int i=1;i<mxN;i++){
        fat[i]=fat[i-1]*i;
    }
    for(int i=0;i<fat[n];i++){
        bool val=next_permutation(mapa,mapa+n);
        for(int i=0;i<n-1;i++){
            //cout<<v[i].first<<" "<<v[i].second<<" "<<v[i+1].first<<" "<<v[i].second<<"\n";
            resp+=(double)(sqrt(pow(v[mapa[i]].first-v[mapa[i+1]].first,2)+ pow(v[mapa[i]].second-v[mapa[i+1]].second,2)));
        }
        //cout<<fixed<<setprecision(10)<<(double)(resp)<<"\n";
    }
    cout<<fixed<<setprecision(10)<<(double)(resp/fat[n]);

}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main() {
	int x1,y1,x2,y2,x3,y3,x4,y4;
	cin>>x1>>y1>>x2>>y2;
	x3=x2-(y2-y1);
	y3=y2+(x2-x1);
	x4=x1-(y2-y1);
	y4=y1+(x2-x1);
	cout<<x3<<' '<<y3<<' '<<x4<<' '<<y4;
}

Measured memory_bytes: 256
import java.util.Scanner;

class Main{
  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    String[] STRINGS = new String[3];
    for(int i=0; i<3; i++){
      STRINGS[i] = scanner.next();
    }
    scanner.close();

    int[] index = new int[3];
    int turn = 0;
    char[] ans = {'A', 'B', 'C'};
    boolean isEnd = false;
    while(!isEnd){
      index[turn]++;
      for(int i=0; i<3; i++){
        if(index[i] == STRINGS[i].length()+1){
          System.out.println(ans[i]);
          isEnd = true;
          break;
        }
      }
      if(isEnd){
        break;
      }
      switch(STRINGS[turn].charAt(index[turn]-1)){
        case 'a':
          turn = 0;
          break;
        case 'b':
          turn = 1;
          break;
        case 'c':
          turn = 2;
          break;
      }
    }
  }
}


Measured memory_bytes: 21844
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();

		int g = 0;
		for ( int i=0; i<n; i++ ) {
			int a = sc.nextInt();
			if ( i%2==0 && a%2==1 ) g++;
		}

		System.out.println(g);
	}
}


Measured memory_bytes: 35848
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

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

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()
  l=LI()

  ans=l[0]

  for i in range(len(l)-1):
    ans+=min(l[i],l[i+1])
  ans+=l[-1]

  return ans

# main()
print(main())


Measured memory_bytes: 6832
#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm(c++17)
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
#include<unordered_map>//イテレータあるけど順序保持しないmap
#include<unordered_set>//イテレータあるけど順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列
using namespace std;

typedef long long ll;
typedef vector<ll> vll;
typedef vector<int> vi;

//マクロ
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=(a);i<=(b);i++)
#define FORD(i,a,b) for(ll i=(a);i>=(b);i--)
#define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))
#define INF 1000000000000 //10^12
#define MOD 1000000007 //10^9+7
#define MAXR 100000 //10^5:最大のrange(素数列挙などで使用)

int main(void){
    int a, b;
    cin >> a >> b;
    if(a==0 || b==0) {
        cout << "Zero" << endl;
        return 0;
    }
    if(a<0 && b>0) {
        cout << "Zero" << endl;
        return 0;
    }
    if(a>0 && b>0) {
        cout << "Positive" << endl;
        return 0;
    }
    int num = b - a + 1;
    if(num%2 == 0) {
        cout << "Positive" << endl;
        return 0;
    } else {
        cout << "Negative" << endl;
        return 0;
    }
}

Measured memory_bytes: 256
X,K,D = map(int,input().split())
result = 0
if X < 0:
  X = X * -1
  
if X >= K * D:
  print(X - K * D)
  exit(0)
else:
  valueA = X % D - D
  if valueA < 0:
    valueA = valueA * -1
  valueB = X % D + D
  if valueB < 0:
    valueB = valueB * -1
  if (K - (X // D)) % 2 == 0:
    result = X % D
  elif (X % D - D) == ((X % D) * -1):
    result = X % D
  elif valueA < valueB:
    result = valueA
  else:
    result = valueB
if result < 0:
  print(result * -1)
else:
  print(result)

Measured memory_bytes: 9144
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cstring>
#include<ctime>
#include<algorithm>
using namespace std;

int main()
{
    int x, y, z, b;
    float a;
    while(~scanf("%d %d %d", &x, &y, &z)){
    	y + 2 * z <= x;
    	a = (float)(x - z)/(y + z);
    	b = a;
    	printf("%d\n",b);
    }
    return 0;
}

Measured memory_bytes: 128
#include <stdio.h>
#include <stdlib.h>

int int_sort(const void *a, const void *b) {
  //if(*((int *)a + sizeof(int)) < *((int *)b + sizeof(int))) {
  if(*(int *)a < *(int *)b){
    return -1;
  //}else if(*((int *)a + sizeof(int)) == *((int *)b + sizeof(int))) {
  }else if(*(int *)a == *(int *) b){
    return 0;
  }
  return 1;
}

int main(){
  int h,w,n;
  scanf("%d%d%d",&h,&w,&n);
  int bl[n][2];
  int i = 0;
  for (i=0;i<n;i++) {
    scanf("%d%d",&bl[i][0],&bl[i][1]);
  }
  int ans = h;
  if(n > 0){
    qsort(bl, n, sizeof(int)*2, int_sort);
    int blocked = 0;
    for(i=0;i<n;i++){
      if(bl[i][0]>bl[i][1]+blocked){
        ans = bl[i][0]-1;
        break;
      }else if(bl[i][0]==bl[i][1]+blocked){
        blocked++;
      }
    }
  }
  printf("%d\n",ans);
}


Measured memory_bytes: 3324
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#pragma GCC optimize("Ofast")
//*********************************************DO IT NOW****************************************************************
#include<bits/stdc++.h> 
#include<random>
#define int long long   
#define pp pair<int,int> 
#define ss second 
#define ff first 
#define pb push_back
#define mod 1000000007
#define pi 3.14159265359
#define mk(arr,n,type)  type *arr=new type[n];
#define sl s1.length();
#define yes cout<< "YES"<<endl
#define no  cout<< "NO"<<endl
#define all(v) (v).begin(),(v).end()
#define s(v)   sort(v,v+n)
#define  mt mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define read(a,n) for(int i=0;i<n;i++)cin>>a[i]
#define print(a,n) for(int i=0;i<n;i++)cout<<a[i]<<" "
#define for1(i,a,n)  for(int i=0;i<n;i++)
#define rep(i, c) for(int i = 0; i < (int)c; i++)
using namespace std;
//**********************************************DO IT NOW***************************************************************
void fastio()
{  
  #ifndef ONLINE_JUDGE
  freopen("INPUT.txt","r",stdin);
  freopen("OUTPUT.txt","w",stdout); 
  #endif
  ios_base :: sync_with_stdio(false); 
  cin.tie(NULL) ; 
  cout.tie(NULL);
}
int dp[101][1001],ans1=1e9,dp1[1000001];
int num[10];
int a[1000000];
signed main()
{   
    fastio();
    int t=1;
   // cin>>t;
    while(t--)
    { 
       int a,b,c,d;
       cin>>a>>b>>c>>d;
       int ma=max(a*c,a*d);
       int amx=max({ma,b*c,b*d});
       cout<<amx;
       
    }
}

    
// 🍪 🍪 🍪


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

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

 if(s == 'a' || s == 'e' || s == 'i' || s == 'o' || s == 'u' ){
   cout << "vowel"  << endl;
  } else {
cout << "consonant" << endl;
}
}


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

int main () {
    int n;
    cin >> n;
    vector<int> ans(n);
    rep(i, n-1) {
        int a;
        cin >> a;
        ans.at(a - 1)++; //こーいう形でもいけるのかー
    }
    for (int x : ans) { //範囲forループ！
        cout << x << endl;
    }
}

Measured memory_bytes: 4028
import java.util.*;
public class Main{
  public static void main(String[] args) {
    Scanner sc=new Scanner(System.in);
    int a=sc.nextInt();
    int b=sc.nextInt();
    int x,y,z,s;
    x=a+b;
    y=a-b;
    z=a*b;
    if(x>y){
      s=x;
    }else{
      s=y;
    }
    if(s>z){
      System.out.println(s);
    }else{
      System.out.println(z);
    }
  }
}


Measured memory_bytes: 21844