akhauriyash/Code-Regression huggingface dataset:
#include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <vector>

const int MOD = 1e9 + 7;
const int iINF = 2147483647 / 2;
const long long int llINF = 9223372036854775807 / 2;

using namespace std;
using ll = long long int;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;

typedef pair<ll, ll> pll;
bool paircomp(const pll &a, const pll &b) {
  if (a.first == b.first)
    return a.second < b.second;
  return a.first < b.first;
}

#define REP(i, n) for (ll i = 0; i < (n); i++)
#define RREP(i, n) for (ll i = (n)-1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define AUTO(i, m) for (auto &i : m)
#define ALL(a) (a).begin(), (a).end()
#define MAX(vec) *std::max_element(vec.begin(), vec.end())
#define MIN(vec) *std::min_element(vec.begin(), vec.end())
#define ARGMAX(vec)                                                            \
  std::distance(vec.begin(), std::max_element(vec.begin(), vec.end()))
#define ARGMIN(vec)                                                            \
  std::distance(vec.begin(), std::min_element(vec.begin(), vec.end()))
#define REV(T) greater<T>()
#define PQ(T) priority_queue<T, vector<T>, greater<T>>
#define VVL(a, b, c) vector<vector<ll>>(a, vector<ll>(b, c))
#define VV(T, a, b, c) vector<vector<T>>(a, vector<T>(b, c))
#define VVVL(a, b, c, d)                                                       \
  vector<vector<vector<ll>>>(a, vector<vector<ll>>(b, vector<ll>(c, d)))
#define VVV(T, a, b, c, d)                                                     \
  vector<vector<vector<T>>>(a, vector<vector<T>>(b, vector<T>(c, d)))
#define SP(a) setprecision(a)
#define SQRT(a) sqrt((long double)(a))
#define DPOW(a, b) pow((long double)(a), (long double)(b))
#define UNIQUE(vec)                                                            \
  do {                                                                         \
    sort(ALL((vec)));                                                          \
    (vec).erase(std::unique(ALL((vec))), (vec).end());                         \
  } while (0)

ll MODPOW(ll n, ll m) {
  if (m == 0) {
    return 1;
  } else if (m % 2 == 0) {
    ll tmp = MODPOW(n, m / 2);
    return (tmp * tmp) % MOD;
  } else {
    return (n * MODPOW(n, m - 1)) % MOD;
  }
}

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

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ll N;
  cin >> N;
  vl C(N);
  REP(i, N) {
    cin >> C[i];
    C[i] %= MOD;
  }
  sort(ALL(C), REV(ll));
  ll ans = 0;
  REP(i, N) {
    ans += ((MODPOW(4, N - 1) * C[i]) % MOD * (i + 2)) % MOD;
    ans %= MOD;
  }
  cout << ans << endl;
  return 0;
}


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

typedef long long ll;
ll MOD = 1000000007;

int main()
{
    string S;
    cin >> S;
    int j, k;
    vector <int> a(S.size(), 0);
    for (int i = 0; i < S.size(); i+=j+k) {
        j = 0;
        k = 0;
        for (j = 0; S[i+j] == 'R'; j++);
        for (k = 0; S[i+j+k] == 'L'; k++);

        //cout << j << " " << k << endl;
        if (j%2) {
            a[i+j-1] += (j-1)/2 + 1;
            a[i+j] += (j-1)/2;
        } else {
            a[i+j-1] += j/2;
            a[i+j] += j/2;
        }

        if (k%2) {
            a[i+j-1] += (k-1)/2;
            a[i+j] += (k-1)/2 + 1;
        } else {
            a[i+j-1] += k/2;
            a[i+j] += k/2;
        }
    }
    for (int i = 0; i < S.size()-1; i++) cout << a[i] << " ";
    cout << a[S.size()-1] << endl;
    return 0;
}


Measured memory_bytes: 1024
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N,C,K = list(map(int,_in[0].split(' ')))  # type:list(int)
    T_arr = []
    for i in range(N):
        _ = int(_in[i+1])  # type:int
        T_arr.append(_)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    T_arr.sort()
    cnt = 0
    i = 0
    while True:
        c = 1
        tlim = T_arr[i]+K
        i += 1
        while i<N and T_arr[i]<=tlim and c+1<=C:
            i += 1
            c += 1
        cnt += 1
        if i>=N:
            break
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(cnt)


Measured memory_bytes: 64732
K = int(input())

ans = []
next_list = []
now_list = [""]
cnt = 0
while cnt < K:
    for now in now_list:
        if now == "":
            for i in range(1,10):
                next_list.append(str(i))
                ans.append(str(i))
                cnt += 1
        else:
            end = int(now[-1])
            for i in range(-1,2):
                i += end
                if i < 0 or i > 9:
                    continue
                next_list.append(now+str(i))
                ans.append(now+str(i))
                cnt += 1
    now_list = next_list
    next_list = []

print(ans[K-1])


Measured memory_bytes: 78684
#include <iostream>
using namespace std;
int main(void){
    int n,sum=0;
    int l,r;
    cin>>n;
    int s[n];
    for(int i=0;i<n;i++){
        cin>>s[i];
    }
    
    int q;
    cin>>q;
    int t[q];
    for(int i=0;i<n;i++){
        cin>>t[i];
    }
    
    for(int i=0;i<q;i++){
        l=0;
        r=n;
        while(1){
            int m=(l+r)/2;
            if(t[i]>s[m]){
                l=m;
            }
            else if(t[i]<s[m]){
                r=m;
            }
            else {
                sum++;
                break;
            }
            if(r-l==1){
                if(t[i]==s[l]) sum++;
                break;
            }
        }
    }
    cout<<sum<<endl;
    return 0;
}

