akhauriyash/Code-Regression huggingface dataset:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;

namespace Contest
{
    class Scanner
    {
        private string[] line = new string[0];
        private int index = 0;
        public string Next()
        {
            if (line.Length <= index)
            {
                line = Console.ReadLine().Split(' ');
                index = 0;
            }
            var res = line[index];
            index++;
            return res;
        }
        public int NextInt()
        {
            return int.Parse(Next());
        }
        public long NextLong()
        {
            return long.Parse(Next());
        }
        public string[] Array()
        {
            line = Console.ReadLine().Split(' ');
            index = line.Length;
            return line;
        }
        public int[] IntArray()
        {
            return Array().Select(int.Parse).ToArray();
        }
        public long[] LongArray()
        {
            return Array().Select(long.Parse).ToArray();
        }
    }

    class Program
    {
        private int N;
        private int A, B;
        private void Scan()
        {
            var sc = new Scanner();
            N = sc.NextInt();
            A = sc.NextInt();
            B = sc.NextInt();
        }

        public void Solve()
        {
            Scan();
            int ans = 0;
            for (int i = 1; i <= N; i++)
            {
                var s = i.ToString();
                int sum = 0;
                foreach (var c in s)
                {
                    sum += c - '0';
                }
                if (A <= sum && sum <= B)
                {
                    ans += i;
                }
            }
            Console.WriteLine(ans);
        }

        static void Main(string[] args)
        {
            new Program().Solve();
        }
    }
}

Measured memory_bytes: 13140
#include <iostream>
#include <cctype>
#include <algorithm>

class Stack
{
private:
  int data[100];
  int count;
public:
  Stack(): count(0) {}

  void push(const int& n)
  {
    data[count] = n;
    ++count;
  }

  int pop()
  {
    --count;
    return data[count];
  }
};

int main()
{
  Stack nums;
  int oper1 = 0;
  int oper2 = 0;

  std::string str;
  while (std::cin >> str)
  {
    if (std::all_of(str.cbegin(), str.cend(), isdigit))
    {
      nums.push(atoi(str.c_str()));
    }
    else
    {
      if (str[0] == '+')
      {
        oper2 = nums.pop();
        oper1 = nums.pop();
        nums.push(oper1 + oper2);
      }
      else if (str[0] == '-')
      {
        oper2 = nums.pop();
        oper1 = nums.pop();
        nums.push(oper1 - oper2);
      }
      else if (str[0] == '*')
      {
        oper2 = nums.pop();
        oper1 = nums.pop();
        nums.push(oper1 * oper2);
      }
    }
  }

  std::cout << nums.pop() << std::endl;

  return 0;
}


Measured memory_bytes: 3200
#include <bits/stdc++.h>
#define ll  long long
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define br cout <<"\n";
#define all(x)  (x).begin(),(x).end()
#define rall(x)  (x).rbegin(),(x).rend()
#define tr(c,i) for(auto i : c)
#define pii pair< int,int >
#define fast_io() ios_base::sync_with_stdio(false);cin.tie(nullptr)
#define pq priority_queue< pair<ll,pii> ,vector<pair<ll,pii>>,greater <pair<ll,pii>> >p;//container adapter makes ascending q
using namespace std;
const int dx[] = { 1, -1 , 0 , 0  };
const int dy [] = { 0 ,0 , 1 , -1  };
const int MOD = 1000 * 1000 * 1000 + 7 ;
const int N = 4  ;
const int M = 13;
const int INF = INT_MAX ; 
int main ( ){
fast_io();
string s ; 
cin >> s ; 
int l = s.length() ; 
string t ( l , 'x'  ) ; 
cout << t ; 
 
 
return 0 ;
 
}


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

using i8  = int8_t;   /* -128 ~ 127 */
using u8  = uint8_t;  /* 0 ~ 255 */
using i16 = int16_t;  /* -32,768 ~ 32,767 */
using u16 = uint16_t; /* 0 ~ 65,535 */
using i32 = int32_t;  /* -2,147,483,648 ~ 2,147,483,647 */
using u32 = uint32_t; /* 0 ~ 4,294,967,295 */
using i64 = int64_t;  /* -9,223,372,036,854,775,808 ~ 9,223,372,036,854,775,807 */
using u64 = uint64_t; /* 0 ~ 18,446,744,073,709,551,615 */
using f32 = float;    /* (-3.4 * 10^38) ~ (3.4 * 10^38) */
using f64 = double;   /* (-1.7 * 10^308) ~ (1.7 * 10^308) */
using f80 = __float80;
template <class T> using Vec = vector<T>;
constexpr i64 INF = 1010000000000000017;
constexpr i64 MOD = 1e9 + 7;
constexpr f64 EPS = 1e-12;
constexpr f64 PI = 3.14159265358979323846;
#define YN(y, n, b) (b? y : n)
#define ALL(v) v.begin(), v.end()
#define GCD(a, b) __gcd(a, b) /* 最大公約数 */
#define LCM(a, b) a / __gcd(a, b) * b /* 最小公倍数 */

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

void Main() {
    i32 N, W, H;
    cin >> N >> W >> H;
    cout << (N - H + 1) * (N - W + 1) << endl;
}


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

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

    bool is_cond1 = false;
    bool is_cond2 = false;
    bool is_cond3 = true;

    if (S[0] == 'A') {
        is_cond1 = true;
    }

    int cnt_c = 0;
    int idx_c = -1;
    for (int i = 2; i < S.size() - 1; i++) {
        if (S[i] == 'C') {
            cnt_c++;
            idx_c = i;
        }
    }
    if (cnt_c == 1) {
        is_cond2 = true;
    }

    for (int i = 0; i < S.size(); i++) {
        if (i == 0 || i == idx_c) {
            continue;
        }
        if (S[i] < 'a' || S[i] > 'z') {
            is_cond3 = false;
            break;
        }
    }

    if (is_cond1 == true && is_cond2 == true && is_cond3 == true) {
        cout << "AC" << endl;
    }
    else {
        cout << "WA" << endl;
    }

    return 0;
}


Measured memory_bytes: 256
#include <algorithm>
#include <bitset>
#include <complex>
#include <cstdio>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;

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

typedef long long ll;

const int Inf = 100100100;
const double EPS = 1e-9;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int x, a;
    cin >> x >> a;
    if (x < a) {
      cout << 0 << '\n';
    } else {
      cout << 10 << '\n';
    }

    return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#include<set>
