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


#define li          long long int
#define rep(i,to)   for(li i=0;i<((li)(to));i++)
#define repp(i,start,to)    for(li i=(li)(start);i<((li)(to));i++)
#define pb          push_back
#define sz(v)       ((li)(v).size())
#define bgn(v)      ((v).begin())
#define eend(v)     ((v).end())
#define allof(v)    (v).begin(), (v).end()
#define dodp(v,n)       memset(v,(li)n,sizeof(v))
#define bit(n)      (1ll<<(li)(n))
#define mp(a,b)     make_pair(a,b)
#define rin rep(i,n)
#define EPS 1e-12
#define ETOL 1e-8
#define MOD 1000000007
typedef pair<li, li> PI;

#define INF bit(60)

#define DBGP 1


#define idp if(DBGP)
#define F first
#define S second
#define p2(a,b)     idp cout<<a<<"\t"<<b<<endl
#define p3(a,b,c)       idp cout<<a<<"\t"<<b<<"\t"<<c<<endl
#define p4(a,b,c,d)     idp cout<<a<<"\t"<<b<<"\t"<<c<<"\t"<<d<<endl
#define p5(a,b,c,d,e)       idp cout<<a<<"\t"<<b<<"\t"<<c<<"\t"<<d<<"\t"<<e<<endl
#define p6(a,b,c,d,e,f)     idp cout<<a<<"\t"<<b<<"\t"<<c<<"\t"<<d<<"\t"<<e<<"\t"<<f<<endl
#define p7(a,b,c,d,e,f,g)       idp cout<<a<<"\t"<<b<<"\t"<<c<<"\t"<<d<<"\t"<<e<<"\t"<<f<<"\t"<<g<<endl
#define p8(a,b,c,d,e,f,g,h)     idp cout<<a<<"\t"<<b<<"\t"<<c<<"\t"<<d<<"\t"<<e<<"\t"<<f<<"\t"<<g<<"\t"<<h<<endl
#define p9(a,b,c,d,e,f,g,h,i)       idp cout<<a<<"\t"<<b<<"\t"<<c<<"\t"<<d<<"\t"<<e<<"\t"<<f<<"\t"<<g<<"\t"<<h<<"\t"<<i<<endl
#define p10(a,b,c,d,e,f,g,h,i,j)        idp cout<<a<<"\t"<<b<<"\t"<<c<<"\t"<<d<<"\t"<<e<<"\t"<<f<<"\t"<<g<<"\t"<<h<<"\t"<<i<<"\t"<<j<<endl
#define foreach(it,v)   for(__typeof((v).begin()) it=(v).begin(); it!=(v).end(); ++it)
#define p2p(x)      idp p2((x).F, (x).S)
#define dump(x,n)   idp{rep(i,n){cout<<x[i]<<" ";}puts("");}
#define dump2(x,n)  idp{rep(i,n){cout<<"["<<x[i].F<<" , "<<x[i].S<<"] ";}puts("");}
#define dumpi(x)    idp{foreach(it, x){cout<<(*it)<<" ";}puts("");}
#define dumpi2(x)   idp{foreach(it, x){cout<<"["<<(it)->F<<" , "<<(it)->S<<"] ";}puts("");}

#define read2d(a,w,h)   rep(i,h)rep(j,w)cin>>a[i][j]
#define dump2d(a,w,h)   rep(i,h){rep(j,w)cout<<a[i][j]<<" ";puts("");}

typedef pair<li, li> PI;

li n;
li a[200200];

// 0 : 行って戻ってこない
// 1 : 行って戻ってくる
// 2 : そもそも行かない
li dp[200200][3];
li dp2[200200][3];

inline li solve() {

    for (li i = n - 1; i >= 0; i--) {
        dp[i][0] = min(dp[i + 1][0], min(dp[i + 1][1], dp[i + 1][2])) + 1 - (a[i] % 2);
        dp[i][1] = min(dp[i + 1][1], dp[i + 1][2]) + (a[i] % 2);
        dp[i][2] = dp[i + 1][2] + a[i];
        if (a[i] == 0) {
            dp[i][1] += 2;
        }
    }

    rep(i, n) {
        dp2[i + 1][0] = min(dp2[i][0], min(dp2[i][1], dp2[i][2])) + 1 - (a[i] % 2);
        dp2[i + 1][1] = min(dp2[i][1], dp2[i][2]) + a[i] % 2;
        dp2[i + 1][2] = dp2[i][2] + a[i];
        if (a[i] == 0) {
            dp2[i + 1][1] += 2;
        }
    }

    li res = INF;
    rin{
        res = min(res, min(
            min(dp[i][1], dp[i][2]) + min(dp2[i][0], dp2[i][2]),
            min(dp[i][0], dp[i][2]) + min(dp2[i][1], dp2[i][2])));
    }
    return res;
}

int main() {
    cin >> n;
    rin{
        cin >> a[i];
    }
    li res = solve();
    cout << res << endl;
    return 0;
}

Measured memory_bytes: 11136
//              +-- -- --++-- +-In the name of ALLAH-+ --++-- -- --+              \\

#include <bits/stdc++.h>

#define F first
#define S second
#define _sz(x) (int)x.size()

using namespace std ;
using ll = long long ;
using ld = long double ;
using pii = pair <int , int> ;

const int N = 20 + 2 , MASK = (1 << 20) + 20 , mod = 1e9 + 7 ;
int n , m , k , val[N][N] , dp[N][MASK] , go[N][MASK] ;

inline void add (int &a , int b) {
	a += b ;
	if (a >= mod) a -= mod ;
}

