akhauriyash/Code-Regression huggingface dataset:
#include<iostream>
#include<string>
#include<vector>
#include<queue>
#include<stack>
#include<map>
#include<set>
#include<algorithm>
#include<string>
#include<math.h>
 
using namespace std;
 
int main(){
    int N,M;
    int ans = 0;

    cin >> N >> M;

    for(int i = 1;i * i <= M ;i++){
        if(M % i)continue;

        int x = M / i;

        if(M / x >= N)ans = max(x,ans);
        if(M / i >= N)ans = max(i,ans);
    }
    
    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 256
w, h, x, y = (int(c) for c in input().split())

if x == w and y == h:
    print((w * h) / 2)
    print(0)

elif x == w/2 and y == h/2:
    print((w * h) / 2)
    print(1)

elif x != w/2 or y != h/2:
    print((w * h) / 2)
    print(0)

elif x != w/2 and y != h/2:
    print((w * h) / 2)
    print(0)

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


int main(){
  long long n,t,i;
  cin >> n >> t;
  vector<long long> ti(n);
  for(i=0;i<n;++i){
    cin >> ti[i];
  }
  long long ans=0;
  bool bet=false;
  for(i=0;i<n-1;++i){
    ans+=min(t,ti[i+1]-ti[i]);
  }
  ans+=t;
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 1792
#include <algorithm>
#include <iostream>
#include <queue>

#define MAXN 10000
#define MAXM 100000

using namespace std;

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

  struct {
    int to, next;
  } E[MAXM];
  vector<int> LE(MAXN, -1);

  int n, m;
  cin >> n >> m;
  for (int i = 0, s, t; i < m; ++i) {
    cin >> s >> t;
    E[i] = {t, LE[s]};
    LE[s] = i;
  }

  int indegree[MAXN]{0};
  for (int e = 0; e < m; ++e)
    ++indegree[E[e].to];

  queue<int> sources;
  for (int i = 0; i < n; ++i)
    if (indegree[i] == 0)
      sources.push(i);

  int seen = 0;
  while (seen < n) {
    int curr = sources.front();
    sources.pop();
    ++seen;
    cout << curr << endl;
    for (int e = LE[curr]; e != -1; e = E[e].next) {
      --indegree[E[e].to];
      if (indegree[E[e].to] == 0)
        sources.push(E[e].to);
    }
  }
}


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

using namespace std;
#define DBG(x)                         \
    (void)(cout << "L" << __LINE__     \
                << ": " << #x << " = " \
                << (x) << '\n')
#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))
typedef long long ll;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const long double PI = (acos(-1));
const long double EPS = 0.0000000001;
const int INF = 0x3f3f3f3f;
const int maxn = 1100000;
int a[maxn];
int cnt[maxn];
void run_case()
{
    int n;
    cin >> n;
    int g = 0;
    for (int i = 1; i <= n; i++)
    {
        int x;
        cin >> x;
        g = __gcd(g, x);
        a[x]++;
    }
    //DBG(g);
    bool ok = 1;
    for (int i = 2; i < maxn; i++)
    {
        for (int j = i; j < maxn; j += i)
        {
            cnt[i] += a[j];
        }
        if (cnt[i] > 1)
            ok = 0;
    }
    if (ok)
        cout << "pairwise coprime\n";
    else if (g == 1)
        cout << "setwise coprime\n";
    else
        cout << "not coprime\n";
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << setiosflags(ios::fixed) << setprecision(12);
    run_case();
    cout.flush();
    return 0;
}

Measured memory_bytes: 11856
using System;
using System.Collections.Generic;
using System.Linq;

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            //[summary]C - Multiple Gift
            var line = ReadLine();
            long x = line[0];
            long y = line[1];

            int count = 0;
            long n = x;

            while (n <= y)
            {
                //Console.WriteLine(n);
                count++;
                n *= 2;
            }

            Console.WriteLine(count);
        }

        static List<long> ReadLine()
        {
            var line = Console.ReadLine();
            var array = line.Split(' ');

            return array.Select(x => long.Parse(x)).ToList();
        }
    }
}

Measured memory_bytes: 13268
#include <memory.h>

#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>

using namespace std;

#define MOD 1000000007
#define INIT -1

int main() {
	long long int n, k;
	cin >> n >> k;
	long long int suma[200001] = {};
	for (int i = 1; i <= n; i++) {
		long long int a;
		cin >> a;
		suma[i] = (a + suma[i - 1]) % k;
	}
	if (k == 1) {
		cout << 0 << endl;
		return 0;
	}
	map<int, int> cnt;
	long long int sum = 0;
	long long int ans = 0;
	cnt[0] = 1;
	for (int i = 1; i <= n; i++) {
		int a;
		long long int tmp = (suma[i] - (i % k) + k) % k;
		if (cnt.find(tmp) != cnt.end()) {
			ans += cnt[tmp];
			cnt[tmp]++;
		} else {
			cnt[tmp] = 1;
		}
		if (i >= k - 1) {
			tmp = (suma[i - k + 1] - ((i - k + 1) % k) + k) % k;
			cnt[tmp]--;
		}
		// cout << ans << endl;
	}
	cout << ans << endl;
}

Measured memory_bytes: 11136
#include<bits/stdc++.h>
#include<tuple>
using namespace std;
int main(){
  int n;
  cin >> n;
  vector<string> s(n);
  vector<int> rp(n);
  vector<tuple<string,int,int>> d(n);
  for(int i=0; i<n; i++){
    int p;
    cin >> s[i];
    cin >> p;
    rp[i] = 100-p;
    d[i] = make_tuple(s[i],rp[i],i+1);
  }
  sort(d.begin(),d.end());
  for(int i=0; i<n; i++){
    cout << get<2>(d[i]) << endl;
  }
}

