akhauriyash/Code-Regression huggingface dataset:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class Main {
    static class TaskD {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n  = in.nextInt();
            long k = in.nextLong();
            long[] as = new long[n];
            for (int i = 0; i < n; i++) {
                as[i] = in.nextLong();
            }
            long[][] ps = new long[60][2];
            for (int i = 59; i >= 0; i--) {
                int cnt = 0;
                for (int j = 0; j < n; j++) {
                    if (((as[j] >> i) & 1) > 0) {
                        cnt++;
                    }
                }
                ps[i][0] = (1l << i) * cnt;
                ps[i][1] = (1l << i) * (n - cnt);
            }
            long max = 0;
            for (int i = 59; i >= 0; i--) {
                if (((k >> i) & 1) > 0) {
                    long tmp = 0;
                    for (int j = 59; j > i; j--) {
                        tmp += ps[j][(int)((k >> j) & 1)];
                    }
                    tmp += ps[i][0];
                    for (int j = i - 1; j >= 0; j--) {
                        tmp += Math.max(ps[j][0], ps[j][1]);
                    }
                    max = Math.max(max, tmp);
                }
            }
            long tmp = 0;
            for (int j = 59; j >= 0; j--) {
                tmp += ps[j][(int)((k >> j) & 1)];
            }
            out.println(Math.max(max, tmp));
        }
    }

    public static void main(String argds[]) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }
    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
        
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}


Measured memory_bytes: 47860
import sys
input = sys.stdin.readline

def main():
    N, H = map(int, input().split())
    A = [0] * N
    B = [0] * N
    for i in range(N):
        A[i], B[i] = map(int, input().split())

    cnt = 0
    max_A = max(A)
    sort_B = sorted(B, reverse=True)
    for b in sort_B:
        if b > max_A:
            cnt += 1
            H -= b
        else:
            break

        if H <= 0:
            break
    
    if H > 0:
        cnt += H // max_A if H % max_A == 0 else H // max_A + 1
    print(cnt)



if __name__ == "__main__":
    main()

Measured memory_bytes: 43484
#include <algorithm>
#include <iostream>
#include <cstdio>
typedef long long ll;
const int maxn = 1e5 + 7;

inline ll get(const int &l,const int &r)
{
    extern ll sum[];
    return sum[r] - sum[l - 1]; 
}//get sum

ll n, m, v, p;
ll a[maxn], sum[maxn];
ll res;

int main(void)
{
    scanf("%lld %lld %lld %lld", &n, &m, &v, &p);
    for (int i = 1; i <= n; i++)
        scanf("%lld", &a[i]);
    std::sort(a + 1, a + n + 1);
    for (int i = 1; i <= n; i++)
        sum[i] = sum[i - 1] + a[i];
    for (ll i = 1; i <= n - p; i++)
    {
        ll vote = m * v - m * (p - 1) - m; //总投票 - 投给前p - 1个 - 投给a[i]的 = 投给 < a[i] | a[i + 1] ~ a[p]
        ll had = a[i] + m; 
        if (had >= a[n - p + 1] && vote <= (i - 1) * m + had * (n - p + 1 - i) - get(i + 1, n - p + 1)) res++; // (i - 1) * m 投给 < a[i], 后半段投给a[i] ~ a[n - p + 1], 若 >= vote 则可能;
    }
    res += p; 
    std::cout << res << std::endl;
}

Measured memory_bytes: 4784
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Long n = sc.nextLong();
		char[] s = new char[26];

		for (int i = 0; i < 26; i++) {
			s[i] = (char) ('a' + i);
			// System.out.print(i+1+" ");
			// System.out.println((char) ('a'+i));
		}

		//ArrayList<Character> q = new ArrayList<>();
		StringBuilder q =new StringBuilder();

		while (n > 0) {
			long k = n % 26;
			//System.out.println(k);

			if (k != 0) {
				int y = (int) k;
				q.append(s[y - 1]);

				n = n / 26;

			} else {
				q.append(s[25]);
				n = n / 26;
				n = n - 1;
			}
		}

		q.reverse();
		System.out.println(q);
		sc.close();
	}
}


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

int main() {
    int64_t H,W,K;
    int64_t num = 0;
    int64_t min_num = 1000000000;
    string choko;
    cin >> H >> W >> K;
    vector<vector<int64_t>> S(H,vector<int64_t>(W));
    for(int64_t i = 0; i < H; i++){
        cin >> choko;
        for(int64_t j = 0; j < W; j++){
            S.at(i).at(j) = choko.at(j) - '0';
            //cout << S.at(i).at(j) << " ";
        }
    }

    // 9ビットのビット列をすべて列挙する
    //その後H-1ビットにする
    for (int tmp = 0; tmp < (1 << (H-1)); tmp++) {
        bitset<10> s(tmp+(1<<(H-1)));

        // ビット列を出力
        //cout << s << endl;

        int64_t group = s.count();
        num = group-1;//横方向切り
        vector<int64_t> white(group,0);

        //横に一列ずつ増やして仕切りを入れていく
        for(int64_t j = 0; j < W; j++){
            int64_t k = 0;
            bool cut = false;
            for(int64_t i = 0; i < H; i++){
                white.at(k) += S.at(i).at(j);
                if(white.at(k) > K){
                    cut = true;
                }
                if(s[i] == 1){
                    k++;
                    k = min(k,group-1);
                }
                //cout << i << ' ' << k << endl;
            }
            //cout << "white=" << white.at(k) << endl;
            //cout << cut << endl;
            if(cut == true){
                num += 1;//縦方向切り
                for(int64_t l = 0; l < group; l++){
                    white.at(l) = 0;
                }
                k = 0;
                for(int64_t i = 0; i < H; i++){
                    white.at(k) += S.at(i).at(j);
                    if(white.at(k) > K){
                        num = 1000000000;
                    }
                    if(s[i] == 1){
                        k++;
                    }
                }
            }
        }
        //cout << "num=" << num << endl;
        min_num = min(min_num,num);

    }
    cout << min_num << endl;
}