int main(){
	ios::sync_with_stdio(false) , cin.tie(0) , cout.tie(0) ;

	memset(val , -1 , sizeof val) ;

	cin >> n >> m >> k ;

	for (int i = 0 , a , b , c ; i < k ; i ++) {
		cin >> a >> b >> c ;
		a -- , b -- ;

		val[a][b] = c ;
	}

	n -- ;

	if (!n) return cout << "1\n" , 0 ;

	for (int mask = 0 ; mask < (1 << n) ; mask ++) {
		int last = -1 ;
		for (int i = 0 ; i < n ; i ++) {
			if (mask >> i & 1) last = i ;

			go[i][mask] = mask ^ (last == -1 ? 0 : (1 << last)) ;
		}
	}

	dp[n][0] = 1 ;

	for (int t = 0 ; t < m ; t ++) {
		for (int mask = 0 ; mask < (1 << n) ; mask ++) {
			dp[0][mask] = dp[n][mask] ;
			for (int i = 1 ; i <= n ; i ++) dp[i][mask] = 0 ;
		}

		for (int i = 0 ; i < n ; i ++) {
			for (int mask = 0 ; mask < (1 << n) ; mask ++) {
				if (val[t][i] != 1 && !(mask & (1 << n - i - 1))) {
					add(dp[i + 1][mask] , dp[i][mask]) ;			
				}
				if (val[t][i] != 0) {
					if (mask & (1 << n - i - 1)) {
						add(dp[i + 1][mask] , dp[i][mask]) ;
					}
					else {
						add(dp[i + 1][go[n - i - 1][mask] ^ (1 << n - i - 1)] , dp[i][mask]) ;
					}
				}
			}
		}
	}

	int ans = 0 ;
	for (int mask = 0 ; mask < (1 << n) ; mask ++) add(ans , dp[n][mask]) ;

	cout << ans << '\n' ;
}


Measured memory_bytes: 160000
#include "bits/stdc++.h"

#define REP(i, n, N) for(ll i=(n); i<(N); i++)
#define RREP(i, n, N) for(ll i=(N-1); i>=(n); i--)
#define LREP(lst,itr) for(auto itr = lst.begin(); itr != lst.end(); ++itr)
#define CK(n, a, b) ((a)<=(n)&&(n)<(b))
#define ALL(v) (v).begin(),(v).end()
#define MCP(a, b) memcpy(b,a,sizeof(b))
#define P(s) cout<<(s)<<endl
#define P2(a, b) cout<<(a)<<" "<<(b)<<endl
#define V2(T) vector<vector<T>>
typedef long long ll;
using namespace std;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;

bool cmp(const pair<int,int> &A, const pair<int,int> &B){
    return (A.first==B.first ? A.second>B.second : A.first<B.first);
}

int main(){
    int N,M,A,B;
    cin >> N >> M;
    vector<pair<int,int>> work;
    REP(i,0,N){
        cin >> A >> B;
        work.push_back(make_pair(A,B));
    }

    sort(work.begin(), work.end(), cmp);

    int ans=0,idx=0;
    priority_queue<int> que;
    REP(i,1,M+1){
        while(work[idx].first==i && idx!=N){
            que.push(work[idx].second);
            idx++;
        }
        //追加処理 消さずに
        if(!que.empty()){
            ans+=que.top();
            que.pop();
        }
    }

    P(ans);
}

Measured memory_bytes: 1908
#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define pii std::pair<int,int>
#define pli std::pair<ll,int>
#define pil std::pair<int,ll>
#define psi std::pair<string,int>
#define pll std::pair<ll,ll>
#define pci std::pair<char,int>
#define sll(x) scanf("%lld",&x)
#define prll(x) printf("%lld ",x)
#define pri(x) printf("%d ",x)
#define si(x) scanf("%d",&x)
#define pb push_back
#define vll std::vector<ll>
#define vpi std::vector<std::pair<int,int>>
#define vi std::vector<int>
#define vvi std::vector<std::vector<int>>
#define vvpil std::vector<std::vector<std::pair<int,ll>>>
#define vlpii std::vector<std::list<pii>>
#define vlpil std::vector<std::list<pil>>
#define li std::list<int>
#define lpil std::list<pil>
#define Endl printf("\n")
#define vli vector<list<int>>
#define vvll vector<vector<ll>>
#define mp make_pair
#define x first
#define y second
#define ull uint64_t
#define ma 100000000
#define imie(...) "[" << #__VA_ARGS__": " << (__VA_ARGS__) << "] "
const ll  INF=10000000000000;
const ll mod =  1e9 + 7;
using namespace std;
void add(ll& a , ll b){
	a += b;
	if(a >= mod) a -= mod;
}
ll mul(ll a , ll b){
	return (a * b) % mod;
}
ull Pow(ull a , ull b){
	if(b == 0) return 1 ;
	ull c = Pow(a , b / 2) ;
	if(b % 2) return (a * ((c * c) % mod)) % mod;
	return (c * c) % mod ;
}
vi Digit(ll x){
	vi res ;
	while(x){
		res.pb(x % 10) ;
		x /= 10 ;
	}
	return res ;
}
		

int main(){
	IOS;
	cout.precision(30) ;
	ll n ; cin >> n; 
	vll fact(12 , 1) ;
	for(int i = 2 ; i <= 11 ; i++) fact[i] = fact[i - 1] * i ;
	ll ans = 0 ;
	//cout << log10(n) << endl ;
	for(int l = 3 ; l <= log10(n) + 1 ;l++){
		for(int i = 1 ; i < l - 1 ; i++){
			for(int j = 1 ; j < l - i ; j++){
				int k = l - i - j ;
				//cout << i << "  "<< j << "  " << k << endl; 
				if(l == (ll)log10(n) + 1){
					vi tmp;
					for(int i1 = 0 ; i1 < i ; i1++) tmp.pb(3);
					for(int i1 = 0 ; i1 < j ; i1++) tmp.pb(5);
					for(int i1 = 0 ; i1 < k ; i1++) tmp.pb(7);
					do{
						ll t = 0 ;
						ll x = 1 ;
						for(int i1 = tmp.size() - 1 ; i1 >= 0 ; i1--){
							t += tmp[i1] * x ;
							x *= 10 ;
						}
						if(t <= n) ans++ ;
					}while(next_permutation(tmp.begin() , tmp.end())) ;
				}
				else{
					ans += fact[l] / (fact[i] * fact[j] * fact[k]) ;
				}
			}
		}
	}
	cout << ans << endl ;
		
	return 0;
}


Measured memory_bytes: 640
#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

int main(int argc, char const *argv[]) {
  int n, sum=0;
  cin >> n;
  vector<int> s(n);
  for (size_t i = 0; i < n; i++) {
    cin >> s[i];
    sum += s[i];
  }
  int ans;
  vector<int> scp;
  for (size_t i = 0; i < s.size(); i++) {
    if (s[i]%10!=0) scp.push_back(s[i]);
  }
  sort(scp.begin(), scp.end());
  if (sum%10==0) {
    if (scp.size()!= 0) ans = sum - scp[0];
    else ans = 0;
  }
  else ans = sum;
  cout << ans << endl;
  return 0;
}


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

