akhauriyash/Code-Regression huggingface dataset:
#include<bits/stdc++.h>
using namespace std;

#ifdef LOCAL
    #define eprintf(...) fprintf(stderr, __VA_ARGS__)
#else
    #define eprintf(...)
#endif

#define fast_io ios_base::sync_with_stdio(false); cin.tie(nullptr)
#define rep(i, x, y) for(decltype(y) i = (x) - ((x) > (y)); i != (y) - ((x) > (y)); i += 1 - 2 * ((x) > (y)))
#define trav(i,a) for(auto& (i) : (a))
#define all(a) (a).begin(),(a).end()
#define sz(a) int((a).size())
#define clr(a,x) memset((a),(x),sizeof(a)) // array (0,-1)
#define dbg(x) cerr << "STDERR => " << __LINE__ << ": " << #x << " = " << (x) << "  :(\n";
#define eb emplace_back
#define mp make_pair
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
inline void cpuTime() { cerr << "cpu time : " << double(clock())/CLOCKS_PER_SEC << "\n"; return; }
using ll = long long;
using ull = unsigned long long;
using F = float;
using D = double;
using vi = vector<int>;
using pii = pair<int,int>;



void solve(){

    int n;
    cin >> n;
    n--;
    vi a(n);
    rep(i, 0, n) cin >> a[i];

    ull ans = a[0];
    rep(i,1,n) {
        if(a[i] >= a[i-1]) ans += a[i-1];
        else ans += a[i];
    }

    ans += a[n-1];

    cout << ans << "\n";

    return;
}

/*
 read the question carefully ( what're the exact constraints? )
 look out for SPECIAL CASES (n=1?) and OVERFLOW (ll vs int?) ARRAY OUT OF BOUNDS
 Check datatypes
*/
int main(){

    fast_io;
    int t=1;
    // cin >> t;

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

    cpuTime();
return 0;
}


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

using namespace std;

int main() {
	int n;
	cin >> n;
	if (n < 2) {
		cout << "Hello World" << endl;
		return 0;
	}
	int a;
	cin >> a >> n;
	cout << a + n << endl;
	return 0;
}


Measured memory_bytes: 256
#include<stdio.h>

int main()
{
 char c;

 scanf("%c",&c);


 if(c=='a' || c=='e' || c=='i' || c=='o' || c=='u')
 {
     printf("\nvowel\n");
 }

 else
    printf("\nconsonant\n");


 return 0;
}


Measured memory_bytes: 128
#include<bits/stdc++.h>
using namespace std;
int main(){
	int h,w;
	cin>>h>>w;
	vector<string>s(h);
	for(int i=0;i<h;i++){
		cin>>s[i];
	}
	vector<bool>row(h,false);
	vector<bool>col(w,false);
	
	for(int i=0;i<h;i++){
		for(int j=0;j<w;j++){
			if(s[i][j]=='#'){
				row[i]=true;
				col[j]=true;
			}
		}
	}
	
	for(int i=0;i<h;i++){
		if(row[i]){
			for(int j=0;j<w;j++){
				if(col[j]){
					cout<<s[i][j];
				}
			}
			cout<<endl;
		}
	}
	return 0;
}

Measured memory_bytes: 256
#include <queue>
#include <cmath>
#include <cstdio>
#include <vector>
#include <cstring>
#include <iostream>
#include <algorithm>
#define set0(x) memset(x,0,sizeof(x))
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;
template<typename T> void read(T &x){
	x = 0;char ch = getchar();int f = 1;
	while(!isdigit(ch)){if(ch == '-')f*=-1;ch=getchar();}
	while(isdigit(ch)){x = x*10+ch-48;ch=getchar();}x*=f;
}
ll n,su = 0;
int main() {
	cin>>n;
	ll i = 2;
	while(i<=n){
		ll nxt = (n/(n/i))+1;
		//cout<<i<<' '<<nxt<<endl;
		ll st = n%i,ed = n%(nxt-1);
		//cout<<st<<' '<<ed<<endl;
		if((n/i)>=ed && (n/i)<=st && (st-(n/i))%(n/i) == 0){
			su+=i+(st-(n/i))/(n/i);
		}
		//cout<<' '<<i<<' '<<su<<endl;
		i = nxt;
	}
	cout<<su<<endl;
	return 0;
}


Measured memory_bytes: 256
// Problem : B - i18n
// Contest : AtCoder - AtCoder Beginner Contest 069
// URL : https://atcoder.jp/contests/abc069/tasks/abc069_b
// Memory Limit : 256 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

//#pragma GCC optimize("Ofast")
//#pragma GCC optimize ("unroll-loops")
//#pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define eb emplace_back
#define pb push_back
#define size(s) (int)s.size()
#define int long long
#define vi vector<int>
#define vs vector<string>
#define vv vector<vector<int>>
#define pii pair<int,int>
#define m_p(x,y) make_pair(x,y)
#define vp vector<pair<int,int>>
#define setbits(x) __builtin_popcountll(x)
#define f first
#define se second
#define inc(v,n,x) v.assign(n,x)
#define incd(v,n) v.resize(n)
#define iniz(n) memset(n,0,sizeof(n))
#define inin(n) memset(n,-1,sizeof(n))
#define inimi(n) memset(n,0xc0,sizeof(n))
#define inima(n) memset(n,0x3f,sizeof(n))
#define all(v) (v).begin(),(v).end()

using namespace std;

template<typename T1,typename T2>istream &operator>>(istream &is, vector<pair<T1,T2>> &v) { for (pair<T1,T2> &t : v) is >> t.f>>t.se; return is; }
template<typename T>istream &operator>>(istream &is, vector<T> &v) { for (T &t : v) is >> t; return is; }
template<typename T>ostream &operator<<(ostream &os, const vector<T> &v) { for (const T &t : v) {os << t <<" ";} os << '\n'; return os; }

const int N=200001;
double pi=acos(-1.0);
int md=1e9+7;
const int INF=1e15;
int dx1[]={0,0,-1,1};
int dy1[]={1,-1,0,0};

template<class T>
T abst(T a)
{return a<0?-a:a;}

template<class T>
T max2(T a,T b){return a>b?a:b;}
template<class T>
T min2(T a,T b){return a<b?a:b;}