Measured memory_bytes: 384
#include<bits/stdc++.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) for(int i = 0; i < (b); i++)
#define all(a) (a).begin(), (a).end()
#define show(x)  cerr << #x << " = " << (x) << endl;
//const int INF = 1e8;
using namespace std;

class StronglyConnectedComponents{
	private:
		vector<bool> used;
		vector<int> vs; //帰りがけ順の並び
		void dfs(int v){
			used[v] = true;
			rep(i,g[v].size()){
				if(not used[g[v][i]]) dfs(g[v][i]);
			}
			vs.emplace_back(v);
		}
		void rdfs(int v, int k){
			used[v] = true;
			cmp[v] = k;
			rep(i,rg[v].size()){
				if(not used[rg[v][i]]) rdfs(rg[v][i], k);
			}
		}
	public:
		typedef vector<vector<int>> graph;
		const int v; // 頂点数
		int nv; // SCCした後の頂点数
		graph g, rg; // グラフ、辺が逆になったグラフ
		vector<int> cmp; //属する強連結成分のトポロジカル順序

		StronglyConnectedComponents(int v) : used(v), v(v), g(v), rg(v), cmp(v) { }

		void addEdge(int from, int to){
			g[from].emplace_back(to);
			rg[to].emplace_back(from);
		}
		int solve(){ // 強連結成分分解をしたあとのグラフの頂点数を返す
			fill(all(used),0);
			vs.clear();
			rep(i,v){
				if(not used[i]) dfs(i);
			}
			fill(all(used),0);
			int k = 0;
			for(int i = vs.size() - 1; i >= 0; i--){
				if(not used[vs[i]]) rdfs(vs[i], k++);
			}
			return nv = k;
		}
		graph getCssGraph(vector<vector<int>>& node){
			node = vector<vector<int>>(nv); // node[i]:=SCCによって頂点iに同一視された頂点
			graph res(nv); // CSSしたあとのグラフ
			rep(i,v){
				node[cmp[i]].emplace_back(i);
				for(auto to : g[i]){
					//if(cmp[i] == cmp[to]) continue;
					res[cmp[i]].emplace_back(cmp[to]);
				}
			}
			return res;
		}
		void out(){
			rep(i,v){ cout << cmp[i] << ' '; } cout << endl;
		}
};

void dfs(int pos, vector<bool>& used, vector<vector<int>>& g){
	used[pos] = true;
	for(auto to : g[pos]){
		if(used[to]) continue;
		dfs(to, used, g);
	}
}

int main(){
	int n;
	while(cin >> n,n){
		StronglyConnectedComponents scc(n);
		vector<double> p(n); // 寝坊する確率
		rep(i,n){
			int m;
			cin >> p[i] >> m;
			rep(j,m){
				int a;
				cin >> a;
				scc.addEdge(i, a - 1);
			}
		}
		scc.solve();

		vector<vector<int>> node;
		StronglyConnectedComponents::graph g = scc.getCssGraph(node);
		double ans = 1;

		vector<bool> used(scc.nv,0);
		rep(i,scc.nv){
			if(used[i]) continue;

			double tmp = 1.00;
			rep(j,node[i].size()){
				tmp *= p[node[i][j]];
			}
			ans *= 1.00 - tmp;
			dfs(i, used, g);
		}
		cout << fixed << setprecision(9) << ans << endl;
	}
}



Measured memory_bytes: 3420
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
from functools import reduce
import sys
import math
import bisect
import random
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return list(map(float, sys.stdin.readline().split()))
def LS():return sys.stdin.readline().split()
def SR(n): return [list(sys.stdin.readline())[:-1] for i in range(n)]
def IR(n): return [int(sys.stdin.readline()) for i in range(n)]
def LIR(n): return [list(map(int, sys.stdin.readline().split())) for i in range(n)]
def LSR(n): return [list(map(list, sys.stdin.readline().split())) for i in range(n)]
_gcd = lambda x, y: _gcd(y, x%y) if (x%y) else y
_lcm = lambda x, y: x*y // _gcd(x, y)
def gcd(*numbers):
    return reduce(_gcd, numbers)
def lcm(*numbers):
    return reduce(_lcm, numbers)
sys.setrecursionlimit(1000000)
INF = float('inf')
mod = 1000000007
dire4 = [(1,0), (0,1), (-1,0), (0,-1)]
dire8 = [(1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1)]

N = I()
A = LI()

