akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
#include <cmath>
#define ll long long
#define mod (long long)(1e9+7)
// #define endl "\n"
using namespace std;
#define ld long double
//unordered_map<_____,_____,custom_hash>
struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};
//done custom_hash

void solve(){
	ll a,b,c,d;
    cin>>a>>b>>c>>d;
    cout<<max(a*c,max(b*d,max(a*d,b*c)))<<endl;
}


int main(){
	ll t=1;
	//cin>>t;
	while(t--){
		solve();
	}
}




Measured memory_bytes: 3632
#include <bits/stdc++.h>
#define N 200005
#define int long long
using namespace std;

int arr[N];
signed main() {
  int n; cin >> n;
  for(int i = 0; i < n-1; i++) {
    int x; cin >> x;
    arr[x]++;
  }
  for(int i = 1; i <= n; i++) cout << arr[i] << endl;

}


Measured memory_bytes: 5108
# from math import gcd, sqrt
import fractions
import math


def is_prime(n):
    flag = True
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            flag = False
            return

    if flag:
        return n


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors


def main():
    a, b = map(int, input().split())
    coms = make_divisors(fractions.gcd(a, b))
    ans = [is_prime(i) for i in coms]
    ans2 = [a for a in ans if a is not None]
    print(len(ans2))


if __name__ == "__main__":
    main()


Measured memory_bytes: 5332
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define R cin>>
#define Z class
#define ll long long
#define ln cout<<'\n'
#define in(a) insert(a)
#define pb(a) push_back(a)
#define pd(a) printf("%.10f\n",a)
#define mem(a) memset(a,0,sizeof(a))
#define all(c) (c).begin(),(c).end()
#define iter(c) __typeof((c).begin())
#define rrep(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
#define tr(it,c) for(iter(c) it=(c).begin();it!=(c).end();it++)
template<Z A>void pr(A a){cout<<a;ln;}
template<Z A,Z B>void pr(A a,B b){cout<<a<<' ';pr(b);}
template<Z A,Z B,Z C>void pr(A a,B b,C c){cout<<a<<' ';pr(b,c);}
template<Z A,Z B,Z C,Z D>void pr(A a,B b,C c,D d){cout<<a<<' ';pr(b,c,d);}
template<Z A>void PR(A a,ll n){rep(i,n){if(i)cout<<' ';cout<<a[i];}ln;}
ll check(ll n,ll m,ll x,ll y){return x>=0&&x<n&&y>=0&&y<m;}
const ll MAX=1e9+7,MAXL=1LL<<61,dx[4]={-1,0,1,0},dy[4]={0,1,0,-1};
typedef pair<int,int> P;
const ll mod=998244353;
ll dp[222222][3][3][2];
void Main() {
  string s;
  R s;
  if(s.size()<4) {
    set<string> se;
    se.in(s);
    queue<string> que;
    que.push(s);
    while(!que.empty()) {
      s=que.front();que.pop();
      rep(i,s.size()-1) {
        if(s[i]==s[i+1]) continue;
        string t=s;
        if(s[i]=='a'&&s[i+1]=='b'||s[i]=='b'&&s[i+1]=='a') t[i]=t[i+1]='c';
        else if(s[i]=='c'&&s[i+1]=='b'||s[i]=='b'&&s[i+1]=='c') t[i]=t[i+1]='a';
        else t[i]=t[i+1]='b';
        if(!se.count(t)) {
          se.insert(t);
          que.push(t);
        }
      }
    }
    pr(se.size());
    return;
  }
  set<char> se;
  for(int i=0; i<s.size(); i++) se.insert(s[i]);
  if(se.size()==1) {
    pr(1);
    return;
  }
  for(int i=0; i<3; i++) {
    for(int j=0; j<3; j++) dp[2][(i+j)%3][j][i==j]++;
  }
  for(int i=2; i<s.size(); i++) {
    for(int j=0; j<3; j++) {
      for(int k=0; k<3; k++) {
        for(int l=0; l<2; l++) {
          for(int k2=0; k2<3; k2++) {
            dp[i+1][(j+k2)%3][k2][l?1:(k==k2)]+=dp[i][j][k][l];
            dp[i+1][(j+k2)%3][k2][l?1:(k==k2)]%=mod;
          }
        }
      }
    }
  }
  ll sum=0,ans=1;
  for(int i=0; i<s.size(); i++) {
    sum=(sum+s[i]-'a')%3;
    if(i&&s[i-1]==s[i]) ans=0;
  }
  for(int i=0; i<3; i++) ans=(ans+dp[s.size()][sum][i][1])%mod;
  pr(ans);
}

int main(){ios::sync_with_stdio(0);cin.tie(0);Main();return 0;}

Measured memory_bytes: 29264
#include <stdio.h>
int main(){
  int W,H,x,y,r;
  scanf("%d %d %d %d %d",&W,&H,&x,&y,&r);

 if(x-r >= 0 && x+r <= W && y-r >= 0 && y+r <=H)
  printf("Yes\n");

 else printf("No\n");

  return 0;
}

Measured memory_bytes: 584
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class AtCoderA
{
    static void Main()
    {
        var sc = new Scanner();

        long k = sc.NextLong();

        long answer = 1;
        long mod = 7 % k;
        while (true)
        {
            if (mod == 0)
            {
                break;
            }

            if (answer > 1000000)
            {
                answer = -1;
                break;
            }

            mod = mod * 10 + 7;
            mod = mod % k;
            answer++;
        }

        Console.WriteLine(answer);
    }

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

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

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

            return _line[_index++];
        }

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

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

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


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

