akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <algorithm>
#include <string>
#include <stdlib.h>
#include <vector>
#include <climits>
#include <math.h>
#include <map>
#include <set>
#include <stack>
#include <iomanip>
using namespace std; 
#define Endl '\n'
int main()
{
   int k;
   int n,m;int flag=0;
   cin>>k>>n>>m;
   for (int i = n; i <= m; ++i)
   {
       if (i%k==0)
       {
           flag=1;
           break;
       }
   }
   if (flag==1)
   {
       cout<<"OK";
   }
   else
        cout<<"NG";
}

Measured memory_bytes: 3624
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
// Welcome to my source code!

const int MOD = 1000000007;
const int MAX_N = 100000;

ll dp[MAX_N + 5];

ll mod_pow(ll x, ll n, ll mod) {
    ll res = 1;
    while (n > 0) {
        if (n & 1) res = res * x % mod;
        x = x * x % mod;
        n >>= 1;
    }
    return res;
}

int main() {
    int n, k;
    cin >> n >> k;
    for (int i = 1; i <= k; i++) {
        dp[i] = mod_pow(k / i, n, MOD);
    }
    ll ans = 0;
    for (int i = k; i >= 1; i--) {
        for (int j = i * 2; j <= k; j += i) {
            dp[i] -= dp[j];
        }
        dp[i] %= MOD;
        ans += dp[i] * i;
        ans %= MOD;
        while (ans < 0) ans += MOD;
    }
    cout << ans << endl;
}

Measured memory_bytes: 4356
#include<iostream>
#include<sstream>
#include<fstream>
#include<vector>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<functional>
#include<climits>
#include<utility>
#include <iomanip>
#include<map>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;

#define max(a,b) (a>b?a:b)
#define min(a,b) (a<b?a:b)
#define FORB(i,s,e,st) for (int i = int(s); i < int(e); i+=(int(st)))
#define FOR(i,s,e) FORB(i,s,e,1)
#define REP(i,x) FOR(i,0,x)
#define CLR(a) memset((a), 0 ,sizeof(a))


const int MOD = 1e+9+7;
const double PI  = acos(-1.0);


int main(){
  ll a,b;
  cin>>a>>b;
  if(a*b<=0) cout<<"Zero\n";
  else if(a>0||(b-a)%2==1) cout<<"Positive\n";
  else cout<<"Negative\n";
  
}


Measured memory_bytes: 256
def compute_prefix_function(p):
    m = len(p)
    pi = [0 for _ in range(m + 1)]
    pi[1] = 0
    k = 0
    for q in range(2, m + 1):
        while k > 0 and p[k] != p[q - 1]:
            k = pi[k]
        if p[k] == p[q - 1]:
            k += 1
        pi[q] = k
    return pi


def kmp_matcher(t, p):
    n = len(t)
    m = len(p)
    pi = compute_prefix_function(p)
    q = 0
    for i in range(1, n + 1):
        while q > 0 and p[q] != t[i - 1]:
            q = pi[q]
        if p[q] == t[i - 1]:
            q += 1
        if q == m:
            print(i - m)
            q = pi[q]


t = input()
p = input()
kmp_matcher(t, p)


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

int main() {
  int p;
  p = 700;
  string s;
  cin >> s;
  rep(i,3){
    if(s[i] == 'o'){
      p += 100;
    }
  }
  cout << p;
  return 0;
}

Measured memory_bytes: 256
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <bitset>
#include <deque>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <iterator>
#include <string>
#include <chrono>
#include <random>
#include <tuple>
#include <utility>
#include <fstream>
#include <complex>
#define _USE_CMATH_DEFINES

const long INF = (1l << 30);
const long LINF = (1l << 60); //1.15*10^18

std::string s;
long q;

int main(){
    std::cin >> s;
    scanf("%ld", &q);
    std::deque<char> ans;
    for(int i = 0; i < s.size(); i++){
        ans.push_back(s[i]);
    }
    long rev = 0;
    for(int i = 0; i < q; i++){
        long t;
        std::cin >> t;
        if(t == 1){
            rev = 1 - rev;
        }else{
            long f;
            char c;
            std::cin >> f >> c;
            f--;
            if((f + rev) % 2 == 0){
                ans.push_front(c);
            }else{
                ans.push_back(c);
            }
        }
    }
    if(rev == 0){
        for(int i = 0; i < ans.size(); i++){
            printf("%c", ans[i]);
        }
    }else{
        for(int i = ans.size() - 1; i >= 0; i--){
            printf("%c", ans[i]);
        }
    }
    printf("\n");
}


Measured memory_bytes: 896
#include<iostream>
#include<algorithm>
#include<vector>
#include <numeric>
using namespace std;
int main(int argc, char const *argv[]) {
    int N,M;
    std::vector<int> X;
    std::vector<int> sub;
    int tmp;
    std::cin >> N >> M;
    for (size_t i = 0; i < M; i++) {
        std::cin >> tmp;
        X.push_back(tmp);
    }
    sort(X.begin(),X.end());
    for (size_t i = 0; i < M-1; i++) {
        tmp=X[i+1]-X[i];
        sub.push_back(tmp);
    }
    sort(sub.begin(),sub.end());
    for (size_t i = 0; i < N-1; i++) {
        if(sub.empty()==1)break;
        sub.pop_back();
    }
    if(sub.empty()==1)std::cout << 0 << '\n';
    else{
    tmp=accumulate(sub.begin(), sub.end(),0);
    std::cout << tmp;
}

    return 0;
}

Measured memory_bytes: 1400
#include <iostream>
#include <vector>
#include <math.h>
#include <algorithm>
#include <string>
#include <map>
#include <iomanip>
#include <cmath>
#define rep(i,N) for(int i=0; i<N;i++)
#define FOR(i,N) for(int i=1; i<N;i++)
using namespace std;

int main(){
    int N, X, Y;
    cin>>N>>X>>Y;
    vector<int> count(N-1);
    //            -(X+1)-(X+2)-...-(Y-1)-
    //1-2-3-...-            -X-Y-          -...-(N-1)-N
    //    j----------i
    int d;
    for(int j=1;j<=N-1;j++){
        for(int i=j+1;i<=N;i++){
            if(i<=X or j>=Y){
                //cout<<"ji X Y ji"<<endl;
                d=i-j-1;
                count.at(d)++;
                //cout << j<<" "<<i<<" "<<d+1<<endl;
            }else{
                if(i-j<abs(X-j)+1+abs(Y-i)){
                    //cout<<"i-j< X Y"<<endl;
                    d=i-j-1;
                    count.at(d)++;
                    //cout << j<<" "<<i<<" "<<d+1<<endl;
                }else{
                    //cout<<"i-j> X Y"<<endl;
                    d=abs(X-j)+1+abs(Y-i)-1;
                    count.at(d)++;
                    //cout << j<<" "<<i<<" "<<d+1<<endl;
                }
            }
        }
    }
    rep(l,N-1){
        cout<<count.at(l)<<endl;
    }
    return 0;
}

