akhauriyash/Code-Regression huggingface dataset:
#include <algorithm>
#include <iostream>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define all(x) (x).begin(), (x).end()
#define dbg(x) cerr << #x << ": " << x << endl
int main() {
  int n;
  cin >> n;
  n++;
  unordered_map<int, int> mp;
  rep(i, n) {
    int k = i;
    for(int j = 2; j <= k; j++) {
      while(k % j == 0) {
        mp[j]++;
        k = k / j;
      }
    }
  }
  int cnt = 0;
  rep(i, n) rep(j, i) rep(k, j) {
    if(i == 1 || j == 1 || k == 1) continue;
    if(mp[i] >= 2 && mp[j] >= 4 && mp[k] >= 4) cnt++;
    if(mp[i] >= 4 && mp[j] >= 2 && mp[k] >= 4) cnt++;
    if(mp[i] >= 4 && mp[j] >= 4 && mp[k] >= 2) cnt++;
  }
  rep(i, n) rep(j, i) {
    if(i == 1 || j == 1) continue;
    if(mp[i] >= 14 && mp[j] >= 4) cnt++;
    if(mp[i] >= 4 && mp[j] >= 14) cnt++;
    if(mp[i] >= 2 && mp[j] >= 24) cnt++;
    if(mp[i] >= 24 && mp[j] >= 2) cnt++;
  }
  rep(i, n) if(i > 1 && mp[i] >= 74) cnt++;
  cout << cnt << endl;
  return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i,i0,n) for(int i=i0;i<n;++i)
#define ll long long
#define ALL(x) (x).begin(),(x).end()
#define INF12 1000000000000 //10^12
#define INF9 1000000000 //10^9
#define MOD 10000007 //10^9+7

ll x,y,z;

int main() {
    cin >> x >> y >> z;


    cout << z << " " << x << " " << y << endl;
    return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	double high[50] = {};
	int i = 0;
	while (cin >> high[i]) {
		i++;
	}
	sort(high, high + i);
	cout << high[i-1] - high[0] << endl;


	return 0;
}

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

#define ll long long
// #define MULTI_TEST

int n, m;
vector<int> p;
vector<vector<int>> to;
vector<int> ans;
vector<int> a;

void path(int par, int r, int d) {
	if(p[r]) return;
	p[r] = 1;
	if(a[r] >= d) {
		a[r] = d;
		ans[r] = par;
	}
	for(int i : to[r]) {
		path(r, i, d+1);
	}
	p[r] = 0;	
}

void solve() {
	p.clear();
	ans.clear();
	to.clear();
	a.clear();
	cin >> n >> m;
	
	p.assign(n+1, 0);
	to.assign(n+1, vector<int>());
	ans.assign(n+1, -1);
	a.assign(n+1, INT_MAX);

	for(int i=0; i<m; i++) {
		int a,b;
		cin >> a >> b;
		to[a].push_back(b);
		to[b].push_back(a);
	}

	/*path(0, 1, 0);
	
	int poss = 1;
	for(int i=2; i<=n; i++) {
		if(ans[i] == -1) {
			poss = 0;
			break;
		}
	}*/

	queue<pair<int,int>> q;
	q.push(make_pair(0, 1));

	while(q.size()) {
		int i = q.front().second;
		int par = q.front().first;
		q.pop();
		if(p[i]) continue;

		p[i] = 1;
		ans[i] = par;

		for(int t : to[i]) {
			q.push(make_pair(i, t));
		}

	}
	
	int poss  = 1;
	for(int i=2; i<=n; i++) {
		if(ans[i] == -1) {
			poss = 0;
			break;
		}
	}
	
	if(poss) {
		cout << "Yes\n";
		for(int i=2; i<=n; i++) {
			cout << ans[i] << "\n";
		}
	} else {
		cout << "No\n";
	}
}



int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	
#ifdef MULTI_TEST
	int t;
	cin >> t;
	while(t--) {
		solve();
		// cout << "\n";
	}
#else
	solve();
// 	cout << "\n";
#endif

	return 0;
}


Measured memory_bytes: 13204
package main

import (
	"fmt"
	"strconv"
)

func main() {
	var (
		a  int64
		b  int
		bs string
	)
	fmt.Scan(&a, &bs)
	bs = bs[:1] + bs[2:]
	b, _ = strconv.Atoi(bs)
	fmt.Println(a * int64(b) / 100)
}


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

bool isstraight(int c[]);

int main(){
    int card[5];

    while(~scanf("%d,%d,%d,%d,%d", &card[0], &card[1], &card[2], &card[3], &card[4])){
        sort(card, card+5);
        int n = 0;
        for(int i=0; i<4; i++){
            for(int j=i+1; j<5; j++){
                if(card[i] == card[j]){
                    n++;
                }
            }
        }

        switch(n){
            case 1:
                cout << "one pair" << endl;
                break;
            case 2:
                cout << "two pair" << endl;
                break;
            case 3:
                cout << "three card" << endl;
                break;
            case 4:
                cout << "full house" << endl;
                break;
            case 6:
                cout << "four card" << endl;
                break;
            case 10:
                cout << "four card" << endl;
                break;
            default:
                if(isstraight(card)){
                    cout << "straight" << endl;
                }else{
                    cout << "null" << endl;
                }
                break;
        }
    }

    return 0;
}

bool isstraight(int c[]){
    for(int i=1; i<9; i++){
        if(c[0]==i && c[1]==i+1 && c[2]==i+2 && c[3]==i+3 && c[4]==i+4){
            return true;
        }
        if(c[0]==1 && c[1]==10 && c[2]==11 && c[3]==12 && c[4]==13){
            return true;
        }
    }
    return false;
}

Measured memory_bytes: 0
//Resting_Prince
#include<bits/stdc++.h>
#define mod 1000000007
#define inf 1e18
#define PI 3.141592653589
#define fi first
#define se second
#define sv(v) sort(all(v));reverse(all(v))
#define all(v) v.begin(),v.end()
#define rep(i,a,b) for(ll i=a;i<=b;i++)
#define repr(i,a,b) for(ll i=a;i>=b;i--)
#define pb push_back
#define mk make_pair
#define en '\n'
#define ios ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> pll;
typedef long double ld;
typedef vector<ll> V;

