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

//#define int long long
typedef long long ll;

typedef unsigned long long ul;
typedef unsigned int ui;
const ll mod = 1000000007;
const ll INF = mod * mod;
const int INF_N = 1e+9;
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 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++)
#define all(v) (v).begin(),(v).end()
typedef pair<ll, ll> LP;
typedef long double ld;
typedef pair<ld, ld> LDP;
const ld eps = 1e-12;
const ld pi = acos(-1.0);
//typedef vector<vector<ll>> mat;
typedef vector<int> vec;

//繰り返し二乗法
ll mod_pow(ll a, ll n, ll m) {
	ll res = 1;
	while (n) {
		if (n & 1)res = res * a%m;
		a = a * a%m; n >>= 1;
	}
	return res;
}

struct modint {
	ll n;
	modint() :n(0) { ; }
	modint(ll m) :n(m) {
		if (n >= mod)n %= mod;
		else if (n < 0)n = (n%mod + mod) % mod;
	}
	operator int() { return n; }
};
bool operator==(modint a, modint b) { return a.n == b.n; }
modint operator+=(modint &a, modint b) { a.n += b.n; if (a.n >= mod)a.n -= mod; return a; }
modint operator-=(modint &a, modint b) { a.n -= b.n; if (a.n < 0)a.n += mod; return a; }
modint operator*=(modint &a, modint b) { a.n = ((ll)a.n*b.n) % mod; return a; }
modint operator+(modint a, modint b) { return a += b; }
modint operator-(modint a, modint b) { return a -= b; }
modint operator*(modint a, modint b) { return a *= b; }
modint operator^(modint a, int n) {
	if (n == 0)return modint(1);
	modint res = (a*a) ^ (n / 2);
	if (n % 2)res = res * a;
	return res;
}

//逆元(Eucledean algorithm)
ll inv(ll a, ll p) {
	return (a == 1 ? 1 : (1 - p * inv(p%a, a)) / a + p);
}
modint operator/(modint a, modint b) { return a * modint(inv(b, mod)); }

const int max_n = 1 << 18;
modint fact[max_n], factinv[max_n];
void init_f() {
	fact[0] = modint(1);
	for (int i = 0; i < max_n - 1; i++) {
		fact[i + 1] = fact[i] * modint(i + 1);
	}
	factinv[max_n - 1] = modint(1) / fact[max_n - 1];
	for (int i = max_n - 2; i >= 0; i--) {
		factinv[i] = factinv[i + 1] * modint(i + 1);
	}
}
modint comb(int a, int b) {
	if (a < 0 || b < 0 || a < b)return 0;
	return fact[a] * factinv[b] * factinv[a - b];
}
using mP = pair<modint, modint>;

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




void solve() {
    int x1, y1, x2, y2; cin >> x1 >> y1 >> x2 >> y2;
    int dx = x2 - x1;
    int dy = y2 - y1;

    cout << x2-dy << " " << y2+dx << " " << x1-dy << " " << y1+dx << endl;
}

signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  //cout << fixed << setprecision(10);
  //init_f();
  //init();
  //int t; cin >> t; rep(i, t)solve();
  solve();
//   stop
    return 0;
}


Measured memory_bytes: 4352
A,B,K = map(int,input().split())
if A < B :
    A,B = B,A
cnt = 0
L = []
for i in range(1,10**4+1) :
    if (A%i == 0) and (B%i == 0) :
        L.append(i)

L = sorted(L,reverse=True)
print(L[K-1])


Measured memory_bytes: 3060
#include <bits/stdc++.h>
using namespace std;
#define ll int64_t
#define ALL(a) (a).begin(), (a).end()

const ll mod = 1000000007;
const ll LINF = 1e13;
const ll LLINF = 1e18;
const ll ALPHABET = 26;

template <class T>
void Swap(T &r, T &l)
{
    T tmp = r;
    r = l;
    l = tmp;
}

template <typename T>
istream &operator>>(istream &is, vector<T> &vec)
{
    for (T &x : vec)
        is >> x; //for(int i=0; i<vec.size(); i++) is >> x[i]; とかでもいい
    return is;
}


struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;

//エラトステネスの篩
bool is_prime[ 200000 + 1 ];
vector<ll> P;
void Eratosthenes( const ll N )
{
    for( ll i = 0; i <= N; i++ )
    {
        is_prime[ i ] = true;//初期化
    }    
    for( ll i = 2; i <= N; i++ )
    {
        if( is_prime[ i ] )
        {
            for( ll j = 2 * i; j <= N; j += i )
            {
                is_prime[ j ] = false;
            }
            P.emplace_back( i );
        }
    }
}


int main()
{
    ll x;
    cin >> x;
    ll ans = 0;

    Eratosthenes( 200000 );
    for( const auto &pp: P ){
        if (pp >= x){
            cout << pp;
            break;
        }
    }

}


Measured memory_bytes: 896
#define _CRT_SECURE_NO_WARNINGS
#define _SCL_SECURE_NO_WARNINGS
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <iostream>
#include <string>
#include <vector>
#include <list>
#include <utility>
#include <algorithm>
#include <functional>
#include <cmath>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <iomanip>
#include <sstream>
#include <bitset>
#include <limits>
#include <numeric>
#include <valarray>
#include <fstream>

using namespace std;
typedef unsigned int uint;
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<LL, LL> PP;
#define REP(i, a, n) for(LL i = (a), i##_max = (n); i < i##_max; ++i)
#define REM(i, a, n) for(LL i = (LL)(n) - 1, i##min = (a); i >= i##min; --i)
#define ALL(arr) (arr).begin(), (arr).end()
#define FLOAT fixed << setprecision(16)
#define SPEEDUP {cin.tie(NULL); ios::sync_with_stdio(false);}
const int INF = 0x3FFFFFFF;
const LL INFLL = 0x3FFFFFFF3FFFFFFF;
const double INFD = 1.0e+308;
const string INFSTR = "\x7f";
const double EPS = 1.0e-9;