Measured memory_bytes: 256
n = int(input())
graph = [[-1 for _ in range(n)] for _ in range(n)]
for i in range(n):
    a = int(input())
    for _ in range(a):
        x, y = map(int, input().split())
        graph[i][x-1] = y

ans = 0
for p in range(2**n):
    q = p
    c = 0
    t = []
    l = 0
    while q:
        if q&1:
            t.append(graph[c])
            l += 1
        q >>= 1
        c += 1
    flag = True
    for c in range(n):
        if p&1:
            for s in t:
                if s[c] == 0:
                    flag = False
        else:
            for s in t:
                if s[c] == 1:
                    flag = False
        p >>= 1
    if flag:
        ans = max(ans, l)

print(ans)

Measured memory_bytes: 9064
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        int num = in.nextInt();
        long n = num-1;

        long res = (n*(n+1))/2;
        
        out.println(res);
        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());
        }

    }
}


Measured memory_bytes: 22868
function Main(input) {
    var A = parseInt(input[0], 10);
    var B = parseInt(input[1], 10);
    var C = parseInt(input[2], 10);
    
    var same = 0;

    if (A === B) {
        same++;
    }
    if (B === C) {
        same++;
    }
    if (A === C) {
        same++;
    }
    console.log(same === 1 ? 'Yes' : 'No');
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));

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

typedef long long ll;

int main() {
    vector<bool> prime(100001, true);
    prime[0] = false;
    prime[1] = false;
    for (int i = 2; i * i <= 100000; i++) {
        if (!prime[i]) continue;
        for (int j = 2 * i; j <= 100000; j += i) prime[j] = false;
    }
    vector<int> s(100001, 0);
    for (int i = 1; i <= 100000; i++) {
        s[i] = s[i - 1];
        if (i % 2 == 1 && prime[i] && prime[(i + 1) / 2]) s[i]++;
    }
    int Q, l, r;
    cin >> Q;
    rep(i, Q) {
        cin >> l >> r;
        cout << s[r] - s[l - 1] << "\n";
    }
}

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


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

	if((a+b)%2==0){
		cout<<(a+b)/2<<endl;
	}else{
		cout<<(a+b)/2+1 <<endl;
	}

	return 0;

}

