akhauriyash/Code-Regression huggingface dataset:
//#include <ext/pb_ds/assoc_container.hpp> 
// #include <ext/pb_ds/tree_policy.hpp> 
#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstring>
#include <vector>
#include <deque>
#include <queue>
#include <set>
#include <map>
#include <valarray>
#include <iterator>
#include <functional>
#include <limits>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <cassert>
#include <unordered_map>
#include <unordered_set>
#include <stack>
using namespace std;
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define trace(x) cerr << #x << ": " << x << " " << endl;

typedef int64_t ll;

#define endl '\n'
#define int ll
ll mod=1e9+7;
ll mod1=1e9+6;

ll power(ll a,ll b)
{
    if(b==0) return 1;
    else if(b%2==0)
        return power((((a%mod)*(a%mod))%mod),b/2)%mod;
    else return ((a%mod)*(power((((a%mod)*(a%mod))%mod),b/2)%mod))%mod;
}

// using namespace __gnu_pbds;
// #define ordered_set tree<pair<int,int>, null_type,less<pair<int,int>>, rb_tree_tag,tree_order_statistics_node_update>
//find_by_order(k)  returns iterator to kth element starting from 0;
//order_of_key(k) returns count of elements strictly smaller than k;
//erase,insert same as normal set


int32_t main()
{
IOS

    int n;
    cin>>n;  
    string s;
    cin>>s;
    int ans=0;
    for(int i=0;i<n-2;++i)
    {
        if(s[i]=='A' and s[i+1]=='B' and s[i+2]=='C')
            ans++;
    }
    cout<<ans;


}    

Measured memory_bytes: 256
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define Rep(i, n) for(int i=0;i<n;++i)
#define rep(i, n) for(int i=1;i<=n;++i)
#define ll long long int
#define INF 1e9
#define LINF 1e18
#define MOD 1000000007
#define PI 3.14159265359
#define eps 1e-10
#define All(a) (a).begin(), (a).end()

using namespace std;
using P = pair<ll, ll>;
 
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};

/**
 * Usage:
 * 
 * G[from].push_back(Edge(to, weight));
 * using Graph = vector<vector<Edge>>;
 * 
 */ 
struct Edge {
  int to;     
  ll weight; 
  Edge(int t, ll w) : to(t), weight(w) { }
};

template<typename T>
void printv(vector<T>& v) {
  if (v.size() == 0) {
    cout << "\n";
    return;
  }

  Rep(i, v.size()) {
    cout << v[i] << ((i + 1 < v.size()) ? ' ' : '\n');
  }
}



double distance(double a, double b, double c, double d) {
  return sqrt((a-c)*(a-c)+(b-d)*(b-d));
}

pair<double, double> midpoint(double a, double b, double c, double d) {
  return make_pair((a+c)/2, (b+d)/2);
}

// 外接円の半径と外心を返す
pair<double, pair<double, double>> circumcenter(double a, double b, double c, double d, double e, double f) {
  double aa = a*a;
  double bb = b*b;
  double cc = c*c;
  double dd = d*d;
  double ee = e*e;
  double ff = f*f;

  double py = ((e-a)*(aa+bb-cc-dd)-(c-a)*(aa+bb-ee-ff))/(2*(e-a)*(b-d)-2*(c-a)*(b-f));
  double px = (c==a) ? ((2*(b-f)*py-aa-bb+ee+ff) / (2*(e-a))) : ((2*(b-d)*py-aa-bb+cc+dd)/(2*(c-a)));

  double r = sqrt((px-a)*(px-a)+(py-b)*(py-b));

  return make_pair(r, make_pair(px, py));
}


int N;
double x[60];
double y[60];

int main () {
  cin >> N;

  rep(i, N) cin >> x[i] >> y[i];

  double ans = INF;

  for (int i=1;i<=N;++i) {
    for (int j=i+1;j<=N;++j) {
      double tmp = distance(x[i], y[i], x[j], y[j]) / 2;

      bool flg = true;

      pair<double, double> m = midpoint(x[i], y[i], x[j], y[j]);

      rep(t, N) {
        if (distance(m.first, m.second, x[t], y[t]) - tmp > eps) {
          flg = false;
        }
      }

      if (flg) ans = min(ans, tmp);
    }
  }

  for (int i=1;i<=N;++i) {
    for (int j=i+1;j<=N;++j) {
      for (int k=j+1;k<=N;++k) {
        pair<double, pair<double, double>> c = circumcenter(x[i], y[i], x[j], y[j], x[k], y[k]);
        double tmp = c.first;
        pair<double, double> m = c.second;
        bool flg = true;

        rep(t, N) {
          if (distance(m.first, m.second, x[t], y[t]) - tmp > eps) {
            flg = false;
          }
        }

        if (flg) ans = min(ans, tmp);
      }
    }
  }

  printf("%.18f\n", ans);
}

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

#define rep(X,N) for(ll X = 0; X < (N); X++)
#define PI (acos(-1.0))
#define pback push_back
#define mpair make_pair
#define MODN 1000000007
#define ALL(V) (V).begin(),(V).end()
#define INT_MAX_HALF (INT_MAX / 2)
#define EPS (1e-10)

using namespace std;
typedef long long ll;

int main(){

    int k, n;
    cin >> k >> n;

    
    int maxa = 0;
    vector<int> a(n);
    cin >> a[0];

    rep(i, n - 1){
        cin >> a[i + 1];
        maxa = max(maxa, a[i + 1] - a[i]);
    }

    maxa = max(maxa, (k - a[n - 1]) + a[0]);

    cout << k - maxa << endl;

    return 0;
}


Measured memory_bytes: 1024
import java.util.*;

class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int W,H;
for(;;){
H =sc.nextInt();
W =sc.nextInt();
if(H == 0) break;
for(int a=0; a<W; a++) System.out.print("#");
System.out.println();
for(int c=2; c<H; c++){
System.out.print("#");
for(int b=2; b<W; b++) System.out.print(".");
System.out.println("#");
}
for(int a=0; a<W; a++) System.out.print("#");
System.out.println();
System.out.println();
}
}
}

Measured memory_bytes: 22916
#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
int INF = 1LL << 30;
int MOD = 1e9+7;
main(){
    int a,b;
    cin >> a >> b;
    if(a % b)cout << a << endl;
    else cout << -1 << endl;
}

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

using namespace std;

int main(){

    cin.tie(0);
    ios::sync_with_stdio(false);

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

    int w, h;
    vector<string> wall;
    vector< vector<int> > dist;
    int tx;
    int ty;

    while(cin >> w >> h, w){

        wall.resize((h << 1) - 1);

        cin.ignore();
        for (auto& x : wall)
            getline(cin, x);

        dist.assign(h, vector<int>(w, 0));
        dist[0][0] = 1;

        for(int d = 1; d < w * h; d++)
            for(int y = 0; y < h; y++)
                for(int x = 0; x < w; x++)
                    if(dist[y][x] == d)
                        for(int r = 0; r < 4; r++){
                            tx = x + dx[r];
                            ty = y + dy[r];

                            if(0 > tx || tx >= w || 0 > ty || ty >= h)
                                continue;

                            if(dist[ty][tx] != 0)
                                continue;

                            if (wall[ty + y][tx + x] == '0')
                                dist[ty][tx] = d + 1;
                        }

        cout << dist[h-1][w-1] << endl;

    }

    return 0;

}

