akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  double p=0;
  if(n%2==0){
    p=n/2.0/n;}
  else {
    p=(n+1.0)/2.0/n;}
  cout << fixed << setprecision(15) << p << endl;
  return 0;
  }


Measured memory_bytes: 256
#include <bits/stdc++.h>
/*#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>*/
 
#define pll              pair <long long,long long>
#define pb               push_back
#define ll               long long
#define ff               first
#define ss               second
#define D(x)             cerr<<#x " = "<<(x)<<endl
#define vll              vector <ll>
#define IOS              ios_base::sync_with_stdio(0); cin.tie(NULL);
#define endl             '\n'   
using namespace std;
const ll N=2e6+1;
const ll MOD=1e9+7;
ll f[N];
///modulo version
ll binpow(ll a,ll b) {
if (b == 0)return 1;ll res = binpow(a, b / 2)%MOD;
if (b % 2)return ((res%MOD * res%MOD)%MOD * a%MOD)%MOD;else return (res%MOD * res%MOD)%MOD;}

ll inv(ll A)
{
    return binpow(A,MOD-2);
}
//modulo arithmetic
inline ll add(ll a, ll b)
{
	ll res = a + b;
	if(res >= MOD)
		return res - MOD;
	return res;
}

inline ll mult(ll a, ll b)
{
	ll  res = a;
	res *= b;
	if(res >= MOD)
		return res % MOD;
	return res;
}

inline ll sub(ll a, ll b)
{
	return (a%MOD-b%MOD+MOD)%MOD;
}
int main()
{
    IOS
 	// freopen("input.txt","r",stdin);
 	// freopen("output.txt","w",stdout);
 	// freopen("error.txt","w",stderr);
 	f[0]=1;
 	ll r1,c1,r2,c2;
 	cin>>r1>>c1>>r2>>c2;
 	for(ll i=1;i<=N;i++)
 	{
 		f[i]=f[i-1]%MOD*i;
 		f[i]%=MOD;
 	}
 	ll up=0LL;
 	for(ll i=r1;i<=r2;i++)
 	{
 		///r to r+c1-1
 		///r to r+c2
 		ll low = mult(f[i+c1],inv(mult(f[i+1],f[c1-1])));
 		ll high = mult(f[i+c2+1],inv(mult(f[i+1],f[c2])));
 		up=add(up,high);
 		up=sub(up,low);
 	}
 	cout<<up<<endl;
    return 0;
}

Measured memory_bytes: 15872
# cook your dish here
from collections import Counter
 
n = int(input())
a = list(map(int, input().split()))
a.sort()
a = a[::-1]
c = Counter(a)

res = 0
for x in a:
    b = 1
    while b <= x:
        b = b*2
    p = b-x
    if p in c.keys():
        if p == x and c[x] >= 2:
            c[x] = c[x] - 2
            res += 1
        elif p != x and c[x] > 0 and c[p] > 0:
            c[x] -= 1
            c[p] -= 1
            res += 1
    
print(res)

Measured memory_bytes: 33416
s = input()
n = len(s) + 1
s = '<' + s + '>'

unfixed = set()
a = [0 for i in range(n+2)]
a[0] = -1
a[-1] = -1

for i in range(n+2):
    if i == 0 or i == n + 1 or s[i-1:i+1] == '><':
        j = i-1
        while 1 <= j <= n:
            if s[j-1:j+1] == '>>':
                a[j] = a[j+1] + 1
                j -= 1
            else:
                unfixed.add(j)
                break
        j = i + 1
        while 1 <= j <= n:
            if s[j-1:j+1] == '<<':
                a[j] = a[j-1] + 1
                j += 1
            else:
                unfixed.add(j)
                break

for j in unfixed:
    a[j] = max(a[j-1], a[j+1]) + 1

print(sum(a[1:-1]))

Measured memory_bytes: 27960
#include "bits/stdc++.h"
using namespace std;
#define int long long int
#define endl "\n"
const int MOD=1e9+7;
#ifndef HOME
#define cerr if(0)cerr
#endif

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    string a,b;
    cin>>a>>b;
    int c = 0;
    for(int i=0;i<3;i++){
        c += a[i]==b[i];
    }
    cout<<c<<endl;
    return 0;
    
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
using P = pair<ll,ll>;
constexpr ll mod = 1e9+7;
#define ALL(x) (x).begin(),(x).end()
#define REP(i,n) for(ll (i)=0;(i)<(n);(i)++)
#define REPS(i,n) for(ll (i)=1;(i)<=(n);(i)++)
#define RREP(i,n) for(ll (i)=(n-1);(i)>=0;(i)--)
#define RREPS(i,n) for(ll (i)=(n);(i)>0;(i)--)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define F first
#define S second
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());

template<class T> inline void chmin(T& a, T b){
    if (a > b){
        a = b;
    }
}

template<class T> inline void chmax(T& a, T b){
    if (a < b){
        a = b;
    }
}

/* modとる */
inline ll modu(ll a){
    return(a % mod + mod) % mod;
}

/* 逆元(法mod = 1e9+7) */
ll modinv(ll a){
    ll b = mod, u = 1, v = 0;
    while (b){
        ll t = a / b;
        a -= t * b;
        swap(a, b);
        u -= t * v;
        swap(u, v);
        }
    return modu(u);
}

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout<<fixed<<setprecision(12);
    ll nijouwa = 0,wa = 0;
    ll N;
    cin >> N;
    vector<ll> A(N);
    REP(i,N)cin >> A[i];
    REP(i,N){
        nijouwa += A[i]*A[i];
        wa += A[i];
        nijouwa = modu(nijouwa);
        wa = modu(wa);
    }
    ll sum = modu(wa*wa - nijouwa);
    cout << modu(sum * modinv(2)) << "\n";
}

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

