akhauriyash/Code-Regression huggingface dataset:
#include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "unordered_map"
#include "unordered_set"
#include "iomanip"
#include "cmath"
#include "random"
#include "bitset"
#include "cstdio"
#include "numeric"
#include "cassert"
#include "ctime"

using namespace std;

constexpr long long int MOD = 1000000007;
//constexpr int MOD = 1000000007;
//constexpr int MOD = 998244353;
//constexpr long long int MOD = 998244353;
constexpr long double EPS = 1e-8;

long long int N, M, K, L, R, H, W;
//int N, M, K, L, R, H, W;

map<string, int>mp;
map<string, int>n;

void func(string s, string t) {
	int num = 0;
	for (int i = 0; i < s.size(); i++) {
		if (s[i] == '(')num++;
		if (s[i] == ')')num--;
		if (s[i] == '[' && !num) {
			int st = i;
			int len = 1;
			for (int j = i + 1; j < s.size(); j++) {
				if (s[j] == ']') {
					len++;
					n[t]++;
					mp[t] += stoi(s.substr(i + 1, len - 2));
					func(s.substr(0+1, i-2), t + "0");
					func(s.substr(j + 2, s.size() - j - 3), t + "1");
					return;
				}
				else len++;
			}
		}
	}
}

string Ans(string s) {
	if (n[s] < 2)return "";
	auto t = s + "0";
	auto u = s + "1";
	return "(" + Ans(t) + ")" + "[" + to_string(mp[s]) + "]" + "(" + Ans(u) + ")";
}

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

	string s, t;
	cin >> s >> t;
	vector<vector<int>>v;
	vector<vector<int>>w;
	func(s, "");
	func(t, "");
	cout << Ans("") << endl;
}



Measured memory_bytes: 3480
#include <stdio.h>
int main(){
	int a,b,c;
	scanf("%d %d %d", &a, &b, &c);
	if(a == b && b == c && a == c){
		printf("No");
	} else if(a!= b && b!=c && a!=c){
		printf("No");
	} else {
		printf("Yes");
	}
	return 0;
}

Measured memory_bytes: 3144
#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 reps(i,a,b) for(int i= a; i < b; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;

ll fac(int n) {
  ll ans = 1;
  while(n) {
    ans *= n;
    n--;
  }
  return ans;
}

int main()
{
  int n;
  cin >> n;
  ll d = fac(n);
  vector<pair<int, int>> vec;
  rep(i, n) {
    int x, y;
    cin >> x >> y;
    vec.push_back(make_pair(x, y));
  }
  vector<double> edges;
  rep(i, n) {
    reps(j, i+1, n) {
      int x, y;
      x = vec[i].first - vec[j].first;
      y = vec[i].second - vec[j].second;
      edges.push_back(sqrt(x*x + y*y));
    }
  }
  double ans = 0;
  ll freq = fac(n-1);
  rep(i, (int)edges.size()) {
    ans += edges[i] * 2 * freq;
  }
  printf("%.8f\n", ans/d);


  return 0;
}

Measured memory_bytes: 3864
import java.util.*;
import static java.lang.System.*;
import static java.lang.Math.*;

public class Main {
    static int n;
    static int[][] t;
    static HashMap<String, Integer> map;
    static final int MAX = 300;
    static final int INF = -(1<<29);
    static void init(){
        map = new HashMap<String, Integer>();
        t = new int[MAX][MAX];
        for(int[] j : t) Arrays.fill(j, INF);
    }
    static int idxAt(String s){
        if(!map.containsKey(s)){
            map.put(s, map.size());
        }
        return map.get(s);
    }

    static void solve(){
        for(int k=0;k<n;k++){
            for(int i=0;i<n;i++){
                for(int j=0;j<n;j++){
                    if(t[i][k] == INF || t[k][j] == INF) continue;
                    if(t[i][j] == INF) t[i][j] = t[i][k] + t[k][j];
                    else if(t[i][j] != t[i][k] + t[k][j]){
                        out.println("No");
                        return;
                    }
                }
            }
        }
        out.println("Yes");
    }

    public static void main(String[] args) {
        Scanner sc = new Scanner(in);
        while(true){
            n = sc.nextInt();
            if(n == 0) break;

            init();
            for(int i=0;i<n;i++){
                String a = sc.next();
                String b = sc.next();
                sc.next();
                String c = sc.next();
                String d = sc.next();

                c = c.substring(c.indexOf("^")+1);

                int ii = idxAt(b);
                int jj = idxAt(d);


                int cc = new Integer(c);
                t[ii][jj] = cc;
                t[jj][ii] = -cc;
            }
            n = map.size();
            solve();
        }
    }

}

Measured memory_bytes: 16000
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define LOOP(i,x,n) for(int i=x;i<n;i++)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define MP make_pair
#define FR first
#define SC second
#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=1000000009;


signed main(){
  string s;
  while(cin>>s){
    REP(i,s.size()){
      if(s[i]=='@'){
        int tmp=s[i+1]-'0';
        REP(j,tmp)cout<<s[i+2];
        i+=2;
      }else cout<<s[i];
    }
    cout<<endl;
  }
  return 0;
}



Measured memory_bytes: 3136
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize ("unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
 
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
 
using namespace __gnu_pbds;
using namespace std;
#define gcd(a,b) __gcd(a,b)
#define ll long long int
#define ld unsigned long long int
#define pi pair<ll,ll>
#define pb push_back
#define pf push_front
#define pu push
#define po pop
#define fi first
#define se second
#define mk make_pair
#define ve vector
#define lr(n) for(ll i=0;i<n;i++)
#define all(x) x.begin(),x.end()
#define be begin
#define sz(a) (ll)a.size()
#define INF 1e18
 
typedef tree <ll, null_type, less <ll>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
// order_of_key(val): returns the number of values less than val
// find_by_order(k): returns an iterator to the kth largest element (0-based)
 
// ll mod=998244353;
// ll gcd(ll a, ll b){
//     if(a<b) swap(a,b);
//     if(b==0) return a;
//     return gcd(b,a%b);
// }
 
// ll fun(ll x, ll y){
//     ll rem=1;
//     while(y!=0){
//         if(y%2==1){
//             rem=(rem*x)%mod;
//         }
//         x=(x*x)%mod;
//         y/=2;
//     }
//     return rem;
// }

ll dp[3001][3001];

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	string s,t;
	cin>>s>>t;
	ll n1=s.length(), n2=t.length();
	for(ll i=0;i<=n2;i++) dp[0][i]=0;
	for(ll i=0;i<=n1;i++) dp[i][0]=0;
	for(ll i=1;i<=n1;i++){
		for(ll j=1;j<=n2;j++){
			if(s[i-1]==t[j-1]){
				dp[i][j]=1+dp[i-1][j-1];
			}
			else{
				dp[i][j]=max(dp[i-1][j],dp[i][j-1]);
			}
		}
	}
	ve<ll>ar;
	ll ans=dp[n1][n2];
	for(ll i=n1,j1=n2;i>=1;i--){
		if(ans==0) break;
		for(ll j=j1;j>=1;j--){
			if(dp[i][j]!=ans) break;
			if(s[i-1]==t[j-1]){
				ar.pb(i-1); ans--; j1=j-1; break;
			}
		}
	}
	for(ll i=sz(ar)-1;i>=0;i--){
		cout << s[ar[i]];
	}
	cout << "\n";
	return 0;
}

