akhauriyash/Code-Regression huggingface dataset:
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i, begin, n) for (int i = begin; i < n; i++)
#define repe(i, begin, n) for (int i = begin; i <= n; i++)
#define repr(i, begin, n) for (int i = begin; i > begin - n; i--)
#define repre(i, begin, end) for (int i = begin; i >= end; i--)

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 int inf = 1000000007;
const int MOD = 1000000007;
const long long INF = 1000000000000000007;

// -------------------------------------------------------

int N;
int x[110], y[110], h[110];
tuple<int, int, int> info[110];

int main()
{
    cin >> N;
    rep(i, 0, N)
    {
        cin >> x[i] >> y[i] >> h[i];
        info[i] = make_tuple(h[i], x[i], y[i]);
    }
    sort(info, info + N, greater<tuple<int, int, int>>());
    repe(i, 0, 100)
    {
        repe(j, 0, 100)
        {
            bool ok = true;
            int HH = get<0>(info[0]) + abs(get<1>(info[0]) - i) + abs(get<2>(info[0]) - j);
            rep(k, 0, N)
            {
                auto ik = info[k];
                int h = get<0>(ik);
                int x = get<1>(ik);
                int y = get<2>(ik);
                if (h > 0)
                {
                    if (h + abs(x - i) + abs(y - j) != HH)
                    {
                        ok = false;
                    }
                }
                else
                {
                    if (HH > abs(x - i) + abs(y - j))
                    {
                        ok = false;
                    }
                }
            }
            if (ok)
            {
                cout << i << " " << j << " " << HH << endl;
                return 0;
            }
        }
    }
    cout << -1 << endl;
    return 0;
}


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

// varibable settings
#define infile "../test/sample-1.in"
#define int long long //{{{
const int INF=1e18;
const int MOD=1e9+7; //}}}

// define basic macro {{{
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) repi(i,0,n)
#define repi(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define rep(...) _overload3(__VA_ARGS__,repi,_rep,)(__VA_ARGS__)
#define _rrep(i,n) rrepi(i,0,n)
#define rrepi(i,a,b) for(int i=(int)((b)-1);i>=(int)(a);--i)
#define rrep(...) _overload3(__VA_ARGS__,rrepi,_rrep,)(__VA_ARGS__)
#define each(i,a) for (auto&& i : a)
#define all(x) (x).begin(),(x).end()
#define sz(x) ((int)(x).size())
#define pb(a) push_back(a)
#define mp(a, b) make_pair(a, b)
#define ceil(a,b) ((a)+(b)-1)/(b)
#define uni(x) sort(all(x));x.erase(unique(all(x)),x.end())
#define ub upper_bound
#define lb lower_bound
#define posl(A, x) (lower_bound(all(A), x)-A.begin())
#define posu(A, x) (upper_bound(all(A),x)-A.begin())
template<class T> inline void chmax(T &a, const T &b) { if((a) < (b)) (a) = (b); }
template<class T> inline void chmin(T &a, const T &b) { if((a) > (b)) (a) = (b); }

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long double ld;
typedef pair<int,int> pii;
typedef tuple<int,int,int> iii;

template<typename T> using PQ = priority_queue<T, vector<T>, greater<T>>;
struct Fast { Fast(){ std::cin.tie(0); ios::sync_with_stdio(false); } } fast;

#if defined(PCM) || defined(LOCAL)
  #include "lib/dump.hpp"
#else
  #define dump(...) 42
  #define dump_1d(...) 42
  #define dump_2d(...) 42
#endif
//}}}

