akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;

typedef long long ll;

int main() {
    ll S;
    cin >> S;
    ll x = 1e9, y = (S + x - 1) / x, a = 1, b = x * y - S;
    cout << "0 0 " << b << " " << y << " " << x << " " << a << "\n";
}

Measured memory_bytes: 256
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

#include <bits/stdc++.h>
using namespace std;

/*----------macros----------*/

//output================
#define endl '\n'
#define fcout cout << fixed << setprecision(15)

//typedef===============
typedef long long ll;
typedef long double ld;
typedef pair<int, int> Pii;
typedef pair<ll, ll> Pll;

//const number==========
constexpr ll INF9   = (ll)1e9 + 1;
constexpr ll INF18  = (ll)1e18 + 1;
constexpr ll MOD    = 1000000007;
constexpr ld PI     = 3.141592653589793L;

//member================
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second

//others================
#define all(x)          (x).begin(), (x).end()
#define rall(x)         (x).rbegin(), (x).rend()
#define rep(i, n)       for(int i = 0; (i) < (int)(n); (i)++)
#define rrep(i, n)      for(int i = n - 1; (i) >= 0 ; (i)--)
#define For(i, a, b)    for(int i = (a); (i) < (int)(b) ; (i)++)
#define CtoI(c)         int((c)) - int('0')

//functions=============
template<typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
template<typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

//vector<int> dx = {1, 0, -1, 0}, dy = {0, 1, 0, -1};
//vector<int> dx2 = { 1,1,0,-1,-1,-1,0,1 }, dy2 = { 0,1,1,1,0,-1,-1,-1 };



/*--------additional--------*/



/*----------main------------*/

int main() {
/*----------fastio----------*/
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    std::ios::sync_with_stdio(false);
/*----------solve-----------*/

    int n; ll k; cin >> n >> k;
    vector<ll> a(n);
    rep(i, n) cin >> a[i];
    sort(all(a));

    ll l = -INF18, r = INF18;

    while(l + 1 < r){
        ll x = (l + r)/2;

        bool ok = [&]{
            ll tot = 0;
            rep(i, n){
                if(a[i] < 0){
                    int l = -1, r = n;
                    while(l + 1 < r){
                        int c = (l + r)/2;
                        if(a[c] * a[i] < x) r = c;
                        else l = c;
                    }
                    tot += n - r;
                }
                else{
                    int l = -1, r = n;
                    while(l + 1 < r){
                        int c = (l + r)/2;
                        if(a[c] * a[i] < x) l = c;
                        else r = c;                        
                    }
                    tot += r;
                }
                if(a[i] * a[i] < x) tot--;
            }
            tot /= 2;
            return tot < k;
        }();
        if(ok) l = x; else r = x;
    }

    cout << l << endl;

return 0;
}

Measured memory_bytes: 4764
from sys import stdin


def main():
    k, n = map(int, stdin.readline().split())
    a = list(map(int, stdin.readline().split()))
    b = [0] * n
    for i in range(n):
        if 0 <= i < n - 1:
            b[i] = a[i + 1] - a[i]
        else:
            b[i] = k - a[i] + a[0]
    print(k - max(b))


if __name__ == "__main__":
    main()


Measured memory_bytes: 72012
local n = io.read("*n")
local a, b = {}, {}
local idx = {}
for i = 1, n do
  a[i], b[i] = io.read("*n", "*n")
  idx[i] = i
end
table.sort(idx, function(x, y) return b[x] < b[y] end)
local cur = 0
local valid = true
for i = 1, n do
  local ai, bi = a[idx[i]], b[idx[i]]
  if bi < cur + ai then
    valid = false break
  end
  cur = cur + ai
end
print(valid and "Yes" or "No")


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

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

    int y = stoi(S.substr(0,4));
    int m = stoi(S.substr(5,2));
    int d = stoi(S.substr(8, 2));

    int ymd = y * 10000 + m * 100 + d;

    cout << (ymd > 20190430 ? "TBD" : "Heisei") << endl;
}

Measured memory_bytes: 256
#include<stdio.h>
int main(){
  int i;
  char s[3];
  for(i=0;i<3;i++)
    scanf("%c",&s[i]);
  if(s[0]==s[1] && s[1]==s[2])
    printf("No\n");
  else
    printf("Yes\n");
  return 0;
}


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

using namespace std;

int main(){
    vector<long long> A(3);
    long long K;
    cin >> A.at(0) >> A.at(1) >> A.at(2) >> K;

    long long res=0;
    for(int i=0; i<3; i++){
        if(K==0)break;
        if(K>=A.at(i)){
            K -= A.at(i);
            if(i==0)res += A.at(i);
            else if(i==2)res -= A.at(i);
        }else{
            if(i==0)res += K;
            else if(i==2)res -= K;
            K = 0;
        }
    }

    cout << res;
    
}

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

#define int long long

string s, ans;

