akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <string>
#include <cmath>
#include<algorithm>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<iomanip>
#define _USE_MATH_DEFINES
#include <math.h>
#include <functional>
#include<complex>
using namespace std;

#define rep(i,x) for(ll i=0;i<x;i++)
#define repn(i,x) for(ll i=1;i<=x;i++)

typedef long long ll;
const ll INF = 1e17;
const ll MOD = 1000000007;
const ll MAX = 4000001;
const long double eps = 1E-14;

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

ll min(ll a, ll b) {
	if (a > b) { return b; }
	return a;
}

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

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

struct edge {
	ll ind;
	ll fr;
	ll to;
	ll d;
};

class mint {
	long long x;
public:
	mint(long long x = 0) : x((x% MOD + MOD) % MOD) {}
	mint operator-() const {
		return mint(-x);
	}
	mint& operator+=(const mint& a) {
		if ((x += a.x) >= MOD) x -= MOD;
		return *this;
	}
	mint& operator-=(const mint& a) {
		if ((x += MOD - a.x) >= MOD) x -= MOD;
		return *this;
	}
	mint& operator*=(const  mint& a) {
		(x *= a.x) %= MOD;
		return *this;
	}
	mint operator+(const mint& a) const {
		mint res(*this);
		return res += a;
	}
	mint operator-(const mint& a) const {
		mint res(*this);
		return res -= a;
	}
	mint operator*(const mint& a) const {
		mint res(*this);
		return res *= a;
	}

	mint pow(ll t) const {
		if (!t) return 1;
		mint a = pow(t >> 1);
		a *= a;
		if (t & 1) a *= *this;
		return a;
	}

	// for prime MOD
	mint inv() const {
		return pow(MOD - 2);
	}
	mint& operator/=(const mint& a) {
		return (*this) *= a.inv();
	}
	mint operator/(const mint& a) const {
		mint res(*this);
		return res /= a;
	}

	friend ostream& operator<<(ostream& os, const mint& m) {
		os << m.x;
		return os;
	}
};

mint pw(mint a, ll b) {
	if (b == 0) { return 1; }
	mint ret = pw(a, b >> 1);
	ret *= ret;
	if (b & 1) { ret *= a; }
	return ret;
}

typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef vector<vector<vector<ll>>> vvvll;

typedef vector<mint> vmint;
typedef vector<vector<mint>> vvmint;
typedef vector<vector<vector<mint>>> vvvmint;

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

int main() {
	ll N;
	cin >> N;

	ll a, b;
	cin >> a >> b;

	ll x = 0;
	repn(i, N - 2) {
		ll c;
		cin >> c;
		x = x ^ c;
	}

	ll M = 45;
	vll kumi(M,0);

	ll rem = a + b;
	
	rep(i, M) {
		ll bit = (x >> (M - 1 - i)) % 2;

		if (bit == 0) {
			if (rem >= 1ull << (M - i)) {
				kumi[i] = 2;
				rem -= 1ull << (M - i);
			}
		}
		else {
			kumi[i] = 1;
			rem -= 1ull << (M - i - 1);
		}

		//cout << kumi[i] << endl;
	}

	//cout << rem << endl;
	if (rem != 0) { cout << -1 << endl; return 0; }
	
	
	ll ans = 0;
	rep(i, M) {
		if (kumi[i] == 2) { ans += 1ull << (M - 1 - i); }
	}
	//cout << ans << endl;
	if (ans > a) { cout << -1 << endl; return 0; }
	//cout << ans << endl;
	rep(i, M) {
		if (kumi[i] == 1 && (a - ans) > (1ull << (M - 1 - i))) { ans += 1ull<<(M - 1 - i); }
	}

	if (ans == 0) { cout << -1 << endl; return 0; }

	cout << a - ans << endl;


}

Measured memory_bytes: 3608
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int64_t i = 0; i < (int64_t)(n); i++)
using vi = vector<int64_t>;
using vvi = vector<vi>;
using ll = int64_t;
using P = pair<ll,ll>;
ll INF = 1000000007;
// ll INF = 9223372036854775807;
// ll INF = 998244353;

int main() {
    // fasten cin
    cin.tie(0);
    ios::sync_with_stdio(false);
    // implement
    string s,t;
    cin >> s >> t;
    ll res = 0;
    rep(i,s.size()){
        if(s.at(i)!=t.at(i)) res++;
    }
    cout << res << endl;
}

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

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;
#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define debug(x) cout << #x << ": " << x << endl
#define out(x) cout << x << endl
//#define int long long int
const int MOD = 1000000007;
const ll LINF = (ll)1e18 - 1;
const int INF = 1e9 - 1;
const double EPS = 0.000000001;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};

void print(const vector<int> &v) {
  for(auto x : v) {
    cout << x << " ";
  }
  cout << endl;
}

bool judge(ll x, VL a, VL f,  ll k) {
  ll count = 0;
  rep(i, a.size()) {
    count  += max(0LL, a[i] - x / f[i]);
  }
  return count <= k;
}

signed main()
{
  cin.tie(0);
  ios::sync_with_stdio(false);

  int n;
  ll k;
  cin >> n >> k;
  VL a(n), f(n);
  rep(i, n) cin >> a[i];
  rep(i, n) cin >> f[i];
  sort(all(a));
  sort(rall(f));
  ll l = -1;
  ll r = LINF;
  while(r - l > 1) {
    ll mid = (r + l) / 2;
    if(judge(mid, a, f, k)) r = mid;
    else l = mid;
  }
  out(r);

  return 0;
}


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

int main()
{
	int n, m, l, r, maxL=0, minR=1e9;
	cin>>n>>m;

	while(m--){
		cin>>l>>r;
		maxL = max(maxL,l);
		minR = min(minR,r);
	}
	if(maxL>minR) cout << 0 << endl;
	else cout << minR-maxL+1 << endl;
}

Measured memory_bytes: 256
#include "iostream"
using namespace std;
#define smax 200000
char str[smax+1];
int Stone[smax];
long long ans;
int main()
{
	ans = 0;
	int x = 0;

	cin >> str;
	for (int i = 0; str[i]!=0; i++) {
		if (str[i] == 'W'||str[i]=='w') {
			Stone[x] = i;
			x++;
		}
	}
	for (int i = 0; i < x; i++) {
		ans += Stone[i] - i;
	}
	cout << ans << endl;

	return 0;
}

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

int a[100000], n, m;
ll sum[300000], sum2[300000];

