akhauriyash/Code-Regression huggingface dataset:
#include<iostream>
using namespace std;

int calc(int x){
	int ret=0;
	while(x%100==0){
		x/=100;
		++ret;
	}
	return ret;
}

int main(){
	int D,N;
	cin>>D>>N;
	int cnt=0,val=0;
	while(cnt<N){
		++val;
		if(calc(val)==D)++cnt;
	}
	cout<<val<<'\n';
	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<cstring>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cmath>
#define pb(in,tmp) in.push_back(tmp)
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) loop(i,0,b)
#define all(in) in.begin(),in.end()
using namespace std;
int main(){
int a,b;
rep(i,7){
cin>>a>>b;
cout<<a-b<<endl;
}
}

Measured memory_bytes: 1160
#include<stdio.h>
int main()
{
	int X[128]={0};
	char c;
	for(;~(c=getchar());X[c]++);
	for(c=97;c<123;c++)
		printf("%c : %d\n",c,X[c]+X[c-32]);
	return 0;
}


Measured memory_bytes: 2088
#include <stdio.h>
int main(){
    int H, W, i, j;
        while(1){
            scanf("%d %d", &H, &W);
            if(H==0&&W==0)
                break;
            for(i=0;i<H;i++){
                for(j=0;j<W;j++){
                    if(i%2==1&&j%2==1)
                        printf("#");
                    if(i%2==1&&j%2==0)
                        printf(".");
                    if(i%2==0&&j%2==1)
                        printf(".");
                    if(i%2==0&&j%2==0)
                        printf("#");
                }
                printf("\n");
            }
        printf("\n");
        }
    return 0;
}

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

int main(){
    string s;
    cin >> s;
    int q;
    cin >> q;
    deque<char> que;
    rep(i,s.size()) que.push_back(s[i]);
    bool r = 0;
    rep(i,q){
        int a;
        cin >> a;
        if(a == 1){
            r = 1 - r;
        }
        else if(a == 2){
            int b;
            char c;
            cin >> b >> c;
            if(b == 1 && !r) que.push_front(c);
            if(b == 1 && r) que.push_back(c);
            if(b == 2 && !r) que.push_back(c);
            if(b == 2 && r) que.push_front(c);
        }
    }
    if(r) reverse(que.begin(),que.end());
    for(auto q : que){
        cout << q;
    }
    cout << endl;
}

Measured memory_bytes: 896
#if defined(__GNUC__)
#include <bits/stdc++.h>
// __GNUC__
#else
#include "bits/stdc++.h"
#endif
using namespace std;

#define int long long

#if defined(__GNUC__)
#define __int32 __int32_t
#endif // __GNUC__

#define itn __int32
#define REP(i, n) for(itn (i) = 0; (i) < (n); ++(i))
#define REP2(i, x, n) for(itn (i) = x; (i) < (n); ++(i))
#define ALL(x) (x).begin(), (x).end()
#define RALL(x) (x).rbegin(), (x).rend()
#define SORT(x) std::sort(ALL(x))
#define RSORT(x, T) std::sort(ALL(x), greater<T>())
#define REVERCE(x) std::reverce(ALL(x))

#define INT_POW(x, y) [](int a, int b) -> int {int c = a; REP(i, b - 1){c *= a;} return c;}(x, y)
#define INT_POWM(x, y, m) [](int a, int b, int m) -> int {int c = a; REP(i, b - 1){c *= a; c %= m;} return c;}(x, y, m)

itn main() {
	std::ios::sync_with_stdio(false);

	int n;
	string s;

	cin >> n >> s;

	int count = 0;

	REP(i, s.size() - 2) {
		if (s[i] == 'A' && s[i + 1] == 'B' && s[i + 2] == 'C') {
			++count;
		}
	}

	cout << count;

	return 0;
}


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


int n, e, dp[LIM][1<<LIM];
vector<int> adj[LIM];
bool chkBit(int mask, int pos){return mask & (1<<pos);}
int setBit(int mask, int pos){return mask | (1<<pos);}

int f(int u, int mask){
    if(__builtin_popcount(mask) == n-1) {
        //cout<<mask<<'\n';
        return 1;
    }
    if(dp[u][mask] != -1) return dp[u][mask];
    int ans = 0;
    for(int i = 0; i < adj[u].size(); i++){
        int v = adj[u][i];
        if(!chkBit(mask, v)){
            ans += f(v, setBit(mask, u));
        }
    }
    return dp[u][mask] = ans;
}

int main(){
    //freopen("ip.txt", "r", stdin);
    int T; T = 1;// cin>>T;
    for(int t = 1; t <= T; t++){
        cin>>n>>e;
        for(int i = 0; i < e; i++){
            int u, v; cin>>u>>v;
            --u, --v;
            adj[u].push_back(v);
            adj[v].push_back(u);
        }
        memset(dp, -1, sizeof dp);
        int cntPath = f(0, 0);
        //printf("Case %d: %d\n", t, cntPath);
        printf("%d\n", cntPath);
        for(int i = 0; i < n; i++) adj[i].clear();
    }
}


Measured memory_bytes: 8960
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #整数1つinput
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii())
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #文字列1つinput
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

n,w = mii()
wei,val= [0],[0]
for _ in range(n):
    p,q=mii()
    wei.append(p)
    val.append(q)

dp = [[0]*(w+1) for _ in range(n+1)]

for i in range(1,n+1):
    for j in range(1,w+1):
        if wei[i] > j:
            dp[i][j] = dp[i-1][j]
        else:
            dp[i][j] = max(dp[i-1][j-wei[i]]+val[i],dp[i-1][j])


print(dp[-1][-1])