Measured memory_bytes: 3560
#![allow(dead_code)]
#[allow(unused_imports)]
use proconio::{
    fastout, input,
    marker::{Bytes, Chars, Isize1, Usize1},
};
#[fastout]
fn main() {
    input!(n: usize, x: usize, m: usize);

    let mut ans = Vec::with_capacity(1000);
    ans.push(x);

    for i in 1..n {
        let buff = (ans[i - 1] * ans[i - 1]) % m;
        if ans.contains(&buff) {
            let pos = ans.iter().position(|x| *x == buff).unwrap();
            let ans_len = ans.len();
            let wa = ans_len - pos;

            let count = (n - ans_len) / wa;
            let count_m = (n - ans_len) % wa;

            let mut sum = ans.iter().take(ans_len - wa + count_m).sum::<usize>();

            sum += ans.iter().skip(ans_len - wa).sum::<usize>() * (count + 1);
            println!("{}", sum);
            return;
        }

        ans.push(buff);
    }

    println!("{}", ans.iter().sum::<usize>());
}


Measured memory_bytes: 2472
#include<bits/stdc++.h>
using namespace std;
#define int long long

 



signed main(){
	int n;cin>>n;


	vector<int> a(n),b(n),c(n);
	for(int i=0;i<n;i++){cin>>a[i]>>b[i];c[i]=a[i]+b[i];}
	sort(begin(c),end(c),greater<int>());
	int ap=0,bp=0;
	for(int i=0;i<n;i++){if(i%2==0)ap+=c[i];}
	for(int i=0;i<n;i++)bp+=b[i];
	cout<<ap-bp<<endl;

}



Measured memory_bytes: 2560
/**
 * @file B-FoodsLovedByEveryone.cpp
 * @author murnana
 * @brief B - Foods Loved by Everyone
 *      https://atcoder.jp/contests/abc118/tasks/abc118_b
 * @date 2019-02-16
 * 
 * @copyright Copyright (c) 2019
 * 
 */

#include <ios>
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
using namespace std;

/**
 * @brief Entry point
 * 
 * @return int 
 */
int main()
{
    // N人の人と、M種類の食べ物を受け取る
    int N, M;
    cin >> N >> M;
    vector<int> Food;

    // 最初の一人が好きなものについて調べる
    // それ以外は要らないので外す
    int K;
    cin >> K;
    for (int k = 0; k < K; ++k) {
        int like;
        cin >> like;
        Food.push_back(like);
    }

    // 次からは要らない数字だけを抽出する必要がある
    for (int n = 1; n < N; ++n) {
        cin >> K;
        vector<int> isLike;
        for (int k = 0; k < K; ++k) {
            int like;
            cin >> like;
            // Foodリストにあるものを追加していく
            auto isFind = find(Food.begin(), Food.end(), like);
            if (isFind != Food.end()) {
                isLike.push_back(like);
            }
        }
        // Foodリスト更新
        Food = isLike;
    }

    cout << Food.size() << endl;
    return 0;
}


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

string Dates[] = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };

int main() {
  string date;
  cin >> date;
  int di = -1;
  for (int i = 0; i < 7; i++)
    if (date == Dates[i])
      di = i;
  int ret = di == 0 ? 7 : 7 - di;
  cout << ret << endl;
  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define boost ios_base::sync_with_stdio(false), cin.tie(NULL);

using namespace std;
const int N = 2e5 + 4;
const int X[] = {1,0,-1,0,1,-1,1,-1};
const int Y[] = {0,1,0,-1,1,1,-1,-1};
const int mod = 1e9 + 7;
const long long INF = 1e18;
const int inf = 1e9;

map <char, int> mp;

int main () {
	string s;
	cin >> s;
	long long ans = 0;
	int n = s.size();
	for (int i = 0 ; i < n ; ++ i) {
		ans += i - mp[s[i]];
		mp[s[i]]++;
	}
	cout << ans + 1;
}

Measured memory_bytes: 640
#include<bits/stdc++.h>
using namespace std;
int main ()
{
    long long int a,b,n,m;
    int i,c=0,d=0;
    cin>>a>>b;
    n=min(a,b);
    m=max(a,b);
    for (i=n+1;i<m;i++)
    {
        if (abs(a-i)==abs(b-i))
        {
            cout<<i<<endl;
            return 0;
        }
    }

    cout<<"IMPOSSIBLE"<<endl;



}


Measured memory_bytes: 3564
#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define MAX 510000
#define rrep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep(i, n) for(ll i = 1; i <= (ll)(n); i++)
#define dcout cout<<fixed<<setprecision(15);

using namespace std;
typedef long long int  ll;
typedef pair<ll, ll> P;

constexpr int MOD = 1e9 + 7;
constexpr ll inf = 1LL << 60;

//lcm//
ll gcd(ll x, ll y) {
	if (x == 0) return y;
	return gcd(y%x, x);
}
ll lcm(ll x, ll y) { return x * y / gcd(x, y); }

//a^n mod p//
ll modpow(ll a, ll n, ll p) {
  if (n == 1) return a % p;
  if (n % 2 == 1) return (a * modpow(a, n - 1, p)) % p;
  ll t = modpow(a, n / 2, p);
  return (t * t) % p;
}

//inversemod//
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;
}

//Cmonp//
ll fac[MAX], finv[MAX], inv[MAX];
// 
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; 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;
	}
}