Measured memory_bytes: 3124
n = int(input())
A = list(map(int, input().split()))

from collections import deque


cash = 1000
stock = 0

peak_min = deque()
peak_max = deque()

d_prev = 0
for i in range(1, n):
    a = A[i]
    if A[i] > A[i-1]:
        d = 1
    elif A[i] == A[i-1]:
        d = d_prev
    else:
        d = -1
    if d_prev*d == -1:
        if d == 1:
            peak_min.append(i-1)
        elif d == -1:
            peak_max.append(i-1)
    d_prev = d
#print(peak_min, peak_max)

if len(peak_min) == 0 and len(peak_max) == 0:
    if A[0] < A[-1]:
        ans = cash%A[0] + cash//A[0]*A[-1]
    else:
        ans = cash
elif len(peak_min) == 0:
    ans = cash%A[0] + cash//A[0]*A[peak_max[0]]
elif len(peak_max) == 0:
    ans = cash%A[peak_min[0]] + cash//A[peak_min[0]]*A[-1]
else:
    if peak_max[0] < peak_min[0]:
        peak_min.appendleft(0)
    if peak_max[-1] < peak_min[-1]:
        peak_max.append(n-1)
#    print(peak_min, peak_max)
    
    while len(peak_min) != 0:
        i = peak_min.popleft()
        stock += cash//A[i]
        cash = cash%A[i]
#        print(i, cash , stock)
        
        i = peak_max.popleft()
        cash += stock*A[i]
        stock = 0
#        print(i, cash , stock)
    ans = cash
print(ans)

Measured memory_bytes: 65292
#include <bits/stdc++.h> 
using namespace std;
int main() {
  int n,k;
  cin>>n>>k;
  int a[n];
  for(int i=0;i<n;i++) {cin>>a[i];}
  int dp[n+1]={0};
  for(int i=1;i<n;i++) {
    dp[i]=INT_MAX;
  	for(int j=i-1;j>=max(0,i-k);j--) {
      dp[i]=min(dp[j]+abs(a[i]-a[j]),dp[i]);
    }
  }
  cout<<dp[n-1]<<endl;
return 0;
}

Measured memory_bytes: 4408
#include<string>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<complex>
#include<cmath>
#include<algorithm>
#include<map>
#include<vector>
#include<sstream>
#include<iostream>
using namespace std;

int dijkstra[1010][1010];
int main(void){

    int n;

    while(cin>>n,n){
        string a[1010];
        for(int i = 0;i < n;i++)cin>>a[i];
        for(int i = 0;i < n;i++){
            for(int j = 0;j < n;j++){
                dijkstra[i][j] = 0;
            }
        }
        for(int i = 0;i < n;i++){
            if(a[0][i]=='.')dijkstra[0][i] = 1;
            if(a[i][0]=='.')dijkstra[i][0] = 1;
        }
        int ans = 0;
        for(int i = 1;i < n;i++){
            for(int j = 1;j < n;j++){
                if(a[i][j] == '.'){
                    int c = min(dijkstra[i-1][j],min(dijkstra[i-1][j-1],dijkstra[i][j-1]));
                    dijkstra[i][j] = c+1;
                    ans = max(ans,dijkstra[i][j]);
                }
            }
        }
        cout<<ans<<endl;
    }
    return 0;
}

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

#define ll long long
#define ld long louble
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    ll n;
    cin >> n;
    ll a[n+1];
    for (ll i = 1; i <= n; i++){
        cin >> a[i];
    }
    ll answ = 0;
    if (a[1] == 1){
        swap(a[1],a[2]);
        answ++;
    }
    if (a[n] == n){
        swap(a[n],a[n-1]);
        answ++;
    }
    for (ll i = 3; i < n; i++){
        if (a[i] == i){
            swap(a[i+1],a[i]);
            answ++;
        }
    }
    cout << answ << endl;
    return 0;
}

Measured memory_bytes: 1024
#include <stdio.h>
#include <stdlib.h>
#define MAX 100001
#define MAX2 50001
int main() {
int i,j;
int left,right,mid;
int n,m,a[MAX],b[MAX2],key,count=0;
scanf("%d",&n);
for(i=0;i<n;i++){
    scanf("%d",&a[i]);
}
scanf("%d",&m);
for(i=0;i<m;i++){
    scanf("%d",&b[i]);
}

for (j = 0; j < m; j++) {
  left=0;
  right=n;
  key=b[j];
  while (left<right) {
    mid=(left+right)/2;
if(a[mid]==key){
  count++;
  break;}
else if(a[mid]<key) {left=mid+1;}
else right=mid;
}}
printf("%d\n",count);
return 0;
}



Measured memory_bytes: 2320
/*
Author: Babin Dutta
*/

#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ll long long int
#define pb push_back
#define mp make_pair
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define f(i,n) for(int i=0;i<n;i++)
#define ff(i,a,b) for(int i=a;i<=b;i++)
#define all(v) v.begin(),v.end()
#define endl "\n"

void solve(){
	ll n, w; cin>>n>>w;
	ll a[n][2];
	f(i,n) cin>>a[i][0]>>a[i][1];
	vector<ll> v(w+1,0), tmp(w+1,0);
	for(int i=1;i<=n;i++){
		for(int j=0;j<=w;j++){
			if(j >= a[i-1][0]){
				v[j] = max(tmp[j], a[i-1][1] + tmp[j-a[i-1][0]]);
			}
			else v[j] = tmp[j];
		}
		f(j,w+1) tmp[j] = v[j];
	}
	cout<<v[w]<<endl;
}

int main(){
	#ifdef JUDGE
    freopen("input.txt", "rt", stdin);
    freopen("output.txt", "wt", stdout);
    #endif
	boost;
	int t=1; //cin>>t;
	for(int i=1;i<=t;i++) solve();
	return 0;
}