void solve()
{
string s;cin>>s;
string ans;ans+=s[0];
ans+=to_string(size(s)-2);
ans+=s[size(s)-1];
cout<<ans;
}

int32_t main(){
ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
int t=1;
//cin>>t;
for(int i=1;i<=t;i++)
{
    solve();
}
return 0;
}


Measured memory_bytes: 3692
#include <bits/stdc++.h>
using namespace std;
int main(){

  int q;
  map <string,int> a;

  cin>>q;

  for(int i=0;i<q;i++){

    int n;
    string s;
    cin>>n>>s;

    if(n==1) cout<<a[s]<<endl;
    else if(n==2) a.erase(s);
    else{
      int x;
      cin>>x;
      a[s]=x;
    }

  }

  return 0;

}



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

int n, p1, p2, p3;
int a[310];
double dp[310][310][310];

double rek(int x, int y, int z) {
	if (x < 0 || y < 0 || z < 0) return 0;
	if (x == 0 && y == 0 && z == 0) return 0;
	
	double &ret = dp[x][y][z];
	if (ret >= 0) return ret;
	
	
	ret = (double)((double)x/n * rek(x-1, y, z) + (double)y/n * rek(x+1, y-1, z) + (double)z/n * rek(x, y+1, z-1) + 1) / (double)(1 - (double)(n-x-y-z)/n);
	
	
	return ret;  
}

int main () {
	
	scanf("%d", &n);
	for (int i = 0; i < n; i ++) {
		scanf("%d", &a[i]);
		if (a[i] == 1) p1 ++;
		if (a[i] == 2) p2 ++;
		if (a[i] == 3) p3 ++;
	}
	
	for (int i = 0; i <= n; i ++) {
		for (int j = 0; j <= n; j ++) {
			for (int k = 0; k <= n; k ++) {
				dp[i][j][k] = -1.0;
			}
		}
	}
	
	printf("%.10lf", rek(p1, p2, p3));

	return 0;
}

Measured memory_bytes: 227584
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using db = double;
#define fi first
#define se second
#define pb push_back
#define all(v) (v).begin(),(v).end()
#define siz(v) (ll)(v).size()
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define repn(i,n) for(ll i=0;i<=(ll)(n);i++)
typedef pair<ll,ll> P;
typedef pair<ll,ll> PL;
const ll mod = 1000000007;
const ll INF = 1000000099;
//cin.tie(0);
//ios::sync_with_stdio(false);

signed main(){
    ll n,ans=1,flag=2;cin>>n;
    vector<ll> v(n,0);
    for(ll i=0;i < n;i++)
    {
        cin>>v[i];
    }

    sort(v.begin(),v.end());

    while(siz(v)>1 && flag>0){
        if(v.back()!=v[siz(v)-2]){
            v.pop_back();
        }else{
            ans*=v.back();v.pop_back();
            v.pop_back();
            flag--;
        }
    }   

    if(flag)cout<<0<<endl;
    else cout<<ans<<endl;
}

Measured memory_bytes: 1024
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
p = LI()
tmp = inf
ans = 0
for i in range(n):
    if tmp > p[i]:
        ans += 1
        tmp = p[i]
print(ans)


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

using namespace std;

const int mod = 1e9 + 7;

long long add(long long a, long long b) {
    long long res = a + b;
    if (res >= mod) res -= mod;
    return res;
}

long long sub(long long a, long long b) {
    long long res = a - b + mod;
    if (res >= mod) res -= mod;
    return res;
}

long long mul(long long a, long long b) {
    return (((a % mod) * (b % mod)) % mod);
}

long long gcd(long long x, long long y){
    if(y == 0){
        return x;
    }
    if(x > y){
         return gcd(y, x % y);
    }
    else{
         return gcd(x, y % x);
    }
}

void dfs(vector<vector<int>> &v, vector<int> &visited, int node, int &ans){
    if(visited[node]){
        return;
    }
    visited[node] = 1;
    ans++;
    for(auto i : v[node]){
        dfs(v, visited, i, ans);
    }
}

/*bool good(vector<int> &v, int d, int mid){
    vector<int> p(v.size());
    p[0] = v[0] - mid;
    for(int i = 1;i < v.size();i++){
        p[i] = p[i - 1] + (v[i] - mid);
    }
    vector<int> m(v.size());
    m[0] = p[0];
    int mi = m[0];
    for(int i = 1;i < v.size();i++){
        mi = min(mi, p[i]);
        m[i] = mi;
    }
    for(int r = 0;r < v.size();r++){
        if(r - d > 0){
            if(m[r - d - 1] <= p[r]){
                L = r - d;
                R = r;
                return true;
            }
        }
    }
    return false;
}*/

int main(){
    double d, t, s;
  	cin >> d >> t >> s;
  	if(t * s >= d){
      cout << "Yes" << endl;
    }
  	else{
      cout << "No" << endl;
    }













    /*int n, d;
    cin >> n >> d;
    vector<int> v(n);
    for(int i = 0;i < n;i++){
        cin >> v[i];
    }
    int l = -1,
        r = 101;
    while(r > l + 1){
        int mid = (l + r) / 2;
        if(good(v, d, mid)){
            l = mid;
        }
        else{
            r = mid;
        }
    }
    cout << L + 1 << " " << R + 1<< endl;
    cout << l << endl;*/
}
/*
5 2
-1 -2 -3 4 5
2 3
4

-3 -2 -1 4 5
2 3
5 + (-3) = 2
4 + -2 = 2
ans = 4

-3 -2 -1 4 5
3 2
5 + -3 = 2
4 + -1 = 3
ans = 5
*/


Measured memory_bytes: 3712
//control+option+n to run!
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define NEGFOR(i, a, b) for (ll i = (a); i > (b); i--)
#define vll vector <long long>
#define sll set <long long>
#define ld long double
#define inf 1000000000000000000
#define mll multiset <long long>
#define nn <<"\n"
#define F(i,b) for (ll i=0; i<b; i++)
//10^8 operations per second
//greatest int is 2,147,483,647
//greates long long is 9.22337204e18

//ALL FUNCTIONS SHOULD BE LL!!!!
long long power(long long a, long long b) {
    if (b == 0)
        return 1;
    long long res = power(a, b / 2);
    if (b % 2)
        return res * res * a;
    else
        return res * res;
}