int mod = 1e9+7;
struct mint { //逆元などを使いたければmint2{{{
  int x;
  mint(int x=0):x((x%mod+mod)%mod){}
  mint& operator+=(const mint a) {
    (x += a.x) %= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    (x += mod-a.x) %= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
};
ostream& operator<<(ostream& os, const mint& a){
  os << a.x;
  return os;
} //}}}

int solve(){
  string s;cin>>s;
  int n=sz(s);

  vector<mint> dp1(n+1);  // =
  vector<mint> dp2(n+1);  // 未満
  dp1[0] = 1;
  dp2[0] = 0;
  rep(i, 1, n+1){
    if(s[i-1]=='1'){
      dp1[i] += mint(2)*dp1[i-1]; // (1,0), (0,1)
      dp2[i] += dp1[i-1]; // (0,0)
      dp2[i] += mint(3)*dp2[i-1];
    }
    if(s[i-1]=='0'){
      dp1[i] += dp1[i-1]; // (0,0)
      dp2[i] += mint(3)*dp2[i-1];
    }
  }
  dump(dp1);
  dump(dp2);
  cout << (dp1[n]+dp2[n]) << endl;
  return 0;
}

signed main() { //{{{
#ifdef INPUT_FROM_FILE
  std::ifstream in(infile);
  std::cin.rdbuf(in.rdbuf());
#endif
  solve();
  return 0;
} //}}}


Measured memory_bytes: 2000
n,k = STDIN.gets.split.map(&:to_i)
input = STDIN.gets.strip.split('')
candidates = []
input.each.with_index do |str, i|
  if i == 0 || input[i-1] != input[i]
    candidates.push [str, i]
  end
end

max = 0
0.upto(candidates.length - 1) do |i|
  len = candidates[i][0] == '0' ? k*2 : k*2+1
  from = candidates[i][1]
  to = (candidates[i+len] || [nil, n])[1]
  max = [max, to - from].max
end
puts max


Measured memory_bytes: 18044
S = input()
n= len(S)
m = 0
def isACGT(str):
    return all(list(map(lambda c: c in 'ATCG', str)))

for i in range(n):
    for j in range(i+1, n+1):
        if isACGT(S[i:j]):
            m = max(m, j-i)

print(m)


Measured memory_bytes: 38384
#include <iostream>
#include <queue>

using namespace std;
using pii = pair<int, int>;
#define loop(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) for(int i=0;i<(n);++i)
#define in(v) cin>>v;
#define out(v) cout<<v<<"\n"

int di[4] = {1, 0, -1, 0};
int dj[4] = {0, 1, 0, -1};
int main() {
  cin.tie(0); ios::sync_with_stdio(false);
  int H, W; in(H); in(W);

  char s[H][W];
  bool visited[H*W];
  int before[H*W];
  int count = 0;
  rep(i, H) rep(j, W) {
    visited[i*W+j] = false;
    in(s[i][j]);
    if (s[i][j] == '.')
      ++count;
  }
  queue<int> q;
  q.push(0);
  while (!q.empty()) {
    int p = q.front(); q.pop();
    int i = p / W,
        j = p % W;
    if (visited[p])
      continue;
    visited[p] = true;
    if (p == H*W-1)
      break;
    rep(d, 4) {
      int next = (i + di[d]) * W + j + dj[d];
      if (0 <= i + di[d] && i + di[d] < H &&
          0 <= j + dj[d] && j + dj[d] < W &&
          s[i+di[d]][j+dj[d]] == '.' && !visited[next]) {
        before[next] = p;
        q.push(next);
      }
    }
  }
  if (!visited[H*W-1]) {
    out(-1);
    return 0;
  }
  int next = H*W-1;
  int ans = 0;
  while (next != 0) {
    next = before[next];
    ++ans;
  }
  out(count - ans - 1);

  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define ll long  long
#define ld long double
#define mod 1000000007
#define max_char 128
#define pb push_back
#define ff first
#define ss second
#define mp make_pair
#define lbd lower_bound
#define ubd upper_bound
#define PI 3.141592653589793238
#define pf push_front
#define all(x) x.begin(),x.end()
#define input(arr,n) for(ll c1=0;c1<n;c1++)cin>>arr[c1];
#define rep(i,a,n) for( ll i=a ; i<n ; i++)
#define mems(x, y) memset(x, y, sizeof(x))
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
//cout<<"Case #"<<v1+1<<": ";

ll power(ll base,ll pow, ll mo)
{
   ll res=1;
   while(pow)
   {     
        if (pow%2!=0)  res=(res*base)%mo;
        base=(base*base)%mo;
        pow/=2;
   }
   return res;
}


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

Measured memory_bytes: 3652
#include <iostream>
#include <vector>
#include <climits>
#include <algorithm>
#include <cmath>
#include <map>
#include <string>
#include <bitset>
#include <set>

using ll = long long;
using namespace std;

int main(void) {
	int q;
	string s;
	cin >> s >> q;
	
	string ans;
	
	for(int i = 0; i < q; ++i) {
		int t;
		cin >> t;
		
		if( t == 1 ) swap(s, ans);
		
		else if( t == 2 ) {
			int f;
			char c;
			cin >> f >> c;
	
			if( f == 1 ) ans += c;
			else if( f == 2 ) s += c;
		}
	}
	
	reverse(ans.begin(), ans.end());
	ans += s;
	
	cout << ans << endl;
	
	return 0;
}


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

using namespace std;

const int len = 100010;
int a[len],n,k;
int g;

int gcd(int x,int y) {
	return y ? gcd(y,x%y) : x;
}

int main() {
	ios :: sync_with_stdio(false);
	cin >> n >> k;
	cin >> a[1];
	g = a[1];
	for (int i=2;i<=n;i++) {
		cin >> a[i];
		g = __gcd(g,a[i]);
	}
	bool f = false;
	for (int i=1;i<=n;i++) {
		if (a[i] >= k) {
			if ((a[i]-k)%g == 0) {
				f = true;
				break;
			}
		}
	}
	if (f) {
		cout << "POSSIBLE" << endl;
	}
	else {
		cout << "IMPOSSIBLE" << endl;
	}
	return 0;
}

Measured memory_bytes: 640
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _0318
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = RInt();
            HashSet<int> a = new HashSet<int>(RArInt().Skip(1));
            HashSet<int> b = new HashSet<int>(RArInt().Skip(1));
            HashSet<int> c = new HashSet<int>(RArInt().Skip(1));
            Console.WriteLine(c.Except(a).Union(c.Intersect(b)).Count());

        }
        static string RSt() { return Console.ReadLine(); }
        static int RInt() { return int.Parse(Console.ReadLine().Trim()); }
        static long RLong() { return long.Parse(Console.ReadLine().Trim()); }
        static double RDouble() { return double.Parse(Console.ReadLine()); }
        static string[] RArSt(char sep = ' ') { return Console.ReadLine().Trim().Split(sep); }
        static int[] RArInt(char sep = ' ') { return Array.ConvertAll(Console.ReadLine().Trim().Split(sep), e => int.Parse(e)); }
        static long[] RArLong(char sep = ' ') { return Array.ConvertAll(Console.ReadLine().Trim().Split(sep), e => long.Parse(e)); }
        static double[] RArDouble(char sep = ' ') { return Array.ConvertAll(Console.ReadLine().Trim().Split(sep), e => double.Parse(e)); }
        static string WAr<T>(IEnumerable<T> array, string sep = " ") { return string.Join(sep, array.Select(x => x.ToString()).ToArray()); }
    }
}



Measured memory_bytes: 18632
#include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define FOR(i,k,n) for(int(i)=(k);(i)<(n);++(i))
#define rep(i,n) FOR(i,0,n)
#define all(v) begin(v),end(v)
#define debug(x) std::cerr<<#x<<": "<<x<<"\n"
#define debug2(x,y) std::cerr<<#x<<": "<<x<<", "<<#y<<": "<<y<<"\n"
#define debug3(x,y,z) std::cerr<<#x<<": "<<x<<", "<<#y<<": "<<y<<", "<<#z<<": "<<z<<"\n"

typedef long long ll;
typedef std::vector<int> vi;
typedef std::vector<vi> vvi;
typedef std::vector<ll> vll;
typedef std::vector<vll> vvll;
template<typename T> using vvec=std::vector<std::vector<T>>;
template<typename T>
auto make_v(size_t sz){return std::vector<T>(sz);}
template<typename T,typename... Ts>
auto make_v(size_t sz,Ts...ts){return std::vector<decltype(make_v<T>(ts...))>(sz,make_v<T>(ts...));}
template<typename T>
void fill_v(T&var,const T&x){var=x;}
template<typename V,typename T>
void fill_v(V&v,const T&x){for(auto&& w:v){fill_v(w,x);}}

template<typename T> std::ostream& operator<<(std::ostream&s,const std::vector<T>&v){
  int sz=v.size();s<<"\n";rep(i,sz){s<<v[i];if(i<sz-1){s<<"\t";}}s<<"\n";return s;}
