akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<(b);i++)
#define erep(i,a,b) for(int i=a;i<=(int)(b);i++)
#define per(i,a,b) for(int i=(b)-1;i>(a);i--)
#define eper(i,a,b) for(int i=((int)(a));i>=b;i--)
#define pb push_back
#define mp make_pair
#define INF (1<<30)-1
#define MOD 1000000007
using namespace std;
typedef long long ll;
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
int gcd(int a,int b){return b?gcd(b,a%b):a;}

string a, b;
int main() {
 ios::sync_with_stdio ( false );
 cin.tie ( 0 );
    cin >> a >> b;
    a += b;
    int k = stoi(a);
    rep(i, 1, 110000) {
        if (k == i*i) {
            cout << "Yes" << endl;
            return 0;
        }
    }
    cout << "No" << endl;
    return 0;
}


Measured memory_bytes: 384
#include<bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mpr make_pair
#define mt make_tuple
 
using namespace std;
 
const ll N = 100010;
const ll mod = 1e9 + 7;
ll power(ll x, ll   y, ll p){ ll res = 1; x = x % p;while (y > 0){ if (y & 1) res = (res*x) % p; y = y>>1; x = (x*x) % p;} return res; }

ll dp[N];

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll n;
    ll arr[N];
    cin>>n;
    for(int i=0;i<n;i++)   cin>>arr[i];
    dp[0] = 0;
    dp[1] = abs(arr[1] - arr[0]);
    for(ll i=2;i<n;i++){
        dp[i] = min(dp[i-1] + abs(arr[i] - arr[i-1]), dp[i-2] + abs(arr[i] - arr[i-2]));
    }
    cout<<dp[n-1]<<endl;
    return 0;
}

Measured memory_bytes: 1792
#include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define mod 1000000007
#define inf 1e18
#define inp(arr,n) for(int i=0;i<n;i++) cin>>arr[i]
#define soa(arr,n) sort(arr,arr+n)
#define sov(arr) sort(arr.begin(),arr.end())
#define fr(i,a,b) for(int i=a;i<=b;i++)
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);
    int t=1;
    while(t--) {
        int n;
        cin>>n;
       cout<<(1-n)<<"\n";
    }
    return 0;
}

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

int main()
{
    string s;
    while(cin >> s){
        string t;
        t.reserve(100);
        for(int i = 0; i < s.size(); ++i){
            if(s[i] == '@'){
                for(int j = 0; j < s[i+1] - '0'; ++j) t.push_back(s[i+2]);
                i += 2;
            } else {
                t.push_back(s[i]);
            }
        }
        cout << t << endl;
    }
}

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

int main(){
	long long n;	cin>>n;
	n%=12;
	long long a,b;	cin>>a>>b;

	for(int i=0;i<n;i++){
		if(i%2==0)a=a-b;
		else b=a+b;

	}

	cout<<a<<" "<<b<<endl;
	return 0;
}



Measured memory_bytes: 3100
#include<bits/stdc++.h>
using namespace std;
#define mk make_pair
#define pb push_back
typedef pair<int, int> pii;
const int mod = 1000000007;
const int INF = 1000000009;
const long long INFL = 1000000000000000018ll;

int a, b, c;

signed main()
{
    cin >> a >> b >> c;
    cout << min(b / a, c) << endl;


    return 0;
}

/*

*/


Measured memory_bytes: 256
#include<bits/stdc++.h>
#define int long long
#define ll long long
#define maxN 1000005
#define rep(i,n) for(int i=0;i<n;i++)
#define refv(i,l,r) for(int i=l;i<r;i++)
#define rerv(i,l,r) for(int i=l;i>r;i--)
#define pi pair<ll,ll>
#define pii pair<ll,pair<ll,ll> >
int power(int x, unsigned int y){int res = 1;while (y > 0){ if (y & 1){res = res*x;} y = y>>1;x = x*x;}return res;}
int powermod(int x, unsigned int y, int p){int res = 1;x = x % p;while (y > 0){if (y & 1){res = (res*x) % p;}y = y>>1; x = (x*x) % p;}return res;}
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define inf 10000000000000
#define F first
#define S second
#define mod 1000000007
#define printvector(v) for(int i= 0;i<v.size();i++) {cout<<v[i]<<" ";} cout<<endl;
#define printset(s) for(auto it = s.begin();it!=S.end();it++){cout<<*it<<" ";} cout<<endl;
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;


/*__builtin_clz();
__builtin_ctz();
__builtin_popcount();*/

//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;

//#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
string convertupper(string s)
{
    transform(s.begin(), s.end(), s.begin(), ::toupper);
    return s;
}
string convertlower(string s)
{
    transform(s.begin(), s.end(), s.begin(), ::tolower);
    return s;
}

int fn(string s)
{
  int c=0;
  int i=0;
  int n=s.size();
  while(i<n-1){
    if(i<n-2 && s[i]==s[i+1] && s[i+1] == s[i+2])
    {
      c++;
      s[i+1]='.';
      i+=2;
    }
    else if(s[i]==s[i+1])
    {
      c++;
      if(i==0)
        s[i]='.';
      else
          s[i+1]='.';
      i+=2;
    }
    else
    {
      i++;
    }
  }
  return c;
}
int32_t main()
{
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    fastio;
    string s;
    cin>>s;
    string str=s;
    int k;
    cin>>k;
    int n=s.size();
    int i=0;
    if(n==1)
    {
      cout<<k/2<<endl;
      return 0;
    }
    if(n==2)
    {
      if(s[0]==s[1])
      {
        cout<<k<<endl;
      }
      else
        cout<<0<<endl;
      return 0;
    }

    //n=s.size();
    int c1=0,c2=0,c3=0;
    c1=fn(s);
    s+=str;
    c2=fn(s);
    s+=str;
    c3=fn(s);
    if(k==1)
    {
      cout<<c1<<endl;
      return 0;
    }
    if(k==2)
    {
      cout<<c2<<endl;
      return 0;
    }
    if(k==3)
    {
      cout<<c3<<endl;
      return 0;
    }
    int tt=c2-c1;

    int temp=c3-c2;
    cout<<c3+ tt*((k-3+1)/2) + temp*((k-3)/2)<<endl;
    return 0;
}


