akhauriyash/Code-Regression huggingface dataset:
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<sstream>
#include<cstdio>
#include<ctime>
#include<utility>
#include<cstdlib>
#include<iterator>
#include<queue>
#include<stack>
using namespace std;
typedef long long llong;
typedef unsigned long long ullong;
typedef unsigned int uint;
#define int long long
const int INF = 9223372036854775807;

namespace G {
}

vector<bool> MonSatDay(300001,false);
vector<int> primeMonSatDay;


vector<int> eratos(int n) {
	vector<int> v;

	for (int i = 2; i < MonSatDay.size(); ++i) {
		if (!MonSatDay[i]) continue;
		for (int j = i + i; j < MonSatDay.size(); j += i) {
			MonSatDay[j] = false;
		}
		v.push_back(i);
	}

	return v;
}



signed main() {
	for (int i = 0; i <= 300000; ++i) {
		if ((i % 7 == 1) || (i % 7 == 6)) {
			MonSatDay[i] = true;
		}
	}
	primeMonSatDay = eratos(300000);

	int n;
	cin >> n;
	while (n != 1) {
		int work = n;
		//?´??????°????§£
		vector<int> v;
		for (int i = 0; i < primeMonSatDay.size(); ++i) {
			if (n%primeMonSatDay[i] == 0) {
				v.push_back(primeMonSatDay[i]);
			}

		}
		cout << work << ":";
		for (auto ngo : v) {
			cout << " " << ngo;
		}
		cout << endl;
		cin >> n;
	}
	return 0;
}


Measured memory_bytes: 3228
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<functional>
#include<map>
#include<unordered_set> 
#include<cmath>
using namespace std;
long long p  = 998244353;
//long long p = 1000000007;
#define int long long
#define vel vector<long long>
#define vvel vector<vel>
#define rep(i,n) for(int i=0;i<n;i++)
#define sor(v) sort(v.begin(),v.end())
#define mmax(a,b) a=max(a,b)
#define mmin(a,b) a=min(a,b)
#define mkp make_pair
#define pin pair<int,int>
#define qin pair<int,pin>
#define V vector
#define Endl endl
#define veb vector<bool>
#define rev(s) reverse(s.begin(),s.end())
#define lower(h,val) lower_bound(h.begin(),h.end(),val)
#define upper(h,val) upper_bound(h.begin(),h.end(),val)
#define mint modint<998244353>
#define end_s(a) cout <<a<<endl;return 0
template <std::uint_fast64_t Modulus> class modint {
	using u64 = std::uint_fast64_t;

public:
	u64 a;

	constexpr modint(const u64 x = 0) noexcept : a(x % Modulus) {}
	constexpr u64 &value() noexcept { return a; }
	constexpr const u64 &value() const noexcept { return a; }
	constexpr modint operator+(const modint rhs) const noexcept {
		return modint(*this) += rhs;
	}
	constexpr modint operator-(const modint rhs) const noexcept {
		return modint(*this) -= rhs;
	}
	constexpr modint operator*(const modint rhs) const noexcept {
		return modint(*this) *= rhs;
	}
	constexpr modint operator/(const modint rhs) const noexcept {
		return modint(*this) /= rhs;
	}
	constexpr modint &operator+=(const modint rhs) noexcept {
		a += rhs.a;
		if (a >= Modulus) {
			a -= Modulus;
		}
		return *this;
	}
	constexpr modint &operator-=(const modint rhs) noexcept {
		if (a < rhs.a) {
			a += Modulus;
		}
		a -= rhs.a;
		return *this;
	}
	constexpr modint &operator*=(const modint rhs) noexcept {
		a = a * rhs.a % Modulus;
		return *this;
	}
	constexpr modint &operator/=(modint rhs) noexcept {
		u64 exp = Modulus - 2;
		while (exp) {
			if (exp % 2) {
				*this *= rhs;
			}
			rhs *= rhs;
			exp /= 2;
		}
		return *this;
	}
};
vel pa;
int root(int x) {
	if (pa[x] == -1) { return x; }
	int ans = root(pa[x]); pa[x] = ans;
	return ans;
}
void marge(int x, int y) {
	x = root(x);
	y = root(y);
	if (x != y) {pa[x] = y;}
}
signed main() {
	int n; cin >> n;
	vel l(n);
	rep(i, n) { cin >> l[i]; }
	sor(l);
	int ans = 0;
	rep(i, n) {
		rep(j, i) {
			if (l[j] * 2 > l[i]) {
				int st = upper_bound(l.begin(), l.end(), l[i] - l[j])-l.begin();
				ans += j - st;
			}
		}
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 256
#include"bits/stdc++.h"
//#include<bits/stdc++.h>
using namespace std;
#define print(x) cout<<x<<endl;
#define rep(i,a,b) for(int i=a;i<b;i++)
typedef long long ll;
//const int mod = 1e9 + 7;

int main() {
	string f,m,b;
	cin >> f >> m >> b;
	//char mid = s[1][0];
	print("A" << m[0] << "C");
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i ++)
#define rep1(i, n) for(int i = 1; i <= (int)(n); i ++)
#define MP make_pair

using namespace std;
typedef long long LL;
typedef pair<int, int> PII;

int n, MOD;
int dp0[2505][5005], dp1[2505][5005];

int main()
{
	scanf("%d%d", &n, &MOD);
	if(n == 2) {
		printf("3\n");
		return 0;
	}
	
	dp0[0][0] = 1;
	rep1(i, n / 2) for(int j = 0; j <= n; j ++)
	dp0[i][j] = (dp0[i - 1][j] + (j >= i ? dp0[i][j - i] : 0)) % MOD;
	dp1[0][0] = 1;
	for(int i = 2; i <= (n + 1) / 2; i ++) for(int j = 0; j <= n; j ++)
	dp1[i][j] = ((i >= 3 ? dp1[i - 1][j] : dp1[i - 2][j]) + (j >= i ? dp1[i][j - i] : 0)) % MOD;
	
	int ans = 0;
	for(int i = 0; i <= n; i ++) for(int j = 0; i + j <= n; j ++)
	ans = (ans + 1LL * dp0[n / 2][i] * dp1[(n + 1) / 2][j] % MOD * (n - i - j)) % MOD;
	printf("%d\n", ans);
	return 0;
}

Measured memory_bytes: 98048
N=int(input())
# https://qiita.com/snow67675476/items/e87ddb9285e27ea555f8
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

def test(a):
    ret=0
    c=1
    while True:
        if a<ret+c:
            break
        else:
            ret+=c
            c+=1
    return c-1

if N==1:
    print(0)
    exit()

a=factorization(N) 
ans=0
for p,q in a:
    ans+=test(q)
print(ans)

Measured memory_bytes: 9504
#include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<queue>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<map>
#include<complex>
#define INF 2147483647
#define llINF 9223372036854775807
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long

using namespace std;
int main(){
  int q;
  cin>>q;
  for(int i=0;i<q;i++){
    bool used[1000010]={};
    int n;cin>>n;
    used[n]=true;
    bool flag=true;
    int cnt=0;
    while(n>=10){
      int a=n;
      int keta=0;
      while(a>0){a/=10;keta++;}
      int kake=10;
      int ma=-1;
      for(int i=1;i<keta;i++){
	if(n%kake<kake/10){kake*=10;continue;}
	ma=max(ma,(n/kake)*(n%kake));
	kake*=10;
      }
      n=ma;
      cnt++;
      if(used[ma]){cout<<-1<<endl;flag=false;break;}
    }
    if(flag)cout<<cnt<<endl;
  }
  return 0;
}



Measured memory_bytes: 4060
#include <bits/stdc++.h>
 
#define st              first
#define nd              second
#define pb              push_back
#define lwb             lower_bound
#define upb             upper_bound
#define all(a)          (a).begin(), (a).end()
#define Reset(s, n)     memset(s, n, sizeof(s))
#define Sz(a)           int((a).size())
#define Max(a, b, c)    max(max((ll)(a), (ll)(b)), (ll)(c))
#define Min(a, b, c)    min(min((ll)(a), (ll)(b)), (ll)(c))
#define Unique(a)       (a).resize(unique(all(a)) - (a).begin())
#define bit(n, i)       (((n) >> (i)) & 1)
#define cntbit(n)       __builtin_popcountll(n)
 
using namespace std;
 
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
 
const int MOD = 1e9 + 7;
const ll INF = 1e18;
const ld PI = acos((ld) -1);
const ld EPS = 1e-12;
inline bool isPrime (ll x){ if(x <= 1) return 0; if(x <= 3) return 1; if (!(x % 2) || !(x % 3)) return 0; ll s = sqrt(1.0 * x) + EPS; for(ll i = 5; i <= s; i += 6){if (!(x % i) || !(x % (i + 2))) return 0;}return 1;}
inline ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
inline int inv(int a, ll p = MOD) {return fpow(a, p - 2, p);}
inline ll gcd(ll a, ll b) {ll r; while (b) {r = a % b; a = b; b = r;} return a;}
inline ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
inline void onbit(ll &a, int i){a |= 1LL << i;}
inline void offbit(ll &a, int i){onbit(a, i), a -= (1LL << i);}
 
const int N = 1e6 + 5;
 
ll n, m, k;
ll a[N], b[N];
 
void solve(){
   cin >> m >> n;
   for(int i = 0; i < n; i++){
      int x;
      cin >> x;
      m -= x;
   }
   cout << max(m, -1ll);
 
}
 
int main(){
   ios_base::sync_with_stdio(0);
   cin.tie(0); cout.tie(0);
   cout << fixed << setprecision(10);
   //    freopen("input.txt", "r", stdin);
   //    freopen("output.txt", "w", stdout);
   int query = 1;
   // cin >> query;
   int start = 1000 * clock() / CLOCKS_PER_SEC;
   while(query--) solve();
   cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC  - start << "ms\n";
}

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

using ll = long long;

const int max_N = 1e5 + 21;

int n,A[max_N];

ll f[max_N];

int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;++i){
		scanf("%d",A+i);
		f[i]=f[i-1]+(A[i]>>1);
		if(A[i]&1){
			int j=i-1;
			while(j&&(~A[j]&1)&&(A[j]>=2))--j;
			if(A[j]&1){
				ll tmp=0;
				for(int k=j;k<=i;++k)tmp+=A[k];
				f[i]=std::max(f[i],f[j-1]+(tmp>>1));
			}
		}
	}
	printf("%lld\n",f[n]);
	return 0;
}

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