int main() {
    int n, m, x;
    cin >> n >> m >> x;
    vector<vector<ll>> a(n);
    vector<ll> c(n);
    ll ans = (1 << 29);
    for (int i = 0; i < n; i++) {
        cin >> c.at(i);
        a.at(i).resize(m);
        for (int j = 0; j < m; j++) {
            cin >> a.at(i).at(j);
        }
    }


    for (int i = 0; i < (1 << n); i++) {
        ll sum = 0;
        vector<ll> d(m);
        for (int j = 0; j < n; j++) {
            if ((i >> j) & 1) {
                for (int k = 0; k < m; k++) {
                    d.at(k) += a.at(j).at(k);
                }
                sum += c.at(j);
            }
        }

        bool flg = true;
        for (int k = 0; k < m; k++) {
            if (d.at(k) < x) {
                flg = false;
            }
        }
        if (flg) {
            ans = min(ans, sum);
        }
        
    }

    if (ans == (1 << 29)) {
        cout << -1 << endl;
    } else {
        cout << ans << endl;
    }

    return 0;
}

Measured memory_bytes: 3628
n = int(input())
h = list(map(int,input().split()))
j = h[0]

for i in range(1,n):
    if h[i] > j:
        h[i] -= 1
        j = h[i]
    else:
        pass

l = list(h)
l.sort()
if h == l:
    print('Yes')
else:
    print('No')

Measured memory_bytes: 20648
//#pragma GCC optimize ("O3")
//#pragma GCC target ("avx")
#include <stdio.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <cstdio>
#include <ctime>
#include <assert.h>
#include <chrono>
#include <random>
#include <numeric>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
using namespace std;
typedef long long int ll;
typedef unsigned long long ull;

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
    return (ull)rng() % B;
}

double dist(double x,double y){
	return sqrt(x*x+y*y);
}

vector<int> g[100100];
int d[100100];
int dd[100100];
bool is_not_prime[1000100];

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int n,m,s,t; cin >> n >> m >> s >> t;
	for(int i=0;i<n;i++){
		d[i]=dd[i]=1e9;
	}
	s--; t--;
	d[s]=0;
	dd[t]=0;
	while(m--){
		int x,y; cin >> x >> y;
		x--; y--;
		g[x].push_back(y);
		g[y].push_back(x);
	}
	for(int to:g[s]){
		for(int toto:g[to]){
			if(toto==t){
				printf("2\n");
				return 0;
			}
		}
	}
	queue<int> q;
	q.push(s);
	while(q.size()){
		int p=q.front(); q.pop();
		for(int to:g[p]){
			if(d[to]!=1e9)continue;
			d[to]=d[p]+1;
			q.push(to);
		}
	}
	q.push(t);
	while(q.size()){
		int p=q.front(); q.pop();
		for(int to:g[p]){
			if(dd[to]!=1e9)continue;
			dd[to]=dd[p]+1;
			q.push(to);
		}
	}
	const int N=1000100;
	vector<int> prime;
	for(int i=2;i<N;i++){
		if(!is_not_prime[i]){
			if(i!=2)prime.push_back(i);
			for(int j=i+i;j<N;j+=i){
				is_not_prime[j]=true;
			}
		}
	}
	if(d[t]%2){
		printf("%d\n",*lower_bound(prime.begin(), prime.end(),d[t]));
		return 0;
	}
	else{
		int res=1e9;
		for(int i=0;i<n;i++){
			for(int to:g[i]){
				if((d[i]+1+dd[to])%2){
					res=min(res,*lower_bound(prime.begin(), prime.end(),d[i]+dd[to]+1));
				}
			}
		}
		if(res==1e9)res=-1;
		printf("%d\n",res);
	}
}


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

int main() {
    ll a, b, k;
    cin >> a >> b >> k;
    if (a > k)
        cout << a - k << " " << b << endl;
    else
        cout << 0 << " " << max(0ll, b - (k - a)) << endl;
    return 0;
}

Measured memory_bytes: 256
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var Arr=(input.trim()).split("\n");
while(true){
   var n=Arr.shift()-0;
   if(n==0)break;
   var S=[];
   for(var i=0;i<n;i++){
   var arr=(Arr.shift()).split(" ").map(Number);
      var sum=arr.reduce(function(a,b){return a+b;});
      S.push(sum);
   }
   S.sort(function(a,b){return b-a;});
   console.log(S[0]+" "+S[S.length-1]);
}

Measured memory_bytes: 11056
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <unordered_map>
#include <vector>

using namespace std;

typedef long long lint;

const int maxn = 1e5;

int costs[maxn];
vector<int> adj[maxn];
bool mark[maxn];

void dfs(int v, vector<int> &cnt) {
  if (mark[v]) return;
  mark[v] = true;
  cnt.push_back(costs[v]);
  for (int u : adj[v])
    dfs(u, cnt);
}

int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; ++i)
    scanf("%d", &costs[i]);
  for (int i = 0; i < m; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    adj[a].push_back(b);
    adj[b].push_back(a);
  }
  vector<vector<int>> cnts;
  for (int i = 0; i < n; ++i)
    if (!mark[i]) {
      vector<int> cnt;
      dfs(i, cnt);
      cnts.push_back(cnt);
    }
  lint total_cost;
  if (cnts.size() <= 1) total_cost = 0LL;
  else {
    const int k = cnts.size();
    vector<int> available;
    total_cost = 0LL;
    for (vector<int> &cnt : cnts) {
      auto min_it = min_element(cnt.begin(), cnt.end());
      total_cost += *min_it;
      cnt.erase(min_it);
      available.insert(available.end(), cnt.begin(), cnt.end());
    }
    const int need = 2 * (k - 1) - k;
    if (need > (int)available.size()) total_cost = -1LL;
    else {
      nth_element(available.begin(), available.begin() + need, available.end());
      for (int i = 0; i < need; ++i)
        total_cost += available[i];
    }
  }
  if (total_cost == -1LL) printf("Impossible\n");
  else printf("%lld\n", total_cost);
  return 0;
}


Measured memory_bytes: 9524
#include<bits/stdc++.h>
using namespace std;
int main() {
	while (1) {
		int a, b;
		char c;
		cin >> a >> c >> b;
		if (c == '?')break;
		if (c == '+')cout << a + b << endl;
		else if (c == '-')cout << a - b << endl;
		else if (c == '*')cout << a * b << endl;
		else cout << a / b << endl;
	}
}


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

