akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
//#pragma GCC optimize "-O3"
typedef unsigned long long ull;
typedef unsigned int ui;
typedef unsigned short us;
typedef long long ll;
typedef long double ld;
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

const ll infll=(1ull<<63)-1;
const int inf=(1ull<<31)-1;

struct P{
	ld x,y;
};

P operator - (P a,P b){
	return {a.x-b.x,a.y-b.y};
}

ld len(P a){
	return (ld)a.x*a.x+a.y*a.y;
}

int n;
vector<P> a(8);
short b[8]={0,1,2,3,4,5,6,7};
ld s=0;

int main()
{
	//freopen("input.txt","r",stdin);freopen("output.txt","w",stdout);
	ios_base::sync_with_stdio(false); cin.tie(0);cout.precision(18);
	cin>>n;
	for (int i=0,f,t;i<n;i++){
		cin>>f>>t;
		a[i].x=f,a[i].y=t;
	}
	do {
		for (int i=1;i<n;i++){
			s+=sqrt((ld)len(a[b[i]]-a[b[i-1]]));
		}	
	}while(next_permutation(b,b+n));
	int t=1;
	for (int i=2;i<=n;t*=i,i++);
	cout<<(ld)s/t;
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <math.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>;


int main() {
	int n,p,q,r,t;
	cin >> n;
	int count;
	count = 0;
	vector<int> s;
	rep(i, n) {
		cin >> t;
		s.push_back(t);
	}
	sort(s.begin(), s.end());
	rep(i, n) {
		p = s[i];
		rep(j, n-i-1) {
			q = s[j + i + 1];
			rep(k, n - i - j - 2) {
				r = s[k + i + j + 2];
				if ((p + q) > r&&p!=q&&r!=q&&p!=q) {
					count++;
				}
			}
			
		}
		
	}
	cout << count << endl;
	return 0;
}

Measured memory_bytes: 3624
int_n, int_m = map(int, input().split())

li_n = list()
li_m = list()

for i in range(int_n):
    li_n.append(list(map(int, input().split())))

for i in range(int_m):
    li_m.append(list(map(int, input().split())))


for n in li_n:
    l_dis = [abs(n[0] - m[0]) + abs(n[1] - m[1]) for m in li_m]

    minimum = min(l_dis)
    print(l_dis.index(minimum) + 1)






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

using namespace std;

const int MAXN=1e5+4;

int main()
{
    long long int n, a[MAXN], neg=0, suma=0, mini=MAXN*MAXN, f=0;
    cin >> n;
    for(int i=0;i<n;i++) cin >> a[i];
    for(int i=0;i<n;i++){
        if(a[i] == 0) f = 1;
        if(a[i] < 0ll){
            neg++;
            a[i] = -a[i];
        }
        suma+=a[i];
        mini = min(mini, a[i]);
    }
    if(f || neg%2 == 0) cout << suma;
    else cout << suma-2*mini;
    return 0;
}


Measured memory_bytes: 1024
import java.util.*;
import static java.lang.Math.*;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		// 入力
		int q = sc.nextInt();
		int[] a = new int[q];
		int[] b = new int[q];
		for(int i = 0; i < q; i++){
		    a[i] = sc.nextInt();
		    b[i] = sc.nextInt();
		}
		
		// 計算
		
		// 出力
		for(int i = 0; i < q; i++){
		    System.out.println(calc(a[i], b[i]));
		}
		
	}
	
	static int calc(int a, int b){
	    long ab = (long)a * b;
	    long l = (long)floor(sqrt(ab));
	    long r = l;
	    if(l*(r+1) < ab) r++;
	    long cnt = l*2 - 1;
	    if(l == r){
	        if(l*l == ab && a != l) cnt--;
	        cnt--;
	    }
	    return (int)cnt;
	}

}




Measured memory_bytes: 23124
s = str(input())[::-1]
sum_of_digits = 0
cnt = [0] * 2019

cnt[0] = 1
d = 1
for c in s:
    d *= 10
    d %= 2019
    sum_of_digits += d * int(c)
    sum_of_digits %= 2019
    cnt[sum_of_digits] += 1