using namespace std;

const int MOD=1e9+7;
//const int MOD=998244353;

const double PI=3.14159265359;




int main(){
    
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    
    int n;
    cin>>n;
    
    cout<<"Christmas ";
    for(int i=25; i>n; i--){
        cout<<"Eve ";
    }
    
    return 0;
}

Measured memory_bytes: 256
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#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>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#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>
#endif
using namespace std;

typedef long long ll;
//typedef pair<int,int> Pint;
typedef pair<ll, ll> P;
//typedef pair<ll, pair<ll, ll>> P;
//typedef tuple<int,int,int> T;
typedef vector<ll> vec;
typedef vector<vec> mat;
#define rep(i, n) for(ll i = 0; i < n; i++)
#define revrep(i, n) for(ll i = n-1; i >= 0; i--)
#define pb push_back
#define f first
#define s second
const ll INFL = 1LL << 60;//10^18 = 2^60
const int INF = 1 << 30;//10^9
const ll MOD = 1e9 + 7;
const double EPS = 1e-10;
//ll MOD  = 998244353;
vector<ll> dy = {0, 0, 1, -1, 1, 1, -1, -1, 0};
vector<ll> dx = {1, -1, 0, 0, 1, -1, 1, -1, 0};

ll max(ll a, ll b){return (a > b) ? a : b;}
ll min(ll a, ll b){return (a < b) ? a : b;}
ll pow_long(ll x, ll k){
  ll res = 1;
  while(k > 0){
    if(k % 2) res *= x;
    x *= x;
    k /= 2;
  }
  return res;
}

ll pow_mod(ll x, ll k){
  x %= MOD; x += MOD; x %= MOD;
  ll res = 1;
  while(k > 0){
    if(k % 2){
      res *= x; res %= MOD;
    }
    x *= x; x %= MOD;
    k /= 2;
  }
  return res;
}
ll inverse(ll x){return pow_mod(x, MOD - 2);};


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

ll lcm(ll x, ll y){return x / gcd(x, y) * y;};