#define MAX 101
#define inf 100000000
#define WHITE 0
#define BLACK 1

int n,A[MAX][MAX],d[MAX],C[MAX];

void MST()
{
  int i,j,min,u;

  d[0] = 0;

  while(1)
    {
      min = inf;

      for(i = 0 ; i < n ; i++)
	{
	  if(C[i] != BLACK && d[i] < min)
	    {
	      min = d[i];
	      u = i;
	    }
	}

      if(min == inf) return;

      C[u] = BLACK;

      for(i = 0 ; i < n ; i++)
	{
	  if(C[i] != BLACK && d[u] + A[u][i] < d[i] && A[u][i] != inf)
	    {
	      d[i] = d[u] + A[u][i];;
	    }
	}
      
    }

}

int main()
{
  int i,j,u,k,v;

  scanf("%d",&n);

  for(i = 0 ; i < n ; i++) //初期化
    {
      C[i] = WHITE;
      d[i] = inf;
      for(j = 0 ; j < n ; j++)
	{
	  A[i][j] = inf;
	}
    }

  for(i = 0 ; i < n ; i++)
    {
      scanf("%d %d",&u,&k);
      for(j = 0 ; j < k ; j++)
	{
	  scanf("%d",&v);
	  scanf("%d",&A[u][v]);
	}
    }

  MST();

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

  return 0;
}



Measured memory_bytes: 2048
// " --- IN THE NAME OF ALLAH --- " // ;)
// ------------sphr_agz------------ // ;)

//#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp> 
#include <bits/stdc++.h>
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <math.h>
#include <cmath>
#include <list>
#include <stack>
#include <bitset>
#include <ctime>
using namespace std;
 
typedef long double ld;
typedef long long int lli;
typedef pair <lli, pair <lli, lli> > pii;
#define pb(x) push_back(x)
#define recout(x) return cout << (x), 0
#define f first
#define s second
#define fast ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define stp(x) cout << setprecision(x) << fixed
#define mk make_pair
const lli N = 1e6 + 10, N2 = 5e3 + 10, delta = 46639, mod = 1e9 + 7, oo = 1e16, LOG = 20;
const ld PI = 3.141592653589793;

lli a[N], cnt[N];

int main(){
	lli n, ans = 0;
	cin >> n;
	for (lli i = 0; i < n; i++) {
		cin >> a[i];
		cnt[a[i]]++;
	}
	for (lli i = 0; i < N; i++)
		ans += (cnt[i] * (cnt[i] - 1) / 2);
	for (lli i = 0; i < n; i++) {
		cout << ans - (cnt[a[i]] - 1) << ' ';
	}
}

Measured memory_bytes: 7296
a, b, c ,d = map(int, input().split())
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
def lcm(a,b):
      return a*b//gcd(a,b)
e = lcm(c, d)
wareru = b//c + b//d - b//e - ((a-1)//c + (a-1)//d - (a-1)//e)
print(b-a+1-wareru)

Measured memory_bytes: 3060
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp> 
#include <functional>
using namespace std;
#define int long long
#define double long double
#define FAST ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define mod 1000000007
using namespace __gnu_pbds;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag,tree_order_statistics_node_update> new_data_set;
bool isprime(int n)
	{
    	if(n==1) return true;
    	for(int i = 2;i*i<=n;i++){
    		if(n%i==0) return false;
		}
		return true;
	}
int lcm(int a,int b){
	return (a*b)/__gcd(a,b);
}
int gcd(int a, int b) 
{ 
    if (b == 0) 
        return a; 
    return gcd(b, a % b);  
      
} 
unsigned int factorial(unsigned int n) 
{ 
    if (n == 0) 
    return 1; 
    return n * factorial(n - 1); 
} 
const int inf=1e17+7;
//const int N=2e5+5;
bool visited[100005] = {false};
signed main(){
	FAST
	int n,w;
	cin>>n>>w;
	vector<pair<int,int>>v;
	for(int i=0;i<n;i++){
		int x,y;
		cin>>x>>y;
		v.push_back({x,y});
	}
	sort(v.begin(),v.end());
	int dp[n+1][w+1];
	for(int i =0;i<=n;i++){
		for(int j=0;j<=w;j++){
			if(i==0){
				dp[i][j]=0;
			}
			else{
				if(v[i-1].first>j) dp[i][j]=dp[i-1][j];
				else dp[i][j]=max(v[i-1].second+dp[i-1][j-v[i-1].first],dp[i-1][j]);
			}
		}
	}
	cout<<dp[n][w];
}

Measured memory_bytes: 79232
//C
#include <cassert>
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>

//C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#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>
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>

//Others
template<class T> inline bool chmin(T& a, T b) {
	if (a > b) {
		a = b;
		return true;
	}
	return false;
}
template<class T> inline bool chmax(T& a, T b) {
	if (a < b) {
		a = b;
		return true;
	}
	return false;
}
const int dx[8] = { -1,0,1,-1,1,-1,0,1 };
const int dy[8] = { 1,1,1,0,0,-1,-1,-1 };


//LOVE NyantakoGG	https://www.youtube.com/channel/UC6XdFs8T6Ei54O0FYl3PVVA


using namespace std;



int main() {
	int A, B, K;
	cin >> A >> B >> K;
	if (A + K - 1 >= B - K + 1) {
		for (int i = A; i <= B; i++) {
			cout << i << endl;
		}
	}
	else {
		for (int i = A; i < A + K; i++) {
			cout << i << endl;
		}
		for (int i = B - K + 1; i <= B; i++) {
			cout << i << endl;
		}
	}
}


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

using namespace std;