int main()
{
    int n;
    cin >> n;
    int v[n], c[n];
    for (int i = 0; i < n; i++)
    {
        cin >> v[i];
    }
    for (int i = 0; i < n; i++)
    {
        cin >> c[i];
    }

    int ans = 0;
    for (int i = 0; i < n; i++)
    {
        ans += max(0, v[i] - c[i]);
    }

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

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
struct Fast {Fast(){std::cin.tie(0);ios::sync_with_stdio(false);cout.precision(20);}} fast;

/* define */
#define FOR(I,X,Y) for(long long (I)=(X);(I)<(Y);(I)++)
#define REP(I,X,Y) for(long long (I)=(Y)-1;(I)>=(X);(I)--)
#define ALL(X) (X).begin(),(X).end()
#define pb push_back
#define COUNT(V,X) (upper_bound((V).begin(),(V).end(),X)-lower_bound((V).begin(),(V).end(),X))
#define debug(x) cerr<<#x<<':'<<x<<endl;
#define DEBUG(v) cerr<<#v<<':';for(auto xXx:v)cerr<<xXx<<' ';cerr<<endl;
#define Yes(X) if(X){cout<<"Yes"<<endl;}else{cout<<"No"<<endl;}
#define YES(X) if(X){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define ctoi(C) (C-'0')
#define pow2(x) ((long long)((long long)1<<x))

/* alias */
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vii = vector<vector<int>>;
using vl = vector<long long>;
using vll = vector<vector<long long>>;
using pi = pair<int,int>;
using pl = pair<long long,long long>;
template<typename T> using PQ = priority_queue<T>;
template<typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>;

/* const */
const long long dx[] = {1,0,-1,0};
const long long dy[] = {0,1,0,-1};
const long long dx8[] = {1,1,0,-1,-1,-1,0,1};
const long long dy8[] = {0,1,1,1,0,-1,-1,-1};
const long long dx9[] = {1,1,0,-1,-1,-1,0,1,0};
const long long dy9[] = {0,1,1,1,0,-1,-1,-1,0};
const int INF = 1000000007;
const long long LINF = 1000000000000000007;

/* func */
template <typename T> inline bool chmin(T& a, const T& b) {if (a > b) a = b; return a > b;}
template <typename T> inline bool chmax(T& a, const T& b) {if (a < b) a = b; return a < b;}
long long max(long long x,int y){return max(x,(long long)y);}
long long max(int x,long long y){return max((long long)x,y);}
long long min(long long x,int y){return min(x,(long long)y);}
long long min(int x,long long y){return min((long long)x,y);}

/* liblary */



/* main */

signed main(){
    ll N;
    cin >> N;
    vl v(5);
    FOR(i,0,5)cin >> v[i];
    sort(ALL(v));
    cout << ((N+v[0]-1)/v[0]) + 4 << endl;
}

Measured memory_bytes: 256
//#define NDEBUG

#include <bits/stdc++.h>
#include <bits/extc++.h>

#define StarBurstStream ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define iter(a) a.begin(), a.end()
#define riter(a) a.rbegin(), a.rend()
#define lsort(a) sort(iter(a))
#define gsort(a) sort(riter(a))
#define pb(a) push_back(a)
#define eb(a) emplace_back(a)
#define pf(a) push_front(a)
#define pob pop_back()
#define pof pop_front()
#define mp(a, b) make_pair(a, b)
#define F first
#define S second
#define mt make_tuple
#define gt(t, i) get<i>(t)
#define iceil(a, b) ((a + b - 1) / b)
#define tomax(a, b) (a = max(a, b))
#define printv(a, b) {bool pvaspace=false; \
for(auto pva : a){ \
    if(pvaspace) b << " "; pvaspace=true;\
    b << pva;\
}\
b << "\n";}

//#define TEST

using namespace std;
using namespace __gnu_pbds;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<ld, ld>;
using tiii = tuple<int, int, int>;

const ll MOD = 1000000007;
const ll MAX = 2147483647;

template<typename A, typename B>
ostream& operator<<(ostream& o, pair<A, B> p){
    return o << '(' << p.F << ',' << p.S << ')';
}

int main(){
    StarBurstStream

    int a, b, c;
    cin >> a >> b >> c;
    int k;
    cin >> k;

    while(a >= b && k){
        k--;
        b *= 2;
    }
    while(b >= c && k){
        k--;
        c *= 2;
    }

    if(a < b && b < c) cout << "Yes\n";
    else cout << "No\n";

    return 0;
}

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

int main() {
	
	//解説PDFを見ました(迫真)
	//速度の様子うかがい

	int N;
	string S;
	cin >> N >> S;

	map<string, int> GODmae, GODato;

	rep(i, 1 << N) {
		string blue;
		string red;
		string blue2;
		string red2;
		rep(ii, N) {
			if (i >> ii & 1) {
				blue += S[ii];
				blue2 += S[2 * N - ii - 1];
			}
			else {
				red += S[ii];
				red2 += S[2 * N - ii - 1];
			}
		}
		GODmae[blue + "," + red]++;
		GODato[blue2 + "," + red2]++;
	}

	long long kotae = 0;
	for (auto itr : GODmae) {
		kotae += 1ll * GODmae[itr.first] * GODato[itr.first];
	}
	cout << kotae << "\n";
	Would you please return 0;

}

Measured memory_bytes: 83584
#include<bits/stdc++.h>
using namespace std;
int main(){
    int long long n;
    cin>>n;
    int a=0,b=0,c=0,d=0;
    while(n--){
        string s;
        cin>>s;
        
        if(s=="AC"){
            a++;
        }
        else if(s=="WA"){
            b++;
        }
        else if(s=="TLE"){
            c++;
        }
        else{
            d++;
        }
    }
    cout<<"AC x "<<a<<"\nWA x "<<b<<"\nTLE x "<<c<<"\nRE x "<<d<<"\n";
}

Measured memory_bytes: 3628
#include <stdio.h>
int main (){
while (1){
int i,ny[10000]={0},ny2[10000]={0},sum=0,sum2=0;
scanf ("%d",&i);
if (i==0)break;
for (int s=0;s<i;s++){
        scanf ("%d%d",&ny[s],&ny2[s]);
}
for (int s=0;s<i;s++){
        if (ny[s]==ny2[s]){
        sum=sum+ny[s];
        sum2=sum2+ny2[s];
        }
        else if (ny[s]>ny2[s]){
                sum=sum+ny[s]+ny2[s];
        }
        else {
                sum2=sum2+ny[s]+ny2[s];
        }
}
printf ("%d %d\n",sum,sum2);
}
return 0;
}

Measured memory_bytes: 1768
#include <iostream>
using namespace std;
int main(void){
    int h,H;
    cin >>h>>H;
    int k,K;
    cin >>k>>K;
    int a,b,c,d;
    cin >>a>>b>>c>>d;
    int A,B;
    A=h*a+H*b+h/10*c+H/20*d;
    B=k*a+K*b+k/10*c+K/20*d;
    if(A>B){
        cout <<"hiroshi"<<endl;
    }
    else if(A<B){
        cout <<"kenjiro"<<endl;
    }
    else if(A==B){
        cout <<"even"<<endl;
    }
}