int main(void){
  ll N;
  string s;
  string t;
  cin >> N >> s >> t;
  if(N >= s.size() + t.size()) cout << N << endl;
  for(ll l = N;;l++){//i文字
    vector<char> S(l, '#');
    rep(i, s.size()){
      S[i] = s[i];
    }
    bool can = 1;
    for(int i = l-t.size(); i < l; i++){
      if(S[i] == '#') continue;
      if(S[i] != t[i-l+t.size()]) can = 0;
    }
    if(can){
      cout << l << endl;
      return 0;
    }
  }
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, s, n) for (int i = (s); i < (int)(n); i++)
#define per(i, n, s) for (int i = (n-1); i >= (int)(s); i--)
#define all(x) (x).begin(),(x).end()
#define debug(x) cout<<#x<<": "<<x<<endl
using namespace std;
using ll = long long;
const ll MOD = 1e9+7;
const ll LINF = LLONG_MAX;
const int INF = INT_MAX;

int main(){
    string s; cin>>s;
    set<char> s1;
    set<char> s2;
    rep(i,0,s.size()){
        if(s[i]=='N') s1.insert(s[i]);
        if(s[i]=='S') s1.insert(s[i]);
        if(s[i]=='W') s2.insert(s[i]);
        if(s[i]=='E') s2.insert(s[i]);
    }
    if(s1.size()%2==0 and s2.size()%2==0){
        cout<<"Yes"<<endl;
    }else cout<<"No"<<endl;
}

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


int main(void) {
  int a, b;
  cin >> a >> b;

  if (a <= b) {
    cout << a << endl;
  } else {
    cout << a - 1 << endl;
  }
  
  return 0;
}

Measured memory_bytes: 3620
#include <iostream>
#include <queue>

using namespace std;

const int INF = 1e9;

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

	int ans[N], depth[N];
	for (int i = 0; i < N; i++){
		ans[i] = INF;
		depth[i] = INF;
	}
	depth[0] = 0;

	queue<int> q;
	q.push(0);
	while(!q.empty()){
		int temp = q.front();
		q.pop();

		for (int i = 0; i < v[temp].size(); i++){
			if(depth[v[temp][i]] > depth[temp] + 1){
				depth[v[temp][i]] = depth[temp] + 1;
				ans[v[temp][i]] = temp;
				q.push(v[temp][i]);
			}
		}
	}

	bool isok = true;
	for (int i = 1; i < N; i++){
		if(ans[i] == INF){
			isok = false;
		}
	}
	if(isok){
		cout << "Yes" << endl;
		for (int i = 1; i < N; i++){
			cout << ans[i] + 1 << endl;
		}
	} else {
		cout << "No" << endl;
	}
	return 0;
}


Measured memory_bytes: 10704
//naveen mall
#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pb               push_back
#define sz(c)            (int)c.size()
#define len(c)           (int)c.length()
#define vec              vector
#define int              long long int
#define all(c)           c.begin(), c.end()
#define rall(c)          c.rbegin(), c.rend()
#define trav(a,i)        for(auto i: a)
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define invect(v,n)       for(int i=0;i<n;i++ ){int arb;cin>>arb;v.pb(arb);}
#define inset(s,n)        fl(i,0,n){int aset;cin>>aset;s.insert(aset);}
#define display(c)        trav(c,i) cout<<i<<" ";cout<<"\n";
#define F                 first
#define S                 second
#define pii               pair<int,int>
#define PB                pop_back
#define endl              "\n"
#define what(x) cerr << #x << " is " << x << endl;
int sum() { return 0; }template<typename T,typename... Args>T sum(T a, Args... args) { return a + sum(args...); }
#define p   998244353

void solve()
{ 
  int a,b;
  cin>>a>>b;
  for(int i=1;i<=2000;i++)
       {
         float aa=i*0.08;
         float bb=i*0.1;
         if((int)floor(aa)==a and (int)floor(bb)==b)
             {cout<<i;
              return ;
            }
       }

  cout<<-1;

   
 }

  

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












Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int n, m, svm, f[2007], dep[2007], v[2007], son[6007][2], ans[2007], res;
bool vis[6007];
pair<int, int>pp[6007];
vector<pair<int, int> >e[2007], ask[2007];
int read()
{
	int num = 0;
	char c = getchar();
	while (c < '0' || c>'9')c = getchar();
	while (c >= '0' && c <= '9')num = num * 10 + c - '0', c = getchar();
	return num;
}
int dfs(int w, int fa)
{
	f[w] = fa;
	dep[w] = dep[fa] + 1;
	for (int i = 0, lim = e[w].size(); i < lim; i++)
		if (e[w][i].first != fa)
			v[e[w][i].first] = e[w][i].second, dfs(e[w][i].first, w);
	return 0;
}
int glca(int a, int b)
{
	if (dep[a] < dep[b])swap(a, b);
	while (dep[a] > dep[b])a = f[a];
	while (a != b)a = f[a], b = f[b];
	return a;
}
int gline(int w)
{
	vis[w] = 1;
	if (son[w][0])
	{
		if (pp[son[w][0]].first != pp[w].first)
		{
			swap(pp[son[w][0]].first, pp[son[w][0]].second);
			swap(son[son[w][0]][0], son[son[w][0]][1]);
		}
		if (pp[son[w][0]].first != pp[w].first)cout << "ERROR" << endl;
		gline(son[w][0]);
	}
	if (son[w][1])
	{
		if (pp[son[w][1]].second != pp[w].second)
		{
			swap(pp[son[w][1]].first, pp[son[w][1]].second);
			swap(son[son[w][1]][0], son[son[w][1]][1]);
		}
		if (pp[son[w][1]].second != pp[w].second)cout << "ERROR" << endl;
		gline(son[w][1]);
	}
	return 0;
}
int main()
{
	n = read();
	m = svm = read();
	for (int i = 1; i < n; i++)
	{
		int a = read(), b = read();
		e[a].push_back(make_pair(b, i));
		e[b].push_back(make_pair(a, i));
	}
	for (int i = 1; i <= m; i++)
	{
		int a = pp[i].first = read(), b = pp[i].second = read();
		ask[a].push_back(make_pair(b, i));
		ask[b].push_back(make_pair(a, i));
	}
	for (int t = 2; t <= n; t++)
	{
		int p = 0;
		for (int i = 1; i <= n && !p; i++)
			if (e[i].size() == 1)
				p = i;
		dfs(p, 0);
		for (int lp = ask[p].size(); lp > 1; lp -= 2)
		{
			pair<int, int>pa = ask[p][lp - 1];
			pair<int, int>pb = ask[p][lp - 2];
			int a = pa.first, b = pb.first;
			int lca = glca(a, b);
			while (lca != p)ans[v[lca]] += 2, lca = f[lca];
			int nxt = ++m;
			pp[nxt].first = a, pp[nxt].second = b;
			son[nxt][0] = pa.second, son[nxt][1] = pb.second;
			*find(ask[a].begin(), ask[a].end(), make_pair(p, pa.second)) = make_pair(b, nxt);
			*find(ask[b].begin(), ask[b].end(), make_pair(p, pb.second)) = make_pair(a, nxt);
			ask[p].pop_back();
			ask[p].pop_back();
		}
		int fa = e[p][0].first;
		if (ask[p].size() == 1)
		{
			ans[e[p][0].second]++;
			int pos = ask[p][0].first, val = ask[p][0].second, nxt = ++m;
			son[nxt][0] = val;
			pp[nxt].first = pos, pp[nxt].second = fa;
			*find(ask[pos].begin(), ask[pos].end(), make_pair(p, val)) = make_pair(fa, nxt);
			ask[fa].push_back(make_pair(pos, nxt));
		}
		e[fa].erase(find(e[fa].begin(), e[fa].end(), make_pair(p, e[p][0].second)));
		e[p].clear();
		ask[p].clear();
	}
	for (int i = m; i >= 1; i--)
		if (!vis[i])
			gline(i);
	for (int i = 1; i < n; i++)
		res += min(ans[i], 2);
	cout << res << endl;
	for (int i = 1; i <= svm; i++)
		printf("%d %d\n", pp[i].first, pp[i].second);
	return 0;
}