ll ceil(ll a,ll b)
{
    if(a%b==0)return a/b;
    return (a/b)+1;
}

int main()
{
    ios;
    ll x;
    cin>>x;
    cout<<ceil(x,2);
    return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<vector>
#include<algorithm>
#include<map>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
signed main(){
  ll n,kind;
  P tmp0,tmp1;
  bool can;
  cin >> n;
  ll a[n];
  map<ll,ll> mp;
  for(int i=0;i<n;i++){
    cin >> a[i];
    mp[a[i]]++;
  }
  if(mp.size()>2){
    can=false;
  }else if(mp.size()==2){
    tmp0 = *mp.begin();
    tmp1 = *(++mp.begin());
    if(abs(tmp0.first-tmp1.first)>1){
      can=false;
    }else{
      kind = max(tmp0.first,tmp1.first);
      if(tmp0.first>tmp1.first){
        can = (tmp1.second<kind)&&(2*(kind-tmp1.second)<=tmp0.second);
      }else{
        can = (tmp0.second<kind)&&(2*(kind-tmp0.second)<=tmp1.second);
      }
    }
  }else{
    tmp0 = *mp.begin();
    if(2*tmp0.first<=n||tmp0.first==n-1){
      can=true;
    }else{
      can=false;
    }
  }
  if(can){
    cout <<"Yes\n";
  }else{
    cout <<"No\n";
  }
}


Measured memory_bytes: 7296
#include <iostream>

using namespace std;

int main()
{
    int n,x,val,k=1,el=0;
    cin>>n>>x;
    for(int i=1;i<=n;i++){
        cin>>val;
        el=el+val;
        if(el<=x){
            k++;
        }
    }
    cout<<k;
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
typedef pair<int, int> P;

const ll INF = 1LL << 60;

int N, K;
vector<int> v;
int main() {
    cin >> N >> K;
    v.resize(N);
    rep(i, N) cin >> v[i];

    int ans = 0;
    // l と r　を決める
    for (int l = 0; l <= K; l++) {
    // for (int l = 2; l <= 2; l++) {
        // l + r <= N - 1
        for (int r = 0; l + r <= K; r++) {
            if (l + r > N) continue;
        // for (int r = 1; r <= 1; r++) {
            // 戻せる数 (小さい順に戻す)
            int d = max(0, K - l - r);

            // cout << l << " " << r << " " << d << endl;

            // 範囲を決めて取り出す 
            vector<int> tmp;
            int now = 0;
            // 左から l 個
            for (int j = 0; j < l; j++) {
                tmp.push_back(v[j]);
                now += v[j];
            }
            // cout << l << " " << now << endl;

            // 右から r 個
            for (int j = 0; j < r; j++) {
                tmp.push_back(v[N - 1 - j]);
                now += v[N - 1 - j]; 
            }
            // cout << r << " " << now << endl;
            // cout << l << " " << r << " " << now << endl;

            // 戻す
            sort(tmp.begin(), tmp.end());

            for (int j = 0; j < d; j++) {
                if (j >= tmp.size()) break;
                if (tmp[j] > 0) break;
                now -= tmp[j];
            }
            // cout << l << " " << r << " " << now << endl;
            // rep(i, tmp.size()) {
            //     cout << tmp[i] << " "; 
            // }
            // cout <<endl;

            ans = max(ans, now);
        }
    }

    cout << ans << endl;
}

Measured memory_bytes: 3612
#define _USE_MATH_DEFINES

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <bitset>
using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef tuple<ll, ll, ll> tl3;



const int BIG_NUM = 1e9;
const ll INF = 1000000000000000000;
//const ll MOD = 1e9 + 7;
const ll MOD = 998244353;


int main() {
	string s;
	cin >> s;
	int n = s.length();
	string t(s);

	if (s[n - 1] == 's') {
		t += "es";
		cout << t << endl;
	}
	else {
		t += "s";
		cout << t << endl;
	}
}

Measured memory_bytes: 3560
#include <bits/stdc++.h> 
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
#include<cmath>
#include<string>
#define pb push_back
#define ll long long
#define ull unsigned long long
#define deb(x) cerr<<#x<<" "<<x<<"\n"
#define debi cerr<<"hey sparky\n"
#define x first
#define y second
#define fast ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define eps (double)1e-9
#define all(x) x.begin(),x.end()
#define int long long
using namespace std;
using namespace __gnu_pbds; 
typedef tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> pdbs;
 
void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
//void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}
 
template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif
 
// look for  all edge cases
//search for a pattern




signed main() {    
	ios::sync_with_stdio(0);
	cout.tie(0);
	cin.tie(0);
	
	int n,x,t;
	cin >> n >> x >> t;
	int ans = (n+x-1)/x;
	ans = ans*t;
	cout<<ans<<"\n"; 
	
	 
	return 0;
}


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

#define MAX_LEN_A 200000

using namespace std;

string A;
int N;
int pangram[MAX_LEN_A]; // pangram[i] = min { j | {A[i], A[i+1],..., A[j-1]} includes {a, b,...,z} }
                        // if there does not exist such j, pangram[i] = -1
int first[MAX_LEN_A+1][26]; // first[i][j] == min { k | k >= i, A[k] == c[j] }

void setPangram()
{
    for (int i = 0; i < N; i++) {
        pangram[i] = -1;
    }
    int count[26];
    for (int i = 0; i < 26; i++) {
        count[i] = 0;
    }
    int res = 26;
    for (int i = 0; i < N; i++) {
        count[A[i]-'a']++;
        if (count[A[i]-'a'] == 1) {
            res--;
            if (res == 0) {
                pangram[0] = i + 1;
                break;
            }
        }
    }
    if (res > 0) {
        return;
    }
    for (int i = 1; i < N; i++) {
        count[A[i-1]-'a']--;
        if (count[A[i-1]-'a'] == 0) {
            for (int j = pangram[i-1]; j < N; j++) {
                count[A[j]-'a']++;
                if (A[j] == A[i-1]) {
                    pangram[i] = j + 1;
                    break;
                }
            }
            if (pangram[i] == -1) {
                return;
            }
        } else {
            pangram[i] = pangram[i-1];
        }
    }
}

void setFirst()
{
    for (int i = 0; i <= N; i++) {
        for (int j = 0; j < 26; j++) {
            first[i][j] = N;
        }
    }
    for (int i = 0; i < N; i++) {
        first[i][A[i]-'a'] = i;
    }
    for (int i = N - 2; i >= 0; i--) {
        for (int j = 0; j < 26; j++) {
            first[i][j] = min(first[i][j], first[i+1][j]);
        }
    }
}

int f(int i)
{
    if (i >= N || pangram[i] == -1) {
        return 0;
    } else {
        return 1 + f(pangram[i]);
    }
}

string solve(int index, string s, int M)
{
    if (M == 0) {
        for (int i = 0; i < 26; i++) {
            if (first[index][i] == N) {
                char c = 'a' + i;
                return s + c;
            }
        }
    }
    for (int i = 0; i < 26; i++) {
        if (f(first[index][i]+1) == M - 1) {
            char c = 'a' + i;
            return solve(first[index][i]+1, s + c, M - 1);
        }
    }
    assert(0);
}

int main(void)
{
    cin >> A;
    N = A.size();
    setPangram();
    setFirst();
    string answer;
    int M = f(0) ; // answer.size() == M + 1
    answer = solve(0, "", M);
    cout << answer << endl;
    return 0;
}


Measured memory_bytes: 63748
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    K,A,B = map(int, lines.pop(0).split(' '))
    if A >= B:
        print(K+1)
        sys.exit(0)
    elif B - A <= 2:
        print(K+1)
        sys.exit(0)

    if K < A+1:
        print(K+1)
        sys.exit(0)
    elif K == A+1 and K > B:
        print(K+1)
        sys.exit(0)

    K -= A+1
    res = B

    n = int(K / 2)
    res += n*(B-A)
    K -= 2 * n

    if K == 1:
        res += 1

    print(res)

#
# main
#
lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Measured memory_bytes: 3064
//カタラン数を語らん!w

#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include <random>
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include<fstream>
#include <unordered_map>
#include <cstdlib>
#include <complex>
#include <cctype>
#include <bitset>
using namespace std;
typedef string::const_iterator State;
#define Ma_PI 3.141592653589793
#define eps 1e-5
#define LONG_INF 2000000000000000000LL
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007LL
#define GYAKU 500000004LL
#define MOD 998244353LL
#define seg_size 262144*2
#define REP(a,b) for(long long a = 0;a < b;++a)
int main() {
	int n;
	cin >> n;
	vector<int> hoge;
	REP(i, n) {
		int a;
		cin >> a;
		hoge.push_back(a);
	}
	int ans = 0;
	REP(i, n) {
		for (int q = i + 1; q < n; ++q) {
			ans += hoge[i] * hoge[q];
		}
	}
	cout << ans << endl;
}

Measured memory_bytes: 888
#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <stack>
#include <string>
#include <vector>

#define REP(i, n) for(int i = 0; i < n; ++i)
using namespace std;
using LLONG = long long;
const LLONG MOD = 1000000007;

int main()
{
	string s, t; cin >> s >> t;
	// 部分文字列の該当箇所のうち，なるべく後ろの方にある場所を探す
	int pos = -1;
	for (int i = 0; i + t.length() <= s.length(); ++i)
	{
		bool ok = true;
		for (int j = 0; j < t.length(); ++j)
		{
			if (s[i + j] != '?' && s[i + j] != t[j])
			{
				ok = false;
				break;
			}
		}
		if (ok) pos = i;
	}
	if (pos == -1)
	{
		cout << "UNRESTORABLE" << endl;
	}
	else
	{
		for (int j = 0; j < t.length(); ++j)
		{
			s[pos + j] = t[j];
		}
		for (int i = 0; i < s.length(); ++i)
		{
			if (s[i] == '?') s[i] = 'a';
		}
		cout << s << endl;
	}
}


Measured memory_bytes: 3592
/*
AUTHOR: Aman Raj
LANG: C++
*/

using namespace std;

typedef   long long  int ll;
#include <bits/stdc++.h>


//setbase - cout << setbase (16); cout << 100 << endl; Prints 64
//setfill -   cout << setfill ('x') << setw (5); cout << 77 << endl; prints xxx77
//setprecision - cout << setprecision (14) << f << endl; Prints x.xxxx
//cout.precision(x)  cout<<fixed<<val;  // prints x digits after decimal in val
#define fast  ios_base::sync_with_stdio(false); cin.tie(0);  cout.tie(0);
#define all(a) a.begin(),a.end()
//#define mod 998244353


#define mod   1000000007

#define inf 1e18
//#define mod 3
#define flush fflush(stdout)

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef cc_hash_table<ll, ll, hash< ll > > ht;

// find_by_order()  // order_of_key
typedef tree<
    ll,
    null_type,
    less<ll>,
    rb_tree_tag,
    tree_order_statistics_node_update>
    ordered_set;






ll power1(ll a, ll b)//a raised to power b
   {  if(b<=0) return 1; if(b==1) return a;
       ll c=power1(a,b/2);
        c*=c;c%=mod;if(b%2==1) c*=a;c%=mod;
        return c;
   }
   ll mi(ll a,ll m)
   { ll c= power1(a,m-2);

     return c;
   }



 struct less_then_greater {
    template<typename T, typename U>
    bool operator()(T const& lhs, U const& rhs) const {
        if (lhs.first < rhs.first) return true;
        if (rhs.first < lhs.first) return false;
        return lhs.second > rhs.second;
    }
};

 /*std::priority_queue<std::pair<int, int>,
                    std::vector<std::pair<int, int>>,
                    less_then_greater
                    > pq;*/


  int main()
{  fast;
   ll n;cin>>n;
   ll ans=(power1(10,n) - power1(9,n) - power1(9,n) + power1(8,n) + mod + mod )%mod;
   cout<<ans<<endl;
   return 0;
}


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

namespace Atcoder
{
    class B
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            int N = int.Parse(input[0]);int T = int.Parse(input[1]);
            int minCost = 1001;//1001のままだったら場合帰宅できない
            for (int i = 1; i <= N; i++)
            {
                string[] forInput = Console.ReadLine().Split(' ');
                int ci = int.Parse(forInput[0]);int ti = int.Parse(forInput[1]);

                //時間条件クリア時
                if (ti <= T)
                {
                    //コストがminCostよりも小さければ代入してやる。
                    if (ci < minCost)
                    { 
                        minCost = ci;
                    }
                }
               
            }

            if (minCost != 1001)
            {
                Console.WriteLine(minCost);
            }
            else if (minCost == 1001)
            {
                Console.WriteLine("TLE");
            }

        }


    }
}


