akhauriyash/Code-Regression huggingface dataset:
#define _CRT_SECURE_NO_WARNINGS

/* include ***********************/
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>

/* define *************************/
//for
#define REP(i,n) for(int i=0,i##_len=(int)(n);i<i##_len;i++)
#define REPS(i,n) for(int i=1,i##_len=(int)(n);i<=i##_len;i++)
#define RREP(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define RREPS(i,n) for(int i=(int)(n);i>0;i--)
#define FOR(i,s,n) for(int i=(int)(s),i##_len=(int)(n);i<i##_len;i++)
#define RFOR(i,s,n) for(int i=(int)(s)-1,i##_len=(int)(n);i>=i##_len;i--)

//printf
#define PRINTD(d) printf("%d\n",(d))
#define PRINTL(d) printf("%lld\n",(d))

//memset
#define m0(s) memset(s,0,sizeof(s))
#define ml(s) memset(s,63,sizeof(s))
#define fill(s,c) memset(s,c,sizeof(s))

#define INF 1e9
#define MOD 1000000007

typedef long long ll;
typedef unsigned long long ull;

int diff[4][2] = {
	{ 0, -1 },
	{ -1, 0 },
	{ 1, 0 },
	{ 0, 1 },
};
//今回の変数

int Min(int a, int b) {
	return (a)<(b) ? (a) : (b);
}
int Max(int  a, int  b) {
	return (a) > (b) ? (a) : (b);
}
ll Minl(ll a, ll b) {
	return (a)<(b) ? (a) : (b);
}
ll Maxl(ll a, ll b) {
	return (a)>(b) ? (a) : (b);
}

int main() {
	int a, b, t;
	scanf("%d%d%d", &a, &b, &t);

	PRINTD(t / a*b);
}

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

using namespace std;

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

  double a;
  double ans{};
  for (int i = 0; i < N; i++) {
    cin >> a;
    ans += 1./a;
  }

  cout << fixed << 1./ans << endl;
  return 0;
}


Measured memory_bytes: 256
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#define ll long long
using namespace std;
const int mod = 1e9 + 7;
int main()
{
	int n,x,k(0);ll ans(1);
	cin>>n;
	for(register int i(1);i <= n;i++)
	{
		scanf("%d",&x),++k;
		if(x < (k << 1) - 1) {ans *= k,--k;if(ans >= mod) ans %= mod;}
	}
	while(k) {ans *= k,--k;if(ans >= mod) ans %= mod;}
	cout<<ans; 
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define F first
#define S second
ll mod=1000000007;
int calc(vector<int> vec,int mi){
    if(vec.size()==0)return mi;
    vector<int> v1;
    int mi1=1000000001;
    for(int i=0;i<vec.size();i++){
        int a=vec[i]%mi;
        if(a!=0){v1.pb(a);mi1=min(mi1,a);}
    }
    if(v1.size()==0)return mi;
    else v1.pb(mi);
    return calc(v1,mi1);
}
int main(){
    std::ios::sync_with_stdio(false);
    int n;
    cin>>n;
    vector<int> ar(n);
    int mi=1000000001;
    for(int i=0;i<n;i++){
        cin>>ar[i];
        mi=min(mi,ar[i]);
    }
    //cout<<mi<<endl;
    cout<<calc(ar,mi);
    return 0;
}


Measured memory_bytes: 1912
#include <iostream>
#include <string>
using namespace std;
#define ll long long
ll ans = 0;
int num[300];
ll fn[5];
int main(){
    int n;
    cin>>n;
    string sub;
    while (n--)
    {
        cin>>sub;
        num[sub[0]]++;
    }
    // M, A, R, C or H.
    fn[0] = num['M'];
    fn[1] = num['A'];
    fn[2] = num['R'];
    fn[3] = num['C'];
    fn[4] = num['H'];
    for (int i = 0; i < 5; i++)
    {
        for (int j = i + 1; j < 5; j++)
        {
            for (int k = j + 1; k < 5; k++)
            {
                ans += (fn[i] * fn[j] * fn[k]);
            }   
        }
    }
    cout<<ans;
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;
#define ll long long
#define M 1e9+7

int main(){
	int d, t,s;
	cin>>d>>t;
	cin>>s;
	if(t*s >= d){
		cout << "Yes" << endl;
	}
	else{
		cout << "No" << endl;
	}
	return 0;
	
}

Measured memory_bytes: 3048
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}
macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}
macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}
fn main() {
    input!{
        a: i8,
        b: i8,
    }
    println!("{}", if a <= 9 && b <= 9 { a * b } else { -1 });
}


Measured memory_bytes: 4352
IDENTIFICATION DIVISION.
PROGRAM-ID. PROGRAM_ID.

DATA DIVISION.
WORKING-STORAGE SECTION.
01 LN             PIC X(10).
01 K              PIC 9(3).
01 X              PIC 9(6).

PROCEDURE DIVISION.
MAIN-001.
  ACCEPT LN.
  UNSTRING LN DELIMITED BY SPACE INTO K X.
  IF X <= 500 * K
      DISPLAY "Yes"
  ELSE
      DISPLAY "No"
  END-IF.

MAIN-EXIT.
  STOP RUN.


Measured memory_bytes: 764
#include <iostream>
using namespace std;
int main(void){
    int c[3] = {1, 2, 3};
    int A, B;
    cin >> A >> B;
    c[A-1] = 0; c[B-1] = 0;
    for (int i = 0; i < 3; i++)
        if (c[i] != 0) {
            cout << c[i] << endl;
            break;
        }
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<cmath>
#include<map>
#include<iomanip>
#include<queue>
#include<stack>
#include<time.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define ggr getchar();getchar();return 0;
#define prique priority_queue
constexpr auto mod = 1000000007;
#define inf 1e15
#define key 1e9
using namespace std;
typedef pair<int, int>P;
template<class T> inline void chmax(T& a, T b) {
	a = std::max(a, b);
}
template<class T> inline void chmin(T& a, T b) {
	a = std::min(a, b);
}
//combination(Nが小さい時はこれを使う)
const int MAX = 330000;
int fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++) {
		fac[i] = fac[i - 1] * i % mod;
		inv[i] = mod - inv[mod % i] * (mod / i) % mod;
		finv[i] = finv[i - 1] * inv[i] % mod;
	}
}
int COMB(int n, int k) {
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % mod) % mod;
}

bool prime(int n) {
	int cnt = 0;
	for (int i = 1; i <= sqrt(n); i++) {
		if (n % i == 0)cnt++;
	}
	if (cnt != 1)return false;
	else return n != 1;
}
int gcd(int x, int y) {
	if (y == 0)return x;
	return gcd(y, x % y);
}
int lcm(int x, int y) {
	return x / gcd(x, y) * y;
}