int main() {
	scanf("%d%d", &n, &m);
	rep(i, n)scanf("%d", &a[i]), a[i]--;
	rep(i, n - 1) {
		sum[a[i] + 1]++;
		if (a[i] < a[i + 1]) {
			sum[a[i + 1] + 1]--;
			sum2[a[i + 1] + 1] -= a[i + 1] - a[i];
		}
		else {
			sum[a[i + 1] + m + 1]--;
			sum2[a[i + 1] + m + 1] -= a[i + 1] + m - a[i];
		}
	}
	for (int i = 1; i < m * 2; i++) {
		sum[i] += sum[i - 1];
		sum2[i] += sum2[i - 1] + sum[i];
		if (i >= m)sum2[i - m] += sum2[i];
	}
	ll ans = 0;
	int id = max_element(sum2, sum2 + m) - sum2;
	rep(i, n - 1) {
		ans += min((a[i + 1] + m - a[i]) % m, (a[i + 1] + m - id) % m + 1);
	}
	printf("%lld\n", ans);
}

Measured memory_bytes: 4224
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  //int n;
  string s;
  //map<string,int> s;
  //map<string,int> s{};
  //string res;
  //vector<int> a;
  
  cin >> s;
  //cout << s.at(0) << endl;
  //vector<int> s(n,0);
  //int tmp,res;
  //res = 0;
  string res = "No";
  for(int i = 0;i < 3; i++){
    if(s.at(i) == '7'){
      res = "Yes";
      break;
    }
  }
  cout << res;
  
}

Measured memory_bytes: 3556
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int X,K;
vector<pair<int,int> >A;
main()
{
	cin>>X>>K;
	for(int i=0;i<K;i++)
	{
		int r;cin>>r;A.push_back(make_pair(r,-1));
	}
	int Q;cin>>Q;
	for(int i=0;i<Q;i++)
	{
		int t,a;cin>>t>>a;
		A.push_back(make_pair(t,a));
	}
	sort(A.begin(),A.end());
	int pre=0,d=1;
	int L=0,LA=0;
	int R=X,RA=X;
	for(pair<int,int>p:A)
	{
		if(p.second<0)
		{
			int t=p.first-pre;
			pre=p.first;
			if(d>0)
			{
				LA-=t;
				RA-=t;
				if(RA<0)
				{
					LA=RA=L=R=0;
				}
				else if(LA<0)
				{
					L+=-LA;
					LA=0;
					if(R<L)L=R;
				}
			}
			else
			{
				RA+=t;
				LA+=t;
				if(LA>X)
				{
					LA=RA=L=R=X;
				}
				else if(RA>X)
				{
					R-=RA-X;
					RA=X;
					if(R<L)R=L;
				}
			}
			d*=-1;
			//cout<<"L : "<<L<<", LA : "<<LA<<endl;
			//cout<<"R : "<<R<<", RA : "<<RA<<endl<<endl;
		}
		else
		{
			int a=p.second;
			if(a<L)a=LA;
			else if(a>R)a=RA;
			else
			{
				a=LA+a-L;
			}
			int t=p.first-pre;
			cout<<(d>0?max(0,a-t):min(a+t,X))<<endl;
		}
	}
}