#define fo(i,s,t) for(int i = s; i <= t; ++ i)
#define fd(i,s,t) for(int i = s; i >= t; -- i)
typedef long long ll;
#define pb push_back

const int maxn = 200050;
const int inf = 1<<30;

int n, in[maxn], to[maxn];
bool v[maxn];
set<int> s[maxn];
vector<int> loop, candidate;

void go(int x)
{
	v[x] = true;
	fo(i,0,inf) if(s[x].find(i)==s[x].end()){s[to[x]].insert(i); break;}
	if(!(-- in[to[x]])) go(to[x]);
}
int main()
{
	scanf("%d",&n);
	fo(i,1,n) {int x; scanf("%d",&to[i]); in[to[i]] ++;}
	fo(i,1,n) if(!in[i] && !v[i]) go(i);
	fo(i,1,n) if(!v[i]) 
	{
		int now = i; 
		while(1)
		{
			loop.pb(now);
			now = to[now];
			if(now == i) break;
		}
		break;
	}
	for(int i = 0; candidate.size()<2; ++ i)
		if(s[loop[0]].find(i)==s[loop[0]].end())
			candidate.pb(i);
	fo(i,0,1)
	{
		in[0] = candidate[i];
		fo(j,1,loop.size()-1)
		{
			fo(k,0,inf)
				if(in[j-1]!=k&&s[loop[j]].find(k)==s[loop[j]].end())
				{
					in[j] = k;
					break;
				}
		}
		if(i==0&&in[loop.size()-1]!=in[0]) return 0*printf("POSSIBLE\n");
		if(i&&in[loop.size()-1]==candidate[0]) return 0*printf("POSSIBLE\n");
	}
	printf("IMPOSSIBLE\n");
	return 0;
}


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

using namespace std;

typedef long long int ll; 

int main(void)
{
	ll n;
	char arr[4001];
	cin >> n >> arr;

	ll r[4001],g[4001],b[4001];
	ll ri=0,gi=0,bi=0;

	for(ll i=0;i<strlen(arr);i++)
	{
		if(arr[i] == 'R')
			r[ri++] = i;
		else if(arr[i] == 'G')
			g[gi++] = i;
		else if(arr[i] == 'B')
			b[bi++] = i;
	}

	ll ans = ri*gi*bi;

	// for(ll i=0;i<strlen(arr);i++)
	// 	cout << i << ": " << arr[i] << endl;

	for(ll i=0;i<ri;i++)
	{
		// ll red = arr[r[i]];
		for(ll j=0;j<gi;j++)
		{
			ll idx_bigger = 2*max(r[i],g[j]) - min(r[i],g[j]);
			ll idx_smaller = 2*min(r[i],g[j]) - max(r[i],g[j]);
			ll idx_mid = r[i]+g[j]; // div by 2 check if float

			if(idx_bigger<n && binary_search(b,b+bi,idx_bigger))
			{	
				ans--;
				// cout << "bigger: " <<r[i] << " " << g[j] << " " << idx_bigger << endl;
			}
			if(idx_smaller>=0 && binary_search(b,b+bi,idx_smaller))
			{	
				ans--;
				// cout << "smaller: " <<r[i] << " " << g[j] << " " << idx_smaller << endl;

			}
			if(idx_mid%2==0 && binary_search(b,b+bi,idx_mid/2))
			{	
				ans--;
				// cout << "mid: " <<r[i] << " " << g[j] << " " << idx_mid/2 << endl;

			}
		}
	}
	cout << ans << endl;



	return 0;
}

Measured memory_bytes: 3652
#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
//#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void _main()
{
    int N;
    cin >> N;
    vector<int> H(N);
    rep(i, 0, N) cin >> H[i];
    int ans = 0;
    rep(i, 0, N)
    {
        bool ok = true;
        rrep(j, i - 1, 0)
        {
            if (H[j] > H[i])
            {
                ok = false;
                break;
            }
        }
        if (ok) ++ans;
    }
    cout << ans << endl;
}


Measured memory_bytes: 256
#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
using namespace std;

int main() {
	int q = 0;
	while (1) {
		double n;
		double date[1000];
		double sum = 0;
		double var = 0;
		string haki;
		cin >> n;
		getline(cin, haki);
		if (n == 0)break;
		for (int i = 0; i < n; i++) {
			cin >> date[i];
			sum += date[i];
		}
		double ave = sum / n;
		for (int i = 0; i < n; i++) {
			var += pow(date[i] - ave, 2);
		}
		cout << fixed << pow(var / n, 0.5) << endl;
		q++;
		if (q > 10)break;

	}
	return 0;
}



Measured memory_bytes: 3476
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	int N = sc.nextInt();
	
	String S, T;
	S = sc.next(); 
	T = sc.next();

	char[] c_S = S.toCharArray();
	char[] c_T = T.toCharArray();

	String ans = String.valueOf(c_S[0]) + String.valueOf(c_T[0]);
	for (int i = 1; i < N; i++) {
	    ans += String.valueOf(c_S[i]);
	    ans += String.valueOf(c_T[i]);
	}

	System.out.println(ans);
    }
}

Measured memory_bytes: 21716
/*input
1
1

*/
 
/*
                                                    ______________
                                                          |       )
                                                          |   )   /
                                                          |______/
                                                    |     |      \
                                                    |     |   )   \
                                                    |_____|_______)
 
*/
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <queue>
#include <bitset>
#include <iomanip>
#include <fstream>
#include <stack>

using namespace std;
 
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> PII;
typedef pair<ll , ll> PLL;
typedef long double ld;
 
#define pb push_back
#define all(c) c.begin(),c.end()
#define allr(c) c.rbegin(),c.rend()
int mod = 1000000007;
const int inf = 1034567891;
const ll LL_INF = 1234567890123456789ll;
#define PI 3.14159265
#define endl '\n'
#define F first
#define S second
#define debug(x) cout << #x << " = " << x << endl;
#define TRACE
 
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
  cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
  const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif
 