// 
ll COM(ll n, ll k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

//LARGE n
ll com(ll n,ll m){
    if(n<m || n<=0 ||m<0){
		return 0;
	}
	if( m==0 || n==m){
		return 1;
	}
	ll k=1;
	for(ll i=1;i<=m;i++){
       k*=(n-i+1); 
	   k%=MOD;
	   k*=modinv(i,MOD);
	   k%=MOD;
	}
	return k;
}

//radP
ll rad(ll u, ll p){
ll cnt=0;
	while(u%p==0){
		u/=p;
		cnt++;
	}
	return cnt;
}


////////////////////////////////////////////////////////////////////

int main() {

string s;
  cin>>s;
string p;
if(s=="ABC")p="ARC";
else p="ABC";
cout<<p<<endl;
return 0;


}



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

#define IOS                               \
	ios_base::sync_with_stdio(false); \
	cin.tie(0);                       \
	cout.tie(0);                      \
	cout.precision(20);               \
	cout << fixed;
#define pb push_back
#define endl "\n"
#define all(a) a.begin(), a.end()
#define N 500009
#define M 1000009
#define mod 1000000007
int powi(int a,int b){if (b == 0)return 1;int see = powi(a, b / 2);see *= see;see %= mod;if (b % 2)see *= a;see %= mod;return see;}

double n;

void pre(){
}

int32_t main()
{
	IOS;
	pre();
	cin>>n;
	cout<<(((int)(n+1)/2))/n;	
}

Measured memory_bytes: 256
#include <iostream>

using namespace std;

int main()
{
    int a;
    bool verif=false;
    cin>>a;
    for(int i=1;i<10;i++)
    {
        for(int j=1;j<10;j++)
        {
            if (i*j==a)
                verif=true;

        }
    }
    if (verif)
        cout<<"Yes";
    else
        cout<<"No";
    return(0);
}


Measured memory_bytes: 256
#include <iostream>
using namespace std;
long long gcd(long long a,long long b){
    if(b==0){
        return a;
    }
    return gcd(b,a%b);
}
int main(void){
    // Your code here!
    long long a,b;
    cin>>a>>b;
    cout<< a*b/gcd(a,b);
}


Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#include<queue>

using namespace std;
using lli = long long int;

int main() {
	int N, M;
	cin >> N >> M;
	map<int, int>m;
	for (int i = 0; i < N; i++) {
		int k;
		cin >> k;
		for (int i = 0; i < k; i++) {
			int tmp;
			cin >> tmp;
			m[tmp]++;
		}
	}
	int ans = 0;
	for (int i = 1; i <= M; i++) {
		if (m[i] == N) {
			ans++;
		}
	}
	cout << ans << endl;
	return 0;
}


Measured memory_bytes: 256
from operator import mul
from functools import reduce

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

n,m=map(int,input().split())
if n>=2 and m>=2:print(cmb(n,2)+cmb(m,2))
elif n>=2:print(cmb(n,2))
elif m>=2:print(cmb(m,2))
else:print(0)

Measured memory_bytes: 3572
#include <iostream>
#include <vector>
using namespace std;
 
int main(){
	int N, M, C;
	cin >> N >> M >> C;
	vector<int> B(M);
	vector<vector<int>> A(N);

	for(int i=0;i<M;i++){
		cin >>B[i];
	}
	for(int i = 0;i<N;i++){
		vector<int> IN(M);
		for(int j=0;j<M;j++){
			cin >> IN[j];
		}
		A[i] = IN;
	}
	int count = 0;
	for(int i=0;i<N;i++){
		int sum = 0;
		for(int j=0;j<M;j++){
			sum += A[i][j] * B[j];
		}
		sum += C;
		if(sum > 0) count++;
	} 
	cout << count << endl;
}


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

using namespace std;

typedef long long LL;
typedef vector<int>    VI;
typedef vector<bool>   VB;
typedef vector<string> VS;

#define MP make_pair
#define PB push_back
#define ALL(x)  (x).begin(),(x).end()
#define rep(i, N)  for (int i = 0; i < (int)(N); i++)
#define REP(i, init, N)  for (int i = (init); i < (int)(N); i++)
#define DUMP( x ) cerr << #x << " = " << ( x ) << endl

int n, r;
VI ps, cs;
VI cards;

int main(void) {
	while (1) {
		cards.clear();
		ps.clear();
		cs.clear();
		cin >> n >> r;
		if (n ==  0 && r == 0) break;
		rep (i, n) {
			cards.PB(n - i);
		}
		rep (i, r) {
			int p, c;
			cin >> p >> c;
			ps.PB(p);
			cs.PB(c);
		}
		rep (i, r) {
			VI temp;
			REP (j, ps[i] - 1, ps[i] + cs[i] - 1) {
				temp.PB(cards[j]);
			}
			rep (j, ps[i] - 1) {
				temp.PB(cards[j]);
			}
			REP (j, ps[i] + cs[i] - 1, cards.size()) {
				temp.PB(cards[j]);
			}
			cards = temp;
		}
		cout << cards[0] << endl;
	}
	return 0;
}

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

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int m_x = 0;
        String s = sc.next();
        String t = sc.next();
        
        for(int i=0;i<s.length()-t.length()+1;i++){
            String sub = s.substring(i,i+t.length());
            int c = monmo(sub,t);
            if(m_x < c)m_x = c;
        }
        
        System.out.println(t.length()-m_x);
    }
    
    static int monmo(String sub,String t){
        int count=0;
        //String subArray[] = sub.split("");
        //String tArray[] = t.split("");
        for(int i=0;i<t.length();i++){
            char subA = sub.charAt(i);
            char tA = t.charAt(i);
            //if(subArray[i].equals(tArray[i]))count++;
            if(subA == tA)count++;
        }
        
        return count;
    }
}


Measured memory_bytes: 35796
#include<stdio.h>
int main(void)
{
  int a,b,x;
  scanf("%d",&x);
  scanf("%d",&a);
  scanf("%d",&b);
  
  int money;
  int c;
  
  money= x - a;
  while(money>=0)
  {
    money-=b;
  }
  printf("%d",money+b);
  return 0;
}