Measured memory_bytes: 1792
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define All(v) (v).begin(),(v).end()
int Dy[8] = {-1,0,1,0,-1,1,1,-1};
int Dx[8] = {0,1,0,-1,1,1,-1,-1};
vector<int> dy,dx;
int m;
char f[8][8];
bool QQ(int y,int x){
    for(int i=0;i<m;i++){
        int ny=y+dy[i];
        int nx=x+dx[i];
        if(ny<0||nx<0||ny>=8||nx>=8)continue;
        if(f[ny][nx]=='Q')return false;
    }
    return true;
}

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    for(int i=1;i<=8;i++){
        for(int j=0;j<8;j++){
            dy.push_back(Dy[j]*i);
            dx.push_back(Dx[j]*i);
        }
    }
    m=dy.size();
    int n;
    cin>>n;
    char s[8][8];
    for(int i=0;i<8;i++){
        for(int j=0;j<8;j++)s[i][j]='.';
    }
    set<int> sy,sx;
    for(int i=0;i<n;i++){
        int a,b;
        cin>>a>>b;
        s[a][b]='Q';
        sy.insert(a);
        sx.insert(b);
    }
    vector<int> x,y;
    for(int i=0;i<8;i++){
        if(!sy.count(i))y.push_back(i);
        if(!sx.count(i))x.push_back(i);
    }
    do{
        do{
            for(int i=0;i<8;i++){
                for(int j=0;j<8;j++){
                    f[i][j]=s[i][j];
                }
            }
            for(int i=0;i<y.size();i++){
                f[y[i]][x[i]]='Q';
            }
            bool ok=true;
            for(int i=0;i<8;i++){
                for(int j=0;j<8;j++){
                    if(f[i][j]=='Q'){
                        if(!QQ(i,j))ok=false;
                    }
                }
            }    
            if(ok){
                for(int i=0;i<8;i++){
                    for(int j=0;j<8;j++){
                        cout<<f[i][j];
                    }
                    cout<<endl;
                }return 0;
            }
        }while(next_permutation(All(y)));
    }while(next_permutation(All(x)));
}


Measured memory_bytes: 3224
#include <stdio.h>

int main(void)
{
	int S;
	int h, m, s;
	
	scanf("%d", &S);
	
	h = S / 3600;
	m = S % 3600 / 60;
	s = S % 3600 % 60;
	
	printf("%d:%d:%d\n", h, m, s);
	
	return (0);
}

Measured memory_bytes: 592
#define debug_interval ','
#define dump_interval ' '
#define debug_toggle 1
//{
#include<bits/stdc++.h>
using namespace std;
#define hi cerr<<"hi"<<endl;
#define int long long
#define INT_MAX LLONG_MAX
#define rep(i,n) for(int i=0;i<(n);i++)
#define rep1(i,n) for(int i=1;i<=(n);i++)
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define fi first
#define se second
#define mp make_pair
#define rev reverse
#define dans dump(ans)
#define MOD 1000000007
#define amp(v,n) (v).count(n)?v[n]++:v[n]=1
#define sysp system("pause")
#define PI acos(-1)
#define pf push_front
#define ins insert