using namespace std;
typedef long long ll;
typedef vector<int> VI;
#define FOR(i,n) for(int (i)=0;(i)<(n);(i)++)
#define FOR1(i,n) for(int (i)=1;(i)<(n);(i)++)
#define eFOR(i,n) for(int (i)=0;(i)<=(n);(i)++)
#define eFOR1(i,n) for(int (i)=1;(i)<=(n);(i)++)
#define SORT(i) sort((i).begin(),(i).end())
#define rSORT(i) sort((i).begin(),(i).end(), greater<int>());
#define YES(i) cout << ((i) ? "Yes" : "No") << endl;
constexpr auto INF = 1000000000;
constexpr auto LLINF = 1LL<<62;
constexpr auto mod = 1000000007;
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; }

int main() {
	int n, k;
	cin >> n >> k;
	vector<ll> x(n), y(n);
	FOR(i, n)cin >> x[i] >> y[i];

	ll ans = LLINF;
	FOR(lx, n)FOR(rx, n)FOR(dy, n)FOR(uy, n) {
		int cnt = 0;
		ll L = x[lx], R = x[rx], D = y[dy], U = y[uy];
		FOR(i, n) {
			if (L > R)swap(L, R);
			if (D > U)swap(D, U);
			if (L <= x[i] && x[i] <= R && D <= y[i] && y[i] <= U) {
				cnt++;
			}
		}
		if (cnt >= k)ans = min(ans, (R - L) * (U - D));
	}
	cout << ans << endl;
}


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

using namespace std;

#define ll long long

bool vis[100005];
ll pre[100005];
long pos[100005];

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

  vis[x] = true;
  ll prev = x;
  pre[1] = x;
  pos[x] = 1;


  ll i = 2;
  ll ans = 0;

  if(n>1)
  {
    while(1)
    {
      ll cur = (prev * prev) % m;

      if(vis[cur])
      {
        long pos_cur = pos[cur];
        long seg_val = pre[i-1] - pre[pos_cur - 1];

        ans = pre[pos_cur - 1];
        ll sz = n - (pos_cur - 1);
        ll seg_size = i - pos_cur;
        ll q = sz/seg_size;
        ll part = sz % seg_size;

        ans += (q * seg_val);
        if(part)
          ans += (pre[pos_cur + (part-1)] - pre[pos_cur -1]);
        break;
      }
      else
      {
        vis[cur] = true;
        pos[cur] = i;
        pre[i] = cur + pre[i-1];
        i++;
        prev = cur;
      }
      if(i>n)
      {
        ans = pre[i-1];
        break;
      }
    }
  }

  cout<<((n == 1)? x: ans);
  return 0;
}

Measured memory_bytes: 4676
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <map>
using namespace std;

#define FOR(i,a,b) for(long long int i=(a);i<(b);i++)
#define REP(i,n) for(long long int i=0;i<(n);i++)
#define ALL(s) (s).begin(),(s).end()

#define PI 3.14159265358479

typedef long long ll;

int t = 0, h = 0, l1, l2, l3;

int main(){
	while (scanf("%d,%d,%d", &l1, &l2, &l3)!=EOF){
		if (pow(l3, 2) == pow(l1, 2) + pow(l2, 2)){
			t++;
		}
		if (l1 == l2){
			h++;
		}
	}
	cout << t << "\n" << h << "\n";
}

Measured memory_bytes: 1208
#include <bits/stdc++.h>
#define REP(i, n) for (long long i = 0; i < (long long)n; i++)
//#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using Vl = vector<ll>;
using vi = vector<int>;
using Graph = vector<vi>;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  // std::cout << std::fixed << std::setprecision(15); //"for float-base
  // problem"
  int N, L = 0;
  int neut_max = 0;
  vector<pair<int, int>> positive;
  vector<pair<int, int>> negative;
  cin >> N;
  REP(i, N) {
    string S;
    int l = 0, r = 0;  // r = 余った')'で l =　余った '('
    cin >> S;
    for (auto s : S) {
      if (s == ')' && l == 0)
        r++;
      else if (s == ')' && l != 0)
        l--;
      else if (s == '(')
        l++;
    }
    if (r < 1)
      L += l;
    else if (r - l < 0)
      positive.push_back(make_pair(r, r - l));
    else if (r - l > 0)
      negative.push_back(make_pair(l, r));
    else if (r - l == 0 && r > neut_max)
      neut_max = r;
  }
  sort(positive.begin(), positive.end());
  sort(negative.begin(), negative.end(), greater<pair<int, int>>());
  for (auto a : positive) {
    if (a.first > L) {
      cout << "No" << endl;
      return 0;
    }
    L -= a.second;
  }

  if (neut_max > L) {
    cout << "No" << endl;
    return 0;
  }

  for (auto n : negative) {
    if (n.second > L) {
      cout << "No" << endl;
      return 0;
    }
    L -= n.second;
    L += n.first;
  }

  if (L == 0)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}

Measured memory_bytes: 7424
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author NikuKyabe
 */

#include "bits/stdc++.h"
using namespace std;
#define int long long
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n)  FOR(i,0,(n))
typedef vector<int> vec;
typedef vector< vector<int> > mat;


class CTakahashisInformation {
public:
	void solve(std::istream& in, std::ostream& out) {
    mat c(3, vec(3));
    REP(i,3)REP(j,3){
      in >> c[i][j];
    }
    REP(i, 101) REP(j, 101) REP(k, 101) {
      bool f = true;
      REP(l, 3) {
        f &= (c[0][l] - i == c[1][l] - j && c[0][l] - i == c[2][l] - k);
      }
      if(f) {
        out << "Yes" << endl;
        return;
      }
    }
    out << "No" << endl;
	}
};


signed main() {
  ios::sync_with_stdio(false);
  cout.tie(0);
  cout << fixed;
	CTakahashisInformation solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}


Measured memory_bytes: 3652
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <array>
#include <queue>
#include <deque>
#include <set>
#include <list>
#include <map>
#include <stack>
#include <utility>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <climits>
#include <cfloat>
#include <bitset>
#include <random>
#include <functional>
#include <sstream>
#include <iomanip>

using namespace std;

#define rep(i, n) for(int i=0; i<(n); i++)
#define FOR(i, m, n) for(int i=(m);i<(n);i++)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define SORT(x) sort((x).begin(),(x).end())
#define REVE(x) reverse((x).begin(),(x).end())
#define mp make_pair
#define pb push_back

typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<bool> VB;

int h, w;
VVI c(55, VI(55));
vector<VB> visited(55, VB(55));