#define out(container) for (auto it : container) cout << it << " "; cout << endl;
 
 
template < typename T > T GCD(T a, T b)            { ll t; while(a) { t = a; a = b % a; b = t; } return b; }
template < typename T > string toString(T a)       { return to_string(a); }
template < typename T > void toInt(string s, T &x) { stringstream str(s); str >> x;}
inline int add(int x, int y){ x += y; if(x >= mod) x -= mod; return x;}
inline int sub(int x, int y){ x -= y; if(x < 0) x += mod; return x;}
inline int mul(int x, int y){ return (x * 1ll * y) % mod;}
inline int powr(int a, ll b){
  int x = 1 % mod;
  while(b){
    if(b & 1) x = mul(x, a);
    a = mul(a, a);
    b >>= 1;
  }
  return x;
}
inline int inv(int a){ return powr(a, mod - 2);}

int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  
  int r;
  cin >> r;
  cout << fixed << setprecision(15) << 2 * (22.0 / 7.0) * r << endl;

  return 0;
}

Measured memory_bytes: 3800
#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 mp(x,y) 	     make_pair(x,y)
#define all(c)           c.begin(), c.end()
#define rall(c)          c.rbegin(), c.rend()
#define trav(a,i)        for(auto& i: a)
#define loop(n,i,a)      for(int i=a;i<n;i++)
#define invect(v,n)       for(int i=0;i<n;i++ ){int arb;cin>>arb;v.pb(arb);}
#define inset(s,n)        loop(n,i,0){int aset;cin>>aset;s.insert(aset);}
#define display(c)        trav(c,i) cout<<i;
#define F                 first
#define S                 second
#define pii               pair<int,int>
#define pp               pop_back
#define endl              "\n"
#define copy(a,b)         copy(all(a),back_inserter(b));
#define intersect(a,b,w)    set_intersection(a.begin(), a.end(),b.begin(), b.end(),back_inserter(w));
#define union(a,b,w)      set_union(a.begin(), a.end(),b.begin(), b.end(),back_inserter(w));
#define diff(a,b,w)       set_difference(a.begin(), a.end(),b.begin(), b.end(),back_inserter(w));
#define symdiff(a,b,w)    set_symmetric_difference(a.begin(), a.end(),b.begin(), b.end(),back_inserter(w));
//int m=10000009;
//int arr[100000];
#define M 					1000000007 
int isprime(int n)
{
        if(n<=1) return 0;
        if(n<=3) return 1;
        if(n%2==0 ||n%3==0)
        return 0;
    for(int i=5;i*i<=n;i+=6)
    {
        if(n%i==0||n%(i+2)==0)
        return 0;
    }
    return 1;
}
#define PI 3.1415926535
signed main(){
				fast
				//	freopen("input.txt","r",stdin);
				//	freopen("output.txt","w",stdout);
				int a,b,x;
				cin>>a>>b>>x;
				if(a*a*b <= 2*x )
				cout<< setprecision(20) << atan(2*(a*a*b - x)*(1.0) / (a*a*a)) * 180 / PI;
				else {
					cout<< setprecision(20) << 90 - (atan(2*x*(1.0) / (a*(b*b))) * 180 / PI);
				}
			}
			
				
		
		 
		 


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

#include <iostream>
#include <vector>
// #include <map>
// #include <string>
// #include <algorithm>
// #include <numeric>
// #include <limits>

using namespace std;

int main() {
	int a, b;
	cin >> a >> b;
	cout << a * b << " " << 2 * (a + b) << endl;
	return 0;
}



Measured memory_bytes: 3100
/*
 _____ _             _              _           _ 
|_   _| |__   ___   / \   _ __  ___| |__  _   _| |
  | | | '_ \ / _ \ / _ \ | '_ \/ __| '_ \| | | | |
  | | | | | |  __// ___ \| | | \__ \ | | | |_| | |
  |_| |_| |_|\___/_/   \_\_| |_|___/_| |_|\__,_|_|                                                

*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp>
#define ll          long long
#define pb          push_back
#define ppb         pop_back
#define	endl		'\n'
#define mii         map<ll,ll>
#define msi         map<string,ll>
#define mis         map<ll, string>
#define rep(i,a,b)    for(ll i=a;i<b;i++)
#define repr(i,a,b) for(ll i=b-1;i>=a;i--)
#define trav(a, x) 	for(auto& a : x)
#define pii         pair<ll,ll>
#define vi          vector<ll>
#define vii         vector<pair<ll, ll>>
#define vs          vector<string>
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define sz(x)       (ll)x.size()
#define hell        1000000007
#define lbnd        lower_bound
#define ubnd        upper_bound
#define max(a,b)	(a>b?a:b)
#define min(a,b)	(a<b?a:b)

/*	For Debugging	*/
#define DEBUG 		cerr<<"\n>>>I'm Here<<<\n"<<endl;
#define display(x) trav(a,x) cout<<a<<" ";cout<<endl;
#define what_is(x)  cerr << #x << " is " << x << endl;

std::mt19937_64 rng(std::chrono::steady_clock::now().time_since_epoch().count());
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update> 
#define TIME        cerr << "\nTime elapsed: " << setprecision(5) <<1000.0 * clock() / CLOCKS_PER_SEC << "ms\n";
#define DECIMAL(n)  cout << fixed ; cout << setprecision(n);
#define FAST ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace __gnu_pbds;
using namespace std;
#define PI 3.141592653589793
#define N  100005
ll dp[N][2];
vi a[N];
ll fun(ll node,bool f,ll pr)
{
	if(dp[node][f]!=-1)
		return dp[node][f];
	ll ans=1;
	for(auto i:a[node])
	{
		if(i!=pr)
		{
			if(f)
			{
				ans=(ans*((fun(i,0,node)+fun(i,1,node))%hell))%hell;
			}
			else
			{
				ans=(ans*((fun(i,1,node))%hell))%hell;
			}
		}
	}
	dp[node][f]=ans;
	return ans;
}
void solve()
{
	ll n;
	cin>>n;
	ll x,y;
	rep(i,1,n)
	{
		cin>>x>>y;
		a[x].pb(y);
		a[y].pb(x);
	}
	rep(i,1,n+1)
	{
		rep(j,0,2)
		dp[i][j]=-1;
	}
	cout<<(fun(1,0,-1)+fun(1,1,-1))%hell;
	return;
}
int main()
{
	FAST
	int TESTS=1;
//	cin>>TESTS;
	while(TESTS--)
	{
		solve();
	}
	TIME
	return 0;
}

