akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
#include<bitset>

using namespace std;

#define M 1000000007
#define pb push_back
#define f first
#define s second
#define rep(i, st, ed) for(int i=st; i<ed; i++)
#define repn(i, st, ed) for(int i=st; i<=ed; i++)
#define repb(i, ed, st) for(int i=ed; i>=st; i--)

typedef long long ll;
typedef unsigned long long int llt;
typedef long double ld;

const long double PI  =3.141592653589793238463;
const int N = 5e5 + 10;

vector<int> g[N];
bool viss[N];
int vis[N];

// Normal DFS
void dfs(int curr, int par)
{
  for(auto x: g[curr])
    if(x != par)
      dfs(x, curr);
}

// DFS with visiting status
void dfs1(int curr, int par)
{
  viss[curr] = 1;
  for(auto x: g[curr])
    if(!viss[x])
      dfs1(x, curr);
}

// DFS with strongly connected component
void dfs2(int curr, int par, int num)
{
  vis[curr] = num;
  for(auto x: g[curr])
    if(vis[x] == 0)
      dfs2(x, curr, num);
}

// XOR from 0 to n
ll fxor(ll n)
{
  if(n < 0) return 0;
  if(n % 4 == 3) return 0;
  else if(n % 4 == 0) return n;
  else if(n % 4 == 1) return n^(n-1);
  else if(n%4 == 2) return n^(n-1)^(n-2);
}

// Power in logn with mod 1000000007
llt ppow(llt x, llt y)
{
  llt res = 1;
  while(y > 0){
    if(y&1)
      res = (res * x)%M;
    y = y >> 1;
    x = (x * x)%M;
  }
  return res;
}

// Factorial with dp
llt factdp[N];
llt fact(llt x)
{
  if(x == 0) return 1;
  if(x == 1) return 1;
  if(factdp[x] != -1) return factdp[x];
  return factdp[x] = (x*fact(x-1))%M;
}

// String return to base b
string ansConv ="";
void convert10tob(llt N, int b)
{
     if (N == 0)
        return;
     int x = N % b;
     N /= b;
     if (x < 0)
        N += 1;
     convert10tob(N, b);
     ansConv += to_string(x);
     return;
}

// Convert string to num wiht base b
llt convertstrtob(string a, int b)
{
  llt aa = 0;
  llt mul = 1;
  for(int i=a.length()-1; i>=0; i--)
  {
    int curr = a[i] - '0';
    aa += (curr * mul);
    mul *= b;
  }
  return aa;
}

// Union Find algo with array
// Find()
int findpar(int curr, int arr[])
{
  while(arr[curr] != curr) curr = arr[curr];
  return curr;
}
// Union()
void Union(int b, int spa, int arr[])
{
  while(arr[b] != b)
  {
    int c = arr[b];
    arr[b] = spa;
    b = c;
  }
  arr[b] = spa;
}

// Main Code

int main()
{
  int a, b;
  cin>>a>>b;
  if(a == 1) a = 14;
  if(b == 1) b = 14;
  if(a > b) puts("Alice");
  else if(a < b) puts("Bob");
  else puts("Draw");
  return 0;
}


Measured memory_bytes: 12160
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int m = sc.nextInt();
        int d = sc.nextInt();
        long ans = 0;
        for (int j = 1; j <= m; j++) {
            for (int i = 22; i <= d; i++) {
                int d1 = i % 10;
                int d2 = i / 10;
                if (d2 < 2 || d1 < 2) {
                    continue;
                }
                if (d1 * d2 == j) {
                    ans++;

                }
            }
        }

        System.out.println(ans);
        sc.close();
    }
}


Measured memory_bytes: 23636
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        final int N = Integer.parseInt(sc.next());
        boolean exist = false;
        int price = 0;
        for (int i=1; i<=N; i++) {
            if ((int) (i*1.08) == N) {
                price = i;
                exist = true;
                break;
            }
        }
        out.println(exist ? price : ":(");
        
        out.flush();
    }
}

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

using namespace std;
using ll = long long;
constexpr int INF = numeric_limits<int>::max();
template<typename T, typename... Args>
const T& min(const T& a, Args... args) { return min(a, min(args...)); }
template<typename T, typename... Args>
const T& max(const T& a, Args... args) { return max(a, max(args...)); }

#pragma GCC optimize("O3")
static const auto __ = [] {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  return nullptr;
}();

int n, k;

int main(int argc, char* argv[]) {
  cin >> n >> k;
  while (k--, n--) {
    char s;
    cin >> s;
    if (!k) {
      cout << char (s + 32);
    } else {
      cout << s;
    }
  }
  cout << '\n';
  return 0;
}


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

using namespace std;
int main(void)
{
    int x, y;
    cin >> x >> y;
    if (y > 4 * x || y < 2 * x || y % 2 == 1)
        cout << "No\n";
    else
        cout << "Yes\n";
    return 0;
}


Measured memory_bytes: 3632
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
// const int INF = 2000000000;
// const ll MOD = 1000000007;

const int MAX_N = 55555;

int prime[MAX_N];
bool is_prime[MAX_N + 1];

// prime table
int eratosthenes(int n) {
  int p = 0;
  for (int i = 0; i <= n; i++) {
    is_prime[i] = true;
  }
  is_prime[0] = false, is_prime[1] = false;

  for (int i = 2; i <= n; i++) {
    if (!is_prime[i]) {
      continue;
    }
    prime[p++] = i;
    for (int j = 2 * i; j <= n; j += i) {
      is_prime[j] = false;
    }
  }

  return p;
}

int N;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  int p = eratosthenes(MAX_N);

  int cnt = 0;
  for (int i = 0; i < p; i++) {
    if (prime[i] % 5 == 1) {
      cout << prime[i];
      cnt++;

      if (cnt == N) {
        cout << endl;
        break;
      }
      cout << " ";
    }
  }

  return 0;
}

Measured memory_bytes: 384
<?php
    $n = trim(fgets(STDIN));
    $arr = explode(" ", trim(fgets(STDIN)));
    $maxB = 0;
    $ans = 0;
    for($i = 0; $i < $n; $i++){
        $maxB = max($maxB, $arr[$i]);
        $ans += $maxB - $arr[$i];
    }
    echo $ans . "\n";
?>

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

int main() {
  int N, D;
  cin >> N >> D;
  int ans = 0;
  int X, Y;
  while (cin >> X >> Y) {
    if (hypot(X, Y) <= D) ans++;
  }
  cout << ans << "\n";
}