print(sum([i*(i-1)//2 for i in cnt]))

Measured memory_bytes: 9396
#include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int x, y;
    cin >> x >> y;
    int map[13] = {};
    map[4] = map[4] = map[4] = map[11] = 1;
    map[2] = 2;
    cout << (map[x] == map[y] ? "Yes" : "No");
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define ll long long int
#define ul unsigned long long int
#define mp make_pair
#define endl "\n"
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);
#define lb lower_bound
#define forn(i,n) for(ll i=0 ; i<n ; i++)
#define arr(a,n) for(ll i=0;i<n;i++){ cin>>a[i]; }
#define ub upper_bound
#define pb push_back
#define pi pair<int,int>
#define mod 1000000007
#define vectormax *max_element
#define vectormin *min_element
#define arraysize 1000000
#define setbit _builtin_popcountll
using namespace std;

ll ipow(ll x, ll n)
{
    ll result = 1;
    while (n) {
        if (n & 1)
            result = result * x ;
        n = n / 2;
        x = x * x;
    }
    return result;
}
int main(){
 int x;
 cin>>x;
 if(x>=400 and x<=599)
    cout<<8<<endl;
 else if (x>=600 and x<=799)
    cout<<7<<endl;
    else if (x>=800 and x<=999)
    cout<<6<<endl;
    else if (x>=1000 and x<=1199)
    cout<<5<<endl;
    else if (x>=1200 and x<=1399)
    cout<<4<<endl;
    else if (x>=1400 and x<=1599)
    cout<<3<<endl;
    else if (x>=1600 and x<=1799)
    cout<<2<<endl;
    else if (x>=1800 and x<=1999)
cout<<1<<endl;
return 0;
}


Measured memory_bytes: 3636
using System;
class Program
{
  static void Main(string[] args)
  {
    Write(1110-Read());
  }

  static void Write(string s) { Console.WriteLine(s); return; }
  static void Write(long n) { Console.WriteLine(n.ToString()); return; }
  static string ReadStr() { return Console.ReadLine(); }
  static string[] ReadStrs() { return Console.ReadLine().Split(' '); }
  static long Read() { return long.Parse(Console.ReadLine()); }
  static long[] Read(long n) {
    long[] p = new long[n];
    string[] t = Console.ReadLine().Split(' ');
    for(long i = 0; i < n; i++) { p[i] = long.Parse(t[i]); }
    return p;
  }
  static long abs(long n) { return (n > 0) ? n : -n; }
  static long gcd(params long[] n) { long p = n[0]; for (long i = 1; i < n.Length; i++) { p = gcd(p, n[i]); } return p; }
  static long gcd(long a, long b) { return (a==0)?b:gcd(b % a, a); }
  static long lcm(params long[] n) { long p = n[0]; for (long i = 1; i < n.Length; i++) { p = lcm(p, n[i]); } return p; }
  static long lcm(long a, long b) { return a * b / gcd(a, b); }
  static long max(params long[] n) { long p = n[0]; for (long i = 1; i < n.Length; i++) { p = (p>n[i])?p:n[i]; } return p; }
  static long min(params long[] n) { long p = n[0]; for (long i = 1; i < n.Length; i++) { p = (p<n[i])?p:n[i]; } return p; }
  static void YN(bool t) { Console.WriteLine(t ? "YES" : "NO"); }
  static void Yn(bool t) { Console.WriteLine(t ? "Yes" : "No"); }
  static void yn(bool t) { Console.WriteLine(t ? "yes" : "no"); }
  static string clip(string s, int start, int count) {
    if (start + count < s.Length) { s = s.Remove(start + count); }
    if (start > 0) { s = s.Remove(0, start); }
    return s;
  }
}


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

#include <boost/range/adaptors.hpp>
#include <boost/range/irange.hpp>

using namespace std;
using namespace boost;
using namespace boost::adaptors;

int main() {
    int64_t n, x;
    cin >> n >> x;

    if (x == 1 || x == 2 * n - 1) {
        cout << "No" << endl;
        return 0;
    }

    cout << "Yes" << endl;
    for (auto i : irange(0L, 2 * n - 1)) {
        cout << (x - 1 + n + i) % (2 * n - 1) + 1 << "\n";
    }
}

Measured memory_bytes: 1536
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <numeric> // accumulate(v.begin(), v.end(), 0)

using namespace std;
#define ll long long
#define mod 1000000007

int main(){
  int N;
  string S1, S2;
  cin >> N >> S1 >> S2;
  ll ans = 1;
  int state = 0;
  for(int i=0; i<N; i++){
    if(S1[i] == S2[i]){
      switch(state){
      case 0:
	ans *= 3;
	break;
      case 1:
	ans *= 2;
	break;
      case 2:
	ans *= 1;
	break;
      default:
	cout << "something wrong" << endl;
	exit(0);
      }
      state = 1;
    } else {
      switch(state){
      case 0:
	ans *= 3 * 2;
	break;
      case 1:
	ans *= 2 * 1;
	break;
      case 2:
	ans *= 3;
	break;
      default:
	cout << "something wrong" << endl;
	exit(0);
      }
      state = 2;
      i++;
    }
    ans %= mod;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, n) for(int i = 0; i < n; i++)
#define REP(i, a, b) for(int i = a; i <= b; i++)
#define all(x) x.begin(), x.end()
#define fi first
#define se second
#define debug(...) cerr<<__LINE__<<" ["<<#__VA_ARGS__<<"]:",debug_out(__VA_ARGS__)
template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec)
{ for (auto v : vec) os << v << ' '; os << '\n'; return os; }
template <typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &pa)
{ os << '(' << pa.first << ',' << pa.second << ')'; return os; }
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T)
{ cerr << " " << H; debug_out(T...); }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int INF = (1<<30) - 1;
const ll LINF = (1LL<<60) - 1;

void solve() {
    int n;
    cin >> n;
    vector<ll> A(n), ans(n);
    ll sum = 0;
    rep(i, n) {
        cin >> A[i];
        sum += A[i];
    }
    ll x = 0;
    for (int i = 1; i < n; i += 2) {
        x += A[i] * 2;
    }
    ans[0] = sum - x;
    REP(i, 1, n - 1) {
        ans[i] = 2 * A[i - 1] - ans[i - 1];
    }
    rep(i, n) cout << ans[i] << " \n"[i == n - 1];
}

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


Measured memory_bytes: 4784
#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <queue>
#include <limits>
#include <algorithm>
#include <string>
#include <map>
#include <set>
using namespace std;

int main()
{
	int64_t a, b, x;
	cin >> a >> b >> x;

	int64_t start = a % x == 0 ? (a / x) : (a / x + 1);
	int64_t end = b / x;

	if (end < start) {
		cout << (a % x == 0 ? 1 : 0) << endl;
	} else {
		cout << end - start + 1 << endl;
	}

	return 0;
}

Measured memory_bytes: 256
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    a, b = LI()

    if a <= b:
        print(a)
    else:
        print(a - 1)

if __name__ == '__main__':
    resolve()


Measured memory_bytes: 10024
X , Y = map(int, input().split())

if X%Y == 0:
  print(-1)
else:
  i = 2
  while True:
    if X*i > 10**18:
      print(-1)
      break
    if X*i%Y != 0:
      print(X*i)
      break
    i += 1

Measured memory_bytes: 38384
#include <fstream>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <cmath>
#include <climits>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>

#define rep(i,n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())

using namespace std;
typedef long long ll;

int main() {
#ifdef RUN_LOCAL
  ifstream in("../input.txt");
  cin.rdbuf(in.rdbuf());
#endif

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


  ll n, k;
  cin >> n >> k;

  unordered_set<ll> set;
  ll min_num = n;
  if (n > k) {
    set.insert(n);
    n = n % k;
  }
  while (set.count(n) == 0) {
    set.insert(n);
    n = abs(n - k);
    min_num = min(min_num, n);
  }

  cout << min_num << endl;

  return 0;
}