Measured memory_bytes: 3072
using System;
using System.Linq;

namespace ABC118
{
    class B
    {
        static void Main(string[] args)
        {

            int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
            int N = input[0];
            int M = input[1];

            int[] Ans = new int[M];
            for (int i = 0; i < N; i++)
            {
                input = Console.ReadLine().Split().Select(int.Parse).ToArray();
                int K = input[0];
                for (int j = 1; j <= K; j++)
                {
                    Ans[input[j] - 1]++;
                }
            }

            int res = Ans.Count(x => x == N);
            Console.WriteLine(res);
        }
    }
}


Measured memory_bytes: 13396
import bisect

n, q = [int(i) for i in input().split()]
s = input()
positions = []

for i in range(1, n+1):
    if s[(i-1):(i+1)] == 'AC':
        positions.append(i)

for i in range(q):
    l, r = [int(i) for i in input().split()]
    l_index = bisect.bisect_left(positions, l)
    r_index = bisect.bisect_left(positions, r)
    print(r_index - l_index)


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

#pragma region Macros
using ll = long long;
#define int ll
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
template<class T = ll> using V = vector<T>;
template<class T = ll> using VV = V<V<T>>;
#define IOS\
    ios::sync_with_stdio(false);\
    cin.tie(0);\
    cout.tie(0);
#define FOR(i,l,r) for(ll i=(l);i<(r);++i)
#define REP(i,n) FOR(i,0,n)
#define REPS(i,n) FOR(i,1,n+1)
#define RFOR(i,l,r) for(ll i=(l);i>=(r);--i)
#define RREP(i,n) RFOR(i,n-1,0)
#define RREPS(i,n) RFOR(i,n,1)
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define eb emplace_back
#define all(x) (x).begin(),(x).end()
#define SORT(name) sort(name.begin(), name.end())
#define RSORT(name)\
    SORT(name);\
    reverse(all(name));
#define ZERO(p) memset(p, 0, sizeof(p))
#define MINUS(p) memset(p, -1, sizeof(p))
#if 1
#  define DBG(fmt, ...) printf(fmt, ##__VA_ARGS__)
#else
#  define DBG(fmt, ...)
#endif
inline void Yes(bool b = true) {cout << (b ? "Yes" : "No") << '\n';}
inline void YES(bool b = true) {cout << (b ? "YES" : "NO") << '\n';}
template <class T> inline void print(T x){ cout << x << '\n';}
template<typename T1,typename T2> inline void chmin(T1 &a, T2 b){ if(a > b) a = b; }
template<typename T1,typename T2> inline void chmax(T1 &a, T2 b){ if(a < b) a = b; }

const ll LLINF = (1LL<<60);
const int INF = (1LL<<30);
const double DINF = std::numeric_limits<double>::infinity();
const int MOD = 1000000007;
#pragma endregion

vector<int> GetDivisor(int n) {
    vector<int> v;
    for(int i = 1; i*i <= n; ++i) {
        if(n % i == 0) {
            v.push_back(i);
            if(i != n / i) { v.push_back(n / i); }
        }
    }
    sort(v.begin(), v.end());
    return v;
}

const int MAX_N = 100010;
int N;
V<> A;

signed main() {
    IOS;

    cin >> N;
    A.resize(N);
    map<int, int> isExist;
    REP(i, N) {
        cin >> A[i];
        isExist[A[i]]++;
    }
    int ans = 0;
    REP(i, N) {
        auto res = GetDivisor(A[i]);
        bool isFind = false;
        for(auto num : res) {
            if(num == A[i] && isExist[num] == 1) { continue; }
            if(isExist.count(num) > 0) { isFind = true; break; }
        }
        if(!isFind) { ans++; }
    }
    print(ans);

    return 0;
}


Measured memory_bytes: 17096
from sys import stdin

# W = int(stdin.readline().rstrip())
# N, K = [int(x) for x in stdin.readline().rstrip().split()]
# shot = [[int(x) for x in stdin.readline().rstrip().split()] for _ in range(N)]
# dp = [[0] * (W + 1) for k in range(N + 1)]
#
# for i in range(N):
#     for w in range(W):
#         if w + 1 >= shot[i][0]:
#             dp[i + 1][w + 1] = max(dp[i + 1][w + 1], dp[i][w + 1 - shot[i][0]] + shot[i][1])
#         dp[i + 1][w + 1] = max(dp[i][w + 1], dp[i + 1][w + 1])
#
# print(dp)

N = int(stdin.readline().rstrip())
dp = [k for k in range(N + 1)]

for n in range(N + 1):
    i = 0
    j = 0
    while 6 ** i <= n:
        dp[n] = min(dp[n], dp[n - 6 ** i] + 1)
        i += 1
    while 9 ** j <= n:
        dp[n] = min(dp[n], dp[n - 9 ** j] + 1)
        j += 1

print(dp[N])

Measured memory_bytes: 45040
use proconio::input;

fn main() {
    input! {
        n: usize,
        a: [u128; n],
    };
    if a.contains(&0) {
        println!("{}", 0);
    } else {
        let mut ans = 1_u128;
        for &a_i in a.iter() {
            ans = ans * a_i;
            if ans > 1_000_000_000_000_000_000_u128 {
                println!("-1");
                return;
            }
        }
        println!("{}", ans);
    }
}


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

#define Bye return 0
const int MAX = 1e6+1;

void solve(){
    string str; cin>>str;

    long long sum = 0;
    for (char i : str){
        long long num = i - '0';
        sum += num;
    }
    if(sum%9 == 0) cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
}

int main()
{
    solve();
    Bye;
}


Measured memory_bytes: 3748
//Bismillahir Rahmanir Rahim
//In the name of Allah the Most Merciful
//Astagfirullahil laji Rabbi Minkulli Jamio
#include<bits/stdc++.h>
#include<math.h>
using namespace std;
#define int   long long  int
#define double  long double

#include<fstream>
#define ck while(1)
int i,j,k;

main()
{
    int a;
    cin>>a;
    cout<<a+(a*a)+(a*a*a)<<endl;
}