ll log(ll base, ll number)
{

  int x = base;
  int count = 1;
  while (base < number)
  {
    base *= x;
    count++;
  }
  return count;
}

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

  //idea is to just take min(dp[i-1] and dp[i-2] plus the respective jumps)
  ll n;
  cin>>n;
  vll v(n+1);

  FOR(i,1,n+1){
    cin>>v[i];
  }

  vll dp(n+1,inf);

  dp[1]=0;
  FOR(i,2,n+1){
    dp[i]=min(dp[i-1]+abs(v[i]-v[i-1]),dp[i-2]+abs(v[i]-v[i-2]));
  }

  cout<<dp[n];
  cout << "\n"; //GET RID OF THIS FOR THE ACTUAL PROGRAM!!!!
}


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

using namespace std;
using ll = long long;
// #define int ll
using PII = pair<ll, ll>;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()

template<typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template<typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template<typename T> bool IN(T a, T b, T x) { return a<=x&&x<b; }
template<typename T> T ceil(T a, T b) { return a/b + !!(a%b); }

template<typename T> vector<T> make_v(size_t a) { return vector<T>(a); }
template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts) {
    return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}
template<typename T,typename V> typename enable_if<is_class<T>::value==0>::type
fill_v(T &t, const V &v) { t=v; }
template<typename T,typename V> typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t, const V &v ) { for(auto &e:t) fill_v(e,v); }

template<class S,class T>
ostream &operator <<(ostream& out,const pair<S,T>& a) {
    out<<'('<<a.first<<','<<a.second<<')'; return out;
}
template<class T>
ostream &operator <<(ostream& out,const vector<T>& a){
    out<<'[';
    for(const T &i: a) out<<i<<',';
    out<<']';
    return out;
}
template<class T>
ostream &operator <<(ostream& out, const set<T>& a) {
    out<<'{';
    for(const T &i: a) out<<i<<',';
    out<<'}';
    return out;
}
template<class T, class S>
ostream &operator <<(ostream& out, const map<T,S>& a) {
    out<<'{';
    for(auto &i: a) out<<i<<',';
    out<<'}';
    return out;
}

int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0}; // DRUL
const int INF = 1<<30;
const ll LLINF = 1LL<<60;
const ll MOD = 1000000007;

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

    ll x;
    double p;
    cin >> x >> p;
    p /= 100;
    if(x%2) x++;
    cout << fixed << setprecision(9) << x/(2.0*p) << endl;

    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define rep1(i,n) for(ll i=1;i<=(n);i++)
#define all(x) (x).begin(),(x).end()
#define V vector
typedef V<int> vi;
typedef V<vi> vvi;
typedef long long ll;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;
constexpr auto INF = INT_MAX >> 1;
constexpr auto LINF = 5000000000000000;
constexpr auto MOD = 1000000007;

vi prime, mnpf;
void preprime(int n) {

	prime.resize(0);
	mnpf.assign(n + 1, 1);
	rep1(i, n) {
		if (i < 2)continue;
		if (mnpf[i] != 1)continue;

		prime.push_back(i);
		mnpf[i] = i;
		int ii = i;
		while (ii <= n) {
			if (mnpf[ii] == 1)mnpf[ii] = i;
			ii += i;
		}
	}
}

int main() {
	
	preprime(102000);
	int q;
	cin >> q;

	vi like(0);
	for(auto x:prime) {
		if (x == 2)continue;
		if (binary_search(all(prime),(x+1)/2))like.push_back(x);
	}

	rep(i, q) {
		int l, r;
		cin >> l >> r;
		cout << upper_bound(all(like), r) - lower_bound(all(like), l) << endl;
	}

}

Measured memory_bytes: 1152
#include<bits/stdc++.h>
#define watch(x) cout << (#x) << " is " << (x) << endl
typedef long long ll;
using namespace std;
int static fast = [](){
  ios::sync_with_stdio(false);
  cin.tie(0); cout.tie(0); return 0;
}();
// freopen("input.txt", "r", stdin);

int main() {
    int k, t;
    cin >> k >> t;
    vector<int> arr(t, 0);
    for(auto& val: arr)
        cin >> val;
    int mx = *max_element(arr.begin(), arr.end());
    int rem = k - mx;
    if (mx > rem+1) {
        mx -= (rem+1);
        cout << mx << endl;
    } else {
        cout << 0 << endl;
    }
    return 0;
}




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

//Do not get frustrated over WA. Check for edge cases and runtime errors :)
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    vector<ll> a(3);
    cin >> a[0] >> a[1] >> a[2];
    sort(a.begin(), a.end());
    if (a[0] == a[1] && a[1] != a[2] || a[1] == a[2] && a[0] != a[1]) {
        cout << "Yes";
    }
    else {
        cout << "No";
    }
    return 0;
}


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

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

  string s;
  cin>>s;
  int i=0,j=s.size()-1, ctr=0;
  while(i<=j)
  {
  	if(s[i]!=s[j])
  		ctr++;
  	i++;
  	j--;
  }
  
  cout<<ctr;
  return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
#include <string.h>
int main(void) {
	char word[11], in[1001], *p;
	int cnt = 0, i;

	scanf("%10s ", word);
	while (1) {
		fgets(in, 1000, stdin);
		if (strstr(in, "END_OF_TEXT") == in)
			break;
		for (i = 0; in[i] != '\0'; i++) {
			if ('A' <= in[i] && in[i] <= 'Z')
				in[i] += 0x20;
		}
		for (p = strtok(in, " \n"); p != NULL; p = strtok(NULL, " \n")) {
			if (!strcmp(p, word))
				cnt += 1;
		}
	}
	printf("%d\n", cnt);
	return 0;
}

Measured memory_bytes: 576
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  int A;
  int x;
  cin >> N >> A;
  x = N % 500;

  if (x == 0) {
    cout << "Yes" << endl;
  }
  else if (x <= A) {
    cout << "Yes" << endl;
  }
  else {
    cout << "No" << endl;
  }
}

Measured memory_bytes: 256
s = list(input())
rev = s[::-1]

s1 = s[:int((len(s)-1)/2)]
rev1 = s1[::-1]

s2 = s[int((len(s)+3)/2-1):]
rev2  = s2[::-1]

if s == rev and s1 == rev1 and s2 == rev2:
  print('Yes')
