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

int n,m;
bool adj[10][10];

int go(int u,int mask){
	int cnt=0;
	for(int v=0;v<n;++v)
		if(!(mask>>v&1)&&adj[u][v]){
			int nmask=mask|(1<<v);
			if(nmask==(1<<n)-1) return 1;
			else cnt+=go(v,mask|(1<<v));
		}
	return cnt;
}

int main() {
	ios_base::sync_with_stdio(0);cin.tie(0);
	cin>>n>>m;
	memset(adj,false,sizeof adj);
	for(int i=0;i<m;++i){
		int u,v;
		cin>>u>>v;
		--u,--v;
		adj[u][v]=adj[v][u]=true;
	}
	cout<<go(0,1)<<'\n';
}




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

 int main(){
     int S,a,b,c;
    cin >> S;
    a = S / 3600;
    b = (S % 3600) / 60;
    c = (S % 3600) % 60 ;
    cout << a << ':' << b << ':' << c << endl;
    return 0;
 }  


Measured memory_bytes: 3088
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>

using namespace std;

int main() {
    string s;
    cin >> s;
    int lc = 0, rc = 0, i = 0, tani;
    int n = s.size();
    int res[n];
    fill(res, res+n, 0);
    for (auto c:s) {
        if (c == 'L' && lc > 0) {
            if (rc == 0) tani = i;
            rc++;
        }
        else if (c == 'R') {
            if (rc > 0 && lc > 0) {
                res[tani]   = lc / 2 + (rc + 1) / 2;
                res[tani-1] = rc / 2 + (lc + 1) / 2;
                lc = 0;
                rc = 0;
            }
            lc++;
        }
        i++;
    }
    if (rc > 0 && lc > 0) {
        res[tani]   = lc / 2 + (rc + 1) / 2;
        res[tani-1] = rc / 2 + (lc + 1) / 2;
        rc = 0;
    }
    for (int i=0; i<n; i++) cout << res[i] << (i < n-1 ? ' ' : '\n');
    return 0;
}

Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define pli pair<ll, int>
#define pil pair<int, ll>
#define pll pair<ll, ll>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep3(i, l, n) for (int i = l; i < (n); ++i)
#define sz(v) (int)v.size()
#define endl '\n'
const int inf = 1000000007;
const ll INF = 1e18;
// int mod = 998244353;
int mod = 1000000007;
#define abs(x) (x >= 0 ? x : -(x))
#define lb(v, x) (int)(lower_bound(all(v), x) - v.begin())
#define ub(v, x) (int)(upper_bound(all(v), x) - v.begin())
template<typename T1, typename T2> inline bool chmin(T1 &a, T2 b) { if (a > b) { a = b; return 1; } return 0; }
template<typename T1, typename T2> inline bool chmax(T1 &a, T2 b) { if (a < b) { a = b; return 1; } return 0; }
ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
template<typename T, typename U> T pow_(T a, U b) { return b ? pow_(a * a, b / 2) * (b % 2 ? a : 1) : 1; }
ll modpow(ll a, ll b, ll _mod) { return b ? modpow(a * a % _mod, b / 2, _mod) * (b % 2 ? a : 1) % _mod : 1; }
template<class T, class U> ostream& operator << (ostream& os, const pair<T, U>& p) { os << p.F << " " << p.S; return os; }
template<class T> ostream& operator << (ostream& os, const vector<T>& vec) { rep(i, sz(vec)) { if (i) os << " "; os << vec[i]; } return os; }
template<typename T> inline istream& operator >> (istream& is, vector<T>& v) { rep(j, sz(v)) is >> v[j]; return is; }
template<class T, class T2> inline void add(T &a, T2 b) { a += b % mod; if (a >= mod) a -= mod; }
template<class T> void operator += (vector<T>& v, vector<T> v2) { rep(i, sz(v2)) v.eb(v2[i]); }

void solve();

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(12); // debuged
    int T;
    T = 1;
    while (T--) solve();
}

void solve() {
    int a, b;
    cin >> a >> b;
    cout << (a ^ b) << endl;
}


Measured memory_bytes: 3648
#include<cstdio>
#include<algorithm>
using namespace std;
const int N=200002;
int n,m,a[N],b[N],Ans=1<<30,i,l,r,mid;
void init(){
    scanf("%d%d",&n,&m);
    for(i=1;i<=2*n;i++)
        scanf("%d",a+i);
    sort(a+1,a+n*2+1);
}
bool ok(int x){
    for(i=1;i<=n*2;i++)
        b[i]=a[i];
    for(i=0;i<x;i++)
        b[n*2-i]-=m;
    sort(b+1,b+n*2+1);
    for(i=1;i<=n;i++)
        b[i]+=b[n*2-i+1];
    sort(b+1,b+n+1);
    if(b[1]<0)return 0;
    Ans=min(Ans,b[n]);
    return 1;
}
void work(){
    l=0;r=n;
    while(l<=r){
        mid=l+r>>1;
        if(ok(mid))
            l=mid+1;
        else
            r=mid-1;       
    }
    printf("%d\n",Ans);
}
int main(){
    init();
    work();
    return 0;
}

Measured memory_bytes: 1664
#include <bits/stdc++.h>
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9+7;
const ll LINF = 1e18;

using namespace std;

#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 revrep(i, s) for (int i = s-1; i > 0; i--)
#define revrrep(i, s) for (int i = s-1; i >= 0; i--)
#define all(a)  begin((a)),end((a))
#define uniq(c) (c).erase(unique(all((c))), end((c)))

int main()
{
    int P, Q, R; cin >> P >> Q >> R;
    cout << min(P+R, min(P+Q, Q+R)) << endl;
}

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

#define d(x) cerr << #x ":" << x << endl;
#define dd(x, y) cerr << "(" #x "," #y "):(" << x << "," << y << ")" << endl
#define rep(i, n) for (int i = (int)(0); i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define dump(v)                  \
    cerr << #v ":[ ";            \
    for (auto macro_vi : v) {    \
        cerr << macro_vi << " "; \
    }                            \
    cerr << "]" << endl;
#define ddump(v)                           \
    cerr << #v ":" << endl;                \
    for (auto macro_row : v) {             \
        cerr << "[";                       \
        for (auto macro__vi : macro_row) { \
            cerr << macro__vi << " ";      \
        }                                  \
        cerr << "]" << endl;               \
    }
using lint       = long long;
const int INF    = 1e9;
const lint LINF  = 1e18;
const double EPS = 1e-10;

int main() {
    int X;
    cin >> X;
    if (X >= 30) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}

Measured memory_bytes: 3568
import java.util.Scanner;

public class Main {
	
	static Scanner scan;
	
	public static boolean judgePN(int a) {
		if (a == 1) return false;
		
		int quotient = a;
		
		for(int i = 2; i < a; i++) {
			quotient = a / i;
			if(a % i == 0) return false;
			if(i > quotient) break;
		}
		
		return true;
	}
	