Measured memory_bytes: 70656
import collections
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    S = list(input())
    e_right = collections.Counter(S)["E"]
    w_left = 0
    vals = set([])
    for i in range(N):
        if S[i] == "E":
            e_right -= 1
        vals.add(w_left + e_right)
        if S[i] == "W":
            w_left += 1

    print(min(vals))

if __name__ == '__main__':
    main()


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

int main() {
  int n,k,cnt=0;
  cin>>n>>k;
  while(n!=0){
    n/=k;
    cnt++;
  }
  cout<<cnt<<endl;
}

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

const int N= 200001;
int parent[N];
int rnk[N];

void make_set(int r){
    parent[r]=r;
    rnk[r]=0;
}

int find_set(int r){
    if(parent[r]==r){
        return r;
    }else{
        return parent[r]=find_set(parent[r]);
    }
}

void union_set(int a, int b){
    a= find_set(a);
    b=find_set(b);
    if(a!=b){
        if(rnk[a]<rnk[b]){
            swap(a,b);
        }
        parent[b]=a;
        if(rnk[a]==rnk[b]){
            rnk[a]++;
        }
    }
}

int main(){
    int n,q;
    cin>>n>>q;
    for(int i=0;i<n;++i){
        make_set(i);
    }
    for(int i=0; i<q; ++i){
        int u,v;
        cin>>u>>v;
        union_set(u,v);    
    }
    unordered_set<int> cmpts;
    unordered_set<int>::iterator it;
    int count=0;
    for(int i=0; i<n; i++){
        int v= find_set(i);
        it=cmpts.find(v);
        if(it==cmpts.end()){
            count++;
            cmpts.insert(v);
        }
    }
    cout<<count-1<<endl;
    return 0;
}

Measured memory_bytes: 7452
#include<bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rng(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,b) rng(i,0,b)
#define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define per(i,b) gnr(i,0,b)
#define bg begin()
#define ed end()
#define rbg rbegin()
#define red rend()
#define all(x) x.bg,x.ed
#define rall(x) x.rbg,x.red
#define pb push_back
#define pf push_front
#define eb emplace_back
using namespace std;
typedef long long ll;
template<class t,class u> bool chmax(t&a,u b){if(a<b){a=b; return true;} return false;}
template<class t,class u> bool chmin(t&a,u b){if(a>b){a=b; return true;} return false;}
template<class t,class u> t MAX(t a,u b){if(a>=b) return a; return b;}
template<class t,class u> t MIN(t a,u b){if(a<=b) return a; return b;}
template<class t> int SIZE(t s){return (int)s.size();}
template<class t> using vc=vector<t>;
template<class t> using vvc=vc<vc<t>>;
using vvi=vc<vc<int>>;
using pi=pair<int,int>;
using vi=vc<int>;
void yes(){ cout << "Yes" << endl; }
void no(){ cout << "No" << endl; }
const long long INF = 1LL << 60;