Measured memory_bytes: 15616
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

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

int main() {
  string s,t;
  cin>>s>>t;
  
  int n=s.size();
  s=s+s;
  
  bool b=false;
  rep(i,n){
    bool c=true;
    for(int j=0;j<n;j++){
      if(s[j+i]!=t[j]) c=false;
    }
    if(c) b=true;
  }
  if(b) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;
  
  return 0;
}

Measured memory_bytes: 3564
using System;

class A{
  static void Main(){
    int[] Ar = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
    int N = Ar[0];
    int K = Ar[1];
    int[] h = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
    int c = 0;
    for (int i = 0; i < h.Length; i++){
      if (h[i] >= K) c++;
      else ;
    }
    Console.WriteLine(c);
  }
}

Measured memory_bytes: 18016
A = sorted([int(x) for x in input().split()])
count = 0
for x in range(A[2] - A[1]):
 count += 1
 A[0] += 1
 A[1] += 1
for x in range((A[2] - A[0])//2):
 count += 1
 A[0] += 2
print(count if A.count(A[0]) == 3 else count+2)


Measured memory_bytes: 3060
N,K=map(int,input().split())
S=input()
L=[0]
#even:1
#odd:0
tmp="1"
for i in range(N):
    if tmp!=S[i]:
        L.append(1)
    else:
        L[-1]+=1
    tmp=S[i]

if tmp=="0":
    L.append(0)


M=len(L)
## 1しか無い場合は長さを出力して終わり
if M<=2*K+1:
    print(N)
    exit()


X=[0 for i in range(M+1)]
for i in range(M):
    X[i+1]=L[i]+X[i]


ans=0
for i in range(0,M-2*K,2):
    #print(X[i],X[i+2*K+1])
    ans=max(ans,X[i+2*K+1]-X[i])
print(ans)

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

int main() {
  int A, B, C, D;
  cin >> A >> B >> C >> D;
  if (A<1 || A>10 || B<1 || B >10 ||
      C<1 || C>10 || D<1 || D>10){
    return 0;
  }
  if ((A+B) > (C+D)){
    cout << "Left";
  }
  else if ((A+B) == (C+D)){
    cout << "Balanced";
  }
  else{
    cout << "Right";
  }
  cout << endl;
  return 0;
}

Measured memory_bytes: 256
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int n = in.nextInt();
            long mod = 1000000007;
            long ans = 1;
            for (long i = 2; i <= n; i++)
                ans = (ans * i) % mod;
            out.println(ans);
        }

    }

    static class FastScanner {
        private InputStream in;
        private byte[] buffer = new byte[1024];
        private int bufPointer;
        private int bufLength;

        public FastScanner(InputStream in) {
            this.in = in;
        }

        private int readByte() {
            if (bufPointer >= bufLength) {
                if (bufLength == -1)
                    throw new InputMismatchException();

                bufPointer = 0;
                try {
                    bufLength = in.read(buffer);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (bufLength <= 0)
                    return -1;
            }
            return buffer[bufPointer++];
        }

        private static boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public long nextLong() {
            long n = 0;

            int b = readByte();
            while (isSpaceChar(b))
                b = readByte();

            boolean minus = (b == '-');
            if (minus)
                b = readByte();

            while (b >= '0' && b <= '9') {
                n *= 10;
                n += b - '0';
                b = readByte();
            }

            if (!isSpaceChar(b))
                throw new NumberFormatException();

            return minus ? -n : n;
        }

        public int nextInt() {
            long n = nextLong();

            if (n < Integer.MIN_VALUE || n > Integer.MAX_VALUE)
                throw new NumberFormatException();

            return (int) n;
        }

    }
}



Measured memory_bytes: 20948
//#pragma warning(disable:4996)
#include <iostream>
#include <vector>
#include <limits.h>
#include <algorithm>
#include <string>
#include <math.h>
#include <limits.h>
#include <queue>
#include <map>
#include <set>
#include <iomanip>
#include <bitset>
#include <cassert>
#include <random>
#include <functional>
#include <stack>
#include <iomanip>
#include <cassert>
//#include <boost/multiprecision/cpp_int.hpp>
#include <complex>
#include <cstdio>
#include <list>
#include <bitset>
//#include <stdio.h>

//< in.txt > out.txt
using namespace std;
//std::ios::sync_with_stdio(false);
//std::cin.tie(0);
const long long MOD = 1e9 + 7;
const long long INF = 1e15;
typedef long long LL;
typedef long double LD;
//typedef boost::multiprecision::cpp_int bigint;
typedef pair<LL, LL> PLL;
typedef pair<int, int> PI;
typedef pair<LD, LL> pdl;
typedef pair<LD, LD> pdd;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef vector<int> VI;
typedef vector<vector<int>> VVI;
typedef unsigned long long ULL;

int popcount(int N) {
	int ans = 0;
	int n = 0;
	while ((N >> n) > 0) {
		ans += (N >> n) & 1;
		n++;
	}
	return ans;
}

int calc(int N) {
	int ans = 0;
	while (N > 0) {
		int p = popcount(N);
		N %= p;
		ans++;
	}
	return ans;
}

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	int N;
	cin >> N;
	string S;
	VI X(N);
	char chr;
	cin.get(chr);
	for (int n = 0; n < N; n++) {
		cin.get(chr);
		//int c = (S[n] == '0' ? 0 : 1);
		X[N - 1 - n] = chr - 48;
	}
	int N0 = 0;
	for (int n = 0; n < N; n++)N0 += X[n];
	VI bnp(N, 0);
	bnp[0] = 1 % (N0 + 1);
	for (int n = 1; n < N; n++) {
		bnp[n] = (bnp[n - 1] * 2) % (N0 + 1);
	}
	VI bnm(N, 0);
	if (N0 - 1 != 0) {
		bnm[0] = 1 % (N0 - 1);
		for (int n = 1; n < N; n++) {
			bnm[n] = (bnm[n - 1] * 2) % (N0 - 1);
		}
	}
	int xnp = 0;
	for (int n = 0; n < N; n++) {
		if (X[n] == 1) {
			xnp += bnp[n];
			xnp %= (N0 + 1);
		}
	}
	int xnm = 0;
	if (N0 > 1) {
		for (int n = 0; n < N; n++) {
			if (X[n] == 1) {
				xnm += bnm[n];
				xnm %= (N0 - 1);
			}
		}
	}
	for (int n = N - 1; n >= 0; n--) {
		if (X[n] == 0) {
			int XX = (xnp + bnp[n]) % (N0 + 1);
			cout << calc(XX) + 1 << "\n";
		}
		else {
			if (N0 == 1) {
				cout << 0 << "\n";
				continue;
			}
			int XX = (xnm - bnm[n]) % (N0 - 1);
			XX = (XX + N0 - 1) % (N0 - 1);
			cout << calc(XX) + 1 << "\n";
		}
	}
	return 0;
}


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