else:
  print('No')

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

using namespace std;

#define JAM(x) cout << #x << " = " << x << "\n"
#define II() ({ int a ; read(a) ; a; })
#define LL() ({ ll a ; read(a) ; a; })
#define DD() ({double a; scanf("%lf", &a); a; })

//Fast Reader
template <class T>
inline bool read(T &x)
{
    int c = getchar();
    int sgn = 1;
    while (~c && c < '0' || c > '9')
    {
        if (c == '-')
            sgn = -1;
        c = getchar();
    }
    for (x = 0; ~c && '0' <= c && c <= '9'; c = getchar())
        x = x * 10 + c - '0';
    x *= sgn;
    return ~c;
}

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef pair<int, int> PII;
typedef vector<PII> VPI;

const int INF = 2e9;
const int MX = 100005;
const int MOD = 1000000007;
const double PI = acos(-1.0);



long long int power(long long int a, long long int b)
{
    a %= MOD;
    long long int res = 1;
    while (b > 0)
    {
        if (b & 1)
            res = res * a % MOD;
        a = a * a % MOD;
        b >>= 1;
    }
    return res;
}
bool isprime(int n)
{
    if (n == 1)
        return false;
    for (int i = 2; i * i <= n; i++)
    {
        if (n % i == 0)
            return false;
    }
    return true;
}
long long int fact[1000001],infact[1000001];
void init()
{
    fact[0]=fact[1]=1;
    int i;
    for(i=2;i<=1000000;i++)
    {
        fact[i]=(fact[i-1]*i)%MOD;
    }
    infact[1000000]=power(fact[1000000],MOD-2);
    for(i=1000000-1;i>=0;i--)
    {
        infact[i]=(infact[i+1]*(i+1))%MOD;
    }
}
 
long long ncr(long long int n,long long int r)
{
    if(n<r)
    return 0;
    return (fact[n]*infact[r])%MOD*(infact[n-r])%MOD;
}

/*_______________________________________________*/



int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    long long int n;
    init();
    cin>>n;
    if(n<2)
    cout<<0;
    else
    {
        cout<<(power(10,n)-(2*power(9,n))%MOD+power(8,n)+MOD)%MOD;
    }
}

Measured memory_bytes: 19276
N, M = list(map(int, input().split(" ")))
min_, max_ = 0, N
for i in range(M):
    L, R = list(map(int, input().split(" ")))
    if L > min_:
      	min_ = L
    if R < max_:
        max_ = R
if max_ >= min_:
    print(max_ - min_ + 1)
else:
    print(0)

Measured memory_bytes: 3060
#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
use std::io::{Write, BufWriter};
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

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

macro_rules! read_value {
    ($next:expr, [graph1; $len:expr]) => {{
        let mut g = vec![vec![]; $len];
        let ab = read_value!($next, [(usize1, usize1)]);
        for (a, b) in ab {
            g[a].push(b);
            g[b].push(a);
        }
        g
    }};
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };
    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };
    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };
    ($next:expr, usize1) => (read_value!($next, usize) - 1);
    ($next:expr, [ $t:tt ]) => {{
        let len = read_value!($next, usize);
        read_value!($next, [$t; len])
    }};
    ($next:expr, $t:ty) => ($next().parse::<$t>().expect("Parse error"));
}

#[allow(unused)]
macro_rules! debug {
    ($($format:tt)*) => (write!(std::io::stderr(), $($format)*).unwrap());
}
#[allow(unused)]
macro_rules! debugln {
    ($($format:tt)*) => (writeln!(std::io::stderr(), $($format)*).unwrap());
}

fn solve() {
    let out = std::io::stdout();
    let mut out = BufWriter::new(out.lock());
    macro_rules! puts {
        ($($format:tt)*) => (let _ = write!(out,$($format)*););
    }
    input! {
        n: usize, k: usize,
        a: [i64; n],
    }
    for i in 0..n - k {
        puts!("{}\n", if a[i + k] > a[i] { "Yes" } else { "No" });
    }
}

fn main() {
    // In order to avoid potential stack overflow, spawn a new thread.
    let stack_size = 104_857_600; // 100 MB
    let thd = std::thread::Builder::new().stack_size(stack_size);
    thd.spawn(|| solve()).unwrap().join().unwrap();
}


Measured memory_bytes: 2712
#include <iostream>
#include <typeinfo>
#include <cstring>
#include <utility>
#include <vector>
#include <bitset>
#include <cmath>
#include <algorithm>
#include <queue>
using namespace std;

const long long MOD = 1000000007;

