akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define o(a) cout << a << endl
#define int long long
#define fi first
#define se second
using namespace std;
typedef pair<int, int> P;

signed main(){
    int n;
    cin >> n;
    cout << (n >= 1200 ? "ARC" : "ABC") << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>

using namespace std;

int main()
{
    int N;
    cin>>N;
    vector<int> a(3*N);
    for (int i=0; i<3*N; i++)
        cin>>a[i];

    vector<long long> T1(N+1), T2(N+1);

    long long S = 0;
    priority_queue<int> Q;
    for (int i=0; i<N; i++)
        S += a[i],
        Q.push(-a[i]);
    T1[0] = S;
    for (int i=0; i<N; i++)
    {
        S += a[N+i];
        Q.push(-a[N+i]);
        S -= -Q.top();
        Q.pop();
        T1[i+1] = S;
    }

    S = 0;
    while (!Q.empty())
        Q.pop();
    for (int i=0; i<N; i++)
        S += a[2*N+i],
        Q.push(a[2*N+i]);
    T2[0] = S;
    for (int i=0; i<N; i++)
    {
        S += a[2*N-i-1];
        Q.push(a[2*N-i-1]);
        S -= Q.top();
        Q.pop();
        T2[i+1] = S;
    }

    long long ans = T1[0] - T2[N];
    for (int i=1; i<=N; i++)
        ans = max(ans, T1[i] - T2[N-i]);
    cout<<ans<<endl;
}


Measured memory_bytes: 3580
//#include <bits/stdc++.h>
#include <iostream>
#include <string>

using namespace std;



int main() {

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

	string s;
	cin >> s;
	int f = 0;

	for (int i = 0; i < a; ++i)
	{
		if (s[i] >= '0' && s[i] <= '9') {
			f = 1;
		}
		else {
			cout << "No" << endl;
			return 0;
		}
	}

	if (s[a] == '-') {
		f = 1;
	}
	else {
		cout << "No" << endl;
		return 0;
	}

	for (int i = a + 1; i <= a + b; ++i)
	{
		if (s[i] >= '0' && s[i] <= '9') {
			f = 1;
		}
		else {
			cout << "No" << endl;
			return 0;
		}
	}

	if (f == 1) {
		cout << "Yes" << endl;
	}
	

	return 0;
}



Measured memory_bytes: 256
#include <cassert>

#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
//#include <boost/foreach.hpp>
//#include <boost/range/algorithm.hpp>
#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define ll long long
#define Sort(v) sort(all(v))
#define INF 1000000000
#define END return 0
#define pb push_back
#define se second
#define fi first
#define pb push_back
#define all(v) (v).begin() , (v).end()
#define MP make_pair
//#define MOD 1000000007LL
#define int long long
using namespace std;
int day[12]={31,28,31,30,31,30,31,31,30,31,30,31};

ll comb[51][51];

void make_comb(){
    comb[0][0]=1LL;
    rep(i,1,51){
        rep(j,0,i+1){
            if(j==0||j==i){
                comb[i][j]=1LL;
                continue;
            }
            comb[i][j]=comb[i-1][j-1]+comb[i-1][j];
        }
    }
}

signed main (){
    make_comb();
    // rep(i,0,51){
    //     rep(j,0,51){
    //         cout<<comb[i][j]<<" ";
    //     }
    //     cout<<endl;
    // }

    int n,a,b;
    cin>>n>>a>>b;
    vector<int> v(n);
    map<int, int> mp;
    rep(i,0,n){
        cin>>v[i];
        mp[v[i]]++;
    }
    sort(v.begin(),v.end(),greater<int>());

    double ave=0;
    map<int,int> mpp;
    rep(i,0,a){
        ave+=v[i];
        mpp[v[i]]++;
    }
    cout<<fixed<<setprecision(20)<<ave/a<<endl;

    int ans;

    if(v[0]==v[a-1]){
        ans=0;
        rep(i,a,b+1){
            ans+=comb[mp[v[0]]][i];
        }
    }else {
        ans=1;
        for(auto it=mpp.begin();it!=mpp.end();it++){
            ans*=comb[mp[it->first]][it->second];
        }
    }
    cout<<ans<<endl;

    
}

/*
1-21-2
*/


Measured memory_bytes: 256
import java.util.*;
public class Main
{
	public static void main(String[] args) 
	{
		Scanner in=new Scanner(System.in);
		int M=1000000;
		boolean prime[]=new boolean[M+1];
		Arrays.fill(prime,true);
		prime[0]=prime[1]=false;
		for(int i=2;i*i<=M;i++)
		{
			if(!prime[i])
				continue;
			for(int j=i*2;j<=M;j+=i)
				prime[j]=false;
		}
		int dp[][]=new int[30][M+1];
		for(;;)
		{
			int n=in.nextInt();//料理の種類
			int x=in.nextInt();//予算額
			int a[]=new int[n];
			int ans=-1;
			for(int[] p:dp)//拡張for文
				Arrays.fill(p,0);
			if((n|x)==0)
				return;
			for(int i=0;i<n;i++)
				a[i]=in.nextInt();

			for(int i=a[0];i<=x;i+=a[0])
				dp[0][i]=1;
			for(int i=0;i<n;i++)
				dp[i][0]=1;

			for(int i=1;i<n;i++)
			{
				for(int j=1;j<a[i];j++)
					if(j<x+1)
						dp[i][j]=dp[i-1][j];
				for(int j=a[i];j<=x;j++)
				{
					dp[i][j]=(dp[i-1][j]|dp[i][j-a[i]]);
				}
			}
			for(int i=x;i>=2;i--)
			{
				if(prime[i]&&dp[n-1][i]==1)
				{
					ans=i;
					break;
				}
			}
			System.out.println(ans==-1 ? "NA" : ans);
		}
	}
}

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

int main(){
  int N;
  bool flag = false;
  
  cin >> N;
  
  string str[N];
  
  for (int i=0; i<N; i++){
    cin >> str[i];
  }
  
  for (int i=0; i<N; i++){
    if (str[i] == "Y"){
      flag = true;
      break;
    }
  }   
  if (flag){
    cout << "Four" << endl;
  }else{
    cout << "Three" << endl;
  }
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define REP(i,st,ed) for(int i=(int)(st),i##end=(int)(ed);i<=i##end;++i)
#define DREP(i,st,ed) for(int i=(int)(st),i##end=(int)(ed);i>=i##end;--i)
template<typename T>bool chkmin(T &x,const T &y){return x>y?x=y,1:0;}
template<typename T>bool chkmax(T &x,const T &y){return x<y?x=y,1:0;}
#ifdef __linux__
#define getchar getchar_unlocked
#define putchar putchar_unlocked
#endif
template<typename T>T read(){
	T x=0,f=1;
	char c=getchar();
	while((c<'0')||(c>'9')){if(c=='-')f=-1;c=getchar();}
	while((c>='0')&&(c<='9'))x=(x<<1)+(x<<3)+(c^48),c=getchar();
	return x*f;
}
#define read() read<int>()
template<typename T>void write(T x,char c){
	static char t[25];
	static int tlen;
	t[tlen=1]=c;
	if(x<0)putchar('-'),x=-x;
	do t[++tlen]=(x%10)^48;
	while(x/=10);
	while(tlen)putchar(t[tlen--]);
}
#define pb push_back
typedef long long ll;
typedef double lf;
const lf pi=acos(-1.0);
const int maxn=105;
struct point{int x,y;}p[maxn];
int n;
lf rd[maxn];
int main(){
	n=read();
	REP(i,1,n)p[i].x=read(),p[i].y=read();
	if(n==2){
		puts("0.5 0.5");
		return 0;
	}
	REP(i,1,n){
		int m=0;
		REP(j,1,n)
			if(i!=j)
				rd[++m]=atan2(p[j].y-p[i].y,p[j].x-p[i].x);
		sort(rd+1,rd+1+m);
		lf ans=0;
		REP(j,1,m){
			lf tmp=j==m?2*pi+rd[1]-rd[m]:rd[j+1]-rd[j];
			if(tmp>pi)ans=(tmp-pi)/(2*pi);
		}
		printf("%.10lf\n",ans);
	}
	return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
 
void insertionSort(int *, int, int);
int shellSort(int *, int);
 
int cnt = 0;
int G[100];
 
int main() {
  int i;
  int a[1000000];
  int n, m;
 
  scanf("%d", &n);
 
  for(i = 0; i < n; i++)
    scanf("%d", &a[i]);
   
  m = shellSort(a, n);
 
  printf("%d\n", m);
  for(i = m - 1; i >= 0; i--) {
    printf("%d", G[i]);
    if(i > 0) printf(" ");
  }
  printf("\n");
  printf("%d\n", cnt);
   
  for(i = 0; i < n; i++)
    printf("%d\n", a[i]);
   
  return 0;
}
 
void insertionSort(int *A, int n, int g) {
  int i, j, key;
 
  for(i = g; i < n; i++) {
    key = A[i];
    j = i - g;
    while(j >= 0 && A[j] > key) {
      A[j+g] = A[j];
      j -= g;
      cnt++;
    }
    A[j+g] = key;
  }
}
 
int shellSort(int *A, int n) {
  int i, r;
 
  G[0] = 1;
  for(i = 1; ; i++) {
    if(G[i-1] > n) break;
    G[i] = 3 * G[i-1] + 1;
  }
   
  r = i - 1;
 
  for(i = r; i >= 0; i--) {
    insertionSort(A, n, G[i]);
  }
 
  return r;
 
}

Measured memory_bytes: 4508
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N, l, r, i = 0;
  cin >> N;
  for(;N>0;N--){
    cin >> l >> r;
    i += r-l+1;
  }
  cout << i << endl;
 
  // ここにプログラムを追記
}

Measured memory_bytes: 256
from sys import stdin
from collections import defaultdict
def main():
    n = int(stdin.readline())
    a = map(int, stdin.readline().split())
    d = defaultdict(int)
    for x in a:
        d[x] += 1
    s = d.keys()
    if len(s) == 1:
        print 'Yes' if s[0] == 0 else 'No'
    elif len(s) == 2:
        print 'Yes' if (0 in s and (d[s[0]] == d[s[1]] or n % 3 == 0 and d[0] == n / 3)) else 'No'
    elif len(s) == 3:
        print 'Yes' if (s[0] ^ s[1] ^ s[2] == 0 and d[s[0]] == d[s[1]] == d[s[2]]) else 'No'
    else:
        print 'No'
main()


Measured memory_bytes: 11500
// use std::cmp;
// use std::collections::HashMap;
// use std::collections::HashSet;
// use std::collections::VecDeque;


// const INF: i64 = 1_000_000_000;


fn gcd(a: i64, b: i64) -> i64 {
    if b == 0 {
        a
    } else {
        gcd(b, a % b)
    }
}


fn main() {
    let cin = stdin();
    let cin = cin.lock();
    let mut sc = Scanner::new(cin);
    let t = sc.read();
    for _ in 0..t {
        let a = sc.read();
        let b = sc.read();
        let c = sc.read();
        let d = sc.read();
        let g = gcd(b, d);
        let mut c1 = c / g * g + a % g - g;
        while c1 <= c {
            c1 += g;
        }
        if b <= d && b <= a && b <= c1 {
            println!("Yes");
        } else {
            println!("No");
        }
    }
}

// thanks, ir5
use std::io::{stdin, Read, StdinLock};
use std::str::FromStr;

struct Scanner<'a> {
    cin: StdinLock<'a>,
}

impl<'a> Scanner<'a> {
    fn new(cin: StdinLock<'a>) -> Scanner<'a> {
        Scanner { cin: cin }
    }

    fn read1<T: FromStr>(&mut self) -> Option<T> {
        let token = self.cin
            .by_ref()
            .bytes()
            .map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect::<String>();
        token.parse::<T>().ok()
    }

    fn read<T: FromStr>(&mut self) -> T {
        self.read1().unwrap()
    }
}


Measured memory_bytes: 4352
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
const ll INF = LLONG_MAX;

int main()
{
    string s;
    cin >> s;
    int ans = 0;
    for (int i = 0; i < s.length(); i++)
    {
        if (s[i] == 'x')
            ans++;
    }
    cout << ((15 - ans) >= 8 ? "YES" : "NO") << endl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
template<typename T>inline void read(T &x){
	short f=1;x=0;char c=getchar();
	while(!isdigit(c)){ if(c=='-')f=-1;c=getchar(); }
	while(isdigit(c)) x=(x<<3)+(x<<1)+(c^48),c=getchar();
	x*=f;
}
template<typename T>inline void write(T x){
	if(x<0)putchar('-'),x=-x;
	if(x>9)write(x/10);
	putchar(x%10+'0');
}
template<typename T>inline void writeln(T x){
	write(x);putchar('\n');
}
int main(){
	int a,b,c;read(a),read(b),read(c);
	write(a),putchar(' '),write(b),putchar(' '),writeln(3*c-a-b),
	write(4*c-2*a-b),putchar(' '),write(c),putchar(' '),writeln(2*a+b-2*c),
	write(a+b-c),putchar(' '),write(2*c-b),putchar(' '),writeln(2*c-a);
	return 0;
}


Measured memory_bytes: 256
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        
        int A = sc.nextInt();
        int B = sc.nextInt();
        int T = sc.nextInt();
        int ans = 0;
        for(int i = 1; i <= T; i++)if(i % A == 0)ans += B;
        System.out.println(ans);
    }
}


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

using namespace std;

typedef long long ll;

static constexpr ll mod = 1e9 + 7;
const int maxn = 200010;
inline bool cmp(ll a, ll b) { return abs(a) < abs(b); }

int n, k;

ll a[maxn];

int main() {
    cin >> n >> k;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    sort(a + 1, a + n + 1, cmp);
    ll ans = 1;
    int lp = 0, ln = 0, rp = 0, rn = 0;
    for (int i = n - k + 1; i <= n; i++) {
        ans *= a[i];
        ans %= mod;
        if (!rp && a[i] > 0)
            rp = i;
        if (!rn && a[i] < 0)
            rn = i;
    }
    for (int i = n - k; i > 0; i--) {
        if (!lp && a[i] > 0)
            lp = i;
        if (!ln && a[i] < 0)
            ln = i;
    }
    if (ans < 0 && n != k) {
        if (!rp) {
            if (!lp) {
                ans = 1;
                for (int i = 1; i <= k; i++) {
                    ans *= a[i];
                    ans %= mod;
                }
            } else {
                swap(a[lp], a[rn]);
                ans = 1;
                for (int i = n - k + 1; i <= n; i++) {
                    ans *= a[i];
                    ans %= mod;
                }
                ans += mod;
                ans %= mod;
            }
        } else {
            if (!ln) {
                swap(a[lp], a[rn]);
                ans = 1;
                for (int i = n - k + 1; i <= n; i++) {
                    ans *= a[i];
                    ans %= mod;
                }
                ans += mod;
                ans %= mod;
            } else if (!lp) {
                swap(a[ln], a[rp]);
                ans = 1;
                for (int i = n - k + 1; i <= n; i++) {
                    ans *= a[i];
                    ans %= mod;
                }
                ans += mod;
                ans %= mod;
            } else {
                if (abs(a[ln] * a[rn]) > abs(a[lp] * a[rp])) {
                    swap(a[ln], a[rp]);
                    ans = 1;
                    for (int i = n - k + 1; i <= n; i++) {
                        ans *= a[i];
                        ans %= mod;
                    }
                    ans += mod;
                    ans %= mod;
                } else {
                    swap(a[lp], a[rn]);
                    ans = 1;
                    for (int i = n - k + 1; i <= n; i++) {
                        ans *= a[i];
                        ans %= mod;
                    }
                    ans += mod;
                    ans %= mod;
                }
            }
        }
    }
    ans += mod;
    ans %= mod;
    cout << ans << endl;
    return 0;
}

/*
1:全+
2:全- 取min(abs(a[i])) i=1...k
3:+-
(1) ans<0,n=k only
(2) max(a[i]), ans>0, out ans
(3) ans<0,n!=k
(3.1) try swap (lp,rn),(ln,rp)
lp: first n-K biggest+
ln: first n-K biggest-
rp: last k smallest+
rn: last k smallest-
*/


Measured memory_bytes: 5192
#include "bits/stdc++.h"
using namespace std;
#define FAST ios_base::sync_with_stdio(false); cin.tie(0);
#define LLINF (long long) 1e18//1234567890987654321
#define INF 1234567890
#define pb push_back
#define ins insert
#define f first
#define s second	
#define db 0
#define EPS (1e-7)    //0.0000001 the value
#define PI (acos(-1))
#define MAXN 300006
#define MAXK 26
#define MAXX 15000006
#define ll long long int
#define ld long double
#define rep0(kk, l1, l2)for(ll kk = l1; kk < l2; kk++)
#define rep1(kk, l1, l2)for(ll kk = l1; kk <= l2; kk++)
#define foritr(itr, A) for(set<ll>::iterator itr = A.begin(); itr != A.end(); itr++)
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());    //can be used by calling rng() or shuffle(A, A+n, rng)
#define FOR(ii, ss, ee) for(ll ii = ss; ii < ee; ii++)
#define cr(x) cerr << #x << " = " << x << "\n";
#define crA(x, A) cerr << #x << " = " << A[x] << "\n";
#define spacing if(db)cout << " ";
#define mmst(x, v) memset((x), v, sizeof ((x)));
#define bg(ms) (*ms.begin())
#define ed(ms) (*prev(ms.end(), 1))
#define addedge(a, b, c, v) v[(a)].pb(pi((b), (c))); v[(b)].pb(pi((a), (c)))
#define ph push
#define btinpct(x) __builtin_popcountll(x)
#define p2(x) (1LL<<(x))
#define all(x) (x).begin(), (x).end()
#define lbd(x, y) lower_bound(all(x), y)
#define ubd(x, y) upper_bound(all(x), y)
typedef pair <ll, ll> pi;
typedef pair <ll, pi> spi;
typedef pair <pi, pi> dpi;
inline ll rand(ll x, ll y) { ++y; return (rng() % (y-x)) + x; } //inclusivesss
ll n, A[MAXN], dp[MAXN], k;
int main()
{
	cin >> n >> k;
	FOR(i,0,n) cin >> A[i];
	FOR(i,0+1,n) dp[i] = LLINF;
	FOR(i,0,n)
	{
		FOR(j,i+1,min(n, (i+k+1)))
		{
			dp[j] = min(dp[j], dp[i] + llabs(A[i]-A[j]));
		}
	}
	cout << dp[n-1] << '\n'; 
}


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

int main(){
  int n,k,i;
  cin >> n >> k;
  long long a[n],b[n]={},c[n]={},ret=0;
  for(i=0;i<n;i++){
    cin >> a[i];
    if(i)b[i]+=b[i-1]+a[i];
    else b[i]=a[i];
    if(i)c[i]+=c[i-1]+max(a[i],0ll);
    else c[i]=max(a[i],0ll);
  }
  for(i=0;i<n-k+1;i++){
    long long now1=0,now2=0;
    if(i==0)now1 = b[k-1];
    else now1=b[k-1+i]-b[i-1];
    if(i==0){
      now1+=c[n-1]-c[k-1+i];
      now2+=c[n-1]-c[k-1+i];
    }else {
      now1 +=c[n-1]-c[k-1+i]+c[i-1];
      now2 +=c[n-1]-c[k-1+i]+c[i-1];
    }
    ret = max(ret,now1);
 	ret = max(ret,now2);
  }
  cout << ret << endl;
  return 0;
}
    

Measured memory_bytes: 2560
#include<stdio.h>
 
int main(void) {
    int i, j, k;
    int n, x;
    int cnt = 0;
    int a[10000];
    int flag = 1;
     
     
     
    do {
        scanf("%d %d", &n, &x);
         
        a[cnt] = 0;
         
        for(i = 0; i < n-2; i++) {
            for(j = i+1; j < n-1; j++) {
                for(k = j+1; k < n; k++) {
                    if(i + j + k + 3== x) {
                        a[cnt]++;
                    }
                }
            }
        }
         
        if(n == 0 && x == 0) {
            flag = 0;
        }
         
        cnt++;
         
    } while(flag);
     
    for(i = 0; i < cnt-1; i++) {
        printf("%d\n", a[i]);
    }
     
    return 0;
}

Measured memory_bytes: 608
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(I,A,B) for(ll I = (A); I < (B); ++I)
const ll INF=1e9+7;
const ll N = 100001;
ll x,y;

int main(){
	cin>>x>>y;
	if(abs(x-y)<2) cout<<"Brown"<<endl;
	else cout<<"Alice"<<endl;
	return 0;
}

Measured memory_bytes: 256
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

class Main {

    public static void main(String[] args) throws Exception {

        try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> input = Arrays.asList(br.readLine().split(" "));
            List<Integer> numbers = new ArrayList<>();

            for (String s : input) {
                numbers.add(Integer.parseInt(s));
            }
            int result = 0;
            if (numbers.get(0) >= numbers.get(1)) {
                result = 10;
            }

            System.out.println(result);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
}

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


int main(){

    int p, q, r;
    cin >> p >> q >> r;

    if(p >= q && p >= r){
        cout << q + r << endl;
    }
    else{
        if(q > p && q > r){
            cout << p + r << endl;
        }else{
            cout << q + p << endl;
        }

    }

    return 0;
}

Measured memory_bytes: 256
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define fi first
#define sc second
#define rep(i,x) for(int i=0;i<x;i++)
#define repn(i,x) for(int i=1;i<=x;i++)
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
const ll mod = 1000000007;

ll dp[105][32000];
ll rui[105][32000];
ll rui_mul[105][32000];
int n,k;
int num;
ll ans[105];
ll seq[105];
ll ret;

int main(){
	cin >> k >> n;
	num = 1;
	while(num*num <= k) num++;
    //[1,num-1]
	repn(i,num-1){
		if(i == 1) dp[1][i] = 1;
		rui[1][i] = 1;
		rui_mul[1][i] = rui_mul[1][i-1] + dp[1][i] * (k/i-num+1) % mod;
	}
	
	for(int i=3;i<=n+2;i+=2){
		for(int j=1;j<=num-1;j++){
			dp[i][j] = rui[i-2][j] * (k/j-num+1) % mod;
			dp[i][j] += rui_mul[i-2][num-1] - rui_mul[i-2][j];
		}
		for(int j=1;j<=num-1;j++){
			dp[i][j] %= mod;
			rui[i][j] = (rui[i][j-1]+dp[i][j])%mod;
			rui_mul[i][j] = (rui_mul[i][j-1]+dp[i][j]*(k/j-num+1))%mod;
		}
	}
	
	ret += dp[n+2][1];
	
    rep(i,105)rep(j,32000) dp[i][j] = rui[i][j] = rui_mul[i][j] = 0;
	//[1,num-1]
	repn(i,num-1){
		dp[1][i] = 1;
		rui[1][i] = i;
		rui_mul[1][i] = rui_mul[1][i-1] + dp[1][i] * (k/i-num+1) % mod;
	}
	
	for(int i=3;i<=n+2;i+=2){
		for(int j=1;j<=num-1;j++){
			dp[i][j] = rui[i-2][j] * (k/j-num+1) % mod;
			dp[i][j] += rui_mul[i-2][num-1] - rui_mul[i-2][j];
		}
		for(int j=1;j<=num-1;j++){
			dp[i][j] %= mod;
			rui[i][j] = (rui[i][j-1]+dp[i][j])%mod;
			rui_mul[i][j] = (rui_mul[i][j-1]+dp[i][j]*(k/j-num+1))%mod;
		}
	}
	
	repn(i,n+2) repn(j,num-1) seq[i] = (seq[i]+dp[i][j])%mod;
	
	ans[0] = 1;
	for(int i=1;i<=n;i++){
		for(int j=0;j<i;j++){
			ans[i] = (ans[i] + ans[j] * seq[i-j]) % mod;
		}
	}
	ret += ans[n];
	memset(ans,0,sizeof(ans));
	ans[0] = 1;
	for(int i=1;i<=n+1;i++){
		for(int j=0;j<i;j++){
			if(i == n+1 && i-j == 1) continue;
			else if(i == n+1){
			    ans[i] = (ans[i] + ans[j] * dp[i-j][1]) % mod;
			}
			else ans[i] = (ans[i] + ans[j] * seq[i-j]) % mod;
		}
	}
	ret += ans[n+1]*2LL;
	memset(ans,0,sizeof(ans));
	ans[0] = 1;
	for(int i=1;i<=n+2;i++){
		for(int j=0;j<i;j++){
		    if(i == n+2 && j == 0) continue;
			if(i == n+2 && i-j == 1) continue;
			else if(i == n+2){
			    ans[i] = (ans[i] + ans[j] * dp[i-j][1]) % mod; continue;
			}
			if(j == 0 && i-j == 1) continue;
			else if(j == 0){
			    ans[i] = (ans[i] + ans[j] * dp[i-j][1]) % mod; continue;
			}
			ans[i] = (ans[i] + ans[j] * seq[i-j]) % mod;
		}
	}
	ret += ans[n+2];
	cout << (ret%mod+mod)%mod << endl;
}

Measured memory_bytes: 79104
#include <iostream>
#include<vector>
#include<algorithm>
#include<cstring>
#include<string>
#include <set>
#include <cassert>
#include<cmath>
using namespace std;
#define MOD 1000000007
class UnionFind {
	vector<int> data;
public:
	UnionFind(int size) : data(size, -1) { }
	bool unionSet(int x, int y) {
		x = root(x); y = root(y);
		if (x != y) {
			if (data[y] < data[x]) swap(x, y);
			data[x] += data[y]; data[y] = x;
		}
		return x != y;
	}
	bool findSet(int x, int y) {
		return root(x) == root(y);
	}
	int root(int x) {
		return data[x] < 0 ? x : data[x] = root(data[x]);
	}
	int size(int x) {
		return -data[root(x)];
	}
};

int find(vector<long long> &arr, long long obj) {
	if (arr[arr.size() - 1] < obj)return arr.size()-1;
	if (arr[0] > obj)return -1;

	int min = 0; int max = arr.size() - 1;
	for (int i = 0; i < arr.size(); i++) {
		if (arr[min+(max-min) / 2] > obj) {
			max = min + (max - min) / 2;
		}
		else {
			min = min + (max - min) / 2;
		}
		if (max - min == 1) {
			return min;
		}
	}


}


int main() {
	int n;
	cin >> n;
	string s;
	cin >> s;
	int count = 0;
	for (int i = 0; i < n; i++) {
		if (s[i] == 'R') {
			count++;
		}
	}
	if (count > n - count) {
		cout << "Yes";
	}
	else {
		cout << "No";
	}
	return 0;
}

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

using namespace std;

int main (){

	#ifndef ONLINE_JUDGE
		freopen("input.txt","r",stdin);
		freopen("output.txt","w",stdout);
	#endif


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


	int x[5];
	for (int i = 0 ;i < 5;i++) {
		cin>>x[i];
		if ( !x[i]) {
			cout<<i+1<<endl;
			break;
		}
	}		
}

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

using namespace std;

const int M = 1e9 + 7;
long long n;
long long k1, k2, k3;

int main()
{
    scanf("%lld", &n);
    k1 = k2 = k3 = 1;
    for(int i = 0; i < n; i ++ )
    {
        k1 *= 10;
        k1 %= M;
        k2 *= 9;
        k2 %= M;
        k3 *= 8;
        k3 %= M;
    }
    k1 = k1 - k2 - k2 + k3;
    k1 = k1 % M;
    k1 = (k1 + M) % M;
    printf("%d", k1);
    return 0;
}

Measured memory_bytes: 3832
import scala.io.Source
import scala.collection.mutable.Map

object Main {
  def main(args: Array[String]) = {
    val lines = Source.stdin.getLines.toStream
    val inSeq = lines.drop(1).head.split(' ').map(_.toLong)

    println(dp(inSeq))
  }

  def dp(input: IndexedSeq[Long]): Long = {
    val memo = Array.ofDim[Long](input.length + 1, input.length + 1, 2)

    (1 to input.length).foreach { n =>
      memo(n-1)(n)(0) = input(n-1)
      memo(n-1)(n)(1) = 0
    }

    (2 to input.length).foreach { area =>
      var res = Long.MaxValue
      (2 to area).foreach { tgLen =>
        // cand
        var locMin = Long.MaxValue
        var cost = 0L
        ((area - tgLen + 1) to (area - 1)).reverse.foreach { split =>
          // println(area, tgLen, split)
          var cand = memo(area - tgLen)(split)(1) + memo(split)(area)(1)
          if (cand <= locMin) {
            locMin = cand
            cost = memo(area - tgLen)(split)(0) + memo(split)(area)(0)
          }
          // locMin = math.min(
          //   locMin, memo((area - tgLen, split))._2 + memo((split, area))._2
          // )
        }

        // println(area - tgLen, area, locMin)
        memo(area - tgLen)(area)(0) = cost
        memo(area - tgLen)(area)(1) = locMin + cost
      }
    }
    memo(0)(input.length)(1)
  }
}


Measured memory_bytes: 45568
#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<(n); ++i)
#define rep2(i, s, n) for(int i=s; i<(n); ++i)
#define sz(x) int(x.size())

typedef long long ll;

using namespace std;

/*******-c++14 don't include-*******/
template<typename T>
T gcd(T a, T b){if( b == 0)return a; return gcd(b, a%b); }
template<typename T>
T lcm(T a, T b){return a*b/gcd(a,b); }
void printArr(int *a, int len){for(int i=0; i<len; i++){if(i)cout << " ";cout << a[i];}cout << endl;}
/*******---------------------*******/

static const int INTINF = (2147483647);
static const ll LLINF = (9223372036854775807);
static const int MAX = 200001;
//--global--//



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


const int maxn = 200000;
 
int n;
bool a[maxn+1];
bool ans[maxn+1];
int c = 0;



int main(int argc, const char * argv[]) {
    //提出時、消す----//
    //--------------//cin >> n;
    cin >> n;
    rep(i,n)cin >> a[i+1];  //1-indexed
    
    for(int i=n;i>=1;i--){
        int cnt = 0;
        for(int j=i;j<=n;j+=i){
            if(ans[j])cnt++;
        }
        if((cnt%2==0&&a[i]==1)||(cnt%2==1&&a[i]==0)){
            ans[i]=1;
            c++;
        }
    }
    
    cout << c<<endl;
    rep(i,n){
        if(ans[i+1]==1)cout << i+1<<endl;
    }
    
    return 0;
}


Measured memory_bytes: 1408
#include <bits/stdc++.h>
using namespace std;
 
#define int long long
#define pb push_back
#define ub upper_bound
#define lb upper_bound
#define mp make_pair
#define F first
#define S second
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define SORT(c) sort((c).begin(),(c).end())
#define ve vector
#define vi vector<int>
#define vp vector<pair<int,int>>
#define vvi vector<vector<int>>
 
typedef long long ll;
const ll INF = LLONG_MAX - 100;
const ll mod = 1e9 + 7;
const int MAX_N = 2e5 + 5;
int dx[] = {-1,0,1,0}, dy[] = {0,1,0,-1};
vector<ll> prime;
 
int fac[MAX_N], inv[MAX_N];
 
template <class T = ll> T in() {T x; cin >> x; return (x);}
void DEBUG(vector<int> a) {for(int i=0;i<a.size();i++)cout<<a[i]<<" ";cout<<endl;}
void EMP(int x) {cout<<"!!!"<<x<<"!!!"<<endl;}
ll GCD(ll a, ll b) {ll c; while (b != 0) {c = a % b; a = b; b = c;}return a;}
ll LCM(ll a, ll b) {return a * b / GCD(a, b);}
ll POW(ll a, ll b, bool usemod = true) {ll c = 1LL; while (b > 0) {if (b & 1LL) {if(!usemod)c*=a;else c = a * c%mod;}if (!usemod) a*=a;else a = a * a%mod; b >>= 1LL;}return c;}
void _nCr() {fac[0] = 1LL; for (int i = 1LL; i < MAX_N; i++) {fac[i] = fac[i - 1LL] * i%mod;}for (int i = 0; i < MAX_N; i++) {inv[i] = POW(fac[i], mod - 2);}}
ll nCr(ll n, ll r) {return (fac[n] * inv[r] % mod)*inv[n - r] % mod;}
void PRI(ll n) {bool a[n + 1LL]; for (int i = 0; i < n + 1LL; i++) {a[i] = 1LL;}for (int i = 2; i < n + 1LL; i++) {if (a[i]) {prime.pb(i); ll b = i; while (b <= n) {a[b] = 0; b += i;}}}}
template <typename T> T chmin(T& a, T b) {if(a>b)a=b;return a;}
template <typename T> T chmax(T& a, T b) {if(a<b)a=b;return b;}

int n,k;
bool ok = true;
vector<vector<int>> edge = vector<vector<int>>(100005,vector<int>());
int rnk[100005], par[100005], cha[100005], ans[100005];
int dfs(int po, int ra, int cn) {
	//cnは親から
	if (cn < 0) ok = false;
	rnk[po] = ra;
	par[po] = cn;
	int child = 0;
	int tmp = 1;
	for (auto&& ne:edge[po]) {
		if (rnk[ne] >= 0) continue;
		int nscore = k-2; if (ra == 0) nscore++;
		tmp *= dfs(ne,ra+1,nscore-child); tmp %= mod;
		child++;
	}
	return ans[po] = cn * tmp % mod;
}

bool solve() {
	cin >> n >> k;
	REP (i,n-1) {
		int a,b; cin >> a >> b;
		edge[a-1].pb(b-1);
		edge[b-1].pb(a-1);
	}
	REP (i,100005) rnk[i] = -1;
	int aaa = dfs(0,0,k);
	cout << aaa << endl;
}

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

Measured memory_bytes: 14848
n = int(input())
a = list(map(int, input().split()))
t = [0]
mod = 10**9 + 7
for i in range(n):
    t.append((t[-1] + a[i])% mod)

ans = 0
for i in range(n-1):
    ans += a[i] * (t[-1] - t[i+1])%mod
    ans %= mod

print(ans)



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

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9

string s;

int main()
{
  getline(cin, s);

  rep(i, s.size()) if('a'<=s[i] && s[i]<='z') s[i] += 'A' - 'a';

  cout << s << endl;

  return 0;
}

Measured memory_bytes: 1172
x = input()
i = 0
ans = 0
for xi in x:
  if xi == 'A' or xi == 'T' or xi == 'G' or xi == 'C':
    i = i + 1
  else:
    if ans < i:
      ans = i
    i = 0
if ans < i:
  ans = i
print(ans)

Measured memory_bytes: 3060
fun main(args: Array<String>) {
    val s = readLine()!!.toInt()
    val a = mutableListOf<Int>()
    a.add(s)
    var _a = s
    for (i in 2..1000000) {
        _a = f(_a)
        if (a.contains(_a)) {
            println(i)
            return
        }
        a.add(_a)
    }
}

fun f(n: Int): Int {
    return if (n % 2 == 0) n / 2 else 3 * n + 1
}

Measured memory_bytes: 33988
#include <cstdio>
#include <iostream>
#include <set>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>

using namespace std;

const int CMax = 100002;

int n, k, sk, nm, np, sumM, sumP, pm, pp;
vector <int> M, P;


int main() {
    scanf("%d %d", &n, &k);

    for (int i = 0; i < n; i++) {
        scanf("%d", &sk);
        if (sk < 0) M.push_back(-sk);
        if (sk > 0) P.push_back(sk);
        if (sk == 0) k--;
    }

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

    nm = (int)M.size();
    np = (int)P.size();

    int ppp = 0;

    for (int i = 0; i <= k; i++) {
        pm = k-i > 0 && nm > 0 ? M[nm > k-i ? k-i-1 : nm-1] : 0;

        pp = i - 1 + (nm < k-i ? (k-i) - nm: 0);


        if (pp >= 0 && pp < np) ppp = P[pp];
        else if (pp >= np) pm = -1;

        if (i == 0) {
            sumM = min((pm*2) + ppp, pm + (ppp*2));
        } else if (pm >= 0) {
            sumM = min(sumM, min((pm*2) + ppp, pm + (ppp*2)));
        }
    }

    printf("%d\n", sumM);
}


Measured memory_bytes: 1020
N = int(input())
A = [int(s) for s in input().split()]

def main():
    a = list(map(lambda n: n - 1, A)) + A + list(map(lambda n: n + 1, A))
    d = {}
    for n in a:
        if not n in d.keys():
            d[n] = 0
        d[n] += 1
    print(max(d.values()))

if __name__ == '__main__':
    main()

Measured memory_bytes: 28104
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<math.h>

using namespace std;

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

    int V[N], C[N];
    for(int i = 0; i < N; i++)cin >> V[i];
    for(int i = 0; i < N; i++)cin >> C[i];

    int ans = 0;
    for(int i = 0; i < N; i++){
        if(V[i] > C[i]){
            ans += V[i] - C[i];
        }
    }
    cout << ans;

    return 0;
}

Measured memory_bytes: 256
#include<bits//stdc++.h>
using namespace std;
int main() {
	int n,ans = 0,cnt = 0; cin >> n;
	for (int i = 1; i <= n;i += 2) {
		for (int j = 1;j <= n;j++) {
			if (i % j == 0) cnt++;
			if (cnt == 8) {
				ans++;
				break;
			}
		}cnt = 0;
	}
	cout << ans << endl;
}

Measured memory_bytes: 3588
import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    //nextLineとnextを同時に使ったら死ぬ
    val sc = new Scanner(System.in)

    val a, b = sc.nextInt()
    if ((a * b) % 2 != 0) {
      println("Yes")
    } else {
      println("No")
    }
  }

}


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