Measured memory_bytes: 3680
#include<stdio.h>
#include<algorithm>
using namespace std;
int segtree[262144];
void add(int a,int b,int c,int d,int e){
	if(d<a||b<c)return;
	if(c<=a&&b<=d){segtree[e]++;return;}
	add(a,(a+b)/2,c,d,e*2);
	add((a+b)/2+1,b,c,d,e*2+1);
}
int get(int a){
	int ret=0;
	a+=131072;
	while(a){
		ret+=segtree[a];
		a/=2;
	}
	return ret;
}
int main(){
	int a;scanf("%d",&a);
	for(int i=0;i<a;i++){
		int p,q;scanf("%d%d",&p,&q);
		p--;q--;
		add(0,131071,p,q,1);
	}
	int ret=0;
	for(int i=0;i<110000;i++){
		if(get(i)>=i)ret=i;
	}
	printf("%d\n",ret);
}

Measured memory_bytes: 1816
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define fs first
#define sc second
typedef pair<ll, ll> l_l;
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
ll func(int x){
  vector<ll>a(x+5);
  a[0]=2; a[1]=1;
  for(int i=0;i<x-1;i++) 
  a[i+2]=a[i+1]+a[i];
  return a[x];
}
int main(){
  int n;
  cin>>n;
  
  cout<< func(n)<<endl;
}


Measured memory_bytes: 256
//1 4 3 5 2
//4 1 3 5 2
//1 4 5 3 2
//手前かおくと交換、どっち優先か
//1 2 3 4 5 6
//2 1 3 4 5 6
//2 1 4 3 6 5
//1手先か
//1 4 3 2 5
//4 1 3 2 5
//4 1 2 3
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
  ll N,tmp=1, ans=0; cin>>N;
  for(int i=0; i<N; i++,tmp++){
    ll p; cin>>p;
    if(p==tmp){
      i++; tmp++; cin>>p; ans++;
    }
  }
  cout<<ans<<endl;
}

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

typedef long long ll;
typedef long double ld;

const int MAXN = 2*1e5 + 10;

struct line{

	ll a,b;

	line(ll _a,ll _b){
		a = _a;
		b = _b;
	}

	ll get(ll x){return a*x + b;}

	ld get(ld x){return a*x + b;}

};

ld inter(line l1,line l2){

	return -(l1.b - l2.b)/ld(l1.a - l2.a);

}

bool useless(line l1,line l2,line l3){
	return inter(l1,l3) < inter(l2,l1);
}

vector<line> CHT;
ll dp[MAXN],h[MAXN],C;
int chtPtr,N;

void add(line l){

	while(CHT.size() >= 2 && useless(CHT[CHT.size()-2],CHT.back(),l) ){
		CHT.pop_back();
	}

	CHT.push_back(l);

}

ll query(ll x){

	if(chtPtr >= CHT.size()) chtPtr = CHT.size() - 1;

	while(chtPtr + 1 < CHT.size() && CHT[chtPtr].get(x) > CHT[chtPtr+1].get(x) ){
		chtPtr++;
	}

	return CHT[chtPtr].get(x);

}

int main(){
    //freopen("FROGJ.INP","r",stdin);
    //freopen("FROGJ.OUT","w",stdout);
	scanf("%d %lld",&N,&C);

	for(int i = 1;i<=N;i++){
		scanf("%lld",&h[i]);
	}

	add(line(-2*h[1], h[1]*h[1] + C ));

	for(int i = 2;i<=N;i++){

		dp[i] = query(h[i]) + h[i]*h[i];
		add(line(-2*h[i], h[i]*h[i] + dp[i] + C ));

	}

	printf("%lld\n",dp[N]);

	return 0;

}


Measured memory_bytes: 10488
using System;
using System.IO;
using System.Text;
using CompLib.Util;

public class Program
{
    private int N;

    public void Solve()
    {
        var sc = new Scanner();
        N = sc.NextInt();

        var ans = new long[N + 1];
        for (int x = 1; Calc(x, 1, 1) <= N; x++)
        {
            for (int y = 1; Calc(x, y, 1) <= N; y++)
            {
                for (int z = 1; Calc(x, y, z) <= N; z++)
                {
                    ans[Calc(x, y, z)]++;
                }
            }
        }

        var sb = new StringBuilder();
        for (int i = 1; i <= N; i++)
        {
            sb.AppendLine(ans[i].ToString());
        }

        Console.Write(sb);
    }

    long Calc(long x, long y, long z)
    {
        return x * x + y * y + z * z + x * y + y * z + z * x;
    }

    public static void Main(string[] args) => new Program().Solve();
}

namespace CompLib.Util
{
    using System;
    using System.Linq;

    class Scanner
    {
        private string[] _line;
        private int _index;
        private const char Separator = ' ';

        public Scanner()
        {
            _line = new string[0];
            _index = 0;
        }

        public string Next()
        {
            while (_index >= _line.Length)
            {
                _line = Console.ReadLine().Split(Separator);
                _index = 0;
            }

            return _line[_index++];
        }

        public int NextInt() => int.Parse(Next());
        public long NextLong() => long.Parse(Next());
        public double NextDouble() => double.Parse(Next());
        public decimal NextDecimal() => decimal.Parse(Next());
        public char NextChar() => Next()[0];
        public char[] NextCharArray() => Next().ToCharArray();

        public string[] Array()
        {
            _line = Console.ReadLine().Split(Separator);
            _index = _line.Length;
            return _line;
        }

        public int[] IntArray() => Array().Select(int.Parse).ToArray();
        public long[] LongArray() => Array().Select(long.Parse).ToArray();
        public double[] DoubleArray() => Array().Select(double.Parse).ToArray();
        public decimal[] DecimalArray() => Array().Select(decimal.Parse).ToArray();
    }
}

Measured memory_bytes: 27624
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
//#include <regex>

/* g++ -g -std=c++0x */
/* g++ -g -std=c++11 */

using namespace std;

// std::ios::sync_with_stdio(false);

// freopen("input.txt", "rt", stdin);
// freopen("output.txt", "wt", stdout);

#define ALL(c)          (c).begin(), (c).end()
#define ALLR(c)         (c).rbegin(), (c).rend()
#define FOR(i,a,b)      for (int i=(a); i < (b); ++i)
#define FORR(i,a,b)     for (int i=(a); i > (b); --i)
#define FOR_ALL(i,c)    for (__typeof((c).begin()) i=(c).begin();   \
                             i != (c).end(); ++i)