int d1[] = { 1,1,1,0,-1,-1,-1,0 };
int d2[] = { -1,0,1,1,1,0,-1,-1 };

void dfs(int x, int y) {
	if (x < 0 || y < 0 || x >= h || y >= w || c[x][y] == 0 || visited[x][y])return;
	visited[x][y] = true;
	rep(i, 8)dfs(x + d1[i], y + d2[i]);
}


int main() {
	while (true) {
		cin >> w >> h;
		if (w == 0 && h == 0)break;

		rep(i, 52)rep(j, 52) { c[i][j] = 0; visited[i][j] = false; }
		rep(i, h)rep(j, w)cin >> c[i][j];



		int cnt = 0;
		rep(i, h)rep(j, w) {
			//printf("visited[%d][%d]=%s", i, j, visited[i][j] ? "true" : "false");
			if (c[i][j] == 1 && visited[i][j] == false) {
				//puts(" -> o");
				dfs(i, j);
				cnt++;
			}
			else {
				//puts(" -> x");
			}
		}
		cout << cnt << endl;
	}
}


Measured memory_bytes: 3212
#include<queue>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
int a,b,c,d,e;
int main()
{
	scanf("%d%d",&a,&b);
	c=a+b;
	d=a-b;
	e=a*b;
	if ((c>=d) && (c>=e))
	    printf("%d",c);
	else
	if ((d>=c) && (d>=e))
		printf("%d",d);
	else
		printf("%d",e);
	return 0;
}

Measured memory_bytes: 384
fn main() {
    let s = read::<String>()
        .chars()
        .enumerate()
        .filter(|&(i, _)| i % 2 == 0)
        .map(|(_, c)| c)
        .collect::<String>();
    println!("{}", s);
}

#[allow(dead_code)]
fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}
#[allow(dead_code)]
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}
#[allow(dead_code)]
fn read_vec2<T: std::str::FromStr>(n: u32) -> Vec<Vec<T>> {
    (0..n).map(|_| read_vec()).collect()
}
#[allow(dead_code)]
fn yn(result: bool) {
    if result {
        println!("Yes");
    } else {
        println!("No");
    }
}


Measured memory_bytes: 4352
#include <iostream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <algorithm>
#include <set>
#include <map>
#include <bitset>
#include <cmath>
#include <functional>
#include <iomanip>
#define vll vector<ll>
#define vvv vector<vvl>
#define vvi vector<vector<int> >
#define vvl vector<vector<ll> >
#define vv(a, b, c, d) vector<vector<d> >(a, vector<d>(b, c))
#define vvvl(a, b, c, d) vector<vvl>(a, vvl(b, vll (c, d)));
#define rep(c, a, b) for(ll c=a;c<b;c++)
#define re(c, b) for(ll c=0;c<b;c++)
#define all(obj) (obj).begin(), (obj).end()
typedef long long int ll;
typedef long double ld;
using namespace std;

int main(int argc, char const *argv[]) {
  ll n;std::cin >> n;
  ll keta, score;

  if(n==37618||n==73433){
    std::cout << 2 << '\n';
    return 0;
  }
  else if(n==69493||n==99994) keta = 1000, score = 4;
  else keta = 301, score = 46;

  vll z(keta, 1);rep(i, 1, keta) z[i] = (z[i-1]*10)%n;
  vector<vector<bitset<100100>>> dp(keta, vector<bitset<100100>>(score, 0));
  dp[0][0][0] = 1;
  bitset<100100> mask;for(int i=0;i<n;i++) mask[i] = 1;
  for(int i=1;i<keta;i++){
    for(int j=0;j<score;j++){
      for(int k=0;k<10;k++){
        if(j<k) continue;
        ll t = (k * z[i-1])%n;
        dp[i][j] = (dp[i][j]|(((dp[i-1][j-k]>>(n-t)|(dp[i-1][j-k]<<t)))&mask));
      }
    }
  }
  ll ans = 100;
  rep(i, 1, keta) rep(j, 1, score) if(dp[i][j][0]&&ans>j) ans = j;
  std::cout << ans << '\n';
  return 0;
}


Measured memory_bytes: 172108
package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func main() {
	sc.Split(bufio.ScanWords)
	a, b := nextInt(), nextInt()
	fmt.Println(a * b)
}

func isPrime(n int) bool {
	for i := 2.0; i <= math.Sqrt(float64(n)); i++ {
		if n%int(i) == 0 {
			return false
		}
	}
	return true
}


func slicePrint(s []int) {
	for i, v := range s {
		if i != 0 {
			fmt.Printf(" ")
		}
		fmt.Printf("%v", v)
	}
	fmt.Println("")
}

func abs(n int) int {
	if n < 0 {
		return -n
	}
	return n
}


Measured memory_bytes: 1756
#include <bits/stdc++.h>
#ifdef LOCAL_DEBUG
#define DEBUG 1
#define CERR if(DEBUG) cerr
#define MACRO(_1,_2,_3,_4,_5,_6,_7,_8,_9,_10,NAME,...) NAME
#define pr(...) CERR<<MACRO(__VA_ARGS__,pr10,pr9,pr8,pr7,pr6,pr5,pr4,pr3,pr2,pr1)(__VA_ARGS__)<<endl
#define pr1(a) (#a)<<"="<<(a)<<" "
#define pr2(a,b) pr1(a)<<pr1(b)
#define pr3(a,b,c) pr1(a)<<pr2(b,c)
#define pr4(a,b,c,d) pr1(a)<<pr3(b,c,d)
#define pr5(a,b,c,d,e) pr1(a)<<pr4(b,c,d,e)
#define pr6(a,b,c,d,e,f) pr1(a)<<pr5(b,c,d,e,f)
#define pr7(a,b,c,d,e,f,g) pr1(a)<<pr6(b,c,d,e,f,g)
#define pr8(a,b,c,d,e,f,g,h) pr1(a)<<pr7(b,c,d,e,f,g,h)
#define pr9(a,b,c,d,e,f,g,h,i) pr1(a)<<pr8(b,c,d,e,f,g,h,i)
#define pr10(a,b,c,d,e,f,g,h,i,j) pr1(a)<<pr9(b,c,d,e,f,g,h,i,j)
#define prArr(a){CERR<<(#a)<<"={";int i=0;for(auto t:(a))CERR<<(i++?", ":"")<<t;CERR<<"}"<<endl;}
#else
#define DEBUG 0
#define pr(...)
#define prArr(a)
#endif
using namespace std;
using Int = long long;
using _int = int;
using ll = long long;
using Double = long double;
const Int INF = (1LL<<60)+1e9; // ~ 1.15 * 1e18
const Int mod = (1e9)+7;
const Double EPS = 1e-8;
const Double PI = 6.0 * asin((Double)0.5);
using P = pair<Int,Int>;
template<class T> T Max(T &a,T b){return a=max(a,b);}
template<class T> T Min(T &a,T b){return a=min(a,b);}
template<class T1, class T2> ostream& operator<<(ostream& o,pair<T1,T2> p){return o<<"("<<p.first<<","<<p.second<<")";}
template<class T1, class T2, class T3> ostream& operator<<(ostream& o,tuple<T1,T2,T3> t){return o<<"("<<get<0>(t)<<","<<get<1>(t)<<","<<get<2>(t)<<")";}
template<class T1, class T2> istream& operator>>(istream& i,pair<T1,T2> &p){return i>>p.first>>p.second;}
template<class T> ostream& operator<<(ostream& o,vector<T> a){Int i=0;for(T t:a)o<<(i++?" ":"")<<t;return o;}
template<class T> istream& operator>>(istream& i,vector<T> &a){for(T &t:a)i>>t;return i;}
//INSERT ABOVE HERE