int main(void)
{
    string s;
    cin >> s;

    int length = s.length();
    int hugs = 0;

    int left = 0;
    int right = length - 1;
    while(left < right) {
        if(s[left] != s[right]) {
            ++hugs;
        }
        ++left;
        --right;
    }

    cout << hugs << endl;
    return 0;
}

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

int mypow(int lv, int rv) {
	if (rv > 0) return lv * mypow(lv, rv - 1);
	else return 1;
}

using namespace std;
int main() {
	int d, n;
	cin >> d >> n;
	if (n == 100) {
		cout << (n + 1) * mypow(100, d);
	}
	else {
		cout << n * mypow(100, d);
	}
}

Measured memory_bytes: 256
using System;
using System.Collections.Generic;
namespace ITP1_4_A
{
    class Problem
    {

        public static List<string[]> getinputdata (){

            List<string[]> list_temp = new List<string[]>();
            string strdata = Console.ReadLine ();

            while (strdata!=null) {

                string[] s_temp = strdata.Split (' ');

                list_temp.Add (s_temp);

                strdata = Console.ReadLine ();

            }

            return list_temp;
        }



        public static void Main (string[] args)
        {
            List<string[]> list_result = new List<string[]>();
            list_result = getinputdata ();

            int a = int.Parse(list_result[0][0]);
            int b = int.Parse(list_result[0][1]);

            int d = a / b;
            int r = a % b;
            decimal f = (decimal)a / b;

            Console.WriteLine("{0} {1} {2}",d,r,f);




        }
    }
}