Measured memory_bytes: 3620
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <numeric>
#include <string>
#include <cmath>
#include <iomanip>
#include <queue>
#include <list>
#include <stack>

using namespace std;

/* constant */

const int INF = 1 << 30;
const int mod = 1000000007;
const double pi = 3.141592653589;

/* typedef */

typedef long long ll;

/* global variables */

/* function */

/* main */
int main() {

    int r, c;
    cin >> r >> c;

    vector< vector<int> > mat(r, vector<int>(c));
    for (int i = 0 ; i < r; i++)
        for (int j = 0; j < c; j++)
            cin >> mat[i][j];

    vector<int> col_sum(c, 0);
    int mat_sum = 0;
    for (int i = 0 ; i < r; i++) {
        int row_sum = 0;
        for (int j = 0; j < c; j++) {
            row_sum += mat[i][j];
            col_sum[j] += mat[i][j];

            cout << mat[i][j] << ' ';

        }
        mat_sum += row_sum;
        cout << row_sum << '\n';
    }
    for (auto c_s : col_sum) {
        cout << c_s << ' ';
    }
    cout << mat_sum << '\n';




}



Measured memory_bytes: 3148
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        int M = scanner.nextInt();
        Map<Integer, Integer> map = new HashMap<>();
        for(int i = 0; i < N; i++) {
            int k = scanner.nextInt();
            for(int j = 0; j < k; j++) {
                int a = scanner.nextInt();
                Integer val = map.get(a);
                if(val == null) {
                    map.put(a, 1);
                }else{
                    map.put(a, val + 1);
                }
            }
        }


        int ans = 0;
        for(Integer key : map.keySet()) {
            if(map.get(key) == N) {
                ans++;
            }
        }

        System.out.println(ans);

    }
}

Measured memory_bytes: 23892
N = int(input())
T,A = list(map(int,input().split()))
H = list(map(int,input().split()))
ans = 0
tempans = 0
for i in range(len(H)):
    tem = T - 0.006*(H[i])
    a = abs(A-tem)

    if i == 0:
        ans = i+1
        tempans = a
    elif a < tempans:
        ans = i+1
        tempans = a

print(ans)

Measured memory_bytes: 3064
#include<bits/stdc++.h>
#define int long long
const int MOD = 1e9 + 7;
using namespace std;
void solve() {
   int n;
   cin>>n;
   int arr[n];
   int sum[n]={0};
   for(int i=0;i<n;++i){
       cin>>arr[i];
       if(i==0) sum[i]=arr[0];
       else sum[i]=sum[i-1]+arr[i];
   }
   int ans=0;
   for(int i=1;i<n;++i){
       ans+=((arr[i]%1000000007)*(sum[i-1]%1000000007))%1000000007;
   }
   cout<<ans%1000000007;

}
int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int t = 1;
    //cin >> t;
    while (t--) {
        solve();
    }
}


Measured memory_bytes: 6772
fn read_stdin() -> String {
    use std::io::Read;
    let mut input = String::new();
    std::io::stdin().read_to_string(&mut input).unwrap();
    input
}

fn scan<'a, I: Iterator<Item = &'a str>, T: std::str::FromStr>(tokens: &mut I) -> T {
    tokens.next().unwrap().parse().ok().unwrap()
}

fn main() {
    let input = read_stdin();
    let tokens = &mut input.split_whitespace();
    let n: usize = scan(tokens);
    let k: usize = scan(tokens);
    if k > (n - 1) * (n - 2) / 2 {
        println!("-1");
        return;
    }
    let m = n * (n - 1) / 2 - k;
    println!("{}", m);
    let mut cnt = 0;
    for i in 1..n + 1 {
        for j in i + 1..n + 1 {
            println!("{} {}", i, j);
            cnt += 1;
            if cnt == m {
                return;
            }
        }
    }
}


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


int GetDigit(ll num) {
    int digit = 0;
    while (num != 0) {
        num /= 10;
        digit++;
    }
    return digit;
}


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

    int min_digit = 10000;
    rep(i,int(sqrt(n))) {
        if (n%(i+1)==0) {
            ll a, b;
            a = (i+1);
            b = n / (i+1);
            int b_digit;
            b_digit = GetDigit(b);
            min_digit = min(b_digit, min_digit);
        }
        
    }

    cout << min_digit << endl;

    return 0;
}

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

public class Main {
  public static void main(String[] args) {
    int n, m;
    Scanner scan = new Scanner(System.in);
    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));


//    System.out.print("n = ?:");
    n = scan.nextInt();
//    System.out.print("m = ?:");
    m = scan.nextInt();
    System.out.println(nBlocks(n, m));


  }

  public static int nBlocks(int n, int m) {
    if (n >= 2 && m <= 100 && m > 0) {
      if (m == 1) {
        return 0;
      }

      return (n - 1) * (m - 1);
    }
    return -1;
  }
}


Measured memory_bytes: 21972
#include <bits/stdc++.h>
#define WHOLE(v) (v).begin(), (v).end()
#define REV_WHOLE(v) (v).rbegin(), (v).rend()
using i64 = int64_t;
using namespace std;
template<class F>auto recursive(F f){return[f](auto...a){return f(f,a...);};}
template<class T>using rev_priority_queue=priority_queue<T,vector<T>,greater<T>>;
template<class T>using vector2d=vector<vector<T>>;
struct fixprec{int p;fixprec(int p):p(p){}}; ostream&operator<<(ostream&o,fixprec f){return o<<fixed<<setprecision(f.p);}
int main() {
    string S, T;
    cin >> S >> T;
    int ans = 1e8;
    for(int i = 0; i <= S.size() - T.size(); i++) {
        int cand = 0;
        for(int j = 0; j < T.size(); j++) {
            if(S[i + j] != T[j]) cand++;
        }
        ans = min(ans, cand);
    }
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 3628
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <numeric>
using namespace std;

#define rep(i, b, e) for(i = b; i < e; ++i)
#define ull unsigned long long int

int main() {

  cin.tie(0);
    ios::sync_with_stdio(false);
    int n, i;
    cin >> n;
    vector<pair<int, int> > a(n);
    rep (i, 0, n) {
      cin >> a[i].first;
      a[i].second = i + 1;
    }
    sort(a.begin(), a.end());

    rep(i, 0, n) cout << a[i].second << " ";

    cout << endl;


    return 0;
}


Measured memory_bytes: 1664
#include<stdio.h>

int main(){
  int A[250];
  int i,j,n;

  scanf("%d",&n);
  for(i = 1;i <= n; i++)scanf("%d",&A[i]);

  for(i = 1;i <= n; i++){
    printf("node %d: key = %d, ",i,A[i]);
    if(i/2 != 0) printf("parent key = %d, ",A[i/2]);
    if(n >= 2*i) printf("left key = %d, ",A[2*i]);
    if(n >= 2*i+1) printf("right key = %d, ",A[2*i+1]);
    printf("\n");
  }
  return 0;
}



Measured memory_bytes: 2052
#include<bits/stdc++.h>
typedef long long ll;
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n,min_now,count=1;
    cin>>n;
    cin>>min_now;
    for(ll i=1;i<n;++i)
    {
        ll temp;
        cin>>temp;
        if(min_now>temp)
            count++;
        min_now=min(min_now,temp);
    }
    cout<<count++<<endl;
    return 0;
}


Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using static Input;