//{
inline int toInt(string s){int v;istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
template<class...A> inline void dump(){cout<<endl;}
template<class...A> inline void dump_rest() {cout<<endl;}
template<class T, class...A> inline void dump_rest(const T& first, const A&... rest){cout<<dump_interval<<first;dump_rest(rest...);}
template<class T,class...A> inline void dump(const T&first,const A&...rest){cout<<first;dump_rest(rest...);}
template<class...A> inline void debug(){cerr<<endl;}
template<class...A> inline void debug_rest() {cerr<<endl;}
template<class T, class...A> inline void debug_rest(const T& first, const A&... rest){cerr<<debug_interval<<first;debug_rest(rest...);}
template<class T,class...A> inline void debug(const T&first,const A&...rest){if(debug_toggle)cerr<<first,debug_rest(rest...);}
//}

typedef vector<int>vint;
typedef pair<int,int>pint;
typedef vector<pint>vpint;

template<typename A,typename B>inline void chmin(A &a,B b){if(a>b)a=b;}
template<typename A,typename B>inline void chmax(A &a,B b){if(a<b)a=b;}
template<int m>class mint{private:int i;public:mint() : i(0){}mint(int i): i((i%m+m)%m){}mint operator+(const mint& o){return o.i+i;}mint operator*(const mint& o){return o.i*i;}mint operator-(){return -i;}operator int() {return i;}};

string s;
int ans;

main(){
	cin>>s;
	rep(i,s.size()-1){
		if(s[i]!=s[i+1])ans++;
	}
	dans;
}

Measured memory_bytes: 512
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

char *itoa( int val, char *a, int radix )
{
	char *p = a;
	unsigned int v = val;/* 作業用(変換対象の値) */
	int n = 1;/* 変換文字列の桁数記憶用 */
	while(v >= radix){/* 桁数を求める */
		v /= radix;
		n++;
	}
	p = a + n; /* 最下位の位置から設定する */
	v = val;
	*p = '\0';/* 文字列終端の設定 */
	do {
		--p;
		*p = v % radix + '0';/* 1桁の数値を文字に変換 */
		if(*p > '9') {/* 変換した文字が10進で表現できない場合 */
			*p = v % radix - 10 + 'A'; /* アルファベットを使う */
		}
		v /= radix;
	} while ( p != a);
	return a;
}

int main(void) {
	int sum,x,y;
	char ssum[8];
	
	while(scanf("%d%d", &x, &y) != EOF){
		sum = x+y;
		itoa(sum,ssum,10);
		printf("%d\n",strlen(ssum));
	}
	
	return 0;
}

Measured memory_bytes: 1028
N = int(input())
S = list(map(int,input()))

cnt = 0
for i in range(10):
    if i in S:
        k = S.index(i)
        for j in range(10):
            if j in S[k+1:]:
                l = S[k+1:].index(j)
                cnt += len(set(S[k+l+2:]))

print(cnt)


Measured memory_bytes: 3652
// #pragma GCC target("avx2")
#pragma GCC optimize("O3", "unroll-loops")

// #include <bits/extc++.h>
// using namespace __gnu_pbds;

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

#define int long long
#define double long double
// template <typename T>
// using pbds_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
using pii = pair<int, int>;
template<typename T>
using prior = priority_queue<T, vector<T>, greater<T>>;
template<typename T>
using Prior = priority_queue<T>;

#define X first
#define Y second
#define ALL(x) (x).begin(), (x).end()
#define eb emplace_back
#define pb push_back

#define fastIO() ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define RANDOM() random_device __rd; \
                 mt19937 __gen = mt19937(__rd()); \
                 uniform_int_distribution<int> __dis(1, 1E8); \
                 auto rnd = bind(__dis, __gen)

const int INF = 1E18;
const int mod = 1E9 + 7;
const double PI = acos(-1);

int32_t main() {
    fastIO();
    
    int n;
    string str, lst;
    cin >> n;
    
    set<string> st;
    for (int i = 0; i < n; ++i) {
        cin >> str;
        if (i and str.front() != lst.back()) return cout << "No\n", 0;
        if (st.count(str)) return cout << "No\n", 0;
        st.insert(str), lst = str;
    }
    
    cout << "Yes\n";
    
    return 0;
}

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

int ri() {
	int n;
	scanf("%d", &n);
	return n;
}

int main() {
	int n = ri();
	std::string s;
	std::cin >> s;
	if (n % 2) {
		std::cout << "No" << std::endl;
		return 0;
	}
	std::cout << (s.substr(0, n / 2) == s.substr(n / 2, n / 2) ? "Yes" : "No") << std::endl; 
	return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = (int)1e7;  
using  p = pair<int,int>;

int main(){
   int n;
   cin >> n;
   string s;
   cin >> s;
   auto w = vector<int>(n,0);
   auto e = vector<int>(n,0);
   auto sub = INF;
   auto t = 0;
   for (int i = 0; i < n; i++)
   {
      t += (s[i] =='W' ? 1 :0);
      w[i] = t;
   }
  	t =0;
  	for (int i = n-1; i >= 0; i--)
    {
      t += s[i] =='E' ? 1 :0;
      e[i] = t;
    }
	
  	auto _min = INF;
  	for(int i = 0; i < n; i++)
   {
       _min = min(_min,w[i]+e[i] -1);
   }
  	
    cout << _min;

}
  
  

Measured memory_bytes: 2948
using System;
using System.Text;

namespace GCD
{
    class Program
    {
        static void Main(string[] args)
        {
            var splitInput = Console.ReadLine().Split();

            var x = int.Parse(splitInput[0]);
            var y = int.Parse(splitInput[1]);

            if (x < y)
            {
                int temp = x;
                x = y;
                y = temp;
            }

            int rem = 0;

            while (true)
            {
                rem = x % y;

                if (rem == 0)
                    break;

                x = y;
                y = rem;
            } 

            Console.WriteLine(y);
        }
    }
}

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

using namespace std;

void abc_170a();

void abc_171a();

int main()
{
  //abc_170a();
  abc_171a();

}

void abc_170a()
{
  vector<int> x(5);
  for (int i = 0; i < 5; ++i) cin >> x[i];

  for (int i = 0; i < 5; ++i)
  {
    if (x[i] == 0)
    {
      cout << i + 1 << "\n";
      return;
    }
  }
}


void abc_171a()
{
  char c;
  cin >> c;

  if (c == tolower(c)) cout << "a\n";
  else cout << "A\n";
}


Measured memory_bytes: 3616
#include<bits/stdc++.h>
using namespace std;
#define lli long long int
#define pii pair<int,int>
#define pll pair<lli, lli>
#define vi  vector<int>
#define vii vector<pair<int,int>>
#define vll vector<lli>
#define pb  push_back
#define mpr  make_pair
#define ss  second
#define ff first
#define INF 1000000001
#define inf1 1000000000000000001
#define pie 3.14159265358979323846264338327950L
#define all(x) x.begin(),x.end()
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define testcase() int tc;cin>>tc;while(tc--)
#define clean(x) memset(x,0,sizeof(x))
const lli maxn = 300000+5;
const lli mod= 1000000007;
vector<lli> catlan(int n) {vector<lli> dp(n + 1, 0);dp[0] = 1;dp[1] = 1;for (int i = 2; i <= n; i ++) {for (int j = 0; j < i; ++ j) {dp[i] += dp[j] * dp[i - j - 1];}}return dp;}
lli digit(lli n){int res=(int)log10(n)+1;return res;}
lli lcm(lli a,lli b){lli ans=(a*b)/(__gcd(a,b));return ans;}
lli b_ex(lli n,lli a){lli res=1;while(n){if(n%2==1)res*=a;n>>=1;a=a*a;}return res;}
lli ncr(lli n,lli k){lli ans=1;if(k>n-k)k=n-k;for(lli i=1;i<=k;i++){ans*=(n-i+1),ans=ans/i;}return ans;}
lli power(lli a , lli n){lli ans = 1;while(n){if(n % 2)ans = (ans * a) % mod;n /= 2;a = (a * a) % mod;}return ans;}
lli set_bits(lli n){int c=0;if(n==0)return 0;while(n){if((n&1)==1){cout<<c<<" ";}c++;n=n>>1;}return c;}

/// RULESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS////
/// READ THEM ALOUD......................................................................................................
/// 1. If the constraints are low think brute force :3................
/// 2. Always cheack with customed testcases .. i.e = Base cases 0 or 1 or similar cases
/// 3. Always use lli :)
/// 4. Read the question again if the solution isnt gatting ac xD
/// 5. Work ur way through solutions :)
/// 6. :D


void solve()
{
    lli n;cin>>n;
    lli ans=0;
    for(lli i=1;i<=n;i++)
    {
        for(lli j=1;j<=n;j++)
        {
            if(i*j>n)break;
            if(n-(i*j)>0LL)ans++;
        }
    }
    cout<<ans<<endl;

}
int main()
{
    solve();
}


Measured memory_bytes: 3680
#include <bits/stdc++.h>
using namespace std;
 
#define froop1(a,n) for(int i = a;i < n;i++)
#define froop2(a,n) for(int i = a;i > n;i--)
int main(){
	int A,B,C,D;
  cin >> A >> B >> C >> D;
  while(A > 0 && C > 0){
    C -= B;
    if(C <= 0){
      cout << "Yes" << endl;
      break;
    }
    A -= D;
    if(A <= 0){
      cout << "No" << endl;
      break;
    }

  }
}

Measured memory_bytes: 3608
#include <iostream>
#include <cstring>

using namespace std;

int main(){
	int N, K;
	int S[100];
	while(cin >> N >> K, N){
		for(int i=0;i<K;i++) cin >> S[i];
		for(int i=0;i<N;i++){
			for(int j=0;j<K;j++){
				int t; cin >> t;
				S[j] -= t;
			}
		}
		bool ok = true;
		for(int i=0;i<K;i++)
			if(S[i] < 0) ok = false;
		cout << (ok ? "Yes" : "No") << endl;
	}
}

Measured memory_bytes: 852
#include<stdio.h>
#include<string.h>


#define M 1046527
#define NIL (-1)
#define L 14

char H[M][L];

int getChar(char ch){
  if(ch=='A')return 1;
  if(ch=='C')return 2;
  if(ch=='G')return 3;
  if(ch=='T')return 4;
  else return 0;
}
int getKey(char *str){
 int sum=0,p=1,i;
  for(i=0;i<strlen(str);i++){
    sum +=p*(getChar(str[i]));
    p *=5;
  }
  return sum;
}

int h1(int key){return key % M;}
int h2(int key){return 1+(key %(M-1));}

int find(char *str){
  int key,i,h;
  key=getKey(str);
  for(i=0;;i++){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(H[h],str)==0)return 1;
    else if(strlen(H[h])==0)return 0;
  }
  return 0;
}
int insert(char *str){
  int key,i,h;
  key=getKey(str);
  for(i=0;;i++){
    h=(h1(key)+i*h2(key))%M;
    if(strcmp(H[h],str)==0)return 1;
    else if(strlen(H[h])==0){
      strcpy(H[h],str);
      return 0;
    }
  }
  return 0;
}

int main(){
  int i,n,h;
  char str[L],com[9];
  for(i=0;i<M;i++){
    H[i][0]='\0';
  }
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%s %s",com,str);
    if(com[0]=='i'){
      insert(str);
    }
    else {
      if(find(str)){
	
	printf("yes\n");
      }else{
	printf("no\n");
      }
    }
   
    
  }
  return 0;
}