Measured memory_bytes: 3512
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String mymy = s.next();
        String first = mymy.substring(0, 2);
        String second = mymy.substring(2, 4);
        int fi = Integer.parseInt(first);
        int se = Integer.parseInt(second);
        String alg;
        if (0 < fi && fi <= 12) {
            if (0 < se && se <= 12) alg = "AMBIGUOUS";
            else alg = "MMYY";
        } else {
            if (0 < se && se <= 12) alg = "YYMM";
            else alg = "NA";
        }
        System.out.println(alg);
    }
}

Measured memory_bytes: 23892
#include<iostream>
#include<cmath>
#include<cassert>
#include<cstdlib>
using namespace std;
#define EPS 0.0000000001


main(){
  int tcase;   cin >> tcase;
  double x1, y1, x2, y2, x3, y3, x4, y4;
  for ( int i = 0; i < tcase; i++ ){
      cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3 >> x4 >> y4;

  
      if ( abs((y2 - y1)*(x4 - x3) - (y4 - y3)*(x2 - x1) ) < EPS ) cout << "YES" << endl;
      else cout << "NO" << endl;
  }
}

Measured memory_bytes: 1224
import java.io.BufferedReader
import java.io.BufferedWriter

fun main() = Case().exec(::solve)
//fun main() = TestExecutor.assert(testCase) { Case(it.r, it.w).exec(::solve) }

/** https://atcoder.jp/contests/abc174/tasks/abc174_d **/
fun solve(c: Case) {
    val n = c.long().toInt()
    val cs = c.string().toCharArray()

    var head = n - 1
    var tail = 0
    var score = 0

    while (true) {
        while (tail < n - 1 && tail < head && cs[tail] == 'R') tail++
        while (head > 0 && head > tail && cs[head] == 'W') head--
        if (head <= tail) break
        tail++
        head--
        score++
    }

    c.println(score.toString())
}

class Case(
    private val input: BufferedReader = System.`in`.bufferedReader(),
    private val out: BufferedWriter = System.out.bufferedWriter()
) {
    fun exec(fn: (Case) -> Unit) = input.use { out.use { execInThread(fn) } }
    private fun execInThread(fn: (Case) -> Unit) =
        Thread(null, { fn(this) }, "solve", 64 * 1024 * 1024)
            .apply { setUncaughtExceptionHandler { _, e -> e.printStackTrace(); kotlin.system.exitProcess(1) } }
            .apply { start() }.join()

    fun println(c: CharSequence?) = out.appendln(c)
    fun string(): String = input.readLine().trimEnd()
    fun long(): Long = input.readLine().toLong()
    fun intList(): List<Int> = input.readLine().split(" ").map { it.toInt() }
    fun longList(): List<Long> = input.readLine().split(" ").map { it.toLong() }
}

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

int main() {
	int n;
	cin >> n;
	map<int, int>mp;
	for (int i = 0; i < n; i++) {
		int a;
		cin >> a;
		mp[a]++;
	}
	int ans = 0;
	for (int i = 0; i < 100010;i++) {
		ans = max(ans, mp[i - 1] + mp[i] + mp[i + 1]);
	}
	cout << ans << endl;
}

Measured memory_bytes: 4992
n = int(input())
a = list(map(int,input().split(" ")))

r = 1

for x in a:
    if(x == 0):
        print(0)
        exit(0)    

for x in a:
    r = r * x
    if(r > 10**18):
        print(-1)
        exit(0)
r = int(r)
print(r)        


Measured memory_bytes: 21496
N=int(input())

a=0
if N>81:
  print('No')
elif N<1:
  print('No')
else:
  for i in range(1,10):
    if N%i==0:
      if N/i<=9:
          print('Yes')
          a=1
          break
  if a==0:
    print('No')

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

int main(){
	int n, d,ans=0; cin>> n >> d;

	for(int i=0; i<n; i++){
		double x,y; cin>>x>>y;
		double temp=0;
		temp = (x*x)+(y*y);
		temp = sqrt(temp);
		if(temp <= d)
			ans++;
		//cout<<"temp:"<<temp<<endl;
	}
	cout<<ans<<endl;
	return 0;
}

Measured memory_bytes: 3768
#include <iostream>
#include <utility>
#include <map>
#include <vector>
#include <algorithm>
#include <queue>
#include <math.h>
#include <stack>
#include <set>
#include <deque>
#include <cmath>

using namespace std;
typedef long long ll;
ll mod = 1e9+7;
//ll mod = 998244353;
#define rep(i,n) for(int i = 0; i < (n); ++i)

int main() {
    double a, b, h, m;
    cin >> a >> b >> h >> m;
    double m_ang = m / 60 * 360;
    double h_ang = h / 12 * 360 + m / 60 * 30;
    double m_x = b * cos(m_ang * M_PI / 180);
    double m_y = b * sin(m_ang * M_PI / 180);
    double h_x = a * cos(h_ang * M_PI / 180);
    double h_y = a * sin(h_ang * M_PI / 180);
    double dist = sqrt((m_x - h_x) * (m_x - h_x) + (m_y - h_y) * (m_y - h_y));
    printf("%.10lf\n", dist);
    return 0;
}


Measured memory_bytes: 4112
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

using namespace std;
using ll = long long;
using vpii = vector<pair<int, int>>;
using vpll = vector<pair<ll, ll>>;

int		main(void)
{
	int N, K;
	cin >> N >> K;
	int cnt = 1;
	while (N >= K)
	{
		N /= K;
		cnt++;
	}
	cout << cnt << endl;
}


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

#define f first 
#define s second 
#define pb push_back               
#define mp make_pair 

using namespace std;                    

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

const int N = (int)5e5 + 123, mod = (int)1e9 + 7, inf = (int)1e9;
int n, k, a[N], b[N], t[4*N], cnt[N], c[N];
vector< int > up[N];

void upd(int v, int tl, int tr, int pos, int val){
	if(tl == tr){
		t[v] = val;
		return ;
	}
	int tm = (tl + tr) / 2;
	if(pos <= tm)
		upd(v + v, tl, tm, pos, val);
	else
		upd(v + v + 1, tm + 1, tr, pos, val);
	t[v] = min(t[v + v], t[v + v + 1]);
}
int get(int v, int tl, int tr, int l, int r){
	if(r < tl || tr < l)
		return inf;
	if(l <= tl && tr <= r)
		return t[v];
	int tm = (tl + tr) / 2;
	return min(get(v + v, tl, tm, l, r), get(v + v + 1, tm + 1, tr, l, r));
}