public class Prog
{
    private const int INF = 1000000007;
    public static void Main()
    {
        string S = NextString();
        S = new string(S.Reverse().ToArray());
        string ans = "";
        string T = NextString();
        T = new string(T.Reverse().ToArray());
        int M = S.Length - T.Length;
        bool a = false;
        for (int i = 0; i < S.Length; i++)
        {
            char c = S[i];
            if ((c == '?' || c == T[0]) && !a)
            {
                bool flag = true;
                for (int j = 0; j < T.Length; j++)
                {
                    if (i+j == S.Length) { flag = false; break;  }
                    if ((S[i + j] != T[j]) && (S[i+j] != '?')) flag = false;
                }
                if (flag)
                {
                    a = true;
                    ans += T;
                    i += T.Length - 1;
                }
                else ans += c;
            }
            else ans += c;
        }
        ans = new string(ans.Reverse().ToArray());
        if (!a) { Console.WriteLine("UNRESTORABLE"); }
        else { Console.WriteLine(ans.Replace('?', 'a')); }
    }
}

public class Input
{
    private static Queue<string> q = new Queue<string>();
    private static void Confirm() { if (q.Count == 0) foreach (var s in Console.ReadLine().Split(' ')) q.Enqueue(s); }
    public static int NextInt() { Confirm(); return int.Parse(q.Dequeue()); }
    public static long NextLong() { Confirm(); return long.Parse(q.Dequeue()); }
    public static string NextString() { Confirm(); return q.Dequeue(); }
    public static double NextDouble() { Confirm(); return double.Parse(q.Dequeue()); }
    public static int[] LineInt() { return Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); }
    public static long[] LineLong() { return Console.ReadLine().Split(' ').Select(long.Parse).ToArray(); }
    public static string[] LineString() { return Console.ReadLine().Split(' ').ToArray(); }
    public static double[] LineDouble() { return Console.ReadLine().Split(' ').Select(double.Parse).ToArray(); }
}

Measured memory_bytes: 13396
import java.util.*;
public class Main {
	public static void main(String[] args){
    	int x=0;
        int y;
    	Scanner sc = new Scanner(System.in);
    	String a = sc.next();
        String data[] = a.split("");
	    System.out.println(data[0]+(a.length()-2)+data[a.length()-1]);
    }
}

Measured memory_bytes: 22740
// eddy1021
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
typedef double D;
typedef long double LD;
typedef long long LL;
typedef pair<int,int> PII;
typedef pair<LL,LL> PLL;
#define mod9 1000000009LL
#define mod7 1000000007LL
#define INF  1023456789LL
#define INF16 10000000000000000LL
#define eps 1e-9
#define SZ(x) (int)(x).size()
#define ALL(x) (x).begin(), (x).end()
#define IOS ios_base::sync_with_stdio(0); cin.tie(0)
#ifndef ONLINE_JUDGE
#define debug(...) printf(__VA_ARGS__)
#else 
#define debug(...)
#endif
inline LL getint(){
  LL _x=0,_tmp=1; char _tc=getchar();    
  while( (_tc<'0'||_tc>'9')&&_tc!='-' ) _tc=getchar();
  if( _tc == '-' ) _tc=getchar() , _tmp = -1;
  while(_tc>='0'&&_tc<='9') _x*=10,_x+=(_tc-'0'),_tc=getchar();
  return _x*_tmp;
}
inline LL add( LL _x , LL _y , LL _mod = mod7 ){
  _x += _y;
  return _x >= _mod ? _x - _mod : _x;
}
inline LL sub( LL _x , LL _y , LL _mod = mod7 ){
  _x -= _y;
  return _x < 0 ? _x + _mod : _x;
}
inline LL mul( LL _x , LL _y , LL _mod = mod7 ){
  _x *= _y;
  return _x >= _mod ? _x % _mod : _x;
}
LL mypow( LL _a , LL _x , LL _mod ){
  if( _x == 0 ) return 1LL;
  LL _ret = mypow( mul( _a , _a , _mod ) , _x >> 1 , _mod );
  if( _x & 1 ) _ret = mul( _ret , _a , _mod );
  return _ret;
}
LL mymul( LL _a , LL _x , LL _mod ){
  if( _x == 0 ) return 0LL;
  LL _ret = mymul( add( _a , _a , _mod ) , _x >> 1 , _mod );
  if( _x & 1 ) _ret = add( _ret , _a , _mod );
  return _ret;
}
inline bool equal( D _x ,  D _y ){
  return _x > _y - eps && _x < _y + eps;
}
#define Bye exit(0)
int __ = 1 , _cs;
/*********default*********/
#define N 201010
void build(){

}
int n , a[ N ];
void init(){
  n = getint();
  for( int i = 0 ; i < n ; i ++ )
    a[ i ] = getint();
}
void solve(){
  deque<int> v;
  for( int i = 0 ; i < n ; i ++ )
    if( i % 2 )
      v.push_back( i );
    else
      v.push_front( i );
  if( v.front() != n - 1 )
    reverse( v.begin() , v.end() );
  for( int i = 0 ; i < n ; i ++ )
    printf( "%d%c" , a[ v[ i ] ] , " \n"[ i + 1 == n ] );
}
int main(){
  build();
  //__ = getint();
  while( __ -- ){
    init();
    solve();
  }
}


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