Measured memory_bytes: 2928
/*
    [Gnana Deepak]
    [August 01, 2020 6:38 PM]
    [E - Knapsack 2]
    [https://atcoder.jp/contests/dp/tasks/dp_e]
    [2000 ms]
    [1024 MB]
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
using ld = long double;
#pragma GCC optimize("O3")
#pragma comment(linker, "/stack:200000000")
#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")
#define int long long
#define F first
#define S second
#define orderKey order_of_key
#define findOrder find_by_order
#define s(x) set<x>
#define um(x, y) unordered_map<x, y>
#define m(x, y) map<x, y>
#define p(x, y) pair<x, y>
#define v(x) vector<x>
#define min_heap(t) priority_queue<t, vector<t>, greater<t>>
#define max_heap(t) priority_queue<t>
#define ordered_set(x) tree<x, null_type, less<x>, rb_tree_tag, tree_order_statistics_node_update>
#define eb emplace_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define ss(v) stable_sort(all(v))
#define fori(i, a, b) for (int i = a; i <= b; i++)
#define fastio                    \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                   \
    cout.tie(0);
#define stprs(x) cout << fixed << setprecision(x);
#define FILE_READ_IN freopen("input.txt", "r", stdin);
#define FILE_READ_OUT freopen("output.txt", "w", stdout);
#define bs binary_search
#define deb(x) cout << #x << "=" << x << '\n';
#define scn(v1)        \
    for (auto &x : v1) \
        cin >> x;
#define R(x) reverse(all(x));
#define lb lower_bound
#define ub upper_bound
const char nl = '\n';
const int mod1 = 1e9 + 7;
const int mod2 = 998244353;
const ld PI = acos(-1);
const int N = 100;
const int V = 1e5;
const int INF = 3e18 + 5;
const int imx = LLONG_MAX;
int KS[N + 1][V + 1];
void accio_ac(void)
{
    int n, w;
    cin >> n >> w;
    v(int) weight(n + 1), value(n + 1);
    v(p(int, int)) pairs;
    fori(i, 1, n)
    {
        int a, b;
        cin >> a >> b;
        pairs.eb(mp(b, a));
    }
    ss(pairs);
    fori(i, 1, n)
    {
        weight[i] = pairs[i - 1].S;
        value[i] = pairs[i - 1].F;
    }
    KS[0][0] = 0;
    int ANS = 0;
    fori(i, 0, n) fori(j, 0, 1e5)
    {
        if (i == 0 and j == 0)
        {
            continue;
        }
        if (i == 0)
        {
            KS[i][j] = INF;
        }
        else
        {
            if (j >= value[i])
            {
                KS[i][j] = min(KS[i - 1][j], KS[i - 1][j - value[i]] + weight[i]);
            }
            else
            {
                KS[i][j] = KS[i - 1][j];
            }
        }
        if (KS[i][j] <= w)
        {
            ANS = max(ANS, j);
        }
    }
    cout << ANS << endl;
}
int32_t main(void)
{
    fastio;
    int __ = 1;
    // cin >> __;
    while (__--)
    {
        accio_ac();
    }
    return 0;
}


Measured memory_bytes: 82536
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string.h>
typedef long long ll;
#define MAX(x, y)	(((x) > (y))? (x) : (y))
#define MIN(x, y)	(((x) < (y))? (x) : (y))
#define ABS(x)		(((x) < 0)? (-1*(x)) : (x))
#define REPI(x,y)	for (int i=(x);i<(y);i++)
#define REPJ(x,y)	for (int j=(x);j<(y);j++)
#define MEMCLR(X)	memset((X),0,sizeof((X)))

using namespace std;
typedef pair<int, int> Point;
typedef vector<vector<Point>> Graph;

int i,j,X,Y,Z,ans;

int main() {
	cin >> X >> Y >> Z;
	
	cout << ((X-Z)/(Y+Z));
	
	return 0;
}


Measured memory_bytes: 256
#include<iostream>
#define R(i,n) for(int i=0;i<n;i++)
using namespace std;int a,H,W,A,c[10][10];main(){cin>>H>>W;R(i,10)R(j,10)cin>>c[i][j];R(k,10)R(i,10)R(j,10)c[i][j]=min(c[i][j],c[i][k]+c[k][j]);R(i,H)R(j,W){cin>>A;a+=c[A>=0?A:1][1];}cout<<a;}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef int64_t ll;
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define reps(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; --i)
#define ALL(v) (v).begin(), (v).end()
#define SZ(v) ((int)(v).size())
const int INF = 1e9;
const int MOD = 1e9 + 7;
const double PI = acos(-1);



int main(void) {
    char c;
    cin >> c;
    if (isupper(c))
        cout << "A" << endl;
    else
        cout << "a" << endl;
    return 0;
}

Measured memory_bytes: 3628
n, m, l = map(int, input().split())

A = [list(map(int, input().split())) for i in range(n)]
B = [list(map(int, input().split())) for i in range(m)]

for i in range(n):
    for j in range(l):
        ans = 0
        for k in range(m):
            ans += A[i][k] * B[k][j]
        print(ans, end='')
        if j == l-1:
            print()
        else:
            print(' ', end='')


Measured memory_bytes: 6560
#include <iostream>
#include <vector>
#include <map>
#include <utility>
#include <algorithm>
#include <cmath>
#include <cstdio>

#define REP(i,a,n) for(int i=a;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define vsort(v) sort(v.begin(),v.end())
#define asort(a,n) sort(a, a + n)
#define vi vector<int>
#define vd vector<double>

using namespace std;

int main(){
    ios::sync_with_stdio(false);
    int N;
    //vi vec;
    int i;
    int ans = 0;
    int tmp = 1;
    cin >> N;
    rep(j, N){
        cin >> i;
        if(i % 2 == 0){
            tmp = tmp * 2;
        }
    }
    
    ans = pow(3, N) - tmp;
    //cout << tmp << "\n";
    cout << ans << "\n";
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int64_t MAXN = 200010;
vector<int64_t> Count(MAXN, 0);

int main()
{
  int64_t N, a, b, res;
  cin >> N;
  vector<int64_t> A(N, 0);
  for (int64_t i = 0; i < N; i++)
  {
    cin >> a;
    A.at(i) = a;
    Count.at(a)++;
  }
  int64_t s = 0;
  for (int64_t i = 0; i <= N; i++)
  {
    s += (Count.at(i) * (Count.at(i) - 1)) / 2;
  }
  for (int64_t i = 0; i < N; i++)
  {
    b = Count.at(A.at(i));
    res = s - (b * (b - 1) / 2) + ((b - 1) * (b - 2) / 2);
    cout << res << endl;
  }
}


Measured memory_bytes: 5760
//
// Created by 10034 on 2020/7/29.
//

#include <iostream>
using namespace std;
int a[100010];
int nums[100010];
int main(){
    int n;
    long long sum=0;
    cin>>n;
    for(int i=1;i<=n;++i) cin>>a[i],nums[a[i]]++,sum+=a[i];
    int q;
    cin>>q;
    while(q--){
        int b,c;
        cin>>b>>c;
        if(nums[b]){
            sum=sum-b*nums[b]+c*nums[b];
//            nums[b]--;
            nums[c]+=nums[b];
            nums[b]=0;
        }cout<<sum<<endl;
    }



    return 0;
}

Measured memory_bytes: 3824
#include <cmath>
#include <iostream>
#include <stdio.h>
#include <string>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <set>
#include <limits.h>
#include <map>
#include <numeric>

namespace test {
	std::string to_string (char val) {
		return std::string (1, val);
		// return std::string{val};
	}
	//if( str.find ("r") != string::npos)
}

using namespace std;
typedef long long int llint;

int main (void) {
	int n,k; cin >> n >> k;
  	int result = k;
  	for(int i = 1; i<n; i++){
    	result *= k-1;
	}
  	cout << result << endl;
	return 0;
}

Measured memory_bytes: 256
#include <algorithm>
#include <iostream>
#include <string>
#include <random>
#include <cassert>
#include <cstring>
#include <chrono>
#include <cmath>

using namespace std;

typedef long long ll;
const double pi = 2 * asin(1.0);

int main()
{
  int n;
  ll l;
  cin >> n >> l;
  vector<ll> t(n);
  for (int i = 0; i < n; ++i) {
    int x;
    scanf("%d", &x);
    t[i] = x;
  }

  double sumX = 0.0;
  double sumY = 0.0;
  ll denom = 0;

  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      denom += n - 2;
      double angle1 = pi * (t[i] + t[j]) / l;
      double w1 = j - i - 1;
      double angle2 = pi * (t[i] + t[j] + l) / l;
      double w2 = n - 2 - w1;

      swap(w1, w2);

      sumX += w1 * cos(angle1) + w2 * cos(angle2);
      sumY += w1 * sin(angle1) + w2 * sin(angle2);
    }
  }

  sumX /= denom;
  sumY /= denom;

  sumX *= 3;
  sumY *= 3;

  printf("%.10lf %.10lf\n", sumX, sumY);

  return 0;
}


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

using namespace std;

#define REP1(i,n) for(int i=1, i##_len=(n); i<i##_len; ++i)
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define pow(x) x*x
#define ll long long
static const ll MAX = 1000000;
static const ll INFTY = 1e12;
static const ll MOD = 1000000007;

template < typename T > inline string toString( const T &a ) { ostringstream oss; oss << a; return oss.str(); };

struct edge {
    ll to, cost;
};

using Graph = vector<vector<int>>;
using _Graph = vector<vector<edge>>;


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

// 深さ優先探索
vector<bool> seen;
vector<int> colors;

int H, W, N;
int sx, sy, gx, gy; 
vector<vector<char>> field;
vector<vector<int>> dist;
//vector<pair<int, int>> gx, gy;
deque<pair<int, int>> que;

typedef vector<vector<int> > Matrix;

const int INF = 100000000;


int main() {

    int N;
    cin >> N;
    vector<pair<string, int>> r(N);
    set<string> str;
    REP(i, N){
        string s;
        int p;
        cin >> s >> p;
        r[i] = (make_pair(s, p));
        str.insert(s);
    }

    vector<pair<string, int>> res;

    for(auto itr = str.begin(); itr != str.end(); ++itr) {
        vector<int> ans;
        REP(i, N){
            if(*itr == r[i].first){
                ans.push_back(r[i].second);
            }
        }
        sort(ans.begin(), ans.end(), greater<int>());
        REP(i, ans.size()){
            string str_ = *itr;
            res.push_back(make_pair(str_, ans[i]));
        }
    }
    vector<int> flag(N, 1);
    REP(i, res.size()){
        REP(j, N){
            if(res[i].first == r[j].first && res[i].second == r[j].second ){
                if(flag[j] == 1){
                    cout << j+1 << endl;
                    flag[j] = 0;
                }
            }
        }
    }
  
}
/*
                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-`  ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ` : | |
     \  \ `-.   \_ __\ /__ _/   .-` /  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         pass System Test!
*/


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