int main(){    

	scanf("%d%d", &n, &k);
	for(int i = 1; i <= n; i++){
		scanf("%d", &a[i]);
		b[a[i]] = i;
	}
	a[n + 1] = b[n + 1] = n + 1;
	for(int i = 1; i <= n; i++)
		upd(1, 1, n, i, n + 1);
	for(int i = n; i >= 1; i--){
		int x = b[i];
		int l = get(1, 1, n, x - k + 1, x);
		int r = get(1, 1, n, x, x + k - 1);
		upd(1, 1, n, x, i);
		/*
		for(int i = 1; i <= n; i++)
			cerr << get(1, 1, n, i, i) << " ";
		cerr << endl;
		*/
		cerr << b[i] << " " << l << " " << r << endl;
		
		up[b[l]].pb(i);
    	up[b[r]].pb(i);
    }
    
    priority_queue< int > q;
    vector< int > ans;
    q.push(n + 1);
    
    while(!q.empty()){
    	int v = q.top();
    	ans.pb(v);
    	q.pop();
    	for(int i = 0; i < up[v].size(); i++){
    		int x = up[v][i];
    		cnt[x]++;
    		if(cnt[x] == 2)
    			q.push(b[x]);
    	}	
    }
    
    reverse(ans.begin(),ans.end());
    //sadsad
    for(int i = 0; i < n; i++)
    	c[ans[i]] = i + 1;
    for(int i = 1; i <= n; i++)
    	cout << c[i] << endl;
	return 0;
}


Measured memory_bytes: 48496
#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <set>
#include <map>
#include <vector>
#include <math.h>
#include <cmath>
#include <queue>
#include <stack>
#include <list>
#include <functional>
#include <numeric>
#include <iostream>
#include <string>
#include <time.h>

using namespace std;
typedef long long ll;
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define all(x) (x).begin(),(x).end()
ll GCD(ll a, ll b) { return b ? GCD(b, a % b) : a; }

ll L, R;

int main() {

	scanf("%d%d", &L, &R);

	R = min(R, L + 2020);

	ll ans = 123456789;
	for (ll i = L; i <= R; ++i) {
		for (ll j = i + 1; j <= R; ++j) {
			ans = min(ans, i * j % 2019);
		}
	}

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

	return 0;
}


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

using namespace std;

int n, k;
vector<int> arr;
vector<int> dp;

int main(){
    cin>>n>>k;
    arr.resize(n);
    for(int i = 0; i < n; i++){
        cin>>arr[i];
    }
    dp.assign(k+1, 0);
    for(int i = 0; i <= k; i++){
        for(int j = 0; j < n; j++){
            if(i >= arr[j]) dp[i] |= !dp[i - arr[j]];
        }
    }
    if(dp[k]){
        cout<<"First"<<endl;
    }else{
        cout<<"Second"<<endl;
    }
    return 0;
}

Measured memory_bytes: 640
#include <bits/stdc++.h>
using namespace std;
int main(void){
    int N;
    cin >> N;
    vector<string> W(N);
    for(int i = 0; i < N; i++) cin >> W[i];
    bool flag = true;
    for(int i = 1; i < N; i++){
        if(W[i].substr(0,1) != W[i-1].substr(W[i-1].size()-1,1)){
            flag = false;
            break;
        }
    }
    sort(W.begin(),W.end());
    for(int i = 1; i < N; i++){
        if(W[i-1] == W[i]){
            flag = false;
            break;
        }
    }
    if(flag == false) cout << "No" << endl;
    else cout << "Yes" << endl;
}


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

//5 2 4
int main()
{
	int n,x,y;
	cin>>n>>x>>y;
	int a[n] = {};
	int l = n - (y-x);
	for(int i = 1;l>0;i++,l--)
		a[i] += l;
	l = (y-x)/2;
	int k;
	while(l--)
	{
		k = x-1;
		for(int i = 2+l;k>0;i++,k--)
			a[i] += 1;
	}
	l = (y-x-1)/2;
	// int k;
	while(l--)
	{
		k = x-1;
		for(int i = 3+l;k>0;i++,k--)
			a[i] += 1;
	}
	l = (y-x)/2;
	while(l--)
	{
		k = y+1;
		for(int i = 2+l;k<=n;i++,k++)
			a[i] += 1;
	}
	l = (y-x-1)/2;
	while(l--)
	{
		k = y+1;
		for(int i = 3+l;k<=n;i++,k++)
			a[i] += 1;
	}
	k = y-x+1;
	for(int i = 1; i<(k+1)/2;i++)
		a[i]+=k;
	if(k%2==0)
		a[k/2] += k/2;
	// l = x + (y-x-1)/2;
	// for(int i = 1;l>0;i++,l--)
	// 	a[i] += l;
	// l = n-y+ (y-x)/2;
	// for(int i = 1;l>0;i++,l--)
	// 	a[i] += l;
	// l = n-y+1+(y-x-1)/2;
	// for(int i = 1;l>0;i++,l--)
	// 	a[i] += l;
	// l = (y-x)/2;
	// for(int i = 1;l>0;i++,l--)
	// 	a[i] -= l;
	// l = (y-x-1)/2;
	// for(int i = 1;l>0;i++,l--)
	// 	a[i] -= l;
	a[1] -= 1;
	for(int i = 1;i<n;i++)
		cout<<a[i]<<endl;
}

Measured memory_bytes: 256
#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<string>
#include<algorithm>
#include<numeric>
#include<cmath>
#include<queue>
#include<stack>
#include<list>
#include<unordered_map>
#include<unordered_set>
#include<cctype>
#include<iomanip>
#include<limits>
#include<bitset>

using namespace std;
typedef long long int ll; typedef pair<int, int> P;
const ll mod = 1000000007;
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define REP(i,n) for(int i=1;i<=(int)n;i++)
#define all(a) (a).begin(),(a).end()
#define allg(a) (a).begin(),(a).end(),greater<>()
#define SUM(a) accumulate((a).begin(),(a).end(),0)
#define d10 std::setprecision(10)
#define d20 std::setprecision(20)
const double PI = 3.14159265359;
ll gcd(ll a, ll b) { ll t; while (b != 0) { t = a % b; a = b; b = t; }return a; }
int gcd(int a, int b) { int t; while (b != 0) { t = a % b; a = b; b = t; }return a; }
ll recfact(ll start, ll n) {
	ll i;
	if (n <= 16) {
		ll r = start;
		for (i = start + 1; i < start + n; i++) r = r * i % mod;
		return r % mod;
	}
	i = n / 2;
	return recfact(start, i) % mod * recfact(start + i, n - i) % mod;
}
ll lcm(ll a, ll b) {
	return a * b / gcd(a, b);
}
ll fct(ll n) { return recfact(1, n); }
ll ncm(ll n, ll m) {
	if (n < m)return 0;
	ll x = (fct(n) % mod / (fct(m) * fct(n - m)) % mod) % mod;
	return x;
}
bool isincluded(char x, string str) {
	bool f = 0;
	for (size_t i = 0; i < str.size(); i++) {
		if (str.at(i) == x)f = 1;
	}
	return f;
}
int ctoi(char c) {
	if ('0' <= c && c <= '9') {
		return c - '0';
	}
	return 0;
}