Measured memory_bytes: 256
#include<stdio.h>
#include<time.h>
 
#define MAX 100005 
 
typedef struct tq{
    char name[100];
    int time;
} s;
 
int head, tail, n;
s Q[MAX];
 
s dequeue()
{
    s t; 
    t = Q[head];
    head = (head + 1) % MAX;
    return t;
}
 
void enqueue(s x)
{
    Q[tail] = x;
    tail = (tail + 1) % MAX;
}
 
int main()
{
    int q, n, i, count;
    s x;
    //freopen("a.txt","r",stdin);
    //freopen("b.txt","w",stdout);
    scanf("%d", &n);
    count = n;
    scanf("%d", &q);
    for(i=0;i<n;i++)
    {
        scanf("%s", Q[i].name);
        scanf("%d", &Q[i].time);
        enqueue(Q[i]);
    }
    i = 0;
    while(head!=tail)
    {
        if(Q[head].time>q)
        {
            Q[head].time -= q;
            enqueue(dequeue());
            i += q;
        } 
        else
        {
            x = dequeue();
            i += x.time;
            printf("%s ", x.name);
            printf("%d\n", i);
        }
    }
    //printf("%lf\n",(double)clock()/CLOCKS_PER_SEC);
    return 0;
}

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

int main() {
	string s;
	cin >> s;
	long num = 0, ans = -100;
	for(int i = 0; i < s.size(); i++){
		if(s[i] == 'A' || s[i] == 'C' || s[i] == 'G' || s[i] == 'T'){
			num++;
		}else{
			num = 0;
		}
		ans = max(ans, num);
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 256
#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;

#define REP(i,n) for(long long i = 0; i < (n); i++)
#define FOR(i, m, n) for(long long i = (m);i < (n); ++i)
#define ALL(obj) (obj).begin(),(obj).end()

template<class T> using V = vector<T>;
template<class T, class U> using P = pair<T, U>;

const ll MOD = (ll)1e9 + 7;
const ll MOD2 = 998244353;
const ll LLINF = (ll)1e18;
const ll INTINF = (ll)1e9;
const long double PI = 3.1415926535897932384626433;

template <class T> void corner(bool flg, T hoge) {if (flg) {cout << hoge << endl; exit(0);}}
template <class T, class U>ostream &operator<<(ostream &o, const map<T, U>&obj) {o << "{"; for (auto &x : obj) o << " {" << x.first << " : " << x.second << "}" << ","; o << " }"; return o;}
template <class T>ostream &operator<<(ostream &o, const set<T>&obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr) o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
template <class T>ostream &operator<<(ostream &o, const vector<T>&obj) {o << "{"; for (int i = 0; i < (int)obj.size(); ++i)o << (i > 0 ? ", " : "") << obj[i]; o << "}"; return o;}
template <class T, class U>ostream &operator<<(ostream &o, const pair<T, U>&obj) {o << "{" << obj.first << ", " << obj.second << "}"; return o;}
template <template <class tmp>  class T, class U> ostream &operator<<(ostream &o, const T<U> &obj) {o << "{"; for (auto itr = obj.begin(); itr != obj.end(); ++itr)o << (itr != obj.begin() ? ", " : "") << *itr; o << "}"; return o;}
void print(void) {cout << endl;}
template <class Head> void print(Head&& head) {cout << head;print();}
template <class Head, class... Tail> void print(Head&& head, Tail&&... tail) {cout << head << " ";print(forward<Tail>(tail)...);}
template <class T> void chmax(T& a, const T b){a=max<T>(a,b);}
template <class T> void chmin(T& a, const T b){a=min<T>(a,b);}
void YN(bool flg) {cout << ((flg) ? "YES" : "NO") << endl;}
void Yn(bool flg) {cout << ((flg) ? "Yes" : "No") << endl;}
void yn(bool flg) {cout << ((flg) ? "yes" : "no") << endl;}

int main() {
	int N; cin >> N;
	string A,B,C;cin >> A >> B >> C;
	int ans = 0;
	REP(i,N){
		if(A[i]==B[i] && B[i]==C[i]) continue;
		else{
			if(A[i]==B[i] || B[i]==C[i] || C[i] == A[i]) ans+=1;
			else ans += 2;
		}
	}
	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 256
# -*- coding: utf-8 -*-

################ DANGER ################
test = ""
#test = \
"""
2 5 10
"""
########################################
test = list(reversed(test.strip().splitlines()))
if test:
    def input2():
        return test.pop()
else:
    def input2():
        return input()
########################################  
        
a, b, n = map(int, input2().split())

print(max(0, a-n), max(0, b-max(n-a, 0)))

Measured memory_bytes: 3060
<?php
$n = intval(fgets(STDIN));
$h = array_fill(0,10,array_fill(0,10,0));
for($i = 1; $i <= $n; $i++){
  $si = "$i";
  $top = $si[0];
  $bottom = $si[strlen($si)-1];
  $h[$top][$bottom]++;
}
$sum = 0;
for($i = 1; $i <= 9; $i++){
  for($j = 1; $j <= 9; $j++){
    $sum+=$h[$i][$j]*$h[$j][$i];
  }
}
echo $sum;

Measured memory_bytes: 4728
import sys
from collections import *
import heapq
import math
import bisect
from itertools import permutations,accumulate,combinations,product
from fractions import gcd
def input():
    return sys.stdin.readline()[:-1]
mod=10**9+7

n=input()
a=list(input().split())
a.sort()
for i in range(1,len(a)):
    if a[i]==a[i-1]:
        print("NO")
        quit()
print("YES")

Measured memory_bytes: 109292
#define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <cstdio>
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>
#include <cctype>
#include <utility>
 
using namespace std;
 
typedef long long ll;
typedef pair <int,int> P;
typedef pair <int,P > PP;
 
const int tx[] = {+0,+1,+0,-1};
const int ty[] = {-1,+0,+1,+0};
 
static const double EPS = 1e-8;

int main(){
  string str;
  while(cin >> str){
    if(str == "#") break;
    vector<string> elems;

    vector<char> ope;
    vector<int> nums;
    vector<int> ope_depth;

    int depth = 0; 
    for(int i = 0; i < str.size(); i++){
      if(str[i] == '+' || str[i] == '-' || str[i] == '/' || str[i] == '*'){
        ope.push_back(str[i]);
        ope_depth.push_back(depth);
      }
      else if(str[i] == '('){
        depth++;
      }
      else if(str[i] == ')'){
        depth--;
      }
      else if(isdigit(str[i])){
        int sum = 0;
        while(i < str.size() && isdigit(str[i])){
          sum *= 10;
          sum += str[i] - '0';
          i++;
        }
        nums.push_back(sum);
        i--;
      }
    }

    vector<int> order;
    for(int i = 0; i < ope.size(); i++){
      order.push_back(i);
    }
    
    set<int> res;
    vector<int> orig = nums;

    do {
      nums = orig;
      int min_depth = INF;
      bool used[12];
      memset(used,false,sizeof(used));
      for(int i = 0; i < order.size(); i++){
        if(min_depth < ope_depth[order[i]]){
          goto over;
        }
        min_depth = min(min_depth,ope_depth[order[i]]);
      }

      for(int i = 0; i < order.size(); i++){
        int ans = 0;
        if(ope[order[i]] == '+') ans = nums[order[i]] + nums[order[i]+1];
        else if(ope[order[i]] == '-') ans = nums[order[i]] - nums[order[i]+1];
        else if(ope[order[i]] == '*') ans = nums[order[i]] * nums[order[i]+1];

        else if(ope[order[i]] == '/'){
          if(nums[order[i]+1] == 0){
            goto over;
          }
          ans = nums[order[i]] / nums[order[i]+1];
        }

        for(int j = order[i] + 1; j <= order.size() ; j++){
          nums[j] = ans;
          if(!used[j]) break;
        }
        for(int j = order[i]; j >= 0; j--){
          nums[j] = ans;
          if(j == 0 || !used[j-1]) break;
        }
        used[order[i]] = true;
      }

      res.insert(nums[0]);
    over:;
    }while(next_permutation(order.begin(),order.end()));
    cout << res.size() << endl;
  }
}

Measured memory_bytes: 1244
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Scanner in = new Scanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        abc169_b solver = new abc169_b();
        solver.solve(1, in, out);
        out.close();
    }

    static class abc169_b {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int N = in.nextInt();
            long a[] = new long[N];
            for (int i = 0; i < N; i++) {
                long by = in.nextLong();
                if (by == 0) {
                    if (by == 0) {
                        out.println(0);
                        return;
                    }
                } else {
                    a[i] = by;
                }
            }
        /*
        BigInteger multi = new BigInteger(0);
        long max = 1000000000000000000l;
        if (multi.compareTo(BigInteger.valueOf(0)) ==0) {
            out.println(0);
            return;
        }
        */
            long wkval = 1;
            for (int i = 0; i < N; i++) {
                if (a[i] == 1) {
                    continue;
                }
                if (a[i] <= (1000000000000000000l / wkval)) {
                    wkval *= a[i];
                } else {
                    out.println(-1);
                    return;
                }
            /*
            if (multi.compareTo(BigInteger.valueOf(1000000000000000000l/multi.longValue())) ==1) {
                out.println(-1);
                return;
            }
            multi =multi.multiply(BigInteger.valueOf(by));
            */
            }
            out.println(wkval);
        }

    }
}