Measured memory_bytes: 256
import Control.Applicative
import Control.Monad
import Data.List
import Data.Vector (Vector, (!), (//))
import qualified Data.Vector as V

main :: IO ()
main = do
  m <- readLn
  n <- readLn
  solve m <$> replicateM n f >>= mapM_ print
  where
    f = map read <$> words <$> getLine

solve :: Int -> [[Int]] -> [Int]
solve m xys = loop [] s ndb
  where
    ndb = foldl' f (V.replicate (m+1) (0, [])) xys :: Vector (Int, [Int])
    f v [x, y] = let (nx, lx) = v ! x
                     (ny, ly) = v ! y
                 in v // [(x, (nx, y:lx)), (y, (ny+1, ly))]
    s = V.ifoldl' g [] ndb
    g l i (x, _)
      | i > 0 && x == 0 = i:l
      | otherwise = l
    loop :: [Int] -> [Int] -> Vector (Int, [Int]) -> [Int]
    loop ls [] db = reverse ls
    loop ls (x:xs) db = let (_, l) = db ! x
                            (db', s') = foldl' (\(v, s) i ->
                                                let (p, q) = v ! i
                                                in (v // [(i, (p-1,q))], if p == 1 then i:s else s)) (db, xs) l
                        in loop (x:ls) s' db'



Measured memory_bytes: 4804
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn=1e5+5;
int main()
{
    string s;
    cin>>s;
    int a=(s[0]-'0')*1000+(s[1]-'0')*100+(s[2]-'0')*10+s[3]-'0';
    int b=(s[5]-'0')*10+s[6]-'0';
    int c=(s[8]-'0')*10+s[9]-'0';
    if(a<2019) printf("Heisei\n");
    else if(a>2019) printf("TBD\n");
    else if(b<4) printf("Heisei\n");
    else if(b>4) printf("TBD\n");
    else if(c<=30) printf("Heisei\n");
    else printf("TBD\n");
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

using namespace std;
using namespace __gnu_pbds;

typedef long long lint;

template<typename Key, typename Value>
using hash_map = cc_hash_table<Key, Value>;

const int INF = 0x3f3f3f3f;
const lint INFL = 0x3f3f3f3f3f3f3f3fLL;

template<typename T, typename U> void amin(T &x, U y) { if (y < x) x = y; }
template<typename T, typename U> void amax(T &x, U y) { if (x < y) x = y; }

bool solve(int testNumber) {
	int n;
	if (!(cin >> n)) return false;
	map<int, int> counter;
	while (n--) {
		int x;
		cin >> x;
		counter[x]++;
	}
	vector<int> vec(2, 0);
	for (auto it: counter) {
		int x, y;
		tie(x, y) = it;
		for (int i = 0; i < y / 2; i++) vec.push_back(x);
	}
	lint ans = (lint)vec.end()[-1] * vec.end()[-2];
	printf("%lld\n", ans);
	return true;
}

void init(const char *in = nullptr, const char *out = nullptr) {
	if (in) freopen(in, "r", stdin);
	if (out) freopen(out, "w", stdout);
}

int main() {
	ios_base :: sync_with_stdio(false);
	cin.tie(nullptr);
	init();
	for (int i=1; solve(i); i++);
	return 0;
}


Measured memory_bytes: 4992
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define cs const 
#define fr first 
#define se second
#define ls (now<<1)
#define rs (now<<1|1)
#define mid ((l+r)>>1)
#define mp make_pair
#define pb push_back
#define ppb pop_back
#define low(i) (i&(-i))
#define par pair<int,int>
#define cn(x) memset(x, 0, sizeof(x))
#define rep(i, x, y) for(int i=x; i<=y; ++i)
#define sep(i, x, y) for(int i=x; i>=y; --i)
#define fore(i, x) for(int i=fir[x]; i; i=nex[i])
 
cs int G = 3;
cs int ff = 2e6 + 1;
cs int inf = 1e18 + 1;
cs int base = 2333;
cs int M = 1e9 + 7;

int n, m, b[ff], c[ff], qz[ff];
int ksm(int x, int y) {return (y ? ksm(x * x % M, y / 2) : 1) * (y % 2 == 1 ? x : 1) % M;
}

int f[ff];
void init()
{
	cin >> n;
	if(n < 3) {cout << 0; return;
	}
	f[0] = 1;
	rep(i, 3, n)
	{
		rep(j, 0, i - 3)
			(f[i] += f[j]) %= M;
	}
	cout <<f[n];
}
signed main()
{
	int Ts = 1;
	while(Ts--)
		init();
}

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

void solve()
{
    char c;
    cin >> c;
    if(islower(c))
        cout << 'a' << endl;
    else
        cout << 'A' << endl;
}


int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll t;
    solve();
    return 0;
}


Measured memory_bytes: 3632
package main

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

var sc *bufio.Scanner

func init() {
	sc = bufio.NewScanner(os.Stdin)
	buffsize := 1000000
	buff := make([]byte, buffsize)
	sc.Buffer(buff, buffsize)
	sc.Split(bufio.ScanWords)
}

func loadint() (result int) {
	sc.Scan()
	result, _ = strconv.Atoi(sc.Text())
	return
}

func main() {
	n := loadint()
	if n == 1 {
		fmt.Println("Hello World")
	} else {
		a := loadint()
		b := loadint()
		fmt.Println(a + b)
	}
}


Measured memory_bytes: 640
#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };

    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, bytes) => {
        read_value!($next, String).into_bytes()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        a: usize,
        b:usize,
        c:usize,
    }

    println!("{}", std::cmp::min(c, b / a));
}


Measured memory_bytes: 4352
#include <bits/stdc++.h>
#include <string>
#include <algorithm>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <float.h>
#include <iomanip>
#include <iostream>
using namespace std;


int main(){

    char c;
    cin >> c;

    c+=1;
    cout << c;

    return 0;
}

Measured memory_bytes: 256
// Problem : A - Takoyaki
// Contest : AtCoder - AtCoder Beginner Contest 176
// URL : https://atcoder.jp/contests/abc176/tasks/abc176_a
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

// #pragma GCC optimize("Ofast")
// #pragma GCC target("avx,avx2,fma")
// #pragma GCC optimization ("unroll-loops")

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;

#define fo(i,n)         for(int i=0;i<n;i++)
#define Fo(i,k,n)       for(int i=k;i<n;i++) 
#define endl            "\n"
#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define vec(x)          vector<x>
#define matrix(x)       vector<vector<x>>
#define sz(x)           (int)x.size()
#define mem(a,b)        memset(a, b, sizeof a)
#define vii             vector<pair<int,int>>
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define gcd(a,b)        __gcd(a,b)
#define lcm(a,b)        (a*(b/gcd(a,b)))
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define MOD             998244353
#define deb(x)          cerr <<#x<<" = "<<x<<"\n"
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define all(v)          v.begin(),v.end()
#define rep(i,a,b)      for (int i = a; i<b; ++i)
#define len(s)          s.length()
#define watch(x)        cout << #x << " = " << x << endl
#define trace(x)        cerr << #x << " = " << x << endl
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());
 
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;
 
 
int power(int a,int b,int m=mod)
{int ans=1;while(b>0){if(b&1)ans=(ans*a)%m;a=(a*a)%m;b>>=1;}
return ans;}

void babuBhaiya()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
}

const int N = 1e5+1;
const double pi = acos(-1);

void solve(){
    
	int n,x,t; cin>>n>>x>>t;
	int y = (n/x);
	if(n%x != 0) y++;
	cout<<t*y<<"\n";
	
}

 
int32_t main()
{
    babuBhaiya();

    int t;

    t = 1;
    //cin>>t;

    while(t--){
        solve();
    }
    
    return 0;
}

Measured memory_bytes: 3612
n = int( input() )
hn = list( map(int , input().split()) )



tab = [0]*n

tab[1] = abs( hn[1] - hn[0])


for i in range(2,n):
    s = abs( hn[i] - hn[i-1]) + tab[i-1]
    t = abs(hn[i] - hn[i-2]) + tab[i-2]

    tab[i] = min(s,t)


print(tab[-1])

Measured memory_bytes: 52208
#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please


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

	int X;
	cin >> X;


	int kotae = 0;
	int kari = X / 500;
	kotae += kari * 1000;
	X -= kari * 500;
	kari = X / 5;
	kotae += kari * 5;

	co(kotae);


	Would you please return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i <= (n); ++i)
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
//マクロ
//forループ関係
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
#define FOR(i,a,b) for(ll i=a;i<=(ll)(b);i++)
//xにはvectorなどのコンテナ
#define ALL(x) (x).begin(),(x).end() //sortなどの引数を省略したい
#define SIZE(x) ((ll)(x).size()) //sizeをsize_tからllに直しておく
#define MAX(x) *max_element(ALL(x)) //最大値を求める
#define MIN(x) *min_element(ALL(x)) //最小値を求める
//定数
#define INF 1000000000000 //10^12:極めて大きい値,∞
#define inf 2147483647 //int値の最大値
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange(素数列挙などで使用)
//略記
#define PB push_back //vectorヘの挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素
#define CST(x) cout<<fixed<<setprecision(x)//小数点以下の桁数指定
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;
}
int gcd(int a, int b) {
    if (b==0) return a;
    else return gcd(b, a%b);
}
int lcm(int a, int b) {
    return a * b / gcd(a, b);
}
int two(int n){
	ll ans=1;
	rep(i,n){
		ans*=2;
	}
	return ans;
}
int waru(int n){
    int s=0;
    while(n>0){
        s +=n%10;
        n=n/10;
    }
    return s;

}


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

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

    int sum=0;
    for(int i=1;i<=n;i++){
        if(waru(i)>=a &&waru(i)<=b){
            sum+=i;
        }
    }
    cout<<sum<<endl;




}