Measured memory_bytes: 640
// organize and work - Abhinav IIITA
#include <bits/stdc++.h>
using namespace std;
#define int long long 
void q1(){
	int a,b,c;
	cin>>a>>b>>c;
	a+=b;a+=c;
	if(a>=22)
	cout<<"bust\n";
	else
	cout<<"win\n";
}
void q2(){
	string s;	cin>>s;
	int c=0;
	int sp=s.size();
	for(int i=0;i<sp/2;++i)
	if(s[i]!=s[sp-1-i])
	c++;
	cout<<c;
}
int32_t main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	t=1;
	while(t--)
	q2();
	return 0;
}
	


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

typedef long long LL;
const LL mod=1e9+7;

LL frac(LL a){
    if (a==1) return 1;
    return ((-(mod/a)*(frac(mod%a)))%mod+mod)%mod;
}

LL fac[200010],inv[200010];

LL C(LL n,LL m){
    LL ans = ((fac[n] * inv[m] % mod) * inv[n - m]) % mod;
    //cout<<n<<" " << m <<endl;
    return ans;
}

int main(){
    LL h,w,a,b;
    cin>>h>>w>>a>>b;
    fac[0] = 1;
    for(int i = 1;i <= 200000;i ++) fac[i] = (LL)fac[i - 1] * i % mod;
    //inv[0]=inv[1]=1;
    //for(int i=2;i<=100000;i++)
    //    inv[i]=((-(mod/a)*(inv[mod%a]))%mod+mod)%mod;
    inv[200000] = frac(fac[200000]); inv[0] = 1;
    for(int i = 200000 - 1;i >= 1;i --) inv[i] = (LL)inv[i + 1] * (i + 1) % mod;
    LL ans=C(h+w-2,h-1);
    for(int i=1;i<=b;i++){
        //cout<<C(h-a+i-2,h-a-1)<< " " << C(w-i+a-2,a-1)<<endl;
        ans=((ans-(C(h-a+i-2,h-a-1)*C(w-i+1+a-2,a-1)%mod))%mod+mod)%mod;
    }
    printf("%lld\n",ans);
    return 0;
}


Measured memory_bytes: 3328
package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
	"strings"
)

//scanで一行づつ読み込む
var sc = bufio.NewScanner(os.Stdin)
var wtr = bufio.NewWriter(os.Stdout)
var N, ss, ans, A, B, C int

//sort
// array := []int{5, 1, 4, 2, 3}
// sort.Sort(sort.IntSlice(array))
// sort.Sort(sort.Reverse(sort.IntSlice(arr)))

func main() {
	// A := strings.Split(nextLine(), " ")

	X := strings.Split(nextLine(), " ")

	// Z := strings.Split(nextLine(), " ")
	// n, _ := strconv.Atoi(input[0])

	A, _ := strconv.Atoi(X[0])
	B, _ := strconv.Atoi(X[1])
	K, _ := strconv.Atoi(X[2])

	// K, _ := strconv.Atoi(X[2]) //strconv.ParseInt(X[2], 10, 64)

	// Y := strings.Split(nextLine(), " ")

	// q := make(que, 0)
	// taQue := make(tailAscQue, M)

	// ch := make(que, M)
	// mp := make(map[int]item, M)
	var ans = 0
	count := 0
	for i := 100; i > 0; i-- {
		if A%i == 0 && B%i == 0 {
			count++
		}

		if count == K {
			ans = i
			break
		}

	}

	/*文字列連結高速化
	初期化:buf := make([]byte, 0,N+1)
	連結:buf=append(buf,str)
	出力:string(buf)
	*/
	// sort.Sort(sort.Reverse(dp[M][N]))

	fmt.Fprintln(wtr, ans)
	_ = wtr.Flush()
}

// func dfs(dp []int, times int, arr []int) {
// 	if times >= N {
// 		ans = min(ans, calc(dp, arr))
// 		return
// 	}

// 	for i := 0; i < 4; i++ {
// 		dp[times] = i
// 		dfs(dp, times+1, arr)
// 	}
// }

type otosidama struct {
	x float64
	v string
}

type LR struct {
	l int
	r int
}

func chmax(a *string, b string) {
	if len(*a) < len(b) {
		*a = b
	} else if len(*a) == len(b) && *a < b {
		*a = b
	}
}

func gcd(a, b int) int {
	if b == 0 {
		return a
	}
	return gcd(b, a%b)
}

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}
func com(a, b int) int {

	if a > b {
		return 0
	}
	return 0 //abs(a - b)
}

func abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}
func sum(a []int) (sum int) {
	for _, num := range a {
		sum += num
	}
	return
}

type item struct {
	x int
	l int
	r int
}

type que []item

func (p *que) Len() int {
	return len(*p)
}

func (p *que) Swap(i, j int) {
	(*p)[i], (*p)[j] = (*p)[j], (*p)[i]
}

func (p *que) Less(i, j int) bool {

	// return p[i].point > p[j].point //p[i].x+p[i].y > p[j].x+p[j].y
	return (*p)[i].x > (*p)[j].x
}