	public static void main(String[] args) {
		scan = new Scanner(System.in);
		
		// Get the number of the input list
		final int n = scan.nextInt();
		
		// Get figures of the input list
		int list[] = new int[n];
		for(int i = 0; i < n; i++) {
			list[i] = scan.nextInt();
		}
		
		// Count the number of prime number
		int count = 0;
		for(int i = 0; i < n; i++) {
			if(judgePN(list[i])) count++;
		}
		
		// Output
		System.out.println(count);
	}
}



Measured memory_bytes: 42508
#include<algorithm>
#include<cmath>
#include<cstdlib>
#include<iomanip>
#include<iostream>
#include<numeric>
#include<string>
using namespace std;

#define rep(i, n) for ( int i = 0; i < n ; i++);

long gcd(long x, long y) { if (x > y) { return gcd(y, x); } long r; while (y != 0) { r = x % y; x = y; y = r; }return x; }
long lcm(long x, long y) { return(x / gcd(x, y)) * y; }
void indexsort(long* first, long* last ,long* func) { sort(first, last, [&](long a, long b) {return func[a] < func[b]; }); }
//--------------------

int main() {

	long n; cin >> n; n /= 2;
	long odd[100009], even[100009];  for (int i = 0; i < n; i++) cin >> odd[i] >> even[i];
	long counto[100009] = {}, counte[100009] = {};
	long mcount;

	//まずoddから。最頻値と頻度第一位、第二位を求める。

	sort(odd, odd + n);
	for (int i = 0; i < n; i++) counto[odd[i]]++; //いくつでてくるか
	mcount = 0; //頻度仮変数
	long oddmode = 0; //最頻値
	long odd1 = 0, odd2 = 0; //頻度第一位、頻度第二位

	for (int i = 0; i < 100009; i++) if (mcount < counto[i]) { mcount = counto[i]; oddmode = i ; }// 最頻値を取得。

	sort(counto, counto + 100009);
	odd1 = counto[100008];
    odd2 = counto[100007];

	//つぎにeven

	sort(even, even + n);
	for (int i = 0; i < n; i++) counte[even[i]]++; //いくつでてくるか

	mcount = 0; //頻度仮変数
	long evenmode = 0; //最頻値
	long even1 = 0, even2 = 0; //頻度第一位、頻度第二位

	for (int i = 0; i < 100009; i++) if (mcount < counte[i]) { mcount = counte[i]; evenmode = i; }// 最頻値を取得。
	
	sort(counte, counte + 100009);
	even1 = counte[100008];
    even2 = counte[100007];

	if (oddmode != evenmode) cout << 2 * n - odd1 - even1 << endl;
	else cout << 2 * n - max(odd2 + even1, odd1 + even2) << endl;

}

Measured memory_bytes: 3328
#include "iomanip"
#include "iostream"
#include "string"
#include "vector"
#define rep(i, to) for (ll i = 0; i < (to); ++i)
#define rep1(i, to) for (ll i = 1; i <= (to); ++i)
#define all(vec) vec.begin(), vec.end()
#define unless(cond) if (!(cond))
using namespace std;
typedef long long ll;
template <typename T>
using V = vector<T>;

template <typename T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}

template <typename T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}

template <typename T>
void drop(const T& x) {
  cout << x << endl;
  exit(0);
}

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

  ll N, K;
  cin >> N >> K;
  V<double> p(N);
  rep(i, N) cin >> p[i];
  V<double> es(N);
  rep(i, N) { es[i] = (p[i] + 1) / 2; }

  double res = 0;
  double current = 0;

  rep(i, N) {
    current += es[i];

    if (i - (K - 1) >= 0) {
      current -= es[i - K];
    }

    chmax(res, current);
  }

  cout << fixed << setprecision(10);
  cout << res << endl;

  return 0;
}


Measured memory_bytes: 3456
#include<stdio.h>

int main(void)
{
 int s, a, b, c, d;
 
	scanf("%d", &s);
	
	a=s/3600;
	b=s%3600;
	c=b/60;
	d=b%60;

	
	printf("%d:%d:%d\n", a,c,d);
	
	
   return 0;
   
}

Measured memory_bytes: 2732
#include <bits/stdc++.h>
using namespace std;
vector <string> ans;
string Str,str;
bool cal(){
  bool alph[300]={};
  alph['a']=1;
  for(int i=0;i<str.size();i++){
    int flg=0;
    if(!alph[str[i]])flg=alph[str[i]]=1;
    if(str[i]-flg!=Str[i])return 0;
  }
  return 1;
}

bool used[300];
void saiki(int idx){
  while(used[str[idx]]||str[idx]=='z')idx++;
  if(idx==(int)str.size()&&cal())ans.push_back(str);
  
  if(idx==str.size())return;
  saiki(idx+1);

  str[idx]++;
  used[str[idx]-1]=1;
  saiki(idx+1);
  used[str[idx]-1]=0;
  str[idx]--;
}

int main(){
  while(1){
  cin>>Str;
  str=Str;
  if(Str=="#")break;
  ans.clear();
  saiki(0);
  cout <<ans.size()<<endl;
  int cnt=0;
  sort(ans.begin(),ans.end());
  if(ans.size()<=10)
    for(int i=0;i<ans.size();i++)cout <<ans[i]<<endl;
  else {
    for(int i=0;i<5;i++)cout<<ans[i]<<endl;
    for(int i=0;i<5;i++)cout<<ans[ans.size()-5+i]<<endl;
  }
  } 
  return 0;
}

Measured memory_bytes: 2352
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n, a[100005] = {};
    cin >> n;
    for(int i=0; i<n; i++) {
        int x;
        cin >> x;
        a[x]++;
    }
    int result=0;
    for(int i=1; i<=100000; i++) {
        result = max(result, a[i-1] + a[i] + a[i+1]);
    }
    cout << result << endl;
    return 0;
}

Measured memory_bytes: 640
import sys
input = sys.stdin.readline

n = int(input())

comment_list = [ [] for i in range(n) ]
for i in range(n):
    m = int (input())
    for j in range(m):
        a, b = [ int(v) for v in input().split() ]
        comment_list[i].append([a-1,b])

ans = 0
for i in range(2**n):
    s = bin(i)[2:].zfill(n)
    status = 1
    for j, v in enumerate(s):
        for x, y in comment_list[j]:
            if v == "1":
                if s[x] != str(y):
                    status = 0
    if status == 1:
        ans = max(ans, s.count("1"))
print(ans)


Measured memory_bytes: 44764
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pp;
typedef pair<ll,ll> pll;
void read(int& x){ scanf("%d",&x); }
void read(ll& x){ scanf("%lld",&x); }
template<typename T,typename... Args>
void read(T& a,Args&... b){ read(a); read(b...); }
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define eb emplace_back
#define x first
#define y second

typedef vector<ll> V;

map<V, set<pll>> state;

int n;