//繰り返し二乗法（Nが大きい時の場合のcombination)
int mod_pow(int x, int y, int m) {
	int res = 1;
	while (y) {
		if (y & 1) {
			res = res * x % m;
		}
		x = x * x % m;
		y >>= 1;
	}
	return res;
}
int kai(int x, int y) {
	int res = 1;
	for (int i = x - y + 1; i <= x; i++) {
		res *= (i % mod); res %= mod;
	}
	return res;
}
int comb(int x, int y) {
	if (y > x)return 0;
	return kai(x, y) * mod_pow(kai(y, y), mod - 2, mod) % mod;
}
//UnionFind
class UnionFind {
protected:
	int* par, * rank, * size;
public:
	UnionFind(unsigned int size) {
		par = new int[size];
		rank = new int[size];
		this->size = new int[size];
		rep(i, size) {
			par[i] = i;
			rank[i] = 0;
			this->size[i] = 1;
		}
	}
	int find(int n) {
		if (par[n] == n)return n;
		return par[n] = find(par[n]);
	}
	void unite(int n, int m) {
		n = find(n);
		m = find(m);
		if (n == m)return;
		if (rank[n] < rank[m]) {
			par[n] = m;
			size[m] += size[n];
		}
		else {
			par[m] = n;
			size[n] += size[m];
			if (rank[n] == rank[m])rank[n]++;
		}
	}
	bool same(int n, int m) {
		return find(n) == find(m);
	}
	int getsize(int n) {
		return size[find(n)];
	}
};
int dight_sum(int n) {
	int sum = 0;
	rep(i, 20)sum += (n % (int)pow(10, i + 1)) / (pow(10, i));
	return sum;
}
signed main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	int x;
	cin >> x;
	int p = 100, ans = 0;
	rep(i, 3760) {
		p = p + p / 100;
		if (p < x)ans++;
	}
	cout << ans + 1 << endl;
	ggr
}


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

using ll = long long;
using ull = unsigned long long;

#define MOD 1000000007

int main(void) {
    ll A, B, N;
    ll x;
    cin >> A >> B >> N;
    x = min(N, B - 1);
    cout << A * (x % B) / B << endl;
    return 0;
}


Measured memory_bytes: 3632
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<utility>
#include<set>
#include<stack>
#include<queue>
#include<deque>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<bitset>
#include<sstream>
#include<list>
#include<climits>

using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define nrep(i,i0,n) for(int i=(i0);i<(int)(n);++i)
typedef vector<int> vi; typedef pair<int,int> pii; typedef vector<pair<int,int> > vpii;
typedef vector<vector<int> > vii;
typedef long long ll;


int main(){
	string s;
	cin>>s;
	int len=s.size();
	int ret=1;
	for(int i=len-1;i>=0;i--){
		if(i%2)continue;
		bool flag=true;
		rep(j,i/2){
			if(s[j]!=s[j+i/2]){
				flag=false;
				break;
			}
		}
		if(flag){
			ret=i;
			break;
	}
	}
	cout<<ret<<endl;
	return 0;
}



Measured memory_bytes: 256
use std::io::Read;

fn main() {
    let mut buf = String::new();
    std::io::stdin().read_to_string(&mut buf).unwrap();
    let mut iter = buf.split_whitespace();
    let n:u8 = iter.next().unwrap().parse().unwrap();
    let s = iter.next().unwrap();
    for c in s.bytes() {
        print!("{}", (((c - b'A') + n) % 26 + b'A') as char)
    }
    println!();
}


Measured memory_bytes: 4352
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
const int inf = 1e9;
const ll INF = 1e18;
const double pi = 3.14159265358979323846;
#define rep(i,n) for(ll i=0;i<n;i++)

int main(){
	string s;cin>>s;
	string ss="keyence";
	int n=s.size();
	if(s==ss){
		cout<<"YES"<<"\n";
		return 0;
	}
	rep(i,n){
		for(int j=i;j<n;j++){
			string t="";
			for(int k=0;k<n;k++){
				if(i<=k&&k<=j) continue;
				else t+=s[k];
			}
			//cout<<t<<"\n";
			if(ss==t){
				cout<<"YES"<<"\n";
				return 0;
			}
		}
	}
	cout<<"NO"<<"\n";
}

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

typedef signed long long ll;
typedef long double ld;

#define rep(i,n) for(int i = 0; i < (n); i++)
#define all(x) x.begin(),x.end()

#define DEBUG

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

	vector<int> mul(81);
	rep(i,10)rep(j,10)
	{
		mul.push_back(i*j);
	}
	sort(all(mul));
	bool ans = binary_search(mul.begin(),mul.end(), n);

	if(ans)
	{
		cout << "Yes" << endl;
	}
	else
	{
		cout << "No" << endl;
	}
	return 0;
}


Measured memory_bytes: 256
/* ---------- STL Libraries ---------- */

// IO library
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <ios>
#include <iostream>

// algorithm library
#include <algorithm>
#include <cmath>
#include <numeric>
#include <random>

// container library
#include <array>
#include <bitset>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>

/* ---------- Namespace ---------- */

using namespace std;

/* ---------- Type Abbreviation ---------- */

using ll = long long;

template <typename T>
using PQ = priority_queue<T>;
template <typename T>
using GPQ = priority_queue<T, vector<T>, greater<T>>;

#define mp make_pair
#define mt make_tuple

/* ----------- debug ---------- */

template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> p);

template <class T>
ostream& operator<<(ostream& os, vector<T> v) {
    os << "[";
    for (auto vv : v)
        os << vv << ",";
    return os << "]";
}

template <class T>
ostream& operator<<(ostream& os, set<T> v) {
    os << "[";
    for (auto vv : v)
        os << vv << ",";
    return os << "]";
}

template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> p) {
    return os << "(" << p.first << "," << p.second << ")";
}

/* ---------- Constants ---------- */

// const ll MOD = 1000000007;
// const ll MOD = 998244353;
// const int INF = 1 << 25;
// const ll INF = 1LL << 50;
// const double PI = acos(-1);
// const double EPS = 1e-10;
// mt19937 mert(LL(time(0)));

/* ---------- Short Functions ---------- */

template <typename T>
inline T sq(T a) { return a * a; }

template <typename T>
T gcd(T a, T b) {
    if (a < b) return gcd(b, a);
    return b == 0 ? a : gcd(b, a % b);
}

template <typename T, typename U>
T mypow(T b, U n) {
    if (n == 0) return 1;
    if (n == 1) return b /* % MOD */;
    if (n % 2 == 0) {
        return mypow(b * b /* % MOD */, n / 2);
    } else {
        return mypow(b, n - 1) * b /* % MOD */;
    }
}