Measured memory_bytes: 128
//
//AtCoder Beginner Contest 176
//B
//

#include <iostream>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <ctime>
#include <queue>
#include <map>
#include <set>
#include <tuple>
#include <functional>
#include <cassert>
#include <bitset>

using namespace std;

#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)
#define ALL(x) (x).begin(),(x).end()
#define RALL(x) (x).rbegin(),(x).rend()
#define SIZE(x) (int)(x).size()
#define SIZEL(x) (ll)(x).size()
#define MSG(a) cout << #a << " " << a << endl;

using ll = long long;
using ld = long double;
using Graph = vector<vector<int>>;

const double PI = 3.14159265358979323846;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

ll gcd(ll x, ll y) { return (x % y)? gcd(y, x % y): y; }    //最大公約数
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }            //最小公倍数

int main()
{
    string n;
    cin >> n;
    ll sum=0;
    REP(i,n.size()){
        sum+=n[i]-0x30;
    }
    cout << ((sum%9==0) ? "Yes" : "No") << endl; 
    return 0;
}


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

int main(){
  int x, y, s;
  while(cin >> x >> y >> s, x || y || s){
    int mx = 0;
    for(int i = 1; i < s; i++){
      for(int j = 1; i + j <= s ; j++){
        if((i * (100 + x) / 100) + (j * (100 + x) / 100) == s){
          mx = max(mx, (i * (100 + y) / 100) + (j * (100 + y) / 100));
          break;
        }
      }
    }
    cout << mx << endl;
  }
}

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

int main(){
  int n,i,sum;
  cin >> n;
  sum=0;
  vector<int> h(n+1,0);
  for(i=0;i<n;++i){
    cin >> h[i];
  }
  for(i=0;i<=n;++i){
    if(h[i]>h[i+1]){
      sum=sum+h[i];
      sum=sum-h[i+1];
    }
  }
  cout << sum << endl;
  return 0;

}


Measured memory_bytes: 256
from heapq import heappush, heappushpop

def main():
    INF = 10 ** 18

    sum_B = 0
    L, R = [INF], [INF]
    sum_L = sum_R = 0

    A = map(int, open(0).read().split())

    Q = next(A)
    for _ in range(Q):
        q = next(A)
        if q == 1:
            a, b = next(A), next(A)

            sum_B += b

            if len(L) > len(R):
                l = -L[0]
                if a >= l:
                    heappush(R, a)
                    sum_R += a
                else:
                    heappushpop(L, -a)
                    sum_L += a - l
                    heappush(R, l)
                    sum_R += l
            elif len(L) == 0:
                heappush(R, a)
                sum_L += a
            else:
                r = R[0]
                if a <= r:
                    heappush(L, -a)
                    sum_L += a
                else:
                    heappushpop(R, a)
                    sum_R += a - r
                    heappush(L, -r)
                    sum_L += r

        else:
            median = -L[0]
            res = (median * len(L) - sum_L) + (sum_R - median * len(R)) + sum_B
            print(median, res)

if __name__ == '__main__':
    main()


Measured memory_bytes: 43632
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <cmath>
#include <cstdio>
#include <istream>
#include <sstream>
#include <iomanip>
#include <iterator>
#include <climits>
using namespace std;

typedef ostringstream OSS;
typedef istringstream ISS;

typedef vector<int> VI;
typedef vector< VI > VVI;

typedef long long LL;

typedef pair<int, int> PII;
typedef vector<PII> VPII;

#define X first
#define Y second

const LL MOD = 1000000007;

template<typename T>
void dump(T a, int n) { for (int i = 0; i < n; i++) cout << a[i] << (i == n - 1 ? '\n' : ' '); }

template<typename T>
void dump(T a) { dump<T>(a, a.size()); }

constexpr int INF = INT_MAX;

int main(void) {
	for (int N; cin >> N, N;) {
		VVI T(N, VI(N + 1));
		for (int i = 0; i < N; ++i) {
			for (int j = 0; j <= N; ++j) {
				cin >> T[i][j];
			}
		}

		//

		VI dp(1 << N, INF);
		dp[0] = 0;
		priority_queue<PII, VPII, greater<PII>> q;
		q.push(make_pair(0, 0));

		while (q.size()) {
			int cur_time = q.top().first;
			int p = q.top().second;
			q.pop();

			if (cur_time > dp[p]) {
				continue;
			}

			for (int i = 0; i < N; i++) if (1 << i & ~p) {
				int n = p | (1 << i);
				int cost = T[i][0];
				for (int j = 0; j < N; j++) if (1 << j & p) {
					cost = min(cost, T[i][j + 1]);
				}
				
				int next_time = cur_time + cost;
				if (dp[n] > next_time) {
					dp[n] = next_time;
					q.push(make_pair(next_time, n));
				}
			}
		}

		cout << dp[(1 << N) - 1] << endl;		
	}

	return 0;
}

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

int main() {
	double x1, x2, y1, y2, x, y;
	cin >> x1 >> y1 >> x2 >> y2;
	x = x1 - x2;
	y = y1 - y2;
	cout << fixed << setprecision(4) << sqrt(x*x + y*y) << endl;
	return 0;
}

Measured memory_bytes: 1280
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;
 
#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
 
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;