template<typename T> std::ostream& operator<<(std::ostream&s,const std::vector<std::vector<T>>&v){
  for(auto&& w:v){s<<w;}return s;}
template<typename T> std::ostream& operator<<(std::ostream&s,const std::deque<T>&v){
  int sz=v.size();s<<"\n";rep(i,sz){s<<v[i];if(i<sz-1){s<<"\t";}}s<<"\n";return s;}
template<typename T> std::ostream& operator<<(std::ostream&s,const std::deque<std::deque<T>>&v){
  for(auto&& w:v){s<<w;}return s;}
template<typename T> std::ostream& operator<<(std::ostream&s, const std::set<T>&v){
  s<<"\n";for(auto&& elm:v){s<<elm<<"\t";}s<<"\n";return s;}

inline void scan(int&a){scanf("%d",&a);}
inline void scan(ll&a){scanf("%lld",&a);}
inline void scan(char&a){scanf(" %c",&a);}
inline void scan(double&a){scanf("%lf",&a);}
template<typename T>
inline void scan(std::vector<T>&v){for(auto&& sv:v){scan(sv);}}
template<typename First,typename...Args>
inline void scan(First&f,Args&...args){scan(f);scan(args...);}
inline void scan(std::string&s){char BUF[3000000];scanf(" %s",BUF);s=std::string(BUF);}
inline void print(int a){printf("%d\n",a);}
inline void print(ll a){printf("%lld\n",a);}
inline void print(double a){printf("%.12f\n",a);}
inline void print(std::string s){std::cout<<s<<"\n";}

using namespace std;

int main() {
  int n, m;
  scan(n, m);
  vi cnt(m, 0);
  rep (i, n) {
    int k;
    scan(k);
    rep (j, k) {
      int a;
      scan(a);
      a -= 1;
      cnt[a] += 1;
    }
  }
  int ans = 0;
  rep (i, m) {
    if (cnt[i] == n) {
      ans += 1;
    }
  }
  print(ans);

  return 0;
}


Measured memory_bytes: 888
#include <bits/stdc++.h>
#include <time.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7/*998244353*/;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll); ll mod_fact(ll, ll); ll mod_inv(ll, ll); ll gcd(ll, ll); ll lcm(ll, ll);
//
int main(){
    int x;
    cin >> x;
    int y = 2000 - x - 1;
    int z = y / 200;
    cout << z + 1;
}

Measured memory_bytes: 3632
#include <iostream>
using namespace std;
typedef long long int ll;
#define f(a,b,i) for(ll i=a;i<b;i++)
#define rf(a,b,i) for(ll i=a;i>b;i--)
ll inf = 1e10;
ll a[100005]={0},b[100005]={0},c[100005]={0};
ll da[100005]={0},db[100005]={0},dc[100005]={0};

int main() {
	ll t=1;
	// cin>>t;
	while(t--){
	    ll n;
		cin>>n;
		f(1,n+1,i)
		cin>>a[i]>>b[i]>>c[i];

		f(1,n+1,i)
		{
			da[i] = max(db[i-1]+a[i],dc[i-1]+a[i]);
			db[i] = max(da[i-1]+b[i],dc[i-1]+b[i]);
			dc[i] = max(db[i-1]+c[i],da[i-1]+c[i]);
		}
		cout<<max(da[n],max(db[n],dc[n]))<<endl;
	}
	return 0;
}


Measured memory_bytes: 8208
#include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define uli unsigned long long int
#define rep(i, m, n) for (lli i = m; i < (n); i++)
#define repe(i, m, n) for (lli i = m; i <= (n); i++)
#define ALL(x) (x).begin(), (x).end()
#define SIZE(x) ((lli)(x).size())
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
#define _GLIBCXX_DEBUG
const lli INF = 2147483647;
const lli MINF = -2147483648;
const lli LINF = 9223372036854775807;
const lli MOD = 1000000007; //10^9+7
const double PI = acos(-1);
#define SORT(n) sort(n.begin(), n.end())
#define SORTR(n) sort(n.begin(), n.end(), greater<int>())
#define REV(n) reverse(n.begin(), n.end())
#define pb push_back
#define eb emplace_back
#define mp make_pair
#pragma GCC optimize("Ofast")
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vlli = vector<lli>;
using vvli = vector<vlli>;
using vs = vector<string>;
using vvs = vector<vs>;
using vb = vector<bool>;
using vvb = vector<vb>;
using ll = long long;
// vector入力
template <typename T>
istream &operator>>(istream &is, vector<T> &vec)
{
  for (T &x : vec)
    is >> x;
  return is;
}
// vector出力
template <typename T>
ostream &operator<<(ostream &os, vector<T> &vec)
{
  // os << '{';
  for (int i = 0; i < vec.size(); i++)
  {
    os << vec[i] << (i + 1 == vec.size() ? "" : "");
  }
  // os << '}';
  return os;
}
// aよりもbが大きいならばaをbで更新する(更新されたならばtrueを返す)
template <typename T>
bool chmax(T &a, const T &b)
{
  if (a < b)
  {
    a = b; // aをbで更新
    return true;
  }
  return false;
}
// aよりもbが小さいならばaをbで更新する(更新されたならばtrueを返す)
template <typename T>
bool chmin(T &a, const T &b)
{
  if (a > b)
  {
    a = b; // aをbで更新
    return true;
  }
  return false;
}

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  lli a, b, c, h, n, w = 0, ans = 0, count = 0;
  string s, t;
  vector<pair<string, pair<lli, lli>>> pr;
  cin >> n;
  vlli d(n), e;
  rep(i, 0, n)
  {
    cin >> d[i];
    e.pb(d[i]);
  }
  SORT(e);
  a = (n - 1) / 2 + 1;

  rep(i, 0, n)
  {
    if (d[i] > e[a - 1])
    {
      cout << e[a - 1] << endl;
    }
    else
    {
      cout << e[a] << endl;
    }
  }
}

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

#define pb push_back
#define fi first
#define se second
typedef long long ll;