void Try(V& v, ll nokori){
	V diff(n-1);
	for(int i=1; i<n; ++i) diff[i-1]=v[i]-v[0];
	set<pll>& s = state[diff];
	
	pll key{v[0], nokori-v[0]};
	
	auto it = s.lower_bound(key);
	if(it != s.end() && key.x <= it->x && key.y <= it->y)
		return;
	
	s.insert(key);
	
	if(nokori >= 1){
		diff = v; // reuse
		for(ll& x:diff) x>>=1;
		Try(diff, nokori-1);
	}
	
	if(nokori >= 2){
		diff = v; // reuse
		bool flg = 1;
		for(ll& x:diff){
			if(x == 0){
				flg = 0;
				break;
			}
			x=((x-1)>>1);
		}
		if(flg){
			Try(diff, nokori-2);
		}
	}
}

int main()
{
	ll k;
	read(n, k);
	V a; a.resize(n); for(ll& x:a) read(x);
	Try(a, k);
	
	ll ans = 0;
	const ll M = int(1e9) + 7;
	
	for(auto& P:state){
		const V& dfv=P.x;
		set<pll>& pts=P.y;
		
		ll md = 0;
		if(dfv.size()) md=min(0ll, *min_element(all(dfv)));
		
		map<ll, int> rng;
		for(const pll& pt:pts){
			ll a0 = pt.x;
			ll r = pt.x + pt.y;
			ll mina0 = max(-md, a0-r);
			++rng[mina0];
			--rng[a0+1];
		}
		
		int lev = 0;
		ll lst = -1;
		for(auto& tmp : rng){
			if(lev == 0) lst = tmp.x;
			lev += tmp.y;
			if(lev == 0){
				ans += (tmp.x - lst);
				ans %= M;
			}
		}
	}
	
	printf("%lld\n", ans);
	return 0;
}


Measured memory_bytes: 16896
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(read())

def F(N):
    if N & 1:
        return 0
    N //= 2
    x = 0
    while N:
        N //= 5
        x += N
    return x

answer = F(N)
print(answer)


Measured memory_bytes: 2940
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())

l=[a,b,c,d,e]
min=a
for x in l:
    y=x%10
    if y!=0:
        if y<(min%10):
            min=x
ans=min
k=0
for x in l:
    if k==0:
        if x==min:
            k+=1
        else:
            if x%10==0:
                ans+=x
            else:
                ans+=x-(x%10)+10
    else:
        if x%10==0:
            ans+=x
        else:
            ans+=x-(x%10)+10

print(ans)

Measured memory_bytes: 3064
#include<iostream>
#include<math.h>
//#include<map>                                                                                                        
using namespace std;

int main()
{
  // 入力                                                                                                              
  int A, B, C;
  cin >> A >> B >> C;

  int A_minus_B, ans;

  A_minus_B = A - B;
  ans = C - A_minus_B;

  if (ans < 0) ans = 0;

  //出力                                                                                                               
  cout << ans << endl;

  return 0;
}

Measured memory_bytes: 256
#include <algorithm>
#include <cassert>
#include <cmath>
#include <climits>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define DEBUG 1
constexpr int kMod = 1000000007;
typedef long long LL;

typedef std::pair<LL, LL> Pair;

int main() {
  int N; std::cin >> N;
  std::vector<LL> pos, neg;

  for (int i = 0; i < N; ++i) {
    int a; std::cin >> a;
    if (a >= 0) pos.push_back(a);
    else        neg.push_back(a);
  }

  std::vector<Pair> ps;
  LL out = 0;
  if (pos.empty()) {  // all negative
    std::sort(neg.rbegin(), neg.rend());
    out = neg[0];
    for (int i = 1; i < N; ++i) {
      ps.push_back({out, neg[i]});
      out = out - neg[i];
    }
  } else if (neg.empty()) {  // all positive
    std::sort(pos.begin(), pos.end());
    out = pos[0];
    for (int i = 1; i < N - 1; ++i) {
      ps.push_back({out, pos[i]});
      out = out - pos[i];
    }
    ps.push_back({pos[N-1], out});
    out = pos[N-1] - out;
  } else {  // some negatives and some positives
    LL out1 = pos[0];
    LL out2 = neg[0];
    for (int i = 1; i < neg.size(); ++i) {
      ps.push_back({out1, neg[i]});
      out1 = out1 - neg[i];
    }
    for (int i = 1; i < pos.size(); ++i) {
      ps.push_back({out2, pos[i]});
      out2 = out2 - pos[i];
    }
    ps.push_back({out1, out2});
    out = out1 - out2;
  }

  std::cout << out << std::endl;
  for (auto p : ps) {
    std::cout << p.first << " " << p.second << std::endl;
  }
}


Measured memory_bytes: 5104
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
#include <functional> // for less 
using namespace __gnu_pbds; 
#define mod 998244353 
#define int long long
#define ll long long
#define pb push_back
#define boost ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define inp(n) for(i=0;i<n;i++) cin>>A[i];
#define inz(A) memset(A,0,sizeof(A))
#define lb lower_bound
#define ub upper_bound
#define all(v) v.begin(),v.end()
#define T 1000005
#define F first
#define S second
#define pi pair<int,int>
#define vi vector<int>
#define mii map<int,int>
#define vp vector<pair< int,int> >
#define mpi map<pair<int,int> ,int>
#define PI M_PI
#define lower(s) transform(all(s),s.begin(),::tolower)
#define endl "\n"
typedef tree<int, null_type, less<int>, rb_tree_tag, 
         tree_order_statistics_node_update> pbds;
int add(int a, int b) {a=(a%mod + b%mod)%mod;return a;}
int sub(int a, int b) {a =(a%mod - b%mod + mod)%mod ;return a;}
int mul(int a, int b) {return (a%mod * b%mod) % mod;}


void solve()
{  
   int n;cin >> n;
   cout << (1000-(n%1000))%1000;
}

signed main()
{ 
    boost
    int test=0,t;
    //cin >> t ;
    t=1;
    while(test++ <t){
	  //cout<<"Case #"<<test<<": ";
	   solve();}
  
}

Measured memory_bytes: 3588
// 2020-07-24 05:57:33
#include<bits/stdc++.h>
#ifdef LOCAL
#include "lib/debug.hpp"
#else
#define debug(...) 1
#endif
#define ALL(a) (a).begin(), (a).end()
#define rep(i, n) REP(i, 0, (n))
#define repc(i, n) REPC(i, 0, (n))
#define REP(i, n, m) for (int i = (int)(n); i < (int)(m); i++)
#define REPC(i, n, m) for (int i = (int)(n); i <= (int)(m); i++)
#define REPCM(i, n, m) for (int i = (int)(n); i >= (int)(m); i--)
using namespace std;
using ll = long long;
using ld = long double;
using pr = pair<ll, ll>;
using vll = vector<ll>;
using vpr = vector<pr>;
template<class T> inline bool chmin(T& a, const T& b) { if (a > b) { a = b; return true; } else return false; }
template<class T> inline bool chmax(T& a, const T& b) { if (a < b) { a = b; return true; } else return false; }