Measured memory_bytes: 11092
#include "bits/stdc++.h"

using namespace std;

#define rep(loop, N) for (int loop = 0; loop < N; loop++)

struct Node {
	Node* parent = NULL;
	vector<Node*> child;
	long long value = 0;
};
struct Edge {
	int parent = 0;
	int child = 0;
	bool operator <(const Edge& right) const { return parent < right.parent; }
};
struct Tree {
	vector<Node> node;
	Tree(int, vector<Edge>);
};
Tree::Tree(int nodeNum, vector<Edge> edge) {
	node.resize(nodeNum);
	for (Edge& it : edge) {
		node[it.child].parent = &node[it.parent];
		node[it.parent].child.push_back(&node[it.child]);
	}
}

map<long long, int> factorization(long long N) {
	map<long long, int> re;
	while (true) {
		if (N % 2 == 0) {
			N /= 2;
			re[2]++;
			if (N == 1) break;
		}
		else {
			break;
		}
	}
	for (int loop = 3; (long long)loop * (long long)loop <= N; loop += 2) {
		if (N % loop == 0) {
			N /= loop;
			re[loop]++;
			loop -= 2;
			if (N == 1) break;
		}
	}
	if (N > 1) re[N]++;
	return re;
}
long long gcd(long long num1, long long num2) {
	return num2 == 0 ? num1 : gcd(num2, num1 % num2);
}