Measured memory_bytes: 16096
// atcoder/diverta2019-2/A/main.cpp
// author: @___Johniel
// github: https://github.com/johniel/

#include <bits/stdc++.h>

#define each(i, c) for (auto& i : c)
#define unless(cond) if (!(cond))

using namespace std;

typedef long long int lli;
typedef unsigned long long ull;
typedef complex<double> point;

template<typename P, typename Q> ostream& operator << (ostream& os, pair<P, Q> p) { os << "(" << p.first << "," << p.second << ")"; return os; }
template<typename P, typename Q> istream& operator >> (istream& is, pair<P, Q>& p) { is >> p.first >> p.second; return is; }
template<typename T> ostream& operator << (ostream& os, vector<T> v) { os << "("; each (i, v) os << i << ","; os << ")"; return os; }
template<typename T> istream& operator >> (istream& is, vector<T>& v) { each (i, v) is >> i; return is; }

template<typename T> inline T setmax(T& a, T b) { return a = std::max(a, b); }
template<typename T> inline T setmin(T& a, T b) { return a = std::min(a, b); }

int main(int argc, char *argv[])
{
  ios_base::sync_with_stdio(0);
  cin.tie(0);

  int n, k;
  while (cin >> n >> k) {
    if (k == 1) cout << 0 << endl;
    else cout << (n - k) << endl;
   }

  return 0;
}


Measured memory_bytes: 256
<?php
 
function input_and_explode() {
    $input_line = trim(fgets(STDIN));
    return explode(" ", $input_line);
}

$N = (int)input_and_explode()[0];

$status = 'No';

for ($i = 0, $max = intdiv($N, 7); $i <= $max; $i++) {
    if (($N - 7 * $i) % 4 === 0) {
        $status = 'Yes';
        break;
    }
}

echo "$status\n";

Measured memory_bytes: 4856
#include<bits/stdc++.h>
#define all(x) (x).begin(),(x).end()
#define ll long long
#define P pair<int,int>
#define rep(i,n) for(int i = 0; i < int(n); i++)
#define vi vector<int>
using namespace std;
const int INF = 1001001001;
const int MOD = 1e9+7;
template<class T> inline bool chmax(T &a, const T &b){ if(a<b){ a=b; return 1; } return 0; }
template<class T> inline bool chmin(T &a, const T &b){ if(b<a){ a=b; return 1; } return 0; }

int main(){
  cin.tie(0), ios::sync_with_stdio(false);
  int a,b,c; cin >> a >> b >> c;
  if(a%2 || b%2 || c%2){
    cout << 0 << endl;
    return 0;
  }
  if(a == b && b == c && c == a){
    cout << -1 << endl;
    return 0;
  }
  int ans = 0;
  while(1){
    if(a%2 || b%2 || c%2) break;
    int x = a/2, y = b/2, z = c/2;
    a = y+z;
    b = x+z;
    c = x+y;
    ans++;
  }
  cout << ans;
  cout << endl;
  return 0;
}


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

int main(){
  int a,b,c,d;
  cin>>a>>b>>c;
  if(a>b){
    d=a;
    a=b;
    b=d;
  }
  if(a>c){
    d=a;
    a=c;
    c=d;
  }
  if(b>c){
    d=b;
    b=c;
    c=d;
  }
  d=(b-a)+(c-b);
  cout<<d;
  return 0;
}
  


Measured memory_bytes: 256
s = str(input().strip())
t = str(input().strip())
cnt_min = 1001

for i in range(len(s)-len(t)+1):
    cnt = 0
    for j in range(len(t)):
        if s[i+j] == t[j]:
            cnt += 1
    cnt = len(t) - cnt
    cnt_min = min(cnt, cnt_min)

print(cnt_min)


Measured memory_bytes: 9116
#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <map>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;

#define NUM 10007

struct Info{
	Info(int arg_to,int arg_cost){
		to = arg_to;
		cost = arg_cost;
	}
	int to,cost;
};

struct Data{
	int boss_id,maximum,count;
};

int boss[100000],height[100000];
Data data[100000];
int table[100000];

int get_boss(int id){
	if(boss[id] == id)return id;
	else{
		return boss[id] = get_boss(boss[id]);
	}
}

void unite(int x,int y){
	int boss_x = get_boss(x);
	int boss_y = get_boss(y);

	if(boss_x == boss_y)return;

	if(height[x] > height[y]){

		boss[boss_y] = boss_x;

	}else if(height[x] < height[y]){

		boss[boss_x] = boss_y;

	}else{ //height[x] == height[y]

		boss[boss_y] = boss_x;
		height[x]++;
	}
}

int N;
vector<Info> V[100000];
bool check[100000];

void func(){

	for(int i = 0; i < N; i++)V[i].clear();

	for(int i = 0; i < N; i++){
		boss[i] = i;
		height[i] = 0;
	}

	int to,cost;
	for(int i = 0; i < N; i++){
		scanf("%d %d",&to,&cost);
		V[i].push_back(Info(to,cost));
		unite(i,to);
		scanf("%d %d",&to,&cost);
		V[i].push_back(Info(to,cost));
		unite(i,to);
	}

	int index = 0;
	for(int i = 0; i < N; i++){
		if(get_boss(i) == i){
			data[index].boss_id = i;
			data[index].maximum = -BIG_NUM;
			data[index].count = 0;
			table[i] = index;
			index++;
		}
	}

	int group_id;
	for(int i = 0; i < N; i++){
		group_id = table[get_boss(i)];
		for(int k = 0; k < 2; k++){
			if(V[i][k].to > i){
				if(V[i][k].cost > data[group_id].maximum){
					data[group_id].maximum = V[i][k].cost;
					data[group_id].count = 1;
				}else if(V[i][k].cost == data[group_id].maximum){
					data[group_id].count++;
				}
			}
		}
	}

	int ans = 1;

	for(int i = 0; i < index; i++){
		ans *= data[i].count;
		ans %= NUM;
	}

	printf("%d\n",ans%NUM);
}


int main(){

	while(true){
		scanf("%d",&N);
		if(N == 0)break;

		func();
	}

	return 0;
}

Measured memory_bytes: 5944
N = int(input())
T,A = map(int,input().split())
H = list(map(int,input().split()))

TM = [0]*N
for i in range(N):
	TM[i] =  T - H[i]*0.006
	TM[i] = abs(TM[i]-A)

#print(TM)
print(TM.index(min(TM))+1)

Measured memory_bytes: 3060
n, m = map(int, input().split())
from collections import defaultdict
dic = defaultdict(lambda: 0)
for i in range(m):
    a, b = [int(j) for j in input().split()]
    dic[int(a)] += 1
    dic[int(b)] += 1

for i in range(1,n+1):
    print(dic[i])