int main() {
    int n;
    while (cin >> n && n){
        VI a(n);
        REP(i,n) cin >> a[i];
        VVI dp(n, VI(n+1));
        REP(i,n-1) if (abs(a[i] - a[i+1]) <= 1) dp[i][i+2] = 1;
        for (int d = 4; d <= n; d += 2){
            REP(i,n+1-d){
                FOR(j,i,i+d-1) if (dp[i][j] && dp[j][i+d]) dp[i][i+d] = 1;
                if (dp[i+1][i+d-1] && abs(a[i]-a[i+d-1]) <= 1) dp[i][i+d] = 1;
            }
        }
        
        VI dp2(n+1);
        REP(i,n){
            int ma = 0;
            REP(j,n+1){
                if (dp[i][j]) ma = max(ma, j - i);
                dp2[j] = max(dp2[j], dp2[i] + ma);
            }
        }
        int ans = 0;
        REP(i,n+1) ans = max(ans, dp2[i]);
        cout << ans << endl;
    }

    return 0;
}

Measured memory_bytes: 3216
#include<bits/stdc++.h>
using namespace std;
#define fine cout<<"fine"<<endl;
#define ll long long int
#define pb push_back
#define FASTIO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define ff first
#define ss second
#define all(v) v.begin(),v.end()
const ll inf=(ll)2e18;
const int mod=1e9+7;
bool overflow(ll a,ll b){
    if (a <= (inf+b-1)/b) return false;
    return true;
}
int main(){
FASTIO;
int x,n,i;
cin>>x>>n;
int aux[105];
memset(aux,0,sizeof(aux));
for(i=0;i<n;i++){
    int num;
    cin>>num;
    aux[num]++;
}
for(i=0;i<=100;i++){
    if(x-i>=0&&!aux[x-i]){
        cout<<x-i<<endl;
        return 0;
    }
    if(i+x<105&&!aux[i+x]){
        cout<<i+x<<endl;
        return 0;
    }
}
}


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

using namespace std;

int main()
{
        int n, q;
        queue<string> name;
        queue<int> time;

        cin >> n >> q;
        string ntemp;
        int ttemp;
        for(int i = 0; i < n; i++){
                cin >> ntemp >> ttemp;
                name.push(ntemp);
                time.push(ttemp);
        }

        vector<string> nans;
        vector<int> tans;
        int t = 0;
        while(!name.empty()){
                ttemp = time.front();
                if(ttemp <= q){
                        t += ttemp;
                        nans.push_back(name.front());
                        tans.push_back(t);
                        name.pop();
                        time.pop();
                }else{
                        t += q;
                        ttemp = time.front()-q;
                        ntemp = name.front();
                        time.pop();
                        name.pop();
                        time.push(ttemp);
                        name.push(ntemp);
                }
        }

        for(int i = 0; i < nans.size(); i++){
                cout << nans[i] << ' ' << tans[i] << endl;
        }

        return 0;
}

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

using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;
using pll = pair<ll,ll>;

#define INF (1LL << 60)
#define MOD 1000000007
#define PI 3.14159265358979323846

#define REP(i,m,n) for(ll (i)=(m),(i_len)=(n);(i)<(i_len);++(i))
#define FORR(i,v) for(auto (i):v)
#define ALL(x) (x).begin(), (x).end()
#define PR(x) cout << (x) << endl
#define PS(x) cout << (x) << " "
#define SZ(x) ((ll)(x).size())
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define REV(x) reverse(ALL((x)))
#define ASC(x) sort(ALL((x)))
#define DESC(x) ASC((x)); REV((x))
#define pb push_back
#define eb emplace_back

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

    map<char,ll> C;
    ++C[S[0]];
    char f = S[0];
    REP(i,1,SZ(S)) {
        if(f != S[i]) {
            ++C[S[i]];
            f = S[i];
        }
    }
    PR(C['B']+C['W']-1);
    

    return 0;
}

/*



*/

Measured memory_bytes: 3728
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <functional>
#include <cstdlib>
int main()
{
    long long int n,m,a=1;
    scanf("%lld%lld", &n, &m);
    for(long long int i=1;i*i<=m;i++)
    {
        long long int t = i;
        if(m%t == 0)
        {
            if(t*n <= m) a = std::max(a, t);
            t = m/t;
            if(t*n <= m) a = std::max(a, t);
        }
    }
    printf("%lld\n", a);
}

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

int main() {
    string s;
    cin >> s;
    int len = s.size();
    vector<int> a(26);
    for (int i = 0; i < len; i++) {
        if (a.at(s.at(i) - 'a') >= 1) {
            cout << "no" << endl;
            return 0;
        }

        a.at(s.at(i) - 'a')++;
    }
    cout << "yes" << endl;
}   

Measured memory_bytes: 256
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
#     combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

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

def main():
    s = input()
    t = input()
    if s==t[:-1:]:
        print("Yes")
    else:
        print("No")
    return

if __name__=='__main__':
    main()


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

#define int long long
#define fi first
#define se second
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rep1(i,n) for(int i=1;i<=(int)(n);++i)
#define rep11(i,n) for(int i=1;i<(int)(n);++i)
#define repo(i,o,n) for(int i=o;i<(int)(n);++i)
#define repm(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define sperase(v,n) (v).erase(remove(all(v), n), (v).end())
#define vdelete(v) (v).erase(unique(all(v)), (v).end())
#define pb(n) push_back(n)
#define mp make_pair
#define MOD 1000000007
#define INF 9223372036854775807

int n,m,a,b,c;

signed main() {
    cin >> a >> b;
    cout << (a*3)/2+((a*3)%2+b)/2 << endl;
}


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

using ll = int64_t;
const int MAX = 2e5;

int32_t main()
{
    ios::sync_with_stdio(false), cin.tie(nullptr);
    int n; cin >> n;
    map<string, int> cnt;
    while (n--) {
        string s; cin >> s;
        cnt[s]++;
    }
    cout << "AC x " << cnt["AC"] << '\n';
    cout << "WA x " << cnt["WA"] << '\n';
    cout << "TLE x " << cnt["TLE"] << '\n';
    cout << "RE x " << cnt ["RE"] << '\n';


    return 0;
}

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