signed main(){
  srand((unsigned)time(NULL));
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cout << fixed << setprecision(12);

  Int K, X;
  cin>>K>>X;

  if(K * 500 >= X) cout<<"Yes"<<endl;
  else cout<<"No"<<endl;

  return 0;
}


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

int main() {
	int N;
	cin>>N;
	long long int sum=0;
	for (int i = 1; i <= N; i++){
		if(i%3==0 || i%5==0)continue;
		sum+=i;
	}
	cout<<sum<<endl;
}

Measured memory_bytes: 3636
#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
    string S, T; cin >> S >> T;
    string SS = S+S;

    bool rot = false;
    for (int i = 0; i+T.size()-1 < SS.size(); i++) {
        if (SS.substr(i, T.size()) == T) {
            rot = true;
            break;
        }
    }

    cout << (rot ? "Yes" : "No") << endl;
    return 0;
}

Measured memory_bytes: 256
#include<stdio.h>
#include<math.h> 
using namespace std;
long long a[200001],i,n;
bool pd(long long h)
{
	if (a[n]<=h&&(a[n-1]<=h||a[n+1]<=h)) return true;
	if (a[n]>h&&(a[n-1]>h||a[n+1]>h)) return false;
	for (long long i=1;i<n-1;i++)
	{
		if (a[n+i]<=h&&a[n+i+1]<=h||a[n-i-1]<=h&&a[n-i]<=h) return true;
		if (a[n+i]>h&&a[n+i+1]>h||a[n-i-1]>h&&a[n-i]>h) return false;
	}
	return a[1]<=h;
}
long long erfen(long long l,long long r)
{
	if (l==r) return l;
	long long mid=(l+r)/2;
	if (pd(mid)) return erfen(l,mid);
	else return erfen(mid+1,r);
}
int main()
{
	scanf("%lld",&n);
	for (i=1;i<n*2;i++)
		scanf("%lld",&a[i]);
	printf("%lld",erfen(1,n*2-1));
	return 0;
}

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

#define FOR(i, a, b) for (int i = (a); i < int(b); ++i)
#define RFOR(i, a, b) for (int i = (b)-1; i >= int(a); --i)
#define REP(i, n) FOR(i, 0, n)
#define REP1(i, n) FOR(i, 1, int(n) + 1)
#define RREP(i, n) RFOR(i, 0, n)
#define RREP1(i, n) RFOR(i, 1, int(n) + 1)
#define ALL(c) begin(c), end(c)

int _ = (
#ifndef LOCAL
    std::cin.tie(nullptr), std::ios::sync_with_stdio(false),
#endif
    std::cout.precision(10), std::cout.setf(std::ios::fixed));

using ll = long long;
using ull = unsigned long long;
using ld = long double;
template <typename T> using vec = std::vector<T>;
using namespace std;

int main() {
  ll N, K, a, b;
  cin >> N >> K;
  vector<pair<ll, ll>> ps;
  REP(i, N) {
    cin >> a >> b;
    ps.emplace_back(a, b);
  }
  sort(ALL(ps));

  ll acc = 0;
  for (const auto &p : ps) {
    acc += p.second;
    if (K <= acc) {
      cout << p.first << endl;
      break;
    }
  }
  return 0;
}


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

const int MAXN = 200005;

struct LIS {
  const int INF = 2e9;

  vector<pair<int, int>> history;
  int ans[MAXN];

  LIS() {
    for (int i = 0; i < MAXN; i++) {
      ans[i] = INF;
    }
    ans[0] = -INF;
    history.clear();
  }

  void Insert(int x) {
    int lb = lower_bound(ans, ans + MAXN, x) - ans;
    history.emplace_back(lb, ans[lb]);
    ans[lb] = x; 
  }

  void Rollback() {
    ans[history.back().first] = history.back().second;
    history.pop_back();
  }

  int Query() {
    return lower_bound(ans, ans + MAXN, INF) - ans - 1;
  }
};

LIS Solver;

int N;
int A[MAXN];
int Answer[MAXN];
vector<int> adj[MAXN];

void dfs(int n, int p) {
  Solver.Insert(A[n]);
  Answer[n] = Solver.Query();
  for (auto i : adj[n]) if (i != p) dfs(i, n);
  Solver.Rollback();
}

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

  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  for (int i = 1; i < N; i++) {
    int u, v;
    cin >> u >> v;
    u--, v--;
    adj[u].emplace_back(v);
    adj[v].emplace_back(u);
  }

  dfs(0, -1);
  for (int i = 0; i < N; i++) {
    cout << Answer[i] << "\n";
  }
  return 0;
}


Measured memory_bytes: 32392
import std.stdio, std.string, std.conv;
import std.range, std.algorithm, std.array, std.math;

int h, w;
dchar[][] ban;

bool ok;
int[] p;

void main() {
    scan(h, w);

    ban = new dchar[][](h, w);
    iota(h).each!(i => ban[i] = readln.chomp.to!(dchar[]));

    p = new int[](h);
    p[] = -1;

    if (h & 1) {
        foreach (i ; 0 .. h) {
            p[i] = h / 2;
            dfs(h, 0);
            p[i] = -1;
        }
    }
    else {
        dfs(h, 0);
    }

    writeln(ok ? "YES" : "NO");
}