Measured memory_bytes: 3316
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<queue>
#include<string.h>
#include<vector>
#include<set>
#include<map>
#include<stdlib.h>
using namespace std;
const long long mod=1000000007;
const long long inf=mod*mod;
char in[20];
int main(){
	int sx,sy,tx,ty;
	scanf("%d%d%d%d",&sx,&sy,&tx,&ty);
	tx-=sx;ty-=sy;
	for(int i=0;i<tx;i++)printf("R");
	for(int i=0;i<ty;i++)printf("U");
	for(int i=0;i<tx;i++)printf("L");
	for(int i=0;i<ty;i++)printf("D");
	printf("D");
	for(int i=0;i<tx+1;i++)printf("R");
	for(int i=0;i<ty+1;i++)printf("U");
	printf("LU");
	for(int i=0;i<tx+1;i++)printf("L");
	for(int i=0;i<ty+1;i++)printf("D");
	printf("R\n");
}

Measured memory_bytes: 128
#include <iostream>
#include<bits/stdc++.h>
#include<vector>
#define fo(i,n) for(long long i=0;i<n;i++)
#define ll long long int
#define inf 999999999999999999
#define pb push_back
#define MOD 1000000007
#define tr(c,it) for(auto it = (c).begin(); it != (c).end(); ++it)
#define fio ios_base::sync_with_stdio(false);cin.tie(0);
using namespace std;
//cerr<< '\n' << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms\n" ;
//freopen("explicit.in", "r", stdin);
//freopen("explicit.out", "w", stdout);
 
void SieveOfEratosthenes() 
{ 
    bool prime[10000001];
    memset(prime, true, sizeof(prime)); 
  
    for (ll p=2; p*p<=10000000; p++) 
    { 
        if (prime[p] == true) 
        { 
            // Update all multiples of p greater than or  
            // equal to the square of it 
            // numbers which are multiple of p and are 
            // less than p^2 are already been marked.  
            for (ll i=p*p; i<=10000000; i += p) {
                prime[i] = false; 
            }
        } 
    }  
} 
ll binpow(ll a, ll b) {
    ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = (res * a);
        a = (a * a);
        b >>= 1;
    }
    return res;
}
ll gcd(ll a,ll b)
{
	if(b%a==0)
	   return a;
	return gcd(b%a,a);
}
ll nCrModpDP(ll n, ll r, ll p) 
{ 
    ll C[r+1]; 
    memset(C, 0, sizeof(C));   
    C[0] = 1;
    for (ll i = 1; i <= n; i++) 
    {
        for (ll j = min(i, r); j > 0; j--) 
            C[j] = (C[j] + C[j-1])%p; 
    } 
    return C[r]; 
} 
ll nCrModp(ll n, ll r, ll p) 
{ 
   // Base case 
   if (r==0) 
      return 1; 
   ll ni = n%p, ri = r%p; 
  
   return (nCrModp(n/p, r/p, p) * 
           nCrModpDP(ni, ri, p)) % p; 
} 
int32_t main() 
{
    fio
	ll j,i,n,t,l,r,c,h,k,m,maxi,d,x;
	cin>>l>>r>>d;
	c=0;
	for(j=l;j<=r;j++)
	{
		if(j%d==0)
			c++;
	}
	cout<<c;
}



	

		

Measured memory_bytes: 3600
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int m = sc.nextInt();
		sc.close();

		if (n == m) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}


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

using namespace std;

long long dp[20001];

int main() {
    int h, n;
    int a[1000];
    int b[1000];
    int ans = 0;

    cin >> h >> n;
    for (int i = 1; i <= n ;i++) {
        cin >> a[i] >> b[i]; 
    }

    //init

    //dp[0] = 0;
    for (int i = 1; i <= h; i++) {
        dp[i] = 1e9;
        for (int j = 1; j <= n; j++) { 
            dp[i] = min(dp[i], dp[max(0, i - a[j])] + b[j]);
        }
    }
    /*
    for (int i = 0; i <= h+100; i++) {
        cout << i << " " << dp[i] << "\n"; 
    }
    cout << "\n"; 
    */

    ans = dp[h];

    cout << ans << "\n"; 
    return 0;
}

Measured memory_bytes: 384
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		int c = sc.nextInt();

		System.out.println(b / a > c ? c : b / a);
	}
}

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

const double PI=acos(-1.0);

int main()
{
    long long i,j,k;
    long long n,x;
    cin>>n>>x;
    long long a[n+1];
    long long min[n];
    for(i=0;i<n;i++)cin>>a[i];
    a[i]=x;
    sort(a,a+i+1);
    for(i=1;i<=n;i++)
    {
        k=a[i]-a[i-1];
        min[i-1]=k;
    }
    j=min[0];
    for(i=1;i<n;i++)
    {
        j=__gcd(j,min[i]);
    }
    cout<<j<<endl;
  return 0;
}


Measured memory_bytes: 1792
#include<stdio.h>

int main(){
	int w, n, a, b, i, store, s[30];
	for(i = 0; i < 30; i++) s[i] = i + 1;
	scanf("%d", &w);
	scanf("%d", &n);
	for(i = 0; i < n; i++){
		scanf("%d,%d", &a, &b);
		store = s[a - 1];
		s[a - 1] = s[b - 1];
		s[b - 1] = store;
	}
	for(i = 0; i < w; i++) printf("%d\n", s[i]);
	return 0;
}

Measured memory_bytes: 596
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int x, y;

    while(true){
        cin >> x >> y;

        if(x == 0 && y == 0){
            break;
        }
        if(x > y){
            cout << y << " " << x << endl;
        }else if(x < y){
            cout << x << " " << y << endl;
        }else{
            cout << x << " " << y << endl;
        }   
    }
}

Measured memory_bytes: 2972
#include <cstdio>

using namespace std;

int main()
{
	for ( int i = 1; i <= 9; i++ )
	{
		for ( int j = 1; j <= 9; j++ )
		{
			printf("%dx%d=%d\n", i, j, i * j );
		}
	}

	return 0;
}

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

int main() {
  int N, flag = 0;
  string S;

  cin >> N;
  for (int i; i < N; i++) {
    cin >> S;
    if (S == "Y") {
      flag = 1;
      break;
    }
  }
  if (flag == 0) cout << "Three" << endl;
  else cout << "Four" << endl;
}