Measured memory_bytes: 125436
#include <iostream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <cmath>
#include <functional>
#define vv(a, b, c, d) vector<vector<d> >(a, vector<d>(b, c))
#define vvi vector<vector<int> >
#define vvl vector<vector<ll> >
#define vll vector<ll>
#define rep(c, a, b) for(ll c=a;c<b;c++)
#define re(c, b) for(ll c=0;c<b;c++)
#define all(obj) (obj).begin(), (obj).end()
typedef long long int ll;
typedef long double ld;
using namespace std;
int main(int argc, char const *argv[]) {
  ll a, b, k;std::cin >> a >> b >> k;
  re(i, k){
    if(i%2==0){
      if(a%2==1) a--;
      b += a/2;
      a/=2;
    }else{
      if(b%2==1) b--;
      a += b/2;
      b/=2;
    }
  }
  std::cout << a << " " << b << '\n';
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main()
{
    int n,t;
    cin >> n >> t;
    vector<pair<int,int> > v;
    for(int i = 0;i < n;i++)
    {
        int x,y;
        cin >> x >> y;
        v.push_back(make_pair(x,y));
    }
    sort(v.begin(),v.end());
    for(int i = 0;i < n;i++)
    {
        if(v[i].second <= t)
        {
            cout << v[i].first;
            return 0;
        }
    }
    cout << "TLE";

    return 0;
}

Measured memory_bytes: 256
from collections import deque

def main():
    n,m = map(int, input().split())
    graph = [[] for _ in range(n)]
    for i in range(m):
        a,b = map(int, input().split())
        graph[a-1].append(b)
        graph[b-1].append(a)
    
    q = deque([1])
    prev=[1]
    siru = [0] * n
    siru[0] = 1
    while q:
    
        now = q.popleft()
        
        next = graph[now-1]
    
        
        for n in next:
            if not siru[n-1]: 
                q.append(n)
                siru[n-1] = now
    
    
    print("Yes")
    print("\n".join(map(str, siru[1:])))
if __name__ == "__main__":
    main()

        


Measured memory_bytes: 99608
#include <bits/stdc++.h>
 
using namespace std;
 
using int64 = long long;
const int mod = 1e9 + 7;
//const int mod = 998244353;
 
const int64 infll = (1LL << 62) - 1;
const int inf = (1 << 30) - 1;
 
struct IoSetup {
  IoSetup() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
    cerr << fixed << setprecision(10);
  }
} iosetup;
 
 
template< typename T1, typename T2 >
ostream &operator<<(ostream &os, const pair< T1, T2 > &p) {
  os << p.first << " " << p.second;
  return os;
}
 
template< typename T1, typename T2 >
istream &operator>>(istream &is, pair< T1, T2 > &p) {
  is >> p.first >> p.second;
  return is;
}
 
template< typename T >
ostream &operator<<(ostream &os, const vector< T > &v) {
  for(int i = 0; i < (int) v.size(); i++) {
    os << v[i] << (i + 1 != v.size() ? " " : "");
  }
  return os;
}
 
template< typename T >
istream &operator>>(istream &is, vector< T > &v) {
  for(T &in : v) is >> in;
  return is;
}
 
template< typename T1, typename T2 >
inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }
 
template< typename T1, typename T2 >
inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }
 
template< typename T = int64 >
vector< T > make_v(size_t a) {
  return vector< T >(a);
}
 
template< typename T, typename... Ts >
auto make_v(size_t a, Ts... ts) {
  return vector< decltype(make_v< T >(ts...)) >(a, make_v< T >(ts...));
}
 
template< typename T, typename V >
typename enable_if< is_class< T >::value == 0 >::type fill_v(T &t, const V &v) {
  t = v;
}
 
template< typename T, typename V >
typename enable_if< is_class< T >::value != 0 >::type fill_v(T &t, const V &v) {
  for(auto &e : t) fill_v(e, v);
}
 
template< typename F >
struct FixPoint : F {
  FixPoint(F &&f) : F(forward< F >(f)) {}
 
  template< typename... Args >
  decltype(auto) operator()(Args &&... args) const {
    return F::operator()(*this, forward< Args >(args)...);
  }
};
 
template< typename F >
inline decltype(auto) MFP(F &&f) {
  return FixPoint< F >{forward< F >(f)};
}
 
int main() {
  string S;
  cin >> S;
  if(S[2] == S[3] && S[4] == S[5]) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long long
#define V vector<long long>
#define VV vector<vector<long long>>
#define VVV vector<vector<vector<long long>>>
#define P pair<ll,ll>
#define rep(i,n) for(ll (i)=0;(i)<(n);++(i))
using namespace std;

int main() {
    ll s,w;
    cin>>s>>w;
    if(w>=s){
        cout<<"unsafe"<<endl;
    }else{
        cout<<"safe"<<endl;
    }
}


Measured memory_bytes: 3636
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String N = sc.nextLine();
		String n[] = N.split("");
		if (n[0].equals(n[1]) && n[0].equals(n[2]) || n[1].equals(n[2]) && n[1].equals(n[3])) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}

Measured memory_bytes: 21972
n, m = map(int, input().split())
hils = list(map(int, input().split()))
nuls = list(range(n))
outls = []

for i in range(m):
    a, b = map(int, input().split())
    if hils[a - 1] < hils[b - 1]:
        if a not in outls:
            outls.append(a)
    elif hils[a - 1] == hils[b - 1]:
        if a not in outls:
            outls.append(a)
        if b not in outls:
            outls.append(b)
    else:
        if b not in outls:
            outls.append(b)

a = n - len(outls)
print(a)

Measured memory_bytes: 84996
#![allow(unused, non_snake_case, dead_code, non_upper_case_globals)]
use {
    proconio::{marker::*, *},
    std::{cmp::*, collections::*, mem::*},
};