struct Memo {
	long long fact = 0;
	long long fact_inv = 0;
	long long inv = 0;
};
class Combination1 {
private:
	long long m_module = 1000000007;
	vector<struct Memo> memo;
public:
	long long calculate(int, int);
	Combination1(int, long long);
};
long long Combination1::calculate(int n, int k) {
	return ((memo[n].fact * memo[k].fact_inv) % m_module * memo[n - k].fact_inv) % m_module;
}
Combination1::Combination1(int memo_max, long long module = 1000000007) {
	m_module = module;
	memo.push_back({ 1,1,0 });
	memo.push_back({ 1,1,1 });
	for (int loop = 2; loop <= memo_max; loop++) {
		struct Memo temp;
		temp.fact = (memo[loop - 1].fact * loop) % m_module;
		temp.inv = m_module - (memo[m_module % loop].inv * int(m_module / loop)) % m_module;
		temp.fact_inv = (memo[loop - 1].fact_inv * temp.inv) % m_module;
		memo.push_back(temp);
	}
}

class Combination2 {
private:
	int size = 0;
	bool add(int);
public:
	vector<int> sequence;
	bool next_combination(void);
	Combination2(int, int);
};
bool Combination2::add(int index) {
	if (index == (int)sequence.size() - 1 && sequence[index] == size - 1
		|| index < (int)sequence.size() - 1 && sequence[index] == sequence[index + 1] - 1) {
		if (index == 0) {
			return false;
		}
		else {
			bool re = add(index - 1);
			sequence[index] = sequence[index - 1] + 1;
			return re;
		}
	}
	else {
		sequence[index]++;
		return true;
	}
}
bool Combination2::next_combination(void) {
	return (sequence.size() == 0) ? false : add(sequence.size() - 1);
}
Combination2::Combination2(int n, int r) {
	size = n;
	for (int loop = 0; loop < r; loop++) sequence.push_back(loop);
	return;
}

void A_We_Love_Golf(void) {

	int K, A, B; cin >> K >> A >> B;

	for (int goal = A; goal <= B; goal++) {
		if (goal % K == 0) {
			cout << "OK" << endl;
			return;
		}
	}
	cout << "NG" << endl;
	return;
}

int main(void) {

	cout << fixed << setprecision(15);
	A_We_Love_Golf();
	return 0;
}


Measured memory_bytes: 3632
#include<bits/stdc++.h>
const int maxn = 1e2 + 5;
using namespace std;

int a[30];
char b[maxn];
bool flag;

int main(){
	scanf("%s", b + 1);
	int len = strlen(b + 1);
	for(int i = 1; i <= len; i++){
		a[b[i] - 'a' + 1]++;
	}
	for(int i = 1 ; i <= 26; i++){
		if(a[i] % 2) flag = 1; 
	}
	if(flag) printf("No\n");
	else printf("Yes\n");
	return 0;
}


Measured memory_bytes: 256
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
  int a, b;
  cin >> a >> b;
  cout << a / b << " ";
  cout << a % b << " ";
  printf("%f\n", a / (double)b); 
  return 0;
}


Measured memory_bytes: 3220
from collections import deque

N = int(input())
*A, = map(int, input().split())
B = deque([])
for i, a in enumerate(A):
    if i % 2 == 0:
        B.append(a)
    else:
        B.appendleft(a)
if N % 2 == 1:
    B = list(reversed(B))
print(*B)

Measured memory_bytes: 25412
#include<bits/stdc++.h>
#define ll long long 
using namespace std;
int main()
{
	ll n,k,ans;
	cin>>n>>k;
	if(n==k) ans=0;
	else if(n>k)
		ans=min(n%k,k-n%k);
	else
		ans=min(n,k-n);
	cout<<ans;
	return 0;
} 

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main()
{
    while(1){
        string s;
        cin>>s;

        if(s[0]-48==0) break;
        int ans=0;
        for(int i=0;i<s.length();i++){
            ans+=(s[i]-48)%10;
        }
        cout<<ans<<endl;
    }
}



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

int calc_sum_bit(int sum)
{
	int res = 0;
	if (sum == 0) return 1;
	while (sum != 0)
	{
		++res;
		sum/= 10;
	}
	return res;
}

int main()
{
	int a, b;

	while(cin >> a >> b)
	{
		int sum = a + b;
		cout << calc_sum_bit(sum) << endl;
	}

	return 0;
}

Measured memory_bytes: 1160
#include <bits/stdc++.h>
using namespace std;
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define REP(i,n) for(ll i=0;i<n;i++)
#define FOR(i,n1,n2) for(ll i=n1;i<n2;i++)
#define bFOR(i,n1,n2) for(ll i=n1;i>=n2;i--)
#define speed_up    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