void answer() {
  int n;
  cin >> n;
  set<int> zero;
  zero.insert(0);
  zero.insert(n+1);
  vector<int> mp(n+2, 0);
  REPC(i, 1, n) {
    ll p;
    cin >> p;
    if(p < n) mp[p] = i;
    else zero.insert(i);
  }
  ll ans = 0;
  REPCM(i, n-1, 1) {
    ll x = i;
    ll idx = mp[x];
    ll l2, l1, r1, r2;
    {
      auto itr = zero.upper_bound(idx);
      r1 = *itr;
      if(r1 <= n) r2 = *(next(itr));
      else r2 = r1+1;
      itr--;
      l1 = *itr;
      if(1 <= l1) l2 = *(prev(itr));
      else l2 = l1-1;
    }
    if(1 <= l1) ans += x * (l1 - l2) * (r1 - idx);
    if(r1 <= n) ans += x * (idx - l1) * (r2 - r1);
    zero.insert(idx);
  }
  cout << ans << '\n';
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  answer();
  return 0;
}

Measured memory_bytes: 8292
#include <bits/stdc++.h>
#include <string>
#define ft first
#define sc second
#define pt(sth) cout << sth << "\n"
#define chmax(a, b) (a)=max(a, b)
#define chmin(a, b) (a)=min(a, b)
#define moC(a, s, b) (a)=((a)s(b)+MOD)%MOD
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
static const ll INF=1e18;
static const ll MAX=101010;
static const ll MOD=1e9+7;

/*
 for(i=0; i<N; i++)
   cin >> a[i];
*/



int main(void) {
  ll i, j, k;
  
  double x;
  cin >> x;
  
  double a=100;
  k=0;
  while(1) {
    a=a*1.01;
    a=(ll)a;
    k++;
    
    if(a>=x) {
      pt(k);
      return 0;
    }
    
  }
  
  
}
 
 


Measured memory_bytes: 3712
#include<stdio.h>
int main(){
	char a;
scanf("%c",&a);
		int f=0;
		if(a=='a'||a=='e'||a=='i'||a=='o'||a=='u'){
			printf("vowel\n");
		}
		if(a!='a'&&a!='e'&&a!='i'&&a!='o'&&a!='u'){
			printf("consonant\n");
		}

	return 0;
}

Measured memory_bytes: 128
#include <iostream>
#include <stdio.h>
#include <string>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <math.h>
#include <vector>
#include <algorithm>
#include <queue>
#include <stack>
#include <climits>
#include <bitset>
#include <list>
#include <map>
#include <set>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;

int main(){
	int n, k;
	string s;
	cin >> n >> k >> s;
	vector<int> v;
	char c=s[0];
	v.push_back(0);
	for(int i=1; i<s.length(); i++){
		if(s[i]!=c){
			v.push_back(i);
			c=s[i];
		}
	}
	for(int i=0; i<=4*k; i++) v.push_back(n);

	int ans=0;
	if(s[0]=='1'){
		for(int i=0; 2*(k+i)<v.size(); i++){
			ans=max(ans, v[2*(k+i)]-v[2*i]);
		}
		for(int i=0; 2*(k+i)+1<v.size(); i++){
			ans=max(ans, v[2*(k+i)+1]-v[2*i]);
		}
	}else{
		for(int i=0; 2*(k+i)<v.size(); i++){
			ans=max(ans, v[2*(k+i)]-v[2*i]);
		}
		for(int i=0; 2*(k+i)+2<v.size(); i++){
			ans=max(ans, v[2*(k+i)+2]-v[2*i+1]);
		}
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 2548
n, m = map(int, input().split())
link = [[] for _ in range(n)]
for i in range(m):
    tmp = list(map(int,input().split()))
    link[tmp[0]-1].append(tmp[1]-1)
    link[tmp[1]-1].append(tmp[0]-1)

lis=[]
for i in range(1,n):
    lis.append(i)
ans=0
from itertools import *
for perm in list(permutations(lis)):
    last=0
    ok=True
    for i in range(len(perm)):
        if perm[i] not in link[last]:
            ok=False
            break
        last=perm[i]
    if ok:
        ans+=1
print(ans)

Measured memory_bytes: 40432
#include <cstdio>
#include <iostream>
#include <algorithm>

using namespace std;

int n , m;

const int N = 1e5 + 5;

int a[N << 1] , ans;

bool check(int k){
	int mx = 0;
	for(int i = 1; i <= k; i++)
		mx = max(mx , a[i] +  a[2 * k - i + 1]);
	for(int i = 1; i <= n - k; i++){
		int x = a[2 * k + i] + a[2 * n - i + 1];
		if (x < m)
			 return 0;
		mx = max(mx , x - m);
	}
	ans = min(ans , mx);
	return 1;
}

int main(){
	cin >> n >> m;
	ans = m;
	for(int i = 1; i <= 2 * n; i++)
		cin >> a[i];
	sort(a + 1 , a + 2 * n + 1);
	int l = 0 , r = n;
	while(l <= r){
		int mid = l + r >> 1;
		if(check(mid))
			r = mid - 1;
		else
			l = mid + 1;
	}
	cout << ans << endl;
    return 0;
}

Measured memory_bytes: 1024
#include "bits/stdc++.h"
using namespace std;
char Str[10];

int main(){
    scanf( "%s" , Str + 1 );

    if( Str[3] != Str[4] || Str[5] != Str[6] ) puts( "No" );
    else puts( "Yes" );
    return 0;
}

Measured memory_bytes: 256
//AtCoder ABC099 C - Strange Bank
#include <bits/stdc++.h>
using namespace std;
using ll=int64_t;

ll kj(ll v, ll lim){
    ll ret=1;
    while(ret*v<=lim){
        ret*=v;
    }
    return ret;
}

ll search(ll n,ll cnt){
    if(n<6){
        return cnt+n; //残りの回数
    }

    auto i=kj(6,n);
    auto j=kj(9,n);
    ll c6=INT64_MAX,c9=INT64_MAX;
    if(i>1){
        c6=search(n-i,cnt+1);
    }
    if(j>1){
        c9=search(n-j,cnt+1);
    }
    return min(c6,c9);
}

int main() {
#if LOCAL&0
    std::ifstream in("input.txt");
    std::cin.rdbuf(in.rdbuf());
#endif
    ll N; cin>>N;
    ll ans=search(N,0);
    cout<<ans<<endl;
    return 0;
}

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

typedef long long ll;

ll pow10_[20], t[20];

string toString(ll x){
	stringstream ss;
	ss << x;
	return ss.str();
}

ll calc(ll x){
	ll len = toString(x).size();
	return t[len - 1] + len * (x - pow10_[len - 1]);
}

int main()
{
	ll n, k;
	pow10_[0] = 1, t[0] = 1;
	for (int i = 1; i < 20; i++){
		pow10_[i] = pow10_[i - 1] * 10;
		t[i] = (pow10_[i] - pow10_[i - 1]) * i + t[i - 1];
	}
	while (cin >> n >> k, n | k){
		ll lb = 1, ub = 10000000000ll;
		while (lb + 1 < ub){
			ll md = (lb + ub) / 2;
			if (calc(md) > n) ub = md;
			else lb = md;
		}
		string res;
		for (ll i = lb; i < lb + 200; i++){
			res += toString(i);
		}
		cout << string(res, n - calc(lb), k) << endl;
	}
}

Measured memory_bytes: 3152
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int l,r,d,m1,m2,result;
  cin>>l;
  cin>>r;
  cin>>d;
  m1=l/d;
  m2=r/d;
  if(m1*d==l){
    result=m2-m1+1;
  }
  else{
  	result=m2-m1;
  }
  cout<<result<<endl;
}

Measured memory_bytes: 3628
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using PLL = pair<ll, ll>;
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define repn(i,n) for(int i = 0; i <= (int)(n); i++)
#define srep(i,l,n) for(int i = l; i < (int)(n); i++)
#define srepn(i,l,n) for(int i = l; i <= (int)(n); i++)
#define drep(i,n) for(int i = (int)(n-1); i >= 0; i--)
#define drepn(i,n) for(int i = (int)(n); i >= 0; i--)
#define size(s) (int)s.size()
#define debug(var)  do{std::cout << #var << " : ";view(var);}while(0)
template<typename T> void view(T e){std::cout << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){ for(const auto& v : vv){ view(v); } }
template<typename T> inline istream& operator>>(istream &i, vector<T> &v) {rep(j, size(v)) i >> v[j]; return i;}
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; }
template<class T> T gcd(T a, T b) {if(b==0)return a; else return gcd(b,a%b);}
template<class T> T lcm(T a, T b) {return a/gcd(a,b)*b;}
template<class T = int> using V = vector<T>;
template<class T = int> using VV = vector<V<T>>;
bool isIn(int i, int j, int h, int w) {return i >= 0 && i < h && j >= 0 && j < w;}
void Yes(){cout << "Yes" << endl;}
void No(){cout << "No" << endl;}
void YES(){cout << "YES" << endl;}
void NO(){cout << "NO" << endl;}
void err() {cout << -1 << endl;}
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
#define ep emplace_back