fn main() {
    input! {
        n:usize,m:usize,k:usize
    }

    let mut dp = vec![vec![0; m + 1]; n + 1];
    dp[0][0] = 0;
    dp[0][1] = n;
    dp[1][0] = m;
    for i in 0..n {
        for j in 0..m {
            dp[i + 1][j] = dp[i][j] + m - j * 2;
            dp[i][j + 1] = dp[i][j] + n - i * 2;
        }
    }
    let mut ans = false;

    ans = dp
        .iter()
        .filter(|&x| x.iter().filter(|&y| y == &k).count() > 0)
        .count()
        > 0;
    yn(ans);
}
pub fn yn(ans: bool) {
    if ans {
        println!("Yes");
    } else {
        println!("No");
    }
}


Measured memory_bytes: 9960
#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
#include<set>
#include<complex>
#include<bitset>
#include<stack>
#include<unordered_map>
#include<utility>
#include<tuple>
using namespace std;
typedef long long ll;
typedef unsigned int ui;
const ll mod = 1000000007;
const ll INF = (ll)1000000007 * 1000000007;
typedef pair<int, int> P;
#define stop char nyaa;cin>>nyaa;
#define rep(i,n) for(int i=0;i<n;i++)
#define per(i,n) for(int i=n-1;i>=0;i--)
#define Rep(i,sta,n) for(int i=sta;i<n;i++)
#define Per(i,sta,n) for(int i=n-1;i>=sta;i--)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define per1(i,n) for(int i=n;i>=1;i--)
#define Rep1(i,sta,n) for(int i=sta;i<=n;i++)
typedef long double ld;
const ld eps = 1e-8;
const ld pi = acos(-1.0);
typedef pair<ll, ll> LP;
int dx[4]={1,-1,0,0};
int dy[4]={0,0,1,-1};

int n,m,h[100010];
vector<int> G[100010];

void solve(){
    cin >> n >> m;
    rep(i,n){
        cin >> h[i];
    }
    rep(i,m){
        int a,b;cin >> a >> b;a--;b--;
        G[a].push_back(b);
        G[b].push_back(a);
    }
    int ans=0;
    rep(i,n){
        int max_h=0;
        for(int t:G[i]){
            max_h=max(max_h,h[t]);
        }
        if(h[i]>max_h)ans+=1;
    }
    cout << ans << endl;
}

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

Measured memory_bytes: 9144
import           Data.Set (empty, member, insert)

nub' :: (Ord a) => [a] -> [a]
nub' l = nub'' l empty
  where
    nub'' [] _ = []
    nub'' (x:xs) s
      | x `member` s = nub'' xs s
      | otherwise = x:nub'' xs (x `insert` s)

main = do
  getLine
  a <- map (read :: String -> Int) . words <$> getLine
  putStrLn
    $ if length a == (length . nub') a
      then "YES"
      else "NO"

Measured memory_bytes: 213728
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(x) (x).begin(), (x).end()
void make_unique(vector<ll> vec)
{
sort(all(vec));
vec.resize(unique(all(vec)) - vec.begin());
}

int main() 
{   //int t;
    //cin>>t;
    //while(t--)
    //{ll k,n,m,i,j,flag=0,count=0,s=0;
    // cin>>n;
     //vector<ll> v(n);
      
    //  for(auto &i: v)
     // cin>>i;
     int x;
     cin>>x;
     if(x>=30)
     cout<<"Yes"<<endl;
     else 
     cout<<"No"<<endl;
      
    
   // }
    
    
	return 0;
}


Measured memory_bytes: 3632
#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <functional>
#include <limits.h>
#include <set>
#include <map>
#include <tuple>
using namespace std;

#define ll long long
#define ull unsigned long long
#define rep(i,N) for (ll i=0;i<N;i++)
#define loop(i,N,M) for(ll i=N;i<M;i++)
#define MAX(v) *max_element(v.begin(),v.end())
#define MIN(v) *min_element(v.begin(),v.end())
#define SORTL2S(type,v) sort(v.begin(),v.end(),greater<type>())
#define SORTS2L(type,v) sort(v.begin(),v.end())
#define SORTMF(v,func) sort(v.begin(),v.end(),func)

//template<typename A, size_t N, typename T>
//void Fill(A(&array)[N], const T &val) {
	//std::fill((T*)array, (T*)(array + N), val);
//}

//解法
void solve() {

	ll N, M;
	cin >> N >> M;

	priority_queue<double> PQ;

	rep(i, N) {
		double a;
		cin >> a;
		PQ.push(a);
	}

	rep(i, M) {
		double P = PQ.top();
		PQ.pop();
		P /= 2;
		PQ.push(P);
	}

	ll ans = 0;
	while (PQ.size() != 0) {
		double P = PQ.top();
			PQ.pop();
		ans += floor(P);
	}

	cout << ans;

}

int main() {

	//入力

	solve();
	cout << endl;
	return 0;
}


Measured memory_bytes: 1400
#include<iostream>
#include<bits/stdc++.h>
#include<iomanip>
#include<math.h>
#include<vector>
#include<cctype>
#include<string>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
std::string line;


int main(){

    string s;
    cin >> s;

    if(s=="SUN")cout << 7 << endl;
    else if(s=="MON")cout << 6 << endl;
    else if(s=="TUE")cout << 5 << endl;
    else if(s=="WED")cout << 4 << endl;
    else if(s=="THU")cout << 3 << endl;
    else if(s=="FRI")cout << 2 << endl;
    else if(s=="SAT")cout << 1 << endl;

   return 0;
}

Measured memory_bytes: 256
#include<cstdio>

using namespace std;

int gcd(int a,int b){
	if(b==0)return a;
	return gcd(b,a-(a/b)*b);
}

int main(){
	int a,b;
	int g,l;
	int tmp;
	while ( ! (scanf("%d %d",&a,&b) == EOF) ){
		g = gcd(a,b);
		l = a/g*b;
		printf("%d %d\n",g,l);
	}
}

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

int main()
{
    int N;
    cin >> N;
    set<string> S;

    for (int i = 0; i < N;++i){
        string s;
        cin >> s;
        S.insert(s);
    }
    if(S.size() == 3){
        cout << "Three" << endl;
    }else{
        cout << "Four" << endl;
    }

    return 0;
}

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

const int inf = (int)1e9+7;

struct Task {
	int n;
	vector<int> a;
	vector<int> ord;
	vector<int> was;
	vector<int> comp;
	set<pair<int,int>> avail;

	Task(int n): n(2*n), a(2*n) {
		for (auto& item : a) {
			cin >> item;
		}
	}

	void dfs(int v, int d) {
		avail.erase({a[v^1], v^1});
		was[v] = 1;

		while (!avail.empty()) {
			auto up = avail.lower_bound({a[v]+d, 0});
			if (up == avail.begin()) break;
			--up;
			if (abs(up->first - a[v]) >= d) break;
			int to = up->second^1;
			if (to == (v^1)) break;
			if (!was[to]) dfs(to, d);
		}

		while (!avail.empty()) {
			auto down = avail.lower_bound({a[v]-d, inf});
			if (down == avail.end()) break;
			if (abs(down->first - a[v]) >= d) break;
			int to = down->second^1;
			if (to == (v^1)) break;
			if (!was[to]) dfs(to, d);
		}

		ord.push_back(v);
	}

	void dfsr(int v, int d, int color) {
		avail.erase({a[v], v});
		was[v] = 1;
		comp[v] = color;

		while (!avail.empty()) {
			auto up = avail.lower_bound({a[v^1]+d, 0});
			if (up == avail.begin()) break;
			--up;
			if (abs(up->first - a[v^1]) >= d) break;
			int to = up->second;
			if (to == (v^1)) break;
			if (!was[to]) dfsr(to, d, color);
		}

		while (!avail.empty()) {
			auto down = avail.lower_bound({a[v^1]-d, inf});
			if (down == avail.end()) break;
			if (abs(down->first - a[v^1]) >= d) break;
			int to = down->second;
			if (to == (v^1)) break;
			if (!was[to]) dfsr(to, d, color);
		}
	}

	bool check(int d) {
		avail.clear();
		ord.clear();
		comp.assign(n, 0);

		was.assign(n, 0);
		for (int i = 0; i < n; ++i) {
			avail.insert({a[i], i});
		}
		for (int i = 0; i < n; ++i) {
			if (!was[i]) {
				dfs(i, d);
			}
		}
		reverse(ord.begin(), ord.end());

		was.assign(n, 0);
		for (int i = 0; i < n; ++i) {
			avail.insert({a[i], i});
		}
		int compNum = 0;
		for (auto& ver : ord) {
			if (!was[ver]) {
				++compNum;
				dfsr(ver, d, compNum);
			}
		}
		for (int i = 0; i < n; ++i) {
			if (comp[i] == comp[i^1]) {
				return false;
			}
		}
		return true;
	}

	void run() {
		int l = -1, r = inf;
		while (r - l > 1) {
			int m = (l + r) / 2;
			if (check(m)) l = m; else r = m;
		}
		cout << l << '\n';
	}
};

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

	int n;
	cin >> n;

	Task a(n);
	a.run();

	return 0;
}