ll pcnt(ll b) {
    return __builtin_popcountll(b);
}

template <typename T>
T iceil(T n, T d) {
    return (n + d - 1) / d;
}

/* v-v-v-v-v-v-v-v-v Main Part v-v-v-v-v-v-v-v-v */

int main() {
    int N, K;
    cin >> N >> K;
    int M = K * 2 - 1;
    cout << (N >= M ? "YES" : "NO") << endl;
    return 0;
}


Measured memory_bytes: 256
def d(a,b,c,d):
    return ((a-b)**2+(c-d)**2)**(1/2)

n = int(input())
s = []
for i in range(n):
    s.append([int(x) for x in input().split()])
f = 0
for dis in s:
    for ris in s:
        f += d(dis[0], ris[0], dis[1], ris[1])

print(str(f/n))


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

int main() {

    set<string> s;

    int n;

    cin >> n;

    while(n--){
        string input_s;
        cin >> input_s;
        s.insert(input_s);
    }

    string ans = "Three";

    if(s.size() == 4){
        ans = "Four";
    }

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
using namespace std;
string a,b;
vector<int> p[26],q[26][26],z[26][26][26],s,x;
void R(){
	string t;cin>>t;
	for(int i=0;i<t.size();i++)s.push_back(t[i]-'a');
	for(int i=0;i<t.size();i++){
		p[s[i]].push_back(i);
		if(i)q[s[i-1]][s[i]].push_back(i-1);
		if(i>1)z[s[i-2]][s[i-1]][s[i]].push_back(i-2);
	}
}
int Xd(){x.clear();
	for(int i=0;i<a.size();i++)x.push_back(a[i]-'a');
	if(x.size()==1)return p[x[0]].size()?p[x[0]][0]:-1;
	if(x.size()==2)return q[x[0]][x[1]].size()?q[x[0]][x[1]][0]+1:-1;
	if(x.size()==3)return z[x[0]][x[1]][x[2]].size()?z[x[0]][x[1]][x[2]][0]+2:-1;
	for(int i=0;i<z[x[0]][x[1]][x[2]].size();i++){
		int k=z[x[0]][x[1]][x[2]][i],w=x.size()-1;
		if(k+w<s.size()){
			bool o=1;
			for(int j=k+3;j<=k+w;j++)if(s[j]!=x[j-k])o=0;
			if(o)return k+w;
		}
	}return -1;
}
int Yd(){x.clear();
	for(int i=0;i<b.size();i++)x.push_back(b[i]-'a');
	if(x.size()==1)return p[x[0]].size()?p[x[0]][p[x[0]].size()-1]:-1;
	if(x.size()==2)return q[x[0]][x[1]].size()?q[x[0]][x[1]][q[x[0]][x[1]].size()-1]:-1;
	if(x.size()==3)return z[x[0]][x[1]][x[2]].size()?z[x[0]][x[1]][x[2]][z[x[0]][x[1]][x[2]].size()-1]:-1;
	for(int i=z[x[0]][x[1]][x[2]].size()-1;i>=0;i--){
		int k=z[x[0]][x[1]][x[2]][i],w=x.size()-1;
		if(k+w<s.size()){
			bool o=1;
			for(int j=k+3;j<=k+w;j++)if(s[j]!=x[j-k])o=0;
			if(o)return k;
		}
	}return -1;
}
int main(){
	R();int m;cin>>m;
	while(m--){
		cin>>a>>b;int l=Xd(),r=Yd();
		if(r!=-1&&l!=-1&&r>=l-a.size()+1&&l+1<=r+b.size())cout<<r-l+b.size()+a.size()-1<<endl;
		else cout<<"0"<<endl;
	}
	return 0;
}

Measured memory_bytes: 10040
MOD = 10**9+7

N,M=map(int,input().split())
A=[0]*M
for i in range(M):
    A[i] = int(input())

dp = [0]*(N+4)
dp[0] = 1
for a in A:
    dp[a] = -1

for i in range(1,N+1):
    if dp[i] != -1:
        if dp[i-2] != -1:
            dp[i] += dp[i-2]
        if dp[i-1] != -1:
            dp[i] += dp[i-1]
        dp[i] = dp[i] % MOD

print(dp[N])

Measured memory_bytes: 46936
#include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
	int seat[17] = {0};
	int X = 0;
	int stop[100] = {0};
	int time = 0;
	queue<int> Q;
	while(X < 100){
		int x;
		if(time%5 == 0 && time < 500){
			Q.push(time/5);
		}
		while(1){
			if(Q.size())x = Q.front();
			else x = -1;
			bool f = false;
			
			if(~x){
				int people = (x%5==1?5:2);
				int use = 19 + 3 * (x%3) + 17 * (x%2);
				rep(i,17-people+1){
					bool flag = true;
					rep(j,people){
						flag &= seat[i+j] == 0;
					}
					if(flag){
						rep(j,people){
							seat[i+j] = use;
						}
						f = true;
						break;
					}
				}
			}
			if(f){	
				stop[x] = time - x * 5;
				Q.pop();
				X++;
			}
			if(!f)break;
		}
		rep(i,17){
			seat[i] = max(0,seat[i]-1);
		}
		time++;
	}
	int n,c=0;
	
	while(cin >> n){
		if(n >= 50)c++;
		cout << stop[n] << endl;
	}
	while(c>=6){return 1;};
	
}

Measured memory_bytes: 0
#include <stdio.h>
#define LL long long
#define mod 1000000007
LL sum,mn,mx;
int main(){
	LL n,k,i;
	scanf("%lld%lld",&n,&k);
	for(i=k;i<=n+1;i++){
		mn=(0+(i-1))*((i-1)+1)/2;
		mx=(n+n-i+1)*i/2;
		sum=(sum+mx-mn+1)%mod;
	}
	printf("%lld\n",sum);
	return 0;
}

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

#define rep(l, r) for (int i = (l); i < (r); i++)

typedef long long ll;
 
using namespace std;

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

    return gcd(b, a % b);
}

void solve() {
    ll N, X;
    cin >> N >> X;

    ll x[N+1];
    rep(0, N) cin >> x[i];
    x[N] = X;

    sort(x, x+(N+1));
    
    ll ans = 0;
    for (ll i = 1; i < N + 1; i++) {
        ans = gcd(ans, abs(x[i] - x[i-1]));
    }

    cout << ans << endl;
}

int main() {
    solve();

    return 0;
}