Measured memory_bytes: 256
N=int(input())
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
yakusuu=make_divisors(N)
if len(yakusuu)%2 != 0:
    print(len(str(yakusuu[len(yakusuu)//2])))
else:
    ans=pow(10,9)
    for n in range(len(yakusuu)//2):
        number=max(len(str(yakusuu[n])),len(str(yakusuu[-n-1])))
        ans=min(ans,number)
    print(ans)
    

Measured memory_bytes: 66672
n, m = [int(i) for i in input().split()]
h = [int(i) for i in input().split()]
hs = [[] for i in range(n)]
for i in range(m):
    a, b = [int(i) for i in input().split()]
    hs[a-1].append(h[b-1])
    hs[b-1].append(h[a-1])
c = 0
for i in range(n):
    if len(hs[i]) == 0:
        c += 1
    elif h[i] > max(hs[i]):
        c += 1
print(c)

Measured memory_bytes: 22996
H,W= map(int, input().split())
a=[list(input()) for i in range(H)]

dp=[[0 for i in range(W+1)] for j in range(H+1)]
dp[0][1]=1
for i in range(1,W+1):
    for j in range(1,H+1):
        if a[j-1][i-1]=='.':
            dp[j][i]=dp[j-1][i]+dp[j][i-1]
print((dp[-1][-1])%(10**9+7))

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


#define endl '\n'
#define mem(a,b) memset(a, b, sizeof(a) )
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);


const int mx = 1e5+123;

const int inf = 2000000000;

int dp[mx][4], h[mx][4],n;


int solve (int i , int f1)
{
           if (i>n) return 0;
           if (dp[i][f1] != -1) return dp[i][f1];

           int ret = 0;
           for (int j=1; j<=3; j++){

            if (j != f1){

             ret=max(ret, h[i][j] + solve (i+1, j));
}

           }
           return dp[i][f1] = ret;





}
    int main (){

             optimize();

             cin>>n;
             for(int i=1; i<=n; i++){
                  cin>>h[i][1] >> h[i][2] >> h[i][3];


}

            memset (dp , -1 , sizeof(dp));
            cout<<solve(1, 0) <<endl;

return 0;

}




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

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<int  ,int > pii;
typedef pair<ll  ,ll > pll;

const ll maxn =2e6;
const ll mod = 1e9+7;
const ld PI = 4 * atan((ld) 1);

#define pb(x) push_back(x);
#define endl '\n'
#define dokme(x) cout << x ;  return(0);
#define migmig ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define file_init freopen("input.txt", "r+", stdin); freopen("output.txt", "w+", stdout);
#define ms(x , y) memset(x , y , sizeof x);
ll pw(ll a, ll b) {
    return (!b ? 1 : (b & 1 ? a * pw(a * a % mod, b / 2) % mod : pw(a * a % mod, b / 2) % mod));
}

map < int , int > mp;

int main(){
    migmig
    int n;
    cin >> n;
    for (int i = 0 ; i < n ; i ++){
        int inp;
        cin >> inp;
        if(mp[inp]){
            dokme("NO")
        }
        mp[inp] = 1;
    }
    cout << "YES";


    return(0);
}


//When we hit our lowest point, we are open to the greatest change.
//If I try, I fail. If I don't try, I'm NEVER GOING TO GET IT.
//Sometimes, life is like this dark tunnel. You can't always see the light at the end of the tunnel. But if you just keep moving... you will come to a better place.
//It is important to draw wisdom from diffrent places. If you take it from only one place it becomes rigid and stale.


Measured memory_bytes: 9600
j,p[1<<20],n;
main(i)
{
	for(;++i<999;)
		for(j=i+i;!p[i]&j<1<<20;j+=i)
				p[j]=1;
	for(;scanf("%d",&n),j=0,n;printf("%d\n",j))
		for(i=2;i<=n/2;i++)j+=!p[i]&!p[n-i];
	exit(0);
}

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

#define debug(x) cerr<<#x<<'='<<x<<' '
#define f first
#define s second

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

int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	ll n,k;
	cin >> n >> k;
	vector<ll> a(n);
	for (int i = 0; i < n; ++i) cin >> a[i];
	sort(a.begin(),a.end(),greater<int>());
	ll ans = 0;
	for (int i = k; i < n; ++i) ans += a[i];
	cout << ans;
    return 0;
}


Measured memory_bytes: 1792
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define FOR(i,start,end) for(int i=start;i<=end;i++)
const int INF = 1001001001;
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define Sort(a) sort(a.begin(), a.end())
#define Rort(a) sort(a.rbegin(), a.rend())
typedef long long ll;
const ll MOD=998244353;
using namespace std;
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<class T>auto MAX(const T& a) { return *max_element(a.begin(),a.end()); }
template<class T>auto MIN(const T& a) { return *min_element(a.begin(),a.end()); }
template<class T, class U>U SUM(const T& a, const U& v) { return accumulate(a.begin(),a.end(), v); }
template<class T, class U>U COUNT(const T& a, const U& v) { return count(a.begin(),a.end(), v); }
template<class T, class U>int LOWER(const T& a, const U& v) { return lower_bound(a.begin(),a.end(), v) - a.begin(); }
template<class T, class U>int UPPER(const T& a, const U& v) { return upper_bound(a.begin(),a.end(), v) - a.begin(); }
int GCD(int a, int b) { return b ? GCD(b, a%b) : a; }
int LCM(int a, int b) { int g = GCD(a, b); return a / g * b; }
//---------------------------------------------------------------------------------------------------

int main(void){
    // Your code here!
    vector<int> d;
    int n;cin >> n;
    d.resize(n);
    vector<int> v(n,0);
    rep(i,n) {
        cin >> d[i];
        v[d[i]]++;
    }
    if (d[0] != 0) {
        cout << 0 << endl;
        return 0;
    }
    rep(i,n) {
        if(i != 0 && d[i] ==0) {
            cout << 0 << endl;
            return 0;
        }
    }

    ll ans = 1;
    int ma = 0;
    rep(i,n) chmax(ma,d[i]);

    FOR(i,2,ma) {
        ll ex = v[i-1];
        rep(j,v[i]) {
            ans *= ex;
            ans %= MOD;
        }
    }
    cout << ans << endl;
}



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

int main(){
    int x,y;
    while(1){
        cin >> x >> y;
        if (x == 0 && y == 0) break;
        
        if  (x <= y) {
            cout << x << " " << y << endl;
        } else {
            cout << y << " " << x << endl;
        }
    }
    return 0;
}


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


int main(){
 char c;
  cin >> c;
  
  if(c>='a' && c<='z')
    cout << 'a' << endl;
  else
    cout << 'A' << endl;
  
}

Measured memory_bytes: 3572
#include<bits/stdc++.h>
#define mod 1000000007
#define ll long long int
#define ar array
#define pb push_back
using namespace std;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	string s;
	cin>>s;
	for(int i = 0; i<s.length(); i+=2)
		cout<<s[i];
	return 0;
}

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

using namespace std;

typedef long long ll;
typedef long double ld;
typedef tuple<int, int> duo;

#define TT template<typename T>
#define TTF template<typename T, typename F>
#define ET(T) typename T::value_type
TT inline T sq(T x){return x*x;}
TT inline T In(){T x;cin>>x;return x;}
TT inline void Out(T&x){cout<<x;}
TT inline void sort(T&v){sort(begin(v),end(v));}
TT inline void revs(T&v){reverse(begin(v),end(v));}
TT inline void uniq(T&v){sort(v);v.erase(unique(begin(v),end(v)),end(v));}
TT inline int ubnd(T&v,ET(T)&x){return upper_bound(begin(v),end(v),x)-begin(v);}
TT inline int lbnd(T&v,ET(T)&x){return lower_bound(begin(v),end(v),x)-begin(v);}
TTF inline void inpt(T&v,int n,F f){for(v.reserve(n);n--;v.emplace_back(f()));}
TTF inline void show(T&v,F f,string d=" ",string e="\n"){int i=0;for(auto&x:v)i++&&(cout<<d),f(x);cout<<e;}
#undef TT
#undef TTF
#undef ET

inline void fast_io(){ios::sync_with_stdio(0);cin.tie(0);}
inline int in(){int x;scanf("%d",&x);return x;}
inline ll pow_mod(ll a,ll k,ll m){ll r=1;for(;k>0;a=a*a%m,k>>=1)if(k&1)r=r*a%m;return r;}
inline ll mod_inv(ll a,ll p){return pow_mod(a,p-2,p);}

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

int main()
{
  int n = in();
  int cnt = 0;
  while (n != 1){
    n = (n + 2) / 3;
    cnt++;
  }
  cout << cnt << endl;
  return (0);
}

// priority_queue queue deque front stringstream max_element min_element insert count make_tuple

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

using namespace std;

int main(void){
	int a, b, c;
	scanf("%d %d %d", &a, &b, &c);

	if(a + b >= c){
		printf("Yes\n");
	}else{
		printf("No\n");
	}

	return 0;
}

Measured memory_bytes: 256
n,c=map(int,input().split())
l=[list(map(int,input().split())) for _ in [0]*n]
if n==1:print(max(0,l[0][1]-l[0][0]));exit()
r=[[c-x[0],x[1]] for x in l[::-1]]

L=[[0]*2 for _ in range(n)]
L[0]=[l[0][1]-l[0][0],l[0][1]-l[0][0]*2]
for i in range(n-1):
    L[i+1][0]=L[i][0]+l[i+1][1]-(l[i+1][0]-l[i][0])
    L[i+1][1]=L[i][1]+l[i+1][1]-(l[i+1][0]-l[i][0])*2
for i in range(n-1):
    L[i+1][0]=max(L[i+1][0],L[i][0])

R=[[0]*2 for _ in range(n)]
R[0]=[r[0][1]-r[0][0],r[0][1]-r[0][0]*2]
for i in range(n-1):
    R[i+1][0]=R[i][0]+r[i+1][1]-(r[i+1][0]-r[i][0])
    R[i+1][1]=R[i][1]+r[i+1][1]-(r[i+1][0]-r[i][0])*2
for i in range(n-1):
    R[i+1][0]=max(R[i+1][0],R[i][0])

max1=max(L[n-1][0],max(R[i][1]+L[n-i-2][0] for i in range(n-1)))
max2=max(R[n-1][0],max(L[i][1]+R[n-i-2][0] for i in range(n-1)))
print(max(0,max1,max2))

Measured memory_bytes: 69888
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int h = sc.nextInt();
        int w = sc.nextInt();
        char[][] field = new char[h][];
        ArrayDeque<Point> queue = new ArrayDeque<Point>();
        
        for (int i = 0; i < h; i++) {
            field[i] = sc.next().toCharArray();
            for (int j = 0; j < w; j++) {
                if (field[i][j] == '#') {
                    queue.add(new Point(i, j));
                }
            }
        }
        int count = 0;
        ArrayDeque<Point> next = new ArrayDeque<Point>();
        while (queue.size() > 0) {
            while (queue.size() > 0) {
               Point p = queue.poll();
                if (p.hh != 0 && field[p.hh - 1][p.ww] == '.') {
                    field[p.hh - 1][p.ww] = '#';
                    next.add(new Point(p.hh - 1, p.ww));
                }
                if (p.hh != h - 1 && field[p.hh + 1][p.ww] == '.') {
                    field[p.hh + 1][p.ww] = '#';
                    next.add(new Point(p.hh + 1, p.ww));
                }
                if (p.ww != 0 && field[p.hh][p.ww - 1] == '.') {
                    field[p.hh][p.ww - 1] = '#';
                    next.add(new Point(p.hh, p.ww - 1));
                }
                if (p.ww != w - 1 && field[p.hh][p.ww + 1] == '.') {
                    field[p.hh][p.ww + 1] = '#';
                    next.add(new Point(p.hh, p.ww + 1));
                }
            }
            if (next.size() == 0) {
                break;
            }
            ArrayDeque<Point> tmp = next;
            next = queue;
            queue = tmp;
            count++;
       }
       System.out.println(count);
    }
    
    static class Point {
        int hh;
        int ww;
        public Point (int hh, int ww) {
            this.hh = hh;
            this.ww = ww;
        }
        
        public String toString() {
            return hh + ":" + ww;
        }
    }
}