Measured memory_bytes: 2944
#include<stdio.h>

void trace(int A[], int n){
  int i;
  for ( i = 1; i <= n; i++ ){
    if ( i > 1 ) printf(" ");
    printf("%d", A[i]);
  }
  printf("\n");
}

void move(int *num,int *j,int *stop){
	int i,temp;

	for(i=*stop-1;i>=*j;i--){
		temp=*(num+i);
		*(num+i+1)=temp;
	}
}

void change(int *num,int *n){
	int i,j,temp;
	
	for(i=2;i<=*n;i++){
		for(j=1;j<i;j++){
			if(*(num+i)<=*(num+j)){
				temp=*(num+i);
				move(num,&j,&i);
				*(num+j)=temp;
				break;
			}
		}
		trace(num,*n);
	}
}

int main(){
  int n, i, j;
  int A[1001];
  scanf("%d", &n);

  for ( i = 1; i <= n; i++ ) scanf("%d", &A[i]);
  
  trace(A, n);
  change(A,&n);

  return 0;
}

Measured memory_bytes: 608
#include <bits/stdc++.h>
#define ll long long
#define str string
#define sonic ios_base::sync_with_stdio(0)
using namespace std;
int main(){
	sonic;
	ll n,cnt=0;
	cin>>n;
	str s;
	cin>>s;
	if(n%2==1){
		cout<<"No";
		return 0;
	}
	for(ll i=0; i<n/2; i++){
		if(s[i]==s[i+n/2]){
			cnt++;
		}
	}
	if(cnt==n/2){
		cout<<"Yes";
	}
	else{
		cout<<"No";
	}
}

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

int main(){
  double v;
  double h;
  int ans;
  double min;
  while(cin>>min){
    v=0;
    h=0;
    ans=1;
    for(;v<min;ans++){
      h=5*ans-5;
      v=9.8*sqrt(h/4.9);
    }
    cout<<ans-1<<"\n";
  }
  return 0;
}

Measured memory_bytes: 0
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
#define FOR(n) for(int i=0;i<n;++i)
#define inf 0x3f3f3f3f
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll n, d, x, y;
signed main() {
	cin >> n >> d;
	ll cnt = 0;
	d *= d;
	while (n--) {
		cin >> x >> y;
		if (x * x + y * y <= d)++cnt;
	}
	cout << cnt << endl;
	return 0;
}

Measured memory_bytes: 3628
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		int n, taro_counter = 0, hanako_counter = 0;
		String taro, hanako;
		try (Scanner sc = new Scanner(System.in)) {
			n = sc.nextInt();
			for(int i = 0; i < n; i++) {
				taro = sc.next();
				hanako = sc.next();
				if(taro.compareTo(hanako) > 0) {
					taro_counter = taro_counter + 3;
				}else if(taro.compareTo(hanako) == 0){
					taro_counter++;
					hanako_counter++;
				}
				else {
					hanako_counter = hanako_counter + 3;
				}
			}
			System.out.println(taro_counter + " " + hanako_counter);
		}
	}
}



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