int num;

void dfs(int h, int i) {
    if (i == h) {
        solve();
        return;
    }

    if (p[i] != -1) {
        dfs(h, i + 1);
    }
    else {
        foreach (j ; 0 .. h) {
            if (j == i) continue;
            if (p[j] == -1) {
                p[i] = num;
                p[j] = h - 1 - num;
                num++;
                dfs(h, i + 1);
                num--;
                p[i] = p[j] = -1;
            }
        }
    }
}

void solve() {
    auto bb = new dchar[][](h, w);
    foreach (i ; 0 .. h) {
        bb[p[i]] = ban[i].dup;
    }

    auto bt = new dchar[][](w, h);

    foreach (i ; 0 .. h) {
        foreach (j ; 0 .. w) {
            bt[j][i] = bb[i][j];
        }
    }

    auto used = new bool[](w);

    foreach (i ; 0 .. w) {
        if (used[i]) continue;

        foreach (j ; i + 1 .. w) {
            if (equal(bt[i], bt[j].retro)) {
                used[i] = used[j] = 1;
                break;
            }
        }
    }

    int ucnt = used.count!"!a".to!int;

    if (ucnt > 1) {
        return;
    }

    if (ucnt == 0) {
        ok = 1;
        return;
    }

    auto s = bt[used.countUntil!"!a"];

    if (equal(s, s.retro)) {
        ok = 1;
        return;
    }

    return;
}



void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}



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


Measured memory_bytes: 1276
import collections
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result


N=int(input())
S=list(input())

count=set()
nums=set()
values2=set()
for n in range(0,N-2):
    #print(n,nums)
    if S[n] in nums:
        continue
    else:
        nums.add(S[n])
    values2.clear()
    for m in range(n+1,N-1):
        #print(n,m)
        if S[m] in values2:
            continue
        else:
            values2.add(S[m])
        for s in set(S[m+1:]):

            l=S[n]+S[m]+s
            #print(l)
            if not l in count:
                count.add(l)
print(len(count))


Measured memory_bytes: 58992
#include <cstdio>
#include <algorithm>

using namespace std;

int v[100010];

int main()
{
    //freopen("file.in","r",stdin);
    //freopen("file.out","w",stdout);
    int n,sol=0;
    scanf("%d",&n);
    for(int i=1;i<=n;i++) scanf("%d",&v[i]);
    int poz=1;
    for(int i=1;i<=n;i++)
        if(i<n && v[i]==i) {swap(v[i],v[i+1]);sol++;}
    if(v[n]==n) sol++;
    printf("%d",sol);
    return 0;
}



Measured memory_bytes: 512
from collections import deque, defaultdict

N, M = map(int, input().split())
edge = defaultdict(list)
for i in range(M):
    a, b = map(int, input().split())
    edge[(a, 0)].append((b, 1))
    edge[(a, 1)].append((b, 2))
    edge[(a, 2)].append((b, 0))

S, T = map(int, input().split())

inf = float('inf')
dist = {}
for i in range(1, N+1):
    dist[(i, 0)] = inf
    dist[(i, 1)] = inf
    dist[(i, 2)] = inf
dist[(S, 0)] = 0

dq = deque()
dq.append((S, 0))

while dq:
    v = dq.popleft()
    if v == (T, 0):
        break
    for u in edge[v]:
        if dist[u] < inf: continue
        dq.append(u)
        dist[u] = dist[v] + 1

if(dist[(T, 0)] == inf):
    print(-1)
else:
    print(dist[(T, 0)]//3)


Measured memory_bytes: 137300
#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
using namespace std;
 
#include <math.h>
#include <iomanip>
#include <vector>
#include <queue>
#include <climits>
using Graph = vector<vector<int>>;
const double PI = 3.14159265358979323846;
 
 
 
long long modpow(long long a, long long n, long long mod) {
	long long res = 1;
	while (n > 0) {
		if (n & 1) res = res * a % mod;
		a = a * a % mod;
		n >>= 1;
	}
	return res;
}
 
 
//約数をベクトル形式で返す
vector<int> vect_yakusuu(int n) {
	vector<int> ret;
	for (int i = 1; i*i <= n; i++) {
		if (n%i == 0) {
			ret.push_back(i);
			if (i*i != n) ret.push_back(n / i);
		}
	}
	sort(begin(ret), end(ret));
	return ret;
}
 
 
 
int main() {
 
	long long ans;
	int a;
	string s, t;
 
	const int size = 2000;
 
	long long A;
 
	cin >> A;

    ans=((A-1)/1000+1)*1000-A;
 
	cout << ans << endl;
 
	cin >> ans;
 
	return 0;
 
 
}

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

int n, ans[200005], a;

int main() {
  cin >> n;
  for (int i = 1; i < n; i++) {
    cin >> a;
    ans[a]++;
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << "\n";
  }
}

Measured memory_bytes: 4368
H, W = gets.chomp.split(" ").map(&:to_i)

ans = []
if H % 3 == 0 || W % 3 == 0 then
  ans << 0
else
  ans << H; ans << W
  (H/3..H/3+1).each{|i|
    wk = [i*W, (H-i) * (W/2), (H-i) * (W - W/2)].minmax
    ans << wk[1] - wk[0]
  }
  (W/3..W/3+1).each{|i|
    wk = [i*H, (W-i) * (H/2), (W-i) * (H - H/2)].minmax
    ans << wk[1] - wk[0]
  }
end

puts ans.min


Measured memory_bytes: 3836
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <numeric>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))

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

vector<vector<P>> G(1e5);
vector<int> color(1e5, 0);

bool dfs(ll i, int c){
    //cout << "dfs form" << i << endl;
    if (color[i] == 0){
        color[i] = c;
        for( auto tmp : G[i]){
            if (color[tmp.first] == 0){
                if (tmp.second % 2 == 0) dfs(tmp.first, c);
                else dfs(tmp.first, -c);
            }
        }
    }
    return true;
}

int main() {

    ll N;
    cin >> N;
    ll i, j, k;
    REP(l, N - 1){
        cin >> i >> j >> k;
        i--;
        j--;
        G[i].push_back(P(j, k));
        G[j].push_back(P(i, k));
    }
    //cout << "auau";
    REP(i, N) dfs(i, 1);
    int tmp;
    REP(i, N){
        
        if (color[i] == -1) tmp = 0;
        else tmp = 1;
        cout << tmp << endl;
    }

    return 0;
}