int main()
{
	ios_base::sync_with_stdio(false); cin.tie(NULL);

	int n, m;
	cin >> n >> m;
	vector<int> ans(n, -1);

	bool ok = true;
	for (int i = 0; i < m; ++i) {
		int pos, c;
		cin >> pos >> c;
		pos--;
		if (pos == 0 && c == 0 && n > 1)
			ok = false;
		if (ans[pos] != -1 && ans[pos] != c)
			ok = false;
		ans[pos] = c;
	}
	if (!ok) {
		cout << "-1\n";
		return 0;
	}

	if (ans[0] == -1)
		ans[0] = (n == 1 ? 0 : 1);
	for (int i = 0; i < n; ++i)
		cout << (ans[i] == -1 ? 0 : ans[i]);
	cout << endl;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define LL long long
#define Max 100005
#define Mod 1e9+7
const LL mod=1e9+7;
const LL inf=0x3f3f3f3f;
using namespace std;
int main()
{
    int n;
    scanf("%d",&n);
    if(n>=1 && n<=999)
        printf("ABC\n");
    else
        printf("ABD\n");
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <vector>
#include <stdio.h>
#include <algorithm>
#define _USE_MATH_DEFINES
#include <cmath>
#include <numeric>
#include <iomanip>
#include <deque>
#include <tuple>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <unordered_map>
#include <sstream>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>

#define rep(i, x) for (int i = 0; i < (int)(x); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define all(a) (a).begin(), (a).end()
#define F first
#define S second
#define pb push_back
#define pf push_front

using ll = long long;
using namespace std;
namespace mp = boost::multiprecision;
using cpp_int = mp::cpp_int;
ll M = 1000000007;
typedef pair<int, int> P;

typedef pair<ll, int> pli;

int dp[105][4][2];


void solve()
{
    
  string s;
  cin >> s;
  int n = s.size();
  int K;
  cin >> K;
  dp[0][0][0] = 1;
  //dp[i][j][k]
  /*
  i桁目まで決めて
  j個の非0を使い，
  k: 1:ここまででn以下であることが確定 
     0:そこまではnと一致

  */
  rep(i,n)rep(j,4)rep(k,2) {
    int nd = s[i]-'0'; //sの数字
    rep(d,10) {
      int ni = i+1, nj = j, nk = k;//次への遷移？
      if (d != 0) nj++;//非0ならばjが増える
      if (nj > K) continue; //Kより大きいとアウトだろ
      if (k == 0) {//以下が未確定なら
        if (d > nd) continue; //大きいとダメだろ
        if (d < nd) nk = 1;//小さいなら確定
        //同じならそのまま
      }
      dp[ni][nj][nk] += dp[i][j][k];
    }
  }
  int ans = dp[n][K][0] + dp[n][K][1];
  cout << ans << endl;


}
int main()
{
    solve();
}

Measured memory_bytes: 256
//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define REP(i,n)  for(int i=0;i<(n);i++)

int main() {
    int n,m,k;
    cin>>n >>m >>k;
    for(int i=0;i<=n;i++){
        for(int j=0;j<=m;j++){
            if(i*(m-j)+j*(n-i)==k){
                cout<<"Yes"<<endl;
                return 0;
            }
        }
    }
    cout<<"No"<<endl;
    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define rep(i,a) for(int i=0;i<a;i++)
using namespace std;
int main(){
    int n,m;
    cin>>n>>m;
    int a[n];
    rep(i,n){
        a[i]=0;
    }
    rep(i,m){
        int ena,enb;
        cin>>ena>>enb;
        a[ena-1]++;
        a[enb-1]++;
    }
    rep(i,n){
        cout<<a[i]<<endl;
    }
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define REP(i, n) for(long long i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;


int main() {
  string s;
  cin >> s;
  if(s.size() % 2 == 1) {
    cout << "No";
    return 0;
  }
  REP(i, s.length()) {
    if (i % 2 == 0 && s[i] == 'h') {

    } else if (i % 2 == 1 && s[i] == 'i') {

    } else {
      cout << "No";
      return 0 ;
    }
  }
  cout << "Yes";
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		/*
		 * ????????????????????¨???????????? aabc String str [] =read();
		 * ?????£??????????????° m int cnt= 3;
		 * ?????????h???????????????????????¨??????????????????
		 * aabc
		 * int 1; m1
		 * int 2; h2
		 * int 1; h1
		 *
		 * syso(aabc) - if()break;
		 *
		 *
		 * int h = 3; string str = "abcdef";
		 * string left =str.substr(0,h); //abc
		 */

		Scanner sc = new Scanner(System.in);

		// declear variable
		String cardSet;
		int shuffleM,shuffleH;
		// while section
		while (true) {
			cardSet=sc.next();
			// break condition
			if(cardSet.equals("-"))break;
			// Shuffle chance
			shuffleM = sc.nextInt();
			for (int i = 0; i < shuffleM; i++) {
				shuffleH = sc.nextInt();
				// Shuffle
				cardSet = cardSet.substring(shuffleH) + cardSet.substring(0, shuffleH);
			}
			System.out.println(cardSet);
		}
	}
}

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

int main(void)
{
	string str;
	int sum;
	int i;

	while (1) {
		cin >> str;
		sum = 0;
		for (i=0; str[i]!='\0'; i++) {
			sum += (str[i] - '0');
		}

		if (sum == 0) {
			break;
		}
		else {
			cout << sum << endl;
		}
	}

	return 0;
}




Measured memory_bytes: 3180
#![allow(unused_imports)]
use std::io::{ self, Write };
use std::str::FromStr;
use std::cmp::{ min, max };
use std::collections::{ BinaryHeap, VecDeque };

#[allow(unused_macros)]
macro_rules! trace {
    ($var:expr) => {
        let _ = writeln!(&mut std::io::stderr(), ">>> {} = {:?}", stringify!($var), $var);
    };
    ($($args:expr),*) => { trace!(($($args),*)) }
}

#[allow(unused_macros)]
macro_rules! put {
    ($var:expr) => {
        let _ = writeln!(&mut std::io::stdout(), "{}", $var);
    };
    ($var:expr, $($args:expr),*) => {
        let _ = write!(&mut std::io::stdout(), "{} ", $var);
        put!($($args),*);
    };
}

const M: usize = 1_000_000_007;

fn main() {
    let mut sc = Scanner::new();
    let s: Vec<_> = sc.cin::<String>().chars().collect();
    let t: Vec<_> = sc.cin::<String>().chars().collect();
    let mut len = vec![vec![0; t.len()+1]; s.len()+1];

    len[0][0] = 0;
    for i in 1..s.len()+1 {
        for j in 1..t.len()+1 {
            len[i][j] = max(len[i-1][j], len[i][j-1]);
            if s[i-1] == t[j-1] {
                len[i][j] = max(len[i][j], 1 + len[i-1][j-1]);
            }
        }
    }

    // for i in 0..s.len()+1{trace!(&len[i]);}

    let mut ans = vec![];
    {
        let mut i = s.len();
        let mut j = t.len();
        while i > 0 && j > 0 {
            if len[i][j] == len[i-1][j] {
                i -= 1;
            } else if len[i][j] == len[i][j-1] {
                j -= 1;
            } else if len[i][j] == len[i-1][j-1] + 1 {
                ans.push(s[i-1]);
                i -= 1;
                j -= 1;
            }
        }
    }

    for c in ans.iter().rev() {
        print!("{}", &c);
    } println!("");
}

#[allow(dead_code)]
struct Scanner { stdin: io::Stdin, buffer: VecDeque<String>, }
#[allow(dead_code)]
impl Scanner {
    fn new() -> Scanner { Scanner { stdin: io::stdin(), buffer: VecDeque::new() } }
    fn reserve(&mut self) {
        while self.buffer.len() == 0 {
            let mut line = String::new();
            let _ = self.stdin.read_line(&mut line);
            for w in line.split_whitespace() {
                self.buffer.push_back(String::from(w));
            }
        }
    }
    fn cin<T: FromStr>(&mut self) -> T {
        self.reserve();
        match self.buffer.pop_front().unwrap().parse::<T>() {
            Ok(a) => a,
            Err(_) => panic!("parse err")
        }
    }
}


Measured memory_bytes: 41212
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <set>
#include <queue>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <memory.h>
#include <string>
#include <sstream>
#include <cstdlib>
#include <ctime>
#include <cassert>

using namespace std;

typedef long long LL;
typedef pair<int,int> PII;
typedef pair<LL,LL> PLL;

#define MP make_pair
#define PB push_back
#define FF first
#define SS second

#define FORN(i, n) for (int i = 0; i <  (int)(n); i++)
#define FOR1(i, n) for (int i = 1; i <= (int)(n); i++)
#define FORD(i, n) for (int i = (int)(n) - 1; i >= 0; i--)

#define DEBUG(X) { cout << #X << " = " << (X) << endl; }
#define PR0(A,n) { cout << #A << " = "; FORN(_,n) cout << A[_] << ' '; cout << endl; }

// #define FL fflush(stdout)

#define MOD 1000000007
#define INF 2000000000
#define MAXN 100010

int GLL(LL& x) {
  return scanf("%lld", &x);
}

int GI(int& x) {
  return scanf("%d", &x);
}

int n;
vector<vector<int> > adj;
int colors[MAXN];
bool visited[MAXN];
vector<int> path;
const bool debug = false;

enum {
  NONE = -1,
  BLACK = 0,
  WHITE = 1
};

void findpath(int node) {
  visited[node] = true;
  if (node == n) {
    path.PB(node);
  }

  for (auto child: adj[node]) {
    if (!visited[child]) {
      findpath(child);
      if (path.size() > 0 && path.back() == child) {
        path.PB(node);
      }
    }
  }
}

void colorNodes(int node) {
  for (auto child: adj[node]) {
    if (colors[child] == NONE) {
      colors[child] = colors[node];
      colorNodes(child);
    }
  }
}

int main() {
  GI(n);
  adj.resize(n+1);
  memset(colors, -1, sizeof colors);
  memset(visited, 0, sizeof visited);

  FORN(i, n-1) {
    int a, b;
    GI(a);
    GI(b);
    adj[a].PB(b);
    adj[b].PB(a);
  }

  findpath(1);
  reverse(path.begin(), path.end());

  int pathlen = path.size();
  FORN(i, pathlen) {
    if (i < (pathlen/2 + (pathlen&1))) {
      colors[path[i]] = BLACK;
    } else {
      colors[path[i]] = WHITE;
    }
  }

  for (auto p : path) {
    colorNodes(p);
  }

  if (debug) {
    printf("PATH-------------%d\n", path.size());
    for (auto p : path) {
      printf("%d: %s\n", p, (colors[p]==BLACK)?"BLACK":"WHITE");
    }
  }

  if (debug) {
    printf("ALL-------------\n");
    FOR1(i, n) {
      printf("%d: %s\n", i, (colors[i]==BLACK)?"BLACK":"WHITE");
    }
  }

  int nw = 0;
  int nb = 0;
  FOR1(i, n) {
    nw += colors[i] == WHITE;
    nb += colors[i] == BLACK;
  }

  if (nw < nb) {
    printf("Fennec\n");
  } else {
    printf("Snuke\n");
  }
    
  return 0;
}


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

#define zton(i,n) for(int i=0;i<=n;i++)
#define oneton(i,n) for(int i=1;i<=n;i++)
#define fo(i,n) for(int i=0;i<n;i++)
#define fab(i,a,b) for(int i=a;i<b;i++)
#define loop(i,b,a) for(int i=a;i>=b;i--)
#define dsort(arr,n) sort(arr, arr + n, greater<int>())
#define vsortd(a) sort(a.begin(), a.end(), greater<double>())
#define vsort(a) sort(a.begin(), a.end())
#define ll long long int
#define test int tc;cin>>tc;while(tc--)
#define dbg(x) cout<<#x<<'='<<(x)<<endl;
#define dbg2(x,y) cout<<#x<<'='<<(x)<<endl<<#y<<'='<<(y)<<endl;
#define dbg3(x,y,z) cout<<#x<<'='<<(x)<<endl<<#y<<'='<<(y)<<endl<<#z<<"="<<(z)<<endl;
#define dbg4(x,y,z,w) cout<<#x<<'='<<(x)<<endl<<#y<<'='<<(y)<<endl<<#z<<"="<<(z)<<endl<<#w<<"="<<(w)<<endl;
#define minheap priority_queue <int, vector<int>, greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define ff first
#define ss second
#define mpr make_pair
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
#define mkv vector<int>
#define allzero(dp) memset(dp,0,sizeof(dp))
#define endl "\n"
#define print(x) cout<<x<<endl;

const int mod=1e9+7;
using namespace std;
bool sortcol( const vector<int>& v1,const vector<int>& v2 ) {return v1[1] < v2[1];}

void fastio()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
}

bool compare(const pair<ll,ll> &a,const pair<ll,ll> &b){
    if(a.first>b.first)return true;
    if(a.first==b.first)return a.second<b.second;
    return false;
}

ll power(ll x, ll y){
    ll res = 1;x=x%mod;
    while(y>0){
        if(y&1)res=(res*x)%mod;
        y=y>>1;x=(x*x)%mod;}
    return res;
}

mkv vin(int n){
    mkv v;
    fo(i,n){
        int t;cin>>t;v.pb(t);
    }
    return v;
}

vector<int>ch;
void solve()
{
    int n,x,t;cin>>n>>x>>t;
    int r=n/x+min(1,n%x);
    print(r*t)

}

int main()
{
  //  fastio();
   // test
    solve();
}


Measured memory_bytes: 3628
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define sb __builtin_popcount
#define MOD (ll)998244353
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update>
using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n, x, y;
    cin >> n >> x >> y;
    map<ll, ll> mp;
    for (ll i = 1; i <= n; i++)
    {
        for (ll j = i + 1; j <= n; j++)
        {
            ll mini = j - i;
            mini = min(mini, abs(j - x) + abs(i - y) + 1);
            mini = min(mini, abs(i - x) + abs(j - y) + 1);
            mp[mini]++;
        }
    }
    for (ll i = 1; i <= n - 1; i++)
    {
        cout << mp[i] << endl;
    }
}

Measured memory_bytes: 384
n, m = list(map(int, input().split()))

ab = [list(map(int, input().split())) for _ in range(n)]

ab.sort()

p = 0
x = 0

for i in range(n):
    if x + ab[i][1] < m:
        x += ab[i][1]
        p += ab[i][0] * ab[i][1]
    else:
        p += ab[i][0] * (m - x)
        break

print(p)

Measured memory_bytes: 89844
#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)

map<char, int> m;
map<string, int> ans;
char c[3] = {'r', 'g', 'b'};

int main() {
	REP(i, 3) m[c[i]] = 1<<i;
	
	string str;
	while (cin >> str, str != "0") {
		string ser[3] = {};
		REP(i, 3) REP(j, str.size()) {
			ser[i] += c[i];
		}
		
		queue<pair<int, string> > que;
		REP(i, 3) que.push(make_pair(0, ser[i]));
		
		while (!que.empty()) {
			int t = que.front().first;
			string now = que.front().second;
			que.pop();
			
			if (ans.find(now) != ans.end()) continue;
			ans[now] = t;
			
			REP(i, now.size() - 1) {
				if (now[i] == now[i + 1]) {
					string next = now;
					int nextcor = 7 - m[now[i]];
					vector<char> pl;
					REP(j, 3) if (nextcor & (1<<j)) pl.push_back(c[j]);
					REP(j, 2) {
						next[i] = pl[j];
						next[i + 1] = pl[(j + 1) % 2];
						que.push(make_pair(t + 1, next));
					}
				}
			}
		}
		if (ans.find(str) == ans.end()) puts("NA");
		else cout << ans[str] << endl;
	}
	return 0;
}

Measured memory_bytes: 10056
#include <iostream>
#include <climits>
#include <cmath>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <deque>
#define INF_INT (INT_MAX / 2)
#define INF_LONG (LONG_MAX / 2)
//#define DEBUG true
#define DEBUG false
using namespace std;

const int MAX = 100001;
const int MOD = 1000000007;

typedef long long ll;
typedef pair< int, int > pii;
typedef pair< ll, ll > pll;
typedef pair< ll, int > pli;
typedef pair< int, ll > pil;

int ceil(int x, int y){
  return (x % y == 0) ? x / y : x / y + 1;
}

int gcd(int x, int y){
  return y ? gcd(y, x % y) : x;
}

int lcm(int x, int y){
  return x / gcd(x, y) * y;
}

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

  int n;
  cin >> n;
  int v[n];
  for(int i = 0; i < n; i++) cin >> v[i];
  int c[n];
  for(int i = 0; i < n; i++) cin >> c[i];

  int ans = 0;
  for(int s = 0; s < (1 << n); s++){
    int x = 0, y = 0;
    for(int i = 0; i < n; i++){
      if((s & (1 << i)) != 0){
        x += v[i];  y += c[i];
      }
    }
    ans = max(ans, x - y);
  }

  cout << ans << endl;

  return 0;
}


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

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long h = sc.nextLong();
    String two_bit = Long.toBinaryString(h);
    long ans = (long)Math.pow(2.0, (double)two_bit.length()) - (long) 1;
    System.out.println(ans);
  }
}

