akhauriyash/Code-Regression huggingface dataset:
//#pragma GCC target("avx2")
//#pragma GCC optimize("O3")

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

//# include <ext/pb_ds/assoc_container.hpp>
//# include <ext/pb_ds/tree_policy.hpp>

//using namespace __gnu_pbds;
using namespace std;
 
//template<typename T> using ordered_set = tree <T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define _USE_MATH_DEFINES_
#define ll long long
#define ld long double
#define Accepted 0
#define pb push_back
#define mp make_pair
#define sz(x) (int)(x.size())
#define every(x) x.begin(),x.end()
#define F first
#define S second
#define lb lower_bound
#define ub upper_bound
#define For(i,x,y)  for (ll i = x; i <= y; i ++) 
#define FOr(i,x,y)  for (ll i = x; i >= y; i --)
#define SpeedForce ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
// ROAD to...                                                                                                                                                                                                                Red

inline void Input_Output () {
	//freopen(".in", "r", stdin);
   //freopen(".out", "w", stdout);
}

const double eps = 0.000001;
const ld pi = acos(-1);
const int maxn = 1e7 + 9;
const int mod = 1e9 + 7;
const ll MOD = 1e18 + 9;
const ll INF = 1e18 + 123;
const int inf = 2e9 + 11;
const int mxn = 1e6 + 9;
const int N = 6e5 + 123;                                          
const int M = 22;
const int pri = 997;
const int Magic = 2101;

const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
 
//	mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//	shuffle(permutation.begin(), permutation.end(), rng);
ll n;
bool check (ll x) {
	ll m = n;
	while(m%x == 0) {
		m /= x;
	}
	if(m%x == 1) return 1;
	return 0;
}

int main () {
	SpeedForce;

	cin >> n;

	set < ll > all;
	for (ll k = 2; k * k <= n; ++k) {
		if (n % k == 0) {
			all.insert(k);
			all.insert(n/k);
		}
	}
	--n;
	for (ll k = 2; k * k <= n; ++k) {
		if (n % k == 0) {
			all.insert(k);
			all.insert(n/k);
		}
	}
	++n;
	if(n > 2)
		all.insert(n-1);
	int ans = 1;
	for (auto d : all) {
		ans += check(d);
	}
	printf("%lld\n", ans);

	return Accepted;
}

// B...a

Measured memory_bytes: 512
/* Author : Aaryan Srivastava ^__^ */ 
#include <bits/stdc++.h>
#include <random>
#include <chrono>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp> 
#define pb push_back
#define mp make_pair
#define ff first
#define ss second   
#define rep(i,n) for(int i = 0 ; i < (n) ; i++)
#define repA(i,x,y) for(int i = (x) ; i <= (y) ; i++)
#define repD(i,x,y) for(int i = (x) ; i >= (y) ; i--)
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define setval(a,val) memset(a,val,sizeof(a))
#define Randomize mt19937 rng(chrono::steady_clock::now().time_since_epoch().count())
#define trav(x , a) for(auto &x : a)
#define sz(a) ((int)a.size())
typedef long long ll ; 
#define int ll
using namespace std;

const int N = 3e5 + 5 ;
const int mod = 1e9 + 7 ;
const ll inf = 1e18 ;
const int SZ = 101 ;
const long double eps = 1e-9 ;

using namespace __gnu_pbds;
using ordered_set =  tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> ;

typedef pair<int, int> pii; 
typedef pair<int , pii> ipii ;
typedef pair<pii , int> piii ; 
typedef unsigned long long ull ;
typedef long double ld;

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

void solve()
{
    string s;
    cin >> s;
    for(char &c : s){
        if(c == '?') c = 'D';
    }
    // int cnt = 0;
    // for(int i = 0; i < s.length() ; ++i){
    //     if(s[i] == 'D') cnt++ ;
    //     if(i + 1 < s.length() && s[i] == 'P' && s[i + 1] == 'D') cnt++ ;
    // }
    // cout << cnt << ' ' ;
    cout << s; 
}
     
int32_t main(int32_t argc, char *argv[])
{
    ios::sync_with_stdio(0);    
    cin.tie(0); cout.tie(0);
    int TC = 1, t = 0;
    //cin >> TC ;
    while(t++ < TC)
    {
        //cout << "Case #" << t << ": " ;
        solve();
        cout << "\n" ;
    }
    return 0;
}


Measured memory_bytes: 3780
#include<iostream>
#include<algorithm>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
static const int MAX = 200000;

int main(){
    int R[MAX], n;

    cin >> n;
    rep(i, n) cin >> R[i];

    int maxv = -2000000000;
    int minv = R[0];

    rep2(i, 1, n){
        maxv = max(maxv, R[i] - minv);
        minv = min(minv, R[i]);
    }

    cout << maxv << endl;

    return 0;
}


Measured memory_bytes: 3864
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define fi first 
#define se second
#define pi pair<ll,ll> 
#define pb push_back
#define mk make_pair
int main(){ 
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int k,a,b;
  cin>>k>>a>>b;
  int f=0;
  for(int i=a;i<=b;i++){
	  if(i%k==0){
		  cout<<"OK"<<endl;
		  f=1;
		  break;
	  }
  }
  if(f==0)
  cout<<"NG"<<endl;
}


Measured memory_bytes: 3652
import sys
from collections import deque
sys.setrecursionlimit(10**7)
inf=10**7


def BFS(s):
    color=["white" for _ in range(n)]
    D=[inf for _ in range(n)]

    color[s-1]="gray"
    D[s-1]=0
    queue=deque([s-1])

    while len(queue)!=0:
        u=queue.popleft()
        for i in M[u]:
            if color[i]=="white":
                color[i]="gray"
                D[i]=D[u]+1
                queue.append(i)
        color[u]="black"

    return D


n,x,y=map(int,input().split())

M=[[] for _ in range(n)]
for i in range(n-1):
    M[i].append(i+1)
    M[i+1].append(i)
M[x-1].append(y-1)
M[y-1].append(x-1)

C=[0]*n
for i in range(n):
    for j in BFS(i+1)[i:]:
        C[j] +=1

for i in C[1:]:
    print(i)