#define FOR_ALLR(i,c)   for (__typeof((c).rbegin()) i=(c).rbegin(); \
                             i != (c).rend(); ++i)
#define SZ(array)       (sizeof(array)/sizeof(array[0]))
#define lc(x)           (x<<1)     /* 2*x */
#define rc(x)           (x<<1 | 1) /* 2*x+1 */
#define lowbit(x)       (x & (-x)) /* 0b10100 -> 0b100 */

typedef long long       LL;
typedef map<int,int>    MII;
typedef pair<int,int>   PII;
typedef set<int>        SI;
typedef vector<bool>    VB;
typedef vector<double>  VD;
typedef vector<int>     VI;
typedef vector<string>  VS;

/* check if a key is in container C */
template <class C>
inline bool in_(const typename C::key_type& k, const C& A)
{ return A.find(k) != A.end(); }
inline bool in_(const string& s, const string& S)
{ return S.find(s) != string::npos; }

const int maxn = 55;
LL dp[maxn][2];
int N,P,A[maxn];

LL dfs(const int i, const int j)
{
    if (i == N)
        return j == P;
    LL& ans = dp[i][j];
    if (ans == -1) {
        ans = 0;
        const LL a = dfs(i+1,j);
        const LL b = dfs(i+1,(j+A[i])%2);
        ans = a+b;
    }
    return ans;
}

int main()
{
/* #ifndef ONLINE_JUDGE */
/*     freopen("foo", "rt", stdin); */
/* #endif */
    while (cin >> N >> P) {
        FOR(i,0,N)
            cin >> A[i];
        memset(dp,-1,sizeof(dp));
        LL ans = 0;
        FOR(i,0,N) {
            const LL res = dfs(i+1,A[i]%2);
            ans += res;
        }
        if (0 == P)
            ans++;
        cout << ans << endl;
    }
    return 0;
}


Measured memory_bytes: 256
#include<cctype>
#include<cstdio>
#include<cstring>

#define	rep(i,n)	for(int i=0;i<(n);i++)

using namespace std;

void GENOME(int &,int &);

int p,len;
char s[101],s2[1000001];

void MOLECULE(int &idx,int &idx2){
	if(p<idx2)	return;
	s2[idx2++]=s[idx++];
}

int NUMBER(int &idx){
	int num=0;
	while(idx<len && isdigit(s[idx]))	num=num*10+(s[idx++]-'0');
	return num;
}

void UNIT(int &idx,int &idx2){
	if(isalpha(s[idx]))	MOLECULE(idx,idx2);
	else{
		int num=NUMBER(idx);
		int bef,aft;
		if(s[idx]!='('){
			bef=idx2;
			MOLECULE(idx,idx2);
			aft=idx2;
		}
		else{
			idx++;
			bef=idx2;
			GENOME(idx,idx2);
			aft=idx2;
			idx++;
		}
		int dif=aft-bef;
		rep(i,num-1)rep(j,dif){
			if(p<idx2)	return;
			s2[idx2++]=s2[bef+j];
		}
	}
}

void GENOME(int &idx,int &idx2){
	while(idx<len && isalnum(s[idx])){
		if(p<idx2)	return;
		UNIT(idx,idx2);
	}
}

int main(){
	while(scanf("%s%d",s,&p),strcmp(s,"0")||p){
		len=strlen(s);
		int idx=0,idx2=0;
		GENOME(idx,idx2);
		printf("%c\n",p<idx2?s2[p]:'0');
	}
	return 0;
}

Measured memory_bytes: 1752
#include<bits/stdc++.h>
#pragma GCC optimize(3,"Ofast","inline")
using namespace std;
int n,m,ans,low[53],cnt,id[53];
vector<int>g[53];
void dfs(int x,int p){
	id[x]=low[x]=++cnt;
	for(int i=0;i<g[x].size();i++){
		int to=g[x][i];
		if(to==p)continue;
		if(id[to])low[x]=min(low[x],id[to]);
		else dfs(to,x),low[x]=min(low[x],low[to]);
	}
	if(low[x]==id[x]&&p>0)ans++;
}
int main(){
	cin>>n>>m;
	for(int i=0;i<m;i++){
		int u,v;cin>>u>>v;
		g[u].push_back(v);
		g[v].push_back(u);
	}
	ans=0;
	dfs(1,-1);
	cout<<ans;
}

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

typedef long long ll;
//#define int ll
#define db(x) cout<<#x<<" = "<<x<<"\n";
#define FIN ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define ALL(a) a.begin(),a.end()
#define mset(a,b) memset(a,b,sizeof(a));


main() 
{
	FIN;
	int n,x,t;
	cin>>n>>x>>t;
	int value=x;
	int ans=t;
	while(x<n)
	{
	    ans=ans+t;
	    x=x+value;
	}
	cout<<ans<<endl;
  
}

Measured memory_bytes: 3620
using System;

class AtCoder
{
    static void Main()
    {
        string[] str = Console.ReadLine().Split(' ');
        int Num1 = Int32.Parse(str[0]);
        int Num2 = Int32.Parse(str[1]);
        int GreatNum = Int32.Parse(str[2]);//3つめの数字
        if (Num2-Num1>=2*GreatNum)//num1とnum2の間が離れてる
        {
            for (int i = Num1; i < Num1 + GreatNum; i++)
            {
                Console.WriteLine(i + "\n");
            }
            for (int i = Num2 - GreatNum + 1; i <= Num2; i++)
            {
                Console.WriteLine(i + "\n");
            }
            
        }
        else
        {
            for (int i = Num1; i <= Num2; i++)
            {
                Console.WriteLine(i + "\n");
            }
        }
    }
}