func (p *que) Push(in item) {
	var tmp *que = new(que)
	*tmp = make(que, len(*p)+1)
	copy(*tmp, *p)
	*tmp = append(*tmp, in)
	*p = *tmp
	// p = append(p, in)
	sort.Sort(p)
}

func (p *que) Pop() item {
	res := (*p)[0]
	*p = (*p)[1:]
	return res
}

func (p *que) Peek() item {
	return (*p)[0]
}

type tailAscQue []item

func (p *tailAscQue) Len() int {
	return len(*p)
}

func (p *tailAscQue) Swap(i, j int) {
	(*p)[i], (*p)[j] = (*p)[j], (*p)[i]
}

func (p *tailAscQue) Less(i, j int) bool {

	return (*p)[i].r < (*p)[j].r
}

func (p *tailAscQue) Push(in item) {
	var tmp *tailAscQue = new(tailAscQue)
	*tmp = make(tailAscQue, len(*p)+1)
	copy(*tmp, *p)
	*tmp = append(*tmp, in)
	*p = *tmp
	sort.Sort(p)
}

func (p *tailAscQue) Pop() item {
	res := (*p)[0]
	*p = (*p)[1:]
	return res
}

func (p *tailAscQue) Peek() item {
	return (*p)[0]
}


Measured memory_bytes: 640
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(S: str):
    print([S[i] != S[::-1][i] for i in range(len(S))].count(True)//2)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    solve(S)

if __name__ == '__main__':
    main()


Measured memory_bytes: 2940
import java.util.Arrays;
import java.util.Scanner;

//Make a Sequence
public class Main{

	int[][][] a;
	int[][] z;
	int[][] move = {
			{0,0,1},
			{0,1,0},
			{1,0,0},
			{1,-1,0},
			{1,1,0},
			{1,0,1},
			{1,0,-1},
			{0,1,1},
			{0,1,-1},
			{1,1,1},
			{1,1,-1},
			{1,-1,1},
			{-1,1,1}
	};

	int seq(int x, int y, int z, int p){
		int max = 0;
		for(int k=0;k<13;k++){
			int r = 0;
			int nx = x, ny = y, nz = z;
			while(a[nx][ny][nz]==p){
				nx += move[k][0]; ny += move[k][1]; nz += move[k][2]; r++;
			}
			max = Math.max(max, r);
		}
		return max;
	}

	void run(){
		Scanner sc = new Scanner(System.in);
		for(;;){
			int n = sc.nextInt(), m = sc.nextInt(), p = sc.nextInt();
			if((n|m|p)==0)break;
			a = new int[n+2][n+2][n+2]; z = new int[n+1][n+1];
			for(int[]v:z)Arrays.fill(v, 1);
			int win = 0, step = 0, t = 1;
			for(int s=1;s<=p;s++){
				int x = sc.nextInt(), y = sc.nextInt();
				if(win!=0)continue;
				a[x][y][z[x][y]++] = t;
				for(int i=1;i<=n;i++)for(int j=1;j<=n;j++)for(int k=1;k<=n;k++){
					if(seq(i, j, k, t)>=m){
						win = t; step = s;
					}
				}
				t=t==1?2:1;
			}
			System.out.println(win==0?"Draw":win==1?"Black "+step:"White "+step);
		}
	}

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

Measured memory_bytes: 12000
N,M = map(int,input().split())
ab = []
for i in range(N):
  ab += [list(map(int,input().split()))]
ab.sort()
rest = M
cost = 0
while True:
  if rest - ab[0][1] <= 0:
    cost += rest * ab[0][0]
    break
  else:
    rest -= ab[0][1]
    cost += ab[0][0] * ab[0][1]
    del ab[0]
print(cost)

Measured memory_bytes: 27756
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""


x,k,d = m()

if abs(x) >= abs(d) * k:
    print(abs(x) - (abs(d) * k))
else:
    po = abs(x) // abs(d)
    if (k - po) % 2 == 0:
        print(abs(abs(x) - po*abs(d)))
    else: 
        popo = po + 1
        print(abs(abs(x) - popo*abs(d)))




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

const int N = 800;

int h, w, k;
string f[N];
int sx, sy;
int gone[N * N];
using P = pair<int, int>;

int calc(int y, int x) {
  int res = x;
  res = min(res, w-1-x);
  res = min(res, y);
  res = min(res, h-1-y);
  return res;
}

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

int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  cin >> h >> w >> k;
  for(int i = 0; i < h; i++) {
    cin >> f[i];
    for(int j = 0; j < w; j++) if(f[i][j] == 'S') sy = i, sx = j;
  }
  int m = calc(sy, sx);
  int ans = (m + k - 1) / k + 1;

  // BFS
  queue<P> q;
  // coordinate, steps 
  q.emplace(sy * N + sx, 0);
  gone[sy * N + sx] = 0;
  while(q.size()) {
    int c = q.front().first, d = q.front().second;
    q.pop();
    int y = c / N, x = c % N;
    if(d >= k) continue;
    for(int i = 0; i < 4; i++) {
      int nx = x + dx[i], ny = y + dy[i];
      if(nx < 0 || w <= nx || ny < 0 || h <= ny) continue;
      if(f[ny][nx] == '#') continue;
      if(gone[ny * N + nx]) continue;
      if(d + 1 > k) continue;
      gone[ny * N + nx] = 1;
      ans = min(ans, (calc(ny, nx) + k - 1) / k + 1);
      q.emplace(ny * N + nx, d + 1);
    }
  }
  cout << ans << endl;
}



Measured memory_bytes: 3456
#include <iostream>

using namespace std;

int a, b, c;
int main() {
    cin>>a>>b>>c;
    for(int i=0; i<2; i++){
        for(int j=0; j<2; j++){
            if((a*i+b*j)>=c){
                cout<<"Yes"<<endl;
                return 0;
            }
        }
    }
    cout<<"No"<<endl;
}


Measured memory_bytes: 256
#include <iostream>//cout<<right で右揃え
#include <iomanip>//cout<<setw(数字) で空白による桁揃え
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <algorithm>
#include <cstdlib>//abs()で整数絶対値
#include <cmath>//abs()かfabs()で少数絶対値
#include <functional>//sort第三引数greater<型名>()で降順
#include <map>

using namespace std;
using ll = long long int;

int main(){
    string S;cin>>S;
    string T;cin>>T;
    string t = T.substr(0,T.length()-1);
    if(t==S){
        cout << "Yes" << endl;
    }else{
        cout << "No" << endl;
    }
    return 0;
}

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

#define rep(i,n) for(long long i=0; i<(long long)(n);i++)
#define rep2(i,s,n) for(long long i=(s); i<(long long)(n);i++)

typedef long long ll;

const ll inf = 1e18+7;
const ll mod = 1e9+7;


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

    vector<int>h(n),dp(n);
    rep(i,n)cin>>h[i];

    dp[0]=0;
    dp[1]=abs(h[0]-h[1]);

    rep2(i,2,n){
        dp[i]=min(dp[i-2]+abs(h[i]-h[i-2]),
                dp[i-1]+abs(h[i]-h[i-1]));
    }

    cout<<dp[n-1]<<endl;


}


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