int a[6];

class Dice{
  public:
   
    Dice(int aa, int bb, int cc, int dd, int ee, int ff){
        a[0] = aa;
        a[1] = bb;
        a[2] = cc;
        a[3] = dd;
        a[4] = ee;
        a[5] = ff;
    }
    
    void roll_N(int aaa, int bbb, int ccc, int ddd, int eee, int fff){
        a[0] = bbb;
        a[1] = fff;
        a[2] = ccc;
        a[3] = ddd;
        a[4] = aaa;
        a[5] = eee;
    }
    
    void roll_S(int aaa, int bbb, int ccc, int ddd, int eee, int fff){
        a[0] = eee;
        a[1] = aaa;
        a[2] = ccc;
        a[3] = ddd;
        a[4] = fff;
        a[5] = bbb;
    }
    
    void roll_E(int aaa, int bbb, int ccc, int ddd, int eee, int fff){
        a[0] = ddd;
        a[1] = bbb;
        a[2] = aaa;
        a[3] = fff;
        a[4] = eee;
        a[5] = ccc;
    }
    
    void roll_W(int aaa, int bbb, int ccc, int ddd, int eee, int fff){
        a[0] = ccc;
        a[1] = bbb;
        a[2] = fff;
        a[3] = aaa;
        a[4] = eee;
        a[5] = ddd;
    }
    
    void spin(int aaa, int bbb, int ccc, int ddd, int eee, int fff){
        a[0] = aaa;
        a[1] = eee;
        a[2] = ddd;
        a[3] = ccc;
        a[4] = bbb;
        a[5] = fff;  
    }
};

int main(){
    int A, B, C, D, E, F;
    int A2, B2, C2, D2, E2, F2;
    
    cin >> A >> B >> C >> D >> E >> F;
    cin >> A2 >> B2 >> C2 >> D2 >> E2 >> F2;
    
    Dice sai(A, B, C, D, E, F);
    Dice sai2(A2, B2, C2, D2, E2, F2);
    
    for(int i = 0; i < 2; i++){
        if((A == A2) && (B == B2) && (C == C2) && (D == D2) && (E == E2) && (F == F2))break;
        
        for(int j = 0; j < 5; j++){
            if(B == B2) break;
            
            sai.roll_N(A, B, C, D, E, F);
            A = a[0];
            B = a[1];
            C = a[2];
            D = a[3];
            E = a[4];
            F = a[5];
        }
        
        if(B != B2){
            sai.roll_E(A, B, C, D, E, F);
            A = a[0];
            B = a[1];
            C = a[2];
            D = a[3];
            E = a[4];
            F = a[5];
            
            for(int k = 0; k < 5; k++){
                if(B == B2) break;
            
                sai.roll_N(A, B, C, D, E, F);
                A = a[0];
                B = a[1];
                C = a[2];
                D = a[3];
                E = a[4];
                F = a[5];
            }
        }
        
        for(int j = 0; j < 5; j++){
            if(A == A2) break;
            
            sai.roll_E(A, B, C, D, E, F);
            A = a[0];
            B = a[1];
            C = a[2];
            D = a[3];
            E = a[4];
            F = a[5];
        }
        
        if((A == A2) || (B == B2) || (C == C2) || (D == D2) || (E == E2) || (F == F2)){
            sai.spin(A, B, C, D, E, F);
        }
    }
    
    if((A == A2) && (B == B2) && (C == C2) && (D == D2) && (E == E2) && (F == F2)){
            cout << "Yes" << endl;
        }
    
    else if((A == A2) || (B == B2) || (C == C2) || (D == D2) || (E == E2) || (F == F2)){
        cout << "No" << endl;
    }
}




Measured memory_bytes: 3104
N=int(input())
x=list(map(int,input().split()))
max=0
count=0
x.append(1000000001)

for i in range(N):
  if x[i]>=x[i+1]:
    count += 1
  else:
    if max<count:
      max=count
    count=0

print(max)  

Measured memory_bytes: 15020
'use strict'

const main = (INPUT) => {
  const input = INPUT.split('\n')
  const S = input[0]
  if (S.length === 2) {
    console.log(S)
  } else {
    console.log(S.split('').reverse().join(''))
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))


Measured memory_bytes: 29588
#include <bits/stdc++.h>
using namespace std;
int read();

int n;
long long f[1003][1003], s[2][1003][1003];
long long qry0(int i, int j) { return s[0][n][i] - s[0][j][i]; }
long long qry1(int i, int j, int k) {
    return s[1][n][j] - s[1][n][k] - s[1][i][j] + s[1][i][k];
}
int main() {
    n = read();
    for (int i = 1; i <= n; ++i)
        for (int j = 1; j <= n; ++j)
            if (i < j)
                s[0][i][j] = read();
            else if (i > j)
                s[1][i][j] = read();

    n += 2;
    for (int i = 1; i <= n; ++i)
        for (int j = 1; j <= n; ++j) {
            s[0][i][j] += s[0][i][j - 1] + s[0][i - 1][j] - s[0][i - 1][j - 1];
            s[1][i][j] += s[1][i][j - 1] + s[1][i - 1][j] - s[1][i - 1][j - 1];
        }

    for (int i = 0; i <= n; ++i) f[i][0] = qry0(i, 0);
    for (int i = 1; i <= n; ++i)
        for (int j = 1; j < i; ++j) {
            f[i][j] = 10000000000000000ll;
            for (int k = 0; k < j; ++k)
                f[i][j] = min(f[i][j], f[j][k] + qry1(i, j, k));
            f[i][j] += qry0(i, j);
        }

    printf("%lld\n", f[n][n - 1]);
    return 0;
}
const int _SIZE = 1 << 22;
char ibuf[_SIZE], *iS = ibuf, *iT = ibuf;
#define gc                                                         \
    (iS == iT ? iT = ((iS = ibuf) + fread(ibuf, 1, _SIZE, stdin)), \
     (iS == iT ? EOF : *iS++) : *iS++)