Measured memory_bytes: 3624
using System;

namespace A___DDCC_Finals
{
    class Program
    {
        static void Main (string[] args)
        {
            var input = Console.ReadLine ().Split (' ');
            var x = int.Parse (input[0]);
            var y = int.Parse (input[1]);
            var ans = 0;
            if (x == 1)
            {
                ans += 300000;
            }
            else if (x == 2)
            {
                ans += 200000;
            }
            else if (x == 3)
            {
                ans += 100000;
            }
            if (y == 1)
            {
                ans += 300000;
            }
            else if (y == 2)
            {
                ans += 200000;
            }
            else if (y == 3)
            {
                ans += 100000;
            }
            if (ans == 600000)
            {
                ans += 400000;
            }
            Console.WriteLine (ans);
        }
    }
}

Measured memory_bytes: 13140
s = input()
t = input()
ls, lt = len(s), len(t)

# DP
dp = [[0 for _ in range(lt + 1)] for j in range(ls + 1)]

for i in range(ls):
    for j in range(lt):
        dp[i+1][j+1] = max(dp[i][j+1], dp[i+1][j])
        if s[i] == t[j]:
            dp[i+1][j+1] = max(dp[i+1][j+1], dp[i][j] + 1)

# 復元
ans = ""
while ls > 0 and lt > 0:
    if dp[ls][lt] == dp[ls-1][lt]:
        ls -= 1
    elif dp[ls][lt] == dp[ls][lt-1]:
        lt -= 1
    elif dp[ls][lt] == dp[ls-1][lt-1] + 1:
        ans += s[ls-1]
        ls -= 1
        lt -= 1
print(ans[::-1])

Measured memory_bytes: 153356
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;

class AtCoder
{
    const int MOD = 1000000007;
    public void Slove()
    {
        var str = Console.ReadLine();
        char[] bef = new char[2];
        bef[0] = str.First();
        var dp = Enumerable.Range(0, str.Length)
            .Select(x => new int[2])
            .ToArray();
        foreach(int i in str.Select((x, index) => index).Skip(1))
        {
            char c = str[i];
            if (bef[0] != c)
            {
                dp[i][0] = dp[i - 1][0] + 1;
            }
            if (i > 1)
            {
                dp[i][0] = Math.Max(dp[i][0], dp[i - 1][1] + 1);
                dp[i][1] = dp[i - 2][0] + 1;
                if (bef[0] != bef[1] || bef[0] != c)
                {
                    dp[i][1] = Math.Max(dp[i][1], dp[i - 2][1] + 1);
                }
            }
            //Console.WriteLine(c + string.Join("", bef));
            bef[1] = bef[0];
            bef[0] = c;
            //Console.WriteLine(string.Join(" ", dp[i]));
        }
        Console.WriteLine(dp[str.Length - 1].Max() + 1);
    }
    static void Main()
    {
        var ac = new AtCoder();
        ac.Slove();
    }
}

Measured memory_bytes: 29532
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <math.h>
#include <string>
#include <string.h>
#include <stack>
#include <queue>
#include <vector>
#include <utility>
#include <set>
#include <map>
#include <stdlib.h>
#include <iomanip>

using namespace std;

#define ll long long
#define vi vector<int>
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pi 3.14159265359


int main() {
	ll N;
	ll a[100];
	ll alice = 0;
	ll bob = 0;
	cin >> N;
	REP(i, N) {
		cin >> a[i];
	}
	sort(a, a + N);
	REP(i, N) {
		if (i % 2 == 0) {
			alice += a[N-1-i];
		}
		else {
			bob += a[N-1-i];
		}
	}
	cout << alice - bob;
	cin >> alice;
	return 0;
}

Measured memory_bytes: 256
//============================================================================
// Name        : alds1_2_a_bubbleSort.cpp
// Author      : lovesaemi
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

int bubbleSort(int A[], int N) {
	int sw = 0;
	bool flag = 1;
	for (int i = 0; flag; i++) {
		flag = 0;
		for (int j = N - 1; j >= i + 1; j--) {
			if (A[j] < A[j - 1]) {
				swap(A[j], A[j - 1]);
				flag = 1;
				sw++;
			}
		}
	}
	return sw;
}

int main() {
	int A[100], N, sw;
	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> A[i];
	}
	sw = bubbleSort(A, N);
	for (int i = 0; i < N; i++) {
		if (i) {
			cout << " ";
		}
		cout << A[i];
	}
	cout << endl;
	cout << sw << endl;
	return 0;
}



Measured memory_bytes: 3096
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
bool comp(ll x,ll y)
{
	return (x>y);
}
int main()
{
	ll n,m,s=0,i;
	cin>>n>>m;
	ll arr[n];
	for(i=0;i<n;i++)
	{
		cin>>arr[i];
		s+=arr[i];
	}
	sort(arr,arr+n,comp);
	if((m-1<n)&&(m-1>=0)&&(arr[m-1]*4*m>=s))
	cout<<"Yes";
	else
	cout<<"No";
	return 0;
}
	


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define REP(i,a,b) for(int i=(a);i<(b);i++)
#define RREP(i,a,b) for(int i=(a);i>=(b);i--)
#define pq priotity_queue
typedef long long ll; typedef long double ld;
using namespace std;
const int INF=1e9, MOD=1e9+7, around[]={0,1,1,-1,-1,0,-1,1,0,0};
const ld PI=abs(acos(-1)); 
int n,m,a,b,c,d;
string s,w;