Measured memory_bytes: 61416
from collections import Counter


def main():
    N = int(input())
    A = list(map(int, input().split()))

    C = Counter(A)
    A.sort()
    Amax = A[-1]
    Amin = A[0]

    if Amax == Amin == 1:
        return N == 2
    if Amax % 2 == 0:
        if (Amax // 2) != Amin:
            return False
        if C[Amin] != 1:
            return False
        for a in range(Amin + 1, Amax + 1):
            if C[a] < 2:
                return False
    else:
        if (Amax + 1) // 2 != Amin:
            return False
        if C[Amin] != 2:
            return False
        for a in range(Amin + 1, Amax + 1):
            if C[a] < 2:
                return False
    return True


if main():
    print("Possible")
else:
    print("Impossible")

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

int main(){
    int n ;
    cin >> n;
    int cntr = 0;
    for(int i=9; i>1; i--){
        if(cntr == 2){
            break;
        }
        while(n%i == 0){
            n/= i;
            cntr++;
            if(cntr == 2){
            break;
        }
        }
    }
    if(n==1){
        cout << "Yes";
    }else{
        cout << "No";
    }
    return 0;
}

Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int D = sc.nextInt();
    int N = sc.nextInt();
    int scale = 1;
    if (D == 1) {
      scale = 100;
    } else if (D == 2) {
      scale = 10000;
    }
    if (N == 100) {
      N = 101;
    }
    int ans = scale * N;
    System.out.println(ans);
  }

  private static final long MOD = 998244353;
  private static long FACT[];
  private static long IFACT[];

  // Pre-calculate factorial and its mod_inverse for calculate nCr in O(1)
  private static void create_fact(int N) {
    FACT = new long[N+1];
    IFACT = new long[N+1];
    FACT[0] = 1;
    IFACT[0] = 1;
    for (int i=1; i<=N; i++) {
      FACT[i] = FACT[i-1] * i % MOD;
      IFACT[i] = mod_inverse(FACT[i]);
    }
  }

  // Return nCr
  private static long comb(int n, int r) {
    if (n < 0 || r < 0 || n < r) {
      return 0;
    }
    if (r > n/2) {
      r = n - r;
    }
    return FACT[n]*IFACT[n-r]%MOD*IFACT[r]%MOD;
  }

  // Fast mod inverse
  private static long mod_inverse(long a) {
    long b = MOD;
    long p = 1, q = 0;
    while (b > 0) {
      long c = a / b;
      long d;
      d = a;
      a = b;
      b = d % b;
      d = p;
      p = q;
      q = d - c * q;
    }
    return p < 0 ? p + MOD : p;
  }
}


Measured memory_bytes: 21972
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, ll> pii;
#define FastIO ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define forn(i, n) for (int i = 0; i < n; ++i)
#define forn1(i, n) for (int i = 1; i <= n; ++i)
#define pb push_back
#define fr first
#define sc second
const int MAXN = 2e4 + 10;
const int INF = 1e9;

//#define DEBUG