Measured memory_bytes: 1024
#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define per(i,b,a) for(int i=b;i>=a;i--)
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Forenska(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define sqr(x) ((x)*(x))
#define lowbit(x) ((x)&(-x))
#define GREATER(x) x,vector<x>,greater<x>
#define randIn(L,R) (((LL)rand()*rand())%(R-L)+L)
#define __lcm(a,b) ((a)/__gcd(a,b)*(b))
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
typedef pair<LL,LL> pLL;
typedef vector<int> vec;
typedef vector<LL> vecL;
typedef vector<pii> vecP;
typedef vector<pLL> vecPL;
typedef vector<string> vecS;
typedef vector<vec> mat;
typedef complex<double> point;
const long double PI=3.14159265358979323846264338327950288419716939937510582097;
const LL INFLL=0x3f3f3f3f3f3f3f3f;
const int INF=0x3f3f3f3f;
const long double EPS=1e-10;
int read()
{
    int x=0;
    char ch=' ';
    bool flag=false;
    while(ch<'0' || ch>'9')
    {
        if(ch=='-')flag=true;
        ch=getchar();
    }
    while(ch>='0' && ch<='9')
    {
        x=(x<<3)+(x<<1)+ch-'0';
        ch=getchar();
    }
    return flag?-x:x;
}

int main()
{
	int n=read();
	set<string> S;
	rep(i,0,n)
	{
		string s;
		cin>>s;
		S.insert(s);
	}
	puts(S.size()==3?"Three":"Four");
	return 0;
}



Measured memory_bytes: 256
length = int(input())
numArr = [int(str_num) for str_num in input().split(' ')]

numArr.sort()

def judge():
  for i in range(0, length - 1):
    if numArr[i] == numArr[i + 1]:
      print("NO")
      return False
  return True

if(judge()):
	print("YES")


Measured memory_bytes: 25812
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <complex>
#include <ctime>
#include <cstdlib>

using namespace std;

inline int to_int(string s) {int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string to_str(T x) {ostringstream sout; sout << x; return sout.str();}

typedef long long ll;

int main()
{
	char ans = '0', wk;
	int F[16][16];
	while(cin >> wk)
	{
		memset(F, 0, sizeof(F));
		if(wk == '\n')
		{
			continue;
		}
		F[0][0] = wk - '0';
		ans = '0';


		for(int i = 0; i < 8; i++)
		{
			for(int j = 0; j < 8; j++)
			{
				if(i == 0 && j == 0)
					continue;
				cin >> wk;
				F[i][j] = wk - '0';
			}
		}

		for(int i = 0; i < 8; i++)
		{
			for(int j = 0; j < 8; j++)
			{
				if(F[i][j] && F[i][j+1] && F[i+1][j] && F[i+1][j+1])
				{
					ans = 'A';
					break;
				}
				if(F[i][j] && F[i+1][j] && F[i+2][j] && F[i+3][j])
				{
					ans = 'B';
					break;
				}
				if(F[i][j] && F[i][j+1] && F[i][j+2] && F[i][j+3])
				{
					ans = 'C';
					break;
				}
				if(F[i][j] && F[i+1][j] && F[i+1][j-1] && F[i+2][j-1])
				{
					ans = 'D';
					break;
				}
				if(F[i][j] && F[i][j+1] && F[i+1][j+1] && F[i+1][j+2])
				{
					ans = 'E';
					break;
				}
				if(F[i][j] && F[i+1][j] && F[i+1][j+1] && F[i+2][j+1])
				{
					ans = 'F';
					break;
				}
				if(F[i][j] && F[i][j+1] && F[i-1][j+1] && F[i-1][j+2])
				{
					ans = 'G';
					break;
				}
			}
			if(ans != '0')
			{
				break;
			}
		}

		cout << ans << endl;
	}
}

Measured memory_bytes: 1132
#include <iostream>
#include <stdio.h>
#include <cstring>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string>
#include <stdlib.h>
#include <queue>
#include <stack>
#include <utility>
#include <fstream>
#include <random>
#include <map>
#include <unordered_map>
#include <cstdlib>
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ll long long
#define INF 1000000001
#define mod 1000000007
#define p pair<int,int>
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};
using namespace std;
int POW(int x,int y){return int(pow(double(x),double(y)));}



int main(){
	
	int a,b,c,d,e,f;
	cin>>a>>b>>c>>d>>e>>f;
	vector<bool> x(3000+1),y(f+1);
	x[0]=1;
	FOR(i,1,3001){
		if(i-c>=0){
			if(x[i-c]==1){
				x[i]=1;
				continue;
			}else{
				x[i]=0;
			}
		}
		if(i-d>=0){
			if(x[i-d]==1){
				x[i]=1;
				continue;
			}else{
				x[i]=0;
			}
		}
		x[i]=0;
	}

	y[0]=1;
	a*=100;
	b*=100;
	FOR(i,1,f+1){
		if(i-a>=0){
			if(y[i-a]==1){
				y[i]=1;
				continue;
			}else{
				y[i]=0;
			}
		}
		if(i-b>=0){
			if(y[i-b]==1){
				y[i]=1;
				continue;
			}else{
				y[i]=0;
			}
		}
		y[i]=0;
	}


	double max=0;
	int maxa=0,maxb=0;

	rep(i,f+1){
		if(y[i]==1){
			int m=(i/100)*e;
			for(int j=m;j>0;j--){
				if(x[j]==1 && i+j<=f){
					double nodo=double(j)/double(j+i);
					if(nodo>max){
						max=nodo;
						maxa=i+j;
						maxb=j;
					}
					break;
				}
			}
		}
	}
	if(maxa==0){
		maxa=a;
	}
	cout<<maxa<<" "<<maxb<<endl;

}


Measured memory_bytes: 256
// clang-format off
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = 3.14159265358979;
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
bool odd(const int &n) { return n & 1; }
bool even(const int &n) { return ~n & 1; }
template<typename T> int len(const T &v) { return v.size(); }
template<typename T = int> T in() { T x; cin >> x; return x; }
template<typename T = int> T in(T &&x) { T z(forward<T>(x)); cin >> z; return z; }
template<typename T> istream &operator>>(istream &is, vector<T> &v) { for (T &x : v) is >> x; return is; }
template<typename A, typename B> istream &operator>>(istream &is, pair<A, B> &p) { return is >> p.first >> p.second; }
template<typename T> ostream &operator<<(ostream &os, const vector<vector<T>> &v) { int n = v.size(); rep(i, n) os << v[i] << (i == n - 1 ? "" : "\n"); return os; }
template<typename T> ostream &operator<<(ostream &os, const vector<T> &v) { int n = v.size(); rep(i, n) os << v[i] << (i == n - 1 ? "" : " "); return os; }
template<typename A, typename B> ostream &operator<<(ostream &os, const pair<A, B> &p) { return os << p.first << ' ' << p.second; }
template<typename Head, typename Value> auto vectors(const Head &head, const Value &v) { return vector<Value>(head, v); }
template<typename Head, typename... Tail> auto vectors(Head x, Tail... tail) { auto inner = vectors(tail...); return vector<decltype(inner)>(x, inner); }
// clang-format on

int dx[] = {-1, 0, 1, 0}, dy[] = {0, 1, 0, -1}; // <v>^

main() {
  int n;
  while (cin >> n, n) {
    int r = 0, l = 0, b = 0, u = 0; // [l, r], [u, b]
    vector<int> x(n), y(n);
    loop(i, 1, n) {
      int n, d;
      cin >> n >> d;
      x[i] = x[n] + dx[d];
      y[i] = y[n] + dy[d];
      cmax(r, x[i]);
      cmin(l, x[i]);
      cmax(b, y[i]);
      cmin(u, y[i]);
    }
    cout << (r - l + 1) << ' ' << (b - u + 1) << endl;
  }
}



Measured memory_bytes: 3084
#include <iostream>
#include <cstdlib>
#include <bitset>
#include <iomanip>
#include <string>
#include <vector>
#include <cmath>
#include <queue>
#include <algorithm>
#include <sstream>
#include <math.h>

using namespace std;

#define ll long long int
#define vecll vector<long long>
#define vec2ll vector<vector<long long>>
#define vecchar vector<char>
#define vecstr vector<string>
#define vecbool vector<bool>
#define vec2bool vector<vector<bool>>
#define vecpairll vector<pair<long long,long long>>
#define forll(s,a,b) for(ll s = a;s < b;s++)
#define forllde(s,a) for(ll s = a;s > 0;s--)

#define Pi 3.1415926535897932384626

int main() {
	ll n, ans = 0;
	string s,t;
	bool flag = false;

	cin >> s;
	cin >> t;

	forll(i,0, s.size()) {
		if (s[i] != t[i])
			ans++;
	}

	cout << ans;
}


Measured memory_bytes: 3916
#include<stdio.h>
#define mod 1000000007
long long int kai(int n){
	if(n==0){return 1;} 
	else{ return (n*kai(n-1))%mod; }
}
int main(void){
	int N,K,q,w,e,r,t,y,u,i,o,p,aans=0;
	long long int ans=0;
	int A[100];
	long long int dp[101][256]={0};
	long long int dps[101][256]={0};
	scanf("%d %d",&N,&K);
	for(q=0;q<N;q++){
		scanf("%d",&w);
		A[q]=w;
	}
	dp[0][0]=1;
	dps[0][0]=1;
	for(q=0;q<N;q++){//全体のループ
		for(w=1;w<=N;w++){//何個使ったか
			for(e=0;e<256;e++){//ここまでのぉｒ
				dps[w][e^A[q]]+=dp[w-1][e];
			}
		}
		for(w=0;w<=N;w++){
			for(e=0;e<256;e++){
				dp[w][e]=dps[w][e]%mod;
			}
		}
	}
	ans=0;
	for(q=0;q<=N;q++){
		ans+=dp[q][K]*kai(q);
		ans%=mod;
	}
	printf("%lld\n",ans%mod);
	return 0;
}

Measured memory_bytes: 512
#include <stdio.h>
#include <math.h>
 
#define PI 3.14159265359
 
typedef struct{
    double x;
    double y;
}Point;
 
void kock(int, Point, Point);
 
main(){
    int n;
    Point p1 = { 0, 0 }, p2 = { 100, 0 };
 
    scanf("%d", &n);
 
    printf("%f %f\n", 0, 0);
    kock(n, p1, p2);
    printf("%f %f\n", (double)100, 0);
 
    return 0;
}
 
void kock(int n, Point p1, Point p2){
    Point s, u, t;
    if (n == 0) return;
 
    s.x = (2 * p1.x + p2.x) / 3;
    s.y = (2 * p1.y + p2.y) / 3;
    t.x = (p1.x + 2 * p2.x) / 3;
    t.y = (p1.y + 2 * p2.y) / 3;
    u.x = (t.x - s.x)*cos(PI / 3) - (t.y - s.y)*sin(PI / 3) + s.x;
    u.y = (t.x - s.x)*sin(PI / 3) + (t.y - s.y)*cos(PI / 3) + s.y;
 
    kock(n - 1, p1, s);
    printf("%f %f\n", s.x, s.y);
    kock(n - 1, s, u);
    printf("%f %f\n", u.x, u.y);
    kock(n - 1, u, t);
    printf("%f %f\n", t.x, t.y);
    kock(n - 1, t, p2);
}

Measured memory_bytes: 640
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#define MAXNUM 55555
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define REP(i,k,n) for(int i = k; i < (int)(n); i++)
using namespace std;
int nums[MAXNUM+1];
int main(){
        int N;
        cin >> N;

        for(int i = 0; i <= MAXNUM; i++) {
                nums[i] = 1;
        }
        for(int i = 2; i < sqrt(MAXNUM); i++) {
                if(nums[i]) {
                        for(int j = 0; i * (j + 2) <= MAXNUM; j++) {
                                nums[i *(j + 2)] = 0;
                        }
                }
        }
        int j = 0;
        for (int i = 2; i <= MAXNUM; i++) {
                if(nums[i]) {
                        if(i%5 == 1) {
                                cout << i << " ";
                                j++;
                                if(j>=N) break;
                        }
                }

        }
        cout << endl;

        return 0;
}


Measured memory_bytes: 512
#include <stdio.h>
#include <vector>
#include <algorithm>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;

typedef long long ll;

ll d[100], f[100], now, cnt;
char flag[100];
vector<int> vec[100];

int dfs(int n) {
  if(flag[n]) return 0;
  flag[n] = 1;
  cnt++;
  d[n] = cnt;
  vector<int>::iterator it;
  for(it = vec[n].begin(); it != vec[n].end(); ++it) {
    if(!flag[*it]) dfs(*it);
  }
  ++cnt;
  f[n] = cnt;
  return 0;
}

int main(void) {
  ll n;
  scanf("%d", &n);
  now = 0, cnt = 0;
  rep(i, n) flag[i] = 0;
  rep(i, n) {
    int u, k;
    scanf("%d%d", &u, &k);
    u--;
    rep(j, k) {
      int v;
      scanf("%d", &v);
      v--;
      vec[u].push_back(v);
    }
    sort(vec[u].begin(), vec[u].end());
  }
  now = 0;
  while( 1 ) {
    dfs(now);
    int s = 1, i;
    for(i = 0; i < n; ++i) if(!flag[i]){
      s = 0;
      break;
    }
    if(s) break;
    else now = i;
    //rep(j, n) printf("%d ", (int)flag[j]);
    //printf("%d\n", i);
    //return 0;
  }
  rep(i, n) printf("%d %lld %lld\n", i + 1, d[i], f[i]);
  return 0;
}


Measured memory_bytes: 2776
// https://atcoder.jp/contests/diverta2019/tasks/diverta2019_c
//
#![allow(unused_imports)]
use std::io::*;
use std::fmt::*;
use std::str::*;
use std::cmp::*;
use std::collections::*;

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! dvec {
    ($t:expr ; $len:expr) => {
        vec![$t; $len]
    };

    ($t:expr ; $len:expr, $($rest:expr),*) => {
        vec![dvec!($t; $($rest),*); $len]
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        println!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

fn main() {
    input! {
        n: usize, s: [chars; n]
    };

    let mut begin_b = 0;
    let mut end_a = 0;
    let mut both = 0;
    let mut total = 0;

    for i in 0..n {
        let m = s[i].len();
        for j in 0..m-1 {
            if s[i][j] == 'A' && s[i][j+1] == 'B' {
                total += 1;
            }
        }
        if s[i][0] == 'B' {
            begin_b += 1;
        }
        if s[i][m-1] == 'A' {
            end_a += 1;
        }
        if s[i][0] == 'B' && s[i][m-1] == 'A' {
            both += 1;
        }
    }

    total += min(begin_b, end_a);
    if min(begin_b, end_a) >= 1 && begin_b == end_a && begin_b == both {
        total -= 1;
    }
    println!("{}", total);
}


Measured memory_bytes: 4352
#include<iostream>
#include<cstdio>
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define ROF(i,a,b) for(int i=a;i>=b;i--)
using namespace std;
const int N=190,LG=20;
int n,m,ans,l,r,p,cur;
int q[N],a[N][N],lx[N][N],f[LG+1][N][N][N];
char s[N];
int main(){
	//freopen("1.in","r",stdin);
	scanf("%d%d",&n,&m);
	FOR(i,1,n){
		scanf("%s",s+1);
		FOR(j,1,m) a[i][j]=s[j]=='#';
	}
	ROF(i,n,1)ROF(j,m,1)
		lx[i][j]=1+(a[i][j]==a[i][j+1])*lx[i][j+1];
	FOR(i,1,n)FOR(j,i,n)FOR(k,1,m)
		f[0][i][j][k]=min(i==j?m+1:f[0][i][j-1][k],k+(a[i][k]==a[j][k])*lx[j][k]);
	FOR(x,1,LG){
		if(f[x-1][1][n][1]>m){ans=x-1;break;}
		FOR(i,1,n)FOR(j,i,n)FOR(k,1,m)
			f[x][i][j][k]=max(f[x-1][i][j][k],f[x-1][i][j][f[x-1][i][j][k]]);
		FOR(i,1,n)FOR(k,1,m){
			cur=0;p=i+1;
			FOR(j,i+1,n){
				cur=min(f[x-1][i][p-1][k],f[x-1][p][j][k]);
				//if(x==3 && i==1) cout<<j<<' '<<p<<' '<<cur<<'\n';
				for(;p<j && min(f[x-1][i][p][k],f[x-1][p+1][j][k])>=cur;p++)
					cur=min(f[x-1][i][p][k],f[x-1][p+1][j][k]);
				f[x][i][j][k]=max(f[x][i][j][k],cur);
			}
		}
	}
	cout<<ans<<'\n';
}

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

#define Pi acos(-1.)
#define pb push_back
#define all(x) (x).begin(), x.end()
#define mp make_pair
#define fi first
#define se second
#define pii pair<int, int>
#define FILE "474"
#define standart 1

using namespace std;

typedef long long ll;

const int INF = 1e9 + 322;
const ll LINF = 1e18 + 228;
const int MAXN  = 1e5 + 228;
const int MOD = 1e9 + 7;
const double eps = 1e-14;



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


int main()
{
    if(!standart) {
        freopen(FILE".in", "r", stdin);
        freopen(FILE".out", "w", stdout);
    }
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    int T = 1;
    while(T--)
        solve();

    return 0;
}


Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main(void) {
  string s;
  cin >> s;
  int a = s[0] - '0', b = s[1] - '0', c = s[2] - '0', d = s[3] - '0';
  if (a + b + c + d == 7) {
    cout << a << "+" << b << "+" << c << "+" << d <<"=7" << endl;
  } else if (a + b + c - d == 7) {
    cout << a << "+" << b << "+" << c << "-" << d <<"=7" << endl;
  } else if (a + b - c + d == 7) {
    cout << a << "+" << b << "-" << c << "+" << d <<"=7" << endl;
  } else if (a + b - c - d == 7) {
    cout << a << "+" << b << "-" << c << "-" << d <<"=7" << endl;
  } else if (a - b + c + d == 7) {
    cout << a << "-" << b << "+" << c << "+" << d <<"=7" << endl;
  } else if (a - b + c - d == 7) {
    cout << a << "-" << b << "+" << c << "-" << d <<"=7" << endl;
  } else if (a - b - c + d == 7) {
    cout << a << "-" << b << "-" << c << "+" << d <<"=7" << endl;
  } else if (a - b - c - d == 7) {
    cout << a << "-" << b << "-" << c << "-" << d <<"=7" << endl;
  }
  return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main()
{
	char a[100100];
	scanf("%s",a);
	int n=strlen(a);
	int ans=0;
	for (int i=0;i<n;i++)
	{
		if (i&1)
		{if (a[i]=='0') ans++;
		}
		else
		{
			if (a[i]=='1') ans++;
		}
	}
	cout<<min(ans,n-ans)<<endl;
	return 0;
 } 


Measured memory_bytes: 384
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AtCoderCS
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split();
            int A = int.Parse(input[0]);
            int B = int.Parse(input[1]);
            int C = int.Parse(input[2]);

            if(A < B)
            {
                if (A < C && C < B)
                {
                    Console.WriteLine("Yes");
                }
                else
                {
                    Console.WriteLine("No");
                }
            }
            else if (A > B)
            {
                if (A > C && C > B)
                {
                    Console.WriteLine("Yes");
                }
                else
                {
                    Console.WriteLine("No");
                }
            }

            Console.ReadLine();

        }
    }
}


Measured memory_bytes: 11092
A = list(str(input()))
B = list(str(input()))
C = list(str(input()))
s = "a"

for i in range(500):
    if s == "a":
        if len(A) == 0:
            print("A")
            break
        else:
            s = A[0]
            A.pop(0)
    elif s == "b":
        if len(B) == 0:
            print("B")
            break
        else:
            s = B[0]
            B.pop(0)
    else:
        if len(C) == 0:
            print("C")
            break
        else:
            s = C[0]
            C.pop(0)

Measured memory_bytes: 3064
#include <stdio.h>
#include <math.h>
#define PI 3.14159265358979

int main(){
	int a,b,x;
	scanf("%d%d%d",&a,&b,&x);
	if(2*x<a*a*b){
		printf("%.9f",atan2(b,2.0*x/a/b)*180/PI);
	}else{
		printf("%.9f",atan2((a*b-x*1.0/a)/a*2,a)*180/PI);
	}
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
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;
}

const long long INF = 1LL << 60;
const int MAX_N = 1e5 + 10;

int n, a[MAX_N][3];
long long dp[MAX_N][3];

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

	for (int i = 0; i < n; ++i)
	{
		for (int j = 0; j < 3; ++j)
		{
			for (int k = 0; k < 3; ++k)
			{
				if (j == k)
					continue;
				chmax(dp[i + 1][j], dp[i][k] + a[i][j]);
			}
		}
	}

	long long res = 0;
	for (int i = 0; i < 3; ++i)
	{
		chmax(res, dp[n][i]);
	}

	cout << res << endl;
}