const int MOD = 1000000007;
const int INF = 1e9;

#define PI acos(-1);
int dx[4] = {1,-1,0,0};
int dy[4] = {0,0,1,-1};
int ddx[8] = {1,1,1,-1,-1,-1,0,0};
int ddy[8] = {0,1,-1,0,1,-1,1,-1};

set<ll> all_divisor(ll n){
	set<ll> res;
	for(ll i = 1; i * i <= n; i++){
		if(n % i == 0){
            res.insert(i);
            res.insert(n / i);
        }
	}
	return res;
}

ll to_int(string s) {
    ll ret = 0;
    for(auto c : s) {
        int now = c - '0';
        ret = ret * 10 + now;
    }
    return ret;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    V<pair<ll, ll>> p(n);
    for(int i = 0; i < n; i++) {
        string s;
        cin >> s;
        int t = -1;
        auto last = find(all(s), '.');
        if(last != s.end()) s.erase(last), t = s.end() - last;
        ll B = 1;
        for(int j = 0; j < t; j++) B *= 10;
        ll A = to_int(s);
        ll G = gcd(A, B);
        p[i].first = A / G;
        p[i].second = B / G;
    }
    map<pair<ll, ll>, ll> mp;
    auto u = all_divisor(1e9);
    for(int i = 0; i < n; i++) {
        for(auto v : u) {
            if(p[i].first % v == 0) mp[{v, p[i].second}]++;
        }
    }
    ll ret = 0;
    for(auto [i, j] : mp) {
        ret += (ll)mp[i] * mp[{i.second, i.first}];
        if(i.first == i.second) ret -= mp[i];
    }
    cout << ret / 2 << endl;
}

Measured memory_bytes: 6304
#include <bits/stdc++.h>
using namespace std;
struct point{
	int a,b;
	point *l,*r,*pa;
	point(){l=r=pa=NULL;}
	point(int aa,int bb):a(aa),b(bb){l=r=pa=NULL;};
};
point *root;
point *rightRotate(point *t){
	point *s=t->l;
	t->l=s->r;
	s->r=t;
	return s;
}
point *leftRotate(point *t){
	point *s=t->r;
	t->r=s->l;
	s->l=t;
	return s;
}
point* insert(point *p,int a,int b){
	if(p==NULL)return new point(a,b);
	if(a==p->a)return p;
	if(a<p->a){
		p->l=insert(p->l,a,b);
		if(p->b<p->l->b)
			p=rightRotate(p);
	}else{
		p->r=insert(p->r,a,b);
		if(p->b<p->r->b)
			p=leftRotate(p);
	}return p;
}
point *_del(point *p, int a);
point *del(point *p,int a){
	if(p==NULL)return NULL;
	if(a<p->a)p->l=del(p->l,a);
	else if(a>p->a)p->r=del(p->r,a);
	else return _del(p,a);
	return p;
}
point *_del(point *p, int a){
	if(p->l==NULL&&p->r==NULL)return NULL;
	else if(p->l==NULL)p=leftRotate(p);
	else if(p->r==NULL)p=rightRotate(p);
	else{
		if(p->l->b>p->r->b)p=rightRotate(p);
		else p=leftRotate(p);
	}return del(p,a);
}
bool find(int a){
	point *p=root;
	while(p){
		if(a==p->a)return 1;
		if(a>p->a)p=p->r;
		else p=p->l;
	}
	return 0;
}
void dfs1(point *p){
	if(!p)return;
	dfs1(p->l);
	printf(" %d",p->a);
	dfs1(p->r);
}
void dfs2(point *p){
	if(!p)return;
	printf(" %d",p->a);
	dfs2(p->l);
	dfs2(p->r);
}
int main(){
	ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	int T;cin>>T;
	int ta,tb;
	string s;
	while(cin>>s){
		if(s=="insert"){
			cin>>ta>>tb;
//			if(!root)root=new point(ta,tb);
//			else 
			root=insert(root,ta,tb);
		}else if(s=="find"){
			cin>>ta;
			if(find(ta))printf("yes\n");
			else printf("no\n");
		}else if(s=="print"){
			dfs1(root);
			printf("\n");
			dfs2(root);
			printf("\n");
		}else if(s=="delete"){
			cin>>ta;
			root=del(root,ta);
		}
	}
	return 0;
}


Measured memory_bytes: 12648
#include<stdio.h>

long long int LCM(long long int,long long int );

int main(void){
    long long int a,b,c,d,s,x,y,z;

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

    s = LCM(c,d);
    x = b / c - a / c;
    if(a % c == 0)x++;
    y = b / d - a / d;
    if(a % d == 0)y++;
    z = b / s - a / s;
    if(a % s == 0)z++;

    printf("%lld",b - a + 1 - x - y + z);

    return 0;
}