void YesNo(bool b) { cout << (b ? "Yes" : "No") << endl; }
void YESNO(bool b) { cout << (b ? "YES" : "NO") << endl; }
template <class T, class U>
istream& operator>>(istream& ist, pair<T, U>& right) { return ist >> right.first >> right.second; }
template <class T, class U>
ostream& operator<<(ostream& ost, const pair<T, U>& right) { return ost << right.first << ' ' << right.second; }
template <class T, class TCompatible, size_t N>
void Fill(T(&dest)[N], const TCompatible& val) { fill(dest, dest + N, val); }
template <class T, class TCompatible, size_t M, size_t N>
void Fill(T(&dest)[M][N], const TCompatible& val) { for (int i = 0; i < M; ++i) Fill(dest[i], val); }
template<class T>
T Compare(T left, T right) { return left > right ? 1 : (left < right ? -1 : 0); }
istream& Ignore(istream& ist) { string s; ist >> s; return ist; }
bool Inside(int i, int j, int h, int w) { return i >= 0 && i < h && j >= 0 && j < w; }
template <class T>
T Next() { T buf; cin >> buf; return buf; }

#ifdef ONLY_MY_ENVIR
#include "IntMod.h"
#include "Union_Find.h"
#include "Graph.h"
#include "Range.h"
#include "Global.h"
#include "Flow_Solver.h"
#include "Tree.h"
#include "Suffix_Array.h"
#include "Geometry.h"
#include "Matrix.h"
#include "Segment_Tree.h"
#include "Rational.h"
#include "Position.h"
#include "Factorization.h"
#endif

#ifdef __GNUC__
typedef __int128 LLL;
istream& operator>> (istream& ist, __int128& val) { LL tmp;  ist >> tmp; val = tmp; return ist; }
ostream& operator<< (ostream& ost, __int128 val) { LL tmp = val; ost << tmp; return ost; }
#endif

#if 1234567891
#include <array>
#include <random>
#include <unordered_set>
#include <unordered_map>
template<typename T>
using PriorityQ = priority_queue<T, vector<T>, greater<T> >;	// コスト小を優先
template <class T>
auto Is(const T& value) { return [value](const auto& comparand) -> bool { return comparand == value; }; }
#endif

int N, K;
int A[100000];
int main() {
	cin >> N >> K;
	REP(i, 0, N) {
		cin >> A[i];
	}
	--K;
	--N;
	cout << (N + K - 1) / K << endl;
	return 0;
}


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

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            double X = double.Parse(Console.ReadLine());

            int count = 0;

            double money = 100;

            while(true)
            {
                money = Math.Floor(money * 1.01);
                count++;

                if(money >= X)
                {
                    Console.WriteLine(count);
                    break;
                }
            }        
        }
    }
}


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

int main() {
    int R;
    cin >> R;
    if(R < 1200)
        cout << "ABC" << endl;
    else if(R >= 1200 && R < 2800)
        cout << "ARC" << endl;
    else
    {
        cout << "AGC" << endl;
    }
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define FIN ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

int main() {FIN
	
	int n, k, s, i;
	cin >> n >> k >> s;
	for (i = 0; i < n; i++) {
		if (i > 0)
			cout << " ";
		if (i < k)
			cout << s;
		else {
			if (s < 1000000000)
				cout << s + 1;
			else
				cout << s - 1;
		}	
	}
	cout << "\n";
	return 0;
}


Measured memory_bytes: 1280
/*
─────────────────────
───────────████████──
──────────███▄███████
──────────███████████
──────────███████████
──────────██████─────
──────────█████████──
█───────███████──────
██────████████████───
███──██████████──█───
███████████████──────
███████████████──────
─█████████████───────
──███████████────────
────████████─────────
─────███──██─────────
─────██────█─────────
─────█─────█─────────
─────██────██────────
─────────────────────
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>

#define int long long
#define read(a) int a; cin >> a;
#define readb(a, b) int a, b; cin >> a >> b;
#define readc(a, b, c) int a, b, c; cin >> a >> b >> c;
#define reads(s) string s; cin >> s;
#define readarr(a, n) int a[(n) + 1] = {}; fori (i, 1, (n)) {cin >> a[i];}
#define readmat(a, n, m) int a[n + 1][m + 1] = {}; fori (i, 1, n) {fori (j, 1, m) cin >> a[i][j];}

#define print(a) cout << a << endl;
#define printarr(a, n) fori (i, 1, n) cout << a[i] << " "; cout << endl;
#define printv(v) for (int i: v) cout << i << " "; cout << endl;
#define printmat(a, n, m) fori (i, 1, n) {fori (j, 1, m) cout << a[i][j] << " "; cout << endl;}
#define all(v) v.begin(), v.end()
#define sz(s) (int)(s.size())
#define pb push_back
#define fi first
#define se second
#define rz resize
#define fori(i, a, b) for (int i = (a); i <= (b); i++)
#define ford(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
#define setprec(x) cout << fixed << setprecision(x);
 
using namespace std;
using namespace __gnu_pbds; 
 
typedef tree<long long,null_type,less<long long>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pair <int, int>> vpi;
typedef vector < vector <int> > vvi;
 
const int INF = 4e18;
const int mod = 1e9+7; 

     
signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    #ifndef ONLINE_JUDGE 
        freopen ("INPUT.txt" , "r" , stdin);
        freopen ("OUTPUT.txt" , "w" , stdout);
        freopen ("OUTPUT_ERROR.txt" , "w" , stderr);
    #endif

    //start from here

    read(n)

    vi cnt(1e7 + 1);

    fori (i, 1, n)
    {
        for (int j = i; j <= n; j += i) cnt[j]++;
    }

    int ans = 0;

    fori (i, 1, n) ans += i * cnt[i];

    print(ans)

    return 0;
}


Measured memory_bytes: 81308
// luogu-judger-enable-o2
#include<iostream>
#include<cstring>
#include<string>
using namespace std;
int main()
{
    string s;
    int ans=0;
    cin>>s;
    for(int i=1;i<s.length();i++)
    if(s[i]!=s[i-1])++ans;
    cout<<ans<<'\n';
}

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

string A,B,C;
int main (){
    cin >> A >> B >> C;
    if ( A[A.length()-1] == B[0] && B[B.length()-1] == C[0]) {
        cout << "YES" << endl;
    } else cout << "NO" << endl;
}


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

using namespace std;

#define ok1 printf("ok1\n");
#define ok2 printf("ok2\n");
#define M 1000000000000000000LL
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(n);i--)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define pb push_back
#define pf push_front
#define MIN(a,b) a=min((a),(b))
#define MAX(a,b) a=max((a),(b))
#define SIZE(v) (int)v.size()
#define Eunique(v) v.erace(unique(all(v)),v.end())
#define pvec(v)　rep(i,v.size()){cout << v[i] << " ";}
#define INF 0x3f3f3f3f
#define mset(m,v) memset(m,v,sezeof(m))
#define mod (int)(1e9 +7);

const double pi = acos(-1.0);

typedef vector<int> vi;
typedef string ss;
typedef vector<string> vs;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef deque<ll> dll;
typedef pair<ll,ll> P;
ll dx[4] = {1,0,-1,0},dy[4] = {0,1,0,-1};

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

ll lcm(ll a,ll b){
    ll g = gcd(a,b);
    return a / g * b; // Be careful not to overflow
}

ll fib(ll n){
    vll a(n+1);
    a[0] = 1;
    a[1]  = 1;

    REP(i,2,n+1){
        a[i] = a[i-1] + a[i-2];
        a[i] %= mod;
    }

    return a[n-1];
}

int main()
{
    ll n;
    cin >> n;
    vs s(n);
    rep(i,n){
        cin >> s[i];
        sort(all(s[i]));
    }

    sort(all(s));

    /*printf("\n");
    rep(i,n)cout << s[i] << endl;
    printf("\n");*/

    ll ans = 0,cnt = 0;
    rep(i,n-1){
        if(s[i] == s[i+1]){
            cnt++;
            //printf("000\n");
        }

        else if(cnt){
            //cout << cnt << " ";
            ans += cnt * (cnt+1) / 2;
            cnt = 0;
        }
    }
    //printf("\n");    
    ans += cnt * (cnt+1) / 2;

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 7296
while true
    h, w = gets.split( " " ).map { | val | val.to_i }
    break if 0 == h && 0 == w
     
    pa = [ "#", "." ]
    for i in ( 0 ... h ) 
        for j in ( 0 ... w )
            print( "#{pa[(i+j)&1]}" )
        end
        print( "\n" )
    end
    print( "\n" )
end

Measured memory_bytes: 6108
def gi; gets.to_i end
def gs; gets.chomp end
def gli; gets.split(' ').map(&:to_i) end
def d(n); Math.log10(n).to_i + 1 end

N = gi

def kuku?(n)
  1.upto(9) do |i|
    1.upto(9) do |j|
      return true if i * j == N
    end
  end
  false
end

puts kuku?(N) ? 'Yes' : 'No'


Measured memory_bytes: 3836
#include <bits/stdc++.h>
#define rep(i,N) for(int i=0;i<N;i++)
using namespace std;
long long  INF=1000000000000000000;
long long mod=1000000007;
using namespace std;


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

vector<vector<int>>to(n);
vector<int>in(n);//n頂点に対して入ってくる有効グラフの数

rep(i, n-1+m) {
    int a, b;
    cin >> a >> b;
    a--, b--;
    to[a].push_back(b);
    in[b]++;
  }
  queue<int> que;
  rep(i, n) {
    if (!in[i])
    //根の決定
      que.push(i);
  }

  vector<int> tps;
  //queueを用いたトポロジカルソート
  //幅優先探索
  while (!que.empty()) {
    int a = que.front();
    que.pop();
    tps.push_back(a);
    for (auto e : to[a])
    //現在調べている頂点の行き先について
     {
      in[e]--;
      if (!in[e])
      //入ってくる辺が一つの頂点を次の探索対象にする
        que.push(e);
    }
  }
  vector<int> ans(n);//初期値0が入る
  rep(i, n) {
    for (auto e : to[tps[i]])
    //最後に更新された親が本当の親
      ans[e] = tps[i]+1;
  }
  rep(i, n)
    cout << ans[i] << endl;

 return 0;
}
/*

*/