typedef long long int ll;
typedef pair<ll,ll> Pi;
const int INF=(ll)(1LL<<30)-1;
const double INFd=100000000000.0;
const ll INFl=(ll)9223372036854775807;
const int MAX=10000;
const ll MOD=(ll)1e9+7;
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a, b)*b;}
int dx[4]={0,-1,0,1},dy[4]={-1,0,1,0};
int mdx[4]={0,1,0,-1},mdy[4]={-1,0,1,0};


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

int n,k;
int a[5010];
bool dp[5010];
int main(){
	cin>>n>>k;
	REP(i,n)cin>>a[i];
	sort(a,a+n);
	int ub=-1;
	int lb=n;
	while(lb-ub>1){
		int mid=(ub+lb)/2;
		REP(i,5010)dp[i]=false;
		dp[0]=true;
		for(int i=0;i<n;i++){
			if(mid==i)continue;
			for(int j=k-1;j>=0;j--){
				if(a[i]+j<k&&dp[j]){
					dp[j+a[i]]=true;
					//cout<<" "<<i<<" "<<j<<" "<<j+a[i]<<endl;
				}
			}
		}
		bool judge=0;
		if(a[mid]>=k)judge=1;
		else{
			for(int i=k-a[mid];i<k;i++){
				if(dp[i])judge=1;
			}
		}
		if(judge)lb=mid;
		else ub=mid;
		//cout<<"mid:"<<mid<<endl;
		//REP(i,20)cout<<dp[i]<<endl;
	}
	cout<<ub+1<<endl;
	return 0;
}

Measured memory_bytes: 384
// 
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <stack>
#include <queue>
#include <iomanip>
#include <set>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;

int main()
{
    int N;
    cin >> N;
    vector<int> a(N);
    
    for (int i = 0; i < N; ++i)
    {
        cin >> a[i];
    }
    int num4 = 0, num2 = 0, numother = 0;
    for (int i = 0; i < N; ++i)
    {
        if (a[i] % 4 == 0)
        {
            ++num4;
        }
        else if (a[i] % 2 == 0)
        {
            ++num2;
        }
        else
        {
            ++numother;
        }
    }

    if (/*num4 > 0 &&*/ num4 + 1 - (num2 % 2) - numother >= 0)
    {
        cout << "Yes" << endl;
        return 0;
    }
    else if (num4 == 0 && num2 > 0 && numother == 0)
    {
        cout << "Yes" << endl;
        return 0;
    }
    else
    {
        cout << "No" << endl;
        return 0;
    }
    
    return 0;
}


Measured memory_bytes: 3784
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace Main
{
    public static class Program
    {
        public static List<int> list = new List<int>();
 
        static void Main(string[] arg)
        {
            //int n = int.Parse(Console.ReadLine());
            var a = GetIntList(Console.ReadLine());
            var answer = 0;


            if(a[0]<=5){
                answer = 0;
            }
            else if(a[0] <= 12){
                answer = a[1]/2;
            }
            else{
                answer = a[1];
            }
            


            Console.WriteLine(answer);
            Console.ReadLine();
 
        }
        
        #region libraries
        private static int[] GetIntList(string line)
        {
            return line.Split(' ').Select(x => int.Parse(x)).ToArray();
 
        }
        private static double[] GetDoubleList(string line)
        {
            return line.Split(' ').Select(x => double.Parse(x)).ToArray();
 
        }
        private static ulong[] GetUlongList(string line)
        {
            return line.Split(' ').Select(x => ulong.Parse(x)).ToArray();
        }
        private static long[] GetLongList(string line)
        {
            return line.Split(' ').Select(x => long.Parse(x)).ToArray();
        }
        private static int SearchNearest(this IEnumerable<int> list, int target)
        {
            var min = list.Min(c => Math.Abs(c - target));
            return list.First(c => Math.Abs(c - target) == min);
        }
        public static bool IsOdd(int i)
        {
            return i % 2 == 1 ? true : false;
        }
        public static int Gcd(int a,int b)
        {
            if(a < b)
            {
                Gcd(b, a);
            }
            while (b != 0)
            {
                var rm = a % b;
                a = b;
                b = rm;
            }
            return a;
        }
        #endregion
    }
}


Measured memory_bytes: 13268
#include<bits/stdc++.h>
using namespace std;
int main()
{
   string s;
   cin>>s;
   if(s[0]=='R'&&s[1]=='R'&&s[2]=='R')
   {
       cout<<3<<endl;
   }
   else if(s[0]=='S'&&s[1]=='S'&&s[2]=='S')
   {
       cout<<0<<endl;
   }
   else if(s[0]=='R'&&s[1]=='R'&&s[2]=='S')
   {
       cout<<2<<endl;
   }
   else if(s[0]=='R'&&s[1]=='S'&&s[2]=='R')
   {
       cout<<1<<endl;
   }
   else if(s[0]=='S'&&s[1]=='R'&&s[2]=='S')
   {
       cout<<1<<endl;
   }
  else if(s[0]=='S'&&s[1]=='R'&&s[2]=='R')
   {
       cout<<2<<endl;
   }
   else
   {
       cout<<1<<endl;
   }
    return 0;
}


Measured memory_bytes: 3584
#define _LIBCPP_DEBUG 0
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
ll MOD = 1e9 + 7;

int main(void) {

    string S; cin>>S;
    if(regex_match(S, regex("(dream|dreamer|erase|eraser)*"))){
        cout<<"YES"<<endl;
    }else{
        cout<<"NO"<<endl;
    }

    return 0;
}


Measured memory_bytes: 39808
#include<cstdio>
#include<math.h>
#include<algorithm>
#include<vector>
#include<queue>
#include<string>
#include<set>
#include<cstring>
#include<map>
 
 
using namespace std;
#define int long long int
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1001001001
#define LLINF 1001001001001001001
#define mp make_pair
#define pb push_back
#define mod 1000000007
//#define mod 998244353