A_sum = 0
A_acc_odd = [0]*(N//2+1)
A_acc_even = [0]*(N//2+2)

for i in range(N):
    A_sum += A[i]
    if (i&1):
        A_acc_odd[i//2+1] = A_acc_odd[i//2] + A[i]
    else:
        A_acc_even[i//2+1] = A_acc_even[i//2] + A[i]

x = [None]*N

for i in range(N):
    if (i%2):
        x[i] = A_sum - 2*((A_acc_odd[i//2]-A_acc_odd[0]) + (A_acc_even[-1] - A_acc_even[i//2+1]))
    else:
        x[i] = A_sum - 2*((A_acc_even[i//2]-A_acc_even[0]) + (A_acc_odd[-1] - A_acc_odd[i//2]))
print(*x)

Measured memory_bytes: 62180
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<cmath>
#include<queue>
#include<functional>
using namespace std;
string S, T; vector<int>V;
int main() {
	cin >> S; int cx = 0;
	for (int i = 0; i < S.size(); i++) {
		if (S[i] == 'x') { cx++; }
		else { V.push_back(cx); cx = 0; T += S[i]; }
	}
	V.push_back(cx); int cnt = 0;
	for (int i = 0; i < T.size(); i++) {
		if (T[i] != T[T.size() - 1 - i]) { cout << "-1" << endl; return 0; }
	}
	for (int i = 0; i < V.size(); i++) {
		cnt += abs(V[i] - V[V.size() - 1 - i]);
	}
	cout << cnt / 2 << endl;
	return 0;
}

Measured memory_bytes: 1148
#include <iostream>
using std::cout;
using std::endl;
using std::cin;

int main()
{
    int a, b;
    
    while (cin >> a >> b) {
        if (a > b) {
            cout << "a > b" << endl;
        } else if (a < b) {
            cout << "a < b" << endl;
        } else {
            cout << "a == b" << endl;
        }
    }
}



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

typedef long long ll;
typedef pair<int,int> pii;

long long MOD = 10000000000 + 7;

int main(){
  cout << setprecision(10);
  int N, u, v; cin >> N >> u >> v;
  u--; v--;

  vector<vector<int>> e(N);
  for(int i = 0; i < N-1; i++){
    int x,y; cin >> x >> y;
    x--; y--;
    e[x].push_back(y);
    e[y].push_back(x);
  }

  vector<int> a(N,-1);
  vector<int> t(N,-1);
  t[u] = 0;
  a[v] = 0;

  queue<int> qt,qa;

  qt.push(u);
  while(!qt.empty()){
    int now = qt.front();
    qt.pop();
    for(int next: e[now]){
      if(t[next] == -1){
        t[next] = t[now] + 1;
        qt.push(next);
      }
    }
  }

  int dist = t[v];

  qa.push(v);
  while(!qa.empty()){
    int now = qa.front();
    qa.pop();
    for(int next: e[now]){
      if(a[next] == -1){
        a[next] = a[now] + 1;
        qa.push(next);
      }
    }
  }
  t[u] = 2;

  int ans = 0;
  for(int i = 0; i < N; i++){
    if(a[i] >= t[i]){
      ans = max(ans, a[i]);
    }
  }
  cout << max(ans-1,0) << endl;
  // cerr << "dist: " << dist;

}


Measured memory_bytes: 9592
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int MOD = 1000000007;

int main() {
    ll X;cin >> X;
    ll a;
    a = X / 500;
    X -= a * 500;
    ll b = X / 5;
    ll c = a * 1000 + b * 5;
    cout << c << endl;
}


Measured memory_bytes: 256
import itertools
N, M, Q = map(int,input().split())
List = [list(map(int, input().split())) for i in range(Q)]

A_full = [i for i in range(1,M+1)]

l_tensu = 0
for subset in itertools.combinations_with_replacement(A_full, N):
    tensu = 0

    A = list(subset)
    for i in range(Q):
        a = List[i][0] - 1
        b = List[i][1] - 1
        c = List[i][2]
        d = List[i][3]
        if (A[b] - A[a] == c):
            tensu += d
    if(tensu > l_tensu):
        l_tensu = tensu
    
print(l_tensu)

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

int main() {
    int N, K, Q;
    cin >> N >> K >> Q;
    vector<int> pep(N, K);
    vector<int> A(Q);
    rep(i, N) pep[i] -= Q;
    rep(i, Q) {
        cin >> A[i];
        A[i]--;
        pep[A[i]]++;
    }

    rep(i, N) {
        if(pep[i] > 0) cout << "Yes" << endl;
        else cout<< "No" << endl;
    }


    return 0;
}

Measured memory_bytes: 1408
#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>; // グラフ型
typedef long long ll;
#define _GLIBCXX_DEBUG
#define rep(i, n) for(int i = 0; i < (n); ++i)

/*
 // 深さ優先探索
vector<bool> seen;
int dfs(const Graph &G, ll v) {
    seen[v] = true; // v を訪問済にする
    int score = 0; 

    // v から行ける各頂点 next_v について
    for (auto next_v : G[v]) { 
        if (seen[next_v]) continue; // next_v が探索済だったらスルー

        // 負荷さ優先探索中の処理



        dfs(G, next_v); // 再帰的に探索, 毎回mat渡してええの？
    }
    return score;
} */

/*
//桁数の計算
ll keta(ll num){
  ll ans= 0 ;
  ll rem;

  for (ll i = 4; i >= 0 ; i--){
    rem = pow(10,i);
    ans += (num / rem); 
    num = num % rem;
  }
  return ans;
}
*/


int main() {
  string N;
  cin >> N;
  //vector<ll> a(N);
  //vector<vector<int>> data(3, vector<int>(4));
  ll sum= 0;
  rep(i, N.size()){
    ll tmp;
    tmp = (int)(N.at(i) - '0');
    sum += tmp;
  }

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

  return 0;
}


Measured memory_bytes: 3660
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define REP(i,a,b) for (int i = a; i < (b); ++i)
#define all(x) (x).begin(),(x).end()
#define YY cout << "Yes" << endl
#define NN cout << "No" << endl
const int INF = 1000000007;
typedef long long ll;
using namespace std;
using Graph = vector<vector<int>>;
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; }
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
ll lcm(ll a, ll b) { return (a * b) / gcd(a,b); }
bool is_prime(long long n) {  //素数判定
  for(int64_t i = 2; i * i <= n; i++) {
    if(n % i == 0) return false;
  }
  return true;
}
int solve(){
  int q;
  cin >> q;
  vector<int>v(100002),sum(100003);
  REP(i,1,100001){
    if(i % 2 != 0){
      if(is_prime(i) && is_prime((i + 1) / 2))v[i]++;
    }
  }
  REP(i,2,100002){
    sum[i] += sum[i - 1] + v[i];
  }
  rep(_,q){
    int l,r;
    cin >> l >> r;
    cout << sum[r] - sum[l - 1] << endl;
  }
  return 0;
}
int main(){
  // ios::sync_with_stdio(false);cin.tie(nullptr);
  // cout << fixed;cout << setprecision(16) << endl; 
  solve();
  return 0;
} 

Measured memory_bytes: 1408
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>

#include <iostream>
#include <complex>
#include <string>
#include <algorithm>
#include <numeric>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>

#include <functional>
#include <cassert>

typedef long long ll;
using namespace std;

#ifndef LOCAL
#define debug(x) ;
#else
#define debug(x) cerr << __LINE__ << " : " << #x << " = " << (x) << endl;

template <typename T1, typename T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &p) {
  out << "{" << p.first << ", " << p.second << "}";
  return out;
}

template <typename T>
ostream &operator<<(ostream &out, const vector<T> &v) {
  out << '{';
  for (const T &item : v) out << item << ", ";
  out << "\b\b}";
  return out;
}
#endif

#define mod 1000000007 //1e9+7(prime number)
#define INF 1000000000 //1e9
#define LLINF 2000000000000000000LL //2e18
#define SIZE 200010


int main(){
  int N, P[SIZE];
  int pos[SIZE];

  cin >> N;

  for(int i=0; i<N; i++) {
    cin >> P[i];
    pos[P[i]] = i;
  }

  set<int> ss;

  ss.insert(-2);
  ss.insert(-1);
  ss.insert(INF);
  ss.insert(INF+1);

  ll ans = 0;

  for(int i=N; i>0; i--) {
    int p = pos[i];

    if(i < N) {
      auto itL = ss.lower_bound(p);
      auto itR = ss.upper_bound(p);

      itL--;
      int l1 = *itL;

      itL--;
      int l2 = *itL;

      int r1 = *itR;

      itR++;
      int r2 = *itR;

      int c = p;

      cerr << l2 << " " << l1 << " " << c << " " << r1 << " " << r2 << endl;

      //[l, r)
      ll d1, d2;

      debug(l1);
      debug(r1);
      debug(i);

      if (l1 >= 0) {
        d1 = l1 - max(l2+1, 0) + 1;
        d2 = min(r1, N) - c;
        ans += d1 * d2 * i;
        debug(d1); debug(d2);
      }

      if (r1 < INF) {
        d1 = c - l1;
        d2 = min(r2, N) - r1;

        ans += d1 * d2 * i;
        debug(d1); debug(d2);
      }
    }

    ss.insert(p);
  }

  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 6784
// abc131a.cpp : Security
#include <bits/stdc++.h>
using namespace std;
#define ot(x) cout<<(x)

int main(){
	string s; cin>>s;
	int i; for(i=0;i<3;i++) if(s[i]==s[i+1]) break;
	ot(s[i]==s[i+1]?"Bad\n":"Good\n");
}

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

int main() {
    int n,m;
    vector<P> ans;
    cin >> n >> m;
    if(n%2) {
        for(int l = 1,r = n-1;l < r;l++, r--){
            ans.emplace_back(l,r);
        }
        }else{
            bool flag = false;
        for(int l = 1,r = n-1;l < r;l++, r--){
            if(!flag && r-l <= n/2){
                --r;
                flag = true;
            }
            ans.emplace_back(l,r);
            }
        }
            rep(i,m){
            cout << ans[i].first << " " << ans[i].second << endl;
        }
    
return 0;
        

}


Measured memory_bytes: 4156
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

n = onem()

dp = [[0,0,0,0]for i in range(n+1)]
dp[0][0] = 1
for i in range(1,n+1):
    dp[i][0] = (dp[i-1][0] * 8) % mod
    dp[i][1] = (dp[i-1][0] + dp[i-1][1]*9) % mod
    dp[i][2] = (dp[i-1][0] + dp[i-1][2]*9) % mod
    dp[i][3] = (dp[i-1][1] + dp[i-1][2] + dp[i-1][3] * 10) % mod
print(dp[-1][3])





Measured memory_bytes: 196708
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <algorithm>
#include <cassert>
#include <cfloat>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>

using namespace std;

#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define repLRE(i, l, r) for (ll i = (l); i <= (r); ++i)
#define rrepLRE(i, l, r) for (ll i = (l); i >= (r); --i)
#define Sort(v) sort(v.begin(), v.end())
#define rSort(v) sort(v.rbegin(), v.rend())
#define Reverse(v) reverse(v.begin(), v.end())
#define Lower_bound(v, x) \
  distance(v.begin(), lower_bound(v.begin(), v.end(), x))
#define Upper_bound(v, x) \
  distance(v.begin(), upper_bound(v.begin(), v.end(), x))

using ll = long long;
using ull = unsigned long long;
using P = pair<ll, ll>;
using T = tuple<ll, ll, ll>;
using vll = vector<ll>;
using vP = vector<P>;
using vT = vector<T>;
using vvll = vector<vector<ll>>;
using vvP = vector<vector<P>>;
using dqll = deque<ll>;

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

/* Macros reg. ends here */

const ll INF = 1LL << 50;

int main() {
  // ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cout << fixed << setprecision(15);

  ll n, k;
  cin >> n >> k;

  ll th = (n - 1) * (n - 2) / 2;
  if (k > th) {
    cout << -1 << endl;
    return 0;
  }

  ll mm = th - k;
  cout << n - 1 + mm << endl;
  repLRE(i, 2, n) cout << 1 << " " << i << endl;
  repLRE(i, 2, n - 1) {
    repLRE(j, i + 1, n) {
      if (mm == 0) return 0;
      cout << i << " " << j << endl;
      mm--;
    }
  }

  return 0;
}


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

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

int main() {
	int N;
	cin >> N;
	int cnt = 0;

	REP(i, N) {
		int a;
		cin >> a;
		while (a % 2 == 0) {
			cnt++;
			a /= 2;
		}
	}

	cout << cnt << endl;

}

Measured memory_bytes: 256
from math import radians, sin, cos, sqrt
A, B, H, M = map(int, input().split())

x1 = A * cos(radians(30 * H + M / 2))
y1 = A * sin(radians(30 * H + M / 2))

x2 = B * cos(radians(6 * M))
y2 = B * sin(radians(6 * M))

ans = sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
print(ans)

Measured memory_bytes: 9584
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;


public class Main {
	public static void main(String[] args) {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		Scanner scan=new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		
		int x=scan.nextInt();
		int y=scan.nextInt();
		
		System.out.print(x*y+" ");
		System.out.println(2*(x+y));
		
	}

}

Measured memory_bytes: 17336
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<queue>
#include<string>
#include<cstring>
#include<algorithm>
#include<set>
#include<map>
#include<iomanip>

#define REP(i,n) for(int i=0;i<(n);i++)
#define EPS (1e-7)
#define INF (2e9)
// cout << setprecision(10)

using namespace std;
typedef long long int ll;
const ll MOD = 1000000007;

int N, K;
vector<int> V;
int main(void){
    cin >> N >> K;
    int v;
    REP(i,N){
        cin >> v;
        V.push_back(v);
    }
    ll total = -1;
    for(int l=0;l<=min(N, K);l++){
        for (int r=0;r<=min(N, K)-l;r++){
            vector<int> v;
            for(int i=0;i<l;i++) v.push_back(V[i]);
            for(int i=0;i<r;i++) v.push_back(V[N-i-1]);
            sort(v.begin(), v.end());
            REP(i, min(K-(r+l), int(v.size()))) v[i] = max(v[i], 0);
            ll t = 0;
            REP(i, v.size()) t += v[i];
            total = max(total, t);
        }
    }
    cout << total << endl;
    return 0;
}



Measured memory_bytes: 256
url = "https://atcoder.jp/contests/abc082/tasks/arc087_a"
import copy
def main():
    n = int(input())
    li = list(map(int, input().split()))
    inds = {}
    ans = 0
    for i in range(len(li)):
        inds.setdefault(li[i], 0)
        inds[li[i]] += 1
    for k, v in inds.items():
        if k == v:
            pass
        elif k > v:
            ans += v
        elif k < v:
            ans += v - k
    print(ans)


if __name__ == '__main__':
    main()




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

int main()
{
    int d, n;
    long long ans = 1;

    scanf("%d %d", &d, &n);

    for(int i = 0; i < d; i++)
        ans *= 100;
    
    if(n != 100)
        ans *= n;
    else
        ans *= 101;

    printf("%ld\n", ans);
    

    return 0;
}

Measured memory_bytes: 256
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        
        int from = 0;
        int to = n - 1;

        System.out.println(from);
        System.out.flush();
        String fromState = sc.next();
        if (fromState.equals("Vacant")) {
            return;
        }
        
        System.out.println(to);
        System.out.flush();
        String toState = sc.next();
        if (toState.equals("Vacant")) {
            return;
        }

        while (true) {
            int mid = (from + to) / 2;

            System.out.println(mid);
            System.out.flush();
            String midState = sc.next();
            if (midState.equals("Vacant")) {
                return;
            }
            
            // 前半の区間に注目
            boolean isSameState = midState.equals(fromState);
            boolean isDiffEven = (mid - from) % 2 == 0;
            if (isSameState && !isDiffEven || !isSameState && isDiffEven) {
                to = mid;
                toState = midState;
            } else {
                from = mid;
                fromState = midState;
            }
        }
    }
}

Measured memory_bytes: 24488
///*
#include<iostream>
using namespace std;

int main() {

	int n, *p;
	int i, j;
	int money = 0;
	
	cin >> n;
	p = new int[n];

	for (i = 0; i < n; i++) {
		cin >> p[i];
	}

	for (i = 0; i < n; i++) {
		for (j = 0; j < n-1; j++) {
			if (p[j] > p[j + 1]) {
				int tmp = p[j];
				p[j] = p[j + 1];
				p[j + 1] = tmp;
			}
		}
	}

	money = p[n - 1]/2;

	for (i = 0; i < n - 1; i++) {
		money += p[i];
	}

	cout << money;

	return 0;
}
//*/

Measured memory_bytes: 256
import java.util.*;

public class Main{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int k = sc.nextInt();
        int x = sc.nextInt();
        for(int i=x-k+1; i<x+k-1; i++){
            System.out.print(i+" ");
        }
        System.out.println(x+k-1);
    }
}

Measured memory_bytes: 23124
#include<bits/stdc++.h>
using namespace std;
int n,maxn=0,ans=0;
string s;
int main(){
	cin>>n;
	cin>>s;
	for(int i=0;i<s.size();i++)
	{
		if(s[i]=='I') ans++;
		if(s[i]=='D') ans--;
		if(ans>=maxn) maxn=ans;
	}
	cout<<maxn<<endl;
	return 0;
}

Measured memory_bytes: 256
import java.util.*;

class Main {

    static Scanner scan = new Scanner(System.in);

    public static void main(String[] args) {

        while (scan.hasNext()) {
            int n = scan.nextInt();
            int money = scan.nextInt();
            boolean[] dp = new boolean[money+1];
            if (n == 0) {
                break;
            }
            int[] menu = new int[30];
            for (int i = 0; i < n; i++) {
                menu[i] = scan.nextInt();
            }
            solve(dp, menu);
            int i;
            for (i = dp.length-1; i >= 0; i--) {
                if (dp[i] && prime(i)) {
                    break;
                }
            }
            if (i < 1) {
                System.out.println("NA");
            } else {
                System.out.println(i);
            }
        }
    }

    public static void solve(boolean dp[], int menu[]) {
        for (int i = 0; i < menu.length; i++) {
            if (menu[i] > dp.length) {
                continue;
            }
            dp[menu[i]] = true;
            for (int j = 1; j < dp.length; j++) {
                if (dp[j] && j + menu[i] < dp.length) {
                    dp[j+menu[i]] = true;
                }
            }
        }
    }



    public static boolean prime(int a) {
        if (a <= 3) {
            return true;
        } else {
            for (int i = 2; i * i <= a; i++) {
                if (a % i == 0) {
                    return false;
                }
            }
        }
        return true;
    }
}

Measured memory_bytes: 60092
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;

int main() {
  int K, N; cin >> K >> N;
  vector<int> v;

  for (int i = 0; i < N; i++) {
    int A; cin >> A;
    v.push_back(A);
  }

  sort(v.begin(), v.end());
  int max_diff = 0;

  for (int i = 0; i < v.size() - 1; i++) {
    max_diff = max(max_diff, v[i + 1] - v[i]);
  }

  max_diff = max(max_diff, v[0] + (K - v[v.size() - 1]));

  cout << K - max_diff << endl;
}


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

int main() {
    string N;
    cin >> N;
    if (N.find("7") <= N.length()) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}

Measured memory_bytes: 3628
sx, sy, tx, ty = gets.strip.split(' ').map(&:to_i)

route = ''

# to t 1
route << 'U' * (ty - sy)
route << 'R' * (tx - sx)

# to s 1
route << 'D' * (ty - sy)
route << 'L' * (tx - sx)

# to t 2
route << 'L'
route << 'U' * (ty - sy + 1)
route << 'R' * (tx - sx + 1)
route << 'D'

# to s 2
route << 'R'
route << 'D' * (ty - sy + 1)
route << 'L' * (tx - sx + 1)
route << 'U'

puts route

Measured memory_bytes: 1788
from collections import deque


def bfs(visited, sy, sx, gy, gx):
    queue = deque([[sy, sx]])
    visited[sy][sx] = 0
    while queue:
        # queueには訪れた地点が入っている。そこから、4方向に移動できるか考え、queueから消す。
        y, x = queue.popleft()  # queueに入っていたものを消す。
        if [y, x] == [gy, gx]:  # もしゴールについていたならば、そのときの手数を出す。
            return visited[y][x]
        for dx, dy in ([1, 0], [-1, 0], [0, 1], [0, -1]):
            for k in range(1, K + 1):
                new_x = x + dx * k
                new_y = y + dy * k

                if (0 <= new_y < H) and (0 <= new_x < W):
                    if m[new_y][new_x] == "@":
                        break
                    elif visited[new_y][new_x] == -1:  # まだ来たことない点だったという条件
                        visited[new_y][new_x] = visited[y][x] + 1
                        queue.append([new_y, new_x])  # 新しい点を足す。
                    elif visited[new_y][new_x] < visited[y][x] + 1:
                        break
                else:
                    break


H, W, K = map(int, input().split())
# K = min(K, max(H, W))
x1, y1, x2, y2 = map(int, input().split())
x1, y1, x2, y2 = x1 - 1, y1 - 1, x2 - 1, y2 - 1
m = []
for i in range(H):
    m.append(str(input()))
visited = [[-1] * W for i in range(H)]
bfs(visited, x1, y1, x2, y2)
print(visited[x2][y2])


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

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

    const int A_MAX = 100001;
    int num[A_MAX + 2];
    for (int i = 0; i < A_MAX + 2; i++) {
        num[i] = 0;
    }

    for (int i = 0; i < N; i++) {
        int A; cin >> A;
        num[A]++;
    }

    int ans = 0;
    for (int i = 0; i < A_MAX; i++) {
        int cand = num[i] + num[i + 1] + num[i + 2];
        if (ans < cand) ans = cand;
    }

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

Measured memory_bytes: 640
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define forx(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)

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

    int n;
    cin >> n;
    if(n==3||n==5||n==7)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;

    return 0;
}

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

int main(){
    long long N;
    cin >> N;
    long long A[N];

    for(long long i=0;i<N;i++){
        cin >> A[i];
    }



    long long mae[N-1];
    long long accum = 0;

    for(long long i=0;i<N-1;i++){
        accum += A[i];
        mae[i] = accum;
    }

    long long ushiro[N-1];
    accum = 0;

    for(long long i=N-1;i>=1;i--){
        accum += A[i];
        ushiro[i-1] = accum;
    }

    long long min = INT64_MAX;

    long long tmp;

    for(long long i=0;i<N-1;i++){
        //cout << "mae:" << mae[i] << " " << "ushiro:" << ushiro[i] << endl;
        tmp = abs(mae[i] - ushiro[i]);
        if(tmp < min) min = tmp;
    }

    cout << min << endl;
    return 0;
}

Measured memory_bytes: 4992
#include<stdio.h>

int main(void)
{
 int a,b,k,i,n[100],j=0;
 scanf("%d%d%d",&a,&b,&k);
 for(i=a;i>0;i--)
 {
   if( (a%i)==0 && (b%i)==0 )
   {
     n[j] = i;
     j++;
   }
 }
 printf("%d\n",n[k-1]);
 return 0;
}

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

int main() {
  string s; cin >> s;
  for(int i; i<3; i++){
    if(s[i]==s[i+1]){
      cout << "Bad" << endl;
      exit(0);
    }
  }
  cout << "Good" << endl;
}



Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define ll          long long
#define mp	    make_pair
#define pb          push_back
#define pii         pair<int,int>
#define vi          vector<int>
#define vii         vector<pii>
#define mi          map<int,int>
#define mii         map<pii,int>
#define all(a)      (a).begin(),(a).end()
#define x           first
#define y           second
#define sz(x)       (int)x.size()
#define endl        '\n'
#define MOD        1000000007
#define lbnd        lower_bound
#define ubnd        upper_bound
#define bs          binary_search
#define gcd(a,b)    __gcd((a),(b))
#define lcm(a,b)    ((a)*(b)) / gcd((a),(b))
#define rep(i,a,b)  for(int i=a;i<b;i++)
#define N	 100
void solve(){
	rep(i,0,3){
	rep(j,0,3){
	char ch;
	cin>>ch;
	if(i==j)cout<<ch;
	}
	}
}
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    int t;
    t =1;
//     cin>>t;
    while(t--){
        solve();
    }
    return 0;
}



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

using namespace std;

int main() {

	string s;
	int k;
	cin >> s >> k;

	for (int i = 0; i < k; i++) {
		if (s[i] != '1') {
			cout << s[i] << endl;
			return 0;
		}
	}
	cout << "1" << endl;

}

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

  int X,Y;
  cin >> X >> Y;

  int max_ani = Y/2;
  int min_ani = Y/4 + (Y-Y/4*4)/2;
  
  if( Y%2 != 0 || max_ani<X || min_ani>X ){
    cout << "No" << endl;
    return 0;
  }

  cout << "Yes" << endl;
  return 0;

}

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

int main() {
  using ll =long long ;
  string a,b;
  cin>>a>>b;
  ll c=a.size();
  ll d=b.size();
  ll e=d;
  
  for(ll i=0;i<c-d+1;i++){
    ll f=0;
    for(ll j=0;j<d;j++){
      if(b.at(j)!=a.at(i+j)){
        f+=1;
      }
    }
    if(f<e){
      e=f;
    }
  }
  cout<<e<<endl;
  
}

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

#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
typedef long long ll;

const long long INF = 1LL << 60;

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

    bool flag = true;
    if (S[0] != 'A') flag = false;
    int cnt = 0;
    repd(i, 2, S.size() - 1) {
        if (S[i] == 'C') cnt++;
    }
    if (cnt != 1) flag = false;
    cnt = 0;
    repd(i, 1, S.size()) {
        if (S[i] != 'A' && S[i] != 'C') {
            if (S[i] >= 'A' && S[i] <= 'Z') cnt++;
        }
    }
    if (cnt != 0) flag = false;

    if (flag) cout << "AC" << endl;
    else cout << "WA" << endl;
    return 0;
}

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

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

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

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

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

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
const LL MOD = 1000000007;

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

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

int main() {
	LL a,b,c,k;
	cin >> a >> b >> c >> k;
	if (k%2==0) {
		if (a-b>1000000000000000000 || a-b<-1000000000000000000) {
			cout << "Unfair";
		}
		else {
			cout << a - b;
		}
	}
	else {
		if (a-b>1000000000000000000 || a-b<-1000000000000000000) {
			cout << "Unfair";
		}
		cout << b - a;
	}
	return 0;
}


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

int main(){
  int N, M, X;
  cin >> N >> M >> X;
  int p = 0;
  for(int i = 1; i <= M; i++){
    int a;
    cin >> a;
    if(a < X) p = i;
  }
  cout << min(p, M - p) << endl;  
  return 0;
}


Measured memory_bytes: 256
<?php
  $n = trim(fgets(STDIN));
  fscanf(STDIN,"%d %d",$t,$a);
  $h = explode(" ",trim(fgets(STDIN)));
  $best = [];
  for($i=0; $i<$n; $i++){
    $best[] = abs($a-($t-($h[$i]*0.006)));
  }
  asort($best);
  echo (key($best)+1)."\n";

Measured memory_bytes: 4604
n=int(input())
A=list(map(int,input().split()))
flag=1
cnt=0
while flag:
  flag=0
  for i in range(n-1,0,-1):
    if A[i-1]>A[i]:
      A[i-1],A[i]=A[i],A[i-1]
      cnt+=1
      flag=1
print(*A)
print(cnt)


Measured memory_bytes: 5604
lines = readlines.map{|line| line.split(' ').map(&:to_i)}
b=lines[1].map{|e|e.to_i/2}.inject(:lcm)
a=[]
for i in 0..lines[0][0]-1
  a[i]=0
  while lines[1][i]%2==0 do
    lines[1][i]=lines[1][i]/2
    a[i]=a[i]+1
  end
end
a.delete(a[0])
if a==[] then
  if lines[0][1]>=b then
    if lines[0][1]/b%2==0 then
      puts lines[0][1]/b/2
    else
      puts lines[0][1]/b/2+1
    end
  else
    puts 0
  end
else
  puts 0
end

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

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

	bool ok = 1;
	for(int i = 1; i <= n; ++i) {
		int t, x, y;
		cin >> t >> x >> y;

		if(t < x || t < y || x + y > t || (t - (x + y)) % 2 == 1)
			ok = 0;
	}
	
	if(ok == 1)
		cout << "Yes";
	else
		cout << "No";
	
	return 0;
}


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

int main() {
    int a, b, c, x;
    cin >> a >> b >> c >> x;
    int ans = 0;
    
    for(int i = 0; i <= a; i++) {
        for(int j = 0; j <= b; j++) {
            for(int k = 0; k <= c; k++) {
                int total = 500*i + 100*j + 50*k;
                if(total == x) { ans++; }
            }
        }
    }

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

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

#define forn(i, n) for (int i = 0; i < int(n); ++i)
#define for1(i, n) for (int i = 1; i <= int(n); ++i)
#define ms(a, x) memset(a, x, sizeof(a))
#define F first
#define S second
#define all(x) (x).begin(),(x).end()

using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int INF = 0x3f3f3f3f;
mt19937 gen(random_device{}());
template<typename... Args> void write(Args... args) { ((cout << args << " "), ...); cout<<endl;}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin>>n;
    ll sum=0;
    for1(i,n){
        if(i%3 and i%5) sum+=i;
    }
    cout<<sum;
    return 0;
}



Measured memory_bytes: 3644
#include <stdio.h>
#include <iostream>

using namespace std;

#define SIZE (1001)
#define N (1001)

void swap(short *a, short *b)
{
	short tmp;
	tmp = *a;
	*a = *b;
	*b = tmp;
}

void makeHeap(short *dat, int size, int oya)
{
	int i;		/// ½§ä
	int oidx;	/// eÌY¦Û¶
	int oval;	/// eÌlÛ¶
	int ko;		/// qÌY¦

	oidx = oya; // eÌY¦ðÛ¶
	oval = dat[oidx]; // eÌlðÛ¶
	ko = oidx + oidx + 1; // ¶ÌqÌY¦ðÛ¶
	while(ko < size) // ±ÌY¦ªf[^¢ÌêJèÔ·
	{
		if((ko+1 < size) && (dat[ko] < dat[ko+1])) ko++; // EÌqªå«¢
		if(oval >= dat[ko]) break; // eªå«¢, »±ÅI¹
		
		dat[oidx] = dat[ko]; // eÉêÔå«¢qÌlðãü
		oidx = ko; // »ÌqÌY¦ðeÆ·é
		ko = oidx + oidx + 1; // eÆµ½qÌqðßé
	}
	dat[oidx] = oval; // Û¶µÄ¢½eÌlðãü
}

int hsort(short *dat, int size)
{
	int oya;
	int sz = size;

	for(oya=(int)((size-2)/2); oya >= 0; oya--) {
		makeHeap(dat, sz, oya);
	}
	while(sz > 0) {
		sz--;
		swap(&dat[0], &dat[sz]);
		makeHeap(dat, sz, 0);
	}

	return 0;
}

int main(void)
{
	int fib, fib1, fib2;
	char input1[8], input2[8], input3[8];
	short node[SIZE];
	short cnt;
	short v, d; /// üÍ v, d
	short i, j; /// ½§ä{i, j}
	short scnt; /// TCYÌJEg


	while(cin >> v >> d) {
//		fgets(input1, 8, stdin);
//		if(input1[0] == '\n' || input1[0] == '\0') break;
//		sscanf(input1, "%s %s", input2, input3);
//		v = atoi(input2);
//		d = atoi(input3);

		scnt = 1;
		fib1 = 1; fib2 = 2;
		node[0] = fib2;
		for(i=2; i <= v; i++) {
			fib = (fib2 + fib1) % N;
			node[scnt++] = fib;
			fib1 = fib2; fib2 = fib;
		}

		hsort(node, scnt);
		cnt = 1; i = 0;
		for(j=i+1; j < scnt; j++) {
			if(0 > (node[j]-node[i]) || (node[j]-node[i]) >= d){
				cnt++;
			}
			i = j;
		}
		
		printf("%d\n", cnt);
	}

	return 0;
}

Measured memory_bytes: 0
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		var sc = new Scanner(System.in);
		var n = sc.nextInt();
		var x = sc.nextInt();
		var t = sc.nextInt();
		sc.close();

		var result = (int)Math.ceil(n / (double)x) * t;
		System.out.println(result);
	}
}