Measured memory_bytes: 70408
#include <bits/stdc++.h>
#define rep2(i,x,y) for (int i = x; i < (y); ++i)
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long int ll;
int INF = 100100101;
int main()
{
  ios::sync_with_stdio(false);  cin.tie(0); cout.tie(0);
  string s,t;
  cin >> s >> t;
  int ans=0;
  rep(i, s.length()){
   	if(s[i] != t[i]) ans++;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 3796
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#define rep(i,a,n) for(ll i =(a);i<(n);i++)
#define urep(i,a,n) for(ll i = (a);i>=(n);i--)
#define all(x) (x).begin(),(x).end()
#define INF 1e18
const int mod = 1e9 + 7;
typedef long long ll;
using namespace std;
ll dx[4] = { 1,-1,0,0 };
ll dy[4] = { 0,0,1,-1 };
ll N,X,Y,A,B,C;
ll ans;
ll gcd(ll a, ll b) {
	if (b == 0)return a;
	else return gcd(b, a%b);
}
int main() {
	cin>>A>>B>>C;
	cout<<max(A,max(B,C))*9+A+B+C<<endl;
	return 0;
}

Measured memory_bytes: 256
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
a=sorted(a)
b=sorted(b)
c=sorted(c)
c.insert(0,-1)
c.append(10**10)
B=[0]*n
ans=0
for i in range(n):
    x=b[i]
    l=0
    r=n+1
    while r-l>1:
        m=(l+r)//2
        if c[m]>x:
            r=m
        elif c[m]<=x:
            l=m
    B[i]=n-l
g=[0]*n


g[n-1]=B[n-1]
for i in range(n-1):
    g[-2-i]=g[-1-i]+B[-2-i]
g.append(0)

b.insert(0,-1)
b.append(10**10)
for i in range(n):
    x=a[i]
    l=0
    r=n+1
    while r-l>1:
        m=(l+r)//2
        if b[m]>x:
            r=m
        elif b[m]<=x:
            l=m
    ans+=g[l]
print(ans)


Measured memory_bytes: 105628
#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>;
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define all(x) x.begin(),x.end()
template<typename T> using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
template<typename T> T ceil(T a, T b) { return a/b + !!(a%b); }

int n;
vector<ll>a;
ll solve(){
   ll ans=0;
   

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

    cin>>n;
    a.resize(n);
    ll ans=1;
    rep(i,n){
        cin>>a[i];
    }
    sort(all(a));
    rep(i,n){
        if(a[i]==0){
        cout<<0<<endl;
        return 0;
        }
        if(ans>(ll)1e18/a[i]){
            cout<<-1<<endl;
            return 0;
        }
        ans*=a[i];
    }
    cout<<ans<<endl;
    //cout<<solve()<<endl;
    return 0;
}

Measured memory_bytes: 3988
s=input()

n=len(s)
flag=0
kaibun=0
l=[]

for i in range(int((n-1)/2)):
    if s[i] != s[n-1-i]:
        flag=1
    l.append(s[i])
    if flag ==1:
        break

if len(l)%2==0:
    for i in range(int(len(l)/2)):
        if l[i]!=l[len(l)-1-i]:
            kaibun=1
        if kaibun ==1:
            break
else:
    for i in range(int((len(l)-1)/2)):
        if l[i]!=l[len(l)-1-i]:
            kaibun=1
        if kaibun ==1:
            break  
if kaibun ==1 or flag==1:
    print('No')
else:
    print('Yes')

Measured memory_bytes: 3192
N = int(input())
A = [int(input()) for i in range(N)]

Asort = sorted(A,reverse=True)
first = max(Asort)
second = max(Asort[1:N])

for i in range(N):
    if A[i] != first:
        print(max(first,A[i]))
    else:
        print(second)

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

typedef long long ll;
 
using tpl = tuple<int, int, int>;
typedef pair<int,int> pii;

void fastStream(){cin.tie(0);std::ios_base::sync_with_stdio(0);}

class UnionFindTree{
private:
  // indexの数の親ノード(ある集合の親を見つけたいときはここを直接参照せず、findを使う)
  vector<int> par;
  // indexを根とする木のランク
  vector<int> rank;
  // 集合のサイズ
  vector<int> cnts;
  // 木の最大値
  int treeSize;
public:
  UnionFindTree(int initTreeSize = 1000){
    // 引数で与えられた値を最大格納数とするUnionFindTreeの作成
    treeSize = initTreeSize;
    init(initTreeSize);
  }
  void init(int sz){
    par.clear(),rank.clear(),cnts.clear();
    treeSize=sz;
    for(int i = 0; i < sz; i++){
      par.push_back(i);
      rank.push_back(0);
      cnts.push_back(1);
    }
  }
  // 与えられた数が格納されている木のルートを探索
  int find(int x){  
    if(par[x] == x)return x;
    else return par[x] = find(par[x]);
  }
  // 和集合をとる。ただしここでは各集合の親の付け替えは起こらない
  void unite(int x,int y){
    x = find(x);
    y = find(y);
    if(x == y)return;
    if(rank[x] < rank[y]){
      par[x] = y;
      cnts[y]+=cnts[x];
    }
    else{
      par[y] = x;
      cnts[x]+=cnts[y];
      if(rank[y] == rank[x])rank[x]++;
    }
  }
  // xの属する集合のサイズ
  int getCnt(int x){
    return cnts[find(x)];
  }
  bool same(int x,int y){
    return find(x) == find(y);
  }
    
};


int N;
int X[100010];
int Y[100010];
vector<pair<int,pii> > events;
pair<int,pii> ydist[100010];
pii xsorted[100010];
pii ysorted[100010];
UnionFindTree uft(100010);

int main(){

    fastStream();
    cin >> N;
    for(int i = 0; i < N; i++){
        cin >> X[i] >> Y[i];
        xsorted[i] = pii(X[i], i);
        ysorted[i] = pii(Y[i], i);
    }
    sort(xsorted, xsorted + N);
    sort(ysorted, ysorted + N);
    for(int i = 1; i < N; i++){
        int dist = xsorted[i].first - xsorted[i - 1].first;
        events.emplace_back(make_pair(dist, make_pair(xsorted[i].second, xsorted[i - 1].second)));
    }
    for(int i = 1; i < N; i++){
        int dist = ysorted[i].first - ysorted[i - 1].first;
        events.emplace_back(make_pair(dist, make_pair(ysorted[i].second, ysorted[i - 1].second)));
    }
    sort(events.begin(), events.end());
    ll cost = 0;
    for(auto e : events){
        pii p = e.second;
        if(uft.same(p.first, p.second)){
            continue;
        }
        else{
            uft.unite(p.first, p.second);
            cost += e.first;
            if(uft.getCnt(p.first) == N){
                break;
            }
        }
    }
    cout << cost << endl;

    return 0;
}


Measured memory_bytes: 8804
#include <iostream>
#include <string>

std::string GetSub(const std::string& P)
{
    for(std::size_t i = 1; i < P.size(); ++i){
        int n = P.size() - i;
        if(P.substr(i) == P.substr(0, n)){
            return P.substr(n);
        }
    }
    return P;
}
int main()
{
    std::string T, P;

    std::cin >> T >> P;
    const int Skip = P.size();
    const std::string Sub = GetSub(P);
    // std::cerr << "Skip:" << Skip << ", Sub:" << Sub << std::endl;
    int Pos = T.find(P, 0);
    while(Pos != std::string::npos){
        std::cout << Pos << std::endl;
        if(T.substr(Pos + Skip, Sub.size()) == Sub){
            Pos += Sub.size();
        }else{
            Pos = T.find(P, Pos + Skip);
        }
    }
    return 0;
}

Measured memory_bytes: 3964
until (n = gets.to_i) == 0
  a = gets.split.map {|s| s.to_f}
  sum = 0.0
  for i in 1..n
    sum += a[i-1]
  end
  ave = sum / n.to_f
  sum = 0.0
  for i in 1..n
    sum += (a[i-1]-ave)**2
  end
  dev = (sum / n.to_f)**0.5
  printf("%.8f\n",dev)
end

Measured memory_bytes: 6204
#include <algorithm>
#include <fstream>
#include <iostream>
#include <list>
#include <math.h>
#include <memory>
#include <regex>
#include <string>
#include <unordered_map>
#include <vector>
#include <iomanip>

#define MAX_LEN 256

using namespace std;

using ddpair = pair<double, double>;

int main(int argc, char const *argv[]) {
  string n_str;
  getline(cin, n_str);
  int n = atoi(n_str.c_str());

  int k = 1;
  for (int i = n; 0 < i; i--) {
    k *= i;
  }

  vector<ddpair> vec;
  for (int i = 0; i < n; i++) {
    string line;
    getline(cin, line);
    double x = stod(line.substr(0, line.find(" ")));
    double y = stod(line.substr(line.find(" ") + 1));
    vec.push_back({x, y});
  }

  int colors = n * (n - 1);
  double distanceSum = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      double distance = sqrt(pow(vec[i].first - vec[j].first, 2) +
                         pow(vec[i].second - vec[j].second, 2));
      distanceSum = distanceSum + distance;
    }
  }
  double avgLen = distanceSum / colors;
  cout << fixed;
  cout << setprecision(6) <<avgLen * (n-1) * 2 << endl;

  /* code */
  return 0;
}


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