Measured memory_bytes: 11092
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
inline ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
inline ll lcm(ll a, ll b) { return a / gcd(a, b)*b; }
template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; }
template<class T> ostream& operator << (ostream& out,const vector<T>& V){ for(int i = 0; i < V.size(); i++){ out << V[i]; if(i!=V.size()-1) out << " ";} return out; }
template<class T> ostream& operator << (ostream& out,const vector<vector<T> >& Mat){ for(int i = 0; i < Mat.size(); i++) { if(i != 0) out << endl; out << Mat[i];} return out; }
template<class S,class T> ostream& operator << (ostream& out,const map<S,T>& mp){ out << "{ "; for(auto it = mp.begin(); it != mp.end(); it++){ out << it->first << ":" << it->second; if(mp.size()-1 != distance(mp.begin(),it)) out << ", "; } out << " }"; return out; }
template<typename T>vector<T> make_v(size_t a){return vector<T>(a);}
template<typename T,typename... Ts>auto make_v(size_t a,Ts... ts){return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));}
template<typename T,typename V> typename enable_if<is_class<T>::value==0>::type fill_v(T &t,const V &v){t=v;}
template<typename T,typename V> typename enable_if<is_class<T>::value!=0>::type fill_v(T &t,const V &v){for(auto &e:t) fill_v(e,v);}
/*
 <url:https://atcoder.jp/contests/abc159/tasks/abc159_a>
 問題文============================================================
 A - The Number of Even Pairs
 =================================================================
 解説=============================================================
 同じ色のボールを2つ選べばよい


 ================================================================
 */

template<class Type>
Type solve(Type res = Type()){
    ll N,M; cin >> N >> M;
    res = N*(N-1)/2 + M*(M-1)/2;
    return res;
}
int main(void) {
    cin.tie(0); ios_base::sync_with_stdio(false);
    // solve(0);
    cout << fixed << setprecision(15) << solve<ll>() << endl;
    return 0;
}


Measured memory_bytes: 256
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = 1; i < (int)(n); i++) 
#define dunk(n) cout << n << endl
#define all(a) (a).begin(),(a).end()
typedef pair<int,int> P;
typedef long long ll;

int main() {
    int x;
    cin >> x;
    int a = 400,i = 8;
    while(true){
        if(x < a+200){
            dunk(i);
            return 0;
        }
        else{
            i--;
            a += 200;
        }
    }
    return 0;
}

Measured memory_bytes: 3632
#include <cmath>
#include <iostream>
#include <vector>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <stack>
#include <tuple>
#include <bitset>
#include <algorithm>
#include <functional>
#include <utility>
#include <iomanip>
#define typeof(x) __typeof__(x)
#define int long long int
#define mod(x) ((x % MOD) + MOD) % MOD
#define rep(i,a,b) for(int i=(a);i<(b);++i)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);--i)

#define ALL(c) (c).begin(),(c).end()
#define RALL(c) (c).rbegin(),(c).rend()
#define SZ(c) (int)((c).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define SORT(c) sort(ALL(c))
#define RSORT(c) sort(RALL(c))
#define LB(c,x) (int)(lower_bound(ALL(c),x)-(c).begin())
#define UB(c,x) (int)(upper_bound(ALL(c),x)-(c).begin())
#define COUNT(c,x) UB(c,x)-LB(c,x)
#define UNIQUE(c) SORT(c); (c).erase(unique(ALL(c)),(c).end());
#define COPY(c1,c2) copy(ALL(c1),(c2).begin())
#define PB push_back
#define MP make_pair
#define vec vector

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl;

using namespace std;

typedef pair<int,int> P;
struct edge {
  int to, cost;
};

const int INF = 1e18;
const int MOD = 1e9+7;

template<typename T> ostream& operator << (ostream& s, const vector<T>& v) {
  int len = v.size();
  s << "[";
  for (int i = 0; i < len; i++) {
    s << v[i]; if (i < len - 1) s << " ";
  }
  s << "]";
  return s;
}


signed main()
{
  int x, y; cin >> x >> y;
  if (abs(x-y) <= 1) {
    cout << "Brown" << endl;
  } else {
    cout << "Alice" << endl;
  }
  return 0;
}


Measured memory_bytes: 256
#include<iostream>
using namespace std;
int main(){

  long long N;
  cin>>N;
  long long i;
  long long A[N];
  long long Anum[100001]={};
  long long sum=0;
  for(i=0;i<=N-1;i++){
  
    cin>>A[i];
    Anum[A[i]]++;
  }
  long long Q;
  cin>>Q;
  long long B[Q];
  long long C[Q];
  for(i=0;i<=Q-1;i++){
  
    cin>>B[i]>>C[i];
  }
  for(i=0;i<=100000;i++){
  
    sum+=Anum[i]*i;
  }
  for(i=0;i<=Q-1;i++){
        
    sum+=C[i]*Anum[B[i]];
    sum-=B[i]*Anum[B[i]];
    Anum[C[i]]+=Anum[B[i]];
    Anum[B[i]]-=Anum[B[i]];
    cout<<sum<<endl;
  }

}

Measured memory_bytes: 6668
import bisect
import collections
import copy
import functools
import heapq
import math
import sys
from collections import deque
from collections import defaultdict
input = sys.stdin.readline
sys.setrecursionlimit(10**9)
MOD = 10**9+7
 
N = int(input())
A = list(map(int,input().split()))
 
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i ==0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])
 
    if temp != 1:
        arr.append([temp, 1])
 
    if arr == []:
        arr.append([n, 1])
 
    return arr
 
def euclid(a, b):
    if b == 0:
        return a
    else:
        return euclid(b, a%b)
 
def multiple(a, b):
    return a*b // euclid(a, b)
 
def gcd(nums):
    return functools.reduce(euclid, nums)
 
if gcd(A) != 1:
    print("not coprime")
 
else:
    """
    flag = 0
    M = [False]*(10**6+1)
    for i in range(N):
        n = A[i]
        if M[n]:
            flag = 1
            break
        if n != 1:
            k = 1
            while n*k <= 10**6:
                M[n*k] = True
                k += 1
    """
    flag = 0
    M = [False]*(10**6+1)
    for i in range(N):
        n = A[i]
        if n == 1:
            continue
        l = factorization(n)
        for j in range(len(l)):
            p = l[j][0]
            if M[p]:
                flag = 1
                break
            M[p] = True
        else:
            continue
        break
    if flag == 0:
        print("pairwise coprime")
    else:
        print("setwise coprime")

Measured memory_bytes: 193252
#include <bits/stdc++.h>
typedef unsigned long long ull;
typedef long long ll;
#define __TRUE "Yes"
#define __FALSE "No"
#define __C cout << (x) << endl
#define __cTRUE cout << __TRUE << endl
#define __cFALSE cout << __FALSE << endl
#define MAX 100001
using namespace std;

int main() {
  int a,b,c;
  cin >> a >> b >> c;
  if(a+b>=c) __cTRUE;
  else __cFALSE;
}

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

using namespace std;