int main(){
    int n,k;
    cin >> n >> k;
    set<int> S;
    int d;
    int a;
    for(int i = 0;i<k;i++){
        cin >> d;
        for(int j = 0;j<d;j++){
            cin >> a;
            S.insert(a);
        }
    }

    cout << n-S.size() << endl;

}

Measured memory_bytes: 3632
#include <ctime>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
typedef long long ll;
#define rep(i, a, b) for (int i = a; i <= b; ++ i)
using namespace std;

ll n, x, ans;

void solve(ll a, ll b) {
	if (a < b) return solve(b, a);
	ll tmp = 2LL * (a / b);
	ans += tmp * b;
	if (a % b == 0LL) { ans -= b; return ; } 
	ans += 2LL * (a % b);
	solve(a % b, b - a % b);
}

int main() {
	scanf("%lld%lld", &n, &x);
	ans = n;
	solve(x, n - x);
	printf("%lld\n", ans);
	return 0;
}

Measured memory_bytes: 256
import Data.List;main=do{n<-readLn;k<-q n;q n>>=print.f k};m=sortOn;q n=m fst<$>mapM(const$map read.words<$>getLine>>= \[a,b]->pure(a::Int,b))[1..n];f u[]=0;f u((c,d):v)=case m snd[(a,b)|(a,b)<-u,a<=c,b<=d]of{[]->f u v;r->1+f(filter(/=last r)u)v}

Measured memory_bytes: 1020
#include <iostream>

int main(){
  int N, K;
  std::cin >> N >> K;
  if(K&1){
    std::cout << 0 << std::endl;
    return 0;
  }
  long long int dp[51][51][1251] = {};
  dp[0][0][0] = 1;
  for(int i = 1; i <= N; i++) for(int j = 0; j <= i; j++) for(int k = j; k <= K/2; k++) dp[i][j][k] = ((2*j+1)*dp[i-1][j][k-j] + (j+1)*(j+1)*dp[i-1][j+1][k-j] + ((j>0) ? dp[i-1][j-1][k-j] : 0)) % 1000000007;

  std::cout << dp[N][0][K/2] << std::endl;

  return 0;
}



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

int main() {
  int N;
  cin >> N;
  vector<int> num( N );
  for ( int i = 0; i < N; i++ )
     cin >> num.at( i );
  sort(num.begin(), num.end(), greater<>());
  int alice = 0, bob = 0;
  for ( int i = 0; i < N; i++ ) {
    if( i % 2 == 0 )
      alice += num.at( i );
    else
      bob += num.at( i );
  }
  cout << alice - bob << endl;
}


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

using namespace std;

using ll = long long;
constexpr ll MOD = 1e9 + 7;
constexpr ll INF = 1e18;

int main() {
    ll n, m, i, j, k;
    string s,t;
    cin >> s >> t;
    cin >> n >> m;
    string u;
    cin >> u;
    if(s==u){
        n--;
    }else m--;
    cout << n << " " << m;
    return 0;
}

Measured memory_bytes: 384
# -*- coding: utf-8 -*-

H,W,K = map(int, input().split())
x1,y1,x2,y2 = map(int, input().split())

C = [input() for _ in range(H)]
T = [[-1 for _ in range(W)] for _ in range(H)]
T[x1-1][y1-1] = 0

que = set([(x1-1,y1-1)])
step = 1

while len(que)>0:
  que_next = set()
  for q in que:
    x,y = q[0],q[1]
    for i in range(1,K+1):
      if x-i<0:
        break
      if C[x-i][y]=='@' or T[x-i][y]==1:
        break
      if x-i==x2-1 and y==y2-1:
        print(step)
        exit()
      que_next.add((x-i,y))
    for i in range(1,K+1):
      if x+i>H-1:
        break
      if C[x+i][y]=='@' or T[x+i][y]==1:
        break
      if x+i==x2-1 and y==y2-1:
        print(step)
        exit()
      que_next.add((x+i,y))
    for i in range(1,K+1):
      if y-i<0:
        break
      if C[x][y-i]=='@' or T[x][y-i]==1:
        break
      if x==x2-1 and y-i==y2-1:
        print(step)
        exit()
      que_next.add((x,y-i))
    for i in range(1,K+1):
      if y+i>W-1:
        break
      if C[x][y+i]=='@' or T[x][y+i]==1:
        break
      if x==x2-1 and y+i==y2-1:
        print(step)
        exit()
      que_next.add((x,y+i))
  que = que_next
  for q in que:
    T[q[0]][q[1]] = 1
  step += 1

print(-1)

Measured memory_bytes: 36196
#include<iostream>
#include<algorithm>
#include<math.h>
#include<queue>
#include<vector>
using namespace std;
int main() {

	//B
	string  s[100];
	//cin >> s >> t;
	int n;
	int p[100];
	cin >> n;
	int i;
	int num[100];
	for (i = 0; i < n; i++) {
		cin >> s[i] >> p[i];
		num[i] = i + 1;
	}

	string ss;
	int pp;
	int j;
	for (i = n-1; i > 0; i--) {
		for (j = 0; j < i; j++) {
			if (s[j] > s[j + 1]) {
				ss = s[j];
				s[j] = s[j + 1];
				s[j + 1] = ss;
				pp = p[j];
				p[j] = p[j + 1];
				p[j + 1] = pp;
				pp = num[j];
				num[j] = num[j + 1];
				num[j + 1] = pp;
			}
			else if((s[j] == s[j+1]) && (p[j] < p[j+1])){
				pp = p[j];
				p[j] = p[j + 1];
				p[j + 1] = pp;
				pp = num[j];
				num[j] = num[j + 1];
				num[j + 1] = pp;
			}
		}
	}
	for (i = 0; i < n; i++) {
		cout << num[i] << endl;
	}
	return 0;
	//if (s < t) {
	//	cout << s;
	//}
	//else {
	//	cout << t;
	//}
	return 0;

	//A

	/*int a, p;
	cin >> a >> p;
	p = p + a * 3;
	cout << (p - (p % 2)) / 2 << endl;
	return 0;*/



}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define int long long
int ans[100002];
signed main() {
    int N,K;
    cin >> N >> K;
    for(int i = 0; i < N; i++) {
        int a,b;
        cin >> a >> b;
        ans[a]+=b;
    }
    for(int i = 1; i <= 100000; i++) {
        if(K <= ans[i]) {
            cout << i << endl;
            return 0;
        }
        K-=ans[i];
    }
}