int main()
{   
    int a[5];
   
    for(int i=0;i<5;i++){
     cin>>a[i];
    if(a[i]==0){
        cout<<i+1;
        return 0;
    }
    }
   return 0;
   }

Measured memory_bytes: 3636
package main

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

//=====I/O=====

var (
	sc = bufio.NewScanner(os.Stdin)
	wr = bufio.NewWriter(os.Stdout)
)

func scanInt() int {
	sc.Scan()
	a,_ := strconv.Atoi(sc.Text())
	return a
}

func scanInts(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ { res[i] = scanInt() }
	return res
}

func scanText() string {
	sc.Scan()
	return sc.Text()
}

func printInts(a ...int) {
	for i, e := range a {
		fmt.Fprint(wr, e)
		if i != len(a)-1 { fmt.Fprint(wr, " ") }
	}
	fmt.Fprintln(wr)
	wr.Flush()
}

//=====main=====

func main() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 10000), 100000000)

	n, m := scanInt(), scanInt()
	s := scanText()

	dp := make([]int, n+1)
	dp[n] = 0

	p := n
	for p > 0 {
		mv := -1
		for i := 1; i < m+1; i++ {
			if p-i < 0 {
				break
			}

			if s[p-i] == '1' {
				dp[p-i] = -1
				continue
			}
			dp[p-i] = dp[p]+1
			mv = p-i
		}
		if mv == -1 {
			fmt.Println(-1)
			return
		}
		p = mv
	}

	c := dp[0]-1
	pre := 0
	for i := 1; i < n+1; i++ {
		if dp[i] == c {
			fmt.Print(i-pre)
			if i==n {
				break
			}
			fmt.Print(" ")
			c--
			pre=i
		}
	}

	fmt.Println()
	
}


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

using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<string> vs;
typedef unordered_set<int> si;
typedef pair<int, int> pp;

#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)


template <typename T>
void printV(vector<T> A) {
    if (A.empty()) cerr << "EMTPY\n";
    else { 
        cerr << "[";
        for (int i = 0; i < A.size() -1 ; ++i) {
            cerr << A[i] << ", ";
        }
        if (A.size()) cerr << A.back() << "]\n";
    }
}


template <typename T>
void printVV(vector<vector<T>> A) {
    cerr << "[";
    for (auto v : A) {
        printV<T>(v);
    }
    cerr << "]";
}

template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
    cerr << name << ": " << arg1 << endl;
}

template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&& ...args) {
    const char* comma = strchr(names + 1, ',');
    cerr.write(names, comma - names) << ": " << arg1 << " |";
    __f(comma + 1, args...);
}

int main(int argc, char **argv) {
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll n; cin >> n;
    cout << 1000 * (n / 500) + 5 * ((n % 500) / 5);
    return 0;
}



Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    
 /*   double t,x;
    cin>>t>>x;
    t=t/x;
    cout<<t*1.0<<'\n';*/
  
   /* int a,b,c;
    cin>>a>>b>>c;
    cout<<(a*b)/2<<'\n';*/

   /* int d;
    cin>>d;
    if(d==22){
        cout<<"Christmas Eve Eve Eve"<<'\n';
    }else if(d==23){
        cout<<"Christmas Eve Eve"<<'\n';
    }else if(d==24){
        cout<<"Christmas Eve"<<'\n';
    }else if(d==25){
        cout<<"Christmas"<<'\n';
    }*/

    int x,y;
    cin>>x>>y;
    y=y/2;
    cout<<x+y<<'\n';
}

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

using namespace std;

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

int n; ui k;
ll ans;
vector<pii> nums[35];
ll ut[35];

int main() {
    cin >> n >> k;
    for (int i = 0; i < n; i++) {
        ui x; ll y;
        cin >> x >> y;
        int idx;
        if (x == 0) idx = 0;
        else idx = 32 - __builtin_clz(x);
        nums[idx].emplace_back(x, y);
        ut[idx] += y;
    }
    while (k) {
        int idx = 32 - __builtin_clz(k);
        ll cur = 0;
        for (int i = 0; i < idx; i++) cur += ut[i];
        ans = max(cur, ans);
        k ^= 1<<(idx-1);
        for (auto p : nums[idx]) {
            ui x; ll y;
            tie(x, y) = p;
            x ^= 1 << (idx-1);
            int idx2 = (x == 0) ? 0 : 32 - __builtin_clz(x);
            nums[idx2].emplace_back(x, y);
            ut[idx2] += y;
        }
    }
    ans = max(ans, ut[0]);
    cout << ans << '\n';
    return 0;
}


Measured memory_bytes: 28400
#include<stdio.h>

int main()
{
    int A,B,C,h1,h2,h3;
    scanf("%d %d %d",&A,&B,&C);
     if (A>B) {
      h2=A;
      h3=B;
   } else {
      h2=B;
      h3=A;
   }
   if (h2>C) {
      h1=h2;
      if(h3>C){
         h2=h3;
         h3=C;
      }else {
         h2=C;
      }
   }else h1=C;
   printf("%d",h1*10+h2+h3);
}


Measured memory_bytes: 128
#include<iostream>
#include<string>
#include<vector>
#include<math.h>
#include<algorithm>
#include<cstdio>
#include<stdio.h>
#include<stack>
#include<sstream>
#include<iomanip>
typedef long long ll;

#define pi 3.14159265358979323846
#define VI vector<int>
#define VLL vector<long long>
#define MAX max_element
#define MIN min_element
#define all(v) v.begin(), v.end()
const ll MOD = 1e9 + 7;

using namespace std;

template<typename T>
T gcd(T a, T b) {
	return b ? gcd(b, a % b) : a;
}
template<typename T>
T lcm(T a, T b) {
	return a * b / gcd(a, b);
}

template<typename T>
T finder(vector<T> vec, T number) {
	auto itr = find(vec.begin(), vec.end(), number);
	size_t index = distance(vec.begin(), itr);
	if (index != vec.size()) { // 発見できたとき
		return 1;
	}
	else { // 発見できなかったとき
		return 0;
	}
}
ll frac(ll n)
{
	if (n == 0) {
		return 1;
	}
	return (n * frac(n - 1)) % MOD;
}