int main(){
	int n; 
	string s;
	cin >> n >> s;
	int x = 0;
	int max_x = 0;
	for(int i=0;i<n;++i){
		if(s[i]=='I')x++;
		else x--;
		max_x = max(max_x,x);
		
	}

	cout << max_x << endl;

	return 0;
}

Measured memory_bytes: 256
#include <stdio.h>

int main()
{
  int num;
  int dig;
  int con = 0;

  scanf("%d", &num);

  while(num){
    dig = num % 10;
    if(dig == 7){
      con += 1;
    }
    num = num / 10;
  }

  if(con == 0){
    printf("No\n");
  }else{
    printf("Yes\n");
  }

  return 0;
}

Measured memory_bytes: 1620
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, S):
    c = Counter(S)
    m = -1
    ans = []
    for s, n in c.most_common(n=N):
        if m == -1:
            m = n
            ans.append(s)
        else:
            if n == m:
                ans.append(s)
            else:
                break
    return '\n'.join(sorted(ans))


def main():
    N = read_int()
    S = [read_str() for _ in range(N)]
    print(slv(N, S))


if __name__ == '__main__':
    main()


Measured memory_bytes: 47072
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
using namespace std;

typedef istringstream ISS;
typedef ostringstream OSS;
typedef vector<string> VS;
typedef long long INT;
typedef vector<INT> VI;
typedef vector<VI> VVI;
typedef pair <INT, INT> II;
typedef vector <II> VII;
template<class T> T gcd( T a, T b ) {
    return !b ? a : gcd( b, a % b );
}
template<class T> T lcm( T a, T b ) {
    return a / gcd( a, b ) * b;
}
template<class T> ostream& operator << ( ostream& os, vector<T> v ) {
    for ( typename vector<T>::iterator it_i = v.begin(); it_i != v.end(); ++it_i ) {
        os << *it_i << ", ";
    }
    return os;
}



typedef long long LL;

LL CalcScore( VI A ) {
    for ( int i = 0; i + 2 < 6; ++ i ) {
        for ( int j = i + 1; j + 1 < 6; ++ j ) {
            for ( int k = j + 1; k < 6; ++ k ) {
                // cout << "A: " << A[i] << ", " << A[j] << ", " << A[k] << endl;
                if ( A[i] >= A[j] + A[k] ) continue;
                VI T;
                for ( int t = 0; t < 6; ++ t ) {
                    if ( t == i || t == j || t == k ) continue;
                    T.push_back( A[t] );
                }
                if ( T[0] >= T[1] + T[2] ) continue;
                // cout << "B: " << T[0] << ", " << T[1] << ", " << T[2] << endl;
                return accumulate( A.begin(), A.end(), 0LL );
            }
        }
    }
    return -1;
}

LL solve( int n, VI A ) {
    LL res = 0;
    sort( A.rbegin(), A.rend() );
    // cout << "A: " << A << endl;
    // .
    for ( int i = 0; i + 5 < n; ++ i ) {
        for ( int j = i + 3; j + 2 < n; ++ j ) {
            // cout << A[i] << ", " << A[i+1] << ", " << A[i+2] << " - ";
            // cout << A[j] << ", " << A[j+1] << ", " << A[j+2] << endl;
            if ( A[i] >= A[i+1] + A[i+2] ) continue;
            if ( A[j] >= A[j+1] + A[j+2] ) continue;
            // cout << "test" << endl;
            LL sumLeft = accumulate( A.begin() + i, A.begin() + i + 3, 0LL );
            LL sumRight = accumulate( A.begin() + j, A.begin() + j + 3, 0LL );
            res = max( res, sumLeft + sumRight );
            goto out_1;
        }
    }
 out_1:;
    // ..
    for ( int i = 0; i + 5 < n; ++ i ) {
        VI sub( A.begin() + i, A.begin() + i + 6 );
        LL ret = CalcScore( sub );
        if ( ret == -1 ) continue;
        res = max( res, CalcScore( sub ) );
        break;
    }
    return res;
}

int main() {
    int n;
    while ( cin >> n ) {
        VI A(n);
        for ( int i = 0; i < n; ++ i ) {
            cin >> A[i];
        }
        cout << solve( n, A ) << endl;
    }
    return 0;
}

Measured memory_bytes: 2436
#include<queue>
#include<stack>
#include<math.h>
#include<cmath>
#include<bitset>
#include<stdio.h>
#include<string>
#include<map>
#include<algorithm>
#include<vector>
#include<iostream>
#include<utility>
#include<functional>
#include<deque>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int main(){
  int i,j,n,a[200010];
  vector<int> x(1000010,0);
  cin >> n;
  for(i=0;i<n;i++){
    cin >> a[i];
    x[a[i]]++;
  }
  int ans=0;
  for(i=0;i<n;i++){
    int k=0;
    for(j=1;j*j<=a[i];j++){
      if(a[i]%j==0){
        if(j!=a[i] && x[j]>0){
          k=1;
        }
        if((a[i]/j)==a[i]){
          if(x[a[i]/j]>1){
            k=1;
          }
        }
        else{
          if(x[a[i]/j]>0){
            k=1;
          }
        }
      }
    }
    if(k==1){
      ans--;
    }
    ans++;
  }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 8008
N = int(input())
inList = list(map(int, input().split(" ")))
 
evenList = list([])
 
for item in inList:
  if item % 2 == 0:
    evenList.append(item)

jdgList = list([])
 
for evenItem in evenList:
  if ((evenItem % 3) == 0) or ((evenItem % 5) == 0):
    jdgList.append(evenItem)

if len(jdgList) == len(evenList):
  print("APPROVED")
else:
  print("DENIED")

Measured memory_bytes: 3064
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    ans = []
    n = int(input().rstrip('\n'))
    for i in range(2, 10 ** 10):
        b = True
        for j in range(2, int(i ** 0.5) + 1):
            if i % j == 0:
                b = False
                break
        if b and i % 5 == 1:
            ans.append(i)
            if len(ans) == n:
                print(*ans)
                exit()


if __name__ == '__main__':
    solve()


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

int main() {
  int n;
  cin >> n;
  vector<int> a(100000);
  for (int i = 0; i < n; i ++) {
    int tmp; cin >> tmp;
    a.at(tmp) ++;
  }

  int ans = 0;
  for (int i = 2; i < 100000; i ++) {
    int sum_tmp = a.at(i) + a.at(i - 1) + a.at(i - 2);
    ans = max(ans, sum_tmp);
  }

  cout << ans << endl;
}