int main() {
    long long N, K;
    cin >> N >> K;

    long long ans = 0;
    for (long long i = K; i <= N+1; i++) {
        ans += i * (N - i + 1) + 1;
        ans %= MOD;
    }

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


Measured memory_bytes: 3636
package main

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

var (
	readString func() string
	stdout     *bufio.Writer
)

func init() {
	readString = newReadString(os.Stdin)
	stdout = bufio.NewWriter(os.Stdout)
}

func newReadString(ior io.Reader) func() string {
	r := bufio.NewScanner(ior)
	r.Buffer(make([]byte, 1024), int(1e+11))
	r.Split(bufio.ScanWords)

	return func() string {
		if !r.Scan() {
			panic("Scan failed")
		}
		return r.Text()
	}
}

func readInt() int {
	return int(readInt64())
}

func readInt64() int64 {
	i, err := strconv.ParseInt(readString(), 0, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func readIntSlice(n int) []int {
	b := make([]int, n)
	for i := 0; i < n; i++ {
		b[i] = readInt()
	}
	return b
}

func readLengthAndSlice() (int, []int) {
	n := readInt()
	return n, readIntSlice(n)
}

func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(stdout, f, args...)
}

func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(stdout, args...)
}

func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

// readString() string
// readInt() int
// readIntSlice(n int) []int
// readLengthAndSlice() []int

// -----------------------------------------------------------------------------

func main() {
	defer stdout.Flush()
	a := readInt()
	b := readInt()

	x := 0
	a, b, x = calc(a, b, x)
	a, b, x = calc(a, b, x)
	println(x)
}

func calc(a, b, x int) (int, int, int) {
	if a > b {
		x += a
		a--
	} else {
		x += b
		b--
	}
	return a, b, x
}

// -----------------------------------------------------------------------------


Measured memory_bytes: 640
#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <math.h>
#include <stdio.h>
#include <vector>
typedef long long ll;
using namespace std;
int P,Q,R;
int sum=0;
 
int main() {
	cin>>P>>Q>>R;
 
	sum=P+Q;
	sum=min(sum,(Q+R));
	sum=min(sum,(R+P));
 
	cout<<sum<<endl;
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#define int long long int

using namespace std;

signed main()
{
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	
	int n, W;
	cin>>n>>W;
	vector<int> w;
	vector<int> v;
	for (int j=0; j<n; j++)
	{
		int A,B;
		cin>>A>>B;
		w.push_back(A);
		v.push_back(B);
	}
	vector<vector<int>> dp;	//dpa[i-1][j]=min wt of elements from 1...i with sum of values j 
	
	for (int j=0; j<n; j++)
	{
		vector<int> a;
		for (int j=0; j<=100000; j++)
		{
			a.push_back(-1);
		}
		dp.push_back(a);
	}
	
	dp[0][v[0]]=w[0];
	for (int i=0; i<n; i++)
	{
		dp[i][0]=0;
	}
	for (int i=1; i<n; i++)
	{
		for (int j=1; j<=100000; j++)
		{
			if (dp[i-1][j]==-1)
			{
				if (j<v[i])
				{
					continue;
				}
				if (dp[i-1][j-v[i]]!=-1)
				{
					dp[i][j]=dp[i-1][j-v[i]]+w[i];
				}
				else
				{
					dp[i][j]=-1;
				}
			} 
			else
			{
				if (j<v[i])
				{
					dp[i][j]=dp[i-1][j];
				}				
				else if (dp[i-1][j-v[i]]!=-1)
				{
					dp[i][j]=min(dp[i-1][j],dp[i-1][j-v[i]]+w[i]);
				}
				else
				{
					dp[i][j]=dp[i-1][j];
				}
			}
		}
	}
	int max;
	bool found=false;
	for (int j=100000; j>=0; j--)
	{
		for (int i=0; i<n; i++)
		{
			if (dp[i][j]!=-1)
			{
				if (dp[i][j]<=W)
				{
					max=j;
					found=true;
					break;
				}
			}
		}
		if (found)
		{
			break;
		}
	}
	cout<<max;
	return 0;
}
	

Measured memory_bytes: 79460
#include <stdio.h>
#include <iostream>
#include <vector>
#include <cstdlib> 
#include <cmath>
#include <algorithm>
#include <sstream>
#include <string>
using namespace std;

int main() {
	int n;
	cin >> n;
	
	cout << n / 3 << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define ll long long
#define INF 1000000ll
using namespace std;
signed main(){
  int n,m;
  cin >> n >> m;
  vector<string> a(n);
  vector<string> b(m);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < m; i++){
    cin >> b[i];
  }

  for (int i = 0; i+(m-1) < n; i++) {
    for (int j = 0; j+(m-1) < n; j++) {
      bool f = true;
      for (int k = 0; k < m; k++) {
        for (int l = 0; l < m; l++) {
          if (a[i+k][j+l] != b[k][l]) {
            f = false;
          }
        }
      }
      if (f) {
        cout << "Yes\n";
        return 0;
      }
    }
  }
  cout << "No\n";
}

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

typedef long long ll;
#define endl "\n"

template <typename A, typename B>
string to_string(pair<A, B> p);
 
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
 
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
 
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");
}

string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
  if (!first) {
    res += ", ";
  }
  first = false;
  res += to_string(v[i]);
  }
  res += "}";
  return res;
}
 
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
  res += static_cast<char>('0' + v[i]);
  }
  return res;
}
 
template <typename A>
string to_string(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 A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}
 
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
 
void debug_out() {cout<<endl;}
 
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cout << " " << to_string(H);
  debug_out(T...);
}
 
#ifdef LOCAL
#define debug(...) cout << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 0
#endif


int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    
    int n; cin>>n;
    map<int,int> mp;
    ll ans=0;
    for (int i=0; i<n; ++i){
        int h; cin>>h;
        int need=i-h;
        ans+=mp[need];
        mp[h+i]++;
    }
    cout<<ans<<endl;
    return 0;
}

Measured memory_bytes: 20580
#include <iostream>
#include <string>
using namespace std;
#define NIL -1

struct Node {
  int right, left;
};

Node T[1000000];
int root = NIL;

void insert( int k ) {
  T[k].left = NIL;
  T[k].right = NIL;

  int y = NIL; //xの親
  int x = root; //Tの根
  while ( x != NIL ) {
    y = x; //親を設定
    if ( k < x ) {
      x = T[x].left; //左の子へ移動
    } else {
      x = T[x].right; //右の子へ移動
    }
  }
  if ( y == NIL ) root = k; //Tが空の場合
  else if ( k < y ) {
    T[y].left = k; //kをyの左の子にする 
  } else {
    T[y].right = k; //kをyの右の子にする
  }
}

//中間順巡回
void print1( int k ) {
  if ( k == NIL ) return;
  print1(T[k].left);
  cout << " " << k;
  print1(T[k].right);
}

//先行順巡回
void print2( int k ) {
  if ( k == NIL ) return;
  cout << " " << k;
  print2(T[k].left);
  print2(T[k].right);
}

int main() {
  int m, k;
  string str;

  cin >> m;
  for ( int i = 0; i < m; i++ ) {
    cin >> str;
    if ( str == "insert" ) {
      cin >> k;
      insert(k);
    } else if ( str == "print" ) {
      print1(root);
      cout << endl;
      print2(root);
      cout << endl;
    }
  }
  return 0;
}

Measured memory_bytes: 5296
#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 || y < r || (x + r) > W || (y + r) > H){
        printf("No\n");
    }
    else{
        printf("Yes\n");
    }
    return 0;
}