/*char r[4];
int yaju[4];
char op[3];
int sum = 0;
scanf("%s", r);
for (int i = 0;i < 4;i++) {
	yaju[i] = r[i] - '0';
}
*/
int main() {
	ll N, D;cin >> N >> D;
	vector<vector<ll>> X(N);
	ll ans = 0, dis = 0;
	for (int i = 0;i < N;i++) {
		X[i].resize(D);
		for (int u = 0;u < D;u++) {
			cin >> X[i][u];
		}
	}
	for (int i = 0;i < N-1;i++) {
		for (int j = i + 1;j < N;j++) {
			dis = 0;
			for (int k = 0;k < D;k++) {
				dis += (X[j][k] - X[i][k]) * (X[j][k] - X[i][k]);
			}
			for (int m = 1;;m++) {
				if (m * m == dis) ans++;
				if (m * m > dis)break;
			}
		}
	}
	cout << ans << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define ll long long
// union by size + path having
class UnionFind {
public:
    vector <ll> par; // 各元の親を表す配列
    vector <ll> siz; // 素集合のサイズを表す配列(1 で初期化)

    // Constructor
    UnionFind(ll sz_): par(sz_), siz(sz_, 1LL) {
        for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
    }
    void init(ll sz_) {
        par.resize(sz_);
        siz.assign(sz_, 1LL);  // resize だとなぜか初期化されなかった
        for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
    }

    // Member Function
    // Find
    ll root(ll x) { // 根の検索
        while (par[x] != x) {
            x = par[x] = par[par[x]]; // x の親の親を x の親とする
        }
        return x;
    }

    // Union(Unite, Merge)
    bool merge(ll x, ll y) {
        x = root(x);
        y = root(y);
        if (x == y) return false;
        // merge technique（データ構造をマージするテク．小を大にくっつける）
        if (siz[x] < siz[y]) swap(x, y);
        siz[x] += siz[y];
        par[y] = x;
        return true;
    }

    bool issame(ll x, ll y) { // 連結判定
        return root(x) == root(y);
    }

    ll size(ll x) { // 素集合のサイズ
        return siz[root(x)];
    }
};
int main() {
  int n,m,k;
  cin>>n>>m>>k;
  UnionFind tree(n);
  vector<vector<int>>ff(n);
  for(int i=0;i<m;i++){
    int a,b;
    cin>>a>>b;
    ff[a-1].push_back(b-1);
    ff[b-1].push_back(a-1);
    tree.merge(a-1,b-1);
  }
  vector<vector<int>>bb(n);
  for(int i=0;i<k;i++){
    int a,b;
    cin>>a>>b;
    bb[a-1].push_back(b-1);
    bb[b-1].push_back(a-1);
  }
  for(int i=0;i<n;i++){
    int ans=tree.size(i)-1;
    for(int j=0;j<ff[i].size();j++){
      if(tree.issame(ff[i][j],i)) ans--;
    }
    for(int j=0;j<bb[i].size();j++){
      if(tree.issame(bb[i][j],i)) ans--;
    }
    cout<<ans<<endl;
  }
}

Measured memory_bytes: 15716
#include <bits/stdc++.h>
#define _overload3(_1,_2,_3,name,...)name
#define _rep(i,n)repi(i,0,n)
#define repi(i,a,b)for(int i=int(a),i##_len=(b);i<i##_len;++i)
#define MSVC_UNKO(x)x
#define rep(...)MSVC_UNKO(_overload3(__VA_ARGS__,repi,_rep,_rep)(__VA_ARGS__))
#define all(c)c.begin(),c.end()
#define write(x)cout<<(x)<<'\n'
using namespace std; using ll = long long; template<class T>using vv = vector<vector<T>>;
template<class T>auto vvec(int n, int m, T v) { return vv<T>(n, vector<T>(m, v)); }
constexpr int INF = 1 << 29, MOD = int(1e9) + 7; constexpr ll LINF = 1LL << 60;
struct aaa { aaa() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(10); }; }aaaa;

int main() {
    string S, T;
    cin >> S >> T;
    write(S == T.substr(0, S.size()) ? "Yes" : "No");
}


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

using namespace std;
using ll=long long;

int main(){
    ll n;
    cin>>n;
    pair<ll,ll> val(1,0);
    for (int i = 0; i < n; ++i) {
        int q;
        cin>>q;
        ll x;
        cin>>x;
        if(q==1){
            val.first*=x;
            val.second*=x;
        }
        else if(q==2){
            val.second+=x;
        }
        else{
            val.second-=x;
        }
    }
    cout<<-val.second<<" "<<val.first<<endl;
    return 0;
}


Measured memory_bytes: 3120
#include<bits/stdc++.h>
#define ll long long
const int MAXN=1e5+5;
const int MOD=1e9+7;
using namespace std;