Measured memory_bytes: 3712
#include <bits/stdc++.h>
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); i++) 
#define FOR(i, a, b) for(int (i) = a; (i) < (int)b; i++)
#define RREP(i, n) for(int (i)=((int)(n)-1); (i)>=0; i--)
#define RFOR(i, a, b) for(int (i) =((int)(b)-1); (i)>=0; i--)
#define ALL(v) (v).begin(),(v).end()
#define MOD 1000000007
#define F first
#define S second

using namespace std ;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vint> vvint;
typedef pair<int, int> pint;

int main()
{
  int n ;
  cin >> n ;
  vector<int> vec(n) ;
  int sum = 0 ;
  
  REP(i,n){
    cin >> vec.at(i) ;
  }
  
  sort(ALL(vec)) ;
  
  REP(i,n-1){
    sum += vec.at(i) ;
  }
  
  if(sum>vec.at(n-1)){
    cout <<"Yes"<<endl ;
  }
  else{
    cout <<"No"<<endl ;
  }

  return 0 ;
}




Measured memory_bytes: 256
#include <stdio.h>

int main(void) {
  int N, M, C, ac_count = 0, hoge = 0;
  scanf("%d %d %d", &N, &M, &C);

  int A[N][M], B[M];

  // Bいれるやつ
  for (int i = 0; i < M; i++) {
    scanf("%d", &B[i]);
  }

  // A入れるやつ 2次元配列
  for(int i = 0; i < N; i++) {
    for(int j = 0; j < M; j++) {
      scanf("%d", &A[i][j]);
    }
  }

  for(int i = 0; i < N; i++) {
    for(int j = 0; j < M; j++) {
      hoge += A[i][j] * B[j];
    }
    hoge += C;

    if(hoge > 0) {
      ac_count++;
    }

    hoge = 0;
  }
  printf("%d\n", ac_count);

  return 0;
}

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