using namespace std;
int n, q, a, b, c;
unsigned long long s = 0, sum = 0;

int main()
{
	vector<unsigned long long> v(100005);
	cin >> n;
	for (int i = 0; i < n; ++i)
	{
		cin >> a;
		v[a]++;
	}
	for (int i = 0; i <= 100004; ++i)
		sum += i * v[i];
	s = sum;
	cin >> q;
	for (int i = 0; i < q; ++i)
	{
		cin >> b >> c;
		v[c] += v[b];
		s += v[b] * c;
		s -= v[b] * b;
		v[b] = 0;
		cout << s << "\n";
	}
	
	
}


Measured memory_bytes: 3816
#include<stdio.h>
int main()
{
    int n, m, x, a, i, j;
    i=j=0;
    scanf("%d %d %d",&n,&m, &x);
    for(int q=0;q<m;q++)
    {
        scanf("%d", &a);
        if(a<x) i++;
        else j++;
    }
    printf("%d\n", i<j?i:j);
}


Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int (i)=0; (i)<(n); (i)++)
#define ll long long
#define pp pair<int, int> 
//int 2×10の9乗
 
int main() {
    int n;
    cin >> n;
    vector<pp> p(n);
    rep(i,n) cin >> p[i].second >> p[i].first;
    sort(p.begin(), p.end());
    ll t=0;
    rep(i, n){
        t += p[i].second;
        if(t > p[i].first){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
}

Measured memory_bytes: 1792
//   ▄▄▄▄▄▄▄▄▄▄▄  ▄         ▄  ▄▄        ▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄         ▄  ▄▄▄▄▄▄▄▄▄▄▄  ▄▄▄▄▄▄▄▄▄▄▄ 
//  ▐░░░░░░░░░░░▌▐░▌       ▐░▌▐░░▌      ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌       ▐░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
//  ▐░█▀▀▀▀▀▀▀█░▌▐░▌       ▐░▌▐░▌░▌     ▐░▌ ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌       ▐░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌
//  ▐░▌       ▐░▌▐░▌       ▐░▌▐░▌▐░▌    ▐░▌     ▐░▌     ▐░▌          ▐░▌       ▐░▌▐░▌          ▐░▌       ▐░▌
//  ▐░█▄▄▄▄▄▄▄█░▌▐░▌       ▐░▌▐░▌ ▐░▌   ▐░▌     ▐░▌     ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌
//  ▐░░░░░░░░░░░▌▐░▌       ▐░▌▐░▌  ▐░▌  ▐░▌     ▐░▌     ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌
//  ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌       ▐░▌▐░▌   ▐░▌ ▐░▌     ▐░▌      ▀▀▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀█░█▀▀ 
//  ▐░▌          ▐░▌       ▐░▌▐░▌    ▐░▌▐░▌     ▐░▌               ▐░▌▐░▌       ▐░▌▐░▌          ▐░▌     ▐░▌  
//  ▐░▌          ▐░█▄▄▄▄▄▄▄█░▌▐░▌     ▐░▐░▌ ▄▄▄▄█░█▄▄▄▄  ▄▄▄▄▄▄▄▄▄█░▌▐░▌       ▐░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░▌      ▐░▌ 
//  ▐░▌          ▐░░░░░░░░░░░▌▐░▌      ▐░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌       ▐░▌▐░░░░░░░░░░░▌▐░▌       ▐░▌
//   ▀            ▀▀▀▀▀▀▀▀▀▀▀  ▀        ▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀         ▀  ▀▀▀▀▀▀▀▀▀▀▀  ▀         ▀ 
//                                                                                                          
                                                                    
#include<bits/stdc++.h>
#define int long long
#define fi first
#define sc second
#define pii pair<int,int>
#define vi vector<int>
#define mii map<int,int>
#define msi map<string,int>
#define si set<int>
#define all(v) v.begin(),v.end()
#define sz(v)  int((v).size())
#define rep(i,a,b)    for(int i=a;i<b;i++)
#define dep(i,a,b)    for(int i=a;i>=b;i--)
#define isinarr(i,n) ((i>=0)?((i<n)?1:0):0)
#define fastio  ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define ppb pop_back
#define present(container, element) (container.find(element) != container.end())      //set,map etc.
#define cpresent(container, element) (find(all(container),element) != container.end())    //vector
#define hell 1000000007
#define PI 3.14159265
#define mp make_pair
#define inparr(a,n) rep(i,0,n)cin>>a[i];
#define strwspaces(s) getline(cin,s)
#define give(x,y) cout<<x<<" "<<y<<endl;
#define setp(n) cout<<fixed<<setprecision(n);
#define    endl '\n'
#define inp(n) int n;cin>>n;

using namespace std;

int i,j,k,l;

void solve()
{
    inp(n);
    msi m;
    string s;
    rep(i,0,n)
    {
        cin>>s;
        m[s]++;
    }
    give("AC x ",m["AC"]);
    give("WA x ",m["WA"]);
    give("TLE x ",m["TLE"]);
    give("RE x ",m["RE"]);

} 



signed main()
{
    fastio
    int t=1;
    //cin>>t;
    while(t--)
        solve();
    return 0;
}

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

const int INF = 202020;


int main()
{
    int N;
    cin >> N;
    vector<int> P(N+1);
    int minp = INF;

    int ans = 0;
    for(int i = 1; i < N + 1; i++) {
        cin >> P[i];
        minp = min(minp, P[i]);
        if (P[i] <= minp) {
            ans++;
        }
    }

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 1024
#include<bits/stdc++.h>
// Begin Header {{{
#define all(x) (x).begin(), (x).end()
#define lli long long int
#define rep(i,n) for(lli i=0; i<n; i++)
#define loop(i, j, n) for(lli i=j; i<n; i++)
#define Max(a, b) ((a) > (b) ? (a) : (b))
#define Min(a, b) ((a) < (b) ? (a) : (b))
constexpr int INF  = 0x3f3f3f3f;
const long long mod=1e9+7;
//Function
lli combi(lli n, lli r)
{
	if(r==0 || r==n) return 1;
	else return combi(n-1,r) + combi(n-1,r-1);
}
lli sigma1(lli n){return n*(n+1)/2;}
lli sigma2(lli s, lli n){return sigma1(n) - sigma1(s -1);}
using namespace std;
// }}} End Header

int main()
{
	ios::sync_with_stdio(false); cin.tie(nullptr);
	int r, d, x;
	cin >> r >> d >> x;
	rep(i,10){
		x = r*x-d;
		cout << x << endl;
	}
	return 0;
}

Measured memory_bytes: 380
#include <stdio.h>
#include <vector>

using namespace std;

typedef struct {
        int a;
        int b;
} data;

int calc_digit_number(int num) {
        int digit_number = 1;
        while((num = num / 10) != 0) {
                digit_number++;
        }
        return digit_number;
}

int main(void) {
        vector<data> v;

        data input;
        while(scanf("%d %d", &input.a, &input.b) != EOF) {
                v.push_back(input);
        }

        for(data d : v) {
                printf("%d\n", calc_digit_number(d.a + d.b));
        }

        return 0;
}

Measured memory_bytes: 2624
#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma comment(linker, "/stack:200000000")
 
#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
typedef double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pdd;
 
#define X first
#define Y second
 
//#include <boost/unordered_map.hpp>
//using namespace boost;
 
/*
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> rbtree;
rbtree T;
*/
 
using i32 = int;
using i64 = long long;
using u8 = unsigned char;
using u32 = unsigned;
using u64 = unsigned long long;
using f64 = double;
using f80 = long double;
//using i128 = __int128_t;
//using u128 = __uint128_t;
//using i128 = i64;
//using u128 = u64;
 
ll power(ll a, ll b, ll p)
{
	if (!b) return 1;
	ll t = power(a, b/2, p);
	t = t*t%p;
	if (b&1) t = t*a%p;
	return t;
}
 
ll exgcd(ll a, ll b, ll &x, ll &y)
{
	if (b == 0)
	{
		x = 1;
		y = 0;
		return a;
	}
	ll px, py;
	ll d = exgcd(b, a%b, px, py);
	x = py;
	y = px-a/b*py;
	return d;
}

ll gcd(ll a, ll b)
{
	return b ? gcd(b, a%b) : a;
}
 
template<class T>
inline void freshmin(T &a, const T &b)
{
	if (a > b) a = b;
}
 
template<class T>
inline void freshmax(T &a, const T &b)
{
	if (a < b) a = b;
}

template<class T>
void print(const T &a)
{
	for (auto x : a) printf("%d ", x); puts("");
}

const int MAXN = 400010;
const int MAXM = 30*30*16*16+10;
const int MAXK = 19;
//const i64 INF = 1000000000000000000LL;
const int INF = 1000000000;
//const int MOD = 998244353;
//const int MOD = 1000000007;
//const int INV2 = (MOD+1)/2;
const ld pi = 3.1415926535897932384626433;

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


#define rep(i,a,b) for (int i = (a), I = (b); i <= I; ++ i)

void solve()
{
	int n;
	cin >> n;
	int ans = 0;
	for (int i = 1; i <= n; ++ i) ans += i%2;
	printf("%.8f\n", (ld)ans/n);
}

int main()
{
	
	int T;
	T = 1;
	//scanf("%d", &T);
	while (T --)
	solve();
	
	return 0;
}


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

int MOD=1000000007;
int modpow(int a,int x){
  if(a<0)a+=MOD;
  int ans=1;
  while(x>0){
    if(x&1) ans=ans*a%MOD;
      a=a*a%MOD;
      x>>=1;
  }
  return ans;
}

int gyaku(int n){
    return modpow(n,MOD-2);
}
signed main() {
  int n;
  string s;
  cin>>s;
  n=s.size();
  vector<int>ans(n);
  int r=1,l=0,kyoukai=0;
  rep(i,n-1){
    if(s[i]=='R'&&s[i+1]=='R'){
      r++;
    }
    if(s[i]=='R'&&s[i+1]=='L'){
      l=1;
      kyoukai=i;
    }
    if(s[i]=='L'&&s[i+1]=='L'){
      l++;
    }
    if((s[i]=='L'&&s[i+1]=='R')||i==n-2){
      ans[kyoukai]=r-r/2+l/2;
      ans[kyoukai+1]=r+l-ans[kyoukai];
      r=1;
    }
  }
  rep(i,n){
    cout<<ans[i]<<' ';
  }
}


Measured memory_bytes: 4296
#include <bits/stdc++.h>
using namespace std;
 
#define ll long long
 
int main() {

	int t;
	int i,j,n;

	cin>>n;
	i=0;
	while (i<n) {
		i+=1000;
	}
	cout<<i-n<<"\n";

	return 0;
}

Measured memory_bytes: 3616
//author: zekigurbuz (Zeki Gurbuz) 2019

#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<pii> vpii;
typedef queue<int> qi;
typedef map<string, int> msi;
typedef map<int, int> mii;
typedef map<int, vi> mvi;
typedef map<int, vpii> mvpii;
typedef priority_queue<int> pqi;
typedef set<int> si;

#define int ll
#define double ld
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define lb lower_bound
#define ub upper_bound
#define rsz resize
#define forn(a,b) for(int a=0;a<b;++a)
#define rep(a,b,c) for(int a=b;a<c;++a)
#define all(x) begin(x), end(x)

const ld PI = 4*atan((ld)1);
const int MOD = 1000000007; //998244353
const ll INF = 1e18;
const int N = 200005;

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

template<class T> void ckmin(T &a, T b) { a = min(a, b); }
template<class T> void ckmax(T &a, T b) { a = max(a, b); }
void eval(bool b){cout<<(b?"Yes":"No");}


signed main() {ios_base::sync_with_stdio(0);cin.tie(0);
	
	int n, k, q;
	cin >> n >> k >> q;
	vi b(n);
	int s = 0;
	forn(i, q) {
		int x; cin >> x;
		x--;
		b[x]++;
	}
	forn(i, n) {
		bool bb = 1;
		if (k - (q - b[i]) <= 0) bb = 0;
		eval(bb);
		cout << endl;
	}
return 0;}


Measured memory_bytes: 1024
a, b, m = map(int, input().split())
A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]
ans = min(A) + min(B)
for _ in range(m):
    x, y, c = map(int, input().split())
    ans = min(ans, A[x - 1] + B[y - 1] - c)
print(ans)


Measured memory_bytes: 18148
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <functional>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <bitset>
#include <cassert>
#include <exception>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> P;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<P> vp;
#define rep(i,a,n) for(ll i = (a);i < (n);i++)
#define per(i,a,n) for(ll i = (a);i > (n);i--)
#define lep(i,a,n) for(ll i = (a);i <= (n);i++)
#define pel(i,a,n) for(ll i = (a);i >= (n);i--)
#define clr(a,b) memset((a),(b),sizeof(a))
#define pb push_back
#define mp make_pair
#define all(c) (c).begin(),(c).end()
#define sz size()
#define print(X) cout << (X) << endl
const ll INF = 1e+9+7;
ll n,m,l;
string s,t;
ll d[200010],dp[550][550];

int main(){
  ll a[3];
  s = "Yes";
  rep(i,0,3){
    rep(j,0,3){
      cin >> dp[i][j];
    }
  }
  rep(i,0,3){
    rep(j,1,3){
      dp[i][j] -= dp[i][0];
    }
  }
  rep(j,1,3){
    rep(i,1,3){
      if(dp[i][j] != dp[i-1][j])s = "No";
    }
  }
  // rep(i,0,3){
  //   rep(j,0,3){
  //     cout << dp[i][j] << " ";
  //   }
  //   puts("");
  // }
  print(s);
  return 0;
}

Measured memory_bytes: 256
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define mfill(x,y) memset(x,y,sizeof(x))
#define all(v) v.begin(), v.end()
#define y0 y12345
#define y1 y54321

#ifdef LOCAL
#define debug(...) fprintf(stderr,__VA_ARGS__)
#else
#define debug(...) 42
#endif

using ul = unsigned long;
using ll = long long;
using P = pair<int, int>;
using vint = vector<int>;
template<class T>bool chmax(T &a, const T &b){if(a<b){a=b;return 1;}return 0;}
template<class T>bool chmin(T &a, const T &b){if(a>b){a=b;return 1;}return 0;}

vint dx = {-1, 0, 1, 0}, dy = {0, -1, 0, 1};
vint dx8 = {-1, -1, -1, 0, 1, 1, 1, 0}, dy8 = {-1, 0, 1, 1, 1, 0, -1, -1};

int main() {
	cin.tie(0);
   	ios::sync_with_stdio(false);
	debug("debug test\n");
   	int n,m;
	string s;cin>>s;
	if((s[0] == s[1] && s[2] == s[1])||s[3] == s[1] && s[2] == s[3]){
		cout << "Yes" << endl;
	}else{
		cout << "No" << endl;

	}
	return 0;
}


Measured memory_bytes: 256
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

#define N_MAX 100

int main(void) {
  int N; // 人口
  int X[N_MAX]; // 座標リスト
  int P;

  int i;
  int sum;
  int n_max = 0;
  int sum_min = -1;

  scanf("%d", &N);
  for (i = 0; i < N; i++) {
    scanf("%d", &X[i]);
    if (n_max < X[i]) {
      n_max = X[i];
    }
  }

  for (P = 1; P <= n_max; P++) {
    sum = 0;
    for (i = 0; i < N; i++) {
      sum += pow((X[i] - P), 2);
    }
    if ((sum_min == -1) || (sum_min > sum)) {
      sum_min = sum;
    }
    /* printf("座標 %d, 総体力 %d\n", P, sum); */
  }
  /* printf("min 体力 %d\n", sum_min); */
  printf("%d\n", sum_min);

  return (0);
}


Measured memory_bytes: 128
s = gets.chomp
q = gets.chomp.to_i
sa = ""
sb = ""
f = false

q.times do 
	n = gets.chomp.split(" ")
	if n[0].to_i == 1 then
		f = !f
	else
		if n[1].to_i == 1 then
			if f then
				sa = sa << n[2]
			else
				sb = sb << n[2]
			end
		else
			if f then
				sb = sb << n[2]
			else
				sa = sa << n[2]
			end
		end
	end
end

if f then
	s = s.reverse
	sa = sa.reverse
	s = sa << s << sb
else
	sb = sb.reverse
	s = sb << s << sa
end

print(s)

Measured memory_bytes: 3836
#include<stdio.h>

static const int N = 100;

int min(int a,int b){
  if(a <= b){
    return a;
  }
  else{
    return b;
  }
}

int main(){
  int i,j,k,l,n,p[N + 1],m[N + 1][N + 1];

  scanf("%d",&n);

  for(i = 1;i <= n;i++){
    scanf("%d%d",&p[i - 1],&p[i]);
  }

  for(i = 1;i <= n;i++){
    m[i][i] = 0;
  }
  
  for(i = 2;i <= n;i++){
    for(j = 0;j <= n - i + 1;j++){
      k = j + i - 1;
      m[j][k] = (1<<21);

      for(l = j;l <= k - 1;l++){
	m[j][k] = min(m[j][k],m[j][l] + m[l + 1][k] + p[j - 1]*p[l]*p[k]);
      }
    }
  }

  printf("%d\n",m[1][n]);

  return 0;
}



Measured memory_bytes: 2088
#include <bits/stdc++.h>
#define ll long long
#define MOD 1000000007

using namespace std;

int main() {
  int n;
  ll t, o = 0;
  cin >> n;
  vector<ll> a(n), bt(60), db(60);
  vector<vector<int>> ba(n, vector<int>(60)), bn(n - 1, vector<int>(60));
  for(int i = 0; i < n; i++) {
    cin >> t;
    a.at(i) = t;
    for(int j = 0; j < 60; j++) {
      ba.at(i).at(j) += t % 2;
      if(i == n - 1)
        bn.at(i - 1).at(j) = ba.at(i).at(j);
      t /= 2;
    }
  }
  for(int i = 1; i < n - 1; i++) {
    for(int j = 0; j < 60; j++) {
      bn.at(n - 2 - i).at(j) = bn.at(n - 1 - i).at(j);
      bn.at(n - 2 - i).at(j) += ba.at(n - 1 - i).at(j);
    }
  }
  db.at(0) = 1;
  for(int i = 1; i < 60; i++)
    db.at(i) = db.at(i - 1) * 2 % MOD;
  for(int i = 0; i < n - 1; i++) {
    for(int j = 0; j < 60; j++) {
      if(ba.at(i).at(j))
        o = (o + (n - 1 - i - bn.at(i).at(j)) * db.at(j) % MOD) % MOD;
      else
        o = (o + bn.at(i).at(j) * db.at(j) % MOD) % MOD;
    }
  }
  cout << o << endl;
}

Measured memory_bytes: 166656