int main(void) {
	ll x, y; cin >> x >> y;
	ll ans = 0;
	for (ll i = x; i <= y; i *= 2) {
		if (i <= y)ans++;
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 256
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
typedef long long ll;
typedef long double ld;

using namespace std;

int main(){
    ll x;
    scanf("%lld",&x);
    for(ll i=-500;i<=500;i++)
    for(ll j=-500;j<=500;j++) 
    if(i*i*i*i*i-j*j*j*j*j==x) {printf("%lld %lld",i,j);return 0;}
}

Measured memory_bytes: 1732
#include <iostream>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <sstream>
#include <cstdio>
#include <algorithm>
#include <stack>
#include <queue>
#include <cmath>
#include <iomanip>
#include <fstream>
//#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = (1 << 30);
const ll inf = (1LL << 60LL);
const int  maxn = 21;
const ll MOD = 1e9 +  7;
int arr[5], k;
int main(int argc, const char * argv[]) {
    ios_base::sync_with_stdio(false);
    for(int i = 0; i < 5; i ++){
        cin >> arr[i];
    }
    sort(arr, arr + 5);
    int pow_of_ten = 0;
    int curr = 0;
    int ret = INF;
    do{
        pow_of_ten = 0;
        curr = 0;
    for(int i = 0; i < 5; i ++){
    
        if(i != 0){
        while(pow_of_ten < curr){
            pow_of_ten += 10;
        }
        }
        curr = pow_of_ten + arr[i];
    }
        ret = min(ret, curr);
    } while(next_permutation(arr, arr + 5));
    cout << ret << endl;
    return 0;
}
///// 86694623
///// 62990530


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
#define REP(i,n) for (ll i = 0; i < (n); ++i)
#define RREP(i, n) for (ll i = (n) - 1; i >= 0; --i)
#define ALL(v) (v).begin(), (v).end()


int main(){
    ll n, m;
    cin >> n >> m;
    vector<vector<pair<ll, ll>>> net(n);
    REP(i, m){
        ll ui, vi, si;
        cin >> ui >> vi >> si;
        ui--; vi--;
        net.at(ui).emplace_back(vi, si);
        net.at(vi).emplace_back(ui, si);
    }

    vector<bool> vis(n, false);
    vector<ll> parity(n, -1);
    vector<ll> bias(n, 0);
    vis.at(0) = true;
    parity.at(0) = 0;
    queue<ll> que;
    que.push(0);

    ll lb = 1, ub = numeric_limits<ll>::max();
    while(!que.empty()){
        const ll u = que.front(); que.pop();
        for(const auto& p : net.at(u)){
            const ll v = p.first;
            const ll s = p.second;
            if(!vis.at(v)){
                vis.at(v) = true;
                parity.at(v) = 1 - parity.at(u);
                bias.at(v) = s - bias.at(u);
                if(parity.at(v) == 0){
                    // bv + x >= 1 <=> x >= 1 - bv
                    lb = max(lb, 1 - bias.at(v));
                }else{
                    // bv - x >= 1 <=> bv - 1 >= x
                    ub = min(ub, bias.at(v) - 1);
                }
                que.push(v);
            }else{
                if(parity.at(u) == parity.at(v)){
                    // parity = 0 => bu + x + bv + x = s <=> 2x = s - bu - bv
                    // parity = 1 => bu - x + bv - x = s <=> bu + bv - s = 2x
                    ll twox = s - bias.at(u) - bias.at(v);
                    if(parity.at(u)){ twox *= -1; }
                    if(twox <= 0 || twox % 2 != 0){
                        cout << 0 << endl;
                        return 0;
                    }else{
                        lb = max(lb, twox / 2);
                        ub = min(ub, twox / 2);
                    }
                }else if(bias.at(u) + bias.at(v) != s){
                    // bu + x + bv - x = s or bu - x + bv + x = s
                    cout << 0 << endl;
                    return 0;
                }
            }
        }
    }

    cout << max(ub - lb + 1, 0LL) << endl;

    return 0;
}


Measured memory_bytes: 9728
#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

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

using namespace std;

typedef int64_t ll;
typedef uint64_t ull;

const ll inf = 1 << 30;
const ll mod = 1000000000 + 7;

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

	ll s = 0;

	vector<int> a(n);
	for (int i = 0; i < n; i++)
	{
		cin >> a.at(i);
	}

	for (int i = 0; i < n; i++)
	{
		s += a.at(i) - 1;
	}

	cout << s << endl;
}

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

using namespace std;

int main(void)
{
	unsigned long long a, aa, b;
	unsigned long c, d, cc, dd;
	cin >> aa >> b >> c >> d;
	a = aa - 1;
	unsigned long long gcd;
	unsigned long long r;
	cc = c, dd = d;
	r = cc % dd;
	while (r != 0)
	{
		cc = dd;
		dd = r;
		r = cc % dd;
	}
	gcd = c * d / dd;

	unsigned long long bdivc, bdivd, bdivgcd, divb;
	unsigned long long adivc, adivd, adivgcd, diva;

	bdivc = b / c, bdivd = b / d, bdivgcd = b / gcd;
	adivc = a / c, adivd = a / d, adivgcd = a / gcd;

	divb = b - (bdivc + bdivd - bdivgcd);
	diva = a - (adivc + adivd - adivgcd);

	cout << (divb - diva) << endl;

	return 0;
}


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

using namespace std;
using ll = long long;

void solve(){
	int n,ans=0;
	cin >> n;
	vector<int> v(n);
	for(int i=0;i<n;++i) cin >> v[i];
	for(int i=1;i<n-1;++i){
		if(v[i] != max({v[i],v[i+1],v[i-1]}) && v[i] != min({v[i],v[i+1],v[i-1]}))
			++ans;
	}
	cout << ans << '\n';
}

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

Measured memory_bytes: 256
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
using namespace std;
int main()
{
    int a,b;
    cin>>a>>b;
    if(b<a)
    {
        a--;
    }
    cout<<a<<endl;   
    //system("pause");
    return 0;
}
    

Measured memory_bytes: 256
m,a[7][2];M(int*a){return*1[&a]-*a;}C(b,n,c,i){if(b==m)return!n;for(c=i=0;i<=a[b][1]&&*a[b]*i<=n;)c+=C(b+1,n-*a[b]*i++);return c;}main(g,n){for(;~scanf("%d",&m);){for(g=m;g;scanf("%d%d",a[g],a[g]+1))g--;qsort(a,m,8,M);for(scanf("%d",&g);g--;printf("%d\n",C(0,n)))scanf("%d",&n);}}

Measured memory_bytes: 416
#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <cmath>
#include <functional>
#include <chrono>
#include <time.h>
using namespace std;

int main()
{
	int n; cin >> n;
	string s = string(n, '0');

	vector<vector<int>>E(n);
	for (int i = 0; i < n; i++) {
		s[i]++;
		for (int j = i+1; j < n; j++) {
			s[j]++;
			cout << "? " << s << endl;
			int d; cin >> d;
			if (d == 1)E[i].push_back(j);
			s[j]--;
		}
		s[i]--;
	}

	cout << "!";
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < E[i].size(); j++) {
			cout << " (" << i << "," << E[i][j] << ")";
		}
	}
	cout << endl;

	return 0;
}