int read() {
    int x = 0, f = 1;
    char c = gc;
    while (!isdigit(c)) f = (c == '-') ? -1 : f, c = gc;
    while (isdigit(c)) x = x * 10 + c - '0', c = gc;
    return x * f;
}

Measured memory_bytes: 20864
n = [int(x) for x in input()]
op_cnt = len(n) - 1  # すき間の個数

for i in range(2 ** op_cnt):
    op = ["-"] * op_cnt  # あらかじめ ["-", "-", "-"] というリストを作っておく

    for j in range(op_cnt):
        if ((i >> j) & 1):
            op[op_cnt - 1 - j] = "+"  # フラグが立っていた箇所を "+" で上書き

    formula = ""

    for p_n, p_o in zip(n, op + [""]):  # 少々モヤッとする
        sum = str(p_n) + p_o
        formula += sum

    if eval(formula) == 7:
        print(formula + "=7")
        break

Measured memory_bytes: 3064
#include <bits/stdc++.h>
#include <cmath>
#include <numeric>
using namespace std;
#define rep(i,a,b) for(int64_t i=(a); i<(b); ++i) // a ≦ i < b 
#define Rrep(i,a,b) for(int64_t i=(a);i>=(b);--i) // reverse repeat. a から b まで減少．
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend() //逆イテレータ
#define RANGE(a,b,c) (a).begin()+b,(a).begin()+c // コンテナ a の 要素 b から c へのイテレータ
#define MOD 1000000007
#define INF 1000000000
typedef pair<int64_t, int64_t> PII;
typedef vector<int64_t> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef vector<PII> VP;

// まずは全探索，次にDP
// 偶奇，逆から，ソート，出現回数，出現位置，DP
// 余事象，包除
// データ構造
// 問題の特徴量
// 存在判定：構成方法，入力の特徴
// gcd, lcm ,素因数分解．
// 例外を十分に含む一般化．想像力の限界
// 小さい系から例示
// 始めは過剰に例示・場合分けしてもいい．各場合を確実に対処．
int main() {
cin.tie(0);
ios::sync_with_stdio(false);

int64_t N, A, B; cin >> N >> A >> B;
VI X(N); rep(i, 0, N) cin >> X[i];

// テレポートだと時間は順番によらない．
int64_t ans = 0;
rep(i, 0, N-1) {
    int64_t d = (X[i+1] - X[i]) * A;
    if (B <= d) ans += B;
    else ans += d;
}

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

// 境界，出力文字列 チェック



Measured memory_bytes: 1024
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
	int n; cin >> n;
	n *= 3;
	unsigned long long a[300010];
	for (int i = 0; i < n; i++)cin >> a[i];
	sort(a, a + n);
	unsigned long long sum = 0;
	for (int i = n / 3; i < n; i += 2){
		sum += a[i];
	}
	cout << sum << endl;
}

Measured memory_bytes: 2688
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <queue>
#include <cstring>
#include <vector>
#include <map>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <bitset>
#include <set>
#include <stack>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,k,n) for(int i=(k);i<(int)(n);i++)
#define all(i,n) (i),(i+n)

int dx4[4]={1,0,-1,0};
int dy4[4]={0,-1,0,1};
int dx8[8]={1,0,-1,1,-1,1,0,-1};
int dy8[8]={1,1,1,0,0,-1,-1,-1};
int dx9[9]={0,1,0,-1,1,-1,1,0,-1};
int dy9[9]={0,1,1,1,0,0,-1,-1,-1};

typedef pair<int, int> P;
typedef pair<string, int> SP;
typedef long long ll;
typedef pair<ll, ll> PLL;

const int INF = 1e9;
const ll LLINF = 1e18;
const int MAX_V = 1e6+1;
const ll mod = 1000000007;

// --------------------------------------
string s;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  cin >> s;

  ll dp[5] = {0};

  dp[0] = 1;
  REP(i, s.length()) {
    if(s[i] == 'A') dp[1] = (dp[1] + dp[0]) % mod;
    else if(s[i] == 'B') dp[2] = (dp[2] + dp[1]) % mod;
    else if(s[i] == 'C') dp[3] = (dp[3] + dp[2]) % mod;
    else {
      dp[3] = (dp[3] * 3) % mod;
      dp[3] = (dp[3] + dp[2]) % mod;
      dp[2] = (dp[2] * 3) % mod;
      dp[2] = (dp[2] + dp[1]) % mod;
      dp[1] = (dp[1] * 3) % mod;
      dp[1] = (dp[1] + dp[0]) % mod;
      dp[0] = (dp[0] * 3) % mod;
    }
  }

  cout << dp[3] << endl;
}


Measured memory_bytes: 512
x,y = (int(i) for i in input().split())
ans = 0
if x == 1:
    ans += 300000
    if y == 1:
        ans += 400000
elif x == 2:
    ans += 200000
elif x == 3:
    ans += 100000
if y == 1:
    ans += 300000
elif y == 2:
    ans += 200000
elif y == 3:
    ans += 100000
print(ans)

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

long long gcd(long long a,long long b)
{
    return b==0?a:gcd(b,a%b);
}
void solve(long long A, long long B)
{
    cout<<A/gcd(A,B)*B<<endl;
}