int main(){
	cin >> n;
	
	REP(i,0,100000) if(i*i>n){cout << (i-1)*(i-1) << endl; break;}
	return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

int main()
{   long long i,n,j,a[30001],hoge,ans=0;
    scanf("%lld",&n);
        for(i=0;i<n;i++){
       scanf("%lld",&a[i]);
       ans+=(a[i]-1);
    }
    printf("%lld",ans);
    return 0;
}


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

using namespace std;
typedef long long ll;
#define REP(i,n) for(ll i=0;i<n;i++)
#define IREP(i,n) for(ll i=1;i<n;i++)
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define DEBUG(x) cerr << x << "\n"

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, ans = 0;
    cin >> n;
    while(pow(ans+1,2) <= n) ans++;
    cout << (int)pow(ans,2);

    return 0;
}

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

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

Measured memory_bytes: 256
#include<stdio.h>

int main(void){
  int h1 , m1;
  int h2 , m2 , k;
  scanf("%d %d %d %d %d",&h1,&m1,&h2,&m2,&k);

  int a = h2 -h1;

  printf("%d\n",60 * a - m1 + m2 - k);

  return 0;

}

Measured memory_bytes: 1736
a=int(input())
b=list(map(int,input().split()))
c=[0 for i in range(a)]
c[1]=abs(b[1]-b[0])
for i in range(2,a):
  c[i]=min(c[i-2]+abs(b[i]-b[i-2]),c[i-1]+abs(b[i]-b[i-1]))
  
print(c[-1])

Measured memory_bytes: 13928
#include <iostream>
using ll = long long;
using namespace std;

int main() {
    int h, w;
    string s;
    cin >> h >> w;
    for (int i = 0; i < h; ++i) {
        for (int j = 0; j < w; ++j) {
            cin >> s;
            if (s == "snuke") {
                cout << char('A'+j) << i+1 << "\n";
                return 0;
            }
        }
    }
    return 0;
}


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

int n,sum;

int main(){
	cin>>n;
	for(int i = 1;i <= 4;i ++){
		if(n % 10 == 2){
			sum++;
			n = n / 10;
		}else{
			n = n / 10;
		}
	}
	cout<<sum<<endl;
}


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

#include <iostream>
#include <fstream>

#include "bits/stdc++.h"

#define REP(i,x,y) for(int i=(x);i<(y);i++)
#define RREP(i,x,y) for(int i=(y)-1;i>=(x);i--)
#define all(x) (x).begin(),(x).end()
//#define int long long

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();}

#define dump(x)  cout << #x << " = " << (x) << endl
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl

typedef long long ll;

const ll MOD = 1e9 + 7;

class FIntervalRunning {
public:
    void solve(std::istream& in, std::ostream& out) {
        ll T1, T2, A1, A2, B1, B2;
        in >> T1 >> T2 >> A1 >> A2 >> B1 >> B2;

        // make sure diffPerStep > 0
        ll diffPerStep = (A1 - B1) * T1 + (A2 - B2) * T2;
        if (diffPerStep == 0) {
            out << "infinity" << "\n";
            return;
        } else if (diffPerStep < 0) {
            swap(A1, B1);
            swap(A2, B2);
            diffPerStep = -diffPerStep;
        }

        // diff distance: + (A1 - B1) * T1 + (A2 - B2) * T2 + ...
        ll diff1 = (A1 - B1) * T1;
        ll diff2 = (A2 - B2) * T2;
        if (diff1 >= 0) {
            out << 0 << "\n";
            return;
        }
        // n(step num) * diffPerStep - |diff1| > 0
        ll stepNum = abs(diff1) / diffPerStep;
        ll answer = 2 * stepNum + (abs(diff1) % diffPerStep == 0 ? 0 : 1);
        out << answer << "\n";
    }
};


int main() {
	FIntervalRunning solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}


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

//const int mod = 998244353;
const int mod = 1000000007;

struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const { return pow(mod-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

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

    mint ten = 10;
    mint nine = 9;
    mint eight = 8;

    ten = ten.pow(n);
    nine = nine.pow(n); nine *= 2;
    eight = eight.pow(n);
    cout << ten - nine + eight << endl;
    return 0;
}

Measured memory_bytes: 3632
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <deque>
#include <complex>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <cstring>

#define REP(i,x) for(int i=0 ; i<(int)(x) ; i++)
#define ALL(x) (x).begin(),(x).end()
#define LL long long

using namespace std;

struct Node{
    int to, cost;
    Node(int t, int c){
        to = t;
        cost = c;
    }
};

const int MAX = 1<<30;

struct Input{
    int p, q, c;
};

void set_node(pair<int, int> p, map<pair<int,int>, int> &node_number){
    if(node_number.count(p))return;
    int s = node_number.size();
    node_number[p] = s;
};

int solve(){
    int N, M;
    scanf("%d %d", &N, &M);
    vector<Input> inputs;
    map<pair<int,int>, int> node_number;
    node_number[make_pair(0, -1)] = 0;
    node_number[make_pair(N-1, -1)] = 1;
    REP(i, M){
        Input inp;
        scanf("%d %d %d", &inp.p, &inp.q, &inp.c);
        inp.p--;
        inp.q--;
        pair<int, int> p0 = make_pair(inp.p, -1);
        pair<int, int> p1 = make_pair(inp.q, -1);
        pair<int, int> p2 = make_pair(inp.p, inp.c);
        pair<int, int> p3 = make_pair(inp.q, inp.c);
        set_node(p0, node_number);
        set_node(p1, node_number);
        set_node(p2, node_number);
        set_node(p3, node_number);
        inputs.push_back(inp);
    }

    vector<vector<Node> > graph(node_number.size());
    REP(i, inputs.size()){
        Input inp = inputs[i];


        int p0 = node_number[make_pair(inp.p, -1)];
        int p1 = node_number[make_pair(inp.q, -1)];
        int p2 = node_number[make_pair(inp.p, inp.c)];
        int p3 = node_number[make_pair(inp.q, inp.c)];

        graph[p0].push_back(Node(p2, 1));
        graph[p2].push_back(Node(p0, 0));
        graph[p1].push_back(Node(p3, 1));
        graph[p3].push_back(Node(p1, 0));
        graph[p2].push_back(Node(p3, 0));
        graph[p3].push_back(Node(p2, 0));
    }


    deque<Node> que;
    que.push_front(Node(0, 0));
    vector<int> memo(node_number.size());
    while(!que.empty()){
        Node now = que.front();que.pop_front();
        if(now.to==1)return now.cost;
        if(memo[now.to])continue;
        memo[now.to] = 1;
        REP(i, graph[now.to].size()){
            Node next = graph[now.to][i];
            if(next.cost == 1){
                next.cost = now.cost + 1;
                que.push_back(next);
            }else{
                next.cost = now.cost;
                que.push_front(next);
            }
        }
    }
    return -1;
}

int main(){
    int res = solve();
    printf("%d\n", res);
    return 0;
}


Measured memory_bytes: 66736
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <vector>
#include <string>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <set>
#include <map>
#include <algorithm>

#define int long long
#define MOD7 1000000007
#define MOD9 1000000009

#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, a, n) for (int i = (a); i <= (n); i++)
#define all(a) (a).begin(), (a).end()

using namespace std;

bool isprime[1013];

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

	rep(i, 1001) {
		isprime[i] = true;
	}

	vector<int> primes;
	REP(i, 2, 1000) {
		if (!isprime[i]) continue;
		primes.push_back(i);
		for (int j = 2 * i; j <= 1000; j += i) {
			isprime[j] = false;
		}
	}

	vector<int> cnt((int)primes.size(), 0);

	REP(i, 2, N) {
		int pt = 0;
		int num = i;
		while (num > 1) {
			while (num % primes[pt] == 0) {
				cnt[pt]++;
				num /= primes[pt];
			}
			pt++;
		}
	}

	int ret = 1;
	rep(i, cnt.size()) {
		ret *= cnt[i] + 1;
		ret %= MOD7;
	}

	cout << ret << endl;

    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pli = pair<ll, int>;
using pil = pair<int, ll>;
using pdd = pair<double, double>;
using uint = unsigned int;
template <typename T>
using Graph = vector<vector<T>>;
const int MOD = 1e9 + 7;
const ld PI = acosl(-1);

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

    string S, T;
    cin >> S >> T;
    int ans = 1e9;
    for (int i = 0; i < S.length() - T.length() + 1; ++i) {
        int cnt = 0;
        for (int j = 0; j < T.length(); ++j) {
            cnt += S[i + j] != T[j];
        }
        ans = min(ans, cnt);
    }

    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 3640
#include <bits/stdc++.h>
#include <ext/rope>

#define min3(a, b, c) min(a, min(b, c))
#define max3(a, b, c) max(a, max(b, c))
#define min4(a, b, c, d) min(min(a, b), min(c, d))
#define max4(a, b, c, d) max(max(a, b), max(c, d))

#define count_one(a) __builtin_popcount(a) // Returns the number of set bits(1) in a number(a). In long long use __builtin_popcountll(a)
#define parity(i) __builtin_parity(i)      //even parity 0 and odd parity 1
#define blz(a) __builtin_clz(a)            //Returns the number of leading zeroes in a number(a)
#define btz(a) __builtin_ctz(a)            //Returns the number of trailing zeroes in a number(a)
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a * (b / gcd(a, b)))

#define pb push_back
#define PI M_PI
#define endl "\n"
#define sc scanf
#define pf printf

#define ll long long
#define ull unsigned long long

#define W(t) while (t--)
#define rep1(i, n) for (int i = 0; i < n; i++)
#define rep2(a, b) for (int i = a; i <= b; i++)
#define repit(it, type) for (it = type.begin(); it != type.end(); it++)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
using namespace std;
using namespace __gnu_cxx;

int main()
{
    IOS
    ll mx = 1000000000000000000;
    ll n,i,ans=1;

    cin>>n;
    ll a[n];

    rep1(i,n)
    {
        cin>>a[i];
    }
    sort(a,a+n);

    rep1(i,n)
    {
        if(ans==0)
        break;
        else if(a[i]> mx/ans)
        {
            cout<<-1<<endl;
            return 0;
        }
        else 
        ans*=a[i];
    }
    cout<<ans<<endl;
}

Measured memory_bytes: 4440
using System;
					
public class Program
{
	public static void Main()
	{
		int a;
		a = int.Parse(Console.ReadLine());
        string[] str = Console.ReadLine().Split(' ');
		int[] i = new int[str.Length];
		for(int x=0;x < str.Length ; x++){
			i[x] = int.Parse(str[x]);
		}
		int max = i[0];
		int count = 1;
		for(int y = 1; y < str.Length; y++){
			if(i[y] >= max){
				count++;
				max = i[y];
			}
		}
		Console.WriteLine(count);
	}
}