Measured memory_bytes: 640
#include<iostream>
#include<cmath>
#include<vector>
#define N 50030

using namespace std;

int main(){
  int i, j, n, isFound, count;
  vector<int> data;

  data.push_back(2);
  data.push_back(3);
  for(i=5; i<=N; i+=2){
    for(j=1, isFound=0; data[j]<=sqrt(i); ++j){
      if(i%data[j] == 0){
	isFound = 1;
	break;
      }
    }
    if(isFound == 0) data.push_back(i);
  }

  while(cin >> n){
    for(i=0; i<data.size(); ++i){
      if(n < data[i]) break;
    }

    if(n == data[i-1])
      cout << data[i-2] << " " << data[i] << endl;
    else
      cout << data[i-1] << " " << data[i] << endl;
  }

  return 0;
}

Measured memory_bytes: 0
#import sys
#input = sys.stdin.readline

n=int(input())
ab=[[int(i) for i in input().split()] for j in range(n)]
ab=sorted(ab,key=lambda x:x[1])

w=0
t=0
ans='Yes'
for a,b in ab:
    w+=a
    if b<w:
        ans='No'
    
print(ans)

Measured memory_bytes: 42712
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int n;
  cin>>n;
  string a,b,c;
  cin >>a>>b>>c;
  int count=0;
  for(int i=0;i<n;i++){
    int kazu=0;
    if(a[i]==b[i]&&a[i]==c[i]){
    }else if(a[i]!=b[i]&&a[i]==c[i]){
      count++;
    }else if(a[i]!=b[i]&&a[i]!=c[i]){
      if(b[i]==c[i]){
        count++;
      }else{
        count+=2;
      }
    }else if(a[i]==b[i]&&a[i]!=c[i]){
      count++;
    }
  }
  cout<<count<<endl;
  return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define putchar putchar_unlocked
#define pb push_back
#define mp make_pair
#define Would
#define you
#define please

const int cm = 1 << 17;
char cn[cm], *ci = cn + cm, ct;
inline char getcha() {
	if (ci - cn == cm) { fread(cn, 1, cm, stdin); ci = cn; }
	return *ci++;
}
inline int getint() {
	int A = 0;
	if (ci - cn + 16 > cm) while ((ct = getcha()) >= '0') A = A * 10 + ct - '0';
	else while ((ct = *ci++) >= '0') A = A * 10 + ct - '0';
	return A;
}
inline void putint(int X) {
	int keta = 0;
	char C[10];
	while (X) {
		*(C + keta) = '0' + X % 10;
		X /= 10;
		keta++;
	}
	for (int i = keta - 1; i >= 0; i--) putchar(*(C + i));
	putchar(' ');
}

typedef tuple<int, int, int, int, int, int> TP;
const int K = 18;
const int KM = 1 << (K - 1);
pair<int, int> dat1[1 << K], dat2[1 << K];

pair<int, int> check1(int L, int R, int A, int l, int r) {
	if (L <= l && r <= R) return dat1[A];
	if (r <= L || R <= l) return mp(1e9, 0);
	return min(check1(L, R, A * 2, l, (l + r) / 2), check1(L, R, A * 2 + 1, (l + r) / 2, r));
}

inline pair<int, int> query1(int L, int R) {
	return check1(L, R, 1, 0, KM);
}

pair<int, int> check2(int L, int R, int A, int l, int r) {
	if (L <= l && r <= R) return dat2[A];
	if (r <= L || R <= l) return mp(1e9, 0);
	return min(check2(L, R, A * 2, l, (l + r) / 2), check2(L, R, A * 2 + 1, (l + r) / 2, r));
}

inline pair<int, int> query2(int L, int R) {
	return check2(L, R, 1, 0, KM);
}

inline TP keisan(int A, int B) {
	pair<int, int> p1, p2;
	if (A & 1) {
		p1 = query2(A / 2, B / 2);
		p2 = query1(p1.second / 2 + 1, B / 2 + 1);
	}
	else {
		p1 = query1(A / 2, B / 2 + 1);
		p2 = query2(p1.second / 2, B / 2 + 1);
	}
	return make_tuple(p1.first, p2.first, A, p1.second, p2.second, B);
}

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


	int N = getint();
	rep(i, N / 2) {
		int P = getint();
		dat1[i + KM] = mp(P, 2 * i);
		P = getint();
		dat2[i + KM] = mp(P, 2 * i + 1);
	}
	for (int i = KM - 1; i >= 1; i--) {
		dat1[i] = min(dat1[2 * i], dat1[2 * i + 1]);
		dat2[i] = min(dat2[2 * i], dat2[2 * i + 1]);
	}

	priority_queue<TP, vector<TP>, greater<TP>> que;
	que.push(keisan(0, N - 1));

	while (que.size()) {
		auto Q = que.top();
		que.pop();
		putint(get<0>(Q));
		putint(get<1>(Q));
		if (get<2>(Q) != get<3>(Q)) {
			que.push(keisan(get<2>(Q), get<3>(Q) - 1));
		}
		if (get<3>(Q) + 1 != get<4>(Q)) {
			que.push(keisan(get<3>(Q) + 1, get<4>(Q) - 1));
		}
		if (get<4>(Q) != get<5>(Q)) {
			que.push(keisan(get<4>(Q) + 1, get<5>(Q)));
		}
	}

	Would you please return 0;
}

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

int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  cout << setprecision(20);
  
  int a, b, k;
  cin >> a >> b >> k;

  vector<int> nums;
  for (int i = 1; i <= min(a, b); ++i) {
    if (a % i == 0 && b % i == 0) nums.push_back(i);
  }
  reverse(nums.begin(), nums.end());
  cout << nums[k - 1] << endl;
  return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <set>

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

    int K = 1 << N;

    std::multiset<int> s;
    for (int i = 0; i < K; i++) {
        int S;
        std::cin >> S;
        s.insert(S);
    }

    std::vector<int> v;
    {
        auto itr = s.end();
        --itr;
        v.push_back(*itr);
        s.erase(itr);
    }

    int k = 1;
    while (!s.empty()) {
        for (int i = 0; i < k; i++) {
            auto itr = s.lower_bound(v[i]);

            if (itr == s.begin()) {
                std::cout << "No\n";
                return 0;
            }

            --itr;
            v.push_back(*itr);
            s.erase(itr);
        }
        k *= 2;
    }

    std::cout << "Yes\n";
}