int main()
{
    long long A;
    scanf("%lld",&A);
    long long B;
    scanf("%lld",&B);
    solve(A, B);
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define REP(i,x,n) for(int i = x; i < n; i++)
#define MAX 100
#define INF 1000000001

int n,m;
int c[114514];

int main(void){
    cin >> n >> m;
    REP(i,0,m) {
        int a,b;
        cin >> a >> b;
        a++; b++;
        c[a]++; c[b]++;
    }
    
    auto ans = "YES";
    REP(i,1,n+1) {
        if (c[i] % 2 != 0) ans = "NO";
    }
 
    cout << ans << endl;

    

}

Measured memory_bytes: 640
#include<stdio.h>
 
int main()
{
  int t[4][14];
  int n, i,j,c;
  char m, d;
  for(i=0; i < 4; i++){
    for(j=0; j < 14; j++){
      t[i][j]=0;
    }
  }
 scanf("%d", &c);
  for(i = 0; i < c; i++){
    scanf("%c", &d);
    scanf("%c %d", &m, &n);
    if(m == 'S'){
      t[0][n] = 1;
    }
    else if(m == 'H'){
      t[1][n] = 1;
    }
    else if(m == 'C'){
      t[2][n] = 1;
    }
    else if(m == 'D'){
      t[3][n] = 1;
    }
  }
  for(j=1; j < 14; j++){
    if(t[0][j] != 1){
      printf("S %d\n", j);
    }
  }
 
 for(j=1; j < 14; j++){
    if(t[1][j] != 1){
      printf("H %d\n", j);
    }
  }
 
 for(j=1; j < 14; j++){
    if(t[2][j] != 1){
      printf("C %d\n", j);
    }
  }
 
 for(j=1; j < 14; j++){
    if(t[3][j] != 1){
      printf("D %d\n", j);
    }
  }
 return 0;
}



Measured memory_bytes: 2112
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * (n+1)

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n + 1) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())


N, M = map(int, input().split())
Uni= UnionFind(N)
for i in range(M):
    a, b = map(int, input().split())
    Uni.union(a, b)

ans = 0
for root in Uni.roots():
    ans = max(ans, Uni.size(root))
print(ans)

Measured memory_bytes: 18600
#include<iostream>
#include<vector>
using namespace std;
int main() {
    int n, sum = 0;
    cin>>n;
    vector<int> d(n);
    for (int i = 0; i < n; i++)
        cin>>d[i];
    for (int i = 0; i < n; i++)
        for (int j = i + 1; j < n; j++)
            sum += d[i] * d[j];
    cout<<sum;
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(ll i = 0; i < (n); ++i)
#define repA(i, a, n) for(int  i = a; i <= (n); ++i)
#define all(x) x.begin(), x.end()
#define sz(x) (int) (x).size()
#define fill(a) memset(a, 0, sizeof(a))
#define fst first
#define snd second
#define mp make_pair
#define pb push_back
#define endl '\n'
#define init(n) int n;cin>>n;int a[n];rep(i,n)cin>>a[i];
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<long long int> vll;
typedef vector<pii> vii;
ll p=1000000007;
ll const N=2e6+15;
ll fac[N];
ll invfac[N];
ll add(ll a,ll b){
    ll t=(a+b);
    if(t>=p)t-=p;
        return t;
}
ll sub(ll a,ll b){
    ll t=a-b+p;
    t=t%p;
    return t;
}
ll power(ll a,ll x){
    ll r=1;
    while(x!=0){
        if(x%2==1){
            r=r*a;r%=p;
        }
        a=a*a;a%=p;
        x=x/2;
    }
    return r;
}
ll mul(ll a,ll b){
    ll t=(a*b);
    if(t>=p)t%=p;
    return t;
}
ll divide(ll a, ll b){
    return mul(a,power(b,p-2));
}
ll ncr(ll n, ll r){
    if(n< r)return 0;
    return mul(fac[n],mul(invfac[n-r],invfac[r]));
}
ll calc(ll r,ll c){
    if(r<0||c<0)return 0;
    ll temp=0;
    ll r1=r,c1=c;
    while(1){
        if(r<0||c<0)break;
        temp=add(temp,ncr(r+c+1,c+1));
        r--;c--;
    }
    r=r1;c=c1;
    while(1){
        if(r<0||c<0)break;
        temp=add(temp,ncr(r+c+1,r+1));
        r--;c--;
    }
    cout<<temp<<endl;
    r=r1;c=c1;
    while(1){
        if(r<0||c<0)break;
        temp=sub(temp,ncr(r+c,r));
        r--;c--;
    }
    // if(r!=c)temp++;
    return temp%p;
}
int main() {
    
    cin.sync_with_stdio(0); cin.tie(0);
    cin.exceptions(cin.failbit);
    int T=1;
    // cin>>T;
    while(T--) {
        ll r1,r2,c1,c2;cin>>r1>>c1>>r2>>c2;
        fac[0]=1;
        for(ll i=1;i<N;i++){
            fac[i]=fac[i-1]*i;
            fac[i]%=p;
        }
        for(ll i=0;i<N;i++){
              invfac[i]=power(fac[i],p-2);
        }
        ll ans=0;
        for(ll i=r1;i<=r2;i++){
            ans=add(ans,ncr(i+c2+1,i+1));
        }
        c1--;
        for(ll i=r1;i<=r2;i++){
            ans=sub(ans,ncr(i+c1+1,i+1));
        }
        cout<<ans<<endl;
    }   
    return 0;   
}

Measured memory_bytes: 31488
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
const int INF = 1000000007;

 
int main(){
  cin.tie(nullptr);
  ios::sync_with_stdio(false);

  int N, M;
  cin >> N >> M;
  pair<int, int> P1[N], P2[M];
  rep(i, N){
    cin >> P1[i].first >> P1[i].second;
  }
  rep(i, M){
    cin >> P2[i].first >> P2[i].second;
  }
  for(int i=0;i<N;i++){
    int ans = 0;
    int mini = INF;
    for(int j=0;j<M;j++){
      int dis = abs(P1[i].first - P2[j].first) + abs(P1[i].second - P2[j].second);
      if(dis < mini){
        ans = j+1;
        mini = dis;
      }
    }
    cout << ans << endl;
  }
}

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

#define rep(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define rng(i, a, b) for (int (i) = (a); (i) < (b); (i)++)
#define rbf(i, v) for (auto& (i) : (v))
#define All(x) (x).begin(),(x).end()
#define cAll(x) (x).cbegin(),(x).cend()
#define COL(x) cout << x << endl
#define CO(x) cout << x
//#define int long long

template<typename T> inline constexpr auto square(T x) { return (x) * (x); }

typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef vector<PII> VP;

const int MOD = 1000000007;
const int INF = INT_MAX;

signed main()
{
	ULL N;
	cin >> N;

	ULL ans = N * (N - 1) / 2;

	COL(ans);

	return 0;
}

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

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

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

  int sw = 0;
  for (int i = 0; i < N; i++) {
    int minj = i;
    for (int j = i; j < N; j++) {
      if (A[j] < A[minj]) {
        minj = j;
      }
    }
    if (i != minj) {
      swap(A[i], A[minj]);
      sw++;
    }
  }
  trace(A, N);
  cout << sw << endl;
}