int main(){
  FastIO;
  #ifdef DEBUG
    freopen("input.txt", "r", stdin);
  #endif
  ll a, b;
  ll n;
  cin >> n;
  vector<ll> gg(n);
  ll sum = 0;
  forn(i, n)
  {
    cin >> gg[i];
    sum += gg[i];
  }
  ll sum2 = 0;
  ll ans = 1e18;
  for (int i = 0; i < n - 1; ++i)
  {
    sum2 += gg[i];
    sum -= gg[i];
    ans = min(ans, abs(sum2 - sum));
  }
  cout << ans << "\n";
  return 0;
}


Measured memory_bytes: 1792
#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<n; ++i)
#define rep1(i, n) for (int i=1; i<=n; ++i)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
constexpr ll  MOD = (1e9+7);
constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
ll factorial(ll n, ll m=2) {
    // calculate n!
    m = max(2LL, m);
    ll rtn = 1;
    for (ll i=m; i<=n; i++) {
        rtn = (rtn * i) % MOD;
    }
    return rtn;
}
ll modinv(ll a, ll m) {
    ll b = m, u = 1, v = 0;
    while (b) {
        ll t = a / b;
        a -= t * b;
        swap(a, b);
        u -= t * v;
        swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}
ll modpow(ll a, ll n) {
    ll res = 1;
    while (n > 0) {
        if (n & 1)
            res = res * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return res;
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n, a, b; cin >> n >> a >> b;
    string s; cin >> s;
    int all = 0, kaigai = 0;
    // for (int i=0; i<(int)s.size(); ++i) mp[s[i]]++;
    for (int i=0; i<(int)s.size(); ++i) {
        if (s[i]=='c') puts("No");
        else if (s[i] == 'a') {
            (all < a+b) ? puts("Yes"), all++ : puts("No");
        } else if (s[i] == 'b') {
            (all < a+b && kaigai < b) ? puts("Yes"), all++, kaigai++ : puts("No");
        }
    }
    return 0;
}

Measured memory_bytes: 848
using System;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;

class Program
{
    const string Yes = "Yes";
    const string No = "No";
    const char White = '.';
    const char Black = '#';
    const long Mod = 1000000007;

    static void Main(string[] args) {
#if DEBUG
        MyDebugger.Test(process, "../TextFile1.txt");
#else
        object ret = process(new StreamReader(Console.OpenStandardInput()));
        Console.WriteLine(ret);
#endif
    }

    static Dictionary<int, int> dic;

    static object process(TextReader input) {
        var n = int.Parse(input.ReadLine());

        dic = new Dictionary<int ,int>();
        //dic.Add(1,1);

        for(int i=2; i<=n; i++) {
            PrimeFact(i);
        }

        long y = 1;
        foreach(var x in dic) {
            y *= (x.Value+1);
            y %= Mod;
        }

        return y;

        //6 5 4 3 2 1
        // 3 2  5  2 2  3  2  1
    }

    static long ModPow(long x1, long x2) {
        long ans = 1;
        while (x2 > 0) {
            if (x2 % 2 == 1) {
                ans = (ans * x1) % Mod;
            }
            x1 = (x1 * x1) % Mod;
            x2 /= 2;
        }
        return ans % Mod;
    }

    static long ModDiv(long x1, long x2) {
        long bb = ModPow(x2, Mod - 2);
        return (x1 * bb) % Mod;
    }

    static long ModCombination(long m, long n) {
        var a = 1L;
        var b = 1L;
        for (long i = 1; i <= n; i++) {
            a = (a * (m - i + 1)) % Mod;
            b = (b * i) % Mod;
        }

        return ModDiv(a, b) % Mod;
    }

    static List<long> PrimeFact(long n) {
        //var list = new List<long>();

        for (long i = 2; i <= Math.Sqrt(n); i++) {
            if (n % i == 0) {
                //list.Add(i);
                int c = 0;
                while (n % i == 0) {
                    n /= i;
                    c++;
                }
                Add((int)i, c);
            }
        }
        //if (n > 1) list.Add(n);
        if (n > 1) Add((int)n, 1);
        return null;
    }

    static void Add(int i, int c) {
        if(dic.ContainsKey(i)) dic[i]+=c;
        else dic[i] = c;
    }

    static int[] ToIntArray(string strs, int n) {
        var ret = new int[n];
        var spl = strs.Split(' ');
        for (int i = 0; i < n; i++)
            ret[i] = int.Parse(spl[i]);
        return ret;
    }
}


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

int main() {
    int n;
    cin >> n;
    vector<int> a(n);
    multiset<int, greater<int>> s;
    for(int i = 0; i < n; ++i) {
        cin >> a[i];
        s.insert(a[i]);
    }

    double ans = 0;
    for(int i = 0; i < n; ++i) {
        for(int j = i + 1; j < n; ++j) {
            s.erase(a[i]);
            s.erase(a[j]);
            double x = abs(a[i] - a[j]);
            double y = *s.begin() + *(next(s.begin()));
            s.insert(a[i]);
            s.insert(a[j]);
            ans = max(ans, y / x);
        }
    }

    cout << fixed << setprecision(10) << ans << endl;
}



Measured memory_bytes: 3324
#include <bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define all(x) (x).begin(),(x).end()

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

const int INF = 1001001001;
const vector<int> di = {-1,  0, 1, 0};
const vector<int> dj = { 0, -1, 0, 1};

void chmin(int &a, int b) { if (a > b) a = b; }

ll GCD(ll a, ll b) {
    if (b == 0) return a;
    else return GCD(b, a % b);
}
ll LCM(ll a, ll b) { return a * b / GCD(a, b); }


int main(){
    int n;
    ll T;
    cin >> n >> T;
    vector<ll> t(n);
    rep(i, n) cin >> t[i];

    ll sum = 0;
    for (int i=0;i<n-1;++i) {
        sum += min(T, t[i + 1] - t[i]);
    }
    sum += T;

    cout << sum << endl;
}

Measured memory_bytes: 1792
import sys
import math
import collections
from collections import deque
from functools import reduce
import heapq
#x = int(input())
#n, m, q = map(int, sys.stdin.readline().split())
s = input()
#a = list(map(int, sys.stdin.readline().split()))

if s == "ABC":
    print("ARC")
else:
    print("ABC")


Measured memory_bytes: 9504
# -*- coding: utf-8 -*-
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
X = int(readline())
a = 2000
for i in range(1,9):
    if (a-200)<=X<a:
        print(i)
        sys.exit()
    a -= 200

Measured memory_bytes: 9164
// #include <bits/stdc++.h>
#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;

typedef long long ll;
typedef long double ld;

#define alpha ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define ff first
#define ss second
#define fr(i,a,b) for(ll i=a; i<b; i++)
#define fr1(i,a,b) for(ll i=a; i>=b; i--)
#define input(arr,n) fr(i,0,n) cin>>arr[i]
#define output(arr,n) fr(i,0,n) cout<<arr[i]<<" "
#define min3(a, b, c) min(a,min(b, c))
#define min4(a, b, c, d) min(a, min(b, min(c, d)))
#define max3(a, b, c) max(a,max(b, c))
#define max4(a, b, c, d) max(a, max(b, max(c, d)))
#define vi vector<ll>
#define vii vector<pair<ll, ll> >
#define fixd(x) cout<<fixed<<setprecision(x);

#define dbg(args ...) cerr << __LINE__ << ": ", err(new istringstream(string(#args)), args), cerr << '\n'
void err(istringstream *iss) {}
template<typename T, typename ... Args> void err(istringstream *iss, const T &_val, const Args & ... args) {
    string _name;
    *iss >> _name;
    if (_name.back()==',') _name.pop_back();
    cerr << _name << " = " << _val << "; ", err(iss, args ...);
}

const ld PI = acosl(-1.0);

//"Focus" on constraints.


void solve(){
	ll a;
	cin>>a;
	ll ans=a+a*a+a*a*a;
	cout<<ans<<"\n";
}

int main(){
	alpha

	ll t=1;
	// cin>>t;
	while(t--){
		solve();
	}
	return 0;
}

Measured memory_bytes: 3188
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define light ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
#define endl "\n"
#define pb push_back
#define F first
#define S second
#define lb lower_bound
#define ub upper_bound
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define REP(i,a,b) for(ll i = a; i < b; i++)
#define REPE(i,a,b) for(ll i = a; i <= b; i++)
#define REPR(i,a,b) for(ll i = a; i >= b; i--)
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a * b) / gcd(a, b)
#define bins(v, x) binary_search(v.begin(), v.end(), x)
const double pi = 2*acos(0.0);
const int INF = 1e9+1;
const int MOD = 1e9+7;
const int MOD1 = 998244353;

using ll = long long;
using ld = long double;
using vi = vector<int>;

#define oset tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>
#define osetll tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update>
//member functions :
//1. order_of_key(k) : number of elements strictly lesser than k
//2. find_by_order(k) : k-th element in the set
 
ll modExp(ll base, ll exp, ll mod) {
   ll res = 1;
   while (exp > 0) {
    	if (exp % 2 == 1) {
        	res= (res * base) % mod;
		}
      exp = exp >> 1;
      base = (base * base) % mod;
   }
   return res;
}

ll inverse(ll base, ll exp, ll mod) {
   return modExp(base, exp - 2, mod);
}

bool compare(const pair<int,int> &i, const pair<int,int> &j) {
   return (i.S > j.S || (i.S == j.S && i.F > j.F));
}

void test() {
	float d, t, s;
   cin >> d >> t >> s;

   if(d/s <= t) cout << "Yes";
   else cout << "No";
}

int main() {
   //freopen("input.txt","r",stdin);
   //freopen("output.txt","w",stdout);
   light;
   cout.precision(15);
   cout << fixed;

   int t = 1;
   //cin >> t;
   for(int i = 1; i <= t; i++) {
      //cout << "Case #" << i << ": ";
      test();
   }
   return 0;
}


Measured memory_bytes: 3728
#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0;i < (n);++i)
#define reps(i,n) for(int i = 1;i <= (n);++i)
using namespace std;
int cnt[1000];
int main(){
  int a,b,c;
  cin >> a >> b >> c;
  if(a == b) cout << c << '\n';
  else if(a == c) cout << b << '\n';
  else cout << a << '\n';
  return 0;
}

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

int main() {
  long long A,B,C,K;
  cin >> A >> B >> C >> K;
    int N = A - B;
  
  if (K % 2 == 0){
    cout << N << endl;
  }
  else {
    cout << N * (-1) << endl;
  }
}
  
  

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

#define pb push_back

vector<int>g[100003];
vector<int>v(100003);
queue<int>q;

int main()
{
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    int rem = d;
    int ans = 0;
    ans += min(a,d);
    rem = d-a;
    if(rem>0)
    {
        rem = rem - b;
    }
    if(rem>0)
    {
        ans-=rem;
    }
    cout<<ans<<endl;

}



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

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define each(it,v) for(auto &it : v)
#define mod 1000000007
#define all(v) (v).begin(),(v).end()
#define vi vector<int>
#define vl vector<long>
#define P pair<int,int>
using namespace std;

main()
{
        int a,b; cin>>a>>b;
        if(a==2||b==2)
        {
                cout<<"No"<<endl;
                return 0;
        }
        set<int> s;
        s.insert(4);
        s.insert(6);
        s.insert(9);
        s.insert(11);

        if(s.count(a)==s.count(b))cout<<"Yes"<<endl;
        else cout<<"No"<<endl;
}

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

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

#define rep(i, n) for(int i = 0; i < (n); i++)
#define repto(i, n) for(int i = 0; i <= (n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end())
#define _1 first
#define _2 second
#define pb push_back
#define mp make_pair
#define INF 1145141919
#define MOD 1000000007
#define DEBUG(x) cout << #x << ": " << x << endl;
template<typename T> T gcd(T a, T b) { if (b == 0) return a; return gcd(b, a % b); }

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

  int N;
  cin >> N;
  vector<int> B(N-1);
  rep(i, N-1) {
    cin >> B[i];
  }
  int sum = 0;
  sum += B[0];
  sum += B[N-2];
  rep(i, N-2) {
    sum +=  min(B[i], B[i+1]);
  }
  cout << sum << endl;
}