Measured memory_bytes: 852
# include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <bitset>
# include <complex>
# include <numeric>
#include <tuple>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
//constexpr int MOD = 1000000000 + 7;
constexpr int INF = 2000000000;
constexpr int HINF = INF / 2;
constexpr double DINF = 100000000000000000.0;
constexpr long long LINF = 9223372036854775807;
constexpr long long HLINF = 4500000000000000000;
const double PI = acos(-1);

const int nmax = 40, abmax = 10;

int a[nmax], b[nmax], c[nmax];
int dp[nmax + 1][nmax*abmax + 1][nmax*abmax + 1];

int main() {
	int n, ma, mb;
	cin >> n >> ma >> mb;

	for (int i = 0; i < n; ++i) {
		cin >> a[i] >> b[i] >> c[i];

	}

	for (int i = 0; i <= n; ++i) {
		for (int ca = 0; ca <= nmax*abmax; ++ca) {
			for (int cb = 0; cb <= nmax*abmax; ++cb) {
				dp[i][ca][cb] = HINF;

			}

		}

	}

	dp[0][0][0] = 0;


	for (int i = 0; i < n; ++i) {
		for (int ca = 0; ca <= nmax*abmax; ++ca) {
			for (int cb = 0; cb <= nmax*abmax; ++cb) {
				if (dp[i][ca][cb] == HINF) continue;
				dp[i + 1][ca][cb] = min(dp[i + 1][ca][cb], dp[i][ca][cb]);
				dp[i + 1][ca + a[i]][cb + b[i]] = min(dp[i + 1][ca + a[i]][cb + b[i]], dp[i][ca][cb] + c[i]);

			}

		}

	}

	int ans = HINF;
	for (int ca = 1; ca <= nmax*abmax; ++ca) {
		for (int cb = 1; cb <= nmax*abmax; ++cb) {
			if (ca*mb == cb*ma) ans = min(ans, dp[n][ca][cb]);

		}

	}

	if (ans == HINF) ans = -1;
	cout << ans << endl;

	return 0;

}

Measured memory_bytes: 25984
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <utility>
#include <queue>

using namespace std;
typedef long long signed int ll;

constexpr int inf = INT32_MAX / 2;
constexpr int mod = 1000000007;
constexpr int maxn = 100000;

class djikstra {
private:
	ll* d = nullptr;
	map<int, map<int, ll>> p;
	int sz = 0;
public:
	void add_path(int from, int to, ll cost) {
		p[from][to] = cost;
	}
	void compute(int from,int nodes) {
		sz = nodes;
		if (d != nullptr) delete d;
		d = new ll[nodes];
		auto cmp = [this](int a, int b) {return d[a] > d[b]; };
		priority_queue <ll, vector<ll>, decltype(cmp)> q(cmp);
		for (int i = 0; i < nodes; i++) d[i] = INT64_MAX / 2;
		d[from] = 0;
		q.push(from);
		while (!q.empty()) {
			for (auto& e : p[q.top()]) {
				if (d[e.first] > d[q.top()] + e.second) {
					d[e.first] = d[q.top()] + e.second;
					q.push(e.first);
				}
			}
			q.pop();
		}
	}
	ll operator[](int node) {
		if (node >= sz) return INT64_MAX/2;
		return d[node];
	}
};

string s;
ll abc[maxn + 1], bc[maxn + 1], c[maxn + 1], q[maxn + 1];

ll dpow3[maxn + 1];
ll mpow3(ll power) {
	if (power == 0) return 1;
	if (dpow3[power] == 0) dpow3[power] = (3 * mpow3(power - 1)) % mod;
	return dpow3[power];
}

int main() {
	cin>>s;
	for (int i=s.length()-1;i>=0;i--)q[i]=q[i+1]+(s[i]=='?'?1:0);
	for (int i=s.length()-1;i>=0;i--)c[i]=(c[i+1]*(s[i]=='?'?3:1)+(s[i]=='?'||s[i]=='C'?mpow3(q[i+1]):0))%mod;
	for (int i=s.length()-2;i>=0;i--)bc[i]=(bc[i+1]*(s[i]=='?'?3:1)+(s[i]=='?'||s[i]=='B'?c[i+1]:0))%mod;
	for (int i=s.length()-3;i>=0;i--)abc[i]=(abc[i+1]*(s[i]=='?'?3:1)+(s[i]=='?'||s[i]=='A'?bc[i+1]:0))%mod;
	std::cout<<abc[0]<<endl;
}


Measured memory_bytes: 4352
#include <stdio.h>

int main() 
{
	int i,j;
	while(1)
	{
		scanf("%d",&i);
		scanf("%d",&j);
		if(i==0 && j==0)
		{
		return 0;    
		}
		if (i>j)
		{
		printf("%d %d\n",j,i);
		}
		if (i<=j)
		{
		printf("%d %d\n",i,j);
	}
}
}



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

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

    int A[N+1];
    for(int i = 1; i <= N; i++) cin >> A[i];
    sort(A+1, A+N+1);

    int res = 0;

    for(int i = 1; i <= N; i++)
    {
        if(A[i] <= x)
        {
            res++;
            x -= A[i];
        }
        else
        {
            cout << res << '\n';
            return 0;
        }
    }
    if(x != 0) res--;
    cout << res << '\n';
    return 0;
}

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

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

int main() {
	int N;
	cin>>N;
	if(N==2){
		int a,b;
		cin >> a>>b;
		cout<<max(a,b)<<endl;
	}
	else{
		vector<long long> an(N);
		for(int i=0;i<N;i++){
			cin >> an.at(i);
		}
		vector<long long> li(N);
		vector<long long> ri(N);
		li.at(0)=an.at(0);
		ri.at(N-1)=an.at(N-1);
		
		for(int i=1;i<N;i++){
			li.at(i)=gcd(li.at(i-1),an.at(i));
		}
		for(int i=N-2;i>=0;i=i-1){
			ri.at(i)=gcd(ri.at(i+1),an.at(i));
		}
		
		long long m=ri.at(1);
		for(int i=1;i<N-1;i++){
			long long mi=gcd(ri.at(i+1),li.at(i-1));
			if(mi>m){
				m=mi;
			}
		}
		if(li.at(N-2)>m){
			m=li.at(N-2);
		}
		
		cout << m << endl;
	}
}


Measured memory_bytes: 2560
//msol2020_d.cpp
//Sun Aug  2 20:38:37 2020

#include <iostream>
#include <string>
#include <queue>
#include <map>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <math.h>
#include <set>
#define INTINF 2147483647
#define LLINF 9223372036854775807
#define MOD 1000000007
#define rep(i,n) for (int i=0;i<(n);++i)

using namespace std;
using ll=long long;
typedef pair<int,int> P;

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

	ll a[n];
	rep(i,n) cin >> a[i];

	ll ans = 1000;
	ll kabu = 0;
	for (int i=0;i<n-1;i++){
		if(kabu==0 && a[i+1]>a[i]){
			kabu = ans/a[i];
			ans = ans%a[i];
		}else if (kabu>0 && a[i+1]<a[i]){
			ans = ans + a[i]*kabu;
			kabu = 0;
		}
		// cout << ans << endl;
	}
	if (kabu>0){
		ans += a[n-1]*kabu;
	}

	cout << ans << endl;
}

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