Measured memory_bytes: 1024
def main(n,a,b):
    if (1 <= n <= 20 )and (1 <= a <= 50) and (1 <= b <= 50) :
        sum_list = [n * a, b] 
    return min(sum_list)

if __name__ == '__main__':
    s = list(map(int, input().split()))
    huga = main(s[0],s[1],s[2])
    print(huga)

Measured memory_bytes: 3060
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    public static void main(String[] args) throws IOException{
        FastReader sc = new FastReader();
       int a = sc.nextInt();
       int b = sc.nextInt();
        System.out.println(a*b);
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


Measured memory_bytes: 32436
#include <bits/stdc++.h>
    #define rep(i,n) for(int i = 0; i < (n); i++)
     
    using namespace std;  
    
    
    
    int main() {
   
     int n;
     
     cin >> n;
     int one[3][10] = {0};//１棟
     int two[3][10] = {0};
     int three[3][10] = {0};
     int four[3][10] = {0};
     
     rep(i,n){
     int b,f,r,v;
     cin >> b >> f >> r >> v;
     if(b==1)	one[f-1][r-1]+=v;
     else if(b==2)	two[f-1][r-1]+=v;
     else if(b==3)	three[f-1][r-1]+=v;
     else	four[f-1][r-1]+=v;
     }
    
    for(int i = 0; i < 3; i++){
    	for(int j = 0; j < 10; j++){
    		cout << ' '<< one[i][j];
    		if(j==9)	cout << '\n';
    		
    	}
    }
      cout << "####################" << '\n';
      for(int i = 0; i < 3; i++){
    	for(int j = 0; j < 10; j++){
    		cout<< ' ' << two[i][j];
    		if(j==9)	cout << '\n';
    		
    	}
    }
    cout << "####################" << '\n';
    for(int i = 0; i < 3; i++){
    	for(int j = 0; j < 10; j++){
    		cout << ' '<< three[i][j];
    		if(j==9)	cout << '\n';
    		
    	}
    }
    cout << "####################" << '\n';
    for(int i = 0; i < 3; i++){
    	for(int j = 0; j < 10; j++){
    		cout << ' '<< four[i][j];
    		if(j==9)	cout << '\n';
    		
    	}
    }
      
     
     return 0;
    }


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

using namespace std;

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

    long long ans = 0;

    while(N >= 500){
        ans += 1000;
        N -= 500;
    }

    while(N >= 5){
        ans += 5;
        N -= 5;
    }

    cout << ans << endl;

}

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

int main() {
  vector<int64_t> l(90);
  l.at(0) = 2;
  l.at(1) = 1;
  repi(i,2,87) l[i] = l[i-1] + l[i-2];
  int N; cin >> N;
  cout << l[N] << endl;
  return 0;
}


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

int h,w,n;
char raw_map[30][32];
char map[30][32];
char del_flag[30][32];

int main(void) {
	int i,j;
	int a,b,c;
	int isyes;
	char temp;
	int exist,deleted;
	int prev;
	scanf("%d%d%d",&h,&w,&n);
	for(i=0;i<h;i++)scanf("%s",raw_map[i]);
	isyes=0;
	for(i=0;i<h && !isyes;i++) {
		for(j=1;j<w && !isyes;j++) {
			memcpy(map,raw_map,sizeof(map));
			temp=map[i][j];
			map[i][j]=map[i][j-1];
			map[i][j-1]=temp;
			while(1) {
				for(a=h-1;a>0;a--) {
					for(b=0;b<w;b++) {
						if(map[a][b]=='.') {
							for(c=a;c>=0;c--) {
								if(map[c][b]!='.') {
									map[a][b]=map[c][b];
									map[c][b]='.';
									break;
								}
							}
						}
					}
				}
				memset(del_flag,0,sizeof(del_flag));
				for(a=0;a<h;a++) {
					prev=0;
					for(b=0;b<w;b++) {
						if(map[a][b]!=map[a][prev]) {
							if(b-prev>=n) {
								for(c=prev;c<b;c++)del_flag[a][c]=1;
							}
							prev=b;
						}
					}
					if(w-prev>=n) {
						for(c=prev;c<w;c++)del_flag[a][c]=1;
					}
				}
				for(b=0;b<w;b++) {
					prev=0;
					for(a=0;a<h;a++) {
						if(map[a][b]!=map[prev][b]) {
							if(a-prev>=n) {
								for(c=prev;c<a;c++)del_flag[c][b]=1;
							}
							prev=a;
						}
					}
					if(h-prev>=n) {
						for(c=prev;c<h;c++)del_flag[c][b]=1;
					}
				}
				exist=deleted=0;
				for(a=0;a<h;a++) {
					for(b=0;b<w;b++) {
						if(map[a][b]!='.') {
							exist=1;
							if(del_flag[a][b]) {
								map[a][b]='.';
								deleted=1;
							}
						}
					}
				}
				if(!deleted) {
					if(!exist)isyes=1;
					break;
				}
			}
		}
	}
	puts(isyes?"YES":"NO");
	return 0;
}

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