long long int LCM(long long int a,long long int b)
{
 
  long long int r, x, tmp;
 
  x = a * b;
 
  /* 自然数 a > b を確認・入替 */
  if(a<b){
    tmp = a;
    a = b;
    b = tmp;
  }
 
  /* ユークリッドの互除法 */
  r = a % b;
  while(r!=0){
    a = b;
    b = r;
    r = a % b;
  }
  return x / b;
}


Measured memory_bytes: 1724
#include <iostream>
#include <string>
#include <cctype>
#include <cmath>
#include <stdio.h>
#include <algorithm>
#define MAXSIZE 200000
#define PI 3.141592653589
using namespace std;



int main(){
  int n;
  std::cin >> n;
  int a,b;
  a=n%10;
  b=(n-a)/10;
  if(a==9||b==9){
    std::cout << "Yes" << '\n';
  }else{
    std::cout << "No" << '\n';
  }
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define all(x) (x).begin(),(x).end()
using namespace std;
const int INF=1145141919,MOD=1e9+7;
const long long LINF=1145141919810364364;

int main(){
	long long a,b; cin>>a>>b;
	cout<<(abs(a-b)<2?"Brown":"Alice")<<endl;
	return 0;
}


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

#define MAXN (1000010)
#define mod (1000000007)
#define ll long long

int n;
ll dp[MAXN], sum;

int main(){
	scanf("%d", &n);
	dp[1] = n;
	dp[2] = (dp[1] + (1ll) * (n - 1) * (n - 1) + (n - 1)) % mod;
	sum = dp[1] + dp[2];
	for(int i = 3; i <= n; ++ i){
		dp[i] = ((sum - dp[i - 2] + (1ll) * (n - 1) * (n - 1) + (n - i + 2)) % mod + mod) % mod;
		sum = (sum + dp[i]) % mod;
	}
	printf("%lld\n", dp[n]);
	return 0;
}

Measured memory_bytes: 8064
#include<iostream>
#include<string>
#include<math.h>
#include<algorithm>

using namespace std;

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define IN cin >>
#define OUT cout <<
#define INF 999999999


int main() {
	int x;
	IN x;

	if (x == 3) {
		OUT "YES";
		goto A;
	}
	if (x == 5) {
		OUT "YES";
		goto A;
	}
	if (x == 7) {
		OUT "YES";
		goto A;
	}
	OUT "NO";
A:

	return 0;
}

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

int main(){
  int a,b,c,d;
  scanf("%d%d%d%d",&a,&b,&c,&d);
  printf("%d",max(min(b,d)-max(a,c),0));
  return 0;

}

Measured memory_bytes: 256
#include<iostream>
#include<cmath>
#include<algorithm>
#include<vector>
#include<functional>
#include<string>
#include<iomanip>
#include<map>
#include<utility>
#include<string>
#include<unordered_map>
#include<queue>

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
int gcd(int a, int b){return b ? gcd(b, a%b) : a;}
int lcm(int a, int b){return a*b / gcd(a, b);}

int main(){
    ll q, h, s, d, n;
    cin >> q >> h >> s >> d >> n;

    ll min_3 = min(min(4*q, 2*h), s);
    cout << min(n*min_3, n/2*d+n%2*min_3) << endl;
    return 0;
}


Measured memory_bytes: 256
using System;
using static System.Console;
using System.Collections.Generic;
using System.Linq;

namespace Atcoder
{
    class Program
    {
        static void Main(string[] args)
        {
            var nums = InputNumList();
            WriteLine(nums[0] * nums[1] > nums[2] * nums[3] ? nums[0] * nums[1] : nums[2] * nums[3]);
        }

        static int InputNum()
        {
            return int.Parse(ReadLine());
        }
        static List<int> InputNumList()
        {
            return ReadLine().Split(' ').Select(int.Parse).ToList();
        }
    }
}



Measured memory_bytes: 11220
import java.io.*;
import java.util.*;

class MyScanner {
    private final InputStream in = System.in;
    private final byte[] buf = new byte[1024];
    private int p = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (p < buflen) {
            return true;
        }
        else {
            p = 0;
            try {
                buflen = in.read(buf);
            } catch (IOException e) {
                e.printStackTrace();
            }
            return buflen >= 1;
        }
    }
    private int readByte() {
        if (hasNextByte()) {
            return buf[p++];
        }
        else {
            return -1;
        }
    }
    private boolean isPrintableChar(int c) {
        return  33 <= c && c <= 126;
    }
    public boolean hasNext() {
        while (hasNextByte() && !isPrintableChar(buf[p])) p++;
        return hasNextByte();
    }
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
}

public class Main {
    public static void main(String[] args){
        MyScanner sc = new MyScanner();
        PrintWriter out = new PrintWriter(System.out);
        int n = Integer.parseInt(sc.next());
        long k = Long.parseLong(sc.next());
        Integer[][] a = new Integer[62][n + 1];
        int t = 1;
        for (int i = 1; i <= n; i++) a[0][i] = Integer.parseInt(sc.next());
        for (int i = 0; i < 61; i++) {
            for (int j = 1; j <= n; j++) {
                a[i + 1][j] = a[i][a[i][j]];
            }
            if ((k >> i & 1) == 1) t = a[i][t];
        }
        out.println(t);
        out.flush();
    }
}

Measured memory_bytes: 105012
import java.util.*;
public class Main
{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
if(n%2==0)
System.out.print("0.5000000000");
else
{
int a=n/2+1;
double d=(double)a/n;
System.out.format("%.10f",d);

}
}
}

Measured memory_bytes: 23252
#!/usr/bin/env python

import sys
import math
import itertools as it
from collections import deque

sys.setrecursionlimit(10000000)

N = input()

for i in range(N):
    lst = []
    while len(lst) < 9:
        lst_ = raw_input().split()
        for S in lst_:
            lst.append(int(S, 16))
    res = lst[8]
    lst = lst[:8]
    diff = (sum(lst) - res) % (1 << 32)
    diff_lst = []
    for i in range(32):
        D = 0
        for j in lst:
            if j & (1 << i) == 0:
                D += (1 << i)
            else:
                D -= (1 << i)
        if res & (1 << i) == 0:
            D -= (1 << i)
        else:
            D += (1 << i)
        D %= (1 << 32)
        diff_lst.append([D, 1 << i])
    L1 = [[diff, 0]]
    for i in range(16):
        P = diff_lst[i]
        L = []
        for p in L1:
            L.append([(p[0] + P[0]) % (1 << 32), p[1] + P[1]])
        L1 += L
    L2 = [[0, 0]]
    for i in range(16, 32):
        P = diff_lst[i]
        L = []
        for p in L2:
            L.append([(p[0] + P[0]) % (1 << 32), p[1] + P[1]])
        L2 += L
    L1.sort()
    L2.sort()
    if L1[0][0] == 0:
        print hex(L1[0][1])[2:]
        continue
    pos = len(L2) - 1
    for p in L1:
        while p[0] + L2[pos][0] > (1 << 32):
            pos -= 1
        if p[0] + L2[pos][0] == (1 << 32):
            print hex(p[1] + L2[pos][1])[2:]
            break