Measured memory_bytes: 7544
#include<algorithm>//sort,二分探索,など
#include<bitset>//固定長bit集合
#include<cmath>//pow,logなど
#include<complex>//複素数
#include<deque>//両端アクセスのキュー
#include<functional>//sortのgreater
#include<iomanip>//setprecision(浮動小数点の出力の誤差)
#include<iostream>//入出力
#include<map>//map(辞書)
#include<numeric>//iota(整数列の生成),gcdとlcm(c++17)
#include<queue>//キュー
#include<set>//集合
#include<stack>//スタック
#include<string>//文字列
#include<unordered_map>//イテレータあるけど順序保持しないmap
#include<unordered_set>//イテレータあるけど順序保持しないset
#include<utility>//pair
#include<vector>//可変長配列
using namespace std;

typedef long long ll;
typedef vector<ll> vll;
typedef vector<int> vi;

//マクロ
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=(a);i<=(b);i++)
#define FORD(i,a,b) for(ll i=(a);i>=(b);i--)
#define MAPFOR(it,m) for( auto it = (m).begin(); it != (m).end() ; ++it )
#define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x))
#define INF 1000000000000 //10^12
#define MOD 1000000007 //10^9+7
#define MAXR 100000 //10^5:最大のrange(素数列挙などで使用)

int main(void){
    int n, k;
    cin >> n >> k;
    vi p(n);
    REP(i, n) cin >> p[i];
    sort(ALL(p));
    int sum = 0;
    REP(i, k) sum += p[i];
    cout << sum << endl;
    return 0;
}

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

class line
{
public:
    long long a;
    long long b;

    line()
    {
        ;
    }

    line(long long A, long long B)
    {
        a = A;
        b = B;
    }

    long long eval(long long x)
    {
        return a*x + b;
    }
};

vector<line> L;

void insert(line k)
{
    if(L.size() <= 1) L.push_back(k);
    else
    {
        line l1 = L[L.size()-2];
        line l2 = L[L.size()-1];
        if((l2.b - l1.b)*(k.a - l2.a) <= (l2.b - k.b)*(l1.a - l2.a))
        {
            L.pop_back();
            insert(k);
        }
        else L.push_back(k);
    }
}

long long b_search(long long x, long long a, long long b)
{
    if(a == b) return L[a].eval(x);
    long long m = (a+b)/2;
    if((L[m+1].b - L[m].b) < x*(L[m].a - L[m+1].a)) return b_search(x, m+1, b);
    else return b_search(x, a, m);
}

int main()
{
    long long N, C;
    cin >> N >> C;

    long long h[N+1];
    for(long long i = 1; i <= N; i++) cin >> h[i];

    long long DP[N+1];
    DP[1] = 0;
    insert(line(-2*h[1], h[1]*h[1]));
    for(long long i = 2; i <= N; i++)
    {
        DP[i] = C + h[i]*h[i] + b_search(h[i], 0, L.size()-1);
        insert(line(-2*h[i], DP[i] + h[i]*h[i]));
    }
    cout << DP[N] << '\n';
    return 0;

    //DP[1] = 0;
    //DP[i] = C + h[i]^2 + min{1 <= j < i; (-2*h[j])*h[i] + (DP[j] + h[j]^2)}
}

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