Measured memory_bytes: 13820
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n = int(readline())
xyh = [list(map(int, readline().split())) for _ in range(n)]
xyh.sort(key=lambda x: -x[2])
for dx in range(101):
    for dy in range(101):
        check = abs(xyh[0][0] - dx) + abs(xyh[0][1] - dy) + xyh[0][2]
        for x, y, h in xyh[1:]:
            if max(check - abs(x - dx) - abs(y - dy), 0) != h:
                break
        else:
            print(dx, dy, check)
            exit()


Measured memory_bytes: 3064
#include <iostream>
#include <math.h>
using namespace std;
int main(){
    int d,g;
    cin >> d >> g;
    int p[d],c[d];
    for (int i=0; i<d; i++){
        cin >> p[i] >> c[i];
    }
    int ans=10000;
    
    for (int i=0; i< 1<<d; i++){
        int solved=0;
        int score=0;
        int unused=11;
        for (int j=0; j<d; j++){           
            if (i>>j &1){
                solved+=p[j];
                score+=100*(j+1)*p[j]+c[j];
            }
            else {
                unused=j;
            }
        }
        if(score>=g){
            ans=min(ans,solved);
        }
        else {
            if (score+p[unused]*(unused+1)*100>=g){
                solved+=(g-score+(unused+1)*100-1)/((unused+1)*100);
                ans=min(ans,solved);
            }
        }
    }
    cout << ans ;
}




Measured memory_bytes: 256
#include <iostream>
#include <queue>
#define REP(i,n) for(int i=0; i<(int)(n); i++)

using namespace std;

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

int main(){
  int n;
  long long k;

  while(cin >> n >> k, n + k){
    if(n % 2 == 1 || (1ll << (n / 2)) < k){
      cout << "No" << endl << endl;
    }else{
      vector<string> g(n, string(n, ' '));

      k--;
      REP(i, n / 2){
        int j = n / 2 - i - 1;
        char c = ((1ll << j) & k) == 0 ? '.' : 'E';
        char v = ((1ll << j) & k) == 0 ? 'E' : '.';
        g[0][2 * i    ] = c;
        g[0][2 * i + 1] = c;

        g[(n - 1) - (2 * i    )][n - 1] = c;
        g[(n - 1) - (2 * i + 1)][n - 1] = c;

        g[2 * i    ][0] = c;
        g[2 * i + 1][0] = c;

        int left  = 0;
        int right = 0;
        if(j != 0           &&
           (((1ll << (j - 1)) & k) == 0) == (((1ll << j) & k) == 0))
          right = 1;
        if(j != (n / 2) - 1 &&
           (((1ll << (j + 1)) & k) == 0) == (((1ll << j) & k) == 0))
          left = 1;

        if(left + right == 0){
          g[1][2 * i    ] = c;
          g[1][2 * i + 1] = c;
        }else if(left + right == 2){
          g[1][2 * i    ] = v;
          g[1][2 * i + 1] = v;
        }else{
          if(left == 1){
            g[1][2 * i    ] = v;
            g[1][2 * i + 1] = c;
          }else{
            g[1][2 * i    ] = c;
            g[1][2 * i + 1] = v;
          }
        }
      }

      for(int y = 1; y < n - 1; y++){
        for(int x = 1; x < n - 1; x++){
          int cnt[128]; cnt['.'] = cnt['E'] = 0;
          REP(i, 3) cnt[(int)g[y + dy[i]][x + dx[i]]]++;
          if(cnt['.'] == 1) g[y+1][x] = '.';
          if(cnt['E'] == 1) g[y+1][x] = 'E';
        }
      }

      REP(i,n) cout << g[i] << endl;
      cout << endl;
    }
  }

  return 0;
}

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

int main()
{
	int n;
	cin >> n;
	auto e = vector<set<int>>(n + 1);
	int a, b;
	cin >> a >> b;
	e[2].insert(a);
	e[2].insert(b);
	auto gcd = [](int x, int y) -> int {
		int t;
		while((t = x % y) != 0){
			x = y;
			y = t;
		}
		return y;
	};
	int ans = max(a, b);
	for(auto i = 3; i <= n; ++i){
		int c, t;
		cin >> c;
		ans = 0;
		auto& p = e[i - 1];
		auto& s = e[i];
		s.insert(t = gcd(*p.begin(), *p.rbegin()));
		ans = max(ans, t);
		for(auto it = p.begin(); it != p.end(); ++it){
			s.insert(t = gcd(*it, c));
			ans = max(ans, t);
		}
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 13440
#include <cstdio>
#include <vector>
#include <utility>

using namespace std;
using llong = long long;
using prime_factors = vector<pair<llong, llong>>;

#define MAX 1e12
const llong mod = 1000000000 + 7;

prime_factors pf_factory(llong N)
{
  prime_factors res;
  for (llong a = 2; a * a <= N; a++)
  {
    if (N % a != 0)
      continue;
    llong ex = 0;
    while (N % a == 0)
    {
      ++ex;
      N /= a;
    }
    res.push_back({a, ex});
  }
  if (N != 1)
    res.push_back({N, 1});
  return res;
}

int main()
{
  llong N;
  prime_factors primes;

  scanf("%lld", &N);

  primes = pf_factory(N);

  llong ans = 0;
  for (auto p : primes)
  {
    llong i = 1;
    while (p.second > 0)
    {
      if (p.second > i * 2)
      {
        ans++;
        p.second -= i;
        i++;
      }
      else
      {
        p.second = 0;
        ans++;
      }
    }
  }

  printf("%lld", ans);

  return 0;
}

Measured memory_bytes: 3224
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int n;
    cin>>n;
    int64_t a[n];
    for(int x = 0; x < n; x++)
    {
        cin>>a[x];
    }
    int c = 0;
    //sort(a, a+n);
    for(int x = 0; x < n; x++)
    {
        c = c^a[x];
        //cout<<c<<endl;
    }
    if(c == 0)
    {
        cout<<"Yes"<<endl;
    }
    else
    {
        cout<<"No"<<endl;
    }
    return 0;
}


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

int main(){
    int t,h,m,s;
    cin>>t;
    h=(t-t%3600)/3600;
    m=(t-h*3600-(t-h*3600)%60)/60;
    s=t-h*3600-m*60;
    cout<<h<<":"<<m<<":"<<s<<endl;
}


Measured memory_bytes: 3116
#include <bits/stdc++.h>
using namespace std;
#define ALL(obj) (obj).begin(),(obj).end()
#define SORTD(s) sort((s).rbegin(),(s).rend())
#define rep(i,n) for(int i=0;i<(n);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; }
typedef long long ll;
#define PI 3.14159265358979323846264338327950L


int main() {
	ll n,d;
  	cin>>n>>d;
  
  	ll x[n];
  	ll y[n];
  
  	rep(i,n){
    	cin>>x[i]>>y[i];
    }
  
  	int ans=0;
  
 	for(int i=0;i<n;i++){
    	if(sqrt(x[i]*x[i]+y[i]*y[i])<=d){
         ans++; 
        }
    }
cout<<ans<<endl;
    }



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

//type
#define ll long long
typedef pair<int, int> P;
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007    //10^9+7:合同式の法
#define MAXR 100000       //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first      //pairの一つ目の要素
#define S second     //pairの二つ目の要素
#define Z class
// OTHER
// xの二乗を返す (関数テンプレート版)
template <typename T>
T square(T x) { return x * x; }
#define chmax(x, y) (x = max(x, y))
#define chmin(x, y) (x = min(x, y))
// loop
#define rep(i, n) for (int i = 0; i < (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 FORA(i, I) for (const auto &i : I)

// vector
#define ALL(x) x.begin(), x.end()

// output
#define YES() printf("YES\n")
#define NO() printf("NO\n")
#define isYES(x) printf("%s\n", (x) ? "YES" : "NO")
#define Yes() printf("Yes\n")
#define No() printf("No\n")
#define ln cout << '\n'
template <Z A>
void pr(A a)
{
  cout << a;
  ln;
}
template <Z A, Z B>
void pr(A a, B b)
{
  cout << a << ' ';
}

int ans = 0;
bool check = 0;
string s, t;
int N = 3;
vector<int> v(N);
int a, b;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

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

  cout << s[0] << t[1] << u[2];
  return 0;
}

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