#define REP(i,num) for(ll i=0;i<(num);++i)
#define LOOP(i) while(i--)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto pitr=c.begin();pitr!=c.end();++pitr){cout<<*pitr;if(next(pitr,1)!=c.end())cout<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=ll>
T in(){T x; cin >> x; return (x);}
template<typename T=ll,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout<<fixed<<setprecision(10);

	int N=in(),M=in();
	vector<vector<int>> S(M,vector<int>(N,0));
	REP(i,M){
		int K=in();
		REP(j,K) S[i][in()-1]=1;
	}
	auto P=vecin(M);
	
	int L=1<<N;
	int sum=0;
	REP(i,L){
		int V=i,index=0;
		vector<int> F(M,0);
		while(V){
			REP(j,M){
				if(V&1 && S[j][index]){
					F[j]++;
				}
			}
			index++;
			V/=2;
		}
		bool flag=true;
		REP(j,M){
			if((F[j]%2)!=P[j]){
				flag=false;
				break;
			}
		}
		if(flag) sum++;
	}
	
	out(sum);
	return 0;
}


Measured memory_bytes: 256
# -*- coding:utf-8 -*-
import sys
x, y = map(int, input().split())
factor = abs(abs(x)-abs(y))
a = [ x+factor, factor-x, (x+factor)*(-1), (factor-x)*(-1) ]
b = [ factor, factor+1, factor+1, factor+2 ]
for index,tmp in enumerate(a):
    if tmp == y:
        print(b[index])
        sys.exit()

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

int main(){
  int x;
  cin >> x;
  for(int a = 0; a < 1000 ; a++){
    ll a5 = 1;
    rep(i,5) a5 *=a;
    for(int b = -1000; b < 1000; b++){
      ll b5 = 1;
      rep(i,5) b5 *= b;
      if(a5 - b5 ==x){
        printf("%d %d\n",a,b);
        return 0;
      }
    }
  }
  return 0;
}


Measured memory_bytes: 3760
/*
    Created by Rahul Goel.
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
/*******************************************************************************/
using namespace std;
using namespace __gnu_pbds;
template < typename T >
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
/*******************************************************************************/
using ll = long long;
using ld = long double;
const ll MOD = 1000000007;
// const ll MOD = 998244353;
const int INF = 1e9;
const ll LINF = 1e18;
/*******************************************************************************/
ll mod_sum() { return 0LL; }
template < typename T, typename... Args >
T mod_sum(T a, Args... args) { return ((a + mod_sum(args...))%MOD + MOD)%MOD; }
/*******************************************************************************/
ll mod_prod() { return 1LL; }
template< typename T, typename... Args >
T mod_prod(T a, Args... args) { return (a * mod_prod(args...))%MOD; }
/*******************************************************************************/
#ifdef ONLINE_JUDGE
#define endl '\n'
#endif
#define fastio          ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define all(c)          (c).begin(), (c).end()
#define present(c,x)    ((c).find(x) != (c).end())
#define cpresent(c,x)   (find(all(c),x) != (c).end())
#define uniq(c)         (c).resize(distance((c).begin(), unique(all(c))))
#define min_pq(t)       priority_queue < t, vector < t >, greater < t > >
#define max_pq(t)       priority_queue < t >
#define pb              push_back
#define ff              first
#define ss              second
/*******************************************************************************/
using pii = pair < ll, ll >;
using vi = vector < ll >;
using vb = vector < bool >;
using vvi = vector < vector < ll > >;
using vvb = vector < vector < bool > >;
using vpii = vector < pii >;
using vvpii = vector < vector < pii > >;
/*******************************************************************************/
//.-.. . -. -.- .- .. ... .-.. --- ...- .
/*
    Code begins after this.
*/

ll solve() {
    ll n, x, t;
    cin >> n >> x >> t;
    ll ans = (n + x - 1) / x * t;
    cout << ans << endl;
    return 0;
}

signed main() {
    fastio;

    ll t = 1;
    while (t--) {
        solve();
    }
    return 0;
}


Measured memory_bytes: 3632
using System;
public class Aprob {
    public static void Main() {
        string S = Console.ReadLine();
        string outp = "";
        int count = 0;
        for (int i = 0; i < S.Length; i++) {
            if (S.Substring(i, 1) == "B") {
                if (count != 0) {
                    outp=outp.Remove(outp.Length-1, 1);
                    count--;
                }
            } else {
                outp += S.Substring(i, 1);
                count++;
            }
        }
        Console.WriteLine(outp);
    }
}

Measured memory_bytes: 13140
//In The Name Of Allah
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define sz(x) (int)(x.size())
#define double long double 
#define fi first
#define se second
#define pii pair<int, int>
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")

signed main() {
	ios::sync_with_stdio(false); cin.tie(nullptr);
  int n, k;
  cin >> n >> k;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int sum = 0;
    for (int j = i; j < n; j++) {
      sum += a[j]; 
      v.push_back(sum);
    }
  }
  sort(v.rbegin(), v.rend());
  int ans = 0;
  for (int b = 61; b >= 0; b--) {
    if ((v[0] & (int)pow(2, b)) == 0) {
      continue;
    }
    if ((v[k - 1] & (int)pow(2, b)) == 0) {
      int nt = (int) pow(2, 62) - 1 - (int) pow(2, b);
      for (int i = 0; i < sz(v); i++) {
        v[i] &= nt;
      }
      sort(v.rbegin(), v.rend());
    } else {
      ans += (int) pow(2, b);
    }
  }
  cout << ans << "\n";
}