Measured memory_bytes: 2692
#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<stack>
#include<cstdlib>
#include<string>
#include<bitset>
#include<iomanip>
#include<deque>
#include<utility>
#define INF 1000000000
#define fi first
#define se second
#define N 100005
#define P 1000000007
#define debug(x) cerr<<#x<<"="<<x<<endl
#define MP(x,y) make_pair(x,y)
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
int main()
{
    int n,ans=1,x,nowx=1,cnt=0;
    cin>>n;
    while(n--)
    {
        scanf("%d",&x);
        if(x>=nowx)
        {
            nowx+=2;
            cnt++;
        }
        else ans=(LL)ans*(cnt+1)%P;
    }
    while(cnt)
    {
        ans=(LL)ans*(cnt)%P;
        cnt--;
    }
    cout<<ans<<endl;
    return 0;
}
// davidlee1999WTK 2017/
// ios::sync_with_stdio(false);
//#pragma comment(linker, "/STACK:102400000,102400000") compiler c++,not g++
/*

*/


Measured memory_bytes: 256
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define Rep(i, n) for (int i = 0; i < (int)(n); i++)
#define BitRep(i, n) for (int i = 0; i < (int)(1 << n); i++)
#define All(vec) vec.begin(), vec.end()
#define Sum(vec) accumulate(vec.begin(), vec.end(), 0)
#define Sort(vec) sort(vec.begin(), vec.end())
#define Reverse(vec) reverse(vec.begin(), vec.end())
#define Next_permutation(vec) next_permutation(vec.begin(), vec.end())
#define PI acos(-1)

int main() {
    int N;
    cin >> N;
    vector<int> A(N);
    vector<ll> cnt(N + 1);
    Rep(i, N) {
        cin >> A[i];
        cnt[A[i]]++;
    }
    ll ans = 0;
    Rep(i, cnt.size()) {
        ans += cnt[i] * (cnt[i] - 1) / 2;
    }
    Rep(i, N) {
        cout << ans - cnt[A[i]] + 1 << endl;
    }
    return 0;
}

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

int main(){
	int n, k, sum = 0;
	cin >> n >> k;
	vector <int> height(n,0);
	for (int i = 0; i < n; i++) {
		cin >> height[i];
		if (height[i] >= k) sum += 1;
	}
	cout << sum << endl;
	return 0;
}

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

int n;
int a[210];

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

    int ans = 0;

    bool exist_odd = false;
    while (exist_odd == false)
    {
        for (int i = 0; i < n; i++)
        {
            if (a[i] % 2 == 1)
            {
                exist_odd = true;
            }
            a[i] /= 2;
        }

        if(exist_odd) break;
        ans++;
    }
        
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <limits>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>

using namespace std;

int main(int argc, const char * argv[]) {
    ios::sync_with_stdio(0);
    cin.tie(0);
    
    int n, m, si, ci;
    cin >> n >> m;
    int num[n];
    memset(num, 0, sizeof(int) * n);
    map<int, int> s;
    for (int i = 0; i < m; i++) {
        cin >> si >> ci;
        if (si == 1 && ci == 0 && n != 1) {
            cout << "-1\n";
            return 0;
        }
        else if (s.find(si) != s.end() && s[si] != ci) {
            cout << "-1\n";
            return 0;
        } else {
            num[si - 1] = ci;
            s[si] = ci;
        }
    }
    if (num[0] == 0 && n != 1) num[0] = 1;
    for (int i = 0; i < n; i++) {
        cout << num[i];
    }
    cout << '\n';
}


Measured memory_bytes: 256
#include<iostream>
#include<iomanip>
#include<algorithm>
#include<cstring>
#include<string>
#include<cmath>
#include<vector>
#include<queue>
#include<stack>
#include<map>
#include<set>
using namespace std;
const int inf=1e9,dx[]={-1,0,1,0},dy[]={0,-1,0,1};
const long long llinf=1e18;
long long a,b;
int k,t;
int change(int t)
{
	if(t==1)
		return 2;
	return 1;
}
int main(){
	cin>>a>>b>>k;
	t=1;
	for(int i=1;i<=k;i++)
	{
		if(t==1)
		{
			a/=2ll;
			b+=a;
		}
		else
		{
			b/=2ll;
			a+=b;
		}
		t=change(t);
	}
	cout<<a<<' '<<b;
	return 0;
}

Measured memory_bytes: 504
#include <bits/stdc++.h>
using namespace std;
//#define int long long
typedef pair<int,int> ii;
typedef tuple<int,int,int> iii;
#define ll long long
#define miniiPQ priority_queue<ii,vector<ii>,greater<ii> >
#define minPQ priority_queue<int,vector<int>,greater<int> >
#define PQ priority_queue<int>
#define iiPQ priority_queue<ii>
#define US unordered_set<int>
#define UMS unordered_multiset<int>
#define UM unordered_map<int>
#define ST stack<int>
 
void m1(){
  int x,y;
  cin >> x >> y;
  if(y%2==1) cout << "No";
  else if(y >= 2 *x && y <= 4*x) cout << "Yes";
  else cout << "No";
}
 
/*
void m2(){
  int t; cin >> t;
  while(t--) m1();
}
*/
 
int main(){
  //freopen("in.txt","r",stdin);
  m1();
  //m2();
}

Measured memory_bytes: 3632
#include<bits/stdc++.h>
#define rep(i,b) for(int i=1;i<=b;i++)
#define drep(i,b) for(int i=b;i>=1;i--)
#define Rep(i,a,b) for(int i=a;i<=b;i++)
#define int long long
#define endl '\n'
using namespace std;
const int N=2e5+5;
const int mod=1e13+7;
int n,m,k,t,x,y,z;
//pr
//
#define mid (l+r)/2
#define ls i<<1
#define rs i<<1|1
//vec
//alg

int a[6000],az;


void solve(int ans=0) {
    cin>>n;
    for(int i=-400;i<=400;i++) {
        for(int j=-400;j<=400;j++) {
            if(i*i*i*i*i-j*j*j*j*j==n) {
                cout<<i<<' '<<j<<endl;
                return ;
            }
        }
    }
}

#undef int
int main() {
    ios::sync_with_stdio(false);
    //int T;cin>>T;
    //while(T--)
        solve();
}


Measured memory_bytes: 3608
/*
ID: espr1t
TASK: 
KEYWORDS: 
*/

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>

using namespace std;
FILE* in = stdin; FILE* out = stdout;

const int MAX = 100001;
const int TREE = 262144;
const long long INF = 1000000000000000001LL;

struct Line {
    int left, right, cost;
    bool operator < (const Line& r) const {
        return right != r.right ? right > r.right : left < r.left;
    }
};

int n, m;
Line a[MAX];
long long tree[TREE];