int main(){
    cout << fixed << setprecision(20);
    string s,t; cin >> s >> t;
    int si = SIZE(s);
    int ans = 0;
    rep(i,si){
        if(s[i] != t[i]) ans++;
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 4084
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
class Solve{
    public Solve(){}
    StringBuilder sb;
    public static int Main(){
        new Solve().Run();
        return 0;
    }
    void Run(){
        sb = new StringBuilder();
        Calc();
        Console.Write(sb.ToString());
    }
    void Calc(){
        string[] str = Console.ReadLine().Split(' ');
        int N = int.Parse(str[0]);
        int K = int.Parse(str[1]);
        long L = long.Parse(str[2]);
        long R = long.Parse(str[3]);
        long[] A = new long[N/2];
        str = Console.ReadLine().Split(' ');
        for(int i=0;i<N/2;i++){
            A[i] = long.Parse(str[i]);
        }
        long[] B = new long[N-N/2];
        for(int i=0;i<N-N/2;i++){
            B[i] = long.Parse(str[i+N/2]);
        }
        List<long>[] AL = new List<long>[N/2+1];
        for(int i=0;i<N/2+1;i++){
            AL[i] = new List<long>();
        }
        List<long>[] BL = new List<long>[N-N/2+1];
        for(int i=0;i<N-N/2+1;i++){
            BL[i] = new List<long>();
        }
        for(int i=0;i<1<<(N/2);i++){
            long V = 0;
            int c = 0;
            for(int j=0;j<N/2;j++){
                if((i & (1 << j)) != 0){
                    c++;
                    V += A[j];
                }
            }
            AL[c].Add(V);
        }
        for(int i=0;i<1<<(N-N/2);i++){
            long V = 0;
            int c = 0;
            for(int j=0;j<N-N/2;j++){
                if((i & (1 << j)) != 0){
                    c++;
                    V += B[j];
                }
            }
            BL[c].Add(V);
        }
        long[][] AA = new long[N/2+1][];
        for(int i=0;i<N/2+1;i++){
            AA[i] = AL[i].ToArray();
            Array.Sort(AA[i]);
        }
        long[][] BA = new long[N-N/2+1][];
        for(int i=0;i<N-N/2+1;i++){
            BA[i] = BL[i].ToArray();
            Array.Sort(BA[i]);
        }
        long count = 0;
        for(int l=Math.Max(0,K-BL.Length+1);K-l>=Math.Max(0,K-AL.Length+1);l++){
            int lp = 0;
            int rp = 0;
            int q = BA[K-l].Length-1;
            for(;q>=0;q--){
                while(lp < AA[l].Length && AA[l][lp] + BA[K-l][q] < L){
                    lp++;
                }
                while(rp < AA[l].Length && AA[l][rp] + BA[K-l][q] <= R){
                    rp++;
                }
                count += rp - lp;
            }
        }
        sb.Append(count+"\n");
    }
}

Measured memory_bytes: 52032
#include <bits/stdc++.h>
#define int long long
using namespace std;

signed main(){
  
  int A, B;
  cin>>A>>B;
  
  for(int x=1;x<100000;x++){
    
    if( (int)(x * 0.08) == A && (int)(x*0.1) == B ){
      cout<<x<<endl;
      return 0;
    }
    
  }

  cout<<-1<<endl;
  
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
constexpr long double EPS = 1e-15;
const long double PI = acos(-1);
constexpr int inf = 1e9;
constexpr ll INF = 2e18;
constexpr ll MOD = 1e9+7;
constexpr ll MOD1 = 998244353;
typedef pair<ll,ll> P;
//#define all(v) (v).begin(), (v).end()
#define rep(i,a,b) for (int i = (a); i < (b); i++)
#define REP(i,n) rep(i,0,n)
#define sz(s) (s).size()
#define pb push_back
#define fi first
#define se second
//#define mp make_pair

int n,k;
vector<pair<int,int>> v;

void input() {
    cin >> n >> k;
}

void solve() {
    if (k > (n - 1) * (n - 2) / 2) {
        cout << -1 << endl;
        return;
    }
    for (int i = 1; i <= n - 1; i++) {
        v.pb({i,n});
    }
    k = (n - 1) * (n - 2) / 2 - k;
    for (int i = 1; i <= n - 1; i++) {
        for (int j = i + 1; j <= n - 1; j++) {
            if (i == j) continue;
            if (k) {
                v.pb({i,j});
                k--;
            } else break;
        }
        if (!k) break;
    }
    cout << sz(v) << endl;
    REP(i,sz(v)) {
        cout << v[i].fi << " " << v[i].se << endl;
    }
}

int main(int argc, char *argv[]){
    input();
    solve();
    return 0;
}


Measured memory_bytes: 384
fun main(args: Array<String>) {
    val (A, B, C, D) = readLine()!!.split(" ").map { it.toInt() }

    var takahashi = A to B
    var aoki = C to D

    while (true) {
        aoki = (aoki.first - takahashi.second) to aoki.second
        if (aoki.first <= 0){
            println("Yes")
            break
        }

        takahashi = (takahashi.first - aoki.second) to takahashi.second
        if (takahashi.first <= 0){
            println("No")
            break
        }
    }
}

Measured memory_bytes: 36324
#include <iostream>
#include <math.h>
#include <vector>
#include <stack>
#include <cstdio>
#include <string>
#include <bitset>
#include <list>
#include <set>
#include <algorithm>
#include <numeric>
#include <tuple>
#include <unordered_map>
#include <array>
using namespace std;
//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main() {
	int N;
	int sum = 0;
	unordered_map<int, int> count;

	cin >> N;
	vector<int> a(N);
	for (int i = 0; i < N; i++) {
		cin >> a.at(i);
		count[a.at(i)] = 0;
	}
	for (int j = 0; j < N; j++) count[a.at(j)]++;
	for (auto it = count.begin(); it != count.end(); it++) sum += (*it).second >= (*it).first ? (*it).second - (*it).first : (*it).second;
	cout <<sum;
	return 0;
}


Measured memory_bytes: 4644
#include <bits/stdc++.h>
using namespace std;
						
#define fast_cin() ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define endl '\n'
#define int long long

const int N = 5e5 + 5, mod = 1e9 + 7;

int fac[N], inv[N], inv_fac[N];

int binpow(int x, int y) {
	int res = 1LL;
	x %= mod;
	while (y) {
		if (y & 1) res = (res * x) % mod;
		y >>= 1;
		x = (x * x) % mod;
	}
	return res;
}

int mod_inv(int x) {
	return binpow(x, mod - 2);
}

void initFacs() {
	fac[0] = 1;
	for (int i = 1; i < N; i++)
		fac[i] = (i * fac[i - 1]) % mod;
	inv[1] = 1;
	for (int i = 2; i < N; i++)
		inv[i] = (mod - (mod / i) * inv[mod % i]) % mod;
	inv_fac[N - 1] = mod_inv(fac[N - 1]);
	for (int i = N - 2; i >= 0; i--) {
		inv_fac[i] = (inv_fac[i + 1] * (i + 1)) % mod;
	}
}

int choose(int n, int r) {
	if (n < r) return 0;
	return (fac[n] * ((inv_fac[r] * inv_fac[n - r]) % mod)) % mod;
}
				
int32_t main() {
	fast_cin();  
	initFacs();
	int n, m; cin >> n >> m;
	int a = (choose(m, n) * fac[n]) % mod, b = a;
	for (int i = 1; i <= n; ++i) {
		int temp = choose(n, i) * choose(m - i, n - i); temp %= mod;
		temp *= fac[n - i]; temp %= mod;
		if (i & 1) b += mod - temp;
		else b += temp;
		b %= mod;
	}
	cout << (a * b) % mod << endl;
	return 0;
}

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

int main(){
  int n;
  char c;
  int card[9];
  int hand[32];
  cin >> n;
  for(;n>0;n--){
    for(int i=0;i<30;i++)
      hand[i] = 0;
    for(int i=0;i<9;i++){
      cin >> card[i];
    }
    for(int i=0;i<9;i++){
      cin >> c;
      if (c=='G')
	card[i] += 10;
      if (c=='B')
	card[i] += 10;
    }
    for(int i=0;i<9;i++)
      hand[card[i]]++;
    for(int i=0;i<30;i++){
      while(hand[i]%3){
	hand[i]--;
	hand[i+1]--;
	hand[i+2]--;
      }
    }
    int chk;
    for(chk=0;chk<30;chk++)
      if (hand[chk]<0)
	break;
    if (chk==30)
      cout << 1 << endl;
    else
      cout << 0 << endl;
  }
  return 0;
}

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

public class Main {
  public static void main(String[] args) throws IOException{
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int k = Integer.parseInt(str[1]);
    String[] h_str = in.readLine().split(" ");
    int[] h = new int[n];
    int count = 0;
    
    for(int i = 0; i < n; i++) {
      h[i] = Integer.parseInt(h_str[i]);
      if(h[i]>=k)
        count+=1;
    }
    System.out.println(count);
  }
}

Measured memory_bytes: 33492
n, m = gets.split.map(&:to_i)
ans = Array.new(n, 0)

m.times do |_i|
  s, c = gets.split.map(&:to_i)

  if n >= 2 && s == 1 && c == 0
    ans[0] = -1
  elsif ans[s - 1] != 0 && ans[s - 1] != c
    ans[s - 1] = -1
  else
    ans[s - 1] = c
  end
end

ans[0] = 1 if n >= 2 && ans[0] == 0
puts ans.any? { |v| v == -1 } ? -1 : ans.join

Measured memory_bytes: 1788
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <fstream>
#include <string>
#include <math.h>
#include <cstdlib>
#include <istream>
#include <sstream>
#include <cctype>
#include <iomanip>
//cout << fixed << setprecision(20) << *** << endl;
#define rep(i,N) for(int i=0;i<(int)N;++i)
typedef long long ll;
using namespace std;
int main()
{
	ll N,A,B;
	vector<ll>MIN(3,0);
	cin>>N>>A>>B;
	rep(i,N){
		ll t;
		cin>>t;
		if(t<=A)MIN[0]++;
		if(t>A&&t<=B)MIN[1]++;
		if(t>B)MIN[2]++;
	}
	sort(MIN.begin(),MIN.end());
	cout<<MIN[0]<<endl;
}

Measured memory_bytes: 384
#include <iostream>
#include <algorithm>
#define MOD 1000000007
using namespace std;


int main() {
	// your code goes here

	int n,k;
	cin>>n>>k;
	
	
	long long dp[n+1][n+1];
	
	for(int i=0;i<=n;i++){
		
		dp[i][0]=1;
		dp[i][i]=1;
		
		for(int j=1; j<i ; j++)
			dp[i][j] = (dp[i-1][j] + dp[i-1][j-1]) % MOD;		
		
		
		
	}
	
	
	
	for(int i=1;i<=k;i++){
		
		if(n - k + 1 < i){
			
			cout<<0<<endl;
		
			continue;
		}
		
		cout<<(dp[n-k+1][i]  *  dp[k-1][i-1] ) % MOD  << endl;
		
		
	}
	return 0;
}

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

public class Main {

	void solve() {
		String s = in.nextToken();
		out.println(s.substring(0, s.length() - 8));
	}

	FastScanner in;
	PrintWriter out;

	void run() {
		in = new FastScanner();
		out = new PrintWriter(System.out);
		solve();
		out.close();
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

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

		public FastScanner(String s) {
			try {
				br = new BufferedReader(new FileReader(s));
			} catch (FileNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

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

		public int nextInt() {
			return Integer.parseInt(nextToken());
		}

		public long nextLong() {
			return Long.parseLong(nextToken());
		}

		public double nextDouble() {
			return Double.parseDouble(nextToken());
		}
	}

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


Measured memory_bytes: 21204
#include <bits/stdc++.h>
#define SORT(x) sort((x).begin(), (x).end())
#define ALL(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < n; i++)
#define reps(i, m, n) for (ll i = m; i < n; i++)
#define repr(i, m, n) for (ll i = m; i >= n; i--)
#define de(x) cout << #x << "=" << x << endl;
template <class T> bool maxi(T &a, const T &b) {
    if (a < b) { a = b; return 1;} return 0;}
template <class T> bool mini(T &a, const T &b) {
    if (b < a) { a = b; return 1;} return 0;}
#define dame {cout<< "-1" <<"\n"; return;}
#define INF2 1000000000000000037
#define INF  1000000007
#define MOD  1000000007
#define PI (acos(-1))
using namespace std;
using ll = long long;
using ld = long double;
using P  = pair<ll,ll>;
//--GLOBAL---------------------------------
ll modpow(ll a, ll n=MOD-2, ll mod=MOD){ // a^n % MOD の計算
    ll res = 1;
    while (n > 0){
        if(n & 1) res = res * a % mod;
        a = a * a  % mod;
        n >>= 1;
    }
    return res;
}
struct edge{ll to;};
struct graph{
    ll N;
    vector<vector<edge> > G;
    vector<bool> used;
    vector<vector<ll>> bubunode;

    graph(ll n): N(n), G(N), used(N,false), bubunode(N){}

    void add_edge(ll s, ll t){
        G[s].emplace_back((edge){t});
        G[t].emplace_back((edge){s}); //無向ならON
    }

    ll dfs(ll v=0){
        used[v]=true;
        ll ct=1;
        for(auto E : G[v]){
            if(!used[E.to]){
                ll x=dfs(E.to);
                bubunode[v].emplace_back(x);
                ct+=x;
            }
        }
        ll y=N-ct;
        if(y>0) bubunode[v].emplace_back(y);
        return ct;
    }
};

//--MAIN-----------------------------------
void Main() {
    ll N; cin>>N;
    graph g(N);
    rep(i,N-1){
        ll a,b; cin>>a>>b;
        g.add_edge(--a,--b);
    }
    g.dfs();
    ll ans=0;
    rep(i,N){
        auto ve=g.bubunode[i];
        if(ve.size()<=1) continue;
        ll ans2=modpow(2,N-1)-1;
        for(auto x: ve){
            ans2-=modpow(2,x)-1;
            ans2+=MOD;
            ans2%=MOD;
        }
        ans+=ans2;
        ans%=MOD;
    }
    ll gya=modpow(2,N);
    gya=modpow(gya);
    ans*=gya;
    ans%=MOD;
    cout<< ans <<"\n";
}

//--START----------------------------------
int main() {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    Main();
}
//-----------------------------------------


Measured memory_bytes: 28160
#include<iostream>
#include <algorithm>
#include <string>
#include<vector>
#include<tuple>

//AtCoderC++.cpp

using namespace std;

template<typename T> void Show(const vector<vector<T>>& v, string delimiter = " ") {
	for (int i = 0; i < v.size(); i++) {
		for (int j = 0; j < v[i].size(); j++) {
			cout << v[i][j];
			if (j != v[i].size() - 1) {
				cout << delimiter;
			} else {
				cout << endl;
			}
		}
	}
}
template<typename T> void Show(const vector<T>& v, string delimiter = " ") {
	for (int i = 0; i < v.size(); i++) {
		cout << v[i];
		if (i != v.size() - 1) {
			cout << delimiter;
		} else {
			cout << endl;
		}
	}
}
template<typename T> vector<T> getUniform(T value, int n) {
	vector<vector<T>> ts;
	ts.resize(n);
	for (int i = 0; i < n; i++) {
		ts[i] = value;
	}
	return ts;
}
template<typename T> vector<vector<T>> getUniform(T value, int row, int col) {
	vector<vector<T>> ts;
	ts.resize(row);
	for (int i = 0; i < row; i++) {
		ts[i].resize(col);
		for (int j = 0; j < col; j++) {
			ts[i][j] = value;
		}
	}
	return ts;
}
bool All(vector<vector<bool>> ts) {
	int h = ts.size();
	int w = ts[0].size();
	for (int i = 0; i < h; i++)
		for (int j = 0; j < w; j++)
			if (!ts[i][j])return false;
	return true;
}

vector<string> split(string& content, char delim) {
	auto ss = vector<string>();
	string s = "";
	for (size_t i = 0; i < content.length(); i++) {
		if (content[i] == delim) {
			ss.push_back(s);
			s = "";
			continue;
		}
		s += content[i];
	}
	if (s != "")ss.push_back(s);
	return ss;
}

int main() {
	int A, B, T; cin >> A >> B >> T;
	cout << T / A * B << endl;
	return 0;
}



Measured memory_bytes: 256
#include <stdio.h>
 
 
int main(){
 
  int i,j,n,m;
  long min = 100000000000,ans = -100000000000;
  scanf("%d",&n);
 
  for(i = 0;i < n;i++){
      scanf("%d",&m);
      if(m - min > ans ) ans = m - min;
      if(m < min) min = m;
  }
 
  printf("%ld\n",ans);
 
  return 0;
}

Measured memory_bytes: 2752
/**
*	created: 29.08.2020 20:57:32
**/
#include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// using bint = boost::multiprecision::cpp_int;
using namespace std;
using ll = long long;
using P = pair<int,int>;
// #define endl '\n'
#define int long long
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define rep2(i,s,n) for (int i = (s); i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define pcnt(bit) __builtin_popcountll(bit)
const long double pi = acos(-1.0);
const int MAX = 1000010;
const int INF = 1ll << 60;
const int MOD = 1000000007;
// const int MOD = 998244353;
template<typename T> bool chmax(T &a, const T &b) {if (a < b) {a = b; return 1;} return 0;}
template<typename T> bool chmin(T &a, const T &b) {if (b < a) {a = b; return 1;} return 0;}
template<typename T> T pow(T a, ll n) {T r(1); while(n) {if (n & 1) r *= a; a *= a; n >>= 1;} return r;}
struct faster_io {faster_io() {cin.tie(0); ios_base::sync_with_stdio(false);}} faster_io_;

signed main() {
    int a, b, c; cin >> a >> b >> c;
    if (b * c >= a) cout << "Yes" << endl;
    else cout << "No" << endl;
    return 0;
}

Measured memory_bytes: 3648
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <functional>
#include <cmath>
#include <set>
#include <queue>
#include <deque>
#include <vector>
#include <climits>
#include <sstream>
#include <iomanip>
#include <map>
#include <stack>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;

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

	auto isBipartite = true;
	stack<int> s;
	vector<int> part(N);
	s.push(0);
	part[0] = 1;
	int partNum[] = { 0, 0, 1 };
	while (!s.empty())
	{
		auto u = s.top();
		s.pop();
		for (auto v : G[u])
		{
			if (part[v] != 0)
			{
				if (part[v] != -part[u])
				{
					isBipartite = false;
					break;
				}
				continue;
			}

			part[v] = -part[u];
			++partNum[part[v] + 1];
			s.push(v);
		}

		if (!isBipartite)
		{
			break;
		}
	}

	if (!isBipartite)
	{
		cout << (ll)N * (N - 1) / 2 - M << endl;
	}
	else
	{
		cout << (ll)partNum[0] * partNum[2] - M << endl;
	}

	return 0;
}

Measured memory_bytes: 9148
#include<bits/stdc++.h>
using namespace std;
const int N=2e5+5,INF=1e9;
struct Point{int x,y;}p[N];
int n,m,flag,a[N];
inline bool cmp(Point a,Point b){return a.x<b.x;}
inline bool check(int x,int y){if(flag)return x>=y;return x<=y;}
inline int binary(int x)
{
	int l=0,r=m;
	while(l<r)
	{
		int mid=(l+r+1)>>1;
		if(check(a[mid],x))l=mid;
		else r=mid-1;
	}
	return l;
}
int main()
{
	int x1,y1,x2,y2;
	scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
	if(x1>x2)swap(x1,x2),swap(y1,y2);
	if(y1>y2)flag=1;
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
	{
		int x,y;scanf("%d%d",&x,&y);
		if(x>=x1&&x<=x2&&y>=min(y1,y2)&&y<=max(y1,y2))p[++m]=(Point){x,y};
	}
	sort(p+1,p+m+1,cmp);
	a[0]=flag?INF:-INF;
	for(int i=1;i<=m;i++)a[i]=flag?-INF:INF;
	for(int i=1;i<=m;i++)a[binary(p[i].y)+1]=p[i].y;
	int pos=m;while(a[pos]==(flag?-INF:INF))pos--;
	double ans=100.0*(abs(x1-x2)+abs(y1-y2));
	ans=ans-4.2920367320510338076867830836025*pos;
	if(pos==x2-x1+1||pos==max(y1,y2)-min(y1,y2)+1)ans+=15.707963267948966192313216916398;
	printf("%.15lf\n",ans);
	return 0;
}

Measured memory_bytes: 2560
#include<iostream>
#include<cmath>
#include<iomanip>

int main(void)
{
	using namespace std;
	while(1)
	{
		double a_2 = 0, sum = 0;
		int n;
		cin >> n;
		if(n == 0)
			break;
		int s[n];
		for(int i = 0; i < n; i++)
		{
			cin >> s[i];
			sum += s[i];
		}
		double m = sum / n;
		for(int i = 0; i < n; i++)
		{
			a_2 += (s[i] - m) * (s[i] - m);
		}
		cout << fixed << setprecision(8) << sqrt(a_2 / n) << endl;
	}
}


Measured memory_bytes: 3296
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;
import java.util.TreeSet;

/**
 * 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;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		Task solver = new Task();
		solver.solve(1, in, out);
		out.close();
	}

	static class Task {
		public void solve(int testNumber, InputReader in, PrintWriter out) {
			int n = in.nextInt();
			int[] x = new int[n];
			for (int i = 0; i < n; i++) {
				x[i] = in.nextInt();
			}
			int[] arrSorted = x.clone();
			Arrays.sort(arrSorted);
			int middle = arrSorted[n / 2];
			int nextMiddle = arrSorted[n / 2 - 1];
			for (int i = 0; i < n; i++) {
				int number = x[i];
				if (number < middle) {
					out.println(middle);
				} else if (number > middle) {
					out.println(nextMiddle);
				} else {
					out.println(nextMiddle);
				}
			}
		}
	}

	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream), 32768);
			tokenizer = null;
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public char nextChar() {
			return next().charAt(0);
		}

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

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

	}
}


Measured memory_bytes: 55076
n = int(input())
p = [int(i) for i in input().split()]
count = 0
for i in range(1,n-1):
    if (p[i-1] < p[i] < p[i+1]) or (p[i+1] < p[i] < p[i-1]):
        count = count + 1
print(count)

Measured memory_bytes: 3060
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ull unsigned long long int
#define cincout ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);

int main()
{
    cincout;

	int a,b;
	cin>>a>>b;

	if(a>9 || b>9){
        cout<<-1<<endl;
	}

	else{
        cout<<a*b<<endl;
	}

	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ALL(A) (A).begin(), (A).end()
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)

using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

int dx[] = { 0, 1, -1, 0, 1, -1, 1, -1 };  // i<4:4way i<8:8way
int dy[] = { 1, 0, 0, -1, 1, -1, -1, 1 };

const ll mod = 1e9 + 7;
const ll INF = -1 * ((1LL << 63) + 1);
const int inf = -1 * ((1 << 31) + 1);

int main(void){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
    double a,b,c,L;
    cin >> L;
    // a*b*c = x; a+b+c = L
    cout << pow(L/3,3) << endl;
}

Measured memory_bytes: 256
def calc(s,t):
       return (t-s)**2

n=int(input())
X=sorted(list(map(int,input().split())))
inf=float("inf")

ans=inf
for i in range(X[0],X[-1]+1):
       u=0
       for j in X:
              u+=calc(i,j)
       ans=min(ans,u)
print(ans)

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

int main() {
    int n, m, A[100][100], b[100], c[100];

    cin >> n >> m;
    for(int i = 0; i < n; i++)
        for(int j = 0; j < m; j++) cin >> A[i][j];
    for(int i = 0; i < m; i++) cin >> b[i];

    for(int i = 0; i < n; i++) {
        c[i] = 0;
        for(int j = 0; j < m; j++) {
            c[i] += A[i][j] *b[j];
        }
    }

    for(int i = 0; i < n; i++) {
        cout << c[i] << endl;
    }

    return 0;
}


Measured memory_bytes: 3108
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define rep(i, n) for(i = 0; i < (n); i++)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define MOD 1000000007
#define INF 1 << 30

using namespace std;
typedef long long ll;
typedef pair<int, int> pp;

int main(void) {
	int num, i, a, b, ans;
	cin >> a >> b;
	rep(ans, 2000) {
		if (ans * 8 / 100 == a && ans / 10 == b)
			break;
	}
	if (ans == 2000)
		printf("-1\n");
	else
		cout << ans << "\n";
	return 0;
}

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

import numpy as np

def main():
  MOD = 10**9+7
  n = int(input())
  A = np.array(input().split(), dtype=np.int64)
  ans = 0
  for j in range(61):
    X = A>>j & 1
    t = np.count_nonzero(X)
    ans += pow(2, j, MOD) * t * (n-t) % MOD
  print(ans%MOD)
  
if __name__ == "__main__":
  main()

Measured memory_bytes: 62716
use std::str::FromStr;
use std::fmt::Debug;
use std::cmp;

#[allow(dead_code)]
fn read_as_vec<T>() -> Vec<T>
where T: FromStr, <T as FromStr>::Err : Debug{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().split_whitespace().map(|c| T::from_str(c).unwrap()).collect()

}

#[allow(dead_code)]
fn read_as_string() -> String{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().to_string()
}

struct UnionFind{
    v: Vec<usize>
}

impl UnionFind{
    fn new(n: usize) -> UnionFind{
        let mut v: Vec<usize> = Vec::new();
        for i in 0..n{
         v.push(i);
        }
        UnionFind{v:v}
    }

    fn find(&mut self, i: usize) -> usize{
        if self.v[i] == i{
            i
        }else{
            let ni = self.v[i];
            self.v[i] = self.find(ni);
            self.v[i]
        }
    }

    fn union(&mut self, i: usize, j: usize){
        let root_i = self.find(i);
        let root_j = self.find(j);
        self.v[root_i] = root_j;
    }

}

struct CombMod{
    fac: Vec<u64>,
    inv: Vec<u64>,
    finv: Vec<u64>,
    mmod: u64,
}

impl CombMod{
    pub fn new(max: u64, m: u64) -> CombMod{
        let max: usize = max as usize;
        let mut fac: Vec<u64> = vec![0;max+1];
        let mut finv: Vec<u64> = vec![0;max+1];
        let mut inv: Vec<u64> = vec![0;max+1];

        fac[0] = 1;
        fac[1] = 1;
        finv[0] = 1;
        finv[1] = 1;
        inv[1] = 1;

        for i in 2..max+1{
            fac[i] = fac[i-1] * i as u64 % m;
            inv[i] = m - inv[m as usize %i] * (m/(i as u64)) % m;
            finv[i] = finv[i-1] * inv[i] % m;
        }

        CombMod{
            fac: fac,
            finv: finv,
            inv: inv,
            mmod: m,
        }
    }

    fn get(&self, n: u64, m: u64) -> u64{
        assert!(n >= m && n != 0 && m != 0);
        self.fac[n as usize] * self.finv[m as usize] % self.mmod
            * self.finv[(n-m) as usize] % self.mmod
    }
}

fn main(){
    let a: usize = read_as_vec()[0];
    let b: usize = read_as_vec()[0];

    let mut sum = 6;

    println!("{}", sum -a - b);
}


Measured memory_bytes: 4352
#include<bits/stdc++.h>
#define mp make_pair
#define ff first
#define ss second
#define bg begin()
#define en end()
#define pb push_back
#define w(x) scanf("%d",&x);while(x--)
#define ws(x) scanf("%d",&x);getchar();while(x--)
#define rep(i,b) for(i=0;i<=b;i++)
#define ios ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pi 2*acos(0.0)
#define endl "\n"
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;
typedef vector<int> vi;

const int N=1e6+2;
long long  mod=1e9+9;
int t,j,cs=0,n,a,b,i,dxx[]={1,0,0,-1},dyy[]={0,-1,1,0},k,m;
string s;

int main()
{
    string s,t;
    cin>>s>>t;
    int n=s.size(),m=t.size();
    int cnt=0,mx=1000000;
    for(i=0;i+m-1<n;i++){
        cnt=0;
        for(j=0;j<m;j++){
            if(s[i+j]!=t[j]) cnt++;
        }
        mx=min(cnt,mx);
    }
    cout<<mx<<endl;
}



Measured memory_bytes: 3644
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
#ifdef DEBUG
#define display(x) cerr << #x << " = " << x << endl;
#define displaya(a, st, n)\
	{cerr << #a << " = {";\
	for(int qwq = (st); qwq <= (n); ++qwq) {\
		if(qwq == (st)) cerr << a[qwq];\
		else cerr << ", " << a[qwq];\
	} cerr << "}" << endl;}
#define displayv(v) displaya(v, 0, (int)(v).size() - 1)
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
#define display(x) ;
#define displaya(a, st, n) ;
#define displayv(v) ;
#define eprintf(...) if(0) fprintf(stderr, "...")
#endif
template<typename T> bool chmin(T &a, const T &b) { return b < a ? a = b, true : false; }
template<typename T> bool chmax(T &a, const T &b) { return a < b ? a = b, true : false; }

int main() {
	ios::sync_with_stdio(false);
	int n; cin >> n;
	vector<int> x(n), y(n);
	for(int i = 0; i < n; ++i) cin >> x[i] >> y[i];
	int ans = 0;
	for(int i = 0; i < n; ++i) {
		for(int j = 0; j < n; ++j) if(i != j) {
			int p = x[i] - x[j], q = y[i] - y[j];
			int cnt = 0;
			for(int i = 0; i < n; ++i) {
				int t = 0;
				for(int j = 0; j < n; ++j) if(i != j) {
					t += (x[j] + p == x[i] && y[j] + q == y[i]);
				}
				if(t) cnt++;
			}
			chmax(ans, cnt);
		}
	}
	cout << (n - ans) << endl;
	return 0;
}


Measured memory_bytes: 256
import sys
h, w = [int(i) for i in sys.stdin.readline().split()]
s = [sys.stdin.readline().strip() for _ in range(h)]
result = [[0] * w for _ in range(h)]

for i in range(h):
    for j in range(w):
        if s[i][j] == '#':
            result[i][j] = '#'
            continue
        count = 0
        top = (i - 1)
        bottom = (i + 1)
        left = (j - 1)
        right = (j + 1)

        if top >= 0:
            if left >= 0:
                if s[top][left] == '#':
                    count += 1
            if s[top][j] == '#':
                count += 1
            if right < w:
                if s[top][right] == '#':
                    count += 1
        if bottom < h:
            if left >= 0:
                if s[bottom][left] == '#':
                    count += 1
            if s[bottom][j] == '#':
                count += 1
            if right < w:
                if s[bottom][right] == '#':
                    count += 1
        if left >= 0:
            if s[i][left] == '#':
                count += 1
        if right < w:
            if s[i][right] == '#':
                count += 1

        result[i][j] = str(count)

for r in result:
    print(''.join(r))


Measured memory_bytes: 3188
use std::collections::HashSet;
fn main() {
    let n: usize = {
        let mut n = String::new();
        std::io::stdin().read_line(&mut n).ok();
        n.trim().parse().unwrap()
    };

    let mut line = String::new();
    std::io::stdin().read_line(&mut line).ok();
    let line: HashSet<&str> = line.trim().split_whitespace().collect();
    println!("{}", if n == line.len() { "YES" } else { "NO" });
}

Measured memory_bytes: 18584
#include <iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <string>
#include <utility>

using namespace std;

int main(){
    string s;
    int ans=700;
    cin >> s;
    for(int i = 0; i < s.size(); i++){
        if(s[i]=='o'){
            ans += 100;
        }
    }
    cout << ans << endl;
    
}

Measured memory_bytes: 256
import fractions
#fractions.gcd(x,y)
def lcm(a,b): return a*b//fractions.gcd(a,b)


a,b,c,d=map(int,input().split())
a-=1
ans=b
t=lcm(c,d)
ans-=b//c-a//c
ans-=b//d-a//d
ans+=b//t-a//t
print(ans-a)

Measured memory_bytes: 63980
#include <iostream>
using namespace std;
 
int main(){
	int a,b;
	
	cin >> a >> b;
if(a<b){
	cout<< "a < b" <<endl;
}else if(a>b){
	cout<< "a > b" <<endl;
}else if(a==b){
	cout<< "a == b" <<endl;
}
	
return 0;
}

Measured memory_bytes: 1156
import java.util.Scanner;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.Collections;
// cin=sc.nextInt();
// List<Integer> a = new ArrayList<Integer>(n);
 
public class Main {
    public static void main(String args[]) throws InterruptedException {
		    Scanner sc = new Scanner(System.in);	
			int a = sc.nextInt();
            if(a==1){
                System.out.println("Hello World");
            }
            else{
                int b = sc.nextInt();
                int c = sc.nextInt();
                System.out.println(b+c);
            }
	}
}

Measured memory_bytes: 22612
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
using PII = pair<ll, ll>;
#define FOR(i,a,n) for(ll i=(ll)a; i<(ll)n; ++i)
#define REP(i,n) FOR(i,0,n)
const ll INF = 1LL << 60;
template<typename T> void chmin(T &a, T b) { a = min(a, b); }



int main() {

	int H, W, N;
	cin >> H >> W >> N;
	vector<vector<int>>y(H, vector<int>(W));
	vector<vector<int>>x(H, vector<int>(W));
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			cin >> y[i][j] >> x[i][j];
		}
	}
	vector<int>sy(N);
	vector<int>sx(N);
	for (int i = 0; i < N; i++) {
		cin >> sy[i] >> sx[i];
	}
	vector<vector<vector<int>>>tapiY(H, vector<vector<int>>(W, vector<int>(20)));
	vector<vector<vector<int>>>tapiX(H, vector<vector<int>>(W, vector<int>(20)));
	for (int i = 0; i < 20; i++) {
		for (int j = 0; j < H; j++) {
			for (int k = 0; k < W; k++) {
				if (i) {
					int yy = tapiY[j][k][i - 1];
					int xx = tapiX[j][k][i - 1];
					tapiY[j][k][i] = tapiY[yy][xx][i - 1];
					tapiX[j][k][i] = tapiX[yy][xx][i - 1];
				}
				else {
					tapiY[j][k][i] = y[j][k];
					tapiX[j][k][i] = x[j][k];
				}
			}
		}
	}
	int ans = 0;
	vector<int>ny(N);
	vector<int>nx(N);
	for (int i = 19; i >= 0; i--) {
		set<pair<int, int>>st;
		for (int j = 0; j < N; j++) {
			ny[j] = tapiY[sy[j]][sx[j]][i];
			nx[j] = tapiX[sy[j]][sx[j]][i];
			st.insert({ ny[j],nx[j] });
		}
		if (st.size() == N) {
			sy = ny;
			sx = nx;
			ans += 1 << i;
		}
	}
	if (ans == (1 << 20) - 1) {
		cout << -1 << endl;
		return 0;
	}
	cout << ans + 1 << endl;
}


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

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

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

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

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


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

ans = 0
for i in range(N):
    ans = max(Groups.size(i), ans)

print(ans)

Measured memory_bytes: 77264
#include <iostream>
#include <algorithm>
#include <numeric>

using namespace std;

int main(){
    int sides[10];
    int datalen = 0;
    int largest;
    int sum;
    int n;

    cin >> n;

    while (cin >> sides[datalen++] &&(n-- > 1))
        ;
    largest = *std::max_element(sides, sides+datalen);
    sum = std::accumulate(sides, sides+datalen, 0);

    if ((sum - largest) > largest) {
        cout << "Yes";
    } else {
        cout << "No";
    }

    return 0;

}

Measured memory_bytes: 256
#include<iostream>
#include<cctype>
#include<cmath>
using namespace std;
int main()
{
	double x1, x2, y1, y2;
	double diss;
	cin >> x1 >> y1 >> x2 >> y2;
	diss = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
	cout.setf(ios::fixed);
	cout.setf(ios::showpoint);
	cout.precision(8);
	cout << diss << endl;
	return 0;
}


Measured memory_bytes: 3280
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
const int MOD=1e9+7;
const long double Pi=acos(-1);
using  P=pair<ll,ll>;
ll gcd(ll a,ll b){//aとbの最大公約数を返す
  if(a%b==0){return b;}
  else{return gcd(b,a%b);}
}
ll lcm(ll a,ll b){//aとbの最小公倍数を返す
  return a*b/gcd(a,b);
}
ll pow(ll x,ll y){//x^yを返す
  ll tmp=x,res=1;
  while(y){
    if(y%2){res=res*tmp%MOD;}
    y>>=1;
    tmp=tmp*tmp%MOD;
  }
  return res;
}
ll nature(ll a){//絶対値を返す
  if(a>=0){return(a);}
  else{return(-1*a);}
}
ll prime(ll a){//素数なら1を返す
  if(a==2){return 1;}
  else if(a%2==0 || a==1){return 0;}
  for(ll i=3;i*i<=a;i+=2){if(a%i==0){return 0;}}
  return 1;
}
int main(){
  ll N,K,sum=0,yama=1;
  cin>>N>>K;
  string S;
  cin>>S;
  for(ll i=0;i<(ll)S.size()-1;i++){
    if(S.at(i)!=S.at(i+1)){yama++;}
  }
  if(yama==1){cout<<N-1<<endl;return 0;}
  if(yama==2){cout<<N-1<<endl;return 0;}
  if(N==1){cout<<0<<endl;return 0;}
  for(ll i=0;i<(ll)S.size();i++){
    if(i==0){
      if(S.at(0)=='L'){}
      else if(S.at(1)=='R'){sum++;}
    }
    else if(i==(ll)S.size()-1){
      if(S.at((ll)S.size()-1)=='R'){}
      else if(S.at((ll)S.size()-2)=='L'){sum++;}
    }
    else{
      if(S.at(i)=='L'){
        if(S.at(i-1)=='L'){sum++;}
      }
      if(S.at(i)=='R'){
        if(S.at(i+1)=='R'){sum++;}
      }
    }
  }
  //cout<<yama<<" "<<sum<<endl;
  if(yama>=2*K){
    cout<<min(N-1,sum+2*K)<<endl;
  }
  else{cout<<min(N-1,sum+yama+K)<<endl;}
}

Measured memory_bytes: 512
N, T = map(int, input().split())
c = []
t = []
for _ in range(N):
    C_, T_ = map(int, input().split())
    if(T_ <= T):
        c.append(C_)
        t.append(T_)

if(c):
    print(min(c))
else:
    print('TLE')


Measured memory_bytes: 2940
#include <bits/stdc++.h>
#define Int int64_t

using namespace std;

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

	Int ans = 0;
	Int W = 0;
	for (int i = s.size() - 1; i >= 0; --i) {
		if (s[i] == 'W') {
			++W;
		} else {
			ans += W;
		}
	}
	cout << ans << "\n";

	return 0;
}


Measured memory_bytes: 3752
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <bitset>
using namespace std;

typedef pair<int, int> P;
#define rep(i, n) for (int i=0; i<(n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define index(xs, x) (int)(lower_bound(all(xs), x) - xs.begin())
#define _1 first
#define _2 second
#define pb push_back
#define INF 1145141919
#define MOD 1000000007

int N, Q;
string S;
int F[27][500001];
int G[20][500001];

signed main() {
  ios::sync_with_stdio(false); cin.tie(0);
  cin >> S >> Q;
  N = S.length();
  rep(i, 27) rep(j, N+1) F[i][j] = INF;
  rep(i, N) F[S[i]-'a'][i] = i+1;
  for (int i=N; i>=0; i--) {
    rep(k, 26) if (F[k][i] != INF) F[k+1][i] = min(F[k+1][i], F[k][F[k][i]]);
    if (F[26][i] == INF) continue;
    rep(k, 26) F[k][i] = min(F[k][i], F[k][F[26][i]]);
    rep(k, 26) if (F[k][i] != INF) F[k+1][i] = min(F[k+1][i], F[k][F[k][i]]);
  }
  rep(i, 20) rep(j, N+1) G[i][j] = INF;
  rep(i, N+1) G[0][i] = F[26][i];
  rep(k, 19) {
    rep(i, N+1) {
      if (G[k][i] == INF) G[k+1][i] = INF;
      else G[k+1][i] = G[k][G[k][i]];
    }
  }

  rep(i, Q) {
    int l, r;
    cin >> l >> r;
    l--;
    for (int k=19; k>=0; k--) if (G[k][l] <= r) l = G[k][l];
    if (l == r) cout << "Yes\n";
    else cout << "No\n";
  }
  return 0;
}


Measured memory_bytes: 93212