Measured memory_bytes: 3248
#include<stdio.h>
int main()
{
	int a,b,c,x,i,j,k,t=0;

	scanf("%d%d%d%d",&a,&b,&c,&x);

	for(i=0;i<=a;i++)
		for(j=0;j<=b;j++)
			for(k=0;k<=c;k++){
				if(i*500+j*100+k*50==x)
					t++;
			}
	printf("%d",t);
	return 0;
}

Measured memory_bytes: 128
import math
a, b, x = map(int, input().split())

if (a**2) * b / x >= 2:
    h = 2 * x / (a * b)
    theta = math.atan(b/h)
else:
    h = (b - (x / (a ** 2))) * 2
    theta = math.atan(h/a)

print(math.degrees(theta))

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

Measured memory_bytes: 128
#include<stdio.h>
int main(){
    int n,m,i;
    int a[1000000];
    
    scanf("%d %d",&n,&m);
    for(i = 0; i < m; i++) scanf("%d",&a[i]);
    
    for(i = 0; i < m; i++) n -= a[i];
    
    if(n < 0) printf("-1\n");
    else printf("%d\n",n);
    return 0;
}


Measured memory_bytes: 1756
#pragma region
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define vi vector<int>
#define vd vector<double>
#define vs vector<string>
#define repi(i, m, n) for(int i=(int)(m);i<(int)(n);i++)
#define rep(i, n) repi(i, 0, n)
#define revi(i, m, n) for(int i=(int)(m-1);i>=(int)(n);i--)
#define rev(i, n) revi(i, n, 0)
#define each(i, n) for(auto&& i: n)
#define sz(v) ((int)(v).size()) 
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define uniq(v) (v).erase(unique((v).begin(), (v).end()), (v).end());
#define dump(x) cerr << #x << " = " << x << endl
#define gcd __gcd
int lcm(int a, int b){return a / gcd(a, b) * b;}
const int INF = 1e18;
const int MOD = 1e9 + 7;
const double EPS = 1e-15;
const double PI = acos(-1);
int dig(int n){return (int)(log10(n) + 1);}
int abc(char x){return (int)(x)-(int)('a');} // 0~25
char abc(int x){return (char)(x+(int)('a'));} 
int ABC(char x){return (int)(x)-(int)('A');}
char ABC(int x){return (char)(x+(int)('A'));}
void solve();
signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(20);
	solve();
}
#pragma endregion

void solve() {
	int N; cin >> N;
	cout << (int)(pow(N, 3)) << endl;
}

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

const long long INF = 1LL << 60;

int main() {
    string S; cin >> S;
    int cnt = 0, ans = 0;
    for (int i = 0; i < S.size(); i++) {
        if (i % 2 == 0) {
            if (S.at(i) != '0') cnt++;
        } else {
            if (S.at(i) != '1') cnt++;
        }
    }
    for (int i = 0; i < S.size(); i++) {
        if (i % 2 == 0) {
            if (S.at(i) != '1') ans++;
        } else {
            if (S.at(i) != '0') ans++;
        }
    }
    ans = min(ans, cnt);
    cout << ans << endl;
}

Measured memory_bytes: 3700
N,K = map(int,input().split())

def Base_10_to_n(X, n):
    X_dumy = X
    out = ''
    while X_dumy>0:
        out = str(X_dumy%n)+out
        X_dumy = int(X_dumy/n)
    return out

print(len(Base_10_to_n(N,K)))

Measured memory_bytes: 38384
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define REP(i,a,b) for(int i=int(a);i<(int)b;++i)
#define Graph vector<vecctor<ll>>
#define pairs vector<pair<ll,ll>>
#define pb push_back



using namespace std;
using ll = long long;
const ll INF = 1e18;
const double PI = acos(-1);

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



int main(void)
{
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    
    int x;
    cin >> x;
    if(x >=30){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }



    return 0;
}


Measured memory_bytes: 3644
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int a=sc.nextInt();
		int b=sc.nextInt();
		int h=sc.nextInt();
		System.out.println((int)((double)(a+b)/2*h));
	}
}


Measured memory_bytes: 9680
#include <stdio.h>

int main(){
  int n;
  scanf("%d", &n);
  int a[n];
  int sum = 0;
  for(int i = 0; i < n; i++){
    scanf("%d", &a[i]);
    sum += a[i];
  }
  /*
  for(int i = 1; i < n; i++){
    printf("%d ", sum - 2 * a[i]);
  }
  printf("%d\n", sum - 2 * a[0]);
  */
  /*
  for(int i = 0; i < n; i++){
    int ans = sum;
    for(int j = 0; j < (n - 1) / 2; j++){
      ans -= 2 * a[(i + 2 * j + 1) % n];
    }
    printf("%d ", ans);
  }
  printf("\n");
  */
  int pro = sum;
  for(int i = 0; i < (n - 1) / 2; i++){
    pro -= 2 * a[(2 * i + 1) % n];
  }
  printf("%d ", pro);
  for(int i = 0; i < n - 1; i++){
    pro = 2 * a[i] - pro;
    printf("%d ", pro);
  }
  printf("\n");
  return 0;
}


Measured memory_bytes: 1664
#include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define rep2(j,n) for(int j = 0; j < (n); ++j)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define drep2(j,n) for(int j = (n)-1; j >= 0; --j)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define srep2(j,s,t) for (int j = s; j < t; ++j)
#define srep3(k,s,t) for (int k = s; j < t; ++k)
#define rng(a) a.begin(),a.end()
#define maxs(x,y) (x = max(x,y))
#define mins(x,y) (x = min(x,y))
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define pb push_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define uni(x) x.erase(unique(rng(x)),x.end())
#define snuke srand((unsigned)clock()+(unsigned)time(NULL));
#define show(x) cout<<#x<<" = "<<x<<endl;
#define PQ(T) priority_queue<T,v(T),greater<T> >
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define v(T) vector<T>
#define vv(T) v(v(T))
using namespace std;
typedef long long int ll;
typedef unsigned uint;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef set<int> S;
typedef queue<int> Q;
typedef queue<P> QP;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
inline int in() { int x; scanf("%d",&x); return x;}
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define dame { puts("-1"); return 0;}
#define yn {puts("YES");}else{puts("NO");}
  