int main(){
	int a, b, c;
	int ans;
	scanf("%d%d%d",&a,&b,&c);
	ans = b/a;
	ans=min(ans, c);
	printf("%d",ans);
	return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <unordered_map>

using namespace std;
using ll = long long;

void _cin(){} template <class Head, class... Tail> void _cin(Head&& head, Tail&&... tail){ cin >> head; _cin(forward<Tail>(tail)...); }
void _cout(){ cout << "\n"; } template <class Head, class... Tail> void _cout(Head&& head, Tail&&... tail){ cout << head; _cout(forward<Tail>(tail)...); }
int gcd(int a, int b){ return (b == 0) ? a : gcd(b, a % b); }
template<typename S, typename T> ostream& operator<<(ostream &os, const pair<S, T> &p){ cout << "[" << p.first << ", " << p.second << "]"; return os; }

#define Sq(x) (x)*(x)
#define For(i, n) for(int i = 0; i < (n); i ++)
#define Rep(n) For(_, n)
#define Range(c) c.begin(), c.end()
#define RevRange(c) c.rbegin(), c.rend()
#define Contains(c, x) (find(Range(c), x) != c.end())
#define Search(rb, re, x) distance(rb, find(rb, re, x))
#define Sort(a) sort(Range(a))
#define DeSort(a) sort(RevRange(a))
#define Reverse(c) reverse(Range(c))
#define Unique(a) a.erase(unique(Range(a)), a.end())
#define Cusum(T, xs, sxs) vector<T> sxs(xs.size()+1); For(i, (int)xs.size()) sxs[i+1] = sxs[i] + xs[i]
#define Cin(T, ...) T __VA_ARGS__; _cin(__VA_ARGS__)
#define Cins(T, n, xs) vector<T> xs(n); For(i, n) cin >> xs[i]
#define Cins2(T, n, xs, ys) vector<T> xs(n), ys(n); For(i, n) cin >> xs[i] >> ys[i]
#define Cins3(T, n, xs, ys, zs) vector<T> xs(n), ys(n), zs(n); For(i, n) cin >> xs[i] >> ys[i] >> zs[i]
#define Cinss(T, n, m, xs) Vec2(T, n, m, xs); For(i, n) For(j, m) cin >> xs[i][j]
#define Cinm(T, n, map) unordered_map<T, int> map; Rep(n){ Cin(T, x); map[x] ++; }
#define Cout(...) _cout(__VA_ARGS__)
#define Couts(xs) { for(const auto &e : xs) cout << e << " "; cout << "\n"; }
#define Coutyn(cond) Cout((cond) ? "yes" : "no")
#define CoutYn(cond) Cout((cond) ? "Yes" : "No")
#define CoutYN(cond) Cout((cond) ? "YES" : "NO")
#define Return(expr) { Cout(expr); return 0; }
#define vc vector
#define Mini(a, x) a = min(a, x)
#define Maxi(a, x) a = max(a, x)

// constexpr int MOD = 1e9+7;

int main(void){
    Cin(string, s);
    int n = s.size();
    int ans = 0;
    For(i, n){
        if(s[i] != s[n-1-i]) s[i] = s[n-1-i], ans ++;
    }
    Cout(ans);
}


Measured memory_bytes: 256
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define N 2*10e5
#define precise cout<<fixed<<setprecision(10)
#pragma GCC optimize("O0")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")
#define rep(i,a,b) for(int i=a;i<b;i++)
#define min3(a,b,c) min(a,min(b,c))
#define nl cout<<"\n";
#define all(v) v.begin(),v.end()
#define F first
#define S second
typedef long long ll;
typedef vector<long long> vl;
typedef vector<pair<long,long>> vp;
void get(ll arr[],ll n){for(ll i=0;i<n;i++) cin>>arr[i];}
ll gcd(ll a,ll b);
ll binpow(ll a,ll b);
void solve()
{
    ll d,t,s;
    cin>>d>>t>>s;
    ll tt= d/s;
    if(d%s!=0) tt++;
    if(tt<=t) cout<<"Yes";
    else cout<<"No";   
}
int main()
{
 	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t;
	t=1;
	//cin>>t;
	while(t--)
	{
	 	solve();
	}
	//cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}
ll binpow(ll a, ll b) {
   ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}
ll gcd(ll a,ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

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

int main(){
    int n,a,b; cin >> n >> a >> b;
    string s; cin >> s;
    int sum = 0, oversea = 0;
    for(int i = 0; i < n; i++){
        if(s[i] == 'c') cout << "No" << endl;
        else if(sum >= a+b) cout << "No" << endl;
        else if(s[i] == 'a') {cout << "Yes" << endl; sum++;}
        else{
            if(oversea < b){cout << "Yes" << endl; sum++; oversea++;}
            else cout << "No" << endl;
        }
    }
    return 0;
}

Measured memory_bytes: 896
#include <iostream>
#include <string>
#include <cstdio>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <functional>
#include <queue>
#include <math.h>
#include <cmath>
#include <unordered_map>

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


int main(){
    int a,b;
    cin>>a>>b;
    cout<<a*b<<endl;
}

Measured memory_bytes: 3644
#include<stdio.h>


int main(){
    int n;
    scanf("%d",&n);
    for(int i = 1;i <= n;i++){
        if(i % 3 == 0){
            printf(" %d",i);
        } else if(i % 10 == 3){
            printf(" %d",i);
        }
        else{
            int x = i;
            while(x!=0){
                x /= 10;
                if(x % 10 == 3){
                    printf(" %d",i);
                    break;
                }
            }
        }
    }
    printf("\n");
    return 0;
}



Measured memory_bytes: 2744
#include <cstdio>
#include <algorithm>
static const int MAXN = 100005;

int n, t;
int a[MAXN];

int main()
{
    scanf("%d%d", &n, &t); t /= 2;
    for (int i = 0; i < n; ++i) scanf("%d", &a[i]);

    int max = -1;
    int profit = -1, count = 0;
    for (int i = n - 1; i >= 0; --i) {
        if (max - a[i] > profit) profit = max - a[i], count = 1;
        else if (max - a[i] == profit) count++;
        max = std::max(max, a[i]);
    }

    printf("%d\n", count);
    return 0;
}


Measured memory_bytes: 512
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N,i;
  string S;
  cin >> N;
  for(i=0 ;i<N ;i++){
    cin >> S;
    if (S == "Y") {
      cout << "Four" << endl;
      return 0;
    }
    
  }
  cout << "Three" << endl;
}

Measured memory_bytes: 256
#include <stdio.h>
int main(){
  int n,q,i,j,k;
  int a[2000]={0};
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&q);
    for(j=2000-q;j>0;j--){
      if(a[j]){
        a[j+q] = 1;
      }
    }
    a[q] = 1;
  }
  scanf("%d",&k);
  for(i = 0; i < k; i++){
    scanf("%d", &q);
    if(a[q]){
      printf("yes\n");
    }
    else printf("no\n");
  }
   
  return 0;
}

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

int innerProduct(vector<int> a, vector<int> b, int C){
	int ans=0;
	int s = a.size();
	for(int i=0; i<s; i++){
		ans += a[i]*b[i];
		
	}
	ans += C;
	return ans;
}

int main() {
	int N, M, C;
	
	cin >> N >> M >> C;
	
	//2次元配列
	vector<vector<int>> v(N, vector<int>(M));
	vector<int> B(M);
	
	for(int i=0; i<M; i++){
		cin >> B[i];
	}
	
	//N回M個のデータを受け取る
	for(int i=0; i< N; i++){
		for(int j=0; j<M; j++){
			cin >> v[i][j];
		}
	}
	
	int cnt=0;
	for(int i=0; i<N; i++){
		int ans = innerProduct(B, v[i], C);
		if(ans > 0) cnt++;
	}
	
	cout << cnt;
	cout << endl;
	return 0;
}

Measured memory_bytes: 256