int main(){
    double a, x1, x2, y1, y2;
    cin >> x1 >> y1 >> x2 >> y2;
    a = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
    cout << fixed << setprecision(10) << a << endl;
    return 0;
}


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

int main() {
    int N, M;
    cin >> N >> M;
    vector<pair<int, int>> key;
    for (int i = 0; i < M; ++i) {
        int a, b;
        cin >> a >> b;
        int s = 0;
        for (int j = 0; j < b; ++j) {
            int c;
            cin >> c;
            c--;
            s |= 1<<c;
        }
        key.emplace_back(s, a);
    }

    const int INF = 1001001001;
    vector<int> dp(1<<N, INF);
    dp[0] = 0;
    for (int s = 0; s < (1<<N); s++) {
        for (int i = 0; i < M; ++i) {
            int t = s | key[i].first;
            int cost = dp[s] + key[i].second;
            dp[t] = min(dp[t], cost);
        }
    }

    int ans = dp.back();
    if (ans == INF) cout << -1 << endl;
    else cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.StringTokenizer;

public class Main {
	
	public static void main(String[]args) throws Throwable {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		String str = sc.next();
		int w = sc.nextInt();
		int n = str.length();
		String res = "";
		for (int i = 0 ; i < n ; i += w) {
			res += str.charAt(i);
		}
		System.out.println(res);
		
		out.flush();
		out.close();

	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String s) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(new File(s)));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}


Measured memory_bytes: 22996
#include <bits/stdc++.h>
using namespace std;
 
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vvvi = vector<vector<vector<int>>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;
using vs = vector<string>;
using vb = vector<bool>;
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define FORR(i, m, n) for (int i = (m); i >= (n); i--)
#define REP(i, n) FOR(i, 0, (n))
#define REPR(i, n) FORR(i, (n) - 1, 0)
#define REP1(i, n) FOR(i, 1, (n) + 1)
#define REPS(c, s) for (char c : s)
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort(ALL(c))
#define REV(c) reverse(ALL(c))
#define sz(v) (int)v.size()
#define endl '\n'
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;}
template<class T> inline void prn(vector<T>& v) {int n = sz(v); REP(i, n) cout << v[i] << ' ';}
template<class T> inline void printv(vector<T>& v) {int n = sz(v); REP(i, n) cout << v[i] << (i == n - 1 ? endl : ' ');}
template<class T> inline void printvv(vector<vector<T>>& v) {for (auto u : v) printv(u);}
template<class T> inline void printlnv(vector<T>& v) {int n = sz(v); REP(i, n) cout << v[i] << endl;}
const int MOD = 1000000007;
const int INF = 1000000001;
const ll LINF = 1000000001000000001LL;
 
void solve();
 
int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(numeric_limits<double>::max_digits10);
    solve();
    return 0;
}

void solve() {
    int n;
    cin >> n;
    vl a(n + 1);
    REP(i, n + 1) cin >> a[i];
    if (n == 0) {
        cout << (a[0] == 1 ? 1 : -1) << endl;
        return;
    }
    if (a[0] != 0) {
        cout << -1 << endl;
        return;
    }
    vector<pair<ll, ll>> b(n + 1);
    ll mn = 0;
    ll mx = 0;
    for (int i = n; i > 0; i--) {
        mx += a[i];
        mn = (mn + a[i] + 1) / 2;
        b[i] = make_pair(mn, mx);
    }
    // REP(i, n + 1) cout << b[i].first << "/" << b[i].second << endl;
    ll ans = 1;
    ll e = 1;
    for (int i = 1; i <= n; i++) {
        if (e * 2 < b[i].first) {
            cout << -1 << endl;
            return;
        }
        if (e * 2 < b[i].second) {
            ans += e * 2;
            e = e * 2 - a[i];
        } else {
            ans += b[i].second;
            e = b[i].second - a[i];
        }
    }
    if (e != 0) {
        cout << -1 << endl;
        return;
    }
    cout << ans << endl;
}


Measured memory_bytes: 5580
S=input()
max=0
for i in range(0,len(S)):
    if S[i] in ('A','C','G','T'):
        i+=1
        cnt=1
        while i<len(S) and S[i] in ('A','C','G','T'):
            i+=1
            cnt+=1
        if cnt > max:
            max=cnt
            cnt=0
print(max)


Measured memory_bytes: 2940
#include <iostream>
#include <algorithm>
#include <functional>
#include <cmath>
#include <string>
#include <vector>
#include <queue>

using namespace std;

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

  int ans = n < 10 ? r + (100 * (10 - n)) : r;
  cout << ans << endl;
  return 0;
}

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

namespace Atcoder
{
    class Program
    {
        private static string Read() { return Console.ReadLine(); }
        private static int ReadInt() { return int.Parse(Read()); }
        private static long ReadLong() { return long.Parse(Read()); }
        private static double ReadDouble() { return double.Parse(Read()); }
        private static int[] ReadInts() { return Array.ConvertAll(Read().Split(), int.Parse); }
        private static long[] ReadLongs() { return Array.ConvertAll(Read().Split(), long.Parse); }
        private static double[] ReadDoubles() { return Array.ConvertAll(Read().Split(), double.Parse); }

        private static void print(object obj) { Console.WriteLine(obj); }