int main() {
  string S;
  cin >> S;
  if(S == "abc" || S == "bca" || S == "cab" || S == "acb" || S == "bac" || S == "cba") {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}


Measured memory_bytes: 256
import math
import sys,collections
from sys import stdin, stdout  
#MAXN = 10000001

def get_ints(): return map(int, sys.stdin.readline().strip().split())
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_string(): return sys.stdin.readline().strip() 
def input(): return sys.stdin.readline().strip()
#spf = [0 for i in range(MAXN)] 
def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w') 
def is_subsequence(x, y):
    """Test whether x is a subsequence of y"""
    x = list(x)
    for letter in y:
        if x and x[0] == letter:
            x.pop(0)

    return not x    
def sieve(): 
	spf[1] = 1
	for i in range(2, MAXN): 
		spf[i] = i 
	for i in range(4, MAXN, 2): 
		spf[i] = 2

	for i in range(3, mt.ceil(mt.sqrt(MAXN))): 
		if (spf[i] == i): 
			for j in range(i * i, MAXN, i): 
				if (spf[j] == j): 
					spf[j] = i 
def getFactorization(x): 
	ret = list() 
	while (x != 1): 
		ret.append(spf[x]) 
		x = x // spf[x] 

	return ret 
def getFloor(A, x):

    (left, right) = (0, len(A) - 1)

    ind,floor = -1,-1
    while left <= right:
        mid = (left + right) // 2
        '''if A[mid] == x:
            return mid'''
        if x < A[mid]:
            right = mid - 1
        else:
            floor = A[mid]
            ind=mid
            left = mid + 1
            
    return ind
#file()
#sieve() 
mod=(10**9)+7

def main():
	a,b,c=get_ints()
	print(math.ceil(a/b)*c)

	





















	




















		
			


		

			

		





			

	























				

	















	

	










if __name__ == '__main__':
    main()

Measured memory_bytes: 9488
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <iomanip>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<string> VS;
typedef vector< vector<int> > VVI;
typedef vector< vector<ll> > VVL;
typedef pair<int,int> PII;
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define pb push_back
#define mp make_pair
#define ub upper_bound
#define lb lower_bound
 
int main(){
  string S;
  cin>>S;
  if(S[2]==S[3] and S[4]==S[5]) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int n,a,b;
int main()
{
 
 cin>>n;
 cin>>a>>b;
 string s="NG";
 for(int i=a;i<=b;i++)
 {
    if(i%n==0)
    {
      s="OK";
      break;
      
    }
 }
 
 
 cout<<s<<endl;
 return 0;
}


Measured memory_bytes: 3624
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define pi pair<int,int>
#define ff first
#define ss second
#define boost ios::sync_with_stdio(false);cin.tie(nullptr)
#include "string"
#define int long long


int32_t main() { 
   boost;
   int a,b;
   cin>>a>>b;
   cout<<a*b<<endl;
}

Measured memory_bytes: 3620
def inputs(s):
    li = s.split(" ")
    return(li)

def libra(li):
    left = int(li[0]) + int(li[1])
    right = int(li[2]) + int(li[3])
    if(left > right):
        print("Left")
    elif(left < right):
        print("Right")
    else:
        print("Balanced")

def main():
    s = input()
    li = inputs(s)
    libra(li)

if __name__ == '__main__':
    main()


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


int main() {
    int A, B, K; cin >> A >> B >> K;
    for(int i=0; i<K; i++){
        if(i%2 == 0){
            if(A%2) --A;
            A /= 2;
            B += A;
        }else{
            if(B%2) --B;
            B /= 2;
            A += B;
        }
    }
    cout << A << " " << B << endl;
    return 0;
}


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

int main(){
  int n,  i, *F;

  scanf("%d", &n);

  F = malloc(sizeof(int) * n);

  F[0] = 1;
  F[1] = 1;

  for(i=2; i<=n; i++){
    F[i] = F[i-1] + F[i-2];
  }

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

  return 0;
}

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

int main() {
    std::string s;
    std::cin >> s;
    int counter = 0;
    if (s[0] == '1'){ ++counter;}
    if (s[1] == '1'){ ++counter;}
    if (s[2] == '1'){ ++counter;}
    std::cout << counter << std::endl;
}


Measured memory_bytes: 256
n = int(input())

def dfs(s):#数字を文字列にしたｓを調べる
    if int(s) > n: #もし数値のsがnを超えたらストップ
        return 0
    ret = 1 if all(s.count(c) > 0 for c in "753") else 0#もしsが753数ならretを1に、そうでないなら0にする
    for i in "753":#再帰
        ret += dfs(s+i)#ret = ret + dfs(s+i)にするとわかりやすい
    return ret#retを返す

print(dfs("0"))

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

#define all(x) (x).begin(), (x).end()

signed main() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
#endif

    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int m, n;
    cin >> n >> m;
    int cnt = 0;
    int sum = 0;
    vector<int> v(n);
    for (int i = 0; i < n; ++i) {
        cin >> v[i]; sum += v[i];
    }
    for (auto i : v) {
        if (i * 4 * m >= sum) {
            ++cnt;
        }
    }
    if (cnt >= m) {
        cout << "Yes";
    } else {
        cout << "No";
    }
}


Measured memory_bytes: 256
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb emplace_back
#define INF (1e9+1)
//#define INF (1LL<<59)

#define Left second
#define Right first
class SEGMENTS{
private:
    map<int,int> dat;
    bool isInclude(int li, int ri, int L, int R){ return (L<=li && ri<=R); }
    
public:
    void erase(int l, int r){
        while(true){
            auto it = dat.upper_bound(l);
            if(it==dat.end() || r<=it->Left)break;
            
            int li = it->Left, ri = it->Right;
            dat.erase(it);

            if( !isInclude(li,ri,l,r) ){
                if( isInclude(l,r,li,ri) ){
                    if(li!=l) dat[l] = li;
                    if(r!=ri) dat[ri] = r;
                }else{
                    if(li<=l&&l<ri) ri = l;
                    if(l<=li&&li<r) li = r;
                    if(li!=ri) dat[ri] = li;
                }
            }
        }
    }
    
    void insert(int l, int r){
        while(true){
            auto it = dat.upper_bound(l);
            if(it==dat.end() || r<it->Left){
                if(dat.count(l)){
                    dat[r] = dat[l];
                    dat.erase(l);
                }
                else dat[r] = l;
                break;
            }
            
            if( isInclude(it->Left,it->Right,l,r) ) dat.erase(it);
            else{
                l = min(l,it->Left);
                r = max(r,it->Right);
            }
        }
    }
    
    int size(){ return dat.size(); }
    
    void output(){ for(auto e:dat)cout<<e.Left<<" "<<e.Right<<endl;cout<<endl; }
};

int main(){
    int n;
    cin>>n;
    string s;
    cin>>s;
    
    SEGMENTS st;
    
    for(int i=0;i<n;){
        if(s[i]=='0')i++;
        else{
            int l=i;
            while(i<n && s[i]=='1') i++;
            st.insert(l,i);
        }
    }
    
    int q;
    cin>>q;
    while(q--){
        int l,r,b;
        cin>>l>>r>>b;
        l--;
        
        if(b==0)    st.erase(l,r);
        else        st.insert(l,r);
        
        cout<<st.size()<<endl;
    }
}

Measured memory_bytes: 4248