Measured memory_bytes: 50524
#include <bits/stdc++.h>
#define inp(X) cin >> X
#define out(X) cout << X << endl
#define out16(X) cout << setprecision(16) << X << endl
#define rep(i,n) for(int i=0;i<n;i++ )
#define rep2(i,f,n) for(int i=f;i<n;i++ )
#define MAX(A) *max_element(A.begin(),A.end())
#define MIN(A) *min_element(A.begin(),A.end())
#define SORT(A) sort(A.begin(),A.end())
#define REV(A) reverse(A.begin(),A.end())
typedef long long int ll;
using vi = std::vector<int>;
using vvi = std::vector<std::vector<int>>;
using vd = std::vector<double>;
using vvd = std::vector<std::vector<double>>;
using vll = std::vector<ll>;
using vvll = std::vector<std::vector<ll>>;
using namespace std;
#define MOD 1000000007
#define INF 1000000001
#define LL_INF 1001001001001001001

int main(void) {
	int h,n; cin >> h >> n;
	vi a(n); rep(i,n) cin >> a[i];
	int sum = 0;
	rep(i,n) sum += a[i];
	if(h>sum) cout << "No" << endl;
	else cout << "Yes" << endl;
}




Measured memory_bytes: 640
def count(s, N):
    if s != "" and int(s) > N:
        return 0
    ret = 1 if all(s.count(c) > 0 for c in "357") else 0
    for c in "357":
        ret += count(s + c, N)
    return ret


def resolve():
    N = int(input())
    print(count("", N))


resolve()


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

using ll = long long;
#define int long long

#define LOG(variable) cout << #variable":\t" << (variable) << endl
#define LOGCON(i, container) for(int (i) = 0; (i) < (container).size(); ++(i)) cout << (i) << ":\t" << (container)[(i)] << endl
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPS(i, r, n) for (int i = (r); i < (n); ++i)
#define REPR(i, n) for(int i = (n); i >= 0; --i) // from n to 0
#define REPRS(i, r, n) for(int i = (n); i >= (r); --i) // from n to r
#define REPOBJ(itr, obj) for(auto itr = (obj).begin(); itr != (obj).end() ; ++itr)
#define REPROBJ(itr, obj) for(auto itr = (obj).rbegin(), e = (obj).rend(); itr != e; ++itr)
#define COUTB(x) cout << (x) << "\n"
#define COUTS(x) cout << (x) << " "
#define PB push_back
#define SORT(obj) sort((obj).begin(), (obj).end())
#define SORTR(obj) sort((obj).begin(), (obj).end(), greater<>())
#define ALL(obj) (obj).begin(), (obj).end()
#define MOD 998244353
#define PI (acos(-1))

struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%MOD+MOD)%MOD){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= MOD) x -= MOD;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += MOD-a.x) >= MOD) x -= MOD;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= MOD; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime MOD
  mint inv() const { return pow(MOD-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}


/***** MAIN *****/
signed main() {
  int n;
  cin >> n;
  map<int, int> mp;
  int max_node = 0;
  bool initiated = false;
  int first;
  REP(i,n) {
    int node;
    cin >> node;
    if(!initiated) {
      first = node;
      initiated = true;
    }
    max_node = max(max_node, node);
    ++mp[node];
  }
  if(first != 0 || mp[0] != 1) {
    cout << 0 << endl;
    return 0;
  }
  mint ans = 1;
  REPS(i, 1, max_node+1) {
    if(mp[i]==0) {
      cout << 0 << endl;
      return 0;
    }
    ans *= mint(mp[i-1]).pow(mp[i]);
  }
  cout << ans;
  cout << "\n";
  return 0;
}
/***** MAIN *****/


Measured memory_bytes: 6528
#include<iostream>
#include<vector>
#include <algorithm>
#include <cmath>
#include <numeric>
#include <limits>
#include <map>

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

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

vector< vector<int> > memo;

int main() {
	string s;
	cin >> s;
	rep(i, s.size()) {
		if (s[i] == '7') {
			cout << "Yes" << endl;;
			return 0;
		}
	}
	cout << "No" << endl;
	return 0;
}


Measured memory_bytes: 3596
#include<iostream>
#include<cmath>
#include<algorithm>
#include<string>
#include<set>
#include<vector>
#include<iomanip>
#include<numeric>
using namespace std;

int main(){
  int N; cin>>N;
  int A[N],B[N],C[N];
  for(int i=0;i<N;i++)cin>>A[i];
  for(int i=0;i<N;i++)cin>>B[i];
  for(int i=0;i<N-1;i++)cin>>C[i];
  int ans=0;
  for(int i=0;i<N;i++){
    ans+=B[A[i]-1];
    if(i>0&&A[i]-A[i-1]==1)ans+=C[A[i]-2];
  }

  cout<<ans<<endl;

  return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<stdio.h>
#include<string>
using namespace std;
int main(){
  int n,i,j,k,p;
  string str;
  cin>>n;
  for(j=0;j<n;j++){
    cin >> str;
    p=0;
    char c;
    for(i=0;i<str.size();i++){
      if(str[i]=='0'){
	if(p!=0){
	  if(c=='1'){
	    if(p%5==1) cout << '.';
	    if(p%5==2) cout << ',';
	    if(p%5==3) cout << '!';
	    if(p%5==4) cout << '?';
	    if(p%5==0) cout << " ";
	  }
	  if(c=='2'){
	    printf("%c", ('a'+(p-1)%3));
	  }
	  if(c=='3'){
	    printf("%c", ('d'+(p-1)%3));
	  }
	  if(c=='4'){
	    printf("%c", ('g'+(p-1)%3));
	  }
	  if(c=='5'){
	    printf("%c", ('j'+(p-1)%3));
	  }
	  if(c=='6'){
	   printf("%c", ('m'+(p-1)%3));
	  }
	  if(c=='7'){
	    printf("%c", ('p'+(p-1)%4));
	  }
	  if(c=='8'){
	    printf("%c", ('t'+(p-1)%3));
	  }
	  if(c=='9'){
	    printf("%c", ('w'+(p-1)%4));
	  }
	}
	p=0;
      }else{
	c=str[i];
	p++;
      }
      
    }
    cout << endl;
  }
  return 0;
}

Measured memory_bytes: 1204
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <queue>
#include <stack>
#define rep( i, a, n ) for( int i = a; i < n; i++ )
#define per( i, a, n ) for( int i = n - 1; i >= a; i-- )
#define mem( f, x ) memset( f, x, sizeof( f ) )
#define ll long long
#define pii pair<int, int>
#define fi first
#define se second
#define MOD 1000000007
#define INF 0x3f3f3f3f
#define e 2.71828
using namespace std;
const int N = 105;
const int M = 1e6+5;
const int MAX = 5;
const ll inv = 500000004;
const double g = 9.80;
const double PI = acos( -1.0 );
int n;
ll m;
ll a[N], sum[N];

int main(){
    while( scanf( "%d %lld", &n, &m ) != EOF ){
        mem( sum, 0 );
        rep( i, 1, n + 1 ) scanf( "%lld", a + i );
        sort( a + 1, a + n + 1 );
        int ans = 0;
        rep( i, 1, n ){
            sum[i] += sum[i-1] + a[i];
            if( m >= sum[i] ) ans++;
        }
        sum[n] = sum[n-1] + a[n];
        if( m == sum[n] ) ans++;
        printf( "%d\n", ans );
    }
    return 0;
}


Measured memory_bytes: 888
#include <bits/stdc++.h>
#define int long long
#define gcd            __gcd
#define setbits(x)     __builtin_popcountll(x)
#define zrobits(x)     __builtin_ctzll(x)
#define mod            1000000007
#define mod2           998244353
#define maxe           *max_element
#define mine           *min_element
#define inf            1e18
#define deci(x,y)      fixed<<setprecision(y)<<x
#define w(t)           int t; cin>>t; while(t--)
#define nitin          ios_base::sync_with_stdio(false); cin.tie(NULL)
#define PI             3.141592653589793238
using namespace std;

int power(int x, 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;
}
int modi(int a, int m)
{
    return power(a, m - 2, m);
}
int32_t main()
{
    nitin;
    int n;
    cin>>n;
    if(n>=30)
    {
        cout<<"Yes"<<endl;
    }
    else{
        cout<<"No"<<endl;
    }
    return 0;
}

Measured memory_bytes: 3612
import sys
fin = sys.stdin.readline

N = int(fin())
coords = [[int(elem) for elem in fin().split(' ')] for _ in range(N)]
odd_or_even = abs((coords[0][0] + coords[0][1]) % 2)
max_sum = 0
for coord in coords:
    x, y = coord
    if (x + y) % 2 != odd_or_even:
        print(-1)
        exit(0)
    else:
        max_sum = max(max_sum, abs(x) + abs(y))

# partial solution (because m must not exceed 40)
def partial_solution(max_sum, coords):
    m = max_sum
    print(m)
    print(' '.join(['1'] * m))
    for coord in coords:
        x, y = coord
        count = 0
        output = ""
        if x > 0:
            output += "R" * x
        else:
            output += "L" * abs(x)
        count += abs(x)

        if y > 0:
            output += "U" * y
        else:
            output += "D" * y
        count += abs(y)

        assert (m - count) % 2 == 0
        output += "LR" * ((m - count) // 2)
        print(output)
#partial_solution(max_sum, coords)

def padding(binary_expression):
    len_pad = 31 - len(binary_expression[2:])
    return "0" * len_pad + binary_expression[2:]


def full_solution(max_sum, coords, odd_or_even):
    mode_map = {(0, 0): "L",
                (1, 1): "R",
                (0, 1): "D",
                (1, 0): "U"}
    rotated_coords = [(x + y, x - y) for x, y in coords]
    d = []
    for i in range(31):
        d.append(2**i)  
    if odd_or_even == 1:
        m = 31
    else:
        m = 32
        d.append(1)
    print(m)
    print(" ".join([str(d_elem) for d_elem in d]))
    if odd_or_even == 1:
        for rotated_coord in rotated_coords:
            u, v = rotated_coord
            const_2pow31 = 2**31
            flags_u = list(padding(bin((u + const_2pow31 - 1) // 2)))[::-1]
            flags_v = list(padding(bin((v + const_2pow31 - 1) // 2)))[::-1]
            flags = [(int(fu), int(fv)) for fu, fv in zip(flags_u, flags_v)]
            output = "".join([mode_map[flag] for flag in flags])
            print(output)
    else:
        for rotated_coord in rotated_coords:
            u, v = rotated_coord
            u -= 1
            v -= 1
            const_2pow31 = 2**31
            flags_u = list(padding(bin((u + const_2pow31 - 1) // 2)))[::-1]
            flags_v = list(padding(bin((v + const_2pow31 - 1) // 2)))[::-1]
            flags = [(int(fu), int(fv)) for fu, fv in zip(flags_u, flags_v)]
            output = "".join([mode_map[flag] for flag in flags]) + "R"
            print(output)

full_solution(max_sum, coords, odd_or_even)


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

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

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

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

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

std::vector<int> sieve(int n) {
  std::vector<int> res(n);
  std::iota(res.begin(), res.end(), 0);
  for (int i = 2; i*i < n; ++i) {
    if (res[i] < i) continue;
    for (int j = i*i; j < n; j += i)
      if (res[j] == j) res[j] = i;
  }
  return res;
}

map<int,int> factor(int n, const std::vector<int>& min_factor) {
  // min_factor は sieve() で得られたものとする
  map<int, int> res;
  while (n > 1) {
    res[min_factor[n]]++;
    n /= min_factor[n];
    // 割った後の値についても素因数を知っているので順次求まる
  }
  return res;
}

int main()
{
  ll N;
  cin >> N;
  auto min_fac = sieve(N+1);
  ll ans = 0;
  REP(i, N) {
    auto m = factor(i+1, min_fac);
    ll fK = 1;
    for(auto p : m) {
      fK *= p.second + 1;
    }
    ans += (i+1) * fK;
  }
  PRINT(ans);
  return 0;
} 


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

//typedef
//------------------------------------------
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef vector<string> VS;
typedef pair<LL, LL> PLL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);
const int MOD = 1000000007;

// grid
//--------------------------------------------
VL dx = {0, 1, 0, -1};
VL dy = {1, 0, -1, 0};
VL dx2 = {-1, 0, 1, -1, 1, -1, 0, 1};
VL dy2 = {-1, -1, -1, 0, 0, 1, 1, 1};

//debug
//--------------------------------------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

//IO accelerate
//--------------------------------------------
struct InitIO {
    InitIO() {
        cin.tie(nullptr);
        ios_base::sync_with_stdio(false);
        cout << fixed << setprecision(30);
    }
} init_io;

//template
//--------------------------------------------
template<typename T>
istream& operator >>(istream& is, vector<T>& vec) {
  for(T& x: vec) is >> x;
  return is;
}
template<typename T>
ostream& operator <<(ostream& os, const vector<T>& vec) {
  for(int i=0; i<vec.size(); i++){
    os << vec[i] << ( i+1 == vec.size() ? "" : "\t" );
  }
  return os;
}
template<typename T>
ostream& operator <<(ostream& s, const vector<vector<T>>& vv) {
	for (int i = 0; i < vv.size(); ++i) {
		s << vv[i] << endl;
	}
	return s;
}

// 多重vector
// auto dp=make_v<int>(4,h,w) みたいに使える
template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
  return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

// 多重vectorのためのfill
// fill_v(dp,0) みたいに使える
template<typename T,typename V>
typename enable_if<is_class<T>::value==0>::type
fill_v(T &t,const V &v){t=v;}

template<typename T,typename V>
typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t,const V &v){
  for(auto &e:t) fill_v(e,v);
}

//main code

int main(int argc, char *argv[])
{
	int a,b;
	cin >> a >> b;
	if (a+b >= 10) {
		cout << "error" << endl;
	} else {
		cout << a+b << endl;
	}
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
#define idfc ios_base::sync_with_stdio(false),cin.tie(nullptr),cout.tie(nullptr)
//:/
#define pb emplace_back
#define mp make_pair
#define nt _ll128
#define ld long double
long double PI =3.14159265358979323846;
using ll = long long;



const ll modo=1e9+7;
const ll inf=1e17;
const ll ms=(2e6)+5;

int go(ll n)
{

    ll i;
    int a=0;
    for(i=2;i*i<=n;i++)
    {
        if(!(n%i))
        {
            a++;
            while(!(n%i))n/=i;
        }
    }
    if(n>1)a++;
    return a;
}



int main()
{
    idfc;
    ll a,b;
    cin>>a>>b;
    ll c=__gcd(a,b);
    cout<<go(c)+1;
    return 0;
}

Measured memory_bytes: 3632
/*  Kadai4_1
    saitomo   */

#include <stdio.h>
#include <math.h>

int main(void){
    double num_tree, scope;
    //木の本数と範囲を指定
    //ceilを使うのでdouble型
    scanf("%lf%lf", &num_tree, &scope);

    int num_observer = ceil(num_tree / (2 * scope + 1));
    // 必要な監視員の数
    //1人で2*scope+1本の木を監視できる
    //小数点（木の本数のあまり）が出た場合は切り上げる
    printf("%d\n", num_observer);

    return 0;
}


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

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define ALL(v) (v).begin(), (v).end()
#define p(s) cout<<(s)<<endl
#define p2(s, t) cout << (s) << " " << (t) << endl
#define br() p("")
#define pn(s) cout << (#s) << " " << (s) << endl
#define p_yes() p("YES")
#define p_no() p("NO")

const ll mod = 1e9 + 7;
const ll inf = 1e18;

template < typename T >
void vprint(T &V){
	for(auto v : V){
    	cout << v << " ";
	}
	cout << endl;
}

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

    // input
    string s;
    cin >> s;


    vector<ll> A(3);

    for(char c : s){
        if(c=='a'){
            A[0]++;
        }
        else if(c=='b'){
            A[1]++;
        }
        else{
            A[2]++;
        }
    }

    sort(ALL(A));

    if(A.back()-A[0]<=1){
        p_yes();
    }else{
        p_no();
    }
    
    return 0;
}

Measured memory_bytes: 512
#include <iostream>
#include <map>

using namespace std;

const int MAXN=100111;

int N;
long long A[MAXN], M;
long long Sum[MAXN];

map<long long, int> Map;

long long v;

long long Ans=0LL;

int main(){
	ios_base::sync_with_stdio(false);
	
	cin >> N;
	cin >> M;
	for(int i=1;i<=N;++i)	cin >> A[i];
	
	Sum[0]=0LL;
	for(int i=1;i<=N;++i)	Sum[i]=Sum[i-1]+A[i];
	
	Map[0LL]=1;
	for(int i=1;i<=N;++i){
		v=Sum[i]%M;
		Ans+=Map[v];
		++Map[v];
	}
	
	cout << Ans << endl;
	
	return 0;
}

Measured memory_bytes: 5760
while True:
    a,op,b = input().split()
    a = int(a)
    b = int(b)
    if op == "+":
        print(a + b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    elif op == "/":
        print(int(a / b))
    else:
        break


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

int main() {
  int N, K;
  cin >> N >> K;
  set<int> SE;
  for (int i = 0; i < K; i++) {
    int D;
    cin >> D;
    for (int j = 0; j < D; j++) {
      int A;
      cin >> A;
      SE.insert(A);
    }
  }
  cout << N - SE.size() << "\n";
}

Measured memory_bytes: 3592
#include <iostream>

using namespace std;

int main() {
    int x, y;
    cin >> x >> y;
    int ret = 0;
    if (x <= 3)ret += 100000 * (4 - x);
    if (y <= 3)ret += 100000 * (4 - y);
    if (x == 1 && y == 1)ret += 400000;
    cout << ret << endl;
    return 0;
}

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

Measured memory_bytes: 512
#include <iostream>
#include <vector>
#include <cassert>
#include <cmath>

using ll = long long;
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#define MAX(a, b) (((a) < (b)) ? (b) : (a))

/*
M should be divisible by 2.

I first build the dfs-tree, now each edge is oriented towards the bottom
*/
int const nmax = 100000;
std::vector<int> g[1 + nmax];
std::vector<std::pair<int,int>> sol;
int seen[1 + nmax], dp[1 + nmax];
int in_stack[1 + nmax];

void dfs(int node, int parent) {
  seen[node] = 1;
  in_stack[node] = 1;
  for(int h = 0; h < g[node].size(); h++) {
    int to = g[node][h];
    if(to == parent)
      continue;
    if(seen[to] == 0) {
      dfs(to, node);
    } else if(in_stack[to] == 1) {
      dp[to] ^= 1;
      sol.push_back({to, node});
    }
  }
  in_stack[node] = 0;
  if(parent == 0)
    return ;
  if(dp[node] == 1) {
    sol.push_back({node, parent});
    dp[node] ^= 1;
  } else {
    sol.push_back({parent, node});
    dp[parent] ^= 1;
  }
}

int main() {
  int n, m;
  std::cin >> n >> m;
  for(int i = 1; i <= m; i++) {
    int x, y;
    std::cin >> x >> y;
    g[x].push_back(y);
    g[y].push_back(x);
  }
  if(m % 2 == 0) {
    dfs(1, 0);
    for(int i = 0; i < sol.size(); i++)
      std::cout << sol[i].first << " " << sol[i].second << '\n';
  } else
    std::cout << -1;
  return 0;
}


Measured memory_bytes: 18600
#include<stdio.h>
#define MAX 100005
#define NIL -1
struct Node{ int p, l, r;};
struct Node T[MAX];
 
void inorder(int u){
  if(u != NIL){
    inorder(T[u].l);
    printf(" %d",u);   
    inorder(T[u].r); 
  }
}
void preorder(int u){
  if(u != NIL){
    printf(" %d",u);  
    preorder(T[u].l);
    preorder(T[u].r);
  }
}
 
void postorder(int u){
  if(u != NIL){
    postorder(T[u].l);
    postorder(T[u].r);
    printf(" %d",u);
  }
}
 
int main(){
  int i, v,n;    
    scanf("%d", &n);
    for ( i = 0; i < n; i++ ) {
      T[i].p = T[i].l = T[i].r = NIL;
    }
    for ( i = 0; i < n; i++ ){
      scanf("%d",&v);
      scanf("%d %d",&T[v].l,&T[v].r);   
      T[T[v].l].p = v;
      T[T[v].r].p = v;
    }
     
     
    printf("Preorder\n");
     for(i=0; i<n; i++){
     if(T[i].p == NIL)
    preorder(i);
    }
    printf("\nInorder\n");
    for(i=0; i<n; i++){
      if(T[i].p == NIL)
    inorder(i);
    }
    printf("\nPostorder\n");
    for(i=0; i<n; i++){ 
      if(T[i].p == NIL)
    postorder(i);
    }
    printf("\n");
    
    return 0;  
}

Measured memory_bytes: 616
#define _CRT_SECURE_NO_WARNINGS


#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <queue>
#include <set>
#include <iomanip>
#include <map>
#include <stack>
#include <bitset>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <cstdio>
#include <cstring>

using namespace std;

//#define FAST_ALLOCATOR_MEMORY 1e8
#undef LOCAL
//#include "optimization.h"

vector<int> dp;

int get(int n) {
	if (dp[n] != -1)
		return dp[n];
	if (n == 0) {
		return 0;
	}
	set<int> go;
	go.insert(0);
	int now = 0;
	for (int i = n - 1; i >= 1; i--) {
		now ^= get(i);
		go.insert(now);
	}
	int res = 0;
	while (go.find(res) != go.end())
		res++;

	return dp[n] = res;
}

long long get_st(long long val) {
	if (val == 0)
		return 0;
	long long l = 1;
	while (val % (2 * l) == 0)
		l *= 2;
	return l;
}

vector<string> s;

struct vert {
	int l, r;
	int sz;
};

vector<vert> bor;
vert nw = { -1, -1, 0 };

void go(int ind, int pos, int b) {
	bor[b].sz++;
	if (pos != s[ind].length()) {
		if (s[ind][pos] == '0') {
			if (bor[b].l == -1) {
				bor[b].l = bor.size();
				bor.push_back(nw);
			}
			go(ind, pos + 1, bor[b].l);
		}
		else {
			if (bor[b].r == -1) {
				bor[b].r = bor.size();
				bor.push_back(nw);
			}
			go(ind, pos + 1, bor[b].r);
		}
	}
}

long long get_val(int b, long long h) {
	if (h == 0)
		return 0;
	long long res = 0;
	if (bor[b].l == -1) {
		res ^= get_st(h);
	}
	else
		res ^= get_val(bor[b].l, h - 1);
	
	if (bor[b].r == -1) {
		res ^= get_st(h);
	}
	else
		res ^= get_val(bor[b].r, h - 1);
	return res;
}

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

#ifdef LOCAL
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int n;
	long long l;
	cin >> n >> l;
	s.resize(n);
	for (int i = 0; i < n; i++)
		cin >> s[i];

	vert st = { -1, -1, 1 };
	bor.push_back(st);
	for (int i = 0; i < n; i++) {
		go(i, 0, 0);
	}
	if (get_val(0, l) == 0)
		cout << "Bob";
	else
		cout << "Alice";
	return 0;
}

Measured memory_bytes: 6340
#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
long long int arr[105],n,dp[100005],m;
vector< long long int >path[100005];
long long int solve(long long int node)
{
    if(node>n)
        return 0;
    if(dp[node]!=-1)
        return dp[node];
    long long int i,j,k=0,ans=0;
    for(i=0;i<path[node].size();i++)
    {
        ans=max(ans,solve(path[node][i]));
        k=ans+1;
    }    
    dp[node]=k;
    return dp[node];
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    long long int i,j,k,a,b,ans=0,sum=0,cnt=0;
    cin >> n >> m;
    //long long int arr[n];
    memset(dp,-1,sizeof(dp));
    /*for(i=0;i<n;i++)
        for(j=0;j<k;j++)
            cout << dp[i][j];*/
    //cout << k << endl;
    for(i=1;i<=m;i++)
    {
        cin >> a >> b;
        path[a].push_back(b);
    }
    /*for(i=1;i<=n;i++)
        cout << arr[i] << endl;*/
    for(i=1;i<=n;i++)
        ans=max(ans,solve(i));
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 8576
// Aizu 1163: Cards
// 2017.9.15 bal4u@uu

#include <stdio.h>
#include <string.h>

#define M 502
#define N 502

int m, n;
char graph[M][N], seen[N];
int matchL[M], matchR[N];

int b[M], r[N];

int gcd(int a, int b)
{
	int r;
	while (b != 0) r = a % b, a = b, b = r;
	return a;
}

int bpm(int u)
{
	int v;

	for (v = 0; v < n; v++) if (graph[u][v]) {
		if (seen[v]) continue;
		seen[v] = 1;
		if (matchR[v] < 0 || bpm(matchR[v])) {
			matchL[u] = v, matchR[v] = u;
			return 1;
		}
	}
	return 0;
}

int main()
{
	int i, j, cnt;

	while (scanf("%d%d", &m, &n) && m) {
		for (i = 0; i < m; i++) scanf("%d", b+i);
		for (j = 0; j < n; j++) scanf("%d", r+j);
	    for (i = 0; i < m; i++) for (j = 0; j < n; j++) graph[i][j] = (gcd(b[i], r[j]) > 1);
		memset(matchL, -1, m*sizeof(matchL[0]));
		memset(matchR, -1, n*sizeof(matchR[0]));
		for (cnt = 0, i = 0; i < m; i++) { memset(seen, 0, n); if (bpm(i)) cnt++; }
		printf("%d\n", cnt);
	}
	return 0;
}

Measured memory_bytes: 2036
using System;
using System.Linq;
using System.Collections.Generic;
using static System.Console;
using System.Text;
using System.IO;
using static System.Math;
namespace AtCoder
{
    class Program
    {
        static public long[] Sarray() { return ReadLine().Split().Select(long.Parse).ToArray(); }
        static public List<long> Slist() { return ReadLine().Split().Select(long.Parse).ToList(); }

        static void Main(string[] args)
        {
            //SetOut(new StreamWriter(OpenStandardOutput()) { AutoFlush = false });
            var N = Sarray()[0];
            var Ai = Sarray();
            var ans = 0L;
            for(var i=0;i<N;++i)
                ans = gcd(ans, Ai[i]);
            WriteLine(ans);

            //Out.Flush();
        }
        static long gcd(long x, long y) => y == 0 ? x : gcd(y, x % y);
    }
}

Measured memory_bytes: 22880
#include<iostream>
using namespace std;int main(){int a,i,n,m,map[3000]={0};for(;;){cin>>n>>m;if(n==0&&m==0)break;int now=0,ans=0;for(i=0;i<n;i++)cin>>map[i];for(i=0;i<m;i++){cin>>a;now+=a;if(map[now]!=0&&ans==0)now+=map[now];if(now>=n-1&&ans==0)ans=i+1;}cout<<ans<<endl;}}

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

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

void add_self(ll& a, ll b){
    a += b;
    if(a >= mod){a -= mod;}
}

ll mult(ll a, ll b){
    return a * b % mod;
}

struct M{
    vector<vector<ll>> t;
    M(){
        t.resize(n, vector<ll>(n));
    }
    M operator* (const M& b) const{
        M c = M();
        for(ll i = 0; i < n; ++i){
            for(ll j = 0; j < n; ++j){
                for(ll k = 0; k < n; ++k){
                    add_self(c.t[i][k], mult(t[i][j], b.t[j][k]));
                }
            }
        }
        return c;
    }
};

int main() {
    ll k; cin>>n>>k;
    vector<vector<ll>> can(n, vector<ll>(n));
    for(ll i = 0; i < n; ++i){
        for(ll j = 0; j < n; ++j){
            cin>>can[i][j];
        }
    }
    M answer = M();
    for(ll i = 0; i < n; i++){
        answer.t[i][i] = 1;
    }
    M m = M();
    m.t = can;
    while(k){
        if(k % 2){
            answer = answer * m;
        }
        m = m * m;
        k /= 2;
    }
    ll total = 0;
    
    for(ll i = 0; i < n; i++){
        for(ll j = 0; j < n; j++){
            add_self(total, answer.t[i][j]);
        }
    }
    cout<<total;
	return 0;
}

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

int main(){
    int n,m;
    cin>>n>>m;
    vector<pair<int,int>> v(m);
    int a,b;
    for(int i=0;i<m;i++){
        cin>>a>>b;
        v[i].first=a-1;
        v[i].second=b-1;
    }
    sort(v.begin(),v.end());
    int ans=0;
    bool used[n]={};
    int t=0;
    vector<int> vv;
    for(int i=0;i<n-1;i++){
        while(i==v[t].first){
            used[v[t].first]=true;
            used[v[t].second]=true;
            vv.push_back(v[t].second);
            t++;
        }
        if(used[i+1]){
            for(auto s:vv){
                used[s]=false;
            }
            ans++;
        }
    }
    cout<<ans<<endl;
}

Measured memory_bytes: 1788
#include <iostream>
using namespace std;
typedef long long ll;
const ll INF = 1000000000000000000, mod = 1000000007;
ll n, t[210000], a[210000], d[210000];
int main(void){
    // Your code here!
    cin >> n;
    for (ll i = 0; i < n; i++) cin >> t[i];
    for (ll i = 0; i < n; i++) cin >> a[i];
    for (ll i = 0; i < n; i++) d[i] = INF;
    d[0] = t[0];
    for (ll i = 1; i < n; i++) {
        if (t[i] != t[i - 1]) d[i] = t[i];
    }
    for (ll i = n - 1; i >= 0; i--) {
        if (a[i] != a[i + 1]) {
            if (d[i] != INF) {
                d[i] = max(d[i], a[i]);
            } else {
                d[i] = a[i];
            }
        }
    }
    ll res = 1;
    for (ll i = 0; i < n; i++) {
        if (d[i] != INF) {
            if (d[i] > t[i] || d[i] > a[i]) res = 0;
        } else {
            res *= min(a[i], t[i]);
            res %= mod;
        }
    }
    cout << res << endl;
}


Measured memory_bytes: 3456
# include<bits/stdc++.h>
using namespace std;
# define lowbit(x) ((x)&(-x))
# define pi acos(-1.0)
# define eps 1e-8
# define MOD 1000000007
# define INF 1000000000
# define mem(a,b) memset(a,b,sizeof(a))
# define FOR(i,a,n) for(register int i=a; i<=n; ++i)
# define FDR(i,a,n) for(register int i=a; i>=n; --i)
# define AU(i,x)    for(auto i=x.begin(); i!=x.end(); ++i)
# define ALL(A) A.begin(),A.end()
# define bug puts("H");
# define lch p<<1,l,mid
# define rch p<<1|1,mid+1,r
# define mp make_pair
# define pb push_back
typedef pair<int,int> PII;
typedef vector<int> VI;
# pragma comment(linker, "/STACK:1024000000,1024000000")
typedef long long LL;
inline char nc(){
    static char buf[1000000],*p1=buf,*p2=buf;
    return p1==p2&&(p2=(p1=buf)+fread(buf,1,1000000,stdin),p1==p2)?EOF:*p1++;
}
inline int Scan(){
    char ch=nc();int sum=0, f=1;
    if (ch=='-') f=-1, ch=nc();
    while(!(ch>='0'&&ch<='9'))ch=nc();
    while(ch>='0'&&ch<='9')sum=sum*10+ch-48,ch=nc();
    return sum*f;
}
int ps4[4][2]={0,1,0,-1,1,0,-1,0};
int ps8[8][2]={0,1,0,-1,1,0,-1,0,1,1,1,-1,-1,-1,-1,1};
inline int min(int a,int b,int c) {return min(a,min(b,c));}
inline int max(int a,int b,int c) {return max(a,max(b,c));}
inline int min(int a,int b,int c,int d){return min(min(a,b,c),d);}
inline int max(int a,int b,int c,int d){return max(max(a,b,c),d);}
//struct Edge{int p, next, w;}edge[maxn];
//inline add_edge(int u, int v, int w){edge[cnt]=Edge{v,head[u],w}; head[u]=cnt++;}
const int N=100005;
///Code begin..................................................................

unordered_map<int,int>dp;
string s;

int main ()
{
    cin>>s;
    LL sta=0;
    dp[sta]=0;
    for (int i=0; i<s.length(); ++i) {
        sta^=(1LL<<(s[i]-'a'));
        int x=INF;
        for (int i=0; i<26; ++i) {
            if (dp.find(sta^(1LL<<i))!=dp.end()) x=min(x,dp[sta^(1LL<<i)]+1);
        }
        if (dp.find(sta)==dp.end()&&x!=INF) dp[sta]=x;
        else dp[sta]=min(dp[sta],x);
    }
    cout<<max(dp[sta],1)<<endl;
    return 0;
}


Measured memory_bytes: 8652
#include <bits/stdc++.h>
#define rep(i,m,n) for(int i=m; i<n; i++)
#define co(n) cout << n << endl
using namespace std;
int main(){
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  if(a*b>c*d) co(a*b);
  else co(c*d);
  return 0;
}

Measured memory_bytes: 256
n,k = map(int, input().split())
arr = list(map(int, input().split()))
i = 1
n = 0
visited = {i:n}
while k > 0:
  n += 1
  k -= 1
  i = arr[i-1]
  if i in visited:
    break
  visited[i] = n

if k == 0:
  print(i)
else:
  k %= n-visited[i]
  while k > 0:
    k -= 1
    i = arr[i-1]
  print(i)

Measured memory_bytes: 32296
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>

using namespace std;

void solve()
{
	vector<int> a(3);
	for (int i = 0; i < 3; ++i)
	{
		cin >> a[i];
	}
	sort(a.begin(), a.end());
	if (a[0] + a[1] == a[2])
	{
		cout << "Yes" << endl;
	}
	else
	{
		cout << "No" << endl;
	}
}

int main()
{
	solve();
	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 count = 0;
		while(true){
			int n = sc.nextInt();
			if(n == 0){break;}
			count++;
			System.out.println("Case " + count + ": " + n);
		}
	}
}



Measured memory_bytes: 41996
#include <bits/stdc++.h>
using namespace std;
int h,w,n,ans;
typedef struct{
	char mp[32][32];
	int lst;
}KG;
int f[32][32];
KG kg,tmp;
int dx[4]={0,1,0,-1};
int dy[4]={1,0,-1,0};

int cal(){
	for(int i=0;i<h;i++){
		for(int y=h;y>=1;y--){
			for(int x=1;x<=w;x++){
				if(tmp.mp[x][y]=='.'){
					tmp.mp[x][y]=tmp.mp[x][y-1];
					tmp.mp[x][y-1]='.';
				}
			}
		}
	}
	int res=0;
	for(int i=0;i<32*32;i++)f[i/32][i%32]=0;
	for(int y=1;y<=h;y++){
		for(int x=1;x<=w-n+1;x++){
			int flg=1;
			if(tmp.mp[x][y]=='.')continue;
			for(int i=1;i<n;i++)if(tmp.mp[x][y]!=tmp.mp[x+i][y])flg=0;
			if(flg==0)continue;
			for(int i=0;i<n;i++)f[x+i][y]=1;
			res=1;
		}
	}
	for(int y=1;y<=h-n+1;y++){
		for(int x=1;x<=w;x++){
			int flg=1;
			if(tmp.mp[x][y]=='.')continue;
			for(int i=1;i<n;i++)if(tmp.mp[x][y]!=tmp.mp[x][y+i])flg=0;
			if(flg==0)continue;
			for(int i=0;i<n;i++)f[x][y+i]=1;
			res=1;
		}
	}
	
	for(int y=1;y<=h;y++){
		for(int x=1;x<=w;x++){
			if(f[x][y]){
				tmp.mp[x][y]='.';
				tmp.lst--;
			}
		}
	}
	
	for(int i=0;i<h;i++){
		for(int y=h;y>=1;y--){
			for(int x=1;x<=w;x++){
				if(tmp.mp[x][y]=='.'){
					tmp.mp[x][y]=tmp.mp[x][y-1];
					tmp.mp[x][y-1]='.';
				}
			}
		}
	}
	
	return res;
}

int main(){
	
	while(cin>>h>>w>>n){
		for(int i=0;i<32*32;i++)kg.mp[i/32][i%32]='.';
		ans=0;
		kg.lst=0;
		for(int y=1;y<=h;y++){
			for(int x=1;x<=w;x++){
				cin>>kg.mp[x][y];
				if(kg.mp[x][y]!='.')kg.lst++;
			}
		}
		for(int y=1;y<=h;y++){
			for(int x=1;x<=w;x++){
				for(int k=0;k<=4;k++){
					int X=x+dx[k],Y=y;
					tmp=kg;
					if(X<1||w<X)continue;
					if(Y<1||h<Y)continue;
					
					swap(tmp.mp[x][y],tmp.mp[X][Y]);
					while(cal());
					if(tmp.lst==0)ans=1;
				}
			}
		}
		cout<<(ans?"YES\n":"NO\n");
	}
	
	return 0;
}


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

int main(){
    ll n = 0;
    cin >> n;
    int count = 1;
    ll a,b = 0;
    a = 26;
    while(a<n || n<=b){
        b = a;
        a = (a+1)*26;
        count++;
    }
    ll m = n-b-1;
    vector<char> v(count);
    int ch = 0;
    ll dummy;
    string alphabet = "abcdefghijklmnopqrstuvwxyz";
    rep(i,count){
        dummy = pow(26,count-i-1);
        ch = m / dummy;
        m = m % dummy;
        v[i] = alphabet[ch];
    }
    rep(i,count)cout << v[i];
    cout <<endl;
}

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

using namespace std;


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

int n;
int s;
for(int i=1;i<=5;i++){
    cin>>n;
    if(n==0){
        s=i;
        break;
    }
}
cout<<s;


	return 0;
}





Measured memory_bytes: 3660
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    s = S()
    t = S()
    ans = 0
    for i in range(len(s)):
        if s[i] == t[i]:
            ans += 1
    print(ans)
    return

#B
def B():
    a,b = LI()
    for i in range(10000):
        if 1+i*a-i >= b:
            print(i)
            return
    return

#C
def C():
    n = I()
    a = LI()
    ans = 0
    r = 1
    for l in range(n):
        if r == l:
            r += 1
        while r < n and a[r-1] >= a[r]:
            r += 1
        ans = max(ans, r-l-1)
    print(ans)
    return

#D
def D():

    return

#E
def E():

    return

#F
def F():

    return

#Solve
if __name__ == "__main__":
    C()


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

int main() {
    using namespace std;
    unsigned long A, B, M;
    cin >> A >> B >> M;
    vector<unsigned long> a(A), b(B);
    for(auto& i : a)cin >> i;
    for(auto& i : b)cin >> i;
    unsigned long ans{*min_element(a.begin(), a.end()) + *min_element(b.begin(), b.end())};
    for(unsigned long i{0}, x, y, c; i < M; ++i){
        cin >> x >> y >> c;
        ans = min(ans, a[x - 1] + b[y - 1] - c);
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 1792
#include<bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	int a,v;
	cin>>a>>v;
	int b,w;
	cin>>b>>w;
	int t;
	cin>>t;
	if(llabs(a-b)<=t*(v-w)){
		cout<<"YES"<<endl;
	}else{
		cout<<"NO"<<endl;
	}
	return 0;
}


Measured memory_bytes: 3624
#include<stdio.h>
#define MAX 100005
#define NIL -1

typedef struct Node{int p,l,r;}Node;

Node T[MAX];
int n,D[MAX];

void print(int u){
  int i,c;
  printf("node %d: ",u);
  printf("parent = %d, ",T[u].p);
  printf("depth = %d, ",D[u]);

  if(T[u].p == NIL) printf("root, ");
  else if(T[u].l == NIL) printf("leaf, ");
  else printf("internal node, ");

  printf("[");
  c=T[u].l;
  for(i=0;c!=NIL;i++){
    if(i) printf(", ");
    printf("%d",c);
    c=T[c].r;
  }
  printf("]\n");
}

int rec(int u,int p){
  D[u] = p;
  if(T[u].r!=NIL) rec(T[u].r,p);
  if(T[u].l!=NIL) rec(T[u].l,p+1);
}

int main(){
  int i,j,d,c,v,l,r;
  scanf("%d",&n);
  for(i=0;i<n;i++) T[i].p=T[i].l=T[i].r=NIL;
  for(i=0;i<n;i++){
    scanf("%d %d",&v,&d);
    for(j=0;j<d;j++){
      scanf("%d",&c);
      if(j==0) T[v].l = c;
      else T[l].r = c;
      l=c;
      T[c].p=v;
    }
  }
  for(i=0;i<n;i++){
    if(T[i].p ==NIL) r=i;
  }
  rec(r,0);

  for(i=0;i<n;i++) print(i);
  return 0;
}




Measured memory_bytes: 6384
while True:
    m = int(raw_input())
    if m==0:break
    seiza = [] # pos. of const.
    for i in range(m):
        seiza.append(map(int,raw_input().split()))
    seiza.sort()
    n = int(raw_input())
    hoshi = []
    for j in range(n):
        hoshi.append(map(int,raw_input().split()))
    hoshi.sort()
    
    try:
        for xs,ys in seiza:
            for xh,yh in hoshi:
                dx = xh-xs
                dy = yh-ys
                tmp = [[x+dx,y+dy] for x,y in seiza]
                cnt = 0
                for item in tmp:
                    if item in hoshi:
                        cnt += 1
                        if cnt == len(tmp):
                            raise ZeroDivisionError
                    else:
                        break
    except ZeroDivisionError:
        print dx,dy        

Measured memory_bytes: 4432
#include <iostream>
using namespace std;
int main(void){
  string s;
  cin >> s;
  int len=s.size();
  bool flag=true;
while(flag){
    len-=2;
  for(int i=0; i<len/2; i++){
      if(s[i]!=s[len/2+i]){
        flag=true;
        break;
      }else if(i==len/2-1){
        if(s[i]==s[len/2+i]){
          flag=false;
        }
      }
    }
  }

  cout << len << endl;
  return 0;
}


Measured memory_bytes: 256
#080-D
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(input())
def S(): return list(input())
n,c=IL()
imos=[[0]*30 for i in range(pow(10,5))]
for i in range(n):
    s,t,c=IL()
    for j in range(s-1,t):
        imos[j][c-1]=1
ans=0
for i in range(pow(10,5)):
    ans=max(ans,sum(imos[i]))
print(ans)

Measured memory_bytes: 37236
s=input()
n=len(s)
count=0
for i in range(n):
  if i%2==0 :
    if s[i]=='R' or s[i]=='U' or s[i]=='D':
      count+=1
  elif i%2==1 or i==0:
    if s[i]=='L' or s[i]=='U' or s[i]=='D':
      count+=1
if count==n:
  print('Yes')
else:
  print('No')

Measured memory_bytes: 3064
#include <stdio.h>

int main()
{
	long A, B, K;
	scanf("%ld %ld %ld", &A, &B, &K);
	
	if(A > K){
		A = A - K;
	}
	else
	{
		K = K - A;
		A = 0;
		
		if(B < K){
			B = 0;
		}
		else
		{
			B = B - K;
		}
	}
	
	printf("%ld %ld\n", A, B);
}


Measured memory_bytes: 128
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<set>
using namespace std;

int main(){
    int n;
    cin>>n;
    string w;
    cin>>w;
    if(w.length()<=n) cout<<w<<endl;
    else cout<<w.substr(0,n)<<"..."<<endl;
    return 0;
}


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

int main(){
  int a,b;
  cin >> a >> b;
  if(1<=a&&a<=9){
    if(1<=b&&b<=9){
      cout << a*b << endl;
      return 0;
    }
    else
    cout<<"-1"<< endl;
    return 0;
  }
  cout <<"-1"<<endl;
}

Measured memory_bytes: 256
#include <stdio.h>
#include <cstdio>
#include <iostream>
#include <iomanip>
#include <queue>
#include <set>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <cmath>

int main(){

  long long int H, N, tmp;
  std::vector<long long int> A;

  scanf("%lld%lld", &H, &N);
  for(long long int i = 0; i < N; i++){
    scanf("%lld", &tmp);
    A.push_back(tmp);
  }  

  long long int sum = 0;
  for(long long int i = 0; i < N; i++){
    sum += A[i];
  }

  std::cerr << "Answer: " << std::endl;
  if(sum >= H){
    std::cout << "Yes" << std::endl;
  }
  else{
    std::cout << "No" << std::endl;
  }

  return 0;
}


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

int main()
{
    int a[3],K,sum=0,max=-1,m=-1;
    for(int i=0;i<3;i++){
        scanf("%d",&a[i]);
        if(a[i]>max)
        {
            max=a[i];
            m=i;
        }
    }
    scanf("%d",&K);
    for(int i=0;i<3;i++){
        if(i==m){
            sum+=a[i]*pow(2,K);
        }
        else
            sum+=a[i];
    }
    cout<<sum;
    return 0;
}

Measured memory_bytes: 256