signed main() {
    cin >> s;
    for (int i = 0; i < s.length(); i++) {
        if (s[i] == 'B') {
            if (ans.length() != 0) {
                ans.pop_back();
            }
        } else {
            ans += s[i];
        }
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
import java.util.Scanner;

public class Main
{
    public static void main(String[] args)
    {
        Scanner read = new Scanner(System.in);
        int n = read.nextInt();
        float oddcount = 0;
        float answer =0;
        for (int i=1;i<=n;i++)
        {
            if (i%2!=0)
            {
                oddcount++;
            }
        }
        answer = oddcount/n;
        System.out.println(answer);
    }
}


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

using namespace std;

int main(){
    long long n;
    cin>>n;
    vector<long long> dis(n);
    vector<long long> a(n),b(n);
    
    for(long long i=0;i<n;i++){
        cin>>a.at(i);
    }
    for(long long i=0;i<n;i++){
        cin>>b.at(i);
        
        dis.at(i)=b.at(i)-a.at(i);
    }
    //できること
    //差を2減らして1増やす
    //差を1減らす
    
    sort(dis.begin(),dis.end());
    long long cnt=0;
    
    for(long long i=0;i<n;i++){
        if(dis.at(i)<0) cnt+=dis.at(i);
        else cnt+=dis.at(i)/2;
    }
    
    if(cnt>=0) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    
    return 0;
}


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

using i64 = int_fast64_t;
using f64 = double;

constexpr i64 INF = INT_FAST64_MAX / 2;
constexpr f64 EPS = DBL_EPSILON;

void solve() {
    string s;
    cin >> s;
    cout << count(begin(s), end(s), '1') << endl;
}

int main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    solve();
}


Measured memory_bytes: 256
n=int(input())
l=list(map(int,input().split()))

x = 0
for a in range(n-1):
    if l[a]>l[a+1] :
        x=l[a] - l[a+1] + x
        l[a+1]=l[a]
    #print("l[a],x,l[a+1]=", l[a], x, l[a+1])
print(x)


Measured memory_bytes: 32164
s = input()

temp = True
for i in range(1,len(s),2):
    if s[i] == 'L' or s[i] == 'U' or s[i] == 'D':
        continue
    else:
        temp = False
for i in range(0,len(s),2):
    if s[i] == 'R' or s[i] == 'U' or s[i] == 'D':
        continue
    else:
        temp = False
if temp:
    print('Yes')
else:
    print('No')

Measured memory_bytes: 3064
#include <stdio.h>

void swap(int *a, int *b) {
    int temp = *a;
    *a = *b;
    *b = temp;
}


int bubbleSort(int A[],int N) {
    int i,j;
    int sw = 0;
    unsigned short flag = 1;
    for(i=0;flag;i++) {
        flag = 0;
        for(j=N-1;j>=i+1;j--) {
            if(A[j]<A[j-1]) {
                swap(&A[j],&A[j-1]);
                flag = 1;
                sw++;
            }
        }
    }
    return sw;
}

int main(void) {
    int i, A[100], N, sw;
    scanf("%d",&N);
    for(i=0;i<N;i++) scanf("%d",&A[i]);

    sw = bubbleSort(A,N);

    for(i=0;i<N;i++) {
        if (i) printf(" ");
        printf("%d",A[i]);
    }
    printf("\n%d\n",sw);

    return 0;
}



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

void solve(long long K, std::string S)
{
    if (S.size() <= K)
    {
        cout << S << endl;
    }
    else
    {
        for (ll i = 0; i < K; i++)
        {
            cout << S[i];
        }
        cout << "..." << endl;
    }
}

signed main()
{
    long long K;
    scanf("%lld", &K);
    std::string S;
    std::cin >> S;
    solve(K, S);
    return 0;
}


Measured memory_bytes: 3692
process.stdin.resume()
process.stdin.setEncoding('utf8')
var g_input = ''
process.stdin.on('data', function(chunk) {
    g_input += chunk
})
process.stdin.on('end', function() {
    main(g_input.split(/\r?\n/))
})
function main(input){
  const n = input.shift()
  let c = 0
  for(let i of input){
    i = i.split(' ')
    const d1 = i[0]
    const d2 = i[1]
    if(d1 == d2){
      
      c++
      if(c==3){
        console.log('Yes')
        return
      }
    }else{
      c = 0
    }
  }
  console.log('No')
}

Measured memory_bytes: 29996
// 6/23 解き直し
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using P = pair<int, int>;

vector<int> f;  // iマス目以降で一番小さい0のマス。

int main() {
    int N, K;
    cin >> N >> K;

    vector<int> A(N);
    rep(i, N) cin >> A[i];

    vector<ll> S(N+1);
    S[0] = 0;
    rep(i, N) {
        // S[i+1] = (S[i] + A[i]) % K;
        S[i+1] = S[i] + A[i];
    }

    map<int, int> mp;

    ll ans = 0;

    // int left = 0;
    // for (int right = 1; right <= N; right++) {
    //     if (right < K) {
    //         int t = (S[right] - right) % K;
    //         mp[t] += 1;
    //     }
    // }

    queue<int> q;
    // rep(j, N+1) {
    //     ans += mp[S[j]];
    //     mp[S[j]]++;
    //     q.push(S[j]);
    //     if (q.size() == K) {
    //         mp[q.front()]--;
    //         q.pop();
    //     }
    // }

    rep(j, N+1) {
        int v = (S[j]-j) % K;
        ans += mp[v];
        mp[v]++;
        q.push(v);
        if (q.size() == K) {
            mp[q.front()]--;
            q.pop();
        }
    }

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

Measured memory_bytes: 15844
using System;
using System.Diagnostics;
using System.IO;

namespace AtCoder.ABC101 {
    class A {
        static void Main() => CustomMain();

        static void Solve() {
            var s = ReadString();
            var ans = 0;
            for (int i = 0; i < s.Length; i++) {
                if (s[i] == '+') {
                    ans++;
                } else {
                    ans--;
                }
            }

            WriteAnswer(ans);
        }

        static void CustomMain() {
#if DEBUG
            // ファイルからテストケースを読み込む
            global::Common.ChangeStdIn();
            // 時間計測
            var stopwatch = new Stopwatch();
            stopwatch.Start();
#endif
            // 出力高速化
            var streamWriter = new StreamWriter(Console.OpenStandardOutput()) {AutoFlush = false};
            Console.SetOut(streamWriter);
            // 回答
            Solve();
#if DEBUG
            stopwatch.Stop();
            Console.WriteLine(stopwatch.Elapsed);
#endif
            Console.Out.Flush();
        }

        static string ReadString() => Console.ReadLine().Trim();
        static int ReadInt() => int.Parse(ReadString());
        static long ReadLong() => long.Parse(ReadString());
        static float ReadFloat() => float.Parse(ReadString());
        static double ReadDouble => double.Parse(ReadString());

        static string[] ReadStringArray() => ReadString().Split(' ');
        static int[] ReadIntArray() => Array.ConvertAll(ReadString().Split(' '), int.Parse);
        static long[] ReadLongArray() => Array.ConvertAll(ReadString().Split(' '), long.Parse);
        static float[] ReadFloatArray() => Array.ConvertAll(ReadString().Split(' '), float.Parse);
        static double[] ReadDoubleArray() => Array.ConvertAll(ReadString().Split(' '), double.Parse);

        static T TypeConversion<T>(string s) {
            if (typeof(T) == typeof(int)) {
                return (T) Convert.ChangeType(int.Parse(s), typeof(T));
            } else if (typeof(T) == typeof(long)) {
                return (T) Convert.ChangeType(long.Parse(s), typeof(T));
            } else if (typeof(T) == typeof(double)) {
                return (T) Convert.ChangeType(double.Parse(s), typeof(T));
            } else {
                return (T) Convert.ChangeType(s, typeof(T));
            }
        }

        static void ReadMulti<T, U>(out T a, out U b) {
            var str = ReadStringArray();
            a = TypeConversion<T>(str[0]);
            b = TypeConversion<U>(str[1]);
        }

        static void ReadMulti<T, U, V>(out T a, out U b, out V c) {
            var str = ReadStringArray();
            a = TypeConversion<T>(str[0]);
            b = TypeConversion<U>(str[1]);
            c = TypeConversion<V>(str[2]);
        }

        static void WriteAnswer(object ans) => Console.WriteLine(ans);
    }
}

Measured memory_bytes: 11092
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <iomanip>
using namespace std;
typedef long long int ll;
typedef pair<int,int> pii;

template<class T> T umax(T a,T b) {return (a>b?a:b);}
template<class T> T umin(T a,T b) {return (a<b?a:b);}
template<class T,class P> T umax(T a,P b) {return (a>b?a:b);}
template<class T,class P> T umin(T a,P b) {return (a<b?a:b);}

typedef long long int ll;
const int maxn = 1e5+7;
const ll mod = 1e9+7;

bool compare(const pair<ll,ll>& x, const pair<ll,ll>& y) {
    if(x.second == y.second) return x.first < y.first;
    return x.second < y.second;
}

ll power(ll a,ll b) {
    ll res = 1;
    while(b) {
        if(b&1) {
            res = (res*a)%mod;
        }
        a = (a*a)%mod;
        b >>= 1;
    }
    return res;
}

ll gcd(ll a,ll b) {
    if(b == 0) return a;
    return gcd(b,a%b);
}

ll dp[1002][1002];
char a[1002][1002];

int main() {
    int n,m;
    cin >> n >> m;
    for(int i=0;i<n;i++) {
        for(int j=0;j<m;j++) {
            cin >> a[i][j];
        }
    }
    dp[0][0] = 1;
    for(int j=1;j<m;j++) {
        if(a[0][j] == '#') {
            dp[0][j] = 0;
        } else {
            dp[0][j] = dp[0][j-1];
        }
    }
    for(int i=1;i<n;i++) {
        if(a[i][0] == '#') {
            dp[i][0] = 0;
        } else {
            dp[i][0] = dp[i-1][0];
        }
    }
    for(int i=1;i<n;i++) {
        for(int j=1;j<m;j++) {
            if(a[i][j] == '#') {
                dp[i][j] = 0;
            } else {
                dp[i][j] = (dp[i-1][j] + dp[i][j-1])%mod;
            }
        }
    }
    cout << dp[n-1][m-1] << endl;
    return 0;
}

Measured memory_bytes: 9088
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;
using P = pair<int,int>;
template <class T> void chmin(T &a, const T &b) noexcept { if (b < a) a = b; }
template <class T> void chmax(T &a, const T &b) noexcept { if (a < b) a = b; }
void debug_out() { cout << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) { cout << H << " "; debug_out(T...); }
#ifdef _DEBUG
  #define debug(...) debug_out(__VA_ARGS__)
#else
  #define debug(...) 
#endif

int main() {
  std::cin.tie(nullptr);
  std::ios_base::sync_with_stdio(false);
  std::cout << std::fixed << std::setprecision(15);
  int n;
  cin >> n;
  bool ok = false;
  rep(i,3) {
    if (n % 10 == 7) ok = true;
    n /= 10;
  }
  auto yes = [&]() {
    cout << "Yes\n";
  };
  auto no = [&]() {
    cout << "No\n";
  };
  if (ok) yes();
  else no();
  return 0;
}

Measured memory_bytes: 3640
#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
int i,a,N,S,ans,v[3001],mod=998244353;
int main(){
  scanf("%d %d",&N,&S);
  while(N--){
    scanf("%d",&a);
    ++v[0];
    for(i=S;i>=a;--i){
      v[i]+=v[i-a];
      v[i]-=(v[i]>=mod)*mod;
    }
    ans+=v[S];
    ans-=(ans>=mod)*mod;
  }
  printf("%d",ans);
}

Measured memory_bytes: 256
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
using namespace std;
const int INF = 1e9;
const long long LINF = 1e18;


int main(){
  int N;cin >> N;
  vector<int> a(N);
  for(int i = 0; i < N; i++){
    cin >> a[i];
  }
  vector<int> b(1e5);
  for(int i = 0; i < N; i++){
    b[a[i]]++;
  }
  int cnt = 0;
  int ans = 0;
  for(int i = 1; i < 1e5; i++){
    cnt = b[i-1] + b[i] + b[i+1];
    ans = max(ans,cnt);
  }
  cout << ans << endl;
}



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

using namespace std;

int main(){
    int n;
    cin>>n;
    int p;
    int ans=0;
    int minn=1e9;
    for(int i=0;i<n;i++){
        cin>>p;
        if(minn>=p){
            ans++;
        }
        minn=min(minn, p);
    }
    cout<<ans<<endl;
    return 0;
}

Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS

#include <vector>
#include <deque>
#include <list>
#include <forward_list>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <tuple>
#include <functional>
#include <limits>
#include <utility>
#include <string>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

// Print each element of a container.
template <typename Container>
void print(const Container& container)
{
    stringstream sstream;

    string delim("");
	for (const auto& element : container)
	{
		sstream << delim << element;
        delim = " ";
	}

    cout << sstream.str() << endl;
}

template <typename Container>
void insertionSort(Container& container)
{
    for(auto it(begin(container)); it != end(container); ++it)
    {
        auto key(*it);

        auto jt(it);
        while(jt != begin(container) && *prev(jt) > key)
        {
            *jt = *prev(jt);

            --jt;
        }

        *jt = key;

         print(container);
    }
}

int main()
{
    vector<int> v;

    int n;
    cin >> n;

    for(size_t i(0); i < n; ++i)
    {
        int x;
        cin >> x;

        v.push_back(x);
    }

    insertionSort(v);

    return 0;
}

Measured memory_bytes: 3184
#include<stdio.h>

int calc(int x){
    int ret=0;
    while(x%100==0){
        x/=100;
        ret++;
    }
    return ret;
}

int main(void){
    int d,n,count=0,num=0;
    scanf("%d%d",&d,&n);
    while(count<n){
        ++num;
        if(calc(num)==d) ++count;
    }
    printf("%d\n",num);
    return 0;
}


Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define fi first
#define se second
typedef pair<ll,ll> P;
using VP = vector<P>; using VVP = vector<VP>;
using VI = vector<ll>; using VVI = vector<VI>; using VVVI = vector<VVI>;
const int inf=1e9+7;
const ll INF=1LL<<61;
const ll mod=1e9+7;

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

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

VI ans;

void calc(int s,int t){
    for(int i=0;i<10101;i++){
        ans[i]+=s/t;
        int u=i;
        while(ans[u]>=10) {
            ans[u-1]+=1;
            ans[u]-=10;
            u--;
        }
        s%=t;
        s*=10;
        if(s==0) return;
    }
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int i,j;
    int n,k,m,r;
    while(1){
    cin>>n>>k>>m>>r;
    if(n==0) break;
    ans = VI(10101);
    if(m==0) {
       calc(1,n);
    }
    else {
       calc(1,n);
       for(i=1;i<n;i++) calc(1,n*i);
    }
    //if(n==1) ans=1.0;
    //if(n==2&&m==1) ans=1.0;
    //if(k==1) ans=0;
    cout<<ans[0]<<".";
    for(i=1;i<=r;i++){
        cout<<ans[i];
    }
    cout<<endl;
    }
}


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

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

    vector<int> v(n);
    int a;
    int k = 0,ans=0;

    for(int i = 0; i < n; ++i){
        cin >> a;
        if(a == k+1){
            v[k] = a;
            k++;
        }else{
            ans++;
        }
    }
    if(ans == n) cout << -1 << endl;
    else cout << ans << endl;
}

Measured memory_bytes: 1024
#include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
/* constant */
const int INF = 1 << 30;
const int mod = 1000000007;
/* struct for mod Calculation*/
struct mint {
    ll x;
    mint(ll x = 0):x((x % mod + mod) % mod) {}
    mint operator-() const { return mint(-x); }
    mint& operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator-=(const mint a) {
        if ((x += mod - a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator*=(const mint a) {
        (x *= a.x) %= mod;
        return *this;
    }
    mint operator+(const mint a) const {
        mint res(*this);
        return res += a;
    }
    mint operator-(const mint a) const {
        mint res(*this);
        return res -= a;
    }
    mint operator*(const mint a) const {
        mint res(*this);
        return res *= a;
    }
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t >> 1);
        a *= a;
        if (t & 1) a *= *this;
        return a;
    }
    // for prime mod
    mint inv() const {
        return pow(mod - 2);
    }
    mint& operator/=(const mint a) {
        return (*this) *= a.inv();
    }
    mint operator/(const mint a) const {
        mint res(*this);
        return res /= a;
    }
};
/* global variables */
/* function */
struct combination {
    // vector size : n + 1
    vector<mint> fact, ifact;
    // precaliculation O(n)
    combination(int n):fact(n+1), ifact(n+1) {
        assert(n < mod);
        // 0! = 1;
        fact[0] = 1;
        // 1! = 0! * 1 ... n! = (n-1)! * n
        for (int i = 1; i <= n; i++) fact[i] = fact[i-1] * i;
        // 1/n! = n!^(-1)
        ifact[n] = fact[n].inv();
        // (n-1)!^(-1) = n!^(-1) * n ... 0!^(-1) = 1!^(-1) * 1
        for (int i = n; i >= 1; --i) ifact[i-1] = ifact[i] * i;
    }
    // combination O(1)
    // nCk = n! / (k! * (n-k)!)
    //     = n! * k!^(-1) * (n-k)!^(-1)
    mint operator()(int n, int k) {
        if (k < 0 || k > n) return 0;
        return fact[n] * ifact[k] * ifact[n-k];
    }
};
/* main */
int main(){
    int N, K;
    cin >> N >> K;
    // struct combination com = combination(2000);
    combination com = combination(2000);
    for (int i = 1; i <= K; i++) {
        mint a = com(N - K + 1, i);
        mint b = com(K - 1, i - 1);
        mint ans = a * b;
        cout << ans.x << '\n';
    }
}

Measured memory_bytes: 256
#include <atcoder/fenwicktree>
#include <cstdio>

using namespace std;
using namespace atcoder;

int main() {
    int n, q;
    scanf("%d %d", &n, &q);

    fenwick_tree<long long> fw(n);
    for (int i = 0; i < n; i++) {
        int a;
        scanf("%d", &a);
        fw.add(i, a);
    }

    for (int i = 0; i < q; i++) {
        int t;
        scanf("%d", &t);
        if (t == 0) {
            int p, x;
            scanf("%d %d", &p, &x);
            fw.add(p, x);
        } else {
            int l, r;
            scanf("%d %d", &l, &r);
            printf("%lld\n", fw.sum(l, r));
        }
    }
}


Measured memory_bytes: 8216
s = gets.chomp
ans = []
i = 0
while i < s.size
  tmp = i
  while s[i] == "R"
    i += 1
  end
  r = i - tmp
  while s[i] == "L"
    i += 1
  end
  l = i - r - tmp
  if (l + r).odd?
    if r > l
      if (r - 1).odd? # 反転
        valR = (l + r) / 2
        valL = (l + r) / 2 + 1
      else
        valR = (l + r) / 2 + 1
        valL = (l + r) / 2
      end
    else
      if (l - 1).odd? # 反転
        valR = (l + r) / 2 + 1
        valL = (l + r) / 2
      else
        valR = (l + r) / 2
        valL = (l + r) / 2 + 1
      end
    end
  else
    valR = valL = (l + r) / 2
  end
  (r - 1).times do
    ans << 0
  end
  ans << valR
  ans << valL
  (l - 1).times do
    ans << 0
  end
end

puts ans * " "


Measured memory_bytes: 3196
#include<iostream>
#include<unordered_map>
#include<stack>
#include<algorithm>
#include<set>
#include<cstring>
#include<vector>
#include<numeric>
#include<map>
#include<climits>
#define ios         ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define int long long int
using namespace std;

int values[101];
int weights[101];
int dp[101][100001];
int go(int n, int w)
{
	if(n < 0 || w <= 0)
		return 0;
	int ans = 0;
	if(dp[n][w] != -1) return dp[n][w];
	if(w >= weights[n]) ans = max(ans, values[n]+go(n-1, w-weights[n]));
	ans = max(ans, go(n-1, w));

	return dp[n][w] = ans;
}
int32_t main() 
{
	#ifndef ONLINE_JUDGE
	freopen("input/input.txt", "r", stdin);
	freopen("input/output.txt", "w", stdout);
	#endif
	int n, w;
	cin >> n >> w;
	memset(dp, -1, sizeof(dp));
	for(int i = 0; i < n; i++)
	{
		cin >> weights[i] >> values[i];
	}
	cout << go(n, w);
	return 0;
}

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

ll gcd(ll a, ll b) {
  if(b == 0) return a;
  else return gcd(b, a%b);
}

int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  
  ll a, b, c, d;
  cin >> a >> b >> c >> d;
  
  ll b_div = b/c + b/d - b / (c*d / gcd(c, d));
  ll a_div = (a-1)/c + (a-1)/d - (a-1) / (c*d / gcd(c, d));
  
  ll total = b-a+1;
  ll ans = total - (b_div - a_div);
  
  cout << ans << endl;
  return 0;
}

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

int main(){
    int H, W, p, q;
    
   while (true){ cin >> H >> W;
       if (H==0&&W==0){ break;}
       for (p=0; p<H; p++){
           for (q=0; q<W; q++){
               cout << "#";
           }
           cout << endl;
       }cout << endl;
   }
   return 0;
}



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

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  int n;
  cin >> n;
  
  vector<int> c(n - 1), s(n - 1), f(n - 1);
  for(int i = 0; i < n - 1; i++) cin >> c.at(i) >> s.at(i) >> f.at(i);
  
  for(int i = 0; i < n; i++){
    int now = 0;
    for(int j = i; j < n - 1; j++){
      if(now < s.at(j)) now = s.at(j);
      else if(now % f.at(j) == 0) now += 0;
      else now += f.at(j) - (now % f.at(j));
      now += c.at(j);
    }
    cout << now << '\n';
  }
}