using namespace std;
#define int long long
#define all(v) v.begin(), v.end()
#define pii pair <int , int>
#define F first
#define S second
const int N = 1e5 + 5;
int a[N], dp[N][10], sum[N];

int check(int n, int x) {
    while (n % x == 0) n/=x;
    return (n % x == 1);
}
int32_t main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    for (int j = 0; j < 10; j++) dp[1][j] = 1;
    for (int i = 2; i < N; i++) {
        for (int j = 0; j < 10; j++) {
            dp[i][j] += dp[i - 1][j];
            if (j) dp[i][j] += dp[i - 1][j - 1];
            if (j < 9) dp[i][j] += dp[i - 1][j + 1];
            dp[i][j] = min(dp[i][j], N);
        }
    }
    for (int i = 1; i < N; i++) {
        sum[i] += sum[i - 1];
        for (int j = 1; j < 10; j++) sum[i] += dp[i][j];
    }
    int n; cin >> n;
    int t = 1, frst;
    while (sum[t] < n) t++;
    n -= sum[t - 1];
    for (frst = 1; frst < 10; frst++) {
        if (dp[t][frst] >= n) break ;
        n -= dp[t][frst];
    }
    cout << frst;
    for (int i = t - 1; i >= 1; i--) {
        int scnd;
        for (scnd = max(0ll, frst - 1); scnd <= min(9ll, frst + 1); scnd++) {
            if (dp[i][scnd] >= n) break ;
            n -= dp[i][scnd];
        }
        frst = scnd;
        cout << frst;
    }
    cout << "\n";


    return 0;
}


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

typedef long long int ll;
typedef unsigned long long int ull;
#define rep(i,n) for(auto i=0;i<(n);i++)
#define rep1(i,n) for(auto i=1;i<=(n);i++)
#define all(x) (x).begin(),(x).end()

using namespace std;


struct init{ init(){ cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20); }; }aaaaaaa;

struct Node{
    ll a;
    ll b;
    ll v;
    bool operator< (const Node &r) const{
        return v < r.v;
    }
};

int main(){
    ll n;
    cin >> n;
    vector<ll> a(n);
    vector<ll> b(n);
    rep(i, n) cin >> a[i] >> b[i];

    vector<Node> v;
    rep(i, n) v.push_back({a[i], b[i], a[i]+b[i]});
    sort(all(v));
    reverse(all(v));
    
    ll res = 0;
    rep(i, n){
        res += v[i].a;
        i++;
        if(i < n) res -= v[i].b;
    }

    cout << res << endl;

    

    return 0;
}



Measured memory_bytes: 6516
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fst first
#define snd second
#define fore(i,a,b) for(int i=a,to=b;i<to;++i)
using namespace std;

typedef long long ll;

pair<int,int> a[100005];
int n;

int main(){
	scanf("%d",&n);
	fore(i,0,n){
		int x;
		scanf("%d",&x);
		a[i]=mp(x,i);
	}
	sort(a,a+n);
	int r=0;
	fore(i,0,n){
		if(i%2!=a[i].snd%2)r++;
	}
	printf("%d\n",r/2);
	return 0;
}

Measured memory_bytes: 1024
#include "bits/stdc++.h"
#include <math.h>
#include <time.h>
using namespace std;
const long long mod = 1000000007;
#define dump(x)                             \
    if (dbg) {                              \
        cout << #x << " = " << (x) << endl; \
    }
bool dbg = false;
long long gcd(long long a, long long b){
   if (a % b == 0)
   {
       return(b);
   }
   else
   {
       return(gcd(b, a % b));
   }
}
long long lcm(long long a, long long b){
   return (a / gcd(a, b))* b;
}
//---------------------------------------------------------------------------------------------------
/*ここからいじる*/
//---------------------------------------------------------------------------------------------------
int n, m, cnt;
vector<pair<int, int> >abm(100010);
vector<vector<bool> >data(9, vector<bool>(9));
void solve(){
    cout << cnt << endl;
}
int main(){
    cin >> n >> m;
    vector<pair<int, int> >abm(m);
    for(int i = 0; i < m; i++){
        cin >> abm.at(i).second >> abm.at(i).first;//終点でsortしたいため
    }
    sort(abm.begin(), abm.end());
    int memo = 0;
    cnt = 0;
    for(int i = 0; i < m; i++){
        if(abm.at(i).second < memo){
            continue;
        }
        else{
            memo = abm.at(i).first;
            cnt++;
        }
    }
    solve();
    return 0;
}



Measured memory_bytes: 1792