Measured memory_bytes: 9416
#include <cstdio>
#include <vector>
#include <algorithm>

using namespace std;

vector<int> *points;
vector<int> *twice;

void deldup(vector<int> *vec) {
    vector<int>::iterator it = vec->begin();
    bool is_straight = false;
    int save = -1;

    while (it != vec->end()) {
        if (*it == save) {
            vec->erase(it++);
            is_straight = true;
            continue;
        } else {
            save = *it;
            if (is_straight) {
                vec->erase(it++);
                is_straight = false;
                continue;
            }
            is_straight = false;
        }
        it++;
    }
}

int search(vector<int> *target, int standard) {
    int ind;
    int min = 0;
    int max = target->size() - 1;

    while (1) {
        ind = (min + max)/2;

        if (max - min <= 1) return target->at(min);

        if (target->at(ind) <= standard) {
            min = ind;
        } else {
            max = ind;
        }
    }
}

int main() {
    while (1) {
        int i;
        int n, m;
        int max = 0;

        scanf("%d %d", &n, &m);
        if (n == 0 && m == 0) return 0;

        points = new vector<int>();
        twice = new vector<int>();

        points->push_back(0);
        for (i=0;i<n;i++) {
            int k;
            scanf("%d", &k);
            points->push_back(k);
        }

        vector<int>::iterator it1 = points->begin();
        while (it1 != points->end()) {
            vector<int>::iterator it2 = points->begin();
            while (it2 != points->end()) {
                twice->push_back(*it1 + *it2);
                it2++;
            }
            it1++;
        }

        sort(points->begin(), points->end());
        sort(twice->begin(), twice->end());

        vector<int>::reverse_iterator rit1 = twice->rbegin();
        while (rit1 != twice->rend()) {
            if (*rit1 <= m) {
                int got = *rit1 + search(twice, m - *rit1);
                if (max < got) max = got;
            }
            rit1++;
        }

        printf("%d\n", max);
    }
}