using namespace std;

#define DUMP(x) std::cerr << (#x) << " = " << (x) << "\n"
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define REP(i, k, n) for (int i = (k); i < (int)(n); ++i)
#define ALL(r) r.begin(), r.end()
#define YES puts("YES")
#define Yes puts("Yes")
#define NO puts("NO")
#define No puts("No")
#define IMP puts("IMPOSSIBLE")
#define Imp puts("Impossible")
#define imp puts("impossible")
#define M1 puts("-1")
#define pb push_back

template <typename T>
T dup(T x, T y)
{
    return (x + y - 1) / y;
};
template <typename A, size_t N, typename T>
inline void arrayFill(A (&array)[N], const T &val) { std::fill((T *)array, (T *)(array + N), val); }

using ll = int64_t;
using vint = vector<int32_t>;
using vvint = vector<vint>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vstr = vector<string>;
using pint = pair<int32_t, int32_t>;
using pll = pair<ll, ll>;
using setint = set<int32_t>;
using setstr = set<string>;
using qint = queue<int32_t>;
using qpint = queue<pint>;

constexpr std::int32_t INF = 1001001001;
constexpr std::int64_t LINF = 1001001001001001001;

void Main()
{
    int a, b, x;
    cin >> a >> b >> x;
    if (x >= a && x <= a + b)
    {
        YES;
        return;
    }
    NO;
    return;
}

int main()
{
    std::cin.tie(nullptr);
    std::ios_base::sync_with_stdio(false);
    std::cout << std::fixed << std::setprecision(15);
    Main();
    return 0;
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner stdIn = new Scanner(System.in);
        String input = stdIn.nextLine();
        String[] a = input.split(" ");
        int x = Integer.parseInt(a[0]);
        int y = Integer.parseInt(a[1]);
        if(x > 0 && x < 101 && y > 0 && y < 101){
            int ans = y - x*2;
            if(ans == 0){
                System.out.println("Yes");
            }else if(ans > 0 && (ans % 2) == 0){
                for(int i = 0 ; i < x ; i++){
                    ans = ans - 2;
                    if(ans == 0){
                        System.out.println("Yes");
                        break;
                    }
                }
                if(ans != 0){
                    System.out.println("No");
                }
            }else{
                System.out.println("No");
            }
        }
    }
}


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

int main() {
  int A, B, K;
  cin >> A >> B >> K;

  int i = 0;
  int num = 100;
  do {
    if(A%num== 0&& B%num==0) i++;
    num--;
  } while(i!=K);

  cout << num+1 << endl;
  return 0;
}

Measured memory_bytes: 256
import java.util.*;

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

    public static void main(String[] args) {
        int N = in.nextInt();
        if (N % 2 == 0) {
            System.out.println(0.5);
        } else {
            System.out.println(((N >> 1) + 1) / (double)N);
        }
    }
}


Measured memory_bytes: 21972
st = input()
l = len(st)
f = 1
for i in range(l):
    if st[i] == 'C' or st[i] == 'c':
        for j in range(i,l
                       ):
            if st[j]=='F' or st[j] == 'f':
                print('Yes')
                f = 0
                break
        if f ==0:
            break

if f:
    print('No')

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

namespace Practice
{
    class Program
    {
        static void Main(string[] args)
        {
            SolveA();
            //SolveB();
            //SolveC();
            //SolveD();
        }
        private const long MOD = 1000000007;
        private const int White = 0;
        private const int Gray = 1;
        private const int Black = 2;
        private static int[] Color = null;
        private static bool[,] Graph;
        static void SolveA()
        {
            int n = ReadAndParseInt();
            int a = ReadAndParseInt();
            int ans = n * n - a;
            Console.WriteLine(ans);
        }

        #region よく使う便利関数
        private static bool isPrime(long x)
        {
            if (x == 2) { return true; }
            if (x < 2 || x % 2 == 0) { return false; }
            long i = 3;
            while (i * i <= x)
            {
                if (x % i == 0) { return false; }
                i = i + 2;
            }
            return true;
        }
        private static long lcm(long x, long y)
        {
            return x / gcd(x, y) * y;
        }
        private static long gcd(long x, long y)
        {
            return y > 0 ? gcd(y, x % y) : x;
        }
        private static long pow(long x, long n)
        {
            if (n == 0) { return 1; }
            long res = pow(x * x % MOD, n / 2);
            if (n % 2 == 1)
            {
                res = res * x % MOD;
            }
            return res;
        }
        private static int ReadAndParseInt()
        {
            return int.Parse(Console.ReadLine());
        }
        private static int[] ReadAndParseIntArr()
        {
            return Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse);
        }
        private static long ReadAndParseLong()
        {
            return long.Parse(Console.ReadLine());
        }
        private static long[] ReadAndParseLongArr()
        {
            return Array.ConvertAll(Console.ReadLine().Split(' '), long.Parse);
        }
        #endregion
    }
}

Measured memory_bytes: 11092
import math
q = int(input())
scope = [tuple(map(int, input().split())) for _ in range(q)]
prime_flag = [True] * (10 ** 5 + 1)
prime_flag[0] = False
prime_flag[1] = False
prime_cnt = [0] * (10 ** 5 + 1)

for i in range(2, math.ceil(math.sqrt(10 ** 5))):
    for j in range(i + i, 10 ** 5 + 1, i):
        prime_flag[j] = False


for i in range(2, 10 ** 5 + 1):
    prime_cnt[i] = prime_cnt[i - 1]
    num = (i + 1) / 2
    if num % 1 == 0 and prime_flag[i] and prime_flag[int(num)]:
        prime_cnt[i] += 1

for i in range(q):
    left = scope[i][0]
    right = scope[i][1]
    print(prime_cnt[right] - prime_cnt[left - 1])

Measured memory_bytes: 18932
input_line = input()
info = input_line.split()
N = int(info[0])
M = int(info[1])

A_B = []
for i in range(N):
    input_line = input()
    temp = input_line.split()
    a_b = [int(x) for x in temp]
    A_B.append(a_b)

A_B.sort(key=lambda x:x[0])
#print(A_B)
bought = [0, 0] #[money, num]
p = 0
while (bought[1]<M):
    bought[0] += A_B[p][0]*A_B[p][1]
    bought[1] += A_B[p][1]
    if bought[1]>M:
        diff = bought[1]-M
        bought[0] -= A_B[p][0]*diff
        bought[1] -= diff
    p += 1