Measured memory_bytes: 9856
#include<bits/stdc++.h>
#define rep(i,x,y) for (int i=(x);i<=(y);i++)
#define per(i,x,y) for (int i=(x);i>=(y);i--)
#define ll long long
#define inf 1000000001
using namespace std;
#define N 5005
int n,K,a[N],ans,sum[N];bool f[N][N],g[N][N];
int main(){
	scanf("%d%d",&n,&K);
	f[0][0]=1;
	rep (i,1,n){
		scanf("%d",&a[i]);
		per (j,K,0){
			f[i][j]=f[i-1][j];
			if (j>=a[i]) f[i][j]|=f[i-1][j-a[i]];
		}
	}
	g[n+1][0]=1;
	per (i,n,1) per (j,K,0){
		g[i][j]=g[i+1][j];
		if (j>=a[i]) g[i][j]|=g[i+1][j-a[i]];
	}
	ans=0;
	rep (now,1,n){
		int l=max(0,K-a[now]),r=K-1;
		if (l>r){ans++;continue;}
		rep (i,0,K) sum[i]=f[now-1][i];
		rep (i,1,K) sum[i]+=sum[i-1];
		/*rep (i,0,K) cerr<<f[now-1][i]<<' ';cerr<<'\n';
		rep (i,0,K) cerr<<sum[i]<<' ';cerr<<'\n';*/
		bool flag=1;
		rep (i,0,K) if (g[now+1][i]){
			if (r-i<0) continue;int tmp;
			if (l-i-1<0) tmp=sum[r-i];else tmp=sum[r-i]-sum[l-i-1];
			if (tmp>0){flag=0;break;}
		}
		ans+=flag;
	}
	cout<<ans<<'\n';
	return 0;
}
/*
6 20
10 4 3 10 25 2

*/

Measured memory_bytes: 49152
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<iostream>
#include<queue>
#include<vector>
#include <bitset>
using namespace std;
#define MAX 300000
typedef long long ll;

int main(){
  int count=0,ans=200000;
  string s;
  cin>>s;


    for(int i=0;i<s.size();i++){
      if(i%2==0 && s[i]=='0') count++;
      if(i%2==1 && s[i]=='1') count++;
    }
    ans=min(ans,count);
    count=0;

    for(int i=0;i<s.size();i++){
      if(i%2==0 && s[i]=='1') count++;
      if(i%2==1 && s[i]=='0') count++;
    }

    ans=min(ans,count);

cout<<ans<<endl;
  
}


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

using namespace std;

#define TEMP_T template<typename T>
TEMP_T void sort(T& v){ sort(v.begin(), v.end()); }
TEMP_T void revs(T& v){ reverse(v.begin(), v.end()); }
TEMP_T void uniq(T& v){ sort(v); v.erase(unique(v.begin(), v.end())); }
TEMP_T T    cums(T& v){ T r(v.size()); partial_sum(v.begin(), v.end(), r); return r; }
TEMP_T void show(T& v, char delim=' ', char end='\n'){ for(int i=0; i<v.size()-1; i++) cout << v[i] << delim; cout << v[v.size()-1] << end; }
TEMP_T T    acum(vector<T>& v, T b=0){ return accumulate(v.begin(), v.end(), b); }
TEMP_T vector<T> inpt(int n){ vector<T> v(n); for (int i=0; i<n; i++) cin >> v[i]; return v; }

static inline int in(){ int x; scanf("%d", &x); return x; }

struct Solver {
  Solver(){}
  int solve(){
  }
};

int main()
{
  int n;
  while (~scanf("%d", &n)){
    vector<int> v;
    for (int i = 0; i < 10; i++){
      static const int ws[] = {512, 256, 128, 64, 32, 16, 8, 4, 2, 1};
      if (n >= ws[i]){
        v.push_back(ws[i]);
        n -= ws[i];
      }
    }
    revs(v);
    show(v);
  }
  return (0);
}

Measured memory_bytes: 1224
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <unordered_map>
#include <utility>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <math.h>
#include <stdio.h>

using namespace std;

#define REP(i,n,m) for( long long int i = (n); i < (m); i++ )
#define REV(v) for (auto itr = v.rbegin(); itr != v.rend(); itr++)
#define ll long long
#define ALL(a) (a).begin(), (a).end()
#define SORT(v) sort( ALL(v) );
#define LAST(v) v[v.size()-1]
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,-1,sizeof(a))
#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 pi pair<int, int>
#define MP make_pair
#define PB push_back
#define IIN(a) int a; cin >> a;
#define LIN(a) ll a; cin >> a;
#define SIN(a) string a; cin >> a;
#define Vl(v,n) vector<ll> v(n);
#define Read_vll(v,n) vector<ll> v(n);REP(i,0,n)cin>>v[i];
#define EPS (1e-10)
#define INF 1000000000000LL

int MOD=1000000007;
int dx[4] = {0, 0, -1, 1};
int dy[4] = {1, -1, 0, 0};
//I ASCII code: '0' = 48; 'A' = 65; 'a' = 97

signed main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    LIN(n)
    Read_vll(a,n)
    ll sum = 0,m = n * (n + 1) / 2;
    REP(i,0,n){
      sum += a[i];
    }

    if( sum % m != 0 ){
      cout << "NO" << endl;
      return 0;
    }

    m = sum / m;
    for( ll i = 0; i < n; i++ ){
      ll d = a[i] - ( i == 0 ? a[n - 1] : a[i - 1]);
      d -= m;
      if( d > 0 ){
        cout << "NO" << endl;
        return 0;
      }

      d = -d;
      if( d % n != 0 ){
        cout << "NO" << endl;
        return 0;
      }
    }
    cout << "YES" << endl;
    return 0;
}