Measured memory_bytes: 256
#include <cmath>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
#define pi 3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870
struct pig
{
    int x,y;
}info[200100];
int cnt,n,a[200100],c[200100],xo,xt,yo,yt,len,num;
long double ans;
bool cmp1(pig a,pig b)
{
    return a.y < b.y;
}
bool cmp(pig a,pig b)
{
    if(a.x == b.x)return a.y > b.y;
    return yo < yt ? a.x < b.x : a.x > b.x;
}
int find(int L,int R,int x)
{
    if(L == R) return L;
    int mid = (L + R) >> 1;
    if(c[mid] < x) return find(mid + 1,len,x);
    else return find(L,mid,x);
}
int main()
{
    scanf("%d%d%d%d",&xo,&yo,&xt,&yt);if(xt < xo)swap(xo,xt),swap(yo,yt);
    scanf("%d",&n);
    for(int i = 1;i <= n;i++)scanf("%d%d",&info[i].x,&info[i].y);
    sort(info + 1,info + 1 + n,cmp);
    len=0;  c[0]=-0x7fffffff;
    for(int i = 1;i <= n;i++)
    {
        if(info[i].x > max(xt,xo) || info[i].y > max(yt,yo) || info[i].y < min(yo,yt) || info[i].x < min(xo,xt))continue;
        int tmp;
        if(info[i].y>c[len]) tmp = ++len;
        else tmp = find(1,len,info[i].y);
        c[tmp]=info[i].y;
    }
    ans = (long double)(abs(xt - xo) + abs(yt - yo)) * 100 - (20 - 5 * pi) * len;
    if(len == min(abs(xt - xo),abs(yt - yo)) + 1)ans += 5 * pi;
    printf("%.15Lf\n",ans);
}
/*
double result = 100.0 * (h + w) - (20 - 5 * M_PI) * lis.size();
    if (lis.size() == min(w, h) + 1) {
        result += 5 * M_PI;
    }
    // output
    printf("%.15lf\n", result);
*/

Measured memory_bytes: 2560
#include<stdio.h>

int main(void){
  int N;
  scanf("%d",&N);
  int H[N];
  int result = 0;
  int count = 0;
  for(int i = 0;i < N;i++)
    scanf("%d",&H[i]);
  for(int i = 0;i < N - 1;i++){
    if(H[i] >= H[i + 1]){
      count++;
    }
    else{
      if(result < count)
	result = count;
      count = 0;
    }
  }
  if(result < count)
    result = count;
  printf("%d",result);
}


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

int main() {
    string S;
    cin >> S;
    string a="CODEFESTIVAL2016";
    int count=0;
    for(int i=0;i<S.size();i++){
        if(S.at(i)!=a.at(i))count++;
    }
    cout << count << endl;
}

Measured memory_bytes: 256
#include <cstdio>
#include <algorithm>

using namespace std;

long long h1[120000],h2[120000],h3[120000],h4[120000],x[120000],y[120000];
long long m,s,t;
int i,n;

int main()
{
	scanf("%d%lld",&n,&m);
	for (i=1;i<=n;i++)
		scanf("%lld%lld",&x[i],&y[i]);
	for (i=1,t=0;i<=n;i++)
		t=t+y[i],h1[i]=max(h1[i-1],t-x[i]),h2[i]=max(h2[i-1],t-2*x[i]);
	for (i=n,t=0;i>0;i--)
		t=t+y[i],h3[i]=max(h3[i+1],t-(m-x[i])),h4[i]=max(h4[i+1],t-2*(m-x[i]));
	for (i=0;i<=n;i++)
		s=max(s,max(h1[i]+h4[i+1],h2[i]+h3[i+1]));
	printf("%lld",s);
	return 0;
}

Measured memory_bytes: 5120
n=int(input())
s=list(map(int,input().split()))
q=int(input())
t=list(map(int,input().split()))
cnt=0


for i in range(q):
    a=t[i]
    
    left=0
    right=n-1
    
    while left<=right: 
        center=(left+right)//2
        m=s[center]
       
        if m==a:
            cnt+=1
            break
            
        elif m > a:
            right=center-1
        elif m < a:
            left=center+1

print(cnt)



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

using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef map<ll,ll>::iterator itll;
typedef long double ld;
typedef map<ll,ll> mapll;

#define con continue
#define pb push_back
#define fi first
#define se second
#define fr front()
#define INF 1000000000000000000
#define all(vl) vl.begin(),vl.end()
#define m_p make_pair 
#define sz(a) sizeof(a)
#define forn(mp,it) for(it = mp.begin();it!=mp.end();it++)
#define FOR(i,a,n) for(int i=a;i<n;i++) 
#define FORE(i,a,n) FOR(i,a,n+1)
#define Endl endl
#define eNdl endl
#define enDl endl
#define endL endl

int main()
{
	string s;
	cin>>s;
	if(s[0]!=s[1]&&s[2] == s[3]&&s[4] == s[5])cout<<"Yes"<<endl;
	else cout<<"No"<<Endl;
	return 0;
} 


Measured memory_bytes: 3608
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;

int main(){
  long double a, b, c;
  cin >> a >> b >> c;
  
  long double s_a, s_b, s_c;
  s_a = sqrt(a);
  s_b = sqrt(b);
  s_c = sqrt(c);
  
  long double eps = 1.0E-14;
  
  if (s_c - (s_a + s_b) > eps) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}



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

#define ff first
#define ss second
#define PI acos(-1)
#define pb push_back
#define int long long
#define ld long double
#define sp fixed<<setprecision
#define bp __builtin_popcountll
#define all(x) x.begin(),x.end()
#define pii pair<long long,long long>
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

int MOD = (1e9)+7;
const int N = 1e6+5;

signed main()
{
    FAST
    int tc=1;
    //cin>>tc;
    for(int ti=1;ti<=tc;ti++)
    {
        int n,m,ind=1;
        cin>>n>>m;
        pii a[2] = {{1,m+1},{m+2,(2*m)+1}};
        for(int i=0;i<m;i++)
        {
            cout<<a[i%2].ff<<" "<<a[i%2].ss<<endl;
            a[i%2].ff++;
            a[i%2].ss--;
        }
    }
    return 0;
}


Measured memory_bytes: 3672
#include<stdio.h>
int main()
{
    int a,b,x;
    scanf("%d %d %d",&a,&b,&x);
    if(a==x)
        printf("YES\n");
    else
        if(a>x)
        printf("NO\n");
    else
        if(a+b>=x)
        printf("YES\n");
        else
            printf("NO\n");
    return 0;
}


Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
#define eb push_back
#define mp make_pair
#define hello cout<<"hello"<<"\n"
#define forr(i,a,b) for(int i=a;i<b;i++)
#define it(s)	for(auto itr:s)
#define dvg(s) 	for(auto itr:s)	cout<<itr<<" ";cout<<endl;
#define dbg(s)	cout<<#s<<"= "<<s<<endl;
typedef long long int lli;
typedef unsigned long long int ulli;
const lli INF=(lli)1e18+5;
const ulli MOD=1e9+7;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    std::cout<< std::fixed;
    std::cout.precision(6);
   
	char ch1[3*(int)1e5];
	char ch2[(int)3*(int)1e5];
	cin>>ch1>>ch2;
	int len=strlen(ch1);
	
	int c=0;
	forr(i,0,len)
	{
		if(ch1[i]!=ch2[i])	c++;
	}
	cout<<c<<"\n";
	
	
		
			
	return 0;
}









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

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

    long long left = 1;
    long long left_sum = A[0];
    long long right = N-2;
    long long right_sum = A[N-1];

    while(right - left >= 0)
    {
        if(left_sum >= right_sum)
        {
            right_sum += A[right];
            right--;
        }
        else
        {
            left_sum += A[left];
            left++;
        }
    }

    cout << abs(right_sum - left_sum) << endl;

    return 0;
}