int main(int argc, char *argv[])
{
	int n;
	cin >> n;
	vector<int> a(n);
	for (int i = 0; i < n; i++) {
		cin >> a[i];
		if (i > 0) a[i] += a[i - 1];
	}

	int ans = a[n - 1];
	for (int i = 0; i < n - 1; i++)
		ans = min(ans, abs(a[n - 1] - a[i] - a[i]));
	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 256
#include <cstdio>
#include <cassert>
#include <queue>
#include <deque>
#include <vector>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <set>
#include <cstdlib>
#include <string>
#include <unordered_map>
#include <sstream>
using namespace std;

typedef long long int lli;
typedef pair<int, int> pii;
typedef unsigned char byte;
typedef unsigned int uint;
typedef unsigned long long int ulli;

int dp[3][150];
int arr[3][150];

int main() {
    int i, j, n;
    scanf("%d", &n);
    for (i=1; i<=2; ++i) {
        for (j=1; j<=n; ++j) {
            scanf("%d", &arr[i][j]);
        }
    }
    for (i=1; i<=2; ++i) {
        for (j=1; j<=n; ++j) {
            dp[i][j] = max(dp[i-1][j], dp[i][j-1]) + arr[i][j];
        }
    }
    printf("%d\n", dp[2][n]);
    return 0;
}


Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
#define rep(i,j,n) for(int i=(int)(j);i<(int)(n);i++)
#define REP(i,j,n) for(int i=(int)(j);i<=(int)(n);i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(),(a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<int,int>
#define priq priority_queue<int>
#define disup(A,key) distance(A.begin(),upper_bound(ALL(A),(int)(key)))
#define dislow(A,key) distance(A.begin(),lower_bound(ALL(A),(int)(key)))
#define tii tuple<int,int,int>
signed main(){
  string S;
  cin>>S;
  if(S.size()==3)
    reverse(ALL(S));
  cout<<S<<endl;
  }


Measured memory_bytes: 256
#[allow(unused_imports)]
use std::cmp::*;

#[allow(unused_imports)]
use std::collections::*;

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}

fn main() {
    let N: usize = read();
    let A: Vec<i64> = read_vec();
    let mut min_abs = 10000000000i64;
    let mut cnt_neg = 0usize;
    let mut sum_A = 0i64;
    for i in 0..N {
        sum_A += i64::abs(A[i]);
        min_abs = min(min_abs, i64::abs(A[i]));
        if A[i] <= 0 {
            cnt_neg += 1;
        }
    }
    println!("{}", if cnt_neg%2==1 {sum_A-2*min_abs} else {sum_A});
}


Measured memory_bytes: 8444
A=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
C=input()
for i in range(len(A)):
    if C==A[i]:
        print(A[i+1])
    else:
        continue

Measured memory_bytes: 2940
#include <iostream>

using namespace std;