print(bought[0])

Measured memory_bytes: 22752
H1,M1,H2,M2,K = map(int,input().split())

if M2>K:
  M2 = M2 - K
else:
  K = K - M2
  M2 = 0
  H2 = H2 - K//60 - 1
  K = K - (K//60) * 60
  M2 = 60 - K

  
if H1==H2:
  ans = M2 - M1
else:
  ans = (H2 - H1 - 1) * 60
  ans += 60 - M1
  ans += M2
  
print(ans)

Measured memory_bytes: 61780
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

num = int(input())
sum_num = 0
for i in range(1,num+1):
  for j in range(1,num+1):
    for k in range(1,num+1):
      sum_num += gcd(i, j, k)

print(sum_num)

Measured memory_bytes: 69740
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <algorithm>

#define BOGO 10

using namespace std;

int main()
{
	int arr[BOGO];
	bool found;
	int j;
	srand(static_cast<unsigned int>(time(NULL)));
	
	for(int i = 0; i < BOGO; i++){
		cin >> arr[i];
	}
	
	for(;;){
		
		/**
		for(int j = 0; j < BOGO; j++){
			cout << arr[j] << flush;
		}
		cout << endl;
		/**/
		
		found = true;
		for(j = 0; j < BOGO-1; j++){
			if(arr[j] > arr[j+1]){
				found = false;
				break;
			}
		}
		
		if(found){
			break;
		}
		random_shuffle(arr, arr+BOGO);
	}
	cout << arr[9] << "\n" << arr[8] << "\n" << arr[7] << endl;
}

Measured memory_bytes: 832
// In god we trust
 
#include <bits/stdc++.h>
#include <chrono>
#include <algorithm>
#include <signal.h>
#include <thread>
 
#define pb push_back
#define fi first
#define se second
#define Vi vector<int>
#define Vb vector<bool>
#define Pi pair<int, int>
#define MP make_pair
#define MT make_tuple
#define Q queue
#define Qi Q<int>
#define INF 1000000000 
#define LINF 1000000000000000000
#define int long long
using namespace std;
using namespace std::chrono;

int c[100010];

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

  int n;
  cin >> n;
  int ans = 0;
  for (int i = 1; i < n + 1; i++){
    int x = n / i;
    ans += x * (x + 1) / 2 * i;
  }
  cout << ans << endl;
}


Measured memory_bytes: 3620
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <functional>
#include <algorithm>
#include <cctype>
using namespace std;

typedef long long ll;
struct State {
    int x, y, foot, cost;
    State(int x, int y, int foot, int cost) : x(x), y(y), foot(foot), cost(cost){}
};

bool operator<(const State &lhs, const State &rhs) {
    return lhs.cost > rhs.cost;
}

const int MAX = (1 << 21);
const int dx[2][9] = {
    {-3, -2, -2, -2, -1, -1, -1, -1, -1},
    {3, 2, 2, 2, 1, 1, 1, 1, 1}
};
const int dy[2][9] = {
    {0, -1, 0, 1, -2, -1, 0, 1, 2},
    {0, -1, 0, 1, -2, -1, 0, 1, 2}
};

char field[80][80];
bool visited[80][80][2];

int main()
{
    int w, h;
    while(cin >> w >> h && w && h) {
        
        priority_queue<State, vector<State>, less<State> > que;
        for(int i = 0; i < 80; i++) {
            for(int j = 0; j < 80; j++) {
                field[i][j] = 'X';
                visited[i][j][0] = visited[i][j][1] = false;
            }
        }
        
        for(int i = 0; i < h; i++) {
            for(int j = 0; j < w; j++) {
                cin >> field[i + 5][j + 5];
                if(field[i + 5][j + 5] == 'S') {
                    que.push(State(j + 5, i + 5, 0, 0));
                    que.push(State(j + 5, i + 5, 1, 0));
                    field[i + 5][j + 5] = '0';
                }
            }
        }

        int ret = MAX;
        while(!que.empty()) {
            State cur = que.top(); que.pop();
            if(field[cur.y][cur.x] == 'T') {
                ret =  cur.cost;
                break;
            }
            visited[cur.y][cur.x][cur.foot] = true;

            //cout << cur.x << " " << cur.y << " " << cur.foot << " " << cur.cost << endl;
            for(int i = 0; i < 9; i++) {
                int nx, ny, nfoot, ncost;
                nfoot = (cur.foot + 1) %2;
                nx = cur.x + dx[nfoot][i]; ny = cur.y + dy[nfoot][i];
                if(field[ny][nx] == 'X' || visited[ny][nx][nfoot]) {
                    continue;
                }
                ncost = cur.cost + ((field[ny][nx] == 'T') ? 0 : (field[ny][nx] - '0'));
                que.push(State(nx, ny, nfoot, ncost));
            }
        }
        cout << ((ret == MAX) ? -1 : ret) << endl;
    }
}

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

using namespace std;

int main(){
    int arr[32] = {1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51};
    int n;
    cin>>n;
    cout <<arr[n-1];
}

Measured memory_bytes: 256
import std.stdio, std.string, std.conv, std.algorithm, std.numeric;
import std.range, std.array, std.math, std.typecons, std.container, core.bitop;

void main() {
    while (true) {
        int n;
        scan(n);

        if (!n) return;

        auto a = readln.split;

        if (n&1) {
            n--;
            a.popBack;
        }

        int ans;

        foreach (i ; 0 .. n/2) {
            ans += (a[2*i] == "lu" && a[2*i + 1] == "ru" || a[2*i] == "ru" && a[2*i+1] == "lu"
                    || a[2*i] == "ld" && a[2*i+1] == "rd" || a[2*i] == "rd" && a[2*i+1] == "ld");
        }

        writeln(ans);
    }
}



void scan(T...)(ref T args) {
    string[] line = readln.split;
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}



void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}

Measured memory_bytes: 2600
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdint>
#include <iostream>
#include <iterator>
#include <vector>

// lib/util.hpp
#ifndef UTIL_HPP
#define UTIL_HPP


typedef std::int_fast64_t i64;
typedef std::uint_fast64_t u64;

namespace tools {
  template <typename T>
  void read(std::vector<T>& vector, const typename std::vector<T>::size_type size) {
    vector.reserve(size);
    std::copy_n(std::istream_iterator<T>(std::cin), size, std::back_inserter(vector));
  }

  template <typename T, std::size_t N>
  void read(std::array<T, N>& array) {
    std::copy_n(std::istream_iterator<T>(std::cin), N, array.begin());
  }
}