        /*
        static void Main(string[] args)
        {
           var a =  ReadInts();
            var b = a[0] % a[1];
            if(b > a[1]/2 )
            {
                print(a[1] -b);
            }
            else

            print(b);
        }
        */
        static void Main(string[] args)
        {
            var a = ReadInt();

            if(a < 4 || a > 4 && a < 7)
            {
                print("No");
                return;
            }
            else if(a % 11 == 0)
            {
                print("Yes");
                return;
            }
            else if( a % 14 == 0)
            {
                print("Yes");
                return;
            }
            else
            {
                for (int i = 0; i <= 100 /4; i ++) 
                {
                    for(int j = 0; j <= 100 /7; j ++)
                    {
                        if (a == ((4 * i) +( 7 * j)))
                        {
                            print("Yes");
                            return;
                        }
                    }
                }

                print("No");
                return;
            }
        }


    }
}

Measured memory_bytes: 13140
import math
import sys
input = sys.stdin.readline

############ ---- Input Functions ---- ############
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    s = input()
    return(list(s[:len(s) - 1]))
def invr():
    return(map(int,input().split()))
    
n, m = invr()
A = invr()

val = n - sum(A)
print (val if val >= 0 else -1)


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

using i64 = int64_t;

constexpr i64 MOD = 1e9 + 7;

void prime_factor(i64 n, map<i64, i64> &mp) {
    for (i64 i = 2; i * i <= n; i++) {
        while (n % i == 0) {
            mp[i]++;
            n /= i;
        }
    }
    if (n != 1)
        mp[n]++;
}

int main(){
    i64 n;
    cin >> n;
    map<i64, i64> mp;
    for(i64 i=1;i<=n;++i)prime_factor(i, mp);
    i64 ans = 1;
    for(auto e: mp){
        ans *= e.second + 1;
        ans %= MOD;
        //cout << e.first << ":" << e.second << endl;
    }
    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#include <queue>
#include <string>
#include <cstring>
#include <numeric>
#include <cstdlib>
#include <cmath>
using namespace std;

typedef long long ll;

#define INF 10e10
#define rep(i,n) for(int i=0; i<n; i++)
#define rep_r(i,n,m) for(int i=m; i<n; i++)
#define MAX 100
#define MOD 1000000007
#define pb push_back

/* add vars here */

int xa, ya, xb, yb;

/* add your algorithm here */

int main() {
  cin >> xa >> ya >> xb >> yb;

  int xd ,yd;
  xd = abs(xa - xb);
  yd = abs(ya - yb);

  int xc= xb + yd;
  int yc= yb + xd;
  int xdd= xa + yd;
  int ydd= ya + xd;

  if (xb >= xa && yb >= ya) {
    xc = xb - yd;
    yc = yb + xd;
    xdd = xa - yd;
    ydd = ya + xd;
  } else if (xa >= xb && yb >= ya) {
    xc = xb - yd;
    yc = yb - xd;
    xdd = xa - yd;
    ydd = ya - xd;
  } else if (xb >= xa && ya >= yb){
    xc = xb + yd;
    yc = yb + xd;
    xdd = xa + yd;
    ydd = ya + xd;
  } else {
    xc = xb + yd;
    yc = yb - xd;
    xdd = xa + yd;
    ydd = ya - xd;
  }

  cout << xc << " " << yc << " " << xdd << " " << ydd << endl;
}


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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define REP(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, a, b) for(int i=(a); i<(b); ++i)
#define FORR(i, a, b) for(int i=(b)-1; i>=(a); --i)

#define DEBUG(x) cout<<#x<<": "<<x<<'\n'
#define DEBUG_VEC(v) cout<<#v<<":";REP(i, v.size())cout<<' '<<v[i];cout<<'\n'
#define ALL(a) (a).begin(), (a).end()

#define CHMIN(a, b) a=min((a), (b))
#define CHMAX(a, b) a=max((a), (b))

const ll MOD=1000000007ll;
// const ll MOD=998244353ll;
#define FIX(a) ((a)%MOD+MOD)%MOD

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

int h, w, n, x[40], y[40], xnum[1364364], ynum[1364364], H, W;
vi X, Y;
ll ans;
bool used[70][70];
int d[70][70], dx[4]={1, 0, -1, 0}, dy[4]={0, 1, 0, -1};

ll bfs(){
	ll res=0;
	REP(i, H){
		REP(j, W){
			if(used[i][j]){
				continue;
			}
			REP(k, H){
				REP(l, W){
					d[k][l]=-1;
				}
			}
			queue<pii> q;
			q.push(pii(i, j));
			d[i][j]=0;
			while(!q.empty()){
				pii p=q.front();
				q.pop();
				int sx=p.first, sy=p.second;
				REP(k, 4){
					int tx=sx+dx[k], ty=sy+dy[k];
					if(tx<0 || tx>=H || ty<0 || ty>=W || used[tx][ty] || d[tx][ty]!=-1){
						continue;
					}
					d[tx][ty]=d[sx][sy]+1;
					q.push(pii(tx, ty));
				}
			}
			REP(k, H){
				REP(l, W){
					if(used[k][l] || d[k][l]==-1){
						continue;
					}
					ll tmp1=((ll)X[i+1]-X[i])*(Y[j+1]-Y[j])%MOD, tmp2=((ll)X[k+1]-X[k])*(Y[l+1]-Y[l])%MOD;
					res=(res+d[k][l]*tmp1%MOD*tmp2%MOD)%MOD;
				}
			}
		}
	}
	return (res*500000004)%MOD;
}

void compress(){
	X.push_back(0);
	X.push_back(h);
	Y.push_back(0);
	Y.push_back(w);
	REP(i, n){
		X.push_back(x[i]);
		X.push_back(x[i]+1);
		Y.push_back(y[i]);
		Y.push_back(y[i]+1);
		++xnum[x[i]];
		++ynum[y[i]];
	}
	sort(ALL(X));
	sort(ALL(Y));
	X.erase(unique(ALL(X)), X.end());
	Y.erase(unique(ALL(Y)), Y.end());
	H=X.size()-1;
	W=Y.size()-1;
	REP(i, n){
		int itrx=find(ALL(X), x[i])-X.begin();
		int itry=find(ALL(Y), y[i])-Y.begin();
		used[itrx][itry]=true;
	}
	return;
}

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cin>>h>>w>>n;
	REP(i, n){
		cin>>x[i]>>y[i];
	}
	compress();
	ll sub=w-xnum[0], sum=(ll)h*w-n;
	REP(i, h-1){
		if(xnum[i]==0 && xnum[i+1]==0){
			ll tmp1=sub%MOD, tmp2=(sum-sub)%MOD;
			ans=(ans+tmp1*tmp2)%MOD;
		}
		sub+=w-xnum[i+1];
	}
	// DEBUG(ans);
	sub=h-ynum[0];
	REP(i, w-1){
		if(ynum[i]==0 && ynum[i+1]==0){
			ll tmp1=sub%MOD, tmp2=(sum-sub)%MOD;
			ans=(ans+tmp1*tmp2)%MOD;
		}
		sub+=h-ynum[i+1];
	}
	// DEBUG(ans);
	ans=(ans+bfs())%MOD;
	cout<<ans<<'\n';
	return 0;
}