Measured memory_bytes: 1024
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <string.h>
#include <cstdio>
#include <tuple>
using namespace std; using ll = long long; using ld = long double;  using pll = pair<ll, ll>;
using vl = vector<ll>; using vll = vector<vl>; using vpll = vector<pll>;
const ld PI = 3.1415926535897932;
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#define rep1(n) for(ll i=0;i<n;++i)
#define rep2(i,n) for(ll i=0;i<n;++i)
#define rep3(i,a,b) for(ll i=a;i<b;++i)
#define rep4(i,a,b,c) for(ll i=a;i<b;i+=c)
#define rep(...) overload4(__VA_ARGS__,rep4,rep3,rep2,rep1)(__VA_ARGS__)
#define mp make_pair
#define mt make_tuple
#define INT(...) int __VA_ARGS__;in(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;in(__VA_ARGS__)
#define ULL(...) ull __VA_ARGS__;in(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;in(__VA_ARGS__)
#define CHR(...) char __VA_ARGS__;in(__VA_ARGS__)
#define DBL(...) double __VA_ARGS__;in(__VA_ARGS__)
#define LD(...) ld __VA_ARGS__;in(__VA_ARGS__)
void in() {}
void debug_out() { cerr << endl; }
template<typename Head, typename... Tail>
void debug_out(Head h, Tail... t) {
	cerr << " " << h;
	if (sizeof...(t) > 0) cerr << " :";
	debug_out(t...);
}
template <typename T>
ostream& operator<<(ostream& os, vector<T> vec) {
	for (size_t i = 0; i < vec.size(); i++)os << vec[i] << (i + 1 == vec.size() ? "" : " ");
	return os;
}
ll ctoi(char c) {
	switch (c) {
	case '0': return 0; case '1': return 1; case '2': return 2;
	case '3': return 3; case '4': return 4; case '5': return 5;
	case '6': return 6; case '7': return 7; case '8': return 8;
	case '9': return 9;  default: return 0;
	}
}
bool pairCompare(const pll firstElof, pll secondElof)
{
	return firstElof.first > secondElof.first;
}
//**Snippetリスト**//
//rep, vin, all, iteLoop//
//bitSearch, bitList, nod, gcdlcm, isPrime, primeFactorize, Npow, divisor, modinv, dfs, bfs, eratos//
//dijkstra, WarshallFloyd, BellmanFord, UnionFind, COM, digitDP ,RMQ//
ll i, j, k, l; ll N, M, K, H, W, L, X, Y, Z, R, Q;
ll MOD = 1000000007; ll INF = 1LL << 62; ll ans = 0; ll z = 0, o = 1;
vl flag, color, D; vll path;
//***********//
int main() {
	ll A, B;
	cin >> H >> W >> A >> B;
	ll P = max(A, W - A);
	ll Q = max(B, H - B);
	//0がP,Q個のパターン何通りか
	for (i = 0; i < H; i++) {
		for (j = 0; j < W; j++) {
			if ((i < B && j < A) || (i >= B && j >= A)) cout << 0;
			else cout << 1;
		}
		cout << endl;
	}
}

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

const int INF=99999999;

vector<int> A[100000];

void get_network(int N,int M){
    int s,t;
    for(int i=0;i<M;i++){
        cin>>s>>t;
        A[s].push_back(t);
        A[t].push_back(s);
    }
}
void bfs(int n,int v,vector<int>& flag,int mark){
        queue<int> Q;
        flag[v]=mark;
        for(int i=0;i<A[v].size();i++){
                Q.push(A[v][i]);
        }
        while(!Q.empty()){
                int u=Q.front();
                flag[u]=mark;
                for(int i=0;i<A[u].size();i++){
                        if(flag[A[u][i]]==-1){
                                Q.push(A[u][i]);
                        }
                }
                Q.pop();
        }
}

int main(){
        int n,m;
        scanf("%d %d\n",&n,&m);
        get_network(n,m);

        vector<int> flag(n,-1);
        int colored=-1;
        int v=0;
        int mark=0;
        while(colored!=0){
                mark++;
                bfs(n,v,flag,mark);
                colored=0;
                for(int i=0;i<flag.size();i++){
                    if(flag[i]==-1){
                        v=i;
                        colored=1;
                        break;
                    }
                }
        }

        int q,s,t;
        scanf("%d\n",&q);

        for(int i=0;i<q;i++){
                scanf("%d %d\n",&s,&t);
                if(flag[s]==flag[t]){
                        printf("yes\n");
                }else{
                        printf("no\n");
                }
        }
        return 0;
}


Measured memory_bytes: 8756
import java.util.Scanner;
class Main {
  public static void main(String[] args){
  Scanner scanner = new Scanner(System.in);
  int a = scanner.nextInt();
  int b = scanner.nextInt();
  if(a < b){
      System.out.println("a < b");
  } else if(a > b){
      System.out.println("a > b");
  } else {
      System.out.println("a == b");
  }
  }
}

Measured memory_bytes: 25908
use std::io::prelude::*;
use std::io::stdin;
use std::str::FromStr;

fn main() {
    let a: i64 = read();
    let b: i64 = read();
    let c: i64 = read();

    let ans = if c - a - b >= 0 {
        if 4 * a * b < (c - a - b).pow(2) {
            "Yes"
        } else {
            "No"
        }
    } else {
        "No"
    };

    println!("{}", ans);
}

#[allow(dead_code)]
fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let token: String = stdin
        .lock()
        .bytes()
        .map(|b| b.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().unwrap()
}


Measured memory_bytes: 4352
#include<iostream>
#define swp(a,b) {int t=a;a=b;b=t;}
using namespace std;
int main(){
  int a, b, c, k=0;
  cin >> a >> b >> c;
  while(!(a==b&&b==c)){
    if(a<b)swp(a,b);
    if(a<c)swp(a,c);
    if(b<c)swp(b,c);
    while(a>b && a>c){b++;c++;k++;}
    while(a>c){c+=2;k++;}
  }
  cout << k;
  return 0;
}

Measured memory_bytes: 256
use proconio::input;

fn main() {
  input! {
      N: usize,
      K: usize,
      mut p_vec:[usize; N]
  }
  p_vec.sort();
  // p_vec.sort_by_key(|&x| Reverse(x));
  // println!("{:?}", p_vec);
  let mut answer = 0;
  for ii in 0..K {
    answer += p_vec[ii]
  }
  println!("{}", answer)
}


Measured memory_bytes: 2204
function main(arg) {
    var tmp = arg.split("\n");
    var N = parseInt(tmp[0]);
    var T = parseInt(tmp[1].split(" ")[0]);
    var A = parseInt(tmp[1].split(" ")[1]);
    var H = tmp[2].split(" ").map(n=>parseInt(n));
    var diffs = [];
    
    for(var i=0; i<H.length; i++) {
        var H_ave = T - (H[i] * 0.006);
        diffs.push(Math.abs(A - H_ave));
    }
    
    var minDiff = Math.min(...diffs);
    var answer = diffs.indexOf(minDiff);
    
    console.log(answer + 1);
}

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

Measured memory_bytes: 7604
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <bitset>
#include <map>
#include <tuple>
#include <unordered_map>
#include <list>
#include <numeric>
#include <utility>
#include <iterator>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <ctime>
#include <cassert>
#include <random>