Measured memory_bytes: 1792
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <cctype>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <limits>

using namespace std;
typedef long long int ll;
typedef long double ld;
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }                   // 最大公約数
ll lcm(ll a, ll b) { return a * b / gcd(a, b); };                      // 最小公倍数
ll getDigit(ll num) { return log10(num) + 1; }                         // 桁数
ll digitSum(ll n) { return (n < 10) ? n : digitSum(n / 10) + n % 10; } // 各桁の和
#define pb push_back
#define rep(i, n) for (ll i = 0; i < n; i++)
#define repn(i, n) for (ll i = 1; i <= n; i++)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define all(x) (x).begin(), (x).end()

void Main()
{
    int a, b;
    string s;
    cin >> a >> s >> b;
    if (s[0] == '+')
        cout << a + b;
    if (s[0] == '-')
        cout << a - b;

    return;
}

signed main(void)
{
    std::cin.tie(nullptr);
    std::ios_base::sync_with_stdio(false);
    std::cout << std::fixed << std::setprecision(15);
    Main();
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
#define REP(i, n) for (LL i = 0; i < (LL)(n); i++)
#define REP2(i, n) for (LL i = 1; i <= (LL)(n); i++)
#define FOR(i, m, n) for (LL i = m; i < n; i++)
#define SORT(x) sort(x.begin(), x.end())
#define REVE(x) reverse(x.begin(), x.end())
#define ALL(x) (x).begin(), (x).end()
#define SUM(x) accumulate(x.begin(), x.end(),0LL)
#define vLL(v,n) vector<LL> v(n); REP(i,n)cin>>v[i];
#define vstr(v,n) vector<string> v(n); REP(i,n)REP(i,n)cin>>v[i];
LL INF = 1e9 + 1;
LL MOD = 1e9+7;
  LL zero,a,b,c,d,e,n,m,l,k,r,x,y,z,odd,ans=INF,ans2=0,h,w;
string s,S,t;
int main() {
ios_base::sync_with_stdio(false);
cin >> s;
a=0;b=0;
REP(i,s.size()){
    if(s[i]=='0')a++;
    else b++;
} 
cout << min(a,b) * 2 <<endl;
}


Measured memory_bytes: 3748
#include<stdio.h>
#include<string.h>
typedef long long ll;
using namespace std;
int main()
{
    int n,N,ans,i,j,s;
    scanf("%d",&N);
    n=N;
    int x=0;
    ans=0;
    while(n)
    {
        n/=10;
        x++;
    }
    //printf("x=%d\n",x);
    if(x%2==0)
    {
        x--;
        for(i=1; i<=x; i+=2)
        {
            int s=1;
            for(j=1; j<i; j++)
            {
                s=10*s;
            }
            ans=ans+9*s;
        }
        x++;
    }
    if(x%2==1)
    {
        x-=2;
        for(i=1; i<=x; i+=2)
        {
            int s=1;
            for(j=1; j<i; j++)
            {
                s=10*s;
            }
            ans=ans+9*s;
        }

        x+=2;
        int s=1;
        for(j=1; j<x; j++)
        {
            s=10*s;
        }//printf("s=%d,\n",s);
        ans+=N-s+1;
    }

    printf("%d\n",ans);
}


Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
int main(){
    int x[5], i, res;
    for(i=0; i<5; i++){
        cin >> x[i];
        if(x[i] == 0)
            res= i+1;
    }
    cout << res << '\n';
    return 0;
}


Measured memory_bytes: 3540
#pragma region

#include "bits/stdc++.h"
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define _rep3(i, begin, end) for (register int i = (begin), i##_end = (end); i < i##_end; i++)
#define _irep3(i, begin, end) for (register int i = (end)-1, i##_begin = (begin); i >= i##_begin; i--)
#define _rep2(i, n) _rep3(i, 0, n)
#define _irep2(i, n) _irep3(i, 0, n)
#define _overload3(_1, _2, _3, name, ...) name
#define rep(...) _overload3(__VA_ARGS__, _rep3, _rep2, )(__VA_ARGS__)
#define irep(...) _overload3(__VA_ARGS__, _irep3, _irep2, )(__VA_ARGS__)
#define out(x) cout << (x) << '\n';
#define debug(x) cerr << #x << " = " << (x) << " (line: " << __LINE__ << ") " << endl;
typedef long long ll;

void init() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);
}

template <typename T>
istream &operator>>(istream &is, vector<T> &vec) {
  for (auto &v : vec) is >> v;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &vec) {
  os << "vec[ ";
  rep(i, vec.size()) i == 0 ? os << vec[i] : os << ", " << vec[i];
  os << " ]";
  return os;
}

#pragma endregion

#define MOD 1000000007
#define INF 2147483647

int main() {
  init();

  int N, M;
  cin >> N>> M;

  out(N == M ? "Yes" : "No");
}


Measured memory_bytes: 256
#include  <iostream>
using namespace std;
static const int MAX = 100006;
static const int NO = -1;

struct node{
  int p,l,r;
};

node tree[MAX];
int d[MAX] = {};

void printchild(int u){
  int c;
  if(tree[u].l == NO) {
    cout << ']';
  }
  c = tree[u].l;
  while(c != NO){
    cout << c;
    c = tree[c].r;
    if(c != NO) cout << ", ";
    else cout << ']';
  }
}

int depth(int u){

  int e,d = 0 ;
  e = tree[u].p;
  while(e != NO){
    e = tree[e].p;
    d++;
  }
  return d;
}

void print(int u){

  d[u] = depth(u);
  cout << "node " << u <<':' ;
  cout << " parent " << "= " << tree[u].p << ',';
  cout << " depth " << "= " << d[u] << ',' ;
  if (tree[u].p == NO) {cout << " root, " << '[' ;
  printchild(u);
  cout << endl;
}
else if(tree[u].l == NO){
  cout << " leaf, " << "[]" << endl;
}
else {
  cout << " internal node, " << '[' ;
  printchild(u);
  cout << endl;
}

}



int main(){

  int n,k,u,c,e;
  cin >> n;
  for(int i = 0;i < n;i++){
    tree[i].p = NO;
    tree[i].r = NO;
    tree[i].l = NO;
  }
  for(int i = 0;i < n;i++){
    cin >> u;
    cin >> k;
    for(int j = 1;j <= k;j++){
      if(j == 1){
        cin >> e;
        tree[u].l = e;
        tree[e].p = u;
      }
      else {
        c = e;
        cin >> e;
        tree[c].r = e;
        tree[e].p = u;
      }
    }
  }
  for(int i = 0;i < n;i++) print(i);

}

Measured memory_bytes: 4656