Measured memory_bytes: 27004
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int a, b;
  cin >> a >> b;
  int p = a*b%2;
  if ( p == 0 ){
    cout << "Even" << endl;
  }
  else {
    cout << "Odd" << endl;
  }
}

Measured memory_bytes: 256
//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("avx2")
// 293206GT
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <unordered_set>
#include <stack>
#include <string>
#include<algorithm>
#include <random>
#include <bitset>
#include <chrono>

typedef long long ll;
#define int ll
using namespace std;
#define put(a) cout << (a) << '\n'
#define sqr(x) (x) * (x)
typedef pair<int, int> pii;
typedef long double ld;
typedef pair<ld, ld> pld;
typedef unsigned long long ull;

typedef vector<int> vi;
typedef vector<pii> vpii;
#define rep(x, y, a) for (int x = (y); x < (int)(a); ++x)
#define all(a) a.begin(), a.end()
#define chkmax(a, b) a = max(a, (b))
#define chkmin(a, b) a = min(a, (b))


namespace IO {

    template<class A, class B>
    ostream &operator<<(ostream &out, vector<pair<A, B>> a);

    template<class A>
    ostream &operator<<(ostream &out, vector<A> a);

    template<class A, class B>
    ostream &operator<<(ostream &out, pair<A, B> a) {
        out << a.first << " " << a.second;
        return out;
    }

    template<class A, class B>
    ostream &operator<<(ostream &out, vector<pair<A, B>> a) {
        for (pair<A, B> x: a)
            out << x.first << " " << x.second << '\n';
        return out;
    }

    template<class A>
    ostream &operator<<(ostream &out, vector<A> a) {
        for (A x: a) out << x << ' ';
        return out;
    }

    template<class A, class B>
    istream &operator>>(istream &in, pair<A, B> &a) {
        in >> a.first >> a.second;
        return in;
    }

    template<class A>
    istream &operator>>(istream &in, vector<A> &a) {
        for (A &x: a) in >> x;
        return in;
    }
}
using namespace IO;


mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

struct Node {
    vector<int> next;
    int is_term;
    Node() {
        next.resize(26);
        next.assign(26, -1);
        is_term = 0;
    }
};
const int N = 1e6 + 3e5;
//const int N = 13;
vector<Node> trie(N);
int sz = 0;
void add(string s) {
    int v = 0;
    for (char c2 : s) {
        char c = c2 - 'a';
        if (trie[v].next[c] == -1) {
            trie[v].next[c] = ++sz;
        }
        v = trie[v].next[c];
    }
    ++trie[v].is_term;
}
void solve() {
    int n;
    cin >> n;
    vector<string>s(n);
    cin >> s;
    rep(i, 0, n) {
        reverse(all(s[i]));
        add(s[i]);
    }
    int ans = 0;
    rep(i, 0, n) {
        int v = 0;
        vi cnt(26);
        rep(j, 0, s[i].size()) ++cnt[s[i][j] - 'a'];
        rep(j, 0, s[i].size()) {
            rep(k, 0, 26) {
                if (trie[v].next[k] != -1 && cnt[k])
                ans += trie[trie[v].next[k]].is_term;
            }
            v = trie[v].next[s[i][j] - 'a'];
            --cnt[s[i][j] - 'a'];
        }
    }
    put(ans - n);
}


signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout.precision(30);
//    freopen("input.txt", "r", stdin);
    int q = 1;
//    cin >> q;

    while (q--) solve();
}


Measured memory_bytes: 332452
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;

int inputValue(){
    int a;
    cin >> a;
    return a;
};

void inputArray(int * p, int a){
    REP(i, a){
        cin >> p[i];
    }
};

void inputVector(vector<int> * p, int a){
    REP(i, a){
        int input;
        cin >> input;
        p -> push_back(input);
    }
}

ll inputLValue(){
    ll a;
    cin >> a;
    return a;
};

int main()
{
    int N = inputValue();
    string S;
    string T;
    cin >> S;
    cin >> T;
    string ans = "";

    REP(i, N){
        ans = ans + S[i] + T[i];
    }
    cout << ans << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
//ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
//clock_t start=clock();clock_t end=clock();cout<<(double)(end-start)/CLOCKS_PER_SEC<<endl;
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned int ui;
typedef pair<int,int> pii;
typedef pair<pii,int> ppii;
typedef pair<int,pii> pipi;
typedef pair<ll,ll> pll;
typedef pair<pll,ll> ppll;
typedef pair<ll,pll> plpl;
typedef tuple<ll,ll,ll> tl;
typedef pair<double,double> pdd;
typedef vector<vector<ll>> mat;
ll mod=1000000007;
ll mod2=998244353;
ll mod3=1000003;
ll mod4=998244853;
ll mod5=1000000009;
ll inf=1LL<<60;
double pi=3.141592653589793238462643383279L;
double eps=1e-14;
#define rep(i,m,n) for(ll i=m;i<n;i++)
#define rrep(i,n,m) for(ll i=n;i>=m;i--)
#define srep(itr,st) for(auto itr=st.begin();itr!=st.end();itr++)
#define mrep(itr,mp) for(auto itr=mp.begin();itr!=mp.end();itr++)
#define Max(a,b) a=max(a,b)
#define Min(a,b) a=min(a,b)
int dh[4]={1,-1,0,0};
int dw[4]={0,0,1,-1};
int ddh[8]={-1,-1,-1,0,0,1,1,1};
int ddw[8]={-1,0,1,-1,1,-1,0,1};
ll gcd(ll a,ll b){
    if(a<b)swap(a,b);
    if(b==0)return a;
    if(a%b==0)return b;
    return gcd(b,a%b);
}
ll Pow(ll n,ll k){
    ll ret=1;
    ll now=n;
    while(k>0){
        if(k&1)ret*=now;
        now*=now;
        k/=2;
    }
    return ret;
}
ll beki(ll n,ll k,ll md){
  ll ret=1;
  ll now=n;
  while(k>0){
    if(k%2==1){
      ret*=now;
      ret%=md;
    }
    now*=now;
    now%=md;
    k/=2;
  }
  return ret;
}
ll gyaku(ll n,ll md){
  return beki(n,md-2,md);
}
ll popcount(ll n){
    ll ret=0;
    ll u=n;
    while(u>0){
        ret+=u%2;
        u/=2;
        
    }
    return ret;
}
int main(){
    ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    ll n;cin>>n;
    ll ans=inf;
    for(ll i=1;i*i<=n;i++){
        if(n%i==0){
            Min(ans,i+n/i-2);
        }
    }
    cout<<ans<<endl;
}






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

int main()
{
    int x,y;
    cin>>x>>y;
    int leg1=x*4;
    int leg2=x*2;
    if(y==leg1||y==leg2)
    {
        cout<<"Yes\n";
    }
    else
    {
        for(int i=1;i<=x;i++)
        {
            if((i*2+(x-i)*4)==y)
            {
                cout<<"Yes\n";
                return 0;
            }
        }
        cout<<"No\n";
    }
}


Measured memory_bytes: 3636
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Queue;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		char[][] s = new char[n][n];
		for (int i = 0; i < n; i++) {
			s[i] = br.readLine().toCharArray();
		}
		br.close();

		int ans = 1;
		for (int k = 0; k < n; k++) {
			int[] dep = new int[n];
			Arrays.fill(dep, -1);
			Queue<Integer> que = new ArrayDeque<>();
			que.add(k);
			dep[k] = 1;
			while (!que.isEmpty()) {
				int cur = que.poll();
				for (int i = 0; i < n; i++) {
					if (s[cur][i] == '1') {
						if (dep[i] == -1) {
							dep[i] = dep[cur] + 1;
							ans = Math.max(ans, dep[i]);
							que.add(i);
						}
						if (dep[i] != dep[cur] - 1 && dep[i] != dep[cur] + 1) {
							System.out.println(-1);
							return;
						}
					}
				}
			}
		}
		System.out.println(ans);
	}
}