Measured memory_bytes: 8576
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.Comparator;
import java.util.NoSuchElementException;

class Main {
	public static void main(String[] args) {
		new Main().run();
	}
	
	void run() {
		FastScanner sc=new FastScanner();
		long a=sc.nextLong();
		long b=sc.nextLong();
		long c=sc.nextLong();
		if(c-a-b<=0) {
			System.out.println("No");
			return;
		}
		System.out.println(4*a*b<(c-a-b)*(c-a-b)?"Yes":"No");
	}
	
	void tr(Object...objects) {System.out.println(Arrays.deepToString(objects));}
}


class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    public int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
        return (int) nl;
    }
    public double nextDouble() { return Double.parseDouble(next());}
}

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

ll a, b, q;
vector<ll> s, t, x;
const ll INF = 1e18;

int main() {
    cin >> a >> b >> q;
    s.resize(a); t.resize(b); x.resize(q);
    rep(i,a) scanf("%Ld", &s[i]);
    rep(i,b) scanf("%Ld", &t[i]);
    rep(i,q) scanf("%Ld", &x[i]);
    s.push_back(INF); s.push_back(-INF); sort(s.begin(), s.end());
    t.push_back(INF); t.push_back(-INF); sort(t.begin(), t.end());

    rep(i,q) {
        auto siter = upper_bound(s.begin(), s.end(), x[i]);
        auto titer = upper_bound(t.begin(), t.end(), x[i]);
        ll sfr = *siter; ll sba = *(siter-1);
        ll tfr = *titer; ll tba = *(titer-1);
        ll res = INF; ll temp;
        temp = max(sfr, tfr);
        res = min(res, temp-x[i]);
        temp = min(sba, tba);
        res = min(res, x[i]-temp);
        temp = (x[i] - sba)*2 + tfr - x[i];
        res = min(res, temp);
        temp = (x[i] - tba)*2 + sfr - x[i];
        res = min(res, temp);
        temp = (sfr - x[i])*2 + x[i] - tba;
        res = min(res, temp);
        temp = (tfr - x[i])*2 + x[i] - sba;
        res = min(res, temp);
        cout << res << endl;
    }
}

Measured memory_bytes: 3680
#include <iostream>
#include <vector>
#include <cstdlib>
#include <algorithm>
#include <numeric>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
using vi = vector<int>; // intの1次元の型に vi という別名をつける
using vvi = vector<vi>; // intの2次元の型に vvi という別名をつける
using vl = vector<ll>;  // long longの1次元の型に vl という別名をつける
using vvl = vector<vl>; // long longの2次元の型に vvl という別名をつける
int MOD = 1000000007; //10^9 + 7

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

// 無限大の値
const ll  LINF = 1LL << 60;
const int iINF = 1 << 29;

int main(void){
  int n;
  cin >> n;
  cout <<n*(n+1)/2 << endl;
  return 0;
}

Measured memory_bytes: 3540
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <functional>
#include <numeric>
#include <math.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main(void) {
	int N;
	cin >> N;
	int ans = 0;
	for (int i = 1; i <= N; i++) {
		int tmp;
		cin >> tmp;
		if (i % 2 == 0) continue;
		if (tmp % 2 == 0) continue;
		ans++;
	}
	cout << ans << endl;
	return 0;
}

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

int n,m;
char s[3];

int main(){
  int i,j=0,sum=700;
  cin >> s;
  for(i=0;i<3;i++)if(s[i]=='o')sum+=100;
  cout << sum << endl;
  
  
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int MAXN = 1e5+5;
const int INF = 0x3f3f3f3f;

int main(){
	LL x,y;
	while(~scanf("%lld%lld",&x,&y)){
		if(x%y==0) printf("-1\n");
		else printf("%lld\n",x);
	}
    return 0;
}


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

int main(){
  int q, a, b;
  string str, ope, word, sub_word;

  cin >> str;
  cin >> q;
  for (int i = 0; i < q; i++) {
    cin >> ope;
    if (ope == "print") {
      cin >> a >> b;
      cout << str.substr(a, b - a + 1) << endl;
    }
    else if (ope == "reverse") {
      cin >> a >> b;
      sub_word = str.substr(a, b - a + 1);
      for (int j = 0; j < sub_word.size(); j++) {
        str[j+a] = sub_word[sub_word.size() - j - 1];
      }
    }
    else if (ope == "replace") {
      cin >> a >> b >> word;
      str = str.replace(a, b - a + 1, word);
    }
  }

  return 0;
}


Measured memory_bytes: 3228