Measured memory_bytes: 35620
#include <algorithm>
#include <iostream>
#include <string>
int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);
  std::string s,t;
  std::cin >> s;
  std::cin >> t;

  sort(s.begin(), s.end());
  sort(t.begin(),t.end());
  reverse(t.begin(),t.end());
  if (s < t) std::cout << "Yes" << "\n";
  else std::cout << "No" << "\n";
}


Measured memory_bytes: 256
#include "iostream"
#include "cstdio"
#include "cstring"
#include "algorithm"
#include "queue"
#include "stack"
#include "cmath"
#include "utility"
#include "map"
#include "set"
#include "vector"
#include "list"
#include "string"
#include "cstdlib"
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
#define st first
#define nd second
#define exp 1e-8
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1 | 1
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const int MAXN = 1e5 + 5;
int n, a[MAXN], mi = 2;
ll ans = 0;
int main(int argc, char const *argv[])
{
	scanf("%d", &n);
	for(int i = 0; i < n; ++i)
		scanf("%d", &a[i]);
	ans = a[0] - 1;
	for(int i = 1; i < n; ++i) {
		ans += (a[i] - 1) / mi;
		if(a[i] == mi) mi = a[i] + 1;
	}
	printf("%lld\n", ans);
	return 0;
}

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

int main()
{
    char str[100001];
    scanf("%s",str);
    int l=strlen(str);
    for(int i=0;i<l;i++){
	if((i+1)%2==1)
    	    printf("%c",str[i]);
    }

    return 0;
}



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