int N,Q;
int c[500005];
int mr[500005];//一番右にある色iの玉の添字
int ans[500005];
vector< pair<pair<int,int>,int> > query;
// 自作のソート関数
bool sort_by_right(pair<pair<int,int>,int> a, pair<pair<int,int>,int> b){
    return a.first.second < b.first.second;
}
bool sort_by_number(pair<pair<int,int>,int> a, pair<pair<int,int>,int> b){
    return a.second < b.second;
}
//BIT(Fenwick) TREE(1-indexed)
struct BITtree{
    int N;
    int *bit;
    BITtree(int n){
        N=n;
        bit=new int[N+1];
        rep(i,N+1){
            bit[i]=0;
        }
    }
    int sum(int i){//a_0,a_1,...a_iを計算する
        int s=0;
        while(i>0){
            s+=bit[i];
            i-=i & -i;
        }
        return s;
    }
    void add(int i,int x){//a_i+=xとする
        while(i<=N){
            bit[i]+=x;
            i+=i& -i;
        }
    }
    void free(){
        delete[] bit;
    }
};
signed main(){
    scanf("%lld %lld",&N,&Q);
    rep(i,N){
        scanf("%lld",&c[i]);c[i]--;
    }
    rep(i,Q){
        int l,r;
        scanf("%lld %lld",&l,&r);l--;r--;
        query.pb(mp(mp(l,r),i));
    }
    rep(i,N){
        mr[i]=-1;//まだ色[i]の玉が出現してない
    }
    sort(query.begin(),query.end(),sort_by_right);
    BITtree bit_tree(N);//同じ色の中で一番右にある玉が何個あるかを保存する
    int itr=-1;//どこまで「同じ色の中で一番右にある玉」を調べたか
    rep(i,Q){//クエリを全部調べる
        int l=query[i].first.first;
        int r=query[i].first.second;
        int q=query[i].second;
        //printf("%lld %lld/",r,itr);
        while(itr<r){//クエリのrまで調べる
            itr+=1;
            if(mr[c[itr]]==-1){//まだ色がない
                bit_tree.add(itr+1,1);
            }else{
                bit_tree.add(mr[c[itr]]+1,-1);
                bit_tree.add(itr+1,1);
            }
            mr[c[itr]]=itr;//色の位置更新
        }
        ans[q]=bit_tree.sum(r+1)-bit_tree.sum(l-1+1);
    }
    rep(i,Q){
        printf("%lld\n",ans[i]);
    }
    return 0;
}

Measured memory_bytes: 31100
#include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <cmath>
#include <vector>

typedef long long ll;

using namespace std;

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

    vector<ll> vcount;
    for (ll i=0; i<s.size(); i++)
    {
        ll count(0);
        while ('A' == s[i] || 'C' == s[i] || 'G' == s[i] || 'T' == s[i])
        {
            count++;
            i++;
        }
        vcount.push_back(count);
    }

    sort(vcount.begin(), vcount.end(), greater<ll>());

    cout << vcount[0] << endl;

    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace  std;
typedef long long int ll;
typedef long double ld;
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define pb push_back
#define mp make_pair
#define sz(a) a.size()
#define fi first
#define se second
#define rsz(a,n) a.resize(n)
#define test(t) ll t;cin>>t;while(t--)
#define forn(i,e) for(int i = 0; i < e; i++)
#define forsn(i,s,e) for(int i = s; i < e; i++)
#define rforn(i,s) for(int i = s; i >= 0; i--)
#define rforsn(i,s,e) for(int i = s; i >= e; i--)
#define fillv(a,k) memset(a,k,sizeof(a))
#define filla(a,k,n) memset(a,k,sizeof(a[0])*n)
#define leadzero(a) __builtin_clz(a) //count leading zeros
#define trailzero(a) __builtin_ctz(a) //count trailing zeros
#define bitcount(a) __builtin_popcount(a) // count set bits (add ll)
#define ln cout<<"\n"
#define sp cout<<" "
#define spaceprint(a,i,s,n) {forsn(i,s,n) { cout<<a[i]; sp;}}
#define lineprint(a,i,s,n) {forsn(i,s,n) {cout<<a[i]; ln;}}
#define maxe(a) *max_element(a.begin(),a.end())
#define maxi(a) max_element(a.begin(),a.end())-a.begin()
#define mine(a) *min_element(a.begin(),a.end())
#define mini(a) min_element(a.begin(),a.end())-a.begin()
#define all(c) c.begin(),c.end()
#define trav(container, it) for(typeof(container.begin()) it = container.begin(); it != container.end(); it++)
#define present(container, element) (container.find(element) != container.end())
#define cpresent(container, element)  (find(all(container),element) != container.end())// check the presence of element
//copy(from_begin, from_end, to_begin); copy function
typedef unsigned long long int ull;
typedef long double ld;
typedef pair<ll,ll> p64;
typedef pair<int,int> p32;
typedef pair<int,p32> p96;
typedef vector<ll> v64;
typedef vector<string> vs;
typedef vector<int> v32;
typedef vector<v32> vv32;
typedef vector<v64> vv64;
typedef vector<p32> vp32;
typedef vector<vp32> vvp32;
typedef map<int,int> m32;
const int LIM = 1e5+5, MOD = 1e9+7;
#define sumv(v) accumulate(all(v),ll(0))
#define productv(v) accumulate(all(v), ll(1), multiplies< ll >())
ll k,n,dp[10005][105][2],d;
char s[10005];
void solve(ll k,ll sum,ll t)
{
    if(dp[k][sum][t]!=-1)
        return;
    if(k==n)
    {
        if(sum==0)
        {
            dp[k][sum][t]=1;
        }
        else
        {
            dp[k][sum][t]=0;
        }
        return;
    }
    dp[k][sum][t]=0;
    if(t==0)
    {
        for(ll j=0;j<=s[k]-'0';j++)
        {
            if(j==s[k]-'0')
            {
                solve(k+1,(sum+j)%d,0);
                dp[k][sum][t]=(dp[k][sum][t]+dp[k+1][(sum+j)%d][0])%MOD;
            }
            else
            {
                solve(k+1,(sum+j)%d,1);
                dp[k][sum][t]=(dp[k][sum][t]+dp[k+1][(sum+j)%d][1])%MOD;
            }
        }
    }
    else
    {
        for(ll j=0;j<=9;j++)
        {
                solve(k+1,(sum+j)%d,1);
                dp[k][sum][t]=(dp[k][sum][t]+dp[k+1][(sum+j)%d][1])%MOD;
        }
    }
    return;
}
int main()
{
    cin>>s;
    n=strlen(s);
    cin>>d;
    memset(dp,-1,sizeof(dp));
    solve(0,0,0);
    cout<<(dp[0][0][0]-1+MOD)%MOD;

}


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