Measured memory_bytes: 6384
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<string>
#include<vector>
#include<stack>
#include<bitset>
#include<cstdlib>
#include<cmath>
#include<set>
#include<list>
#include<deque>
#include<map>
#include<queue>
using namespace std;
typedef long long ll;
const double PI = acos(-1.0);
const double eps = 1e-6;
const int INF = 1000000000;
const int mod = 1e9+7;
const int maxn = 2e5+5;
int main() {
	ll a,b,c;
	cin>>a>>b>>c;
	cout<<(a+b-1)/b*c<<endl; 
    return 0;
}



Measured memory_bytes: 3632
#include <bits/stdc++.h>
#include <algorithm>
#include <string>
using namespace std;
vector<int> A; 
bool N3, N5, N7; 
long long int n; 
bool N357(long long int x){
		N3 = false; N5 = false; N7 = false; 
		while(x > 0){
			if(x % 10 == 3){N3 = true;}
			else if(x % 10 == 5){N5 = true;}
			else if(x % 10 == 7){N7 = true;}
			x /= 10; 
        }
		return (N3 & N5 & N7); 	
	}
void dfs(long long int x){
		if(N357(x)){A.push_back(x);}
		if(10 * x + 3 <= n){dfs(10 * x + 3);}
		if(10 * x + 5 <= n){dfs(10 * x + 5);}
		if(10 * x + 7 <= n){dfs(10 * x + 7);}
	}
int main(){
	cin >> n; 
	dfs((long long) 0); 
	cout << A.size() << endl; 
}

Measured memory_bytes: 512
#include<iostream>
#include<cstring>
#define N 200005
using namespace std;
int n,m,res,a[N],cnt[N],l[N];
int main(){
	cin>>n>>m;
	memset(l,0,sizeof(l));
	memset(cnt,0,sizeof(cnt)); 
	for (int i=1;i<=n;i++){
		cin>>a[i];
		if (a[i]-cnt[a[i]]>0) l[a[i]-cnt[a[i]]]++;
		cnt[a[i]]++;
	}res=0;
	for (int i=1;i<=n;i++)	if (!l[i])	res++;
	for (int i=1;i<=m;i++){
		int x,y;cin>>x>>y;
		cnt[a[x]]--;
		if (a[x]-cnt[a[x]]>0){
			l[a[x]-cnt[a[x]]]--;
			if (!l[a[x]-cnt[a[x]]])	res++;
		}a[x]=y;
		if (y-cnt[y]>0){
			l[y-cnt[y]]++;
			if (l[y-cnt[y]]==1) res--;
		}
		cnt[y]++;
			cout<<res<<endl;
	}
	return 0;
}

Measured memory_bytes: 3840
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<ios>//左右揃え
#include<iomanip>//setwで幅指定

using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define MOD 1000000007LL

int main(void) {
    int k, n;
    cin >> k >> n;
    vector<int> h(n);
    rep(i, n) cin >> h[i];
    vector<int> d(n);
    rep(i, n - 1) d[i] = h[i + 1] - h[i];
    d[n - 1] = h[0] + k - h[n - 1];
    sort(d.begin(), d.end());
    int sum = 0;
    rep(i, n - 1) sum += d[i];
    cout << sum << endl;
}

Measured memory_bytes: 1792
N = input()
a = list(map(int,input().split()))
over3200 = 0
syurui_min = 0
syurui_max = 0
b = [0] * 8
for i in a:
    if 1 <= i and i <= 399:
        b[0] = 1
    if 400 <= i and i <= 799:
        b[1] = 1
    if 800 <= i and i <= 1199:
        b[2] = 1
    if 1200 <= i and i <= 1599:
        b[3] = 1
    if 1600 <= i and i <= 1999:
        b[4] = 1
    if 2000 <= i and i <= 2399:
        b[5] = 1
    if 2400 <= i and i <= 2799:
        b[6] = 1
    if 2800 <= i and i <= 3199:
        b[7] = 1
    if 3200 <= i and i <= 4800:
        over3200 += 1
for i in b:
    if(i == 1):
        syurui_min += 1
syurui_max = syurui_min + over3200
if syurui_min == 0:
    syurui_min = 1
print("{0} {1}".format(syurui_min, syurui_max))


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

using namespace std;
using ll = long long;
using ld = long double;

//#define int long long
//signed main(){
int main() {
//    ios_base::sync_with_stdio(false);
//    cin.tie(NULL);
    int n,k;
    cin >> n >> k;
    vector<int> v(n);
    for(int i = 0; i < n; i++) {
        cin >> v[i];
    }

    int r=min(n,k);
    int ans=0;
    for(int a = 0; a <= r; a++) {
        for(int b = 0; a+b <= r ; b++) {
            if(a==0 && b==0) continue;
            int val=0;
            vector<int> tmp;
            for(int i = 0; i < a; i++) {
                val+=v[i];
                tmp.emplace_back(v[i]);
            }
            for(int i = 0; i < b; i++) {
                val+=v[n-1-i];
                tmp.emplace_back(v[n-1-i]);
            }

            for(int i = 0; i < tmp.size(); i++) {
                cerr << tmp[i] << " ,";
            }
            cerr << "\n";

            sort(tmp.begin(),tmp.end());

            int idx=0;
            int lim=min(k-a-b,a+b);

            while(tmp[idx]<0) {
                if(idx>=lim) break;
                val=val-tmp[idx];
                idx++;
                if(idx>=lim) break;
            }
            ans=max(ans,val);
        }
    }
    cout << ans << "\n";

    return 0;
}

Measured memory_bytes: 3608
#include<bits/stdc++.h>
using namespace std;
#define FASTIO ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;
void solve(){
	string s,t;
	cin>>s;
	cin>>t;
	int count=0;
	for(int i=0;i<s.length();i++){
		if(s[i]!=t[i])count++;
	}
	cout<<count<<"\n";
}
int main(){
	FASTIO
	solve();
	return 0;
}