#define rep(a,b) for(int a = 0;a < b;a++)
#define REP(i, x, n) for(int i = x; i < n; i++)
#define P(a) cout << a << endl
#define pb(a) push_back(a)
#define mp(a,b) make_pair(a,b)
#define ssort(v) sort(v.begin(),v.end())
#define rev(v) reverse(v.begin(),v.end())
#define vP(v) for(int i = 0;i < v.size();i++){cout << v[i];if(i != v.size()-1)cout << endl;}
#define vcin(v,n) rep(i,n){int a;cin >> a;v.pb(a);}

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
int dx[] = { 1, -1 , 0 , 0 };
int dy[] = { 0,  0,  1, -1 };
ll MOD = 1000000007;

void solve(){
	int n;
	cin >> n;
	ll ans = 1;
	rep(i,n){
		ans = (ans*(i+1))%MOD;
	}
	P(ans);
}

int main() {
	solve();
	return 0;
}


Measured memory_bytes: 256
#define _DEBUG 1
#define _GLIBCXX_DEBUG

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

using ll = long long;

#ifdef _DEBUG
#define dump(x) cerr << #x << "=" << x << endl
#define dump2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define dump3(x, y, z)                                                         \
  cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z     \
       << endl
#define check(s) cerr << s << endl
#else
#define dump(x)
#define dump2(x, y)
#define dump3(x, y, z)
#define check(s)
#endif

#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define unique(v) v.erase(unique(v.begin(), v.end()), v.end());

const ll LINF = 2e18;
const int INF = 1e9;

void solve(ll R) { cout << 2.000 * M_PI * R << endl; }

int main() {
  ll R;
  scanf("%lld", &R);
  solve(R);
  return 0;
}


Measured memory_bytes: 3844