long long query(int idx) {
    idx += (TREE >> 1);
    long long ret = INF;
    while (idx) {
        ret = min(ret, tree[idx]);
        idx >>= 1;
    }
    return ret;
}

void update(int idx1, int idx2, long long val) {
    idx1 += (TREE >> 1), idx2 += (TREE >> 1);
    if (idx1 == idx2) {
        tree[idx1] = min(tree[idx1], val);
        return;
    }
    tree[idx1] = min(tree[idx1], val); bool flag1 = !(idx1 & 1); idx1 >>= 1;
    tree[idx2] = min(tree[idx2], val); bool flag2 =  (idx2 & 1); idx2 >>= 1;
    while (idx1 != idx2) {
        if (flag1) tree[(idx1 << 1) | 1] = min(tree[(idx1 << 1) | 1], val);
        if (flag2) tree[(idx2 << 1) | 0] = min(tree[(idx2 << 1) | 0], val);
        flag1 = !(idx1 & 1), idx1 >>= 1;
        flag2 =  (idx2 & 1), idx2 >>= 1;
    }
}

void solve() {
    for (int i = 0; i < TREE; i++)
        tree[i] = INF;

    sort(a, a + m);
//    for (int i = 0; i < m; i++)
//        fprintf(stderr, "%d %d %d\n", a[i].left, a[i].right, a[i].cost);
    long long ans = INF;
    for (int i = 0; i < m; i++) {
        long long cost = a[i].cost;
        if (a[i].right < n) {
            cost += query(a[i].right);
        }
        if (a[i].left == 1) {
            ans = min(ans, cost);
        }
        update(a[i].left, a[i].right, cost);
    }
    fprintf(out, "%lld\n", ans >= INF ? -1 : ans);
}

int main(void) {
//	in = fopen("D.in", "rt");
	
	fscanf(in, "%d %d", &n, &m);
	for (int i = 0; i < m; i++) {
	    fscanf(in, "%d %d %d", &a[i].left, &a[i].right, &a[i].cost);
    }
    solve();
	
	return 0;
}

Measured memory_bytes: 3328
#!/bin/bash
''':'
docker run --rm -it -v $(cd $(dirname $0) && pwd):/vo:ro pypy:3-2.4.0 \
   /bin/bash -c "pypy3 /vo/$(basename $0) < /vo/g.inp"
exit $?
'''
import sys


def _ia(): return [int(x) for x in sys.stdin.readline().strip().split()]


h, _ = _ia()
a = _ia()
if sum(a) >= h:
    print("Yes")
else:
    print("No")


Measured memory_bytes: 52932
#include <bits/stdc++.h>
using namespace std;
#define TRACE(x) x
#define WATCH(x) TRACE( cout << #x" = " << x << endl)
#define PRINT(x) TRACE(printf(x))
#define WATCHR(a, b) TRACE( for(auto c = a; c != b;) cout << *(c++) << " "; cout << endl)
#define WATCHC(V) TRACE({cout << #V" = "; WATCHR(V.begin(), V.end()); } )
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define trav(a, x) for(auto& a : x)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x).size()
#define mp make_pair
#define st first
#define nd second

using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using ld = long double;
using pll = pair<ll, ll>;
using vll = vector<ll>;
using pll = pair<ll, ll>;

void buff() { ios::sync_with_stdio( false ); cin.tie( nullptr ); }

constexpr ll MOD = 1e9 + 7;

inline ll pow_mod( ll a, ll b, ll mod = MOD) {
    ll res = 1; a %= mod; assert(b >= 0);
    for(;b;b>>=1) {
        if(b&1) res = (res * a) % mod;
        a = (a * a) % mod;
    }
    return res;
}
// End of template code!
int main() 
{
    buff();
    ll a;
    cin >> a;

    string s;
    cin >> s;
    ll val = (s[0]-'0') * 100 + (s[2]-'0') * 10 + (s[3]-'0') * 1;
    
    ll res = a * val;
    res = res / 100;
    cout << res << '\n';
    return 0;
}



Measured memory_bytes: 3652
n, m, X, Y = (int(i) for i in input().split())
x = [int(i) for i in input().split()]  
y = [int(i) for i in input().split()] 

x_max = max(X, max(x))
Z = x_max + 1

if Y < Z or min(y) < Z:
    print("War")
else:
    print("No War")

Measured memory_bytes: 3060
#include <iostream>
#include <fstream>
#include <cmath>  
#include <cstdlib>
#include <ctime>
#include <algorithm>
#include <numeric>
#include <functional>
#include <string> 
#include <vector>
#include <bitset>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>

using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;

#define REP(i,n) for(int i = 0; i < int(n); i++)
#define REREP(i,n) for(int i = int(n - 1); i >= 0; i--)
#define FOR(i, m, n) for(int i = int(m);i < int(n);i++)
#define REFOR(i, m, n) for(int i = int(n - 1);i >= int(m);i--)
#define ALL(obj) (obj).begin(),(obj).end()

#define VI vector<int>
#define VVI vector<vector<int>>
#define VVVI vector<vector<vector<int>>>
#define VD vector<double>
#define VVD vector<vector<double>>
#define VVVD vector<vector<vector<double>>>
#define VL vector<ll>
#define VVL vector<vector<ll>>
#define VVVL vector<vector<vector<ll>>>
#define VB vector<bool>
#define VVB vector<vector<bool>>
#define VVVB vector<vector<vector<bool>>>
#define VS vector<string>
#define VVS vector<vector<string>>
#define VVVS vector<vector<vector<string>>>

#define PII pair<int,int>
#define PDD pair<double,double>
#define PLL pair<ll,ll>
#define VPII vector<pair<int,int>>
#define VVPII vector<vector<pair<int,int>>>
#define VVVPII vector<vector<vector<pair<int,int>>>>
#define VPLL vector<pair<ll,ll>>
#define VVPLL vector<vector<pair<ll,ll>>>
#define VVVPLL vector<vector<vector<pair<ll,ll>>>>