Measured memory_bytes: 256
from collections import Counter
S = input()
work = sorted(list(Counter(S).values()), reverse=True)
a = work[0]
b = work[1] if len(work)>1 else 0
c = work[2] if len(work)>2 else 0
result = "YES"
if (a > b + 1 or a > c + 1):
    result = "NO"
print(result)

Measured memory_bytes: 3564
#include <iostream>
#include <vector>

using namespace std;

int insertion_sort(int xs[], int n, int g){
    int cnt = 0;
    for(int i = g; i < n; ++i){
        //int v = xs[i];
        for(int j = i-g; j >= 0 && xs[j+g] < xs[j]; j-=g){
            ++cnt;
            swap(xs[j+g], xs[j]);
        }
    }
    return cnt;
}

vector<int> gen_g(int n){
    auto vec = vector<int> {};
    while(n > 1){
        n /= 2;
        vec.push_back(n);
    }
    if(!vec.size()) vec.push_back(1);
    return vec;
}

int shell_sort(int xs[], int n, vector<int> g){
    int cnt = 0;
    vector<int>::iterator it;
    for(it = g.begin(); it != g.end(); ++it){
        cnt += insertion_sort(xs, n, *it);
    }
    return cnt;
}

template <class T>
void print_array(T xs[], int n){
    for(int i = 0; i < n; ++i){
        cout << xs[i] << '\n';
    }
}