//The Melancholy of Thomas Right
public class Main{

	void run(){
		Scanner sc = new Scanner(System.in);
		for(;;){
			int n = sc.nextInt();
			if(n==0)break;
			int[] a = new int[n], b = new int[n];
			for(int i=0;i<n;i++)a[i]=sc.nextInt();
			for(int i=0;i<n;i++)b[i]=sc.nextInt();
			Arrays.sort(a);
			Arrays.sort(b);
			int t = 0, c = 0;
			while(t<n&&a[t]==0)t++;
			boolean f = true;
			for(int i=n-1;i>=0;i--){
				if(n-t!=b[i]){
					f = false; break;
				}
				c++;
				while(t<n&&a[t]<=c)t++;
			}
			System.out.println(f?"Yes":"No");
		}
	}
	
	public static void main(String[] args) {
		new Main().run();
	}
}

Measured memory_bytes: 12000
// codeforces.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <bits/stdc++.h>
using namespace std;
using ll =long long int;
constexpr ll mod = 1e12;
int main()
{
	ll n, q, k; cin >> n >> q >> k; ll r = k;
	map<ll, ll>m;
	while (k--) {
		ll val; cin >> val; m[val]++;
	}
	for (ll i = 1; i <= n; ++i) {
		if (q - r + m[i] <= 0)puts("No");
		else puts("Yes");
	}
	return 0;
}

// Run program: Ctrl + F5 or Debug > Start Without Debugging menu
// Debug program: F5 or Debug > Start Debugging menu

// Tips for Getting Started: 
//   1. Use the Solution Explorer window to add/manage files
//   2. Use the Team Explorer window to connect to source control
//   3. Use the Output window to see build output and other messages
//   4. Use the Error List window to view errors
//   5. Go to Project > Add New Item to create new code files, or Project > Add Existing Item to add existing code files to the project
//   6. In the future, to open this project again, go to File > Open > Project and select the .sln file


Measured memory_bytes: 6912
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read() for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


A, B = read_ints()

if A == B:
    print(A+B)
else:
    tmp = max(A, B)
    print(tmp+tmp-1)


Measured memory_bytes: 3064
n,m,q = map(int,input().split())
pairs = []
def makelen(a):
    if len(a) == n:
        pairs.append(a)
    else:
        for i in range(a[-1],m+1):
            makelen(a + [i])
for i in range(m):
    makelen([i+1])
Query = [list(map(int,input().split())) for _ in range(q)]
ans = 0
for pair in pairs:
    tmpans = 0
    for a,b,c,d in Query:
        if pair[b-1] - pair[a-1] == c:
            tmpans += d
    ans = max(tmpans,ans)
print(ans)

Measured memory_bytes: 22956
#include <bits/stdc++.h>
#define ll long long
#define vl vector<ll int>
#define vs vector<string>
#define v vector<int>
#define mi map<int,int>
#define mc map<char,int>
//ios_base::sync_with_stdio(false);cin.tie(NULL);

using namespace std;

int main(){
	ios_base::sync_with_stdio(false);cin.tie(NULL);
		ll int n,k,i=0;
		cin>>n >>k;
		ll int move=0;
		v A(n);
		for(auto &x:A)cin>>x;
		if(k>=n){move=0;}
		else if(k==0){
			for(auto x:A)move+=x;
			}
		else if(k<n){
			sort(A.rbegin(),A.rend());
			for(i=k;i<n;i++){
				move+=A[i];
				}
			}
			cout<<move <<"\n";
		}


Measured memory_bytes: 3940
import java.util.*;

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

class Solver {
    private String MATCH = "keyence";

    public void run() {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int N = MATCH.length();

        for (int i = 0; i < N; i++) {
            String pre = MATCH.substring(0, i);
            String suf = MATCH.substring(i, N);

            if (S.startsWith(pre) && S.endsWith(suf)) {
                System.out.println("YES");
                return;
            }
        }

        System.out.println("NO");
        return;
    }

}

Measured memory_bytes: 22992
#include<bits/stdc++.h>
//cervello|Phoenix
using namespace std;
#define ll long long int
#define eb emplace_back
#define mk make_pair
#define all(x) x.begin(),x.end()
#define mod 1000000007

vector<bool> prime(1000001,1);

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  for(int i=2;i*i<=1000000;i++)
    if(prime[i])
      for(int j=i*2;j<=1000000;j+=i)
        prime[j]=0;

  int n; cin>>n;
  vector<int> ans; int p=11;
  while(ans.size()<n){
    if(prime[p]&&(p%5==1))
      ans.eb(p);
    p++;
  }

  for(auto i:ans)
    cout<<i<<" ";
  cout<<"\n";
  return 0;
}

Measured memory_bytes: 384
N, K = gets.split.map(&:to_i)

path_cnt = (1..(N - 2)).inject(:+) || 0

if path_cnt < K
  puts -1
  exit
end

edges = []

2.upto(N) do |v|
  edges << [1, v]
end

from = 2
to = 3

while path_cnt > K
  edges << [from, to]

  to += 1

  if to > N
    from += 1
    to = from + 1
  end

  path_cnt -= 1
end

puts edges.size
edges.each do |u, v|
  puts [u, v].join(' ')
end


Measured memory_bytes: 2300
#![allow(non_snake_case, unused)]
use std::cmp::*;
use std::collections::*;
use std::f64::consts::*;

macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

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

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

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

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

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

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

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

    ($next:expr, bytes) => {
        read_value!($next, String).into_bytes()
    };

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

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