Measured memory_bytes: 256
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int bit = 0;
        for (int i=0; i<N; i++) {
            bit |= sc.nextInt();
        }
        System.out.println(Integer.numberOfTrailingZeros(bit));
    }
}

Measured memory_bytes: 35940
#include <bits/stdc++.h>
#define int int64_t
#define pb push_back
#define pii pair<int, int>
#define F first
#define S second
#define vecsort(x) sort(x.begin(), x.end())
#define vecrsort(x) sort(x.rbegin(), x.rend())
#define massort(x, n) sort(x, x + n)
#define FOR(i, n) for(int i = 0; i < n; i ++)
using namespace std;
int max(int32_t a, int b){
   return max((int)a, b);
}

const int M = 1e9 + 7;

char field[1010][1010];
int   dist[1010][1010];


int32_t main(){
   ios_base::sync_with_stdio(0);
   cin.tie(0);
   int n, m;
   cin >> n >> m;
   for(int i = 0; i < n; i ++)
      for(int j = 0; j < m; j ++)
         cin >> field[i][j];
   dist[0][0] = 1;
   for(int i = 0; i < n; i ++){
      for(int j = 0; j < m; j ++){
         if(field[i][j] == '#')
            continue;
         if(i == 0 && j == 0)
            continue;
         if(i == 0){
            dist[i][j] = dist[i][j-1];
            continue;
         }
         if(j == 0){
            dist[i][j] = dist[i-1][j];
            continue;
         }
         dist[i][j] += dist[i][j-1];
         dist[i][j] += dist[i-1][j];
         dist[i][j] %= M;
      }
   }
   cout << dist[n-1][m-1];
}