int main()
{
    int n,flag=0;
    string s;
    cin>>n>>s;
    if(n%2==1)flag=1;
    for(int i=0;i<n/2;i++)
    {
        if(s[i]!=s[n/2+i])
        {
            flag=1;
            break;
        }
    }
    if(flag==1)cout<<"No"<<endl;
    else cout<<"Yes"<<endl;
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using ll = long long;
int main()
{
    ll x, p;
    std::cin >> x >> p;
    if (x == 0) { return std::cout << 0 << std::endl, 0; }
    std::cout << std::fixed << std::setprecision(15) << (x % 2 == 0 ? 50.0 * x / p : 50.0 * (1 + x) / p) << std::endl;
    return 0;
}


Measured memory_bytes: 256
using System;
using System.Collections;
public class KukuB{
    public static void Main(){
        int N = int.Parse(Console.ReadLine());
        string ans = "No";
        for(int i=9; i>=1; i--){
            if(N%i == 0 && N/i <= 9){
                ans = "Yes";
                break;
            }
        }
        Console.WriteLine(ans);
    }
}

Measured memory_bytes: 13140
#include <cstdio>
#include <cstring>

int main(){
  char s[201], v[101], p[101] = {};

  scanf("%s %s", s, p);
  strcpy(v, s);
  strcat(s, v);

  if( strstr(s, p) == NULL ) printf ("No\n");
  else printf("Yes\n");

  return 0;
}

Measured memory_bytes: 2760
#include <iostream>

int main()
{
  std::string strS, strT;
  
  std::cin >> strS;
  std::cin >> strT;
  
  //長さについての制約をチェック
  if(strS.empty() ||
     (strS.size() > 10) ||
     (strT.size() != strS.size() + 1))
  {
    std::cout << "No";
    return 0;
  }
  
  //比較
  for(std::size_t i; i < strS.size(); ++i)
  {
    if(strS[i] != strT[i])
    {
      std::cout << "No";
      return 0;
    }
  }
  
  std::cout << "Yes";
  return 0;
}

Measured memory_bytes: 3568
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
using pii = pair<int,int>;
const long long INF = 1LL << 60;

int x,y;

int main()
{
  cin >> x >> y;
  bool check = false;
  for(int i = 0; i <= x; i++)
  {
    if(2*i+4*(x-i) == y) check= true;
  }
  if(check) cout << "Yes" << endl;
  else cout << "No" << endl;
}

Measured memory_bytes: 3592
#include <iostream>
#include <algorithm>
#include <limits>
#include <vector>
#include <map>
#include <cmath>
#include <limits>
#include <iomanip>
#define ll long long int
#define rep(i,n) for(int i = 0;i < n;i++)
#define pb push_back
#define mp make_pair

using namespace std;

int main(){

    string a,b;
    cin >> a >> b;

    if(a.size() > b.size()){
        cout << "GREATER" << endl;
    }
    else if(a.size() < b.size()){
        cout << "LESS" << endl;
    }
    else{
        int i = 0;
        while(a[i] == b[i] && i != a.size()) i++;
        if(i == a.size()) cout << "EQUAL" << endl;
        else if(a[i] > b[i]) cout << "GREATER" << endl;
        else cout << "LESS" << endl;
    }

    return 0;
}

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

typedef long long ll;

const ll INF = 1e15;
ll single[1000010];
ll all[1000010];
ll HP[124];

int main() {
	int N, M;
	while(cin >> N, N) {
		ll mxhp = 0;
		for(int i = 0; i < N; i++) {
			cin >> HP[i];
			mxhp = max(mxhp, HP[i]);
		}

		mxhp += 10;
		for(int i = 0; i < mxhp; i++) {
			single[i] = all[i] = INF;
		}
		single[0] = all[0] = 0;

		cin >> M;
		for(int i = 0; i < M; i++) {
			string name, type;
			ll mp, dam;
			cin >> name >> mp >> type >> dam;
		//	cout << mp << endl;
			if(type == "Single") {
				for(int j = 0; j < mxhp; j++) {
					if(dam > j)
						single[j] = min(single[j], mp);
					else
						single[j] = min(single[j], single[j-dam] + mp);
				}
			}
			else if(type == "All") {
				for(int j = 0; j < mxhp; j++) {
					if(dam > j)
						all[j] = min(all[j], mp);
					else
						all[j] = min(all[j], all[j-dam] + mp);
				}
			}
		}

		/*
		for(int i = 0; i < 100; i++)
			cout << single[i] << " ";
		cout << endl;
		for(int i = 0; i < 100; i++)
			cout << all[i] << " ";
		cout << endl;
		// */

		ll res = INF;
		for(int i = 0; i < mxhp; i++) {
			ll tmp = 0;
			tmp += all[i];
			for(int j = 0; j < N; j++) {
				tmp += single[max(0ll, HP[j] - i)];
			}
			res = min(res,tmp);
		}
		cout << res << endl;
	}
}

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

int main(){
  vector<int> vec(100);
  int N;
  cin >> N;
  for(int i = 0;i < N;i++){
    cin >> vec.at(i);
  }
  int a = 1000000000;

  for(int i = 1;i < 101;i++){
    int b = 0;

    for(int j = 0;j < N;j++){
      b +=  (vec.at(j) - i)*(vec.at(j) - i);
    }

    if(a > b) {
      a = b;
      
    }

  }
  cout << a << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 

using namespace std;
using namespace __gnu_pbds; 
  
#define ll long long
#define X first
#define Y second
#define all(x) x.begin(), x.end()
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> 

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
	enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
	ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
	*this << "[";
	for (auto it = d.b; it != d.e; ++it)
		*this << ", " + 2 * (it == d.b) << *it;
	ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

const int mod = (int)1e9 + 7;
const int MX = (int)1e5 + 10;

void add_self(int &x, int y){x += y; if(x >= mod) x -= mod;}
void sub_self(int &x, int y){x -= y; if(x < 0) x += mod;}
void mul(int &x, int y){x = x * 1LL * y % mod;}

int main(){

	cin.tie(0); cout.tie(0);
	ios_base::sync_with_stdio(0);

	int n, m, s;
	cin >> n >> m >> s;

	vector<array<int, 3>> g[n];

	int mx = 0;
	for(int i = 0; i < m; ++i){
		int u, v, a, b;
		cin >> u >> v >> a >> b;
		--u, --v;
		g[u].push_back({v, a, b});
		g[v].push_back({u, a, b});
		mx += a;
	}
	
	vector<pair<int, int>> f(n);
	for(auto &p : f){
		cin >> p.X >> p.Y; // c, d
	}

	s = min(s, mx);
	vector<vector<ll>> best(n, vector<ll>(mx + 1, 9e18));
	priority_queue<array<ll, 3>> q;
	q.push({0, 0, s});
	best[0][s] = 0;

	while(!q.empty()){
		auto ar = q.top();
		q.pop();
		ll timer = -ar[0];
		int x = ar[1];
		int silver = ar[2];

		if(best[x][silver] != timer) continue;

		// cout << x << " " << silver << endl;

		int t = 1;
		if(silver + t * f[x].X <= mx){
			if(best[x][silver + t * f[x].X] > best[x][silver] + t * f[x].Y){
				best[x][silver + t * f[x].X] = best[x][silver] + t * f[x].Y;
				ll cost = best[x][silver] + t * f[x].Y;
				q.push({-cost, x, silver + t * f[x].X});
			}
			t++;
		}


		for(auto &p : g[x]){
			int y = p[0];
			int a = p[1];
			int b = p[2];
			if(silver >= a && best[y][silver - a] > best[x][silver] + b){
				best[y][silver - a] = best[x][silver] + b;
				ll cost = best[x][silver] + b;
				q.push({-cost, y, silver - a});
			}
		}
	}

	for(int i = 1; i < n; ++i){
		cout << *min_element(all(best[i])) << "\n";
	}

	return 0;
}

Measured memory_bytes: 7216
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
#define yn {puts("Yes");}else{puts("No");}
#define MAX_N 200005

int main() {
    int n;
    cin >> n;
    int L[n];
    rep(i,n)cin >> L[i];
    sort(L,L+n);
    int ans = 0;
    drep(i,n){
        if(i<2)break;
        drep(j,i){
            if(j==0)break;
            int l = 0; int r = j;
            while(l<r){
                int m = (l+r)/2;
                if(L[i] < L[j] + L[m]){
                    r = m;
                }else{
                    l = m+1;
                }
            }
            ans += j - l;
        }
    }


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


Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main(){
  int a;
    cin>>a;
    int c=a%10;
    if(c==2||c==4||c==5||c==7||c==9)cout<<"hon"<<endl;
    else if(c==0||c==1||c==8||c==6)cout<<"pon"<<endl;
    else if(c==3)cout<<"bon"<<endl;   
    
    
return 0;
}

Measured memory_bytes: 3616
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] a) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.valueOf(in.readLine());
		String[] l;
		int total = 0;
		for(int i = 0; i < n; i++) {
			l = in.readLine().split(" ");
			total+=Integer.valueOf(l[1])-Integer.valueOf(l[0])+1;
		}
        System.out.println(total);
	}
}

Measured memory_bytes: 21716
#include<iostream>
#include<algorithm>
#include<cstddef>
#include<vector>
#include<algorithm>

using ui = std::uint32_t;

int main(){

	ui n, m;

	std::cin >> n >> m;
	std::vector<ui> cn(m);
	for( auto& e : cn )
		std::cin >> e;

	decltype( cn ) dp( n+1, n);
	dp.front() = 0;

	//i番目までのコインを使用する
	for( ui i{}; i< m; ++i )
		for( ui j{}; j + cn[i] <= n;++j )
		{
			dp[j + cn[i]]
				= std::min( dp[j + cn[i]], dp[j] + 1 );

			/*
			auto p = [&]()
			{
				std::cout << "i,j = " << i << ", " << j << " : ";
				for( auto e : dp )
					std::cout << e << " ";
				std::cout << "\n";
			};
			p();

			*/
		}

	std::cout << dp.back() << "\n";
	return 0;
	
}


Measured memory_bytes: 3180
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long a = sc.nextLong();
		long b = sc.nextLong();
		long c = sc.nextLong();
		long d = sc.nextLong();
		long ans = Long.MIN_VALUE;
		ans = Math.max(ans, a * c);
		ans = Math.max(ans, a * d);
		ans = Math.max(ans, b * c);
		ans = Math.max(ans, b * d);
		System.out.println(ans);

	}

}