fn main() {
    input!{
        n: usize,
        a: [usize; n],
    }
    let mut dict = HashMap::new();
    for &a_ in a.iter() {
        *dict.entry(a_).or_insert(0) += 1;
    }

    let mut hw = vec![];
    for (k, v) in dict.iter() {
        if *v >= 4 {
            hw.push(k);
            hw.push(k);
        } else if *v >= 2 {
            hw.push(k);
        }
    }
    hw.sort();
    hw.reverse();
    if hw.len() < 2 {
        println!("0")
    } else {
        println!("{}", hw[0] * hw[1]);
    }
}


Measured memory_bytes: 12540
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<set>
#include<map>
#include<iomanip>

#define INF 1<<29

using namespace std;

int main(void) {
	string s, t;
	cin >> s >> t;
	bool ans = false;
	for (int i = 0; i < s.size(); i++) {
		if (s == t) {
			ans = true;
			break;
		}
		s = s.back() + s.substr(0, s.size() - 1);
	}
	if (ans) {
		cout << "Yes";
	}
	else {
		cout << "No";
	}
	return 0;
}

Measured memory_bytes: 256
n, m = map(int, input().split())
ab = []
for i in range(n):
    ab.append(tuple(map(int, input().split())))

ab.sort()
rem = m
ans = 0

for a, b in ab:
    if rem <= b:
        ans += a * rem
        break
    else:
        ans += a * b
        rem -= b

print(ans)


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

int main() {
  int N;
  cin >> N;
  set<int> S;
  for (int i = 0; i < N; i++) {
    int n;
    cin >> n;
    S.insert(n);
  }

  int q;
  cin >> q;
  int count = 0;
  for (int i = 0; i < q; i++) {
    int n;
    cin >> n;
    if (S.count(n) > 0) count++;
  }
  cout << count << endl;
}


Measured memory_bytes: 3160
ABCD = input()
 
for i in range(2**3):
    ans = ABCD[0]
    num = int(ABCD[0])
    for j in range(3):
        if (i >>j & 1):
            ans = ans + '+' + ABCD[j+1]
            num = num + int(ABCD[j+1])
        else:
            ans = ans + '-' + ABCD[j+1]
            num = num - int(ABCD[j+1])
    if num == 7:
        print(ans + '=7')
        break

Measured memory_bytes: 3064
n = gets.to_i
flag = true
old_t, old_a, old_b = 0, 0, 0

n.times do
  t,a,b = gets.split.map(&:to_i)
  diff_t = (t - old_t)
  diff_a = (a - old_a)
  diff_b = (b - old_b)

  distance = diff_a+diff_b

  if diff_t < distance || (distance+diff_t).odd?
    flag = false
  end

  old_t = t
  old_a = a
  old_b = b
end

if flag
  puts 'Yes'
else
  puts 'No'
end

Measured memory_bytes: 1788
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

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

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

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

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

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

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

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}
use std::collections::HashMap;
fn main(){
    input!{
        x:usize,
        y:usize,
    }
    let mut sub = x;
    let mut ans = 0;
    while sub  <= y {
        sub *= 2;
        ans += 1;
    }
    println!("{}",ans);
}

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

using namespace std;

int main(int argc, char *argv[]) {
    int64_t N, A, B;
    cin >> N >> A >> B;

    int64_t sum = A + B;
    int64_t p = N / sum;
    int64_t r = N % sum;
    int64_t ans = (p * A) + min(A, r);
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 256
// input/output
#include <fstream>
#include <iostream>
#include <sstream>
// container class
#include <array>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>
// math, algorithm
#include <algorithm>
#include <cmath>
#include <complex>
#include <numeric>
// etc
#include <bitset>
#include <cassert>
#include <cctype>
#include <cstring>
#include <chrono>
#include <functional>
#include <iomanip>
#include <random>
#include <utility>
// using-directive
using namespace std;
// alias template
using int64 = long long;
using uint64 = unsigned long long;
using vi = std::vector<int>;
using vl = std::vector<int64>;
using pii = std::pair<int, int>;
using pii = std::pair<int, int>;
using pll = std::pair<int64, int64>;
// text macro replacement
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define all(_) (_).begin(), (_).end()
#define rall(_) (_).rbegin(), (_).rend()
#define print(_) std::cout << (_) << '\n'
#define debug(_) std::cerr << #_ << ": " << (_) << '\n'
#define dbg(vec) for (size_t _ = 0; _ < vec.size(); ++_){std::cerr << #vec << "[" << _ << "] : " << vec[_] << '\n';}
// variadic template
template<typename T> inline void chmin(T &a, T b) {if (a > b) a = b; return;}
template<typename T> inline void chmax(T &a, T b) {if (a < b) a = b; return;}
// constant
const int INF = (1<<30) - 1;  // 1.073741823e9
const int64 INF64 = (1LL<<62) - 1;  // 4.611686018427387903e18
const int MOD = 1000000007;
 
const double pi = 3.141592653589793;
vector<double> x(101), y(101);
int n; 
 
inline double naiseki(const double& x1, const double& y1, const double& x2, const double& y2) {
  return x1 * x2 + y1 * y2;
}
 
// 角度 theta の方向を最終的に向くとして計算
// theta は radian
double calc(const double& theta) {
  double res = 0.0;
  double dx = cos(theta), dy = sin(theta);
  for (int i = 0; i < n; ++i) {
    res += max(0.0, naiseki(dx, dy, x[i], y[i]));
  }
  return res;
}
 
int main(){
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
 
  cin >> n;
  rep(i, n) cin >> x[i] >> y[i];
 
  int step = 777777;
 
  double ans = 0.0;
 
  for (int i = 0; i < step; ++i) {
    double theta = 2.0 * pi * i / step;
    chmax(ans, calc(theta));
  }
 
  cout << setprecision(15) << ans << '\n';
 
  return 0;
}

Measured memory_bytes: 896
#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
#define int long long
int MOD = 1000000007;
signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N, M;
	cin >> N >> M;
	vector<int> A(N);
	int res = 0;
	for (int i = 0; i < N; i++) {
		cin >> A[i];
	}
	vector<int> C(N + 1);
	C[0] = 0;
	map<int, int> mp;
	mp[0] = 1;
	for (int i = 0; i < N; i++) {
		C[i + 1] = (C[i] + A[i]) % M;
		mp[C[i + 1]]++;
	}
	for (auto m : mp) {
		//cerr << m.first << " " << m.second << endl;
		res += (m.second - 1) * m.second / 2;
	}
	cout << res << endl;
}

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