Measured memory_bytes: 24932
N = int(input())
for i in range(1,3501):
  for j in range(1,3501):
    over = N*i*j
    under = 4*i*j-i*N-j*N
    if under>0 and over%under==0:
      w = over//under
      h = i
      n = j
      break
print(h,n,w)


Measured memory_bytes: 41820
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
  
struct edge_t {
    int from;
    int to;
    int cost;
};

typedef struct edge_t Edge;
  
int main(void) {
    int num, i, k, from, to, cost, update;
    int nedge = 0;
    int dis[10000];
    Edge *edges, *p;
  
    edges = malloc(sizeof(Edge) * 500000);
  
    scanf("%d", &num);
  
    for (i = 0; i < num; i++){
        scanf("%d %d", &from, &k);
  
        while(k--){
            scanf("%d %d", &to, &cost);
  
            p = &edges[nedge++];
            p->from = from;
            p->to = to;
            p->cost = cost;
        }
        dis[i] = INT_MAX;
    }
    dis[0] = 0;
  
    update = 1;
    while(update){
        update = 0;
        for(i = 0; i < nedge; i++){
            from = edges[i].from;
            to = edges[i].to;
            cost = edges[i].cost;
            if(dis[from] < INT_MAX && dis[to] > cost + dis[from]){
                dis[to] = cost + dis[from];
                update = 1;
            }
        }
    }
    for(i = 0; i < num; i++){
        printf("%d %d\n", i, dis[i]);
    }

    return 0;
}

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