#define SUMI(obj) accumulate((obj).begin(), (obj).end(), 0)
#define SUMD(obj) accumulate((obj).begin(), (obj).end(), 0.)
#define SUML(obj) accumulate((obj).begin(), (obj).end(), 0LL)
#define SORT(obj) sort((obj).begin(), (obj).end()) // 1,2,3,4,5...
#define RESORT(obj) sort((obj).begin(), (obj).end(), greater<int>()) // 5,4,3,2,1...
#define UB(obj,n) upper_bound((obj).begin(), (obj).end(), n) //itr > n
#define LB(obj,n) lower_bound((obj).begin(), (obj).end(), n) //itr>= n

const ll HMOD = (ll)1e9 + 7;
const ll LMOD = 998244353;
const ll HINF = (ll)1e18;
const ll LINF = (ll)1e9;
const long double PI = 3.1415926535897932384626433;
const long double EPS = 1e-10;

void YN(bool flag) {
	cout << ((flag) ? "YES" : "NO") << endl;
}

void Yn(bool flag) {
	cout << ((flag) ? "Yes" : "No") << endl;
}

void yn(bool flag) {
	cout << ((flag) ? "yes" : "no") << endl;
}


int main() {
	VI a(3); REP(i, 3) cin >> a[i];
	sort(ALL(a));
	cout << a[2] * 10 + a[1] + a[0] << endl;
	
	return 0;
}



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

int main() {
	ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
	string s, t; int cnt = 0; cin >> s >> t;
	for(int i = 0; i < s.size(); i++) {
		cnt += (s[i] ^ t[i]) > 0;
	}

	cout << cnt << endl;
}

Measured memory_bytes: 3828
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <vector>
#include <queue>
#include <iostream>
#include <set>
#include <map>
#include <string>

using namespace std;

#define mod 1e9+7
#define ll long long int
#define epsilon 1e-7

double min(double x, double y){
    if(x<y)return x;
    return y;
}

int t[100];
int v[100];
double realv[20000];
int tsum[101];
int main(void){
    int n;
    scanf("%d", &n);
    int tt = 0;
    tsum[0] = 0;
    for(int i = 0;i < n;i++){
        scanf("%d", &t[i]);
        tt += t[i];
        tsum[i+1] = tt;
    }
    for(int i = 0;i < n;i++){
        scanf("%d", &v[i]);
    }
    double ans = 0;
    for(int i = 0;i < n;i++){
        for(int j = tsum[i];j < tsum[i+1];j++){
            double real = min(j, min(tsum[n]-j, v[i]));
            for(int k = 0;k < n;k++){
                if(k < i){
                    real = min(real, v[k] + j - tsum[k+1]);
                }
                if(k > i){
                    real = min(real, v[k] + tsum[k] - j);
                }
            }
            double half = min((double)j + 0.5, min((double)tsum[n]-(double)j - 0.5, (double)v[i]));
            for(int k = 0;k < n;k++){
                if(k < i){
                    half = min(half, (double)v[k] + (double)j + 0.5 - (double)tsum[k+1]);
                }
                if(k > i){
                    half = min(half, (double)v[k] + (double)tsum[k] - (double)j - 0.5);
                }
            }
            ans += real / 2.0 + half / 2.0;
        }
    }
    printf("%lf\n", ans);
    return 0;
}

Measured memory_bytes: 256
#include<iostream>

using namespace std;

int main() {
    while(1) {
        int n, p;
        cin >> n >> p;
        if (n * p == 0) break;

        int cnt[n];
        for (int i = 0; i < n; ++i) {
            cnt[i] = 0;
        }
        int wan = p;
        int i = 0;
        while(1) {
            if (wan > 0) {
                wan--;
                cnt[i]++;
                if (cnt[i] == p) {
                    cout << i << endl;
                    break;
                }
            } else {
                wan = cnt[i];
                cnt[i] = 0;
            }
            i = (i + 1) % n;
        }
    }
}

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

int main(){
    string s, t;
    int cnt, ans = INT_MAX;
    cin >> s;
    cin >> t;

    int n = s.size();
    int m = t.size();

    int i = 0, k = 0;

    while (i <= n-m){
        k = i;
        cnt = 0;
        for (int j = 0; j < m; j++){
            if (s[k] != t[j]){
                cnt++;
            }
            k++;
        }

        if (cnt < ans){
            ans = cnt;
        }

        i++;
    }

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 3636
L, R = map(int, input().split(' '))

N = 2019


ans = 2019

for i in range(L, R):
    for j in range(i + 1, R + 1):
        mod = (i * j) % N
        if ans > mod:
            ans = mod
        if ans == 0:
            print(ans)
            exit(0)

print(ans)

Measured memory_bytes: 3060
#include <stdio.h>

int main(void)
{
  int S;
  int h, m, s;

  scanf("%d", &S);

  h = S / 3600;
  m = (S % 3600) / 60;
  s =(S % 3600) % 60;

  printf("%d:%d:%d\n", h, m, s);

  return 0;
}

Measured memory_bytes: 592
#include <algorithm>
#include <climits>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iomanip>
#include <cmath>

using namespace std;
using ll = long long int;

template <class T> ostream &operator<<(ostream &os, vector<T> &v) {
  for (auto i = v.begin(); i != v.end(); i++) {
    os << *i << " ";
  }
  return os;
}

const string YES = "Yes";
const string NO = "No";

void solve(long long K, long long X){
  if(500*K>=X)
    std::cout << YES << std::endl;
  else
    std::cout << NO << std::endl;
}

int main(){
  long long K;
  scanf("%lld",&K);
  long long X;
  scanf("%lld",&X);
  solve(K, X);
  return 0;
}



Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i, s, e) for (int i = s; i < e; ++i)
#define sort_(a) sort(a.begin(), a.end())
#define rsort(a) sort(a.rbegin(), a.rend())
#define sum(a) accumulate(a.begin(), a.end(), 0LL)
#define __lcm(a, b) std::__detail::__lcm(a, b)
typedef long long ll;
const long mod = 1e9 + 7;

int main(void) {
#ifdef DEBUG
  freopen("input.txt", "r", stdin);
#endif

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

  string S, T;
  cin >> S;
  cin >> T;
  sort_(S);
  rsort(T);
  int n = min(S.length(), T.length());
  rep(i, 0, n) {
    if (S[i] < T[i]) {
      cout << "Yes" << endl;
      return 0;
    } else if (S[i] == T[i]) {
      continue;
    } else {
      cout << "No" << endl;
      return 0;
    }
  }
  if (S.length() < T.length())
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}


Measured memory_bytes: 256