void print_vector(vector<int> vec){
    vector<int>::iterator it;
    for(it = vec.begin(); it != vec.end(); ++it){
        if(it != vec.begin()) cout << ' ';
        cout << *it;
    }
    cout << '\n';
}

int main(){
    int n;
    cin >> n;
    int xs[n];
    for(int i = 0; i < n; ++i){
        cin >> xs[i];
    }
    vector<int> g = gen_g(n);
    int cnt = shell_sort(xs, n, g);

    cout << g.size() << '\n';
    print_vector(g);
    cout << cnt << '\n';
    print_array(xs, n);
}

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

const long long INF = 1LL << 60;

int N;
long long h[100010];
long long dp[100010];

long long rec(int i) {
    //dp計算済み
    if (dp[i] < INF) {
        return dp[i];
    }
    //足場0のコストは0
    if (i == 0) {
        return 0;
    }

    //再帰の本体
    long long res = INF;
    if (i > 1) {
        res = min(rec(i-1) + abs(h[i] - h[i-1]),
                  rec(i-2) + abs(h[i] - h[i-2]));
    } else {
        res = rec(i-1) + abs(h[i] - h[i-1]);
    }

    //結果をメモしながら返す
    return dp[i] = res;
}

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

    for (int i = 0; i < 100010; ++i) {
        dp[i] = INF;
    }

    cout << rec(N-1) << endl;
    /*   
    for (int i = 0; i < N; ++i) {
        printf("dp[%d]=%lld ", i, dp[i]);
    }
    cout << endl;
    */

    return 0;
}

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

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

  int LCM = lcm(x, 360);
  cout << LCM / x << '\n';

}

Measured memory_bytes: 3612
import bisect
N,K=map(int,input().split())
A=list(map(int,input().split()))

data=[]
for i in range(N):
    now=0
    for j in range(i,N):
        now+=A[j]
        data.append(now)
data.sort()
ans=0
for i in range(40,-1,-1):
    s=pow(2,i)
    idx=bisect.bisect_left(data,s)
    if len(data)-idx>=K:
        ans+=s
        data=[d-s for d in data[idx:]]
    else:
        data=[d for d in data[:idx]]+[d-s for d in data[idx:]]
        data.sort()
print(ans)

Measured memory_bytes: 39976
import java.util.Scanner

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    val a = scanner.nextInt()
    val b = scanner.nextInt()
    val c = scanner.nextInt()

    if (c <= a + b){
        println("Yes")
    }
    else{
        println("No")
    }
}

Measured memory_bytes: 31384
import sys
from collections import deque
input = sys.stdin.readline
H, W = map(int, input().split())
G = [[0]*(H*W) for _ in range(H*W)]
edge = []
S = [list(input()) for i in range(H)]
for i in range(H*W) :
    h = i//W
    w = i%W
    if S[h][w] != "#" :
        if h > 1 and S[h-1][w] == "." :
            j = (h-1)*W + w
            edge.append([i, j])
            G[i][j] = G[j][i] = 1
        if h < H-1 and S[h+1][w] == "." :
            j = (h+1)*W + w
            edge.append([i, j])
            G[i][j] = G[j][i] = 1
        if w > 1 and S[h][w-1] == "." :
            j = h*W + w-1
            edge.append([i, j])
            G[i][j] = G[j][i] = 1
        if w < W-1 and S[h][w+1] == "." :
            j = h*W + w+1
            edge.append([i, j])
            G[i][j] = G[j][i] = 1

def bfs(s) :
    q = deque([s])
    dist[s] = 0
    while q :
        now = q.popleft()
        for i in range(H*W) :
            if G[now][i] == 1 :
                if dist[i] != -1 :
                    continue
                else :
                    dist[i] = dist[now] + 1
                    q.append(i)
    return max(dist)