int main() {

  int A,P;
    cin >> A >> P;
    
    if (A == 0 && P <= 1) {
        cout << 0 << endl;
    }
    
    else { cout << ((A * 3) + P) / 2 << endl;
         }

}


Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using static System.Console;
using static System.Math;

namespace AtCodeeeer
{
    class AtCOOOOOOOOOOOder
    {
        static void Main(string[] args)
        {
            string s = ReadLine();
            if (s == "Sunny")
            {
                WriteLine("Cloudy");
            }
            else if (s == "Cloudy")
            {
                WriteLine("Rainy");
            }
            else
            {
                WriteLine("Sunny");
            }
        }
    }
}



Measured memory_bytes: 13140
# include <bits/stdc++.h>
# define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
# define reps(i, n) for(int i=1, i##_len=(n); i<=i##_len; ++i)
# define rrep(i, n) for(int i=((int)(n)-1); i>=0; --i)
# define rreps(i, n) for(int i=((int)(n)); i>0; --i)
# define ALL(x) (x).begin(), (x).end()
# define SZ(x) ((int)(x).size())
# define pb push_back
# define optimize_cin() cin.tie(0); ios::sync_with_stdio(false)
using namespace std;
using ll = long long;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const long long INF = 1LL << 60;

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

uintmax_t combination(unsigned int n, unsigned int r) {
  if ( r * 2 > n ) r = n - r;
  uintmax_t dividend = 1;
  uintmax_t divisor  = 1;
  for ( unsigned int i = 1; i <= r; ++i ) {
    dividend *= (n-i+1);
    divisor  *= i;
  }
  return dividend / divisor;
}

int modPow(long long a, long long n, long long p) {
  if (n == 1) return a % p;
  if (n % 2 == 1) return (a * modPow(a, n - 1, p)) % p;
  long long t = modPow(a, n / 2, p);
  return (t * t) % p;
}

ll lcm(ll a, ll b)
{
   return a / gcd(a, b) * b;
}

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

    sort(ALL(a));

    vector<ll> cnt(1,1);
    vector<ll> num(1,a[0]);
    ll x = 0;
    rep(i,n-1){
        if(a[i] == a[i+1]){
            cnt[x]++;
        }
        else{
            x++;
            cnt.push_back(1);
            num.push_back(a[i+1]);
        }
    }

    ll size = cnt.size();

    vector<pair<ll,ll>> vec(size);
    rep(i,size){
        vec[i].first = num[i];
    }

    ll ans = 0;
    rep(i,size){
        if(num[i] > cnt[i]) ans+=cnt[i];
        else ans+=(cnt[i] - num[i]);
    }

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

Measured memory_bytes: 4204
#include <iostream>
#include <iomanip>
#include <ios>
#include <sstream>
#include <cstdio>

#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <numeric>
#include <regex>
#include <utility>
#include <random>

#include <cstddef>
#include <cstdint>
#include <cfloat>
#include <limits>

#include <array>
#include <bitset>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <valarray>
#include <vector>
#include <deque>
#include <forward_list>

#define FOR(i, a, b) for(auto i{a}; i < (b); ++i)
#define RFOR(i, a, b) for(auto i{(b)-1};i >= (a); --i)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, 0, n)
#define ALL(a) std::begin(a), std::end(a)
#define EACH(x, xs) for (auto &x : xs)
#define CAST static_cast

template<typename T>
constexpr bool in_range(T const &l, T const &a, T const &u){ return l < a && a < u; };
constexpr double inf {std::numeric_limits<double>::infinity()};

#define FAST_TYPE
#ifdef FAST_TYPE
using i32 = std::int_fast32_t;  using i64 = std::int_fast64_t;
using u32 = std::uint_fast32_t; using u64 = std::uint_fast64_t;
#else
using i32 = std::int_least32_t;  using i64 = std::int_least64_t;
using u32 = std::uint_least32_t; using u64 = std::uint_least64_t;
#endif

using imx = std::intmax_t;
using umx = std::uintmax_t;

using namespace std;

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

  string n;
  getline(cin, n);

  u64 x = 0;

  for (auto ni : n) {
    x += ni - '0';
  }

  if (x % 9 == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;



  return 0;
}

Measured memory_bytes: 3728
N=int(input())
A=list(map(int,input().split()))

cost=[abs(A[i]-A[i+1]) for i in range(N-1)]
costsum=total=sum(cost)+abs(A[0])+abs(A[N-1])
for i in range(N):
  total=costsum
  if i == 0:
    total-=abs(A[i])
    total-=cost[i]
    total+=abs(A[i+1])
  elif i == N-1:
    total-=abs(A[i])
    total+=abs(A[i-1])
    total-=cost[i-1]
  else:
    total-=cost[i]
    total-=cost[i-1]
    total+=abs(A[i+1]-A[i-1])
  print(total)

Measured memory_bytes: 14172
N=int(input())
A=[int(i) for i in input().split()]

ans=0
flg ='0'
for i in range(1,N):

    if flg=='0' and A[i-1]<A[i]:
        flg='+'
    elif flg=='0' and A[i-1]>A[i]:
        flg='-'

    if flg=='+' and A[i-1]>A[i]:
        ans+=1
        flg='0'
    elif flg=='-' and A[i-1]<A[i]:
        ans+=1
        flg='0'
    
    # print(flg)

print(ans+1)

Measured memory_bytes: 14252
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

#define REP(i, a, b) for (int i = int(a); i < int(b); i++)
#define dump(val) cerr << __LINE__ << ":\t" << #val << " = " << (val) << endl

using namespace std;

typedef long long int lli;

template<typename T>
vector<T> make_v(size_t a, T b) {
    return vector<T>(a, b);
}

template<typename... Ts>
auto make_v(size_t a, Ts... ts) {
    return vector<decltype(make_v(ts...))>(a, make_v(ts...));
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int X;
    cin >> X;
    cout << (X == 3 || X == 5 || X == 7 ? "YES" : "NO") << endl;
    return 0;
}


Measured memory_bytes: 256
function main(input){
    abc=input.split(' ');
    abc=abc.sort();
    a=parseInt(abc[2],10)
    b=parseInt(abc[1],10)
    c=parseInt(abc[0],10)
    console.log(a*10+b+c)
    


}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));

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