int main() {
  int a,b,c;
  cin >> a >> b >> c;
  if(a + b == c || b + c == a || a + c == b) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}

Measured memory_bytes: 256
import java.util.*;
class Main {
  	static Scanner scan = new Scanner(System.in);
  	public static void main(String[] args) {
  		long N = scan.nextLong();
    	System.out.println(dogName(N));
  	}
 	private static String dogName(long N) {
    	String ans = "";
      	long temp = N;
      	while(temp > 0) {
            temp--;
            long rem = (temp % 26);
        	char cc = (char)('a' + rem);
          	ans = cc + ans;
          	temp /= 26;
        }
       return ans;
 	}
}

Measured memory_bytes: 39468
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<map>
#include<cstdio>
#include<stack>
#include<queue>
#include<fstream>
#include<cstring>
#include<deque>
#include<iomanip>
#include <numeric>
//#include<bits/stdc++.h>

using namespace std;
#define ok1 printf("ok1\n");
#define ok2 printf("ok2\n");
#define M 1000000000000000000LL
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(n);(i)--)
#define all(a) (a).begin(),(a).end()
#define reall(a) (a).rbegin(),(a).rend()
#define pb push_back
#define pf push_front
#define MIN(a,b) a=min((a),(b))
#define MAX(a,b) a=max((a),(b))
#define SIZE(v) (int)v.size()
#define Eunique(v) v.erase(unique(all(v)),v.end());
#define pvec(v) rep(i,v.size()){ cout << v[i] << " ";}
#define INF 0x3f3f3f3f
#define mset(m,v) memset(m,v,sizeof(m))

const double pi = acos(-1.0);

typedef vector<int> vi;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef deque<ll> dll;
typedef pair<ll, ll> P;
#define mod 1e9 + 7;
ll dx[4] = { 1,0,-1,0 }, dy[4] = { 0,1,0,-1 };

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





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

	ll a = 0, b = 0, c = 0, d, e, ans = 0, n, ret = M, m, x = 0, y = 0;
	//bool x = false;
	string s,t;
	cin >> s;
	rep(i, s.size()) {
		if (i % 2 == 0)
			t += s[i];
	}
	cout << t << endl;
	
	return 0;
}

Measured memory_bytes: 592
#include <iostream>

int main() {
  unsigned long long A,B;
  std::cin >> A >> B;
  auto as = A&1? A+1:A;
  auto be = B&1? B: B-1;
  auto num = be - as + 1;
  auto ans =(num/2)&1;
  if (A&1)
    ans ^= A;
  if((B&1) == 0)
    ans ^= B;
  std::cout << ans << std::endl;
  return 0;
}

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

using namespace std;
using ll = long long;
#define int long long

#define rep(i, a) for (int i = 0; (i) < (int)(a); (i)++)
#define reps(i, a, b) for (int i = (int)(a); (i) < (int)(b); (i)++)
#define rrep(i, a) for (int i = (int)a - 1; (i) >= 0; (i)--)
#define rreps(i, a, b) for (int i = (int)(a)-1; (i) >= (int)(b); (i)--)
#define mp(a, b) make_pair((a), (b))
#define pb(a) push_back((a))
#define all(v) (v).begin(), (v).end()
#define perm(v) next_permutation(all(v))
#define unique(v) \
	sort(all(v)); \
(v).erase(unique(all(v)), v.end())
#define cin(type, x) \
	type x;          \
cin >> x
#define true__ "yes"
#define false__ "no"
#define print(f)                  \
	if ((f))                      \
{                             \
	cout << (true__) << endl; \
}                             \
else                          \
{                             \
	cout << false__ << endl;  \
}
#define rs resize
#define cinv(v, n)             \
	do                         \
{                          \
	v.rs(n);               \
	rep(i, n) cin >> v[i]; \
} while (0);
#define rcinv(v, n)             \
	do                          \
{                           \
	v.rs(n);                \
	rrep(i, n) cin >> v[i]; \
} while (0);
	template <typename t>
inline t get()
{
	t val;
	cin >> val;
	return val;
}

void init();
void solve();

signed main()
{
	init();
	solve();
}

void init()
{
	vector<int> v;
	int ans[] = {1, 4, 7, 9};
	rep(i, 4) {
		int t;
		cin >> t;
		v.push_back(t);
	}
	sort(all(v));
	rep(i, 4) {
		if (ans[i] != v[i]) {
			cout << "NO" << endl;
			return;
		}
	}
	cout << "YES" << endl;
}

void solve()
{
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std ;
typedef long long ll ;
int main()
{
     ll x1,x2,x3,x4,x5;
     while(cin>>x1>>x2>>x3>>x4>>x5)
     {
         if(x1==0)
            cout<<"1"<<endl;
         else if(x2==0)
         cout<<"2"<<endl;
         else if(x3==0)
         cout<<"3"<<endl;
         else if(x4==0)
         cout<<"4"<<endl;
         else if(x5==0)
         cout<<"5"<<endl;
     }
     return 0;
}


Measured memory_bytes: 3572
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<math.h>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<string>
#include<cmath>
#include<set>
#include<stack>

using namespace std;
typedef unsigned long long ll;

map<string, int>ma;
vector<pair<int, string> >vec;

struct sortVec{
    bool operator()(string m1, string m2){
        return ma[m1]<ma[m2];
    }
}sv;

int main(){
    int n,p;
    while(cin>>n,n){
        ma.clear();
        vec.clear();
        string s;
        for(int i=0;i<n;i++){
            int day,time;
            cin>>s>>day>>time;
//            if(time>=2400){
//                day=(day+1)%7;
//                time-=2400;
//            }
            time=(time/100)*60+time%100+day*24*60;
            ma[s]=time;
            vec.push_back(make_pair(time,s));
        }
        sort(vec.begin(),vec.end());
        cin>>p;
        set<string>fav;
        for(int i=0;i<p;i++){
            cin>>s;
            fav.insert(s);
        }
        int p=-100000;
        bool m=false;
        int c=0;
        for(int i=0;i<n;i++){
            if(p+30>vec[i].first){
                if(fav.count(vec[i].second)){
                    if(m){
                        c=-1;
                        break;
                    }else{
                        m=true;
                        p=vec[i].first;
                    }
                }
            }else{
                c++;
                p=vec[i].first;
                m=fav.count(vec[i].second);
            }
        }
        cout<<c<<endl;
    ne:;
    }
    return 0;
}

Measured memory_bytes: 1304