ans = 0
for i in range(H*W) :
    if S[i//W][i%W] != "#" :
        dist = [-1 for _ in range(H*W)]
        ans = max(ans, bfs(i))

print(ans)


Measured memory_bytes: 44652
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pii pair<int,int>
#define piii pair<int,pii>
#define pll pair<ll,ll>
#define plii pair<ll,pii>
#define vi vector<int>
#define ff first
#define ss second
#define mp make_pair
#define pb push_back
#define SORT(x) sort(x.begin(), x.end())
#define GSORT(x) sort(x.begin(), x.end(), greater<int>())
#define mx 100001
#define eps 0.00000000001
#define mod 1000000007
#define pi acos(-1)
#define inf 100000000
#define loop(i,b,n) for(int i=b;i<n;++i)
#define rev_loop(i,b,n) for(int i=b;i>=n;--i)
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;
int main()
{
    fio;
    int n;
    cin>>n;
    int p = n/1000;
    if(n%1000==0)
        cout<<"0\n";
    else
    {
        int r = 1000 * (p+1);
        cout<<r-n<<endl;
    }
    return 0;
}


Measured memory_bytes: 3636
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define stoi stoll
using ll=long long;
using vi=vector<int>;
using pii=pair<int,int>;
#define ALL(c) begin(c),end(c)
#define RALL(c) rbegin(c),rend(c)
#define ITR(i,b,e) for(auto i=(b);i!=(e);++i)
#define FORE(x,c) for(auto &&x:c)
#define REPF(i,a,n) for(int i=a,i##len=(int)(n);i<i##len;++i)
#define REP(i,n) REPF(i,0,n)
#define REPR(i,n) for(int i=(int)(n);i>=0;--i)
#define SZ(c) ((int)c.size())
#define CONTAIN(c,x) (c.find(x)!=end(c))
#define INSEG(l,x,r) ((l)<=(x)&&(x)<(r))
#define dump(...)
#define pb push_back
#define _ 0
const signed INF_=1001001001; const long long INF=1001001001001001001LL;
const int DX[9]={0,1,0,-1,1,1,-1,-1,0},DY[9]={-1,0,1,0,-1,1,1,-1,0};
template<class T> ostream& operator<<(ostream &os,const vector<T> &v) {
    ITR(i,begin(v),end(v))os<<*i<<(i==end(v)-1?"":" ");return os;}
template<class T> istream& operator>>(istream &is,vector<T> &v) {
    ITR(i,begin(v),end(v)) is>>*i;return is;}
template<class T,class U> istream& operator>>(istream &is, pair<T,U> &p) {
    is>>p.first>>p.second;return is;}
template<class T, class U> bool chmax(T &a,const U &b){return a<b?a=b,1:0;}
template<class T, class U> bool chmin(T &a,const U &b){return a>b?a=b,1:0;}
template <class T> void PSUM(T& c) {partial_sum(begin(c), end(c), begin(c));}
template<class T> using heap=priority_queue<T,vector<T>,greater<T>>;
struct before_main_function {
    before_main_function() {
        cin.tie(0); ios::sync_with_stdio(false);
        cout << setprecision(15) << fixed;
        #define endl "\n"
    }
} before_main_function;
//------------------8<------------------------------------8<--------------------

signed main() {
    int N, K;
    cin >> N >> K;
    cout << (N >= K * 2 - 1 ? "YES" : "NO") << endl;
    return (0^_^0);
}



Measured memory_bytes: 256
import java.io.*;

 public class Main{
	 public static void main(String args[]) throws IOException{
		 BufferedReader bf = new BufferedReader(
				 new InputStreamReader(System.in));
		 double radian,r,x = 0,y = 0;
		 int t = 90;
		 String str;
		 while(true){
			 str = bf.readLine();
			 if(str.equals("0,0")) break;
			 String[] deta = str.split(",",0);
			 r = Integer.parseInt(deta[0]);
			 radian = t*Math.PI/180d;
			 t += -Integer.parseInt(deta[1]);
			 x += r*Math.cos(radian);
			 y += r*Math.sin(radian);
		 }
		 System.out.println((int)x);
		 System.out.println((int)y);

	 }
}

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

using namespace std;

#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define fin(ans) cout << (ans) << endl;
#define blank(ans) cout << (ans) << " ";
#define mp(p, q) make_pair(p, q)
#define mt(p, q, r) make_tuple(p, q, r)
#define pb(n) push_back(n)
#define all(a) a.begin(), a.end()

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

typedef vector<ll> vll;
typedef vector<ld> vd;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<str> vs;
typedef vector<vector<ll>> vvll;
typedef vector<vector<ld>> vvd;
typedef vector<vector<char>> vvc;
typedef vector<vector<str>> vvs;
typedef vector<pair<ll, ll>> vpll;
typedef vector<tuple<ll, ll, ll>> vtlll;

const ld PI = acos(-1.0);
const ll MAX = 9000000000000000000;
const ll MIN = -9000000000000000000;
const ld DMAX = 4500;
const ld DMIN = -4500;
const ll MOD = 1000000007;

//実行部
void Main()
{
  ll n, a, b; cin >> n >> a >> b;
  str s; cin >> s;
  ll S = 0;
  ll K = 0;
  for(ll i = 0;i < n;i++)
  {
    if(s[i] == 'a')
    {
      if(S < a + b)
      {
        S++; 
        fin("Yes")
        continue;
      }
    }
    else if(s[i] == 'b')
    {
      if(S < a + b&&K < b)
      {
        S++;
        K++;
        fin("Yes")
        continue;
      }
    }
    fin("No")
  }
}

//前処理
int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(20); //高精度少数表示
  Main();
  return 0;
}

/*
//test時
  g++ test.cpp -o test;./test
*/


Measured memory_bytes: 848
package main

import (
	"fmt"
	"math"
)

func main() {
	var A, B, H, M int
	fmt.Scanf("%d %d %d %d", &A, &B, &H, &M)

	PI := 3.14159265358979323846
	var angA, angB float64
	angA = float64(2) * PI / 12 * (float64(H) + float64(M)/60)
	angB = 2 * PI / 60 * float64(M)

	ax := float64(A) * math.Sin(angA)
	ay := float64(A) * math.Cos(angA)
	bx := float64(B) * math.Sin(angB)
	by := float64(B) * math.Cos(angB)
	dist := math.Sqrt((ax-bx)*(ax-bx) + (ay-by)*(ay-by))
	fmt.Println(dist)
}


Measured memory_bytes: 1824
#include <bits/stdc++.h> 
using namespace std;
#define rep(i, n) for(ll i=0; i<n; i++)
#define all(vec) vec.begin(), vec.end()
typedef long long ll;ll MM = 1000000000;ll mod = MM + 7;
ll GCD(ll x, ll y) {
    if (y == 0) return x;
    else return GCD(y, x % y);
}
ll LCM(ll x, ll y) { 
  return x / GCD(x, y) * y;
}

int main(){
  int n; cin >> n;
  vector<ll> h(n);
  rep(i, n) cin >> h[i];

  int ans = 0;
  int i = 0;
  while(i<n) {
    int j = i, can = 0;
    while(j<n-1) {
      if(h[j] < h[j+1]) break;
      else {
        can++;
        j++;
       // cout << j << endl;
      }
    }
    ans = max(ans, can);
    i += can + 1;
  }

  cout << ans << endl;
}