Measured memory_bytes: 9216
a,b = map(int,input().split())
for num in range(1,10000):
    ai = num//(100/8)
    bi = num//(100/10)
    if (ai>100) or (bi>100):
        pass
    if (a==int(ai)) and (b==int(bi)):
        print(num)
        exit()
print(-1)

Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
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; }
template<typename T> using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
const ll INF = 1LL<<60;
const ll MOD = 1e9 + 7;


int main() {
    ll sx,sy,tx,ty;
    cin >> sx >> sy >> tx >> ty;
    ll tate = abs(sy-ty);
    ll yoko = abs(sx - tx);
    for (ll i = 0;i<yoko;i++) {
        cout << 'R';
    }
    for (ll i = 0;i<tate;i++) {
        cout << 'U';
    }
    for (ll i = 0;i<yoko;i++) {
        cout << 'L';
    }
    for (ll i = 0;i<tate;i++) {
        cout << 'D';
    }
    cout << 'L';
    for (ll i = 0;i<tate+1;i++) {
        cout << 'U';
    }
    for (ll i = 0;i<yoko+1;i++) {
        cout << 'R';
    }
    cout << 'D';
    cout << 'R';
    for (ll i = 0;i<tate+1;i++) {
        cout << 'D';
    }
    for (ll i = 0;i<yoko+1;i++) {
        cout << 'L';
    }
    cout << 'U';
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define rep(i,h) for(int i = 0; i < h; ++i)
#define rep1(i,h) for(int i = 0; i <= h; ++i)
#define rep2(i,n,h) for(int i = n; i < h; ++i)
#define rep3(l,n,h) for(int l = n; l <= h; ++l)
typedef pair<int,int> int_pair;
typedef pair<string,string> string_pair;


int main(void) {
    string w;
    cin >> w;
    map<char,int> mp;
    rep(i,w.length()) {
        mp[w.at(i)]++;
    }
    rep(i,w.length()) {
        if(mp[w.at(i)] % 2 != 0) {
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;

    return 0;
}



Measured memory_bytes: 256
local s=io.read()
local t=io.read()
local n=#s
local m=#t

local dp={}
for i=1,n+1 do
    dp[i]={}
    for j=1,m+1 do
        dp[i][j]=0
    end
end

for i=1,n do
    for j=1,m do
        if s:byte(i)==t:byte(j) then
            dp[i+1][j+1]=math.max(dp[i][j]+1,dp[i+1][j],dp[i][j+1])
        else
            dp[i+1][j+1]=math.max(dp[i+1][j],dp[i][j+1])
        end
    end
end

local answer=""
while n>0 and m>0 do
    if dp[n+1][m+1]==dp[n][m+1] then
        n=n-1
    elseif dp[n+1][m+1]==dp[n+1][m] then
        m=m-1
    else
        answer=s:sub(n,n)..answer
        n=n-1
        m=m-1
    end
end
print(answer)

Measured memory_bytes: 103272
#include <cstdio>
#include <iostream>
#include <utility>
using namespace std;

int main(){
	int n;
	int a[100];
	int count=0;
	
	scanf(" %d", &n);
	for(int i=0; i<n; ++i) scanf(" %d", &a[i]);
	
	//bubble sort	
	bool flag=true;
	while(flag){
		flag=false;
		for(int i=n-1; i>0; --i){
			if(a[i]<a[i-1]){
				swap(a[i], a[i-1]);
				flag=true;
				count++;
			}	
		}
	}
	
	for(int i=0; i<n; ++i){
		if(i>0) printf(" ");
		printf("%d", a[i]);
	}
	printf("\n%d\n", count);
	
}


Measured memory_bytes: 3216
use std::io::Read;

fn main() {
    let mut buf = String::new();
    let mut stdin = std::io::stdin();
    stdin.read_to_string(&mut buf).unwrap();
    let mut iter = buf.split_whitespace();

    let a: u8 = iter.next().unwrap().parse().unwrap();
    let b: u8 = iter.next().unwrap().parse().unwrap();

    println!("{}", 6-a-b);
}


Measured memory_bytes: 4352
import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;

import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main{

	Scanner sc;

	static final int INF=1<<28;
	static final double EPS=1e-9;

	void run(){
		sc=new Scanner(System.in);
		int n=sc.nextInt();
		for(int i=0; i<n; i++){
			double xa=sc.nextDouble();
			double ya=sc.nextDouble();
			double ra=sc.nextDouble();
			double xb=sc.nextDouble();
			double yb=sc.nextDouble();
			double rb=sc.nextDouble();
			P a=new P(xa, ya);
			P b=new P(xb, yb);
			double dis=a.sub(b).abs();
			if(ra+rb+EPS<dis)
				println("0");
			else if(abs(rb-ra)<dis+EPS)
				println("1");
			else if(ra<rb)
				println("-2");
			else
				println("2");
		}
	}

	class P{
		double x, y;

		P(){
			this(0, 0);
		}

		P(double x, double y){
			this.x=x;
			this.y=y;
		}

		P add(P p){
			return new P(x+p.x, y+p.y);
		}

		P sub(P p){
			return new P(x-p.x, y-p.y);
		}

		P mul(double m){
			return new P(x*m, y*m);
		}

		P div(double d){
			return new P(x/d, y/d);
		}

		double abs(){
			return Math.sqrt(abs2());
		}

		double abs2(){
			return x*x+y*y;
		}

		double dot(P p){
			return x*p.x+y*p.y;
		}

		double det(P p){
			return x*p.y-p.x*y;
		}

		P rot90(){
			return new P(-y, x);
		}
	}

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

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

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

Measured memory_bytes: 12000
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define all(x) (x).begin(),(x).end()
#define sz(x) (int)(x).size()
const long double EPS = 1e-14;
const int maxn = 100500;
const int mod = 1e9 + 7;
vector < int > a;
int n, m;

struct MergeSortTree{
    vector < pair < int, int > > tree[4 * maxn];
    vector < int > cumul[4 * maxn];
    pair < int, int > a[4 * maxn];
    long long op(long long a, long long b){
        // change operation here
        return a + b;
    }
    void build(int node, int lo, int hi){
    if(lo > hi) return;
    if(lo == hi){
        tree[node].push_back({a[lo].second, a[lo].first});
        cumul[node].push_back(a[lo].first);
        return;
    }
    int mid = (lo + hi) >> 1;
    build(2 * node + 1, lo, mid);
    build(2 * node + 2, mid + 1, hi);
    merge(tree[2 * node + 1].begin(), tree[2 * node + 1].end(), tree[2 * node + 2].begin(), tree[2 * node + 2].end(),
            back_inserter(tree[node]));
    cumul[node].push_back(tree[node][0].second);
    for(int i = 1 ; i < (int)tree[node].size(); ++i)
        cumul[node].push_back(op(cumul[node][i - 1], tree[node][i].second));
    }
    
    pair < int, int > gr(int node, int lo, int hi, int ql, int qh, int X){
        if(lo > hi || ql > hi || qh < lo) return {0, 0};
        if(ql <= lo && hi <= qh){
            int idx = upper_bound(all(tree[node]), make_pair(X, 0LL)) - tree[node].begin();
            if(idx == sz(tree[node])) return {0, 0};
            return {cumul[node].back() - (idx ? cumul[node][idx - 1]:0), sz(cumul[node]) - idx};
        }
        int mid = (lo + hi) >> 1;
        auto l = gr(2 * node + 1, lo, mid, ql, qh, X);
        auto r = gr(2 * node + 2, mid + 1, hi, ql, qh, X);
        l.first += r.first;
        l.second += r.second;
        return l;
    }
}mt[2];


int dist(int from, int to){
    if(from == to) return 0;
    if(to < from) return m - from + to;
    return to - from;
}


signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    cin >> n >> m;
    a.resize(n);
    for(auto &x : a) cin >> x;
    int n1 = 0, n2 = 0;
    int ad = 0;
    for(int i = 0 ; i < n - 1 ; ++i){
        ad += dist(a[i], a[i + 1]);
        if(a[i + 1] > a[i]){
            mt[0].a[n1++] = {a[i], a[i + 1]}; 
        }else{
            mt[1].a[n2++] = {a[i], a[i + 1]};
        }
    }
    sort(mt[0].a, mt[0].a + n1);
    sort(mt[1].a, mt[1].a + n2);
    mt[0].build(0, 0, n1 - 1);
    mt[1].build(0, 0, n2 - 1);
    int ans = 1e18;
    int idx1 = 0, idx2 = 0;
    for(int x = 1 ; x <= m ; ++x){
        while(idx1 < n1 && mt[0].a[idx1].first < x) idx1++;
        idx1--;
        while(idx2 < n2 && mt[1].a[idx2].first < x) idx2++;
        idx2--;
        int sm = ad;
        auto l1 = mt[0].gr(0, 0, n1 - 1, 0, idx1, x);
        auto l2 = mt[1].gr(0, 0, n2 - 1, 0, idx2, 0);
        auto r2 = mt[1].gr(0, 0, n2 - 1, idx2, n2 - 1, x);
        sm += l1.second + l1.first - x * l1.second;
        sm -= l2.second * (x - 1) - l2.first;
        sm += r2.first + r2.second * (1 - m) - r2.second * x;
        ans = min(ans, sm);
    }
    cout << ans << '\n';
    return 0;
}

Measured memory_bytes: 109168
#include <bits/stdc++.h>
#define range(i, l, r) for(int (i) = (l); (i) < (r); (i)++)
#define reversed_range(i, l, r) for (int (i) = (r) - 1; (i) >= l; (i)--)
using namespace std;
template <typename T>
using vec = vector<T>;
using lint = long long;
using ulint = unsigned long long;
using pint = pair<int, int>;
using plint = pair<lint, lint>;

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

template <typename T>
ostream& operator <<(ostream& os, vec<T> v) {
    os << "[";
    for (int i = 0; i < v.size() - 1; i++) {
        os << v.at(i) << ", ";
    }
    return os << v.at(v.size() - 1) << "]";
}

template <typename T>
ostream& operator <<(ostream& os, set<T>& s) {
    os << "{";
    auto it_first_item = s.begin();
    cout << *it_first_item;
    for (auto it = ++it_first_item; it != s.end(); it++) {
        cout << ", " << *it;
    }
    return cout << "}";
}

template <typename T>
ostream& operator <<(ostream& os, unordered_set<T>& s) {
    os << "{";
    auto it_first_item = s.begin();
    cout << *it_first_item;
    for (auto it = ++it_first_item; it != s.end(); it++) {
        cout << ", " << *it;
    }
    return cout << "}";
}

template <typename K, typename V>
ostream& operator <<(ostream& os, map<K, V> m) {
    os << "{";
    auto it_first_item = m.begin();
    cout << it_first_item->first << ": " << it_first_item->second;
    for (auto it = ++it_first_item; it != m.end(); it++) {
        cout << ", " << it->first << ": " << it->second;
    }
    return os << "}";
}

template <typename K, typename V>
ostream& operator <<(ostream& os, unordered_map<K, V> m) {
    os << "{";
    auto it_first_item = m.begin();
    cout << it_first_item->first << ": " << it_first_item->second;
    for (auto it = ++it_first_item; it != m.end(); it++) {
        cout << ", " << it->first << ": " << it->second;
    }
    return os << "}";
}

int main() {
    cin.tie(0); cout.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    vector<int> p_list(n);
    range(i, 0, n) cin >> p_list.at(i);
    int num_such_ps = 0;
    range(i, 1, n - 1) {
        int left = p_list.at(i - 1);
        int mid = p_list.at(i);
        int right = p_list.at(i + 1);
        if ((left < mid && mid < right) || (right < mid && mid < left)) {
            num_such_ps += 1;
        }
    }
    cout << num_such_ps << "\n";
    return 0;
}

Measured memory_bytes: 256
import sys
input = sys.stdin.readline

m, d = map(int, input().split())
ans = 0
for i in range(1, m + 1):
    for j in range(22, d + 1):
        len_1 = int(str(j)[0])
        len_2 = int(str(j)[1])
        if len_1 >= 2 and len_2 >= 2 and len_1 * len_2 == i:
            ans += 1
print(ans)


Measured memory_bytes: 3060
a, b, c = map(int, input().split())
if a <= b <= c:
    print(a,b,c)
elif a <= c <= b:
    print(a,c,b)
elif b <= a <= c:
    print(b,a,c)
elif b <= c <=a:
    print(b,c,a)
elif c <= a <= b:
    print(c,a,b)
elif c <= b <= a:
    print(c,b,a)


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

#define rep(i, n) for (ll i = 0; i < (n); i++)
#define rep2(i, a, b) for (ll i = (a); i < (b); i++)
#define chmax(x, v)                                                            \
  do {                                                                         \
    x = max(x, v);                                                             \
  } while (0)
#define chmin(x, v)                                                            \
  do {                                                                         \
    x = min(x, v);                                                             \
  } while (0)
typedef uint64_t ull;
typedef int64_t ll;
typedef std::pair<ll, ll> PLL;

using namespace std;

const ll INF = 1e18;
string y;
ll dp[1001000][2];

signed main() {
  rep(i, 1001000) rep(c, 2) dp[i][c]=INF;
  cin >> y;
  reverse(begin(y), end(y));
  y = "0" + y + "0";
  // rep(i, y.size()) { printf("s[%d]=%c\n", i, y[i]); }
  dp[0][0]=0;
  for (ll i = 0; i + 1 < y.size(); i++) {
    ll ni = i+1;
    // cout << "# ni = " << ni << endl;
    rep(c, 2) {
      ll p = dp[i][c];
      if (p == INF)
        continue;
      // printf("# dp[%d][%d] = %d\n", i, c, p);
      rep(nx, 10) {
        ll ny = y[ni]-'0';
        if (nx-c >= ny) {
          // ni において繰り下がりは不要
          ll np = p + (nx + (nx-c-ny));
          ll nc = 0;
          // printf("# chmin(dp[%d][%d],%d)\n", ni, nc, np);
          chmin(dp[ni][nc],np);
        } else {
          // ni において繰り下がりが必要
          ll np = p + (nx + (10+nx-c-ny));
          ll nc = 1;
          // printf("# chmin(dp[%d][%d],%d)\n", ni, nc, np);
          chmin(dp[ni][nc],np);
        }
      }
    }
  }
  cout << dp[y.size()-1][0] << endl;
  return 0;
}


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

namespace AOJ
{
	class Program
	{
		static void Main(string[] args)
		{
			var d = new Dictionary<string, int>();
			var s = Console.ReadLine().Split(' ');
			foreach (var w in s)
			{
				if (!d.ContainsKey(w))
					d.Add(w, 0);
				d[w]++;
			}
			Console.WriteLine("{0} {1}", d.OrderBy(p => p.Value).Last().Key, d.OrderBy(p => p.Key.Length).Last().Key);
		}
	}
}

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

int main(){
  string n;

  cin >>n;

  for(int i = 0;i < n.length();i++){
    if(n[i] == '1')cout <<'9';
    else if(n[i] == '9')cout <<'1';
  }
  return 0;
}


Measured memory_bytes: 256
#define _USE_MATH_DEFINES
#include <iostream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <algorithm>
#include <climits>
#include <cstring>
#include <cmath>
#include <stack>
#include <iomanip>
#include <tuple>
#include <functional>
#include <cfloat>
#include <map>
#include <stdio.h>
#include <string.h>
using ll = long long;

//LLONG_MAX
#define int long long
#define CONTAINS(v,n) (find((v).begin(), (v).end(), (n)) != (v).end())
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define ARY_SORT(a, size) sort((a), (a)+(size))
#define REMOVE(v,a) (v.erase(remove((v).begin(), (v).end(), (a)), (v).end()))
#define REVERSE(v) (reverse((v).begin(), (v).end()))
#define LOWER_BOUND(v,a) (lower_bound((v).begin(), (v).end(), (a)))
#define UPPER_BOUND(v,a) (upper_bound((v).begin(), (v).end(), (a)))
#define REP(i, n) for (int (i)=0; (i) < (n); (i)++)
#define CONTAINS_MAP(m, a) (m).find((a)) != m.end()

using namespace std;


signed main()
{
	int a, b, c;
	cin >> a >> b >> c;

	int d = (c - b - a);
	int e = 4 * a * b;
	int f = d * d;
	if (d > 0 && e < f)
	{
		cout << "Yes" << endl;
	}
	else
	{
		cout << "No" << endl;
	}
}




Measured memory_bytes: 256
///*Bismillahir Rahmanir Rahim***///
/***Stay_Home_Stay_Safe***/
///**Author Thasin Sheikh**///
#include<bits/stdc++.h>
using namespace std;
#define MAX 35000
#define MOD 1000000007
#define PI 3.14159265359
#define makefast__  ios_base::sync_with_stdio(false);
using ll=long long int  ;
using dl =double;
const int N = 2e5 + 10;
ll aarray[200000+10];
ll pre[200000+10];
ll suf[200000+10];
ll magic[101][101];
vector<ll>primes;
bool prime[1000001];
int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    makefast__
    string str;
    ll a,b,c,d,e,f,x,y,k,t,A=0,mod,B=0,L,j,i,l,r,m,n,C=0,ans=0,sum=0,sum1=0;
    vector<ll>v,v1;
    queue<ll>qu;
    cin>>n;
    pre[0]=0;
    for(i=1;i<=n;i++)
    {
        cin>>aarray[i];
        pre[i]=pre[i-1]^aarray[i];
    }
    suf[n+1]=0;
    suf[n]=aarray[n];
    for(i=n-1;i>=1;i--)
    {
        suf[i]=suf[i+1]^aarray[i];
    }
    for(i=1;i<=n;i++)
    {
        cout<<(pre[i-1]^suf[i+1])<<" ";
    }

   cout<<endl;
    return 0;
}



Measured memory_bytes: 8324
import java.io.File

private fun readLn() = readLine()!! // string line
private fun readInt() = readLn().toInt() // single int
private fun readLong() = readLn().toLong() // single long
private fun readStrings() = readLn().split(" ") // list of strings
private fun readInts() = readStrings().map(String::toInt) // list of ints
private fun readLongs() = readStrings().map(String::toLong) // list of longs

fun main(args: Array<String>) {
    val x = readInt()
    val a500 = x / 500
    val a5 = (x % 500) / 5
    print(a500 * 1000 + a5 * 5)
}


Measured memory_bytes: 31840
using System;
using System.Collections.Generic;
using System.Linq;

namespace ABC099
{
    class Program
    {
        static void Main(string[] args)
        {
            List<string> list = new List<string>();
            while (true)
            {
                string line = Console.ReadLine();
                if (line == null) break;
                list.Add(line);
            }
            var ans = list[0].ToCharArray();

            int count = ans.Distinct().Count();

            if (count==ans.Count())
            {
                Console.WriteLine("yes");
            }else
	        {
                Console.WriteLine("no");
	        }
        }

    }
}


Measured memory_bytes: 13396
#include<bits/stdc++.h>
using namespace std;
#ifdef LOCAL_DEBUG
  #include "LOCAL_DEBUG.hpp"
#endif
#define int long long

struct UnionFind{
  vector<int> par; //親
  vector<int> size; //集合の大きさ

  UnionFind(int n){
    par.resize(n);
    size.resize(n);
    for(int i = 0; i < n; i++){
      par[i] = i;
      size[i] = 1;
    }
  }

  //木の根を求める
  int root(int x){
    if(par[x] == x){
      return x;
    }
    else {
      return par[x] = root(par[x]);
    }
  }

  //xとyの属する集合を併合
  void unite(int x,int y){
    x = root(x);
    y = root(y);
    if(x == y) return;

    if(size[x] < size[y]) swap(x,y);
    par[y] = x;
    size[x] += size[y];
  }
};

signed main(){

  int n, m; cin >> n >> m;
  UnionFind uf(n + n);
  for(int i = 0; i < m; i++){
    int a, b; cin >> a >> b;
    a--, b--;
    uf.unite(a, b + n);
    uf.unite(b, a + n);
  }

  if(uf.root(0) == uf.root(n)){
    cout << n * (n-1) / 2 - m << endl;
  }else {
    int cnt = 0;
    for(int i = 0; i < n; i++){
      if(uf.root(0) == uf.root(i)) cnt++;
    }
    cout << cnt * (n - cnt) - m << endl;
  }

  return 0;
}


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

int main() {
  int N, K;
  cin >> N >> K;
  vector<int> a(N);
  for (int i = 0; i < N; i++) cin >> a.at(i);
  sort(a.begin(), a.end());
  
  int sum = 0;
  for (int i = 0; i < K; i++) sum += a.at(i);
  cout << sum << endl;
}


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

bool is_prime(int a){
  if(a <= 1) return false;
  rep(i,a){
    if(i == 0 || i == 1)continue;
    if( a%i == 0) return false;
  }
  return true;
}

int main(){
  int a;
  cin >> a;
  int p = a;
  while(!is_prime(p))p++;
  cout << p << endl;
  return 0;
}


Measured memory_bytes: 256