Measured memory_bytes: 36052
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <math.h>
#include <string>
#include <numeric>
#include <queue>
#define ll long long
#define rep(i,n) for(ll i=0;i<n;++i)
#define rep1(i,n) for(ll i=1;i<n;++i)
#define mrep(i,n) for(ll i=n;i>=0;--i)
#define all(a) (a).begin(),(a).end()
#define vl vector<ll>
#define vvl vector<vector<ll> >
#define vb vector<bool>
#define vvb vector<vector<bool> >
#define pl pair<ll,ll>
#define inf 1001001001001001000
#define mod 1000000007
#define pi 3.1415926535
using namespace std;



int main(void){
    ll n;
    cin>>n;
    string s;
    cin>>s;
    vl w(n,0),e(n,0);
    if(s[0] == 'W') w[0] = 1;
    else e[0] = 1;
    rep1(i,n){
        if(s[i] == 'W'){
            w[i] = w[i-1]+1;
            e[i] = e[i-1];
        }
        else{
            w[i] = w[i-1];
            e[i] = e[i-1]+1;
        }
    }
    ll ans = inf;
    rep(i,n){
        if(s[i] == 'W'){
            ll score = e[n-1]-e[i]+w[i]-1;
            ans = min(ans,score);
        }
        else{
            ll score = e[n-1]-e[i]+w[i];
            ans = min(ans,score);
        }
    }
    cout<<ans<<endl;
}

Measured memory_bytes: 5380
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

#include <functional>
#include <cassert>

typedef long long ll;
using namespace std;

#define debug(x) cerr << #x << " = " << x << endl;


#define mod 1000000007 //1e9+7(prime number)
#define INF 1000000000 //1e9
#define LLINF 2000000000000000000LL //2e18
#define SIZE 10000


int main(){
  int n;
  int l[SIZE];
  int ans = 0;
  scanf("%d",&n);

  for(int i=0;i<2*n;i++){
	scanf("%d",l+i);
  }

  sort(l,l+2*n);

  for(int i=0;i<2*n;i+=2){
	ans += l[i];
  }

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


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

using namespace std;

using ll = long long;
using ld = long double;

const int INF = (1 << 30) - 1;
const ll INF64 = ((ll)1 << 62) - 1;
const double PI = 3.1415926535897932384626433832795;

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

int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
int lcm(int x, int y) { return x / gcd(x, y) * y; }
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	vector<int> a(3);
	for (auto& v : a) {
		cin >> v;
	}
	sort(begin(a), end(a));

	int ans = 0;
	for (int i = 0; i < 2; i++) {
		ans += abs(a[i] - a[i + 1]);
	}

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


Measured memory_bytes: 256
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0363&lang=ja
#include <stdio.h>
int boxcount(int);
int max(int,int);

int count[40000];
int nimotsu[40000];
int H;

//■マス目の位置を(x, y)の２次元ではなくて、一番左上が０で、その右が１、０の下が４、さらにその下が８になるような感じで、１次元の０～３９９９９で表す。
int main(){
  int i,n,x,y;
  for(i=0;i<40000;i++){
    count[i]=-1;
	nimotsu[i]=0;
  }
    scanf("%d %d",&H,&n);
  for(i=0;i<n;i++){
    scanf("%d %d",&x,&y);
    nimotsu[x+y*4]=1;
  }
  printf("%d\n",boxcount(0));
  return 0;
}

int boxcount(int num){    // ■numがマス目上のマーカーの位置を表す。
  if(num >= H*4-4){return 0;}// ■マーカーが一番下の行にあるときには、下にマスがないので積み荷はおけない。
  if(count[num] > -1){return count[num];}// ■メモ化再帰
  else{
	if((num%4)==0){        // ■一番左の列にマーカーがある場合
      if(nimotsu[num]==0 && nimotsu[num+1]==0 && nimotsu[num+4]==0 && nimotsu[num+5]==0){// ■マーカーの位置を左上として、積み荷がそこにおけるか？
        if(nimotsu[num+2]==0 && nimotsu[num+3]==0 && nimotsu[num+6]==0 && nimotsu[num+7]==0){
		  count[num]=max(boxcount(num+1),2+boxcount(num+8));
		  return count[num];
        }
		else{
		  count[num]=max(boxcount(num+1),1+boxcount(num+6));
		  return count[num];          
		}
      }
      else{
	  	count[num]=boxcount(num+1);
	    return count[num];
      }
	}

	else if((num%4)==1){        // ■左から２列目の列にマーカーがある場合
      if(nimotsu[num]==0 && nimotsu[num+1]==0 && nimotsu[num+4]==0 && nimotsu[num+5]==0){
		count[num]=max(boxcount(num+1),1+boxcount(num+7));
		return count[num];          
      }
	  else{
		count[num]=boxcount(num+1);
		return count[num];          	  	
	  }
	}

	else if((num%4)==2){        // ■左から３列目の列にマーカーがある場合
      if(nimotsu[num]==0 && nimotsu[num+1]==0 && nimotsu[num+4]==0 && nimotsu[num+5]==0){
        if(num<H*4-8 && nimotsu[num+2]==0 && nimotsu[num+3]==0 && nimotsu[num+6]==0 && nimotsu[num+7]==0){
		  count[num]=max(boxcount(num+1),2+boxcount(num+8));
		  return count[num];
        }
		else{
		  count[num]=max(boxcount(num+1),1+boxcount(num+6));
		  return count[num];          
		}
      }
      else{        // ■左から４列目の列（右端の列にマーカーがある場合
	  	count[num]=boxcount(num+1);
	    return count[num];
      }
	}
		
	else{
      count[num]=boxcount(num+1);
	  return count[num];
	}
  }
}

int max(int a, int b) {
    if (a > b)
        return a;
    else
        return b;
}


Measured memory_bytes: 4300
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#define llint long long

using namespace std;

llint n;
llint p[100005], pinv[100005];
set<llint> S;

int main(void)
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	cin >> n;
	for(int i = 1; i <= n; i++) cin >> p[i];
	for(int i = 1; i <= n; i++) pinv[p[i]] = i;
	
	llint ans = 0;
	for(llint i = n; i >= 1; i--){
		llint LL, L, R, RR;
		if(S.size() > 0){
			auto r = S.upper_bound(pinv[i]);
			if(r != S.end()){
				R = *r;
				auto rr = r; rr++;
				if(rr != S.end()) RR = *rr;
				else RR = n+1;
			}
			else R = RR = n+1;
			
			if(r != S.begin()){
				auto l = r; l--;
				L = *l;
				if(l != S.begin()){
					auto ll = l; ll--;
					LL = *ll;
				}
				else LL = 0;
			}else L = LL = 0;
			ans += (L-LL) * (R-pinv[i]) * i;
			ans += (RR-R) * (pinv[i]-L) * i;
		}
		//cout << LL << " " << L << " " << R << " " << RR << endl;
		
		S.insert(pinv[i]);
		//cout << ans << endl;
	}
	cout << ans << endl;
	
	return 0;
}