Measured memory_bytes: 23892
#include <iostream>
#include <algorithm>
#include <functional>

using ll=long long int;

int n;

ll a[100000];

int main() {

    std::cin>>n;

    for(int i=0;i<n;++i)
        std::cin>>a[i];

    std::sort(a,a+n,std::greater<ll>());

    ll x=0,y=0;

    for(int i=0;i<n-1;++i){

        if(a[i]==a[i+1]){
            if(!x){
                x=a[i];
                ++i;
            }
            else{
                y=a[i];
                break;
            }
        }
    }

    if(!x||!y)
        std::cout<<0<<std::endl;
    else
        std::cout<<x*y<<std::endl;

    return 0;
}

Measured memory_bytes: 1024
S = input()
character=[]
for c in S:
    character.append(c)

year=character[0]+character[1]+character[2]+character[3]
year=int(year)

month=character[5]+character[6]
month = int(month)
day=character[8]+character[9]
day = int(day)

if month <= 4:
    print("Heisei")
else:
    print("TBD")

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

int main(int argc, char const *argv[])
{
  string s;
  int k;
  cin >> s >> k;
  char  ss[6] = "";
  int n = 0;
  for(char c1 = 'a'; c1 <='z'; c1++){
    ss[0] = c1;
    ss[1] = '\0';
    if(s.find(ss)!= -1){
     n++;
     if(n == k){
      cout << ss << endl;
      return 0;
     }else{
        ss[2] = '\0';
      for(char c2 = 'a'; c2 <= 'z';c2++){
        ss[1] = c2;
        if(s.find(ss)!=-1){
          n++;
          if(n==k){
            cout << ss << endl;
            return 0;
          }else{
            ss[3] = '\0';
            for(char c3 = 'a' ; c3 <= 'z' ; c3++){
              ss[2]=c3;
              if(s.find(ss) != -1){
                n++;
                if(n == k){
                  cout << ss << endl;
                  return 0;
                }else{
                  ss[4]='\0';
                  for(char c4 ='a';c4 <= 'z';c4++){
                    ss[3] = c4;
                    if(s.find(ss) != -1){
                      n++;
                      if(n==k){
                        cout << ss << endl;
                        return 0;
                      }else{
                        ss[5] = '\0';
                        for(char c5 = 'a'; c5<='z';c5++){
                          ss[4] = c5;
                          if(s.find(ss)!=-1){
                            cout << ss << endl;
                            return 0;
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
     }
    }
  }
  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define test int t;cin>>t;while(t--)
#define REP(i,n) for (int i = 1; i <= n; i++)
#define MOD 1000000007
#define pb push_back
#define ii pair<int,int>
#define vi vector<int>
#define vii vector<ii>
#define ll long long int
#define ff first
#define ss second
#define INF 1000000000
#define HINF 1000000000000000
#define mem(a,b) memset(a,b,sizeof(a))
#define deb(x) cout<<#x<<'='<<x<<endl
const double pi = 3.14159265358979323846;

ll power(ll a, ll b){//a^b
    ll res=1;
    a=a%MOD;
    while(b>0){
        if(b&1){res=(res*a)%MOD;b--;}
        a=(a*a)%MOD;
        b>>=1;
    }
    return res;
}
ll fermat_inv(ll y){return power(y,MOD-2);}
ll gcd(ll a, ll b){return (b==0)?a:gcd(b,a%b);}


void solve()
{

	ll i=0,j=0,k=0,m,n,p,sum=0,cnt=0;
	cin>>n>>k;
	int arr[n];
	for(i=0;i<n;i++)
	cin>>arr[i];
	sort(arr,arr+n);
	for(i=0;i<k;i++)
	sum+=arr[i];
	cout<<sum;
    
    
}
int main() {
    fast
    //freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w+", stdout);
    //test
    {
        
        solve();
		
		      
    }
    return 0;
}
  

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

int main() {
	int a[3];
	for(int i = 0 ; i < 3 ; i++)scanf("%d",&a[i]);
	sort(a,a+3);
	printf("%d",(a[0]+(a[1]+(a[2]*10))));
	return 0;
}

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

struct Card { char suit, value; };

void bubble(struct Card A[], int N) {
  for (int i = 0; i < N; i++) {
    for (int j = N - 1; j > i; j--) {
      if (A[j].value < A[j-1].value) {
        swap(A[j], A[j-1]);
      }
    }
  }
}

void selection(struct Card A[], int N) {
  for (int i = 0; i < N; i++) {
    int minj = i;
    for (int j = i; j < N; j++) {
      if ( A[j].value < A[minj].value ) minj = j;
    }

    swap(A[i], A[minj]);
  }
}

void print(struct Card A[], int N) {
  for (int i = 0; i < N; i++) {
    if ( i > 0 ) cout << " ";
    cout << A[i].suit << A[i].value;
  }
  cout << endl;
}

bool isStable(struct Card C1[], struct Card C2[], int N) {
  for (int i = 0; i < N; i++) {
    if ( C1[i].suit != C2[i].suit ) return false;
  }
  return true;
}

int main() {
  Card C1[100], C2[100];
  int N;
  char ch;

  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> C1[i].suit >> C1[i].value;
    C2[i] = C1[i];
  }

  bubble(C1, N);
  selection(C2, N);

  print(C1, N);
  cout << "Stable" << endl;
  print(C2, N);
  if ( isStable(C1, C2, N) ) {
    cout << "Stable" << endl;
  } else {
    cout << "Not stable" << endl;
  }

  return 0;
}


Measured memory_bytes: 3120
/* longest_increasing_subsequence.cpp
    最長増加部分列の長さを動的計画法により求める
    （i<j かつ a_i < a_j (or a_i <= a_j) を満たす最長の部分列）

    dp[i] := 長さ i+1 の単調増加部分列の最終要素らにおける最小値
    （dp 自体も単調増加）

    verified: AOJ DPL_1_D
        http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=DPL_1_D
*/

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

/* lis(seq):
    入力: 数列 seq, 広義かどうかを表す weak
    出力: 最長増加部分列の長さ
    計算量: O(NlogN)
*/
int lis(const vector<long long> &seq, bool weak = false) {
    int N = seq.size();
    const long long INF = 1LL << 60;
    vector<long long> dp(N + 5, INF);
    for (int i = 0; i < N; i++) {
        if (!weak) {
            *lower_bound(dp.begin(), dp.end(), seq[i]) = seq[i];
        } else {
            *upper_bound(dp.begin(), dp.end(), seq[i]) = seq[i];
        }
    }
    return (lower_bound(dp.begin(), dp.end(), INF) - dp.begin());
}

int main() {
    int n;
    cin >> n;
    vector<long long> a(n);
    for (int i = 0; i < n; i++) cin >> a.at(i);
    cout << lis(a) << endl;
}



Measured memory_bytes: 4424
#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")
#include<bits/stdc++.h>

#define pb push_back
#define F first
#define S second
#define mp make_pair
#define len(s) s.size()
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define rocknroll cin.tie(0);cout.tie(0);cin.sync_with_stdio(0);cout.sync_with_stdio(0)
#define pq priority_queue
#define pii pair < int, int >
#define pll pair < ll, ll >
#define debug cout << " ---------------------------------------- "
#define kektor vector

typedef long long ll;
typedef long double ld;
typedef double dbl;
typedef unsigned long long ull;

using namespace std;


signed main()
{
    rocknroll;
    ld a, b;
    cin >> a >> b;
    cout << fixed << setprecision(15) << a / b << endl;
    return 0;
}



Measured memory_bytes: 256
#include <stdio.h>

int main(){
	int k, a, b;

	scanf ("%d", &k);
	scanf ("%d %d",&a,&b);
	
	
	for (int i=a; i <= b; i++)
	{
	if (i%k == 0) {
	printf ("OK\n"); 
	return 0;}
	}
	
	printf ("NG\n");
	
	return 0;
}


Measured memory_bytes: 1644
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int h,w;
    string c;
    cin>>h>>w;
    vector<string>v[h];
    for(int i=0;i<h;i++)
    {
        cin>>c;
        v[i].push_back(c);
    }
    for(int i=0;i<w+2;i++)
        cout<<"#";
    cout<<endl;
    for(int i=0;i<h;i++)
        cout<<"#"<<v[i][0]<<"#"<<endl;
    for(int i=0;i<w+2;i++)
        cout<<"#";
    cout<<endl;

    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    int a, b, c;
    cin >> a;
    b=a/500;
    c=a%500/5;
    cout << b*1000+c*5;
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define f(i,x,n) for(int i=x;i<n;i++)
#define all(c) c.begin(),c.end()
#define int ll
#define print(x) cerr << (#x) << "is "<< x << "\n"
using ll = long long;
using pii = pair<int,int>;
const int MOD = 1e9+7, N = 1e5 + 10;
 
vector<bool> done(N,false);
multiset<int> g[N];

int32_t main(){
   ios::sync_with_stdio(false);
   cin.tie(NULL);
   int n,m;
   cin >> n >> m;
   vector<pii> a(n);
   for(auto &i : a){
      cin >> i.F >> i.S;
      g[i.F].insert(i.S);
   }
   multiset<int> s;
   int st_days = m;
   int ans = 0;
   while(st_days >= 0){
      for(auto &rl : g[m-st_days]){
         s.insert(rl);
      }
      if(s.empty()){
         st_days--;
         continue;
      }
      auto kk = s.end();
      kk--;
      ans += *kk;
      s.erase(kk);
      st_days--;
   }
   cout << ans << '\n';
   return 0;
}

Measured memory_bytes: 15872
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main{

	static class FastReader 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public FastReader() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
    } 
	static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));
	public static long mod = (long) (1e9+7);
	public static long[] fac,inv;
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		FastReader sc = new FastReader();
		int[] a = new int[3];
		for(int i=0;i<3;++i) a[i] = sc.nextInt();
		Arrays.sort(a);
		if(a[0] == a[1] && a[1] != a[2]) out.print("Yes");
		else if(a[1] == a[2] && a[1] != a[0]) out.print("Yes");
		else out.print("No");
	    out.close();

	}
	

}


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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
#define REP(i, n) for(int i=0; i<n; i++)
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const ll MOD = 1e9+7;

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

    if(N == 2){
        if(K == 0){
            printf("%d\n", 1);
            printf("%d %d\n", 1, 2);
        }
        else{
            printf("%d\n", -1);
        }
        return 0;
    }

    // N > 2
    
    int nn = N-2;
    int sum = nn*(nn+1)/2;
    if(sum < K){
        cout << -1 << endl;
        return 0;
    }

    map<pair<int, int>, bool> G;
    for(int i = 1; i <= N; i++){
        for(int j = i+1; j <= N; j++){
            G[make_pair(i, j)] = true;
        }
    }

    int m = 0;
    int cnt = 0;
    for(int i = N; i >= 2; i--){
        for(int j = i-1; j >= 2; j--){
            if(cnt == K)
                break;

            G[make_pair(j, i)] = false;
            cnt++;
            //printf("%d %d\n", j, i);
        }
    }

    vector<pair<int, int> > ans;

    for(auto&& pp : G){
        auto p = pp.first;
        int i = p.first;
        int j = p.second;
        bool x = pp.second;
        if(!x) continue;
        ans.push_back(p);
    }

    m = ans.size();
    cout << m << endl;

    REP(i,m){
        int x = ans[i].first;
        int y = ans[i].second;
        printf("%d %d\n", x, y);
    }
    return 0;
}


Measured memory_bytes: 640
#include<bits/stdc++.h>
#define V vector
#define VI vector<int>
#define VVI vector<vector<int>>
#define REP(i,n) for(ll i=0;i<(n);i++)
#define FOR(i,m,n) for(ll i=m;i<n;i++)
#define MOD 1000000007
#define INF 1e9
#define F first
#define S second
#define All(x) (x).begin(),(x).end()
typedef long long ll;
const double PI = acos(-1);
using namespace std;

int main(void){
    int N;cin>>N;
    VI A(N);
    REP(i,N)cin>>A[i];
    sort(All(A));
    int ans=0,cnt=0;
    REP(i,N-1){
        if(A[i]==A[i+1]){
            cnt++;
        }
        else{
            ans+=(cnt+1)%2;
            cnt=0;
        }
    }
    ans+=(cnt+1)%2;
    cout<<ans<<endl;
}




Measured memory_bytes: 640
import java.io.BufferedReader;
import java.io.InputStreamReader;

class Main{

	public static void main(String[] args) throws Exception{
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] line = br.readLine().split(" ");
		int w = Integer.parseInt(line[0]);
		int h = Integer.parseInt(line[1]);
		int x = Integer.parseInt(line[2]);
		int y = Integer.parseInt(line[3]);
		int r = Integer.parseInt(line[4]);
		boolean x_flag = (x - r) >= 0 && (x + r) <= w;
		boolean y_flag = (y - r) >= 0 && (y + r) <= h;

		if(x_flag && y_flag){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}

	}
}

Measured memory_bytes: 24304
#include<iostream>
#include<string>
#include<typeinfo>
#include<vector>
#include<algorithm>
#include<map>
#include<iomanip>
using namespace std;
int main()
{
	int a,b,c,d;
	cin >> a >> b >> c >> d;

    cout << min(a,b)+min(c,d) << endl;
	return 0;
}


Measured memory_bytes: 256
import java.util.*;

public class Main {
    static Scanner scanner = new Scanner(System.in);

    public static void main(String[]$) {
        String s = scanner.next();
        System.out.println(s.charAt(0) == s.charAt(1) || s.charAt(1) == s.charAt(2) || s.charAt(2) == s.charAt(3) ? "Bad" : "Good");
    }
}

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

int b()
{
    int a;
    int b;
    std::cin >> a >> b;
    
    string ans = "Yes";
    if(a * 4 < b)
    {
        ans = "No";
    }
    if(b < a * 2)
    {
        ans = "No";
    }
    if(b % 2 == 1)
    {
        ans = "No";
    }
    
    cout << ans << endl;
    
    return 0;
}


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

Measured memory_bytes: 3604