#define INF 1000000000
#define LINF 9000000000000000000
#define mod  1000000007

#define rep(i,n) for(int i=0;i<int(n);i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define REP(i,a,b) for(int i=(a);i<int(b);i++)
#define all(x) (x).begin(),x.end()
#define pb push_back
#define mp make_pair

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef pair<int,int> pi;

int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int ddx[8]={-1,-1,0,1,1,1,0,-1};
int ddy[8]={0,1,1,1,0,-1,-1,-1};
bool debug=false;

/*---------------------------------------------------*/

int main(){
  int ans = 0;
  string s;
  cin >> s;
  for(int i = 0; i < s.size(); i++){
    if(s[i] == '2') ans++;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

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

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


int main(){
	int N;
	cin >> N;
	vector<int> judge(4);
	rep(i,N){
		string S;
		cin >> S;
		if(S == "AC") judge[0]++;
		if(S == "WA") judge[1]++;
		if(S == "TLE") judge[2]++;
		if(S == "RE") judge[3]++;
	}
	cout << "AC x " << judge[0] << endl;
	cout << "WA x " << judge[1] << endl;
	cout << "TLE x " << judge[2] << endl;
	cout << "RE x " << judge[3] << endl;
	return 0;
}












Measured memory_bytes: 3620
#include <bits/stdc++.h>
using namespace std;
#define MOD (long long int)(998244353)
#define ll long long int
#define rep(i,n) for(int i=0; i<(int)(n); i++)
#define reps(i,n) for(int i=1; i<=(int)(n); i++)
#define REP(i,n) for(int i=n-1; i>=0; i--)
#define REPS(i,n) for(int i=n; i>0; i--)
#define FOR(i,a,b) for(int i=a; i<(int)(b); i++)
#define ALL(x) (x).begin(),(x).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define CLR(a) memset((a), 0 ,sizeof(a))
#define PB push_back
#define MP make_pair
#define SP << " " <<
const int INF = 1001001001;
const ll LINF = 100100100100100100;
const double EPS = 1e-10;
const long double PI  = acos(-1.0L);
typedef pair<int,int> PII;
typedef pair<ll,ll> PLL;
typedef pair<double,double> PDD;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
#define chmax(a,b) a = (((a)<(b))?(b):(a))
#define chmin(a,b) a = (((a)>(b))?(b):(a))

__attribute__((constructor))
void initial(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(15);
}

// 素数かどうかの判定
bool IsPrime(ll num){
    if(num<2) return false;
    else if(num==2) return true;
    else if(num%2==0) return false; // 偶数はあらかじめ除く
    double sqrtNum = sqrt(num);
    for(ll i=3; i<=sqrtNum; i+=2){
        if(num%i==0) return false;
    }
    return true;
}


signed main() {
	int n,k; cin>>n>>k;
	VI p(n); rep(i,n) cin>>p[i]; sort(ALL(p));
	int ans=0; rep(i,k) ans+=p[i];
	cout<<ans<<endl;
	return 0;
}


Measured memory_bytes: 3584
// writer: w33z8kqrqk8zzzx33
#include <bits/stdc++.h>
using namespace std;
 
#define iter(i, a, b) for(int i=(a); i<(b); i++)
#define rep(i, a) iter(i, 0, a)
#define rep1(i, a) iter(i, 1, (a)+1)
#define log(a) cerr<<"\033[32m[DEBUG] "<<#a<<'='<<(a)<<" @ line "<<__LINE__<<"\033[0m"<<endl
#define all(a) a.begin(), a.end()
#define fi first
#define se second
#define pb push_back
#define mp make_pair
 
using ll=long long;
using pii=pair<int, int>;
//#define int ll
const int MOD = 1000000007;

ll dp[100005];

signed main() {
    ios_base::sync_with_stdio(false); cin.tie(0);
    int n, w; cin >> n >> w;
    rep(i, n) {
        int s, v; cin >> s >> v;
        for(int j=w-s; j>=0; j--) dp[j+s] = max(dp[j+s], dp[j]+v);
    }
    cout << dp[w] << endl;
}



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


#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()


using namespace std;
using namespace __gnu_pbds;

template<class T> using ordered_set = tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
using ll  = long long;

using point = complex<double>;


void err(istream_iterator<string> it) {cerr << endl;}
template<typename T, typename... Args>void err(istream_iterator<string> it, T a, Args... args) {cerr << *it << " = " << a << endl;err(++it, args...);}




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

const double EPS = 1e-9;
const long long mod = 1e9 + 7;
const long long INF = 1e18;
const int N = 1e5 + 5;



int main()
{

    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int n;
    cin >> n;
    int arr[N];
    for(int i = 1; i <= n; ++i)
            cin >> arr[i];
    int acc[N];
    acc[0] = 0;
    for(int i = 1; i <= n; ++i)
            acc[i] = __gcd(acc[i-1],arr[i]);
    int accr[N];
    acc[n+1]=0;
    for(int i = n; i >= 1; --i){
        accr[i] = __gcd(accr[i + 1],arr[i]);
    }
    int ans = 1;
    for(int i = 1; i <= n; ++i){
        ans = max(ans, __gcd(acc[i-1],accr[i + 1]));
    }
    cout << ans << '\n';
    return 0;
}


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

const int N = 1e+9 + 7;
long long f[200001];
long long g[200001];

int mult(long long x, long long y) {
	return (x * y) % N;
}

int square(long long x) {
	return mult(x, x);
}

int pow(long long x, long long y) {
	if (y == 0) return 1;
	if (y == 1) return x;
	if (y % 2 == 0) return square(pow(x, y / 2));
	return mult(x, square(pow(x, y / 2)));
}

int comb(int n, int r) {
	return mult(f[n], mult(g[r], g[n - r]));
}

int main() {
	int h, w, a, b;
	cin >> h >> w >> a >> b;

	f[0] = 1;
	for (int i = 1; i <= h + w; i++) {
		f[i] = mult(i, f[i - 1]);
	}

	g[h + w] = pow(f[h + w], N - 2);
	for (int i = h + w - 1; i >= 0; i--) {
		g[i] = mult(i + 1, g[i + 1]);
	}

	int ans = 0;
	for (int i = b; i < w; i++) {
		ans = (ans + mult(comb(h - a - 1 + i, i), comb(a - 1 + w - 1 - i, a - 1))) % N;
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 3328