Measured memory_bytes: 6528
#include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for(int i = int(a); i < int(b); ++i)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
template <typename T> bool chmax(T &a, const T &b) {
    if(a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T> bool chmin(T &a, const T &b) {
    if(a > b) {
        a = b;
        return 1;
    }
    return 0;
}
const long long INFLL = 1LL << 60;
const long long MOD = 1e9 + 7;

int main() {
    int k;
    cin >> k;
    queue<ll> l;
    ll t, m;
    rep(i, 1, 10) l.push(i);
    rep(i, k - 1) {
        t = l.front();
        l.pop();
        m = t % 10;
        if(m != 0) l.push(t * 10 + m - 1);
        l.push(t * 10 + m);
        if(m != 9) l.push(t * 10 + m + 1);
    }
    cout << l.front() << endl;
}

Measured memory_bytes: 5164
a,b,c,d = map(int, input().split())
for i in range(1,1000):
    if i%2 ==1:
        c =c-b
        if c <=0:
            print("Yes")
            exit()
    else:
        a = a-d
        if a <=0:
            print("No")
            exit()

Measured memory_bytes: 9120
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        String t = sc.next();
        int a = sc.nextInt();
        int b = sc.nextInt();
        String u = sc.next();
        
        if(s.equals(u)) {
            a--;
        }else {
            b--;
        }
        System.out.println(a+" "+b);
    }
}


Measured memory_bytes: 21844
import java.util.*;
import java.io.PrintWriter;
import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static final long MOD = 1000000007;
	public static void main(String[] args) {
		int i=0,j=0,k=0;
		Scanner sc = new Scanner(in);
		int n = parseInt(sc.next());
		int[] a = new int[n];
		int sum=0;
		for (i = 0; i < n; i++) {
			a[i] = parseInt(sc.next());
			sum+=a[i];
		}
		sc.close();
		int ave = (int) round((double)sum / n);
		int ans = 0;
		for (i = 0; i < n; i++) {
			ans+=(a[i]-ave)*(a[i]-ave);
		}
		out.println(ans);
	}
}


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

int main(){
	llong N;
	cin>>N;
	
	llong h,n,w;
	for(h=1;h<=3500;++h){
		for(n=1;n<=3500;++n){
			if((4*h*n-N*n-N*h)>0){
				if((N*h*n)%(4*h*n-N*n-N*h)==0){
					w=(N*h*n)/(4*h*n-N*n-N*h);
					cout<<h<<" "<<n<<" "<<w<<endl;
					return 0;
				}
			}
		}
	}
}//解答解説参考.

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define IOS ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define endl "\n"
#define pb push_back
#define mp make_pair
#define ll long long
#define int long long
#define mod 1000000007
#define DEBUG cout<<"Hello1\n";
#define all(v) (v).begin(),(v).end()
#define clr(x) memset(x,0,sizeof(x))
#define deb(...) debug(#__VA_ARGS__, __VA_ARGS__);
const int N = 1e6 + 5;
const double pi =  acosl(-1);
const ll inf = 1e18 + 5;
using namespace std;
template<typename T> void debug(string s, T x) {cout << s << " = " << x << "\n";}
template<typename T, typename... Args> void debug(string s, T x, Args... args) {cout << s.substr(0, s.find(',')) << " = " << x << " | "; debug(s.substr(s.find(',') + 2), args...);}
template<class T> void print_container(T &container) { for (auto &t : container) { cout << t << " ";} cout << endl;}
template<class T> void printArr(T &a , int n) { for (int i = 0; i < n; i++) {cout << a[i] << " ";} cout << endl;}

//Template Ends
int n;
string s, t;

void solve() {
	cin >> s >> t;

	n = s.length();
	int ans = 0;
	for (int i = 0; i < n; i++) {
		if (s[i] != t[i]) {
			ans++;
		}
	}

	cout << ans << endl;
}

int32_t main() {
	IOS;


	solve();

	return 0;
}




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

#include <iostream>

using namespace std;

int main() {
  int n;
  cin>>n;
  vector<int> numbers;
  for(int i=0; i<n; i++){
      int temp;
      cin>>temp;
      numbers.push_back(temp);
  }
  
  sort(numbers.begin(), numbers.end());
  for(int i=0; i<n-1; i++){
      if(numbers[i] == numbers[i+1]){
          cout<<"NO"<<endl;
          return 0;
      }
  }
  cout<<"YES"<<endl;
  return 0;
}

Measured memory_bytes: 1400
#include <stdio.h>
int main(void){
    float xa1,ya1,xa2,ya2,xb1,yb1,xb2,yb2;
    
    while(scanf("%f %f %f %f %f %f %f %f",&xa1,&ya1,&xa2,&ya2,&xb1,&yb1,&xb2,&yb2)!=EOF){
        if(xa2<xb1 || xb2<xa1 || ya2<yb1 || yb2<ya1)puts("NO");
        else puts("YES");
    }
    return 0;
}

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

//マクロ
//forループ関係
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)
//xにはvectorなどのコンテナ
#define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x)) //最大値を求める
#define MIN(x) *min_element(ALL(x)) //最小値を求める
//定数
#define INF 1000000000000 //10^12:極めて大きい値,∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange(素数列挙などで使用)
//略記
#define PB push_back //vectorヘの挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素


vector< vector<int> > pathes;

signed main(){
  int N,M;

  cin>>N>>M;

  for(int i=0;i<N;i++){
    vector<int> aa;
    pathes.push_back(aa);
  }
  for(int i=0;i<M;i++){
    int A,B;
    cin>>A>>B;
    A=A-1;
    B=B-1;
    pathes[A].push_back(B);
    pathes[B].push_back(A);

  }
  vector<int> dist(N,-1);
  queue<int> que;
  dist[0]=0;
  que.push(0);
  int count=1;
  while(!que.empty()){
    int v=que.front();
    que.pop();
    for(int nv : pathes[v]){
      if(dist[nv]!=-1){
        continue;
      }
      count++;
      que.push(nv);
      dist[nv]=v;
    }
  }
  if(count==N){
    cout<<"Yes"<<endl;
    for(int i=1;i<N;i++){
      cout<<dist[i]+1<<endl;
    }
  }else{
    cout<<"No";
  }






}