int main(){
    int a,b,c;
    cin>>a>>b>>c;
    
    printf("%d %d %d\n",min(a,min(b,c)),a+b+c-min(a,min(b,c))-max(a,max(b,c)),max(a,max(b,c)));
    
    return 0;
}


Measured memory_bytes: 3208
N = int(input())

tmp = N
for i in range(1,8):
    tmp /= 10
    if tmp < 1:
        N_digit = i
        break

ans = 0
for i in range(1, N_digit, 2):
    ans += (10**i-1) - (10**(i-1)) +1

if N_digit%2 == 1:
    ans += len(range(10**(N_digit-1), N+1))

print(ans)

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

using namespace std;

using ll = long long;
using Vi = vector<int>;
using Vl = vector<ll>;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;

constexpr int I_INF = INT_MAX;
constexpr ll L_INF = LLONG_MAX;

//===




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

	//ifstream in("input/1_01.txt");
	//cin.rdbuf(in.rdbuf());

	int N, K; cin >> N >> K;
	vector<int> x(N);

	for (int i = 0; i < N; ++i) {
		cin >> x[i];
	}

	int ans = I_INF;

	for (int i = 0; i < N - K + 1; ++i) {
		int left = i, right = i + K - 1;
		if ((ll)x[left] * x[right] >= 0) {
			ans = min(ans, max(abs(x[left]), abs(x[right])));
		}
		else {
			int t_min = min(abs(x[left]), abs(x[right]));
			int t_max = max(abs(x[left]), abs(x[right]));
			ans = min(ans, t_min * 2 + t_max);
		}
	}

	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 640