Measured memory_bytes: 1024
#include<bits/stdc++.h>
#include<iomanip>
using namespace std;
typedef long long ll;
typedef long  l;
typedef pair<int,int> P;
#define rep(i,n) for(int i=0;i<n;i++)
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(),A.end()
const double PI=3.14159265358979;
const int INF=1000000007;
const ll LMAX=1000000000000000001;
const ll mod=1000000007;
ll gcd(ll a,ll b){if(a<b)swap(a,b);while((a%b)!=0){a=b;b=a%b;}return b;}
int dx[]={-1,0,1,0};
int dy[]={0,1,0,-1};

int main(){
  int h,a; cin>>h>>a;
  if(h%a==0)
  cout<<h/a<<endl;
  else
  cout<<h/a+1<<endl;

  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (int i = (a); i < int(b); ++i)
#define RFOR(i, a, b) for (int i = (b)-1; i >= int(a); --i)
#define rep(i, n) FOR(i, 0, n)
#define rep1(i, n) FOR(i, 1, int(n) + 1)
#define rrep(i, n) RFOR(i, 0, n)
#define rrep1(i, n) RFOR(i, 1, int(n) + 1)
#define all(c) begin(c), end(c)
const int MOD = 1000000007;

template <typename T>
void __dump__(std::ostream &os, const T &first) {
    os << first;
}
template <typename First, typename... Rest>
void __dump__(std::ostream &os, const First &first, const Rest &... rest) {
    os << first << ", ";
    __dump__(os, rest...);
}
#define dump(...)                                         \
    do {                                                  \
        std::ostringstream os;                            \
        os << __LINE__ << ":\t" << #__VA_ARGS__ << " = "; \
        __dump__(os, __VA_ARGS__);                        \
        std::cerr << os.str() << std::endl;               \
    } while (0)


string s, t;
int a1[100010], b1[100010];
int a2[100010], b2[100010];

int calc(int *a, int *b, int l, int r) {
    int x = 0;
    x += a[r] - a[l];
    x += (b[r] - b[l]) * 2;
    return x % 3;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    while (cin >> s >> t) {
        int n = s.size();
        int m = s.size();

        a1[0] = b1[0] = 0;
        rep(i, n) {
            a1[i+1] = a1[i] + (s[i] == 'A');
            b1[i+1] = b1[i] + (s[i] == 'B');
        }
        a2[0] = b2[0] = 0;
        rep(i, m) {
            a2[i+1] = a2[i] + (t[i] == 'A');
            b2[i+1] = b2[i] + (t[i] == 'B');
        }

        int q;
        cin >> q;
        rep(i, q) {
            int a, b, c, d;
            cin >> a >> b >> c >> d;
            --a; --c;
            int x = calc(a1, b1, a, b);
            int y = calc(a2, b2, c, d);
            puts(x == y ? "YES" : "NO");
        }
    }
}


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

static const int MAXN = 16;
bool vis[MAXN];
int Judge(int x)
{
    if(1 <= x && x <= 399)
        return 1;
    if(400 <= x && x <= 799)
        return 2;
    if(800 <= x && x <= 1199)
        return 3;
    if(1200 <= x && x <= 1599)
        return 4;
    if(1600 <= x && x <= 1999)
        return 5;
    if(2000 <= x && x <= 2399)
        return 6;
    if(2400 <= x && x <= 2799)
        return 7;
    if(2800 <= x && x <= 3199)
        return 8;
    return 9;
}

int n;int dif;int big;

int main()
{
    scanf("%d" , &n);
    for(int i = 1 ; i <= n ; ++i)
    {
        int a;
        scanf("%d" , &a);
        a = Judge(a);
        if(a == 9)
            ++big;
        else
        {
            if(!vis[a])
            {
                ++dif;
                vis[a] = 1;
            }
        }
    }

    if(dif == 0)
        printf("1");
    else
        printf("%d" , dif);

    printf(" ");
    printf("%d" , dif + big);
}


Measured memory_bytes: 256
n = int(input())
s = list(map(int, input().split()))
q = int(input())
t = list(map(int, input().split()))

count = 0
for item in t:
    middle = int((n - 1) / 2)
    upper = n - 1
    lower = 0
    while(True):
        if s[middle] == item:
            count += 1
            break
        elif lower >= upper:
            break
        elif s[middle] > item:
            upper = middle
            middle = int((lower + lower) / 2)
        elif s[middle] < item:
            lower = middle + 1
            middle = int((upper + lower) / 2)

print(count)

Measured memory_bytes: 18596
/*
Hanit Banga
*/

#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

#define pb push_back
#define fast_cin() ios_base::sync_with_stdio(false)

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

const int N = 3e5 + 5;

int a[N], sz[N];
bool seen[N] = {0};
vector <int> g[N];

int find_size(int x);

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

	for (int i = 2; i <= n; ++i)
	{
		cin >> a[i];	
		g[a[i]].pb(i);
	}

	cout << find_size(1);
}

int find_size(int x)
{
	vector <int> temp;
	for (auto &i : g[x])
		temp.pb(find_size(i));

	sort(temp.begin(), temp.end());
	int ans = 0, j = temp.size();
	for (auto &i : temp)
	{
		ans = max(ans, j + i);
		--j;
	}

	return ans;
}

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

int c[128];

void init(){
  c['I'] = 1;   c['V'] = 5;   c['X'] = 10;   c['L'] = 50; 
  c['C'] = 100; c['D'] = 500; c['M'] = 1000;
}

int main(){
  string str;

  init();

  while(cin >> str){
    int sum = 0;
   
    for(int i = 0 ; i < str.size()-1 ; i++){
      sum += c[str[i]]*((c[str[i]] < c[str[i+1]]) ? -1 : 1);
    }
    sum += c[str[str.size()-1]];

    cout << sum << endl;
  }

  return 0;
}

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

int main() {
	int n;
	cin >> n;
	int a[n];
    vector<int> dp(n,0);
	for(int i=0;i<n;i++)
	    cin>>a[i];
	dp[0] = 0;
	if(n == 1) {
	    cout<<"0"<<endl;
	    return 0;
	}
	dp[1] = abs(a[0] - a[1]);
	for(int i=2;i<n;i++){
	    dp[i] = min(dp[i-1]+abs(a[i] - a[i-1]),dp[i-2]+abs(a[i] - a[i-2]));
	}
	cout<< dp[n-1];
	return 0;
}


Measured memory_bytes: 1024