using namespace std;
typedef long long int ll;
typedef long double ld;
#define REP(i, n) for(ll i = 0LL; i < (ll)(n); i++)
#define REPR(i, n) for (ll i = (ll)(n) - 1; i >= 0; i--)
#define FOR(i, n, m) for(ll i = (ll)n; i < (ll)(m); i++)
#define ALL(x) (x).begin(),(x).end()
#define MOD 1000000007
#define INF (1LL << 62)

#define PI (acos(-1))
#define PRINT(x) std::cout << x << endl
 
ll gcd(ll a, ll b) { return b ? gcd(b,a%b) : a;}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
ll countDigit(ll n) { return floor(log10(n) + 1); } 
typedef pair <ll,ll> P;
static const ll dx[8] = {0,1,0,-1, 1, -1, 1, -1}, dy[8] = {1,0,-1,0,1,1,-1,-1};

template <typename T> 
ostream& operator<<(ostream& os, const vector<T>& v) 
{ 
    for (int i = 0; i < (int)v.size(); ++i) os << v[i] << " ";  
    return os; 
}

template <typename T1, typename T2> 
ostream& operator<<(ostream& os, const map<T1, T2>& m) 
{ 
    for (auto p : m) os << "<" << p.first << ", " << p.second << "> "; 
    return os; 
}

int main()
{ 
  ll N, D;
  cin >> N >> D;
  ll ans = 0;
  REP(i, N) {
    ll x, y;
    cin >> x >> y;
    if (D * D >= x*x + y*y) ans++;
  }
  PRINT(ans);
  return 0;
} 


Measured memory_bytes: 3676
#include <queue>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define N 200005
#define ll long long
#define mod 998244353
char K[N];
int mul[N], f[N];
int n, ans, A[N];
void Getval(int x)
{
	for (int i = 1; i <= x; i++)
		if (A[i] == 1)
			f[x] = (f[x] + mul[x - i]) % mod;
	int flg = 0;
	for (int i = x + 1; i <= n; i++)
	{
		if (A[i] < !A[i - x])
		{
			flg = 1;
			break;
		}
		if (A[i] > !A[i - x])
			break;
	}
	if (!flg)
		f[x]++;
	for (int i = 1; i * i <= x; i++)
	{
		if (x % i == 0)
		{
			if (x != i && x / i % 2 == 1)
				f[x] = (f[x] - f[i]) % mod;
			if (i * i != x && i != 1 && i % 2 == 1)
				f[x] = (f[x] - f[x / i]) % mod;
		}
	}
	if (f[x] < 0)f[x] += mod;
}
int main()
{
	scanf("%d", &n);
	scanf("%s", K + 1);
	for (int i = 1; i <= n; i++)
		A[i] = K[i] - '0';
	mul[0] = 1;
	for (int i = 1; i <= n; i++)
		mul[i] = mul[i - 1] * 2ll % mod;
	for (int i = 1; i <= n; i++)
	{
		if (n % i == 0 && n / i % 2 == 1)
		{
			Getval(i);
			ans = (ans + f[i] * 2ll * i % mod) % mod;
		}
	}
	printf("%d\n", ans);
}


Measured memory_bytes: 2048
#include <bits/stdc++.h>
using namespace std;
 
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define int long long

const int N = 2e6 + 5;
const int MOD = 1e9 + 7;

int pow(int a, int b, int m)
{
	int ans=1;
	while(b)
	{
		if(b&1)
			ans=(ans*a)%m;
		b/=2;
		a=(a*a)%m;
	}
	return ans;
}

int fact[N], invfact[N];

int modinv(int k)
{
	return pow(k, MOD-2, MOD);
}

void precompute()
{
	fact[0]=fact[1]=1;
	for(int i=2;i<N;i++)
	{
		fact[i]=fact[i-1]*i;
		fact[i]%=MOD;
	}
	invfact[N-1]=modinv(fact[N-1]);
	for(int i=N-2;i>=0;i--)
	{
		invfact[i]=invfact[i+1]*(i+1);
		invfact[i]%=MOD;
	}
}

int nCr(int x, int y)
{
	if(y>x)
		return 0;
	int num=fact[x];
	num*=invfact[y];
	num%=MOD;
	num*=invfact[x-y];
	num%=MOD;
	return num;
}

int n, k;
string s;

int32_t main()
{
	IOS;
	precompute();
	cin >> k >> s;
	n = s.size();
	int ans = 0;
	for(int len = n; len <= n + k; len++)
	{
		int cur = pow(26, n + k - len, MOD) * pow(25, len - n, MOD);
		cur %= MOD;
		cur *= nCr(len - 1, n - 1);
		cur %= MOD;
		ans += cur;
		ans %= MOD;
	}
	cout << ans;
	return 0;
}

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

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

void solve(vector<string> const& s){
    if(s[0][0]==s[0][1] && s[0][1]==s[0][2] && s[0][0] != '+'){
        cout << s[0][0] << endl;
    }
    else if(s[0][0]==s[1][0] && s[1][0]==s[2][0] && s[0][0] != '+'){
        cout << s[0][0] << endl;
    }
    else if(s[0][0]==s[1][1] && s[1][1]==s[2][2] && s[0][0] != '+'){
        cout << s[0][0] << endl;
    }
    else if(s[0][1]==s[1][1] && s[1][1]==s[2][1] && s[0][1] != '+'){
        cout << s[0][1] << endl;
    }
    else if(s[0][2]==s[1][2] && s[1][2]==s[2][2] && s[0][2] != '+'){
        cout << s[0][2] << endl;
    }
    else if(s[0][2]==s[1][1] && s[1][1]==s[2][0] && s[0][2] != '+'){
        cout << s[0][2] << endl;
    }
    else if(s[1][0]==s[1][1] && s[1][1]==s[1][2] && s[1][0] != '+'){
        cout << s[1][0] << endl;
    }
    else if(s[2][0]==s[2][1] && s[2][1]==s[2][2] && s[2][0] != '+'){
        cout << s[2][0] << endl;
    } else {
        cout<< "NA" << endl;
    }
}

int main(){
    while(1){
        vector<string> s(3);
        rep(i,3){
            if(cin >> s[i]) continue;
            return 0;
        }
        solve(s);
    }
}