Measured memory_bytes: 25880
#include <bits/stdc++.h>
#define SZ(X) ((int)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define REP(I, N) for (int I = 0; I < (N); ++I)
#define REPP(I, A, B) for (int I = (A); I < (B); ++I)
#define RI(X) scanf("%d", &(X))
#define RII(X, Y) scanf("%d%d", &(X), &(Y))
#define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y), &(Z))
#define DRI(X) int (X); scanf("%d", &X)
#define DRII(X, Y) int X, Y; scanf("%d%d", &X, &Y)
#define DRIII(X, Y, Z) int X, Y, Z; scanf("%d%d%d", &X, &Y, &Z)
#define RS(X) scanf("%s", (X))
#define CASET int ___T, case_n = 1; scanf("%d ", &___T); while (___T-- > 0)
#define MP make_pair
#define PB push_back
#define MS0(X) memset((X), 0, sizeof((X)))
#define MS1(X) memset((X), -1, sizeof((X)))
#define LEN(X) strlen(X)
#define F first
#define S second
#define RF(x) freopen(x,"r",stdin)
#define WF(x) freopen(x,"w",stdout)
typedef long long LL;
using namespace std;
typedef pair<LL,LL> PLL;
typedef pair<int,int> PII;
const LL MOD = (LL)1e9+7;
const int SIZE = 2e5+5;
const LL INF = 1LL<<60;
const double eps = 1e-4;
const double PI=3.1415926535897932;

LL p[100009],q[100009];
int w[100009];

int main(){
	DRI(n);LL l,t;scanf("%lld%lld",&l,&t);
	LL s=0;
	REP(i,n){
		scanf("%lld",&p[i]);
		RI(w[i]);
		if(w[i]==1)q[i]=((p[i]+t)%l+l)%l,s++;
		if(w[i]==2)q[i]=((p[i]-t)%l+l)%l,s--;
	}
	sort(q,q+n);
	LL dv=s*t;
	REP(i,n){
		dv-=q[i]-p[i];
	}
	dv/=l;
	REP(i,n){
		printf("%lld\n",q[((i+dv)%n+n)%n]);
	}
}


Measured memory_bytes: 3200
values = [int(input()) for _ in range(int(input()))]
maxv = values[1] - values[0]
minv = values[0]

for val in values[1:]:
    maxv = max(maxv, val - minv)
    minv = min(minv, val)         # 今までの最小値を保持(自分と自分を比較しない様に、最大値の評価後に計算)
print(maxv)


Measured memory_bytes: 15096
#include <iostream>
#include <vector>
 
#define rep(i, N) for (LL i = 0; i < N; ++i)
typedef long long int LL;
 
using namespace std;
 
int main() {
    LL N, r = 0;
    vector<LL> H(100);
    cin >> N;
    rep(i, N) cin >> H[i];
    for (LL i = 0; i < N; ++i) {
        bool check = true;
        for (LL j = 0; j < i; ++j) {
            if (H[i] < H[j]) {
                check = false;
              	break;
            }
        }
        if (check) r++;
    }
 
    cout << r << endl;
    return 0;
}

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

bool q1(){
    int n,maxValue;
    cin >> n >> maxValue;
    if(n==0 && maxValue==0)return false;
    int value[n];
    int tempValue=0;
    int tempMax=0;
    for(int i=0;i<n;i++){
        cin >> value[i];
    }
    for(int top=0;top<n-1;top++){
    for(int i=1;i<n-top;i++){
        tempValue = value[top] + value[top+i];
        if(tempMax < tempValue && tempValue <= maxValue)tempMax=tempValue;
    }
    }
    if(tempMax==0){cout << "NONE" << "\n";return true;}
    cout << tempMax << "\n";return true;
}

int main()
{
    while(q1());
}



Measured memory_bytes: 3112
#include<cstdio>
#include<cstring>
#include<algorithm>
#define N 100010
#define inf 1000000
using namespace std;
struct edge{int x, y, next;}a[N*2];
int n, l, p[N], x, y, k, ff, L[N], R[N];
inline void add(int x, int y){a[++l].x=x; a[l].y=y; a[l].next=p[x]; p[x]=l;}
inline void dfs1(int x, int fa){
	for(int i=p[x]; i; i=a[i].next)if(fa!=a[i].y){
		dfs1(a[i].y, x);
		L[x]=max(L[x], L[a[i].y]-1); R[x]=min(R[x], R[a[i].y]+1);
	}
}
inline void dfs2(int x, int fa){
	for(int i=p[x]; i; i=a[i].next)if(fa!=a[i].y){
		L[a[i].y]=max(L[a[i].y], L[x]-1); R[a[i].y]=min(R[a[i].y], R[x]+1);
		if(L[x]==L[a[i].y])ff=0;
		dfs2(a[i].y, x);
	}
}
int main(){
	scanf("%d", &n);
	l=0; memset(p, 0, sizeof(p));
	for(int i=1; i<=n-1; i++){
		scanf("%d%d", &x, &y);
		add(x, y); add(y, x);
	}
	for(int i=1; i<=n; i++){L[i]=-inf; R[i]=inf;}
	scanf("%d", &k);
	for(int i=1; i<=k; i++){
		scanf("%d%d", &x, &y); L[x]=R[x]=y;
	}
	ff=1; dfs1(1, 0); dfs2(1, 0);
	if(!ff){printf("No"); return 0;}
	for(int i=1; i<=n; i++)if(L[i]>R[i]){printf("No"); return 0;}
	printf("Yes\n");
	for(int i=1; i<=n; i++)printf("%d\n", L[i]);
	return 0;
}

Measured memory_bytes: 6784