I[100][9];n,w,r;C(int*a,int*b){r=strcmp(a+1,b+1);return r?r:*a-*b;}main(){for(;~scanf("%s%d",I[n]+1,I+n);n++);for(qsort(I,n,36,C);*I[w];puts(""),w=n)for(puts(I[w]+1),n=w;!strcmp(I[w]+1,I[n]+1);printf("%d",*I[n++]))w-n&&putchar(32);exit(0);}

Measured memory_bytes: 0
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>

using namespace std;

int main(void) {
    int N;
    cin >> N;
    vector<int> a(N);
    for(int i=0; i<N; ++i) {
        cin >> a[i];
    }
    cout << accumulate(a.begin(), a.end(), 0) - N << endl;
    return 0;
}


Measured memory_bytes: 256
# https://atcoder.jp/contests/abc164/tasks/abc164_b

A, B, C, D = gets.split.map(&:to_i)
def hit(h, a)
  q, r = h.divmod(a)
  q + (r.positive? ? 1 : 0)
end
cond = hit(A, D) >= hit(C, B)
puts cond ? 'Yes' : 'No'


Measured memory_bytes: 14304
#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;
typedef long long ll;
typedef pair<int,int> P;

const int mod = 1000000007;

int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  ll n, k;
  cin >> n >> k;
  vector<int> A(n);
  rep(i,n) cin >> A[i];
  ll ans = 0;
  k %= mod;
  rep(i,n) {
    ll left = 0, right = 0;
    rep(j,n) {
      if (A[i] > A[j]){
        if (i < j) right++;
        else if (j < i) left++;
      } 
    }
    ans += right*k % mod;
    ans %= mod;
    ans += (k-1)*k/2 % mod * (left + right) % mod;
    ans %= mod;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 256
#include <cstdio>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cassert>
#include <queue>
#include <stack>
#include <utility>
#include <tuple>
#include <string>
#include <functional>
#include <map>
#include <cstring>
#include <set>
#include <cmath>
using namespace std;

using ii = pair < int , int >;
using ti = tuple < int ,int ,int >;
using lint = long long;
using ll = pair < lint , lint >;

const int N = 55;
char a[N][N];
int p[N][N];
int d[N][N];
bool v[N][N];
int n,m;
int dx[4] = {1,0,-1,0};
int dy[4] = {0,1,0,-1};
int go(){
	int bn = 0, wn = 0;
	for(int i=0;i<n;i++)for(int j=0;j<m;j++){
		if(a[i][j]=='.'){
			++wn;
			p[i][j] = 0;
		}
		else{
			++bn;
			p[i][j] = 1;
		}
	}
	queue < ii > q;
	q.push(ii(0,0));
	v[0][0] = true;
	while(!q.empty()){
		int x = q.front().first;
		int y = q.front().second;
		q.pop();
		for(int i=0;i<4;i++){
			int nx = x + dx[i];
			int ny = y + dy[i];
			if(0<=nx && nx<n && 0<=ny && ny<m && !v[nx][ny] && p[nx][ny]==0){
				v[nx][ny] = true;
				d[nx][ny] = d[x][y] + 1;
				q.push(ii(nx,ny));
			}
		}
	}
	//printf("%d\n",wn);
	//printf("%d\n",d[n-1][m-1]);
	if(v[n-1][m-1]){
		return wn - d[n-1][m-1] - 1;
	}
	else{
		return -1;
	}
}

int main(){
	//freopen("in.txt","r",stdin);
	scanf("%d%d",&n,&m);
	for(int i=0;i<n;i++){
		scanf("%s",a[i]);
	}
	printf("%d\n",go());
	return 0;
}


Measured memory_bytes: 384
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {

	public static void main(String[] args) throws IOException{

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String x = br.readLine();
		String[] str = x.split(" ");
		int a = Integer.parseInt(str[0]);
		int b = Integer.parseInt(str[1]);
		int c = Integer.parseInt(str[2]);
		if(a<b&&b<c){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}
}

Measured memory_bytes: 24160
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
using namespace std;

int main()
{
string s;
cin>>s;
int i;
for(i=1;i<4;i++)if(s[i]==s[i-1])break;
if(i==4)cout<<"Good";
else cout<<"Bad";
}

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

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  int h, n;
  cin >> h >> n;
  
  int sum = 0, a;
  for(int i = 0; i < n; i++){
    cin >> a;
    sum += a;
  }
  
  if(sum >= h) cout << "Yes\n";
  else cout << "No\n";
}

Measured memory_bytes: 384
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<cmath>
using namespace std;

int main(){
  int n;
  vector<int> l;
  cin >> n;
  for(int i=0;i<2*n;i++){
    int tmp;
    cin >> tmp;
    l.push_back(tmp);
  }
  sort(l.begin(),l.end());
  int ret=0;
  for(int i=0;i<2*n;i+=2){
    ret+=l[i];
  }
  cout << ret<<endl;
}


Measured memory_bytes: 256
n,m=map(int,input().split())
x=[]
for i in range(n):
    x.append(list(map(int,input().split())))
y=[]
for i in range(m):
    y.append(int(input()))
for i in range(n):
    s=0
    for j in range(m):
        s+=x[i][j]*y[j]
    print(s)


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

#define int long long

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

int x, y;

signed main() {
    cin >> x >> y;
    int ans = abs(abs(x) - abs(y));
    if (x == 0) {
        if (y < 0) {
            ans++;
        }
    } else if (y == 0) {
        if (x > 0) {
            ans++;
        }
    } else if (x > 0 != y > 0) {
        ans++;
    } else if (x > y)      {
        ans += 2;
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) begin(v),end(v)
#define fi first
#define se second
template<typename A, typename B> inline bool chmax(A &a, B b) { if (a<b) { a=b; return 1; } return 0; }
template<typename A, typename B> inline bool chmin(A &a, B b) { if (a>b) { a=b; return 1; } return 0; }
using ll = long long;
using pii = pair<int, int>;
constexpr ll INF = 1ll<<30;
constexpr ll longINF = 1ll<<60;
constexpr ll MOD = 1000000007;
constexpr bool debug = 0;
//---------------------------------//

int main() {
	ll N;
	cin >> N;
	
	if ((N & 1) || N == 0) {
		cout << 0 << endl;
		return 0;
	}
	
	ll p5 = 1;
	while (p5 < N) p5 *= 5;
	p5 *= 2;
	
	ll sum = 0, ans = 0;
	
	while (p5 > 2) {
		ll cur = N / p5;
		// cur -= sum;
		sum += cur;
		ans += cur;
		p5 /= 5;
	}
	
	cout << ans << endl;
	
	return 0;
}
/*
1000000000000000000
124999999999999995
*/

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

int main()
{
  std::string s;
  std::cin >> s;
  int len = s.size();
  for ( int i = 0; i < len; i += 2 ) {
    std::cout << s[i];
  }
  std::cout << std::endl;
  return 0;
}


Measured memory_bytes: 512
#pragma  warning (disable:4996)
#include<iostream>
#include<cstdio>

using namespace std;

int fa[100005];
int marked[100005];

int find(int x){
	if (marked[x]) return x;
	else return find(fa[x]);
	
}

int main(){
	int n, q;
	while (scanf("%d%d", &n, &q)==2){
		if (n == 0&&q == 0) break;

		for (int i = 1; i <=n; i++) {
			fa[i] = i;
			marked[i] = 0;
		}
		marked[1] = 1;

         int x;
		for (int i = 2; i <= n; i++){
			scanf("%d", &x);
			fa[i] = x;
		}

		char ch;
		int dex;
		scanf("%c", &ch);
		long long ans = 0;
		int t;
		for (int i = 0; i < q;i++){
			scanf("%c%d", &ch, &dex);
			
         if (ch == 'Q'){
			 t = find(dex); 
				ans += t;
			}
		else marked[dex] = 1;
		scanf("%c", &ch);
		}

		cout << ans << endl;
	}return 0;
}

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

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

	for(int i = 1; i <= num; i++){
		if( i % 3 == 0 )
			cout << ' ' << i;
		else if( i % 10 == 3 )
			cout << ' ' << i;
		else 
			for(int j = i; j != 0;){
				j /= 10;
				if( j % 10 == 3 ){
					cout << ' ' << i;
					break;
				}
			}
	}
    cout << endl;

    return 0;
}

Measured memory_bytes: 1160
#include<bits/stdc++.h>
using namespace std;
int main()
{
    string s,t;
    cin>>s>>t;
    int l=s.size(),cn=0;
    for(int i=0;i<l;i++)
        if(s[i]!=t[i])
            cn++;
    cout<<cn<<endl;
    return 0;
}


Measured memory_bytes: 3916