Measured memory_bytes: 1180
#include <bits/stdc++.h>
using namespace std;
typedef long long       ll;
typedef pair<int,int>   pii;
typedef vector<int>     vi;
typedef long double     ld;
#define MOD         1000000007
#define pb          push_back
#define all(a)      (a).begin(),(a).end()
#define F           first
#define S           second
#define endl        '\n'
#define PI          3.14159265359d
#define sz(x)       (int)x.size()
pii segtr[800000];
int A[200005],pos[200005],n;
void build(int node,int l,int r)
{
    if(l==r)
    {
        if(l%2)
            segtr[node].F=A[l],segtr[node].S=INT_MAX;
        else
            segtr[node].F=INT_MAX,segtr[node].S=A[l];
        return;
    }
    build(2*node,l,(l+r)/2);
    build(2*node+1,(l+r)/2+1,r);
    segtr[node].F=min(segtr[2*node].F,segtr[2*node+1].F);
    segtr[node].S=min(segtr[2*node].S,segtr[2*node+1].S);
}
pii query(int node,int l,int r,int ql,int qr)
{
    if(r<ql||l>qr)
        return {INT_MAX,INT_MAX};
    if(l>=ql&&r<=qr)
        return segtr[node];
    pii lchild=query(2*node,l,(l+r)/2,ql,qr);
    pii rchild=query(2*node+1,(l+r)/2+1,r,ql,qr);
    return {min(lchild.F,rchild.F),min(lchild.S,rchild.S)};
}
pii getPriority(int l,int r)
{
    pii ret=query(1,1,n,l,r);
    int odd,even;
    if(l%2)
    {
        odd=pos[ret.F];
        ret=query(1,1,n,odd+1,r);
        even=pos[ret.S];
    }
    else
    {
        odd=pos[ret.S];
        ret=query(1,1,n,odd+1,r);
        even=pos[ret.F];
    }
    return {odd,even};
}
struct interval
{
    int l,r;
    pii p;
};
struct comp{
    bool operator() (const interval& a, const interval& b) const {
        return A[a.p.F]>A[b.p.F];
    }
};
int main()
{
    std::ios::sync_with_stdio(false);
    cin.tie(0);
    int i;
    interval tmp;
    cin>>n;
    for(i=1;i<=n;i++)
    {
        cin>>A[i];
        pos[A[i]]=i;
    }
    build(1,1,n);
    priority_queue<interval,vector<interval>,comp> q;
    q.push({1,n,getPriority(1,n)});
    while(!q.empty())
    {
        tmp=q.top();
        q.pop();
        if(tmp.l<tmp.p.F)
        q.push({tmp.l,tmp.p.F-1,getPriority(tmp.l,tmp.p.F-1)});
        if(tmp.p.S-tmp.p.F>1)
        q.push({tmp.p.F+1,tmp.p.S-1,getPriority(tmp.p.F+1,tmp.p.S-1)});
        if(tmp.p.S<tmp.r)
        q.push({tmp.p.S+1,tmp.r,getPriority(tmp.p.S+1,tmp.r)});
        cout<<A[tmp.p.F]<<" "<<A[tmp.p.S]<<" ";
    }
    return 0;
}


Measured memory_bytes: 8436
n=int(input())
p=list(map(float,input().split()))
dp=[[0 for i in range(n+1)] for j in range(n+1)]


dp[0][0]=1
for i in range(1,n+1):
  for j in range(n+1):
  
          if j==0:
              dp[i][j]=dp[i-1][j]*(1.0-p[i-1])
          else:
              dp[i][j]=dp[i-1][j]*(1.0-p[i-1])+dp[i-1][j-1]*p[i-1]
       