Measured memory_bytes: 3792
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file  
#include <ext/pb_ds/tree_policy.hpp>  
#include <functional> // for less  
using namespace         std;
#define                 int long long
#define                 double long double
#define                 pb push_back
#define                 mp make_pair
#define st(arr,a)       memset(arr,a,sizeof arr)
#define                 nl cout<<'\n'
#define bitcount(x)     __builtin_popcountll(x)
const int MOD = 1000000007ll;
#define forn(i,a,b)     for(int i=a;i<=b;i++)
#define rfor(i,a,b)     for(int i=a;i>=b;i--)
#define all(x)          x.begin() , x.end()
#define pi pair<int,int>
#define X first
#define Y second
#define N 1014159
#define  vi vector<int>
#define  v  vector
#define die exit(0)
#define alln(arr) arr+1 , arr+1+n
using namespace __gnu_pbds;  
typedef tree<int, null_type, less<int>, rb_tree_tag,  
            tree_order_statistics_node_update> oset; 

// order_of_key (k) : Number of items strictly smaller than k .
// find_by_order(k) : K-th element in a set (counting from zero).

#define in input_int()
#define ins input_string()
int input_int(){int a;cin>>a;return a;}
string input_string(){string s;cin>>s;return s;}
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};



int n,m,k,a,b,c,d,x,y,arr[N];
string s;
void solve()
{
    cin>>n;
    forn(i,1,n)cin>>arr[i];
    arr[n+1]=-MOD;
    int f=0;

    int i=1;
    vi A;
    while(1)
    {

        if(f==0)
        {
            while(arr[i]>=arr[i+1])
            {
                i++;
                if(i==n+1)
                {    
                    i=n;
                    break;
                }
            }
            A.pb(arr[i]);
            f^=1;
        }
        else
        {
            while(arr[i]<=arr[i+1])
            {
                i++;
                if(i==n+1)
                {
                    i=n;
                    break;
                }
            }
            A.pb(arr[i]);
            f^=1;
        }

        if(i==n)break;
    }

   // for(auto i : A)cout<<i<<" ";nl;

    int money=1000,stocks=0;
    f=0;
    int ans=1000;
    for(auto i : A)
    {
        if(f==0)
        {
            stocks=money/i;
            money=money%i;
        }
        else
        {
            money+=i*stocks;
            ans=max(ans,money);
        }
        f^=1;   
    }

    cout<<ans;




}


signed main() 
{
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); 
    int t = 1;
    //cin>>t;
    forn(i,1,t)
    {
        solve();
        nl;
    }



    return 0;

}
//       clang++ c.cpp ; ./a.out < a.txt ;  

Measured memory_bytes: 3620
N,M = (int(i) for i in input().split())
a=[]
b=[]
c=[]
d=[]

for i in range(N):
    A,B = (int(i) for i in input().split())
    a.append(A)
    b.append(B)

for i in range(M):
    C,D = (int(i) for i in input().split())
    c.append(C)
    d.append(D)


closest = N*[0]

for i in range(N):
    minimum = abs(a[i]-c[0])+abs(b[i]-d[0])
    number = 1
    for j in range(1,M):
        distance = abs(a[i]-c[j])+abs(b[i]-d[j])
        if distance < minimum:
            minimum = distance
            number = j+1
    closest[i] = number

for i in range(N):
    print(closest[i])

Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
int jump(vector<int>&v,int k){
    vector<int>dp(v.size(),INT_MAX);
    dp[0]=0;
    for(int i=1;i<v.size();i++){
        for(int j=max(0,i-k);j<i;j++){
            dp[i]=min(dp[i],dp[j]+abs(v[i]-v[j]));
        }
    }
    return dp[v.size()-1];
    
}


int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    int n,k;
   cin>>n>>k;
   vector<int>v;
   while(n-->0){
       int a;
       cin>>a;
       v.push_back(a);
   }
   cout<<jump(v,k);
   
}


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

#define mp make_pair
#define pb push_back

using namespace std;

typedef int32_t i32;
typedef uint32_t u32;
typedef int64_t i64;
typedef uint64_t u64;
typedef pair<int,int> pii;
typedef vector<int> vi;

const int MAX_N = 2000;
int n, k, q;
int a[MAX_N];
int b[MAX_N];
int c[MAX_N];

int main()
{
  cin >> n >> k >> q;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }

  int m = INT_MAX;
  for (int i = 0; i < n; i++) {
    int ai = 0, ci = 0;
    while (ai < n) {
      int bi = 0;
      while (ai < n && a[i] <= a[ai]) {
        b[bi++] = a[ai++];
      }
      ai++;
      sort(b,b+bi);
      for (int l = 0; l < bi - k + 1; l++) {
        c[ci++] = b[l];
      }
    }
    if (ci >= q) {
      sort(c,c+ci);
      m = min(m, c[q-1] - c[0]);
    }
  }
  cout << m << endl;

  return 0;
}


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

vector<vector<int>> T(100010);
vector<ll> sc(100010, 512411);

int main() {
	int N, K, a, b;
	cin >> N >> K;
	if (N == 1) {
		cout << K << endl;
		return 0;
	}
	for (int i = 1;i < N;i++) {
		cin >> a >> b;
		a--;b--;
		T[a].push_back(b);
		T[b].push_back(a);
	}
	for (int i = 0;i < N;i++) {
		if (T[i].size() == 1) {
			a = i;b = T[i][0];break;
		}
	}
	queue<int> Q;
	sc[a] = K;
	sc[b] = K - 1;
	Q.push(b);
	int ss, cnt = 0;
	while (!Q.empty()) {
		b = Q.front();
		Q.pop();
		ss = T[b].size();cnt = 2;
		for (int i = 0;i < ss;i++) {
			if (sc[T[b][i]] != 512411) continue;
			sc[T[b][i]] = K - cnt;
			Q.push(T[b][i]);
			cnt++;
		}
	}
	ll ans = 1;
	for (int i = 0;i < N;i++) {
		ans *= sc[i];
		ans %= MOD;
	}
	cout << ans << endl;
}

Measured memory_bytes: 7288