#endif

// main.cpp

struct operation {
  i64 from_y, from_x, to_y, to_x;
  operation(const i64 from_y, const i64 from_x, const i64 to_y, const i64 to_x) :
    from_y(from_y), from_x(from_x), to_y(to_y), to_x(to_x) {
  }
  friend std::ostream& operator<<(std::ostream& os, const operation& self) {
    return os << (self.from_y + 1) << ' ' << (self.from_x + 1) << ' ' << (self.to_y + 1) << ' ' << (self.to_x + 1);
  }
};

int main() {
  i64 H, W;
  std::cin >> H >> W;
  std::vector<std::vector<i64>> a(H, std::vector<i64>(W));
  for (i64 y = 0; y < H; ++y) {
    for (i64 x = 0; x < W; ++x) {
      std::cin >> a[y][x];
    }
  }

  std::vector<operation> answers;
  for (i64 y = 0; y < H; ++y) {
    for (i64 x = 0; x < W; ++x) {
      if (a[y][x] % 2 == 1) {
        if (y < H - 1 && a[y + 1][x] % 2 == 1) {
          answers.emplace_back(y, x, y + 1, x);
          --a[y][x];
          ++a[y + 1][x];
          continue;
        }
        if (x < W - 1 && a[y][x + 1] % 2 == 1) {
          answers.emplace_back(y, x, y, x + 1);
          --a[y][x];
          ++a[y][x + 1];
          continue;
        }
        if (y < H - 1) {
          answers.emplace_back(y, x, y + 1, x);
          --a[y][x];
          ++a[y + 1][x];
          continue;
        }
        if (x < W - 1) {
          answers.emplace_back(y, x, y, x + 1);
          --a[y][x];
          ++a[y][x + 1];
          continue;
        }
      }
    }
  }

  std::cout << answers.size() << std::endl;
  for (const operation& answer : answers) {
    std::cout << answer << std::endl;
  }
  return 0;
}

Measured memory_bytes: 8432
#include<bits/stdc++.h>
#define ll long long
#define F(i,a,b) for(ll i=a;i<b;i++)
#define RF(i,a,b) for(ll i=a;i>b;i--)
#define pii pair<ll,ll>
#define ff first
#define ss second
#define pb(x) push_back(x)
#define pob pop_back
#define mp(x,y) make_pair(x,y)
#define mod 1000000007
#define w(t) int t; cin>>t;while(t--)
using namespace std;
const int inf=(int)1e9;
char flip_bits(char c){return (c == '0')? '1': '0';}

int smallestDivisor(int n) 
{ 
    // if divisible by 2 
    if (n % 2 == 0) 
        return 2; 
  
    // iterate from 3 to sqrt(n) 
    for (int i = 3; i * i <= n; i += 2) { 
        if (n % i == 0) 
            return i; 
    } 
  
    return n; 
} 
int main()
{
    
    ios::sync_with_stdio(0);   
    cin.tie(0);   
    ll a[100000];
    ll dp[100000];
    ll n,k;
    cin>>n>>k;
    for(ll i=0;i<n;i++)
    {
        cin>>a[i];
    }
    ll i,j,prev; 
    dp[0]=0;
    F(i,1,n)
    {
        dp[i]=mod;
    }
    for(i=0;i<n;i++)
    {   
        for(j=i+1;j<=i+k;j++)
        {
            if((j)<n)
            {

                dp[j]=min(dp[j],dp[i]+abs(a[i]-a[j]));
            }
        
        }
    }
    cout<<dp[n-1];

return 0;
}

Measured memory_bytes: 1792
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <algorithm>
#include <numeric>
#include <functional>
#include <sstream>
#include <iostream>
#include <iomanip>
#define _USE_MATH_DEFINES
#include <cmath>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cfloat>
#include <cmath>
#include <ctime>
#include <cassert>
#include <cctype>
#include <cstdio>
#include <cassert>
using namespace std;

#define EPS 1e-12
#define ull unsigned long long
#define ll long long
#define VI vector<ll>
#define PII pair<ll, ll> 
#define VVI vector<vector<ll> >
#define VVVI vector<vector<vector<ll>>>
#define VVVVI vector<vector<vector<vector<ll>>>>
#define REP(i,n) for(ll i=0,_n=(n);(i)<(ll)_n;++i)
#define REPR(i,n) for(ll i=(ll)(n)-1;0<=(i);--i)
#define RANGE(i,a,b) for(ll i=(ll)a,_b=(ll)(b);(i)<_b;++i)
#define RANGER(i,a,b) for(ll i=(ll)(b)-1,_a=(ll)(a);(_a)<=i;--i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
#define ALLR(c) (c).rbegin(), (c).rend()
#define PB push_back
#define MP(a, b) make_pair(a, b)
#define POPCOUNT __builtin_popcount
#define POPCOUNTLL __builtin_popcountll
#define CLEAR(table, v) memset(table, v, sizeof(table));
#define UNIFORM_DOUBLE(a, b) (((b-a)*(double)rand()/RAND_MAX)+a) // [a, b) 
#define UNIFORM_LL(a, b) (ll)UNIFORM_DOUBLE(a, b) // [a, b) 
#define IN(v, lo, hi) ((lo)<=(v) && (v)<(hi))
#define DD(v) cout<<#v<<": "<<v<<endl
#define FI first
#define SE second
template <typename T0, typename T1> std::ostream& operator<<(std::ostream& os, const map<T0, T1>& v) { for( typename map<T0, T1>::const_iterator p = v.begin(); p!=v.end(); p++ ){os << p->first << ": " << p->second << " ";} return os; }
template <typename T0, typename T1> std::ostream& operator<<(std::ostream& os, const pair<T0, T1>& v) { os << v.first << ": " << v.second << " "; return os; }
template <typename T> std::ostream& operator<<(std::ostream& os, const vector<T>& v) { for( int i = 0; i < (int)v.size(); i++ ) { os << v[i] << " "; } return os; }
template <typename T> std::ostream& operator<<(std::ostream& os, const set<T>& v) { vector<T> tmp(v.begin(), v.end()); os << tmp; return os; }
template <typename T> std::ostream& operator<<(std::ostream& os, const deque<T>& v) { vector<T> tmp(v.begin(), v.end()); os << tmp; return os; }
template <typename T> std::ostream& operator<<(std::ostream& os, const vector<vector<T> >& v) { for( int i = 0; i < (int)v.size(); i++ ) { os << v[i] << endl; } return os; }
template<typename T>void maxUpdate(T& a, T b) {a = max(a, b);}
template<typename T>void minUpdate(T& a, T b) {a = min(a, b);}
string YN(bool v) { return v ? "Yes":"No"; }
void uniq(VI& es) { sort(ALL(es)); es.erase(unique(ALL(es)), es.end()); }