#include <iostream>
#include <vector>
using namespace std;

//重複順列
vector<ll> buf;
void permutation(ll i, const ll size, const ll range_start, const ll range_end)
{
    if (i == size) {
      // ここで所望の作業を行う
      for(ll itr:buf){
        cout << itr;
      }
    }
    else{
        for(ll j = range_start; j <= range_end; ++j){
            buf[i] = j;
            permutation(i + 1, size, range_start, range_end);
        }
    }
}

int main(void)
{
 ll a, b, c, k, ans=0;
 cin >> a >> b >> c >> k;
 if(k<=a){
    ans = k;
  }else if(k <= a+b){
    ans = a;
  }else{
    ans = a - (k-a-b);
  }
 cout << ans << endl;
 return 0;
}


Measured memory_bytes: 3596
#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<(b);++i)
#define erep(i,a,b) for(int i=a;i<=(int)(b);++i)
#define per(i,a,b) for(int i=(b);i>(a);--i)
#define eper(i,a,b) for(int i=((int)(a));i>=b;--i)
#define pb push_back
#define mp make_pair
#define INF 2000000000
#define MOD 1000000007
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int lcm(int a,int b){return a/gcd(a, b)*b;}

int n, x, m[110];
int main() {
 ios::sync_with_stdio ( false );
 cin.tie ( 0 );
    cin >> n >> x;
    int ans = 0, cnt = 0;
    rep(i, 0, n) {
        cin >> m[i];
        cnt += m[i];
    }
    x -= cnt;
    ans += n;
    sort(m, m+n);
    ans += (x/m[0]);
    cout << ans << endl;
    return 0;
}

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

int main()
{
    int n, a, b;
    cin >> n;
    a = 0;
    b = 0;
    vector<int> arr(n);
    rep(i, n)
    {
        cin >> arr[i];
    }
    sort(arr.begin(), arr.end());
    reprev(i, n)
    {
        if (i % 2 == 0)
            a += arr[i];
        else
            b += arr[i];
    }

    if (n % 2 == 0)
        cout << (b - a) << endl;
    else
        cout << (a - b) << endl;
}

Measured memory_bytes: 384
import java.math.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int rates[] = new int[8];
        int ored = 0;
        for (int i = 0; i < n; i++) {
            int tmp = sc.nextInt();
            if (tmp >= 3200) {
                ored++;
                continue;
            }
            rates[(int) tmp / 400] = tmp;
        }
        int ans = 0;
        int check = 0;
        for (int i = 0; i < 8; i++) {
            if (rates[i] != 0)
                ans++;
            check += rates[i];
        }
        boolean isRed = false;
        if (check == 0) {
            ans = 1;
            isRed = true;
        }
        System.out.print(ans + " ");
        if (ored > 0) {
            ans += ored;
            if (isRed)
                ans--;
        }
        System.out.println(ans);
    }
}

Measured memory_bytes: 23892
N = int(input())
S = input()

ans = 0

for i in range(N):

    if i != 0:

        now = 0
        
        dicA = {}
        dicB = {}

        A = S[:i]
        B = S[i:]

        for j in A:
            dicA[j] = 1

        for j in B:
            dicB[j] = 1

        for j in dicA:

            if j in dicB:

                now += 1

        ans = max(ans,now)

print (ans)


Measured memory_bytes: 3064
#include <stdio.h>

int main(void) {
	int n,i,a=0;
	scanf("%d",&n);
	if(n==2) {printf("%d",1); return 0;}
	for(i=0;i<n;i++) {
		a=i*i;
		if(a>n) {i--; break;}
	}
	printf("%d\n",i*i);
	return 0;
}

Measured memory_bytes: 128
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int , int> i_i;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> vvl;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvec;
typedef vector<vector<bool>> vveb;
typedef vector<vector<string>> vves;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define rep2(i,n) for(int i=2;i<(int)(n);i++)
#define repk(i,k,n) for(int i=k;i<(int)(n);i++)
#define fs first
#define sc second
#define pb push_back
#define pp pop_back
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define maxel(a) *max_element(all(a))
#define minel(a) *min_element(all(a))
#define acc accumulate
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define mod (1000000007)
typedef long long int64;
//const int64 INF = 1LL << 58;
#define dame { puts("-1"); return 0;}
#define YES { cout << "YES" << endl; return 0; }
#define NO { cout << "NO" << endl; return 0; }
#define Yes { cout << "Yes" << endl; return 0; }
#define No { cout << "No" << endl; return 0; }
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};


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

    int a,b,c;
    cin >> a >> b >> c;
    cout << a*b/2 << endl;
    
    return 0;

}


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

using namespace std;

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

	while(remaining_line--)
	{
		int side[3];
		for(auto& i : side)
			cin >> i;
		sort(side, side+3);

		if(side[0]*side[0] + side[1]*side[1] == side[2]*side[2])
			cout << "YES" << endl;
		else
			cout << "NO" << endl;
	}

	return 0;
}

Measured memory_bytes: 1164
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
using u64 = unsigned long long;
#define REP(i, n) for (int i = 0; (i64)(i) < (i64)(n); ++i)

#ifdef ENABLE_DEBUG
template <typename T>
void debug(T value) {
  cerr << value;
}
template <typename T, typename... Ts>
void debug(T value, Ts... args) {
  cerr << value << ", ";
  debug(args...);
}
#define DEBUG(...)                              \
  do {                                          \
    cerr << " \033[33m (L" << __LINE__ << ") "; \
    cerr << #__VA_ARGS__ << ":\033[0m ";        \
    debug(__VA_ARGS__);                         \
    cerr << endl;                               \
  } while (0)