int main(){
	int n,s,sum,min,max;
	refrain:
	cin>>n;
	if(n==0) return 0;
	min=1001;
	max=-1;
	sum=0;
	for(int i=0;i<n;i++){
		cin>>s;
		if(s>max) max=s;
		if(s<min) min=s;
		sum+=s;
	}
	sum-=max+min;
	sum/=n-2;
	cout<<sum<<endl;
	goto refrain;
}

Measured memory_bytes: 1160
#include <stdio.h>


using namespace std;

class CSolver{
public:
	CSolver();
	int solve();
	int in_a_;
	int in_b_;
	int out_;
};

CSolver::CSolver(){
};

int CSolver::solve(){
	scanf("%d %d", &in_a_, &in_b_);

	if (in_a_ < in_b_){
		printf("a < b\n");
	}
	else if(in_a_ > in_b_){
		printf("a > b\n");
	}
	else{
		printf("a == b\n");
	}

	return 0;
};

int main(){

	CSolver mysol;

	mysol.solve();

	return 0;
}

Measured memory_bytes: 1008
N, M = map(int, input().split())
Hs = list(map(int, input().split()))
adjL = [[] for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    a, b = a-1, b-1
    adjL[a].append(b)
    adjL[b].append(a)

ans = 0
for v in range(N):
    for v2 in adjL[v]:
        if Hs[v] <= Hs[v2]:
            break
    else:
        ans += 1

print(ans)


Measured memory_bytes: 29508
#include <bits/stdc++.h>
using namespace std;
using Int = long long;
int main() {
    cin.tie(nullptr); ios::sync_with_stdio(false);
    int H, N; cin >> H >> N;
    vector<int> A(N); for (auto &a : A) cin >> a;
    if (H <= accumulate(begin(A), end(A), 0)) {
        cout << "Yes\n";
    } else {
        cout << "No\n";
    }
    return 0;
}


Measured memory_bytes: 640
/*
THE BEST IS YET TO COME
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define r(i, s, l) for (int i = s; i < l; i++)
#define mod 1000000007
#define INT_BITS 32
#define ld long double
#define pp pair<int,int>
#define ss second
#define ff first
#define INF 1e18
#define N 2000005
#define all(a) a.begin(), a.end()
#define pb push_back
using namespace std;
void fast()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
}

signed main() {

    fast();
    vector<int> a(3);
    int k;
    r(i,0,3)
    cin>>a[i];

    cin>>k;

    int sum=0;
    sum += min(k,a[0]);
    k = k - min(k,a[0]);

    if(k<=0)
    {
     cout<<sum;
     return 0;
    }
    k = k - min(k,a[1]);

    if(k<=0)
    {
     cout<<sum;
     return 0;
    }

    sum -= min(k,a[2]);
    k = k - min(k,a[2]);

    if(k<=0)
    {
     cout<<sum;
     return 0;
    }

    cout<<sum;



	return 0;
}


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

using namespace std;

typedef long long int ll;
typedef pair<int,int> P;

#define rep(i,n) for(int i=0;i<(n);++i)
#define repi(i,a,b) for(int i=int(a);i<(b);i++)
#define repr(i,b,a) for(int i=int(b);i>=(a);i--)
#define all(x) x.begin(),x.end()

const ll mod = 1e9+7;
const ll INF = 1e9;

ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
bool valid(int lx,int ux,int ly,int uy,int x,int y){
	return lx<=x&&x<ux&&ly<=y&&y<uy; 
}
ll power(ll x,ll p){
	if(p==0)return 1;
	ll res=power(x*x%mod,p/2);
	if(p%2==1)res=res*x%mod;
	return res;
}

vector<vector<int>> g;
vector<int> pred;

int main()
{
	int n, m;
	cin>>n>>m;
	g.resize(n);
	pred.resize(n,-1);
	rep(i,m){
		int a,b;
		cin>>a>>b;
		g[a-1].push_back(b-1);
		g[b-1].push_back(a-1);
	}

	queue<int> que;
	que.push(0);
	while(!que.empty()){
		int now = que.front();que.pop();
		for(auto x:g[now]){
			if(pred[x]>=0)continue;
			pred[x] = now;
			que.push(x);
		}
	}

	cout<<"Yes"<<endl;
	repi(i,1,n){
		cout<<pred[i] + 1<<endl;
	}

	return 0;
}

Measured memory_bytes: 10176
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

namespace AtCoder
{
    public static class Program
    {
        static void Main()
        {
            var N = int.Parse(Console.ReadLine());
            var forSort = new List<int>(N);
            var array = new int[N];
            foreach (var i in Enumerable.Range(0, N))
            {
                var v = int.Parse(Console.ReadLine());
                array[i] = v;
                forSort.Add(v);
            }
            forSort.Sort();

            var top = forSort[forSort.Count - 1];
            var second = forSort[forSort.Count - 2];

            for (int i = 0; i < array.Length; i++)
            {
                if (array[i] == top)
                {
                    Console.WriteLine(second);
                    continue;
                }
                Console.WriteLine(top);
            }
        }
    }
}


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

#define ln '\n'
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
#define FOR(i, a, b) for (int i = (a); i <= (int)(b); ++i)
#define FORR(i, a, b) for (int i = (a); i >= (int)(b); --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int, int> P;
typedef pair<ll, ll> PL;
typedef vector<P> VP;
typedef vector<PL> VPL;
typedef vector<string> VS;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, h, w;
    cin >> n >> h >> w;
    int ans = 0;
    REP(i, n) {
        int a, b;
        cin >> a >> b;
        if (a >= h and b >= w) ans++;
    }
    cout << ans << ln;
    return 0;
}


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

#define BUF_SIZE 30

struct list {
  struct list *prev, *next;
  int number;
};

struct list* create_list() {
  struct list *head = malloc(sizeof(struct list));
  head->prev = head->next = head;
  return head;
}

void print_list(struct list *head) {
  struct list *tmp;
  for(tmp = head->next; tmp != head; tmp = tmp->next) {
    printf("%d%c", tmp->number, tmp->next == head ? '\n' : ' ');
  }
}

struct list* find(struct list *head, int num) {
  struct list *tmp;
  for(tmp = head->next; tmp != head; tmp = tmp->next) {
    if(tmp->number == num) {
      return tmp;
    }
  }
  return NULL;
}

void insert(struct list *head, int num) {
  struct list *elem = malloc(sizeof(struct list));
  elem->next = head->next;
  elem->prev = head;
  elem->number = num;
  head->next->prev = elem;
  head->next = elem;
}

void delete(struct list *head, int num) {
  struct list *elem = find(head, num);
  if(!elem) return;
  elem->prev->next = elem->next;
  elem->next->prev = elem->prev;
  free(elem);
}

void deleteFirst(struct list *head) {
  struct list *elem = head->next;
  if(elem == head) return;
  head->next = elem->next;
  elem->next->prev = head;
  free(elem);
}

void deleteLast(struct list *head) {
  struct list *last = head->prev;
  if(last == head) return;
  last->prev->next = head;
  head->prev = last->prev;
  free(last);
}


int main(void) {
  FILE *fp = stdin;
  char line[BUF_SIZE];
  if(!fgets(line,BUF_SIZE, fp)) return 0;
  int num;
  sscanf(line, "%d", &num);

  struct list *head = create_list();

  int i;
  for(i = 0; i < num; i++) {
    if(!fgets(line,BUF_SIZE, fp)) return 0;
    int n;
    char command[12];
    sscanf(line, "%s %d", command, &n);
    if(!strncmp(command, "insert", 6)) {
      insert(head, n);
    } else if(!strncmp(command, "delete", 6)) {
      if(!strncmp(&command[6], "First", 5)) {
        deleteFirst(head);
      } else if(!strncmp(&command[6], "Last", 4)) {
        deleteLast(head);
      } else if(command[6] == '\0') {
        delete(head, n);
      } else { printf("err2\n"); return 0; }
    } else {
      printf("err\n");
      return 0;
    }
  }
  print_list(head);
  return 0;
}


Measured memory_bytes: 32984
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
using namespace std;
 
#define mod 1000000007
#define FOR(x,to) for(int x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
#define long long long
inline int rei(){int x;cin>>x;return x;}
inline long rel(){long x;cin>>x;return x;}
inline string res(){string x;cin>>x;return x;}
//------------------------------------------------------- 
vector<int> G[100000];
int O[100000];
int DP[100000];
void Calc(){
	int N = rei();
	int M = rei();
	for(int i=0;i<M;i++){
		int v = rei()-1;
		int t = rei()-1;
		G[t].push_back(v);
		O[v]++;
	}
	stack<int> sp;
	for(int i=0;i<N;i++){
		if(O[i] == 0){
			sp.push(i);
		}
	}
	int ans = 0;
	while(!sp.empty()){
		int v = sp.top();
		ans = max(ans,DP[v]);
		sp.pop();
		for(int i=0;i<G[v].size();i++){
			O[G[v][i]]--;
			DP[G[v][i]] = max(DP[G[v][i]],DP[v]+1);
			if(O[G[v][i]] == 0){
				sp.push(G[v][i]);
			}
		}
	}
	cout << ans << endl;
}
int main(int argc,char** argv){
	ios::sync_with_stdio(false), cin.tie(0);
	cout.tie(0); Calc(); return 0;
}

Measured memory_bytes: 6528