#define INF (1LL<<60)

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll N,M,W,H,K;
	string s;
	while(cin>>N) {
		VI A(N);
		REP(i, N) cin>>A[i];
		ll sum=accumulate(ALL(A),0LL);
		ll ans=INF;
		ll acc=0;
		REP(i, N) {
			acc+=A[i];
			minUpdate(ans, abs(sum-acc*2));
		}
		cout<<ans<<endl;
	}
	
	return 0;
}


Measured memory_bytes: 1792
'use strict';

function Main(INPUT) {
    const input = INPUT.split("\n")[0].split(" ").map(n => Number(n));
    const X = input[0];
    const t = input[1];

    console.log(X - t > 0 ? X - t : 0);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


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

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	int n; cin>>n;
	unordered_map<string,int>m;
	for(int i=0;i<n;++i){
		string s; cin>>s; ++m[s];
	}
	cout<<m.size()<<"\n"s;
}

Measured memory_bytes: 17712
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <array>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
#include <memory>
#include <regex>
using namespace std;

int main()
{
    long long a, b;
    cin >> a >> b;

    long long ans = 0;
    if((((b + 1) / 2) - (a / 2)) % 2 != 0)
        ans = 1;
    if(a % 2 != 0)
        ans ^= a & ~1;
    if(b % 2 == 0)
        ans ^= b & ~1;
    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int T = sc.nextInt();
		int c = 0, t = 0, ans = Integer.MAX_VALUE;

		for (int i = 0; i < n; i++) {
			c = sc.nextInt();
			t = sc.nextInt();
			if (t <= T && c < ans) {
				ans = c;
			}
		}

		if (ans > 1001) {
			System.out.println("TLE");
		} else {
			System.out.println(ans);
		}
		sc.close();
	}

}


Measured memory_bytes: 21844
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
 
#define mod 1e9+7
#define ll long long int
#define epsilon 1e-7
 
ll min(ll x, ll y){
    if(x < y)return x;
    else return y;
}
 
int main(void){
    int n, ma, mb;
    scanf("%d %d %d", &n, &ma, &mb);
    int ab[n], c[n];
    for(int i = 0;i < n;i++){
        int a, b;
        scanf("%d %d %d", &a, &b, &c[i]);
        ab[i] = b * ma - a * mb;
    }
    int dp[n+1][8000];
    for(int i = 0;i <= n;i++){
        for(int j = 0;j < 8000;j++){
            dp[i][j] = mod;
        }
    }
    for(int i = 0;i < n;i++){
        for(int j = 0;j < 8000;j++){
            dp[i+1][j] = min(dp[i+1][j],dp[i][j]);
            if(j==4000){
                dp[i+1][j+ab[i]]=min(dp[i+1][j+ab[i]],c[i]);
            }else if(dp[i][j]==mod){
                continue;
            }else{
                if(j+ab[i]>=0&&j+ab[i]<8000)dp[i+1][j+ab[i]] = min(dp[i+1][j+ab[i]],dp[i][j]+c[i]);
            }
        }
    }
    if(dp[n][4000] != mod)printf("%d\n", dp[n][4000]);
    else printf("-1\n");
    return 0;
}

Measured memory_bytes: 1408
#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;