ans=0.0
for i in range((n+1)//2,n+1):
    ans+=dp[n][i]
print(ans)
      


Measured memory_bytes: 223960
#include<cmath>
#include<bits/stdc++.h>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<string>
#include<map>
using namespace std;
#define ll long long
#define MOD 10000000
ll read(){
	ll x=0,w=1;
	char ch=0;
	while(ch<'0'||ch>'9'){
		if(ch=='-')
			w=-1;
		ch=getchar();
	}
	while(ch>='0'&&ch<='9'){
		x=x*10+ch-'0';
		ch=getchar();
	}
	return w*x;
}//快读算法
const long N = 200000;//这相当与存了200000个素数
long prime[N] = {0},num_prime = 0;//假设都是素数
int isNotPrime[N] = {1, 1};//先将0，1排除   不是素数
void SE(){
	for(long i = 2 ; i < N ; i ++){
        if(! isNotPrime[i])//isNotPrime==0
            prime[num_prime ++]=i;//自己在前面打好了标记。 //关键处1           /*i为合数时也要参与循环*/
		for(long j = 0 ; j < num_prime/*小于已经求出的质数个数*/ && i * prime[j]/*乘以其它质数，且质数比自己小或者是自己（已经求出来了），所以不可能重复*/ <  N ; j ++){
                isNotPrime[i * prime[j]] = 1;//乘以其它素数得到的一定是合数，之所以不重复是因为质数间不等
            if( !(i % prime[j] ) )  //关键处2 i%prime==0  根据“关键处2”的定义，当p1==prime[j] 的时候，
            //筛除就终止了(从最小质数开始所以本句话成立），
                break;
        }
    }
}//这是欧拉筛的算法，其中 prime[N]中储存的是前  N  个素数

int QuickPow(int x,int N){
    int res = x;
    int ans = 1;
    while(N){
        if(N&1){
            ans = ans * res;
        }
        res = res*res;
        N = N>>1;
    }
    return ans;
}//快速求解  x^n  的值---快速幂
const int M=2;
struct Ma{
    int a[M][M];
    Ma(){
        memset(a,0,sizeof(a));
    }
    void unit(){
        a[0][0]=a[1][1]=1;
        a[0][1]=a[1][0]=1;
    }
    Ma operator *(const Ma &B)const{
        Ma ans;
        for(int i=0;i<M;i++){
            for(int j=0;j<M;j++){
                for(int k=0;k<M;k++){
                    ans.a[i][j]+=a[i][k]*B.a[k][j];
                }
            }
        }
        return ans;
    }
    Ma operator^(int n) const{
        Ma ans;ans.unit();
        Ma A=*this;
        while(n){
            if(n&1){
                ans=ans*A;
                A=A*A;
                n>>1;
            }
        }
        return ans;
    }
    void show(){
        cout<<"矩阵"<<endl;
        for(int i=0;i<M;i++){
            for(int j=0;j<M;j++){
                cout<<a[i][j]<<" ";
            }
            cout<<endl;
        }
    }
};
int main(){
	char c;
	cin>>c;
	c++;
	cout<<c<<endl;
	return 0;
}




















Measured memory_bytes: 256
n = int(input())

X = list(map(int, input().split()))
Y = list(map(int, input().split()))

ans1 = 0
ans2 = 0
ans3 = 0
ansx = []

for x in range(n):
    ans1 += abs(X[x]-Y[x])
    ans2 += abs(X[x]-Y[x])**2
    ans3 += abs(X[x]-Y[x])**3
    ansx.append(abs(X[x]-Y[x]))
print(ans1,ans2**0.5,ans3**(1.0/3),max(ansx), sep = "\n")



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

#define watch(x) cerr << (#x) << ": " << (x) << endl
#define int long long



int32_t main() {

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

    int ans = b + min(c, a+b+1);

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


Measured memory_bytes: 256
/*
  Task: I. Kevin and Grid
  Link: http://codeforces.com/contest/1392/problem/I
  Lang: cpp17
*/
#include <bits/stdc++.h>
using namespace std;

#define eb emplace_back
#define pb push_back
#define INF LLONG_MAX
#define FLT_INF pow(10.0, 16)


using ll = long long;
using vll = vector<ll>;
using ull = unsigned long long;
using int2 = pair<ll, ll>;
using int3 = tuple<ll, ll, ll>;

template <typename A> string to_string(const A& v);
string to_string(const string& s) { return '"'+ s + '"'; }
string to_string(const char *s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }

template <typename A, typename B> string to_string(const pair<A, B>& p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C> string to_string(const tuple<A, B, C>& p) {
  return "(" + to_string(std::get<0>(p)) + ", " + to_string(std::get<1>(p)) +  ", " + to_string(std::get<2>(p)) + ")";
}

template <typename A> string to_string(const A& v) {
  bool first = true;
  string res = "{";
  for (const auto &x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}

template <typename T>
void sort(vector<T>& val) {
  sort(val.begin(), val.end());
}

template <typename T>
void reverse(vector<T>& val) {
  reverse(val.begin(), val.end());
}

template <typename T>
void sort_b(vector<T>& val) {
  sort(val.begin(), val.end(), greater<T>());
}

template <typename T>
T pair_sum(pair<T, T>& val) {
  return val.first + val.second;
}


template <typename T>
T min(T a, T b, T c) {
  return min(min(a, b), c);
}

template <typename T>
T max(T a, T b, T c) {
  return max(max(a, b), c);
}


template <typename T>
T mul_mod(T a, T b, T mod) {
  T res = 0;
  a %= mod;
  while (b) {
    if (b & 1) {
      res = (res + a) % mod;
    }
    a = (2 * a) % mod;
    b >>= 1;
  }
  return res;
}

void debug_out() { cerr << endl; }

template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...);
#endif

#define COMMON_MOD pow(10, 9) + 7
#define PI 3.14159265

// sort(a.begin(), a.end(), less<ll>()); greater<ll>()
// cout<<fixed<<setprecision(20)<<(s/kl)*2;
/* printf("%lld %lld \n", cur_n, m / 2 + 1);
sort(a.begin(), a.end(), [ ](ll& lhs, ll& rhs) {return abs(lhs) < abs(rhs);});
*/


class mytask {
public:

  mytask() { }

  
  int solve() {

    ll d, t, s;
    cin >> d >> t >> s;
    cout << ((s * t >= d) ? "Yes" : "No");
    
    return 0;
  }

   

};


int main() {

  ios::sync_with_stdio(false);
  cin.tie(0);

  auto task = mytask();
  task.solve();


  //cout << endl;

  return 0;
}


Measured memory_bytes: 3612
#include <cstdio>
#include <cstring>
#include <vector>
#include <queue>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <cctype>
#include <map>
#include <set>
#include <functional>
#include <iostream>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef string::const_iterator State;

string str;
int val[6];
bool flag=false;

int number(State &begin){
	int ret=0;
	while(isdigit(*begin)){
		ret*=10;
		ret+=*begin-'0';
		begin++;
	}
	return ret;
}

void term(State &begin){
	int v=number(begin);
	if(v==0)v=1;
	bool used=false;
	while(1){
		if(*begin=='x'){
			begin++;
			if(*begin=='^'){
				begin++;
				int p=number(begin);
				val[p]=v;
				if(flag)val[p]*=-1;
			}else{
				val[1]=v;
				if(flag)val[1]*=-1;
			}
			flag=false;
			used=true;
		}else if(*begin=='+'){
			begin++;
			if(!used){
				val[0]=v;
				if(flag)val[0]*=-1;
				flag=false;
			}
			term(begin);
			break;
		}else if(*begin=='-'){
			begin++;
			if(!used){
				val[0]=v;
				if(flag)val[0]*=-1;
				flag=false;
			}
			flag=true;
			term(begin);
			break;
		}else{
			if(!used){
				val[0]=v;
				if(flag)val[0]*=-1;
			}
			break;
		}
	}
	
}

bool check(int v){
	ll sum=val[0];
	ll p=v;
	for(int i=1;i<=5;i++){
		sum+=(ll)val[i]*p;
		p=(ll)p*v;
	}
	return (sum==0);
}

int main(void){
	cin >> str;
	State begin=str.begin();
	term(begin);
	for(int i=2000;i>=-2000;i--){
		if(check(i)){
			if(i>=0)cout << "(x-" << i << ")";
			else cout << "(x+" << -i << ")";
		}
	}
	cout << endl;
	return 0;
}

Measured memory_bytes: 3140
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int a[] = new int[n + 1];
		int b[] = new int[n];
		for (int i = 0; i < n + 1; i++) {
			a[i] = in.nextInt();
		}
		for (int i = 0; i < n; i++) {
			b[i] = in.nextInt();
		}
		long ans = 0;
		for (int i = 0; i < n; i++) {
			if (b[i] >= a[i]) {
				ans += a[i];
				b[i] -= a[i];
			} else {
				ans += b[i];
				b[i] = 0;
			}
			if (b[i] >= a[i + 1]) {
				ans += a[i + 1];
				b[i] -= a[i + 1];
				a[i + 1] = 0;
			} else {
				ans += b[i];
				a[i + 1] -= b[i];
				b[i] = 0;
			}
		}
		System.out.println(ans);
		in.close();
	}
}


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

typedef long long ll;
typedef pair<int, int> P;
#define MOD 1000000007
#define INF (1 << 30)
#define REP(i, m, n) for(int i = (int)m; i < (int)n; ++i)
#define rep(i, n) REP(i, 0, n)


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

    int N, M; cin >> N >> M;
    int now = 0;
    vector<int> num(N, 1);
    vector<bool> can(N, false);
    can[0] = true;
    rep(i, M) {
        int x, y; cin >> x >> y;
        x--, y--;
        num[x]--, num[y]++;
        if(can[x]) {
            can[y] = true;
            if(num[x] == 0) can[x] = false;
        }
    }
    int ans = 0;
    rep(i, N) if(can[i]) ans++;
    cout << ans << '\n';
    return 0;
}

Measured memory_bytes: 640
use proconio::input;

fn main() {
    input! {
        n: usize,
        abs: [(u64, u64); n],
    }

    if n % 2 == 0 {
        let r#as = abs.iter().map(|&(a, _)| a).collect::<Vec<_>>();
        let bs = abs.iter().map(|&(_, b)| b).collect::<Vec<_>>();
        let min = med_even(&r#as);
        let max = med_even(&bs);
        println!("{}", max - min + 1);
    } else {
        let r#as = abs.iter().map(|&(a, _)| a).collect::<Vec<_>>();
        let bs = abs.iter().map(|&(_, b)| b).collect::<Vec<_>>();
        let min = med_odd(&r#as);
        let max = med_odd(&bs);
        println!("{}", max - min + 1);
    }
}

fn med_even(xs: &[u64]) -> u64 {
    let mut xs = xs.to_owned();
    xs.sort();
    xs[xs.len() / 2 - 1] + xs[xs.len() / 2]
}

fn med_odd(xs: &[u64]) -> u64 {
    let mut xs = xs.to_owned();
    xs.sort();
    xs[xs.len() / 2]
}


Measured memory_bytes: 14480