Measured memory_bytes: 10168
n,m=map(int,input().split())
l=list(map(int,input().split()))
count=0
d={i:set() for i in range(1,n+1)}
for i in range(m):
	a,b=map(int,input().split())
	d[a].add(l[b-1])
	d[b].add(l[a-1])
for i in d:
	a=l[i-1]
	f=1
	for j in d[i]:
		if j>=a:
			f=0
			break
	if f==1:
		count+=1
print(count)

Measured memory_bytes: 47660
S = input()

cums = [0] * (len(S)+1)

for i in range(len(S)):
  cums[i+1] = cums[i] + int(S[i])

ans = len(S)
l = 0
r = len(S)-1
#print(cums)
while l <= r:
  x = cums[r+1] - cums[l]
  #print(x,l,r)
  if x == (r-l+1) or x == 0:
    break
  ans -= 1
  l += 1
  r -= 1

print(ans)

Measured memory_bytes: 7236
#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>;

void solve() {
    ll n, h;
    cin >> n >> h;
    vector<ll> a(n), b(n);
    rep(i, n) cin >> a[i] >> b[i];

    ll maxa = -1;
    rep(i, n) maxa = max(maxa, a[i]);
    sort(b.rbegin(), b.rend());
    int last = 0;
    bool update = false;
    rep(i, n) {
        last = i;
        if (b[i] <= maxa) {
            update = true;
            break;
        }
    }
    if (!update) last++;

    ll tot = 0;
    rep(i, last) {
        tot += b[i];
        if (tot >= h) {
            cout << i + 1 << endl;
            return;
        }
    }

    cout << (h - tot + maxa - 1) / maxa + last << endl;

}

int main() {
    solve();
    return 0;
}


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

using namespace std;

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

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

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

template<typename T> inline void CHMAX(T& a, const T b) {if(a<b) a=b;}
template<typename T> inline void CHMIN(T& a, const T b) {if(a>b) a=b;}

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

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

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	// cout<<setprecision(10)<<fixed;
	int n, h[30];
	cin>>n;
	REP(i, n){
		cin>>h[i];
	}
	int ans=1, ma=h[0];
	REP(i, n-1){
		if(ma<=h[i+1]){
			++ans;
			ma=h[i+1];
		}
	}
	cout<<ans<<'\n';
	return 0;
}


Measured memory_bytes: 256
#include <cstdlib>
#include <iostream>
#include <string>

using namespace std;

template <typename T>
class Queue {
  size_t head;
  size_t tail;
  T q[1000000];

 public:
  Queue() : head(0), tail(0) {}

  void enqueue(T item) {
    q[tail] = item;
    tail++;
  }

  T dequeue() {
    // assert(head < tail);
    return q[head++];
  }

  bool isempty() { return head >= tail; }
};

struct Proc {
  string name;
  int time;

  Proc(string _name, int _time) : name(_name), time(_time) {}
};

int main(int argc, char **argv) {
  size_t num;
  int quantum;
  int time = 0;
  Queue<Proc *> queue;

  cin >> num >> quantum;

  for (size_t i = 0; i < num; i++) {
    string name;
    int time;
    cin >> name >> time;
    Proc *p = new Proc(name, time);
    queue.enqueue(p);
  }

  while (true) {
    // cout << "time: " << time << endl;
    if (queue.isempty()) {
      break;
    }
    Proc *p = queue.dequeue();
    if (p->time > quantum) {
      time += quantum;

      p->time -= quantum;
      queue.enqueue(p);
      // cout << "send " << p->name << " back" << endl;
    } else {
      cout << p->name << " " << time + p->time << endl;
      time += p->time;
      delete p;
    }
  }

  return 0;
}


Measured memory_bytes: 8392
#include <cstdio>
#include <cmath>
int main(){
	int q;double x;
	for(;scanf("%d",&q),~q;printf("%f\n",x))
		for(x=q/2.;fabs(x*x*x-q)>1e-5*q;x-=(x*x*x-q)/(3*x*x));
}

Measured memory_bytes: 0
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <map>
using namespace std;
#define rep(i, n) for(int i=0; i<n; ++i)
typedef long long ll;
//必要な宣言
#define MAX 100

int N, A, B;
int P[MAX];
int flag[MAX] = {};

//問題をよく読もう！
//論理的に考えよう！
//サンプルを確認しよう!
//絶対に諦めるな！
//工夫をしろ！
int main() {
  cin >> N >> A >> B;
  rep(i, N) cin >> P[i];
  int cnt[3] = {};
  sort(P, P+N);

  rep(i, N) {if(P[i]<=A) ++cnt[0];}
  rep(i, N) {if(P[i]>=A+1 && P[i]<=B) ++cnt[1];}
  rep(i, N) {if(P[i]>=B+1) ++cnt[2];}

  int min = cnt[0];
  for(int i=1; i<3; ++i) {
    if(min > cnt[i]) min = cnt[i];
  }

  cout << min << endl;

  return 0;
}


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

typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef vector<pair<int, int>> vpii;

#define rep(i,n) for(int i=0;i<(n);i++)
#define all(x) (x).begin(),(x).end()
constexpr auto INF = 4000000000; //4*10^9;
constexpr auto MOD = 1000000007; //10^9+7;


char nextab(char c) {
	if (c == 'z') return 'a';
	else return c + 1;
}


int main(){
	
	string s;
	cin >> s;
	int k;
	cin >> k;

	vector<char> c(s.size());
	rep(i, s.size())c[i] = s[i];

	rep(i, s.size()-1) {
		if (c[i] == 'a') continue;
		if ('z' - c[i] + 1 <= k) {
			for (;c[i] != 'a' && k > 0;) {
				c[i] = nextab(c[i]);
				k--;
			}
		}
	}

	k %= 26;

	if (k > 0) {
		rep(i, k) {
			c[s.size() - 1] = nextab(c[s.size() - 1]);
		}
	}

	rep(i,s.size())	cout << c[i];
	cout << endl;
}

Measured memory_bytes: 512