Measured memory_bytes: 13140
sx,sy,tx,ty=map(int,input().split())
print('U'*(ty-sy),end='')
print('R'*(tx-sx),end='')
print('D'*(ty-sy),end='')
print('L'*(tx-sx),end='')
print('L',end='')
print('U'*(ty-sy+1),end='')
print('R'*(tx-sx+1),end='')
print('D',end='')
print('R',end='')
print('D'*(ty-sy+1),end='')
print('L'*(tx-sx+1),end='')
print('U')




Measured memory_bytes: 3064
import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        String S = scan.next();
        boolean wasR = false;
        int ans = 0;
        int temp = 0;
        for(int i = 0; i <3; i++) {
            boolean isR = false;
            if(S.charAt(i) == 'R') {
                isR = true;
                if(wasR)
                    temp++;
                else
                    temp = 1;
            } else
                temp = 0;

            wasR = isR;
            ans = Math.max(ans, temp);
        }
        os.println(ans);
    }
}

Measured memory_bytes: 26944
// by Balloons
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#define mpr make_pair
#define debug() puts("okkkkkkkk")
#define rep(i,a,b) for(int (i)=(a);(i)<=(b);(i)++)

using namespace std;

typedef long long LL;

const int inf = 1 << 29;
const int maxn=1e5+5;

int n,m;
int x[maxn],y[maxn];
int mk[maxn];
int num[maxn];

// 问题转化为 有 n 个杯子每个杯子里有 1升水，第一个杯子为红色的水
// 问经过这么些倒的过程后有哪些杯子里有红色的水
// 显然可以记录一下 i 杯子里是否有水，没有的话就将 mk 清0 

int main(){
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)scanf("%d%d",&x[i],&y[i]);
	for(int i=1;i<=n;i++)num[i]=1;
	mk[1]=1;
	for(int i=1;i<=m;i++){
		if(mk[x[i]]){
			mk[y[i]]=1;
		}
		--num[x[i]];++num[y[i]];
		if(num[x[i]]==0)mk[x[i]]=0;
	}
	int res=0;
	for(int i=1;i<=n;i++)if(mk[i])++res;
	printf("%d\n",res);
	
	return 0;
}


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

int main() {
  int n,m,c;
  cin >> n >> m >> c;
  vector<int> b(m);
  rep(i,m) cin >> b.at(i);
    int cnt = 0;
  
  rep(i,n){
    int sum = c;
    rep(j,m){
      int a;
      cin >> a;
      sum+=a*b.at(j);
    }
    if(sum > 0)cnt++;
  } 
  cout << cnt << endl;
}


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

int main(){
  int i, k, n;
  char s[101];
  scanf("%d",&k);
  scanf("%s",s);
  n = strlen(s);
  if(n<=k) printf("%s",s);
  else {
    for(i=0;i<k;i++) printf("%c",s[i]);
    printf("...");
  }
}

Measured memory_bytes: 1720
#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define fo(a,b) for(int a=0;a<b;a++)
#define Sort(a) sort(a.begin(),a.end())
#define rev(a) reverse(a.begin(),a.end())
#define fi first
#define se second
#define co(a) cout<<a<<endl
#define sz size()
#define bgn begin()
#define en end()
#define pb(a) push_back(a)
#define pop pop_back
#define V vector
#define P pair
#define V2(a,b,c) V<V<int>> a(b,V<int>(c))
#define V2a(a,b,c,d) V<V<int>> a(b,V<int>(c,d))
#define incin(a) int a; cin>>a
//#define min min<int>
//#define max max<int>
template<class T>
 void cou(vector<vector<T>> a){
  int b=a.size();
  int c=a[0].size();
  fo(i,b){
    fo(j,c){
      cout<<a[i][j];
      if(j==c-1)
        cout<<endl;
      else
        cout<<' ';
    }
  }
}
/*template<>
 void cou(vector<vector<char>> a){
  int b=a.size();
  int c=a[0].size();
  fo(i,b){
    fo(j,c){
      cout<<a[i][j];
      if(j==c-1)
        cout<<endl;
      else
        cout<<' ';
    }
  }
}*/
 int wari(int a,int b) {
   if(a%b==0)
     return a/b;
   else
     return a/b+1;
 }
 int keta(int a){
  double b=a;
  b=log10(b);
  int c=b;
  return c+1;
 }
 int souwa(int a){
  return a*(a+1)/2;
 }
 int lcm(int a,int b){
  int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return d*e/f;
    }
  int gcm(int a,int b){
      int d=a,e=b,f;
  if(a<b)
    swap(a,b);
  int c,m=1;
  while(m){
    c=a%b;
    if(c==0){
       f=b;
      m--;
    }
    else{
      a=b;
      b=c;
 }
  }
  return f;
  }
 bool prime(int a){
   if(a<2)
     return false;
   else if(a==2)
     return true;
   else if(a%2==0)
     return false;
   double b=sqrt(a);
    for(int i=3;i<=b;i+=2){
      if(a%i==0){
        return false;
      }
    }
   return true;
 }
struct Union{
  vector<int> par;
  Union(int n){
	par= vector<int>(n, -1);
  }
  int find(int x){
    if(par[x]<0)
      return x;
    else
      return par[x]=find(par[x]);
  }
  bool same(int a,int b){
    return find(a)==find(b);
  }
  int Size(int a){
    return -par[find(a)];
  }
  void unite(int a,int b){
    a=find(a);
    b=find(b);
    if(a==b)
      return;
    if(Size(b)>Size(a))
      swap<int>(a,b);
    par[a]+=par[b];
    par[b]=a;
  }
};
int ketas(int a){
  string b=to_string(a);
  int c=0;
  fo(i,keta(a)){
    c+=b[i]-'0';
  }
  return c;
}
/*struct aa{
	vector<int> gt;
  aa(int n){
	gt= vector<int>(n, 1);
  }
	void c(V<int> d,int b){
	if(d[b]==0){
		gt[d[b]-1]++;
		gt[gt.sz-1]++;
	}
	else{
		gt[d[b]-1]++;
		c(d,d[d[b]]-1);
	}
}
void cok(int a){
	cout<<gt[a-1]<<endl;
	fo(i,a-1)
	cout<<gt[i]<<endl;
}
};
*/
signed main(){
	string a;
	cin>>a;
	if(a[0]=='Y'&&a[1]=='A'&&a[2]=='K'&&a[3]=='I')
		cout<<"Yes"<<endl;
	else
		cout<<"No"<<endl;
}