int main(){
  int n;
  cin >> n;
  vector<pair<long, long>>ba(n);
  for(int i=0; i<n; i++)cin >> ba[i].second >> ba[i].first;
  sort(ba.begin(), ba.end());
  long t=0;
  for(int i=0; i<n; i++){
    t+=ba[i].second;
    if(t>ba[i].first){
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}

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

#define TYPE(c)   remove_reference_t<decltype(c)>
#define REP(i, n) for(TYPE(n) i = 0; i < n; i++)
#define FOR(v, c) for(TYPE(c.begin()) v = c.begin(); v != c.end(); v++)
#define ALL(c)    c.begin(), c.end()
#define SORT(c)   sort(ALL(c))
#define RSORT(c)  sort(ALL(c), greater<TYPE(c)::value_type>())
#define UNIQUE(c) c.erase(unique(ALL(c)), c.end())

using namespace std;
using ll = long long;

constexpr int MOD  = (int)1e9 + 7;
constexpr int INF  = (int)1e9 + 1;
constexpr ll  LINF = (ll)1e18 + 1;
template<typename T> constexpr bool chmax(T& a, const T& b)
{ if(a < b) { a = b; return true; } else { return false; } }
template<typename T> constexpr bool chmin(T& a, const T& b)
{ if(b < a) { a = b; return true; } else { return false; } }
template<typename S, typename T> ostream& operator<<(ostream &os, const pair<S, T>& p)
{ return os << "(" << p.first << "," << p.second << ")"; }
ostream& operator<<(ostream &os, const string& s)
{ FOR(v, s) os << *v; return os; }
template<typename T> auto operator<<(ostream& os, const T& t)
    -> typename conditional<true, ostream&, decltype(*t.begin())>::type
{ os << "["; FOR(v, t) { if(v != t.begin()) os << ","; os << *v; } os << "]"; return os; }

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

    int A, B;
    std::cin >> A >> B;
    if(A < 10 && B < 10) {
        std::cout << A * B << std::endl;
    }
    else {
        std::cout << -1 << std::endl;
    }

    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <ios>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <utility>
#include <typeinfo>
#include <tuple>
using namespace std;

#define MOD 1000000007
#define INF 1e9+7
#define INF_LONG 1e18
#define rep(i, n) for(int i=0; i<n; ++i)
#define rep1(i, n) for(int i=1; i<=n; ++i)
#define rrep(i, m, n) for(int i=m; i<n; ++i)
#define countof(array) (sizeof(array) / sizeof(array[0]))
typedef long long ll;

#define MAX_N 200000
#define MAX_M 100000
#define MAX_V 100
#define MAX_E 100
#define MAX_Q 100000

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

int ddx[] = {-1, 0, 1, 0, -1, 1, -1, 1};
int ddy[] = {0, -1, 0, 1, 1, 1, -1, -1};

string as = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ"};
string ab = {"abcdefghijklmnopqrstuvwxyz"};

ll gcd(ll x, ll y) {
  if(y==0) return x;
  else return gcd(y, x%y);
}

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

void yes() {
  cout << "Yes" << endl;
}

void no() {
  cout << "No" << endl;
}

void print_array(int array[], int len) {

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

}

ll absolute(ll x) {
  return (x<0)? (-1)*x : x;
}

//g++ AtCoder.cpp -o AtCoder
//AtCoder

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



int main() {

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

  int x = a-(b*2);

  if(x<0) cout << 0 << endl;
  else cout << x << endl;

  return 0;
}


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

using ll = long long;
#define debug(x) cerr << #x << ": " << x << endl;
#define line() cerr << "---------------" << endl;

int main() {
   string a, b;
   cin >> a >> b;
   sort(a.begin(), a.end());
   sort(b.begin(), b.end(), greater<char>());
   if (a < b) {
      puts("Yes");
   } else {
      puts("No");
   }

   return 0;
}

Measured memory_bytes: 256
#ifdef __GNUC__
#pragma GCC target("avx2")
#pragma GCC optimize ("O30")
#pragma GCC optimize ("tree-vectorize")
#pragma GCC optimize("unroll-loops")
#define iss std::cin
#endif
#include "bits/stdc++.h"
#define rep(i, times) for(ll i = 0; i < (times); ++i)
#define p(x) (cout << (x) << "\n")
using ll = long long; using ld = long double; using namespace std;

class Festival
{
	ll N{0};
	vector<vector<ll>> A;
	void inp( ) {
		iss >> N; A.resize(3, vector<ll>(N));
		for (auto &abc : A) {
			for (auto &a : abc)  iss >> a;
		}		
		sort(begin(A[0]), end(A[0]));
		sort(begin(A[2]), end(A[2]));
	}
	void biSearch( ) {
		ll cnt{0};
		for (auto &b : A[1]) {
			auto itA = lower_bound(begin(A[0]), end(A[0]), b);//A<bなる最大要素の位置
			auto itC = upper_bound(begin(A[2]), end(A[2]), b);//b<Cなる最小要素の位置
			cnt += (end(A[2]) - itC) * (itA - begin(A[0]));
		}
		p(cnt);
	}
public:
	void procedures( ) {
		inp( );	biSearch( );
	}
};
int main( ) {
	cin.tie(0);	ios::sync_with_stdio(0);
	class Festival a; a.procedures( );
}

Measured memory_bytes: 6356
n = int(input())
d = dict()
max_value = 0
for i in range(n):
  x = input()
  if x in d:
    d[x] += 1
  else:
    d[x] = 1
  max_value = max([max_value, d[x]])

d = sorted([(key, value) for key, value in d.items()], key = lambda x: x[0])
for key, value in d:
  if value == max_value:
    print(key)

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



int main() {
int N,M;
  cin>>N>>M;
 
  vector<int> left(M);
  vector<int> right(M);
  for(int i=0;i<M;i++){
   cin>>left[i];
    cin>>right[i];
    }
  
  sort(left.begin(),left.end());
  reverse(left.begin(),left.end());
    sort(right.begin(),right.end());
  
  if(right[0]+1>left[0]){
  cout<<right[0]+1-left[0]<<endl;}
     else{cout<<0<<endl;}

}


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

int main() {
	int K, A, B;
	cin >> K >> A >> B;

	int x = B / K;
	int y = x * K;

	if (A <= y && y <= B) {
		cout << "OK";
	}
	else {
		cout << "NG";
	}
}

Measured memory_bytes: 3592
N,X,Y = map(int, input().split())
X,Y = X-1,Y-1

ans = [0] * N
for i in range(N):
    for j in range(i+1,N):
        dist = min(abs(i-j), abs(i-X) + 1 + abs(Y-j))
        ans[dist] += 1
print(*ans[1:], sep='\n')

Measured memory_bytes: 74384
/*************************************************************************
  >         File: C.cc
  >       Author: lyyllyyl
  >         Mail: riho.yoshioka@yandex.com
  > Created Time: Sun 04 Sep 2016 09:09:32 PM CST
*************************************************************************/
#include <bits/stdc++.h>

char mp[2][555][555], g[555][555];

int main() {
  std::ios::sync_with_stdio(0);
  int h, w;
  std::cin >> h >> w;
  for (int i = 0; i < h; i++) {
    std::cin >> g[i];
  }
  memcpy(mp[0], g, sizeof(g));
  memcpy(mp[1], mp[0], sizeof(mp[0]));
  for (int i = 0; i < h; i++) {
    for (int j = 0; j < w; j++) {
      if (g[i][j] == '#') mp[0][i][j] = mp[1][i][j] = '#';
    }
  }
  for (int i = 0; i < h; i++) mp[0][i][0] = '#', mp[1][i][w - 1] = '#';
  for (int i = 0; i < h; i++) {
    int x = i & 1;
    for (int j = 1; j < w - 1; j++) {
      mp[x][i][j] = '#';
    }
  }

  //answer
  for (int i = 0; i < h; i++) {
    std::cout << mp[0][i] << std::endl;
  }
  std::cout << std::endl;
  for (int i = 0; i < h; i++) {
    std::cout << mp[1][i] << std::endl;
  }
  return 0;
}


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

using namespace std;
typedef long long ll;
//ループ
#define REP(i,n) for(ll i=0;i<(ll)(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=(ll)(b);i--)
//コンテナ
#define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x)) //最大値を求める
#define MIN(x) *min_element(ALL(x)) //最小値を求める
#define D()
//定数
#define INF 1000000000000 //10^12
#define MOD 10000007 //10^9+7
#define MAXR 100000 //10^5:配列の最大のrange(素数列挙などで使用)
//略記
#define PB push_back //vectorヘの挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素

int main(){
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    while(1){
        if((c -= b)<1) break;
        if((a -= d)<1) break;
    }
    if(a<1) cout << "No";
    else cout << "Yes";
}

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

#define st first
#define nd second
#define ll long long
#define ld long double
#define pb push_back
#define emp emplace_back
#define pii pair<int, int>
#define usg unsigned
#define sg signed
#define mp make_pair

using namespace std;

void setIO(){
	ios::sync_with_stdio(0);
	cin.tie(0); cout.tie(0);
}

const ld PI = 4*atan((ld)1);
const int INF = 1e9+7;

ll a, b, n;

ll min(ll x, ll y){
	return (x<y?x:y);
}

ll f(ll x){
	return a*x/b;
}

int main(){
	setIO();
	cin>>a>>b>>n;
	cout<<f(min(b-1,n))<<endl;
}

Measured memory_bytes: 3612