#else
#define debug(...)
#define DEBUG(...)
#endif

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N, C;
  cin >> N >> C;
  vector<vector<int>> D(C, vector<int>(C));
  vector<vector<int>> colors(N, vector<int>(N));
  REP(i, C) REP(j, C) { cin >> D[i][j]; }
  REP(i, N) REP(j, N) {
    cin >> colors[i][j];
    colors[i][j]--;
  }

  vector<vector<int>> color_count(3, vector<int>(C));
  REP(r, N) REP(c, N) {
    int k = (r + c) % 3;
    color_count[k][colors[r][c]]++;
  }

  i64 ans = 1LL << 60;
  REP(x, C) {
    i64 cost0 = 0;
    REP(from, C) { cost0 += D[from][x] * color_count[0][from]; }
    REP(y, C) {
      if (x == y) continue;
      i64 cost1 = 0;
      REP(from, C) { cost1 += D[from][y] * color_count[1][from]; }
      REP(z, C) {
        if (z == x || z == y) continue;
        i64 cost2 = 0;
        REP(from, C) { cost2 += D[from][z] * color_count[2][from]; }
        ans = min(ans, cost0 + cost1 + cost2);
      }
    }
  }
  cout << ans << endl;
}


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

int main(void) {
	char s[11], flag = 1, count = 0;
	
	scanf("%s", &s[0]);
	
	if (s[0] != 'A')
		flag = 0;
	if ((s[1] - 'A' <= 'Z' - 'A' && s[1] - 'A' >= 0))
		flag = 0;
	for (int i = 2; i < strlen(s) - 1; i++)
		if (s[i] - 'A' <= 'Z' - 'A' && s[i] - 'A' >= 0)
			count++;
	if ((s[strlen(s) - 1] - 'A' <= 'Z' - 'A' && s[strlen(s) - 1] - 'A' >= 0))
		flag = 0;
	
	printf(count == 1 && flag ? "AC" : "WA");
	
	return 0;
}

Measured memory_bytes: 128
n=int(input())
a=[tuple(map(int,input().split())) for i in range(n)]
p=[]
q=[]
ans=0
for i in range(n):
    for j in range(n):
        p.append(a[i][0]-a[j][0])
        q.append(a[i][1]-a[j][1])
for i in range(len(p)):
    cnt=0
    for j in range(n):
        if p[i]==0 and q[i]==0:
            break
        for k in range(n):
            if p[i]==a[j][0]-a[k][0] and q[i]==a[j][1]-a[k][1]:
                cnt+=1
    ans=max(cnt,ans)
print(n-ans)

Measured memory_bytes: 42348
N = int(input())
d = dict()
m = 0
for _ in range(N):
    s = input()
    d[s] = d.get(s, 0) + 1
    m = max(m, d[s])
ans = sorted(k for k, v in d.items() if v == m)
print(*ans, sep="\n")

Measured memory_bytes: 34044
import java.util.*;
import static java.lang.System.*;
import java.io.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) throws NumberFormatException,
	IOException{
		
		Deque<Integer> deque = new ArrayDeque<Integer>();
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		
		for (int i=0; i<n; i++) {
			String str = br.readLine();
			if (str.charAt(0)=='i') {
				deque.push(Integer.parseInt(str.substring(7)));
			}
			else if (str.charAt(6)=='F') {
				deque.removeFirst();
			}
			else if (str.charAt(6)=='L') {
				deque.removeLast();
			}
			else {
				deque.remove(Integer.parseInt(str.substring(7)));
			}
		}
		StringBuilder sb = new StringBuilder();
		sb.append(deque.poll());
		for (Integer s: deque) {
			sb.append(" ");
			sb.append(s);
		}
		out.println(sb);
	}
}


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

class Program
{
    static void Main(string[] args)
    {
        var line = ConsoleUtil.IntArrayReadLine();
        var sx = line[0];
        var sy = line[1];
        var tx = line[2];
        var ty = line[3];

        int xMove = tx - sx;
        int yMove = ty - sy;

        StringBuilder sb = new StringBuilder();


        //行き
        for (int i = 0; i < xMove; i++) sb.Append("R");
        for (int i = 0; i < yMove; i++) sb.Append("U");

        //帰り
        for (int i = 0; i < xMove; i++) sb.Append("L");
        for (int i = 0; i < yMove; i++) sb.Append("D");

        //行き
        sb.Append("D");
        for (int i = 0; i < xMove + 1; i++) sb.Append("R");
        for (int i = 0; i < yMove + 1; i++) sb.Append("U");
        sb.Append("L");

        //帰り
        sb.Append("U");
        for (int i = 0; i < xMove + 1; i++) sb.Append("L");
        for (int i = 0; i < yMove + 1; i++) sb.Append("D");
        sb.Append("R");

        Console.WriteLine(sb.ToString());
    }
}



static class ConsoleUtil
{
    public static string[] StrArrayReadLine(char sepalator)
    {
        string str = Console.ReadLine();
        return str.Split(sepalator).ToArray();
    }
    public static string[] StrArrayReadLine()
    {
        string str = Console.ReadLine();
        if (str.Contains(','))
        {
            return str.Split(',').ToArray();
        }
        {
            return str.Split(' ').ToArray();
        }
    }
    
    public static int[] IntArrayReadLine()
    {
        return StrArrayReadLine().Select(s => int.Parse(s)).ToArray();
    }
    public static int[] IntArrayReadLine(char sepalator)
    {
        return StrArrayReadLine(sepalator).Select(s => int.Parse(s)).ToArray();
    }

    public static int IntReadLine() => int.Parse(Console.ReadLine());
}



Measured memory_bytes: 13424