Measured memory_bytes: 256
// MTGSさんのｼｬｷｮｳ
#include <bits/stdc++.h>

using namespace std;
using ll =long long;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef pair<int,int> PII;
#define SORT(a) sort((a).begin(),(a).end())
#define rSORT(a) reverse((a).begin(),(a).end())
#define For(i, a, b)    for(int i = (a) ; i < (b) ; ++i)
#define rep(i, n)       For(i, 0, n)
#define debug(x)  cerr << #x << " = " << (x) << endl;
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; }
using P = pair<int,int>;
//Write From this Line

const ll inf = 1e10;
int main()
{
	ll N, M, R, ans = inf;

	cin >> N >> M >> R;
	vector<ll> r(R);
	rep(i, R){
		cin>>r[i];
		r[i]--;
	}
	SORT(r);
	vector<vector<ll>> d(N,vector<ll>(N,inf));
	rep(i,N) d[i][i] = 0;
	rep(i,M){
		ll a, b, c;
		cin >> a >> b >> c;
		a--, b--;
		d[a][b] = c;
		d[b][a] = c;
	}

	rep(k,N)rep(i,N)rep(j,N){
		d[i][j] = min(d[i][j], d[i][k]+d[k][j]);
	}
	do {
		ll now = 0;
		rep(i,R-1){
			now += d[r[i]][r[i+1]];
		}
		ans = min(ans,now);
	} while (next_permutation(r.begin(),r.end()));
	cout << ans << endl;
}


Measured memory_bytes: 512
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int N=1e5+9;

int main()
{
#ifndef ONLINE_JUDGE
    freopen("in.txt", "r", stdin);
#endif
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    string s;
    cin>>s;
    if(s[s.size()-1]=='s')cout<<s<<"es";
    else cout<<s<<'s';

    
}

Measured memory_bytes: 3568
n = gets.to_i
if n == 100 || n == 1000 || n == 10000 || n == 100000 || n == 1000000 then
  r = 10
else
  b = n - 1
  c = b.to_s.split("").map(&:to_i)
  r = 0
  c.each do |i|
    r += i
  end
  r = r + 1
end
print("#{r}\n")


Measured memory_bytes: 1788
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;

public class Main {
	public static void main(String[] args) throws IOException {
		String[] inputS = new String[2];
		ArrayList<Integer> a = new ArrayList<Integer>();
		ArrayList<Integer> b = new ArrayList<Integer>();
		int z=0,y=0,x=0,w=0;
		String ans = "NO";
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8))) {
			for(int i=0;i<3;i++) {
				inputS = br.readLine().split(" ");
				a.add(Integer.valueOf(inputS[0]));
				b.add(Integer.valueOf(inputS[1]));
			}
		}
		for(int i=0;i<a.size();i++) {
			switch (a.get(i)) {
			case 1:
				z++;
				break;
			case 2:
				y++;
				break;
			case 3:
				x++;
				break;
			case 4:
				w++;
				break;
			default:
				break;
			}
			switch (b.get(i)) {
			case 1:
				z++;
				break;
			case 2:
				y++;
				break;
			case 3:
				x++;
				break;
			case 4:
				w++;
				break;
			default:
				break;
			}
		}
		if(z < 3 && y < 3 && x < 3 && w < 3) {
			ans = "YES";
		}
		System.out.println(ans);
	}
}

Measured memory_bytes: 23124
#include <cstdio>
#include <iostream>
#include <cstring>
#include <string>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <utility>
#include <map>
#include <stack>
#include <set>
#include <vector>
#include <queue>
#include <deque>
#include <sstream>
#define x first
#define y second
#define mp make_pair
#define pb push_back
#define LL long long
#define Pair pair<int,int>
#define LOWBIT(x) x & (-x)
using namespace std;

const int MOD=1e9+7;
const int INF=0x7ffffff;
const int magic=348;

int r,c;
int a[148][148];
int cnt[100048];
int n;

int main ()
{
	int i;
	scanf("%d%d",&r,&c);
	scanf("%d",&n);
	int x=1,y=1;
	for (i=1;i<=n;i++)
	{
		scanf("%d",&cnt[i]);
		for (int k=1;k<=cnt[i];k++)
		{
			a[x][y]=i;
			if (x%2==1) y++; else y--;
			if (y>c)
			{
				x++;
				y=c;
			}
			if (y==0)
			{
				x++;
				y=1;
			}
		}
	}
	for (i=1;i<=r;i++)
	{
		for (int j=1;j<=c;j++)
			printf("%d ",a[i][j]);
		printf("\n");
	}
	return 0;
}


Measured memory_bytes: 384
M,K = map(int,input().split())

num = 2**(M+1)

if K >= num//2 or (M==1 and K==1):
    ans = [-1]
elif M==1 and K==0:
    ans = [0,0,1,1]
else:
    ans = [0]*num
    for i in range(2**M):
        if i==K: continue
        ans[i-(i>K)] = i
        ans[num-2-i+(i>K)] = i
    ans[num//2-1] = K
    ans[-1] = K
    
print(*ans)

Measured memory_bytes: 17004