#define pb push_back
#define mp make_pair
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef complex<double> point;
#define xx real()
#define yy imag()

#define REP(i, a, b) for(int i = (a); i < (int)(b); i++)
#define REPN(i, a, b) for(int i = (a); i <= (int)(b); i++)
#define FA(it, x) for(__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define SZ(x) (int)(x).size()
#define BE(x) (x).begin(), (x).end()
#define SORT(x) sort(BE(x))
#define _1 first
#define _2 second

#define x1 gray_cat_x1
#define y1 gray_cat_y1

template<class T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; }

#define file "I1"

const double EPS = 1e-9;
const double PI = acos(-1.);
const int INF = 1e9;
const ll MOD = 1e9 + 7;

const int MAXN = 2e5 + 5;
int v[MAXN];
vi ans;

void solve(){
	int n;
	cin >> n;
	REPN(i, 1, n) {
		cin >> v[i];
	}
	REP(k, 0, n) {
		int pos = 0;
		REPN(i, 1, n - k) {
			if (v[i] == i) {
				pos = i;
			}
		}
		if (pos == 0) {
			printf("-1\n");
			return;
		}
		ans.pb(pos);
		REP(i, pos, n) {
			v[i] = v[i + 1];
		}
	}
	reverse(BE(ans));
	REP(i, 0, SZ(ans)) {
		printf("%d\n", ans[i]);
	}
}   

int main(){

    //freopen(file".in", "r", stdin); freopen(file".out", "w", stdout);
    int t = 1;
    //cin >> t;
    while(t--){
        solve();    
    }
}


Measured memory_bytes: 256
N, M = [int(x) for x in input().split()]

edges = []
for i in range(M):
    a, b = [int(x) for x in input().split()]
    edges.append((a, b))
    edges.append((b, a))


def f(curpath, N):
    if len(curpath) == N:
        # print(curpath)
        return 1
    ret = 0
    now = curpath[-1]

    for e in edges:
        if now == e[0] and e[1] not in curpath:
            temp = curpath[:]
            temp.append(e[1])
            ret += f(temp, N)
    return ret


print(f([1], N))


Measured memory_bytes: 3444
package main

import (
	"fmt"
	"math"
)

func main() {
	var x1, y1, x2, y2 float64
	fmt.Scan(&x1, &y1, &x2, &y2)

	xlen := math.Abs(x2 - x1)
	ylen := math.Abs(y2 - y1)
	fmt.Printf("%f\n", math.Sqrt(xlen*xlen+ylen*ylen))
}



Measured memory_bytes: 1160
fun main(args: Array<String>){
    val num = Integer.parseInt(readLine())
    var maxVal = 0
    var sumVal = 0
    for(i in 1..num){
        val input = Integer.parseInt(readLine())
        if(input > maxVal) maxVal = input
        sumVal += input
    }
    println(sumVal - maxVal / 2)
}

Measured memory_bytes: 31608
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

sum_ = 0
for i in range(n):
  if a[i]>=b[i]:
    a[i]-=b[i]
    sum_+=b[i]
    b[i]=0
  else:
    b[i]-=a[i]
    sum_+=a[i]
    a[i]=0
    if a[i+1]>=b[i]:
      a[i+1]-=b[i]
      sum_+=b[i]
      b[i]=0
    else:
      b[i]-=a[i+1]
      sum_+=a[i+1]
      a[i+1]=0
print(sum_)

Measured memory_bytes: 19004
#include<iostream>
#include<string>
#include<vector>
#include<utility>
#include<algorithm>
using namespace std;
typedef long long ll;

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


    string s,t;
    cin>>s>>t;
    int n = s.length() , m = t.length();

    vector<vector<int> > dp(n, vector<int> (m));
    
    for(int i = 0; i< n ; i++)
    {
        for(int j = 0; j< m; j++)
        {
            if(s[i] == t[j])
            {
                dp[i][j] = 1 + (i>0&&j>0 ? dp[i-1][j-1]  : 0 ); 
            }
            else 
            {
                dp[i][j] = max( (i>0 ? dp[i-1][j] : 0) , (j> 0 ? dp[i][j-1] : 0));
            }
        }
    }

    // for(int i =0; i< n; i++)
    // {
    //     for(int j = 0; j< m; j++)
    //         cout<<dp[i][j]<<" ";
    //     cout<<"\n";
    // }
    // cout<<dp[n-1][m-1]<<"\n";

    int  i = n-1 , j = m-1;
    string ans = "";
    while(i>=0&& j>=0)
    {
        if(i>0&&dp[i][j] == dp[i-1][j])
            i--;
        else if(j>0 && dp[i][j] == dp[i][j-1])
            j--;
        else if(i==0 || j==0)
        {
            if(dp[i][j]==1)
                {
                    ans = t[j--]  + ans;
                    i--;
                }
            else 
                {
                    i--;
                    j--;
                }
        }
        else if(i>0&&j>0)
            {
                ans = t[j--] + ans;
                i--;
            }
        
    }

    cout<<ans<<"\n";

}

Measured memory_bytes: 35584
#include<iostream>
#include<iomanip>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#include<numeric>
#include<limits>
#include<bitset>
#include<functional>
#include<type_traits>
#include<queue>
#include<stack>
#include<array>
#include<random>
#include<utility>
#include<cstdlib>
#include<ctime>

using namespace std;

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

int main(){
    int N;
   cin>>N;
   vector<int>A(N);
   vector<int>B(N-1);
    int64_t sum=0;
   rep(i,N-1){
       cin>>B.at(i);
   }
    sum+=B.at(N-2);
    sum+=B.at(0);
    rep2(i,1,N-1){
        sum+=min(B.at(i),B.at(i-1));
    }
   cout<<sum<<endl;
    return 0; 
}




Measured memory_bytes: 256
#include <stdio.h>
int main(void){
    // Your code here!
    int x,y,z;

   while(1){  
       scanf("%d %d",&x,&y);
       if(x > y){
           z = x;
           x = y;
           y = z;
       }
      
       if(x == 0,y == 0){
           break;
           
       }
     
         printf("%d %d\n",x ,y);
     
   }
  return 0;
}



Measured memory_bytes: 2552