akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <vector>
using namespace std;

int main(){
  int N,k,count1=0,count2=0;
  cin >> N;
  vector<int> a(N);
  vector<int> count(8,0);
  for(int i=0;i<N;i++)cin >> a.at(i);
  for(int i=0;i<N;i++){
    k=a.at(i);
    if(1<=k && k<400)count.at(0)++;
    else if(400<=k && k<800)count.at(1)++;
    else if(800<=k && k<1200)count.at(2)++;
    else if(1200<=k && k<1600)count.at(3)++;
    else if(1600<=k && k<2000)count.at(4)++;
    else if(2000<=k && k<2400)count.at(5)++;
    else if(2400<=k && k<2800)count.at(6)++;
    else if(2800<=k && k<3200)count.at(7)++;
    else if(3200<=k)count2++;
  }
  for(int i=0;i<8;i++){
    if(count.at(i)>0)count1++;
  }
  if(count1==0){
    cout << 1 << " " << count2 << endl;
    return 0;
  }
  cout << count1 << " " << count1+count2 << endl;
  return 0;
}


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

#define int long long
#define fr(i,n) for(int i=0;i<n;i++)
#define frr(i,n) for(int i=n;i>=0;i--)
#define fra(i,a,n) for(int i=a;i<n;i++)
#define frra(i,a,n) for(int i=a;i>=n;i--)
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define ff first
#define ss second
#define endl '\n'

typedef pair<int,int> ii;
typedef map<int,int> mii;
typedef set<int> si;
typedef unordered_map<int,int> uii;
typedef unordered_set<int> usi;
typedef vector<int> vi;
typedef vector<ii> vii;

const int mod = 1e9+7;
const int inf = 1e9;
const int MAXN = 2e5+5;
const double eps = 1e-6;

void solve(){
    //CODE BEGINS
    int n,m;
    cin>>n>>m;
    vector<vi>adj(n);
	vi h(n);
	fr(i,n)cin>>h[i];
    fr(i,m){
		int u,v;
		cin>>u>>v;
		--u,--v;
		adj[u].eb(v);
		adj[v].eb(u);
	}
	int cnt = 0;
	fr(i,n){
		bool ok = true;
		for(auto j:adj[i]){
			if(h[i]<=h[j]){
				ok = false;
				break;
			}
		}
		if(ok)cnt++;
	}
	cout<<cnt<<endl;
}

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


Measured memory_bytes: 9796
#include<iostream>
#include<math.h>
#include<vector>
#include<algorithm>
#include<numeric>
#include<map>
#include<queue>
using namespace std;

int main(){
    int H,W;cin>>H>>W;
    vector<string> S(2010);
    for(int i=0;i<H;i++)cin>>S[i];
    
    int** right=new int*[H];
    int** left=new int*[H];
    int** up=new int*[H];
    int** down=new int*[H];

    for(int i=0;i<H;i++){
        right[i]=new int[W];
        left[i]=new int[W];
        up[i]=new int[W];
        down[i]=new int[W];
    }
    
    //初期化
    for(int j=0;j<W;j++)
        up[0][j]=down[H-1][j]=0;
    for(int i=0;i<H;i++)
        left[i][0]=right[i][W-1]=0;
    
    //漸化式
    for(int i=0;i<H;i++){
        for(int j=1;j<W;j++){
            if(S[i][j-1]=='.')left[i][j]=1+left[i][j-1];
            else              left[i][j]=0;

            if(S[i][W-j]=='.')right[i][W-1-j]=1+right[i][W-j];
            else              right[i][W-1-j]=0;
        }
    }
    for(int j=0;j<W;j++){
        for(int i=1;i<H;i++){
            if(S[i-1][j]=='.')up[i][j]=1+up[i-1][j];
            else              up[i][j]=0;

            if(S[H-i][j]=='.')down[H-1-i][j]=1+down[H-i][j];
            else          down[H-1-i][j]=0;
        }
    }

    int light,ans=0;
    for(int i=0;i<H;i++){
        for(int j=0;j<W;j++){
            if(S[i][j]=='.'){
                light=right[i][j]+left[i][j]+up[i][j]+down[i][j]+1;
                ans=max(ans,light);
            }
        }
    }
    cout<<ans<<endl;
    
    for(int i=0;i<H;i++){
        delete[] right[i];
        delete[] left[i];
        delete[] up[i];
        delete[] down[i];
    }
    delete[] right;
    delete[] left;
    delete[] up;
    delete[] down;

    return 0;

}

Measured memory_bytes: 67072
#include <bits/stdc++.h>
#define mem(a,b) memset(a,b,sizeof(a))
#define inf 0x3f3f3f3f
#define ll long long
#define pb push_back
#define PII pair<int,int>
#define X first
#define Y second
#define MP make_pair
#define PI acos(-1.0)
#define eps 1e-8
const int maxn=3e5+10;
const int mod=998244353;
using namespace std;

ll n;
set<ll>st;

int main()
{
    scanf("%lld",&n);
    for(ll i=2;i*i<=n;i++)
    {
        if(n%i==0)
        {
            ll tmp=n;
            while(tmp%i==0) tmp/=i;
            if(tmp%i==1)
                st.insert(i);
        }
        if((n-1)%i==0)
            st.insert(i),st.insert((n-1)/i);
    }
    st.insert(n-1);
    st.insert(n);
    st.erase(1);
    printf("%d",st.size());
    // system("pause");
    return 0;
}

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

using namespace std;

int main(){
    int K, N;
    cin >> K >> N;
    int A[N];
    for(int i=0; i<N; i++) cin >> A[i];
    int dist = 0;
    for(int i=0; i<N; i++){
        int circ = 0;
        if(i == N - 1) circ = K;
        dist = max(dist, A[(i + 1) % N] - A[i] + circ);
    }    
    cout << K - dist << endl;
    return 0;
}

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

int main() {
	int n,m;cin>>n>>m;
	vector<int> a(m),b(m);
	vector<vector<int>> l(n,vector<int>(0));
	for(int i=0;i<m;i++){
		cin>>a[i]>>b[i];
		a[i]--;
		b[i]--;
		l[a[i]].push_back(b[i]);
		l[b[i]].push_back(a[i]);
	}
	int flag=0;
	for(int i=0;i<l[0].size();i++){
		int num=l[0][i];
		for(int j=0;j<l[num].size();j++){
			if(l[num][j]==n-1){
				flag=1;
			}
		}
	}
	if(flag){
		cout<<"POSSIBLE"<<endl;
	}else{
		cout<<"IMPOSSIBLE"<<endl;
	}
	return 0;
}

Measured memory_bytes: 13552
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)   FOR(i,0,n)
#define pb emplace_back
typedef long long ll;
typedef pair<int,int> pint;

const int MAX_N=2000001;
const int mod=1000000007;
ll fact[MAX_N+1];
ll inv[MAX_N+1],finv[MAX_N+1];
int inv_init(ll n,ll p){
    inv[1]=1;
    FOR(i,2,n+1) inv[i]=p-(p/i)*inv[p%i]%p;
    fact[0]=finv[0]=1;
    FOR(i,1,n+1){
        fact[i]=fact[i-1]*i%p;
        finv[i]=finv[i-1]*inv[i]%p;
    }
    return 0;
}
ll comb_mod(ll n,ll k,ll p){
    if(k<0||n<k) return 0;
    return finv[k]*finv[n-k]%p*fact[n]%p;
}

int x,y;
int main(){
    cin>>x>>y;
    if((x+y)%3!=0){
        cout<<0<<endl;
    }
    else{
        inv_init((x+y)/3,mod);
        cout<<comb_mod((x+y)/3,(2*y-x)/3,mod)<<endl;
    }
    return 0;
}

Measured memory_bytes: 20736
#include <iostream>

using namespace std;

int digit(int x){
    int ans = 0;

    while(x > 0){
        ans += (x%10);
        x /= 10;
    }

    return ans;
}

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

    if(n%digit(n) == 0)cout << "Yes" << endl;
    else cout << "No" << endl;

    return 0;
}

Measured memory_bytes: 256
import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        int p = sc.nextInt();
        int ahash = a * 3;
        p = p + ahash;

        int num = p / 2;
        System.out.println(num);
    }
}

Measured memory_bytes: 21844
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>

using namespace std;

#define ll long long
#define P pair<int, int>
#define FOR(i, N) for (int i = 0; i < (int)N; i++)
#define FORIN(i, a, b) for (int i = a; i < (int)b; i++)
#define ALL(x) (x).begin(), (x).end()
#define GI(name) \
  int(name);     \
  scanf("%d", &(name))
#define GI2(name1, name2) \
  int(name1), (name2);    \
  scanf("%d %d", &(name1), &(name2))
#define GI3(name1, name2, name3) \
  int(name1), (name2), (name3);  \
  scanf("%d %d %d", &(name1), &(name2), &(name3))
#define GVI(name, size)    \
  vector<int>(name)(size); \
  FOR(i, (size)) scanf("%d", &(name)[i])
#define GS(name) \
  string(name);  \
  cin >> (name);
#define MOD 1000000007
#define DEBUG(...) debug(__LINE__, ":" __VA_ARGS__)

string to_string(string s) {
  return s;
}

template <class T>
string to_string(vector<T> v) {
  string ret = "{";
  FOR(i, v.size() - 1) { ret += to_string(v[i]) + ","; }
  if (v.size() > 0) {
    ret += to_string(v.back());
  }
  ret += "}";
  return ret;
}

void debug() {
  cerr << endl;
}

template <class Head, class... Tail>
void debug(Head head, Tail... tail) {
  cerr << to_string(head) << " ";
  debug(tail...);
}

void print() {
  cout << endl;
}

template <class Head, class... Tail>
void print(Head head, Tail... tail) {
  cout << to_string(head);
  print(tail...);
}

int main() {
  GS(S);
  int n = S.size();
  int now_BC_count = 0;
  ll ans = 0;
  for (int i = n - 1; i >= 0; --i) {
    if (S[i] == 'A') {
      ans += now_BC_count;
    } else if (i < n - 1 && S[i] == 'B' && S[i + 1] == 'C') {
      now_BC_count++;
    } else if (i == 0 || !(S[i - 1] == 'B' && S[i] == 'C')) {
      now_BC_count = 0;
    }
  }
  print(ans);
  return 0;
}

Measured memory_bytes: 640
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <string.h>
#include <cstdio>
#include <tuple>
using namespace std; using ll = long long;
using vl = vector<ll>;
ll MOD = 998244353;
int main() {
	ll N, S;
	cin >> N >> S;
	vl A(N);
	for (ll i = 0; i < N; i++) cin >> A[i];
	vl dp(S + 1);
	// 「0個目まで見て和が0」のみ1
	dp[0] = 1;
	for (ll i = 0; i < N; i++) {
		// 前回までのdpテーブルを保存する配列Pを用意
		vl P(S + 1);
		//配列Pに配列dpの内容をコピー & 配列dpは空にする
		swap(dp, P);
		for (ll j = 0; j <= S; j++) {
			// 遷移【1】：i+1番目の数を使わない場合
			(dp[j] += P[j] * 2) %= MOD;
			// 遷移【2】：i+1番目の数を使う場合
			if (j + A[i] <= S) (dp[j + A[i]] += P[j]) %= MOD;
		}
	}
	cout << dp[S] << endl;
}

Measured memory_bytes: 3652
module Main where

findABC :: String -> (Int, String)
findABC =
  foldl (\(occ, acc) c ->
    case acc of
      "" | c == 'A' -> (occ, "A")
      "A" | c == 'B' -> (occ, "AB")
      "AB" | c == 'C' -> (occ + 1, "")
      _ | c == 'A' -> (occ, "A")
      _ -> (occ, "")) (0, "")

main =
  getLine >>
  getLine >>= \str ->
  let (occ, _) = findABC str
  in putStrLn $ show occ


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

template<class I, class BiOp = I (*) (I, I)>
class SegTree {
private:
  int n;
  std::vector<I> dat, lazy;
  BiOp op;
  I e;

public:
  SegTree(int n_, BiOp op, I e) : op(op), e(e) {
    n = 1;
    while (n < n_) n *= 2;
    dat.resize(2 * n - 1, e);
    lazy.resize(2 * n - 1, 0);
  }

  void eval(int k, int l, int r) {
    // cerr << "k = " << k << ", l = " << l << ", r = " << r << endl;
    dat[k] += lazy[k] * (r - l);
    if (k < n - 1) {
      lazy[2 * k + 1] += lazy[k];
      lazy[2 * k + 2] += lazy[k];
    }
    lazy[k] = 0;
  }

  void add(int a, int b, I x, int k = 0, int l = 0, int r = -1) {
    if (r == -1) r = n;
    eval(k, l, r);
    if (b <= l || r <= a) return;
    if (a <= l && r <= b) {
      lazy[k] += x;
      eval(k, l, r);
    }
    else {
      add(a, b, x, 2 * k + 1, l, (l + r) / 2);
      add(a, b, x, 2 * k + 2, (l + r) / 2, r);
      dat[k] = op(dat[2 * k + 1], dat[2 * k + 2]);
    }
  }

  // return op[a..b)
  // k: node id, [l, r): node interval
  I query(int a, int b, int k = 0, int l = 0, int r = -1) {
    if (r == -1) r = n;
    eval(k, l, r);
    if (r <= a || b <= l) return e;
    if (a <= l && r <= b) return dat[k];
    I vl = query(a, b, 2 * k + 1, l, (l + r) / 2);
    I vr = query(a, b, 2 * k + 2, (l + r) / 2, r);
    return op(vl, vr);
  }

  void print() {
    int j = 2;
    for (int i = 0; i < 2 * n - 1; i++) {
      cerr << "(" << dat[i] << ", " << lazy[i] << ")";
      if (i == j - 2) {
        cerr << endl;
        j *= 2;
      }
      else {
        cerr << " ";
      }
    }
  }
};

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

  int n, q;
  cin >> n >> q;
  SegTree<ll> seg(n, [](ll a, ll b){ return a + b; }, 0ll);

  // seg.print();

  rep(i, q) {
    int t;
    cin >> t;
    if (t == 0) {
      int a, b;
      ll v;
      cin >> a >> b >> v;
      a--;
      seg.add(a, b, v);
    }
    else {
      int a, b;
      cin >> a >> b;
      a--;
      cout << seg.query(a, b) << endl;
    }

    // cerr << "i = " << i << endl;
    // seg.print();
    // cerr << endl;
  }

  return 0;
}



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

int main(void) {
  int A, B;
  cin >> A >> B;

  int ans = max({A + B, A - B, A * B});

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

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

int main() {
  string s;
  cin>>s;
  int n=s.size();
  int ans=0;
  rep(i,(n+1)/2) {
    if (s[i]!=s[n-1-i]) ans++;
  }
  cout<<ans<<endl;
  return 0;
}



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

int b[1000006];
string S;
long long int MOD = 1000000007;



long long int C[1000006], D[1000006];

int main(void) {
	cin >> S;

	int N = S.size();

	for (int i = 1; i <= N; i++) {
		if (S[N -i] == '0') { b[i] = 0; }
		else { b[i] = 1; }
	}

	/*for (int i = 1; i <= N; i++) {
		cout << b[i] << endl;
	}*/

	//cout << "check" << endl;

	C[0] = 1;
	C[1] = 2;
	for (int i = 2; i <= 1000002; i++) {
		C[i] = C[i - 1] *(long long int) 2;
		C[i] %= MOD;
	}

	//cout << "check" << endl;

	D[0] = 1;
	D[1] = 3;
	for (int i = 2; i <= 1000003; i++) {
		D[i] = D[i - 1] * (long long int)  3;
		D[i] %= MOD;
	}

	long long int ans = 0;
	int num1 = 0;

	//cout << "check" << endl;

	for (int n = N+1; n >= 1; n--) {
		if (b[n] == 1) {  ans += C[num1]*D[n - 1]; ans %= MOD; }
		if (b[n] == 1) { num1++; }
	}
	//cout << "check" << endl;

	ans += C[num1];
	//ans += 1;
	ans %= MOD;
	
	/*for (int i = 0; i <= 20; i++) {
		cout << "i= " <<i << " "<<CALC(i) << endl;
	}*/


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

Measured memory_bytes: 16896
use strict;
use warnings;

sub main {
    chomp(my $S = <STDIN>);
    print solver($S);
}
main() unless caller;

sub solver {
    my ($S) = @_;
    return 'Cloudy' if($S eq 'Sunny');
    return 'Rainy' if($S eq 'Cloudy');
    return 'Sunny' if($S eq 'Rainy');
}

Measured memory_bytes: 640
#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)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const double PI=acos(-1);
const int INF = numeric_limits<int>::max();

int main(){
    int a, b;
    cin >> a >> b;

    for (int i = 1; i <= 3; ++i) {
        if (i == a || i == b) continue;
        else cout << i << endl;
    }

    return 0;
    
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <list>
#include <set>
#include <queue>
#include <map>
#include <algorithm>
#include <functional>
#include <string>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <tuple>
using namespace std;

#define REP(i,p,n) for(ll i=p;i<ll(n);++i)
#define rep(i,n) REP(i,0,n)

using ll = long long int;
using pll = pair<ll, ll>;

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

    bool res = false;

    rep (i, s.size() - 1) { res |= s[i] == s[i + 1]; }

    cout << (res ? "Bad" : "Good") << endl;

    return 0;
}


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

#define fastio 			ios::sync_with_stdio(0);	cin.tie(0); cout.tie(0);  cout<<fixed;  cout<<setprecision(12);	
#define randomINT 		mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
#define	newl 			cout<<"\n"
#define DISP(as)		for(auto it : as) cout<<it<<" ";newl;
#define all(x)         	(x).begin(),(x).end()
#define mset(x,val)    	memset(x,val,sizeof(x))
#define newl           	cout<<"\n"
#define pb             	push_back
#define mp             	make_pair
#define f 				first
#define s 				second
#define dline          cerr<<"///REACHED///\n";
#define deb1(x)        cerr<<#x<<" = "<<x<<'\n';
#define deb2(x,y)      cerr<<'['<<#x<<','<<#y<<"] = "<<'['<<x<<','<<y<<']'<<'\n';
#define deb3(x,y,z)    cerr<<'['<<#x<<','<<#y<<','<<#z<<"] = "<<'['<<x<<','<<y<<','<<z<<']'<<'\n';

typedef long long 				ll;
typedef long double 			ld;
typedef vector<ll> 				vll;
typedef pair<ll ,ll> 			pll;
typedef pair<ld,ld> 			pld;
typedef unordered_map<ll,ll> 	um;
typedef vector<pll> 			vpll;

const ll 	MAX5 	= 	1e+5+7;
const ll 	MAX7 	= 	1e+7+7;
const ll 	MAXN 	= 	MAX7;
const ll   	INF   	=  	0x7f7f7f7f7f7f7f7f;
const int  	INFi 	=  	0x7f7f7f7f;
const ll 	MOD		=  	1e+9+7;
const ll 	N 		= 	2*1e6;

vll adj[MAXN];ll visit[MAXN]={};
int dx8[]={0,1,1,1,0,-1,-1,-1}, dy8[]={1,1,0,-1,-1,-1,0,1};
int dx4[]={0,1,0,-1}, dy4[]={1,0,-1,0};

// <------------- Declare Variables Here ------------> //

ll T=1;
ll n,x,y,m,q;
string s,t;
vll a;
// <------------- Implement Functions Here ----------> //

// <------------- Start of main() -------------------> //

void MAIN() {
	cin >> n;
	a = vll(n);
	vll dp(n,INF);
	for(ll i=0;i<n;i++) cin>>a[i];	
	
	dp[0] = 0;
	dp[1] = abs(a[1] - a[0]);
	

	for(ll 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]));

	//DISP(dp);
	cout<<dp[n-1]; 
}

int main() {
	fastio;randomINT;
	//cin>>T;
	while(T--) {
		MAIN();
	}
	return 0;
}



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

int main(){
	string s;
	cin >> s;
	int n = s.length();
	int ans = 0;
	for(int i=0; i<n; i++){
		if(s[i] == ')') continue;
		if(s[i] == '*') break;
		bool star = false;
		int count = 1;
		for(int j=i+1; j<n; j++){
			if(s[j] == '('){
				count++;
			}else if(s[j] == ')'){
				count--;
				if(count == 0) break;
			}else{
				star = true;
			}
		}
		if(count==0 and star){
			ans++;
		}
	}
	cout << ans << endl;
	return 0;
}


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

int main(){
  int n; cin>>n;
  vector<long long> num(5,0);
  string x="MARCH";
  for(int i=0;i<n;i++){
    string s; cin>>s;
    for(int j=0;j<5;j++){
      if(s[0]==x[j]) num[j]++;
    }
  }
  long long ans=0;
  for(int i=0;i<3;i++){
    for(int j=i+1;j<4;j++){
      for(int k=j+1;k<5;k++){
        ans+=num[i]*num[j]*num[k];
      }
    }
  }
  cout<<ans<<endl;
}


Measured memory_bytes: 256
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        sc.nextInt();
        int K = sc.nextInt();
        String S = sc.next();

        System.out.println(solve(S, K));

        sc.close();
    }

    static String solve(String S, int K) {
        return IntStream.range(0, S.length())
                .mapToObj(i -> String.valueOf((i == K - 1) ? Character.toLowerCase(S.charAt(i)) : S.charAt(i)))
                .collect(Collectors.joining());
    }
}

Measured memory_bytes: 36108
s = input()

t = 'a'
for i in range(1, len(s)):
    if s[i] == 'C':
        t += 'c'
    else:
        t += s[i]

if s[0] == 'A' and s[2:-1].count('C') == 1 and t.islower():
    print('AC')
else:
    print('WA')

Measured memory_bytes: 38444
import sys
import math  # noqa
import bisect  # noqa
import queue  # noqa


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)

    # divisors.sort()
    return divisors


def input():
    return sys.stdin.readline().rstrip()


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

    if N == 1:
        return print(M)

    divisors = make_divisors(M)
    divisors.sort(reverse=True)
    for r in divisors[1:]:
        if M // r < N:
            continue
        else:
            return print(r)


if __name__ == '__main__':
    main()


Measured memory_bytes: 38892
n=int(input())
B = list(map(int,input().split()))
if 0 in B:
  print(0)
else:
  c = 1
  ok = 1
  for i in range(n):
      c=c*B[i]
      if c>1000000000000000000:
          print(-1)
          ok = 0
          break
  if ok==1:
	  print(c)


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

int main(){
  int X;cin>>X;
  int ans=1;
  for(int i=0;i<X;i++){
    int x=1;
    for(int j=0;j<X;j++){
      x*=i;
      if(x>X)break;
      if(j>0&&ans<x)ans=x;
    }    
  }
  cout<<ans<<endl;
  return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <sstream>
#include <stack>
#include <iomanip>
#include <numeric>
#include <string>
#include <cstring>
#include <algorithm>
#include <functional>
#include <cstdlib>
#include <map>
#include <set>
#include <vector>
#include <utility>
#include <queue>
#include <cmath>

#define BEGIN(x) x.begin()
#define END(x) x.end()
#define ALL(x) BEGIN(x), END(x)
#define PAIR make_pair
#define VEC(type) vector<type >
#define endl '\n'

#define FOR(i, A, B) for(auto i = (A);i != (B); i++)
#define FORD(i, A, B) for(auto i = (A);i != (B); i--)

#define READRANGE(begin, end) FOR(it, begin, end) cin >> *it
#define READVEC(V) READRANGE(BEGIN(V), END(V))

using namespace std;

typedef long long lint;
typedef pair<int, int> Pii;
typedef pair<int, lint> Pil;
typedef pair<lint, lint> Pll;
typedef pair<lint, int> Pli;

// ---- BEGIN LIBRARY CODE ----
// ---- END LIBRARY CODE ----
void io_init()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
};

int main(int argc, char **argv)
{
    io_init();

    // Actual program code starts here.
    int N;
    cin >> N;
    VEC(int) A(N + 1);
    READRANGE(A.begin() + 1, A.end());
    VEC(int) Parity(N + 1, -1);

    FORD(i, N, 0) {
        int total = 0;
        for (int j = 2 * i;j <= N;j += i)
            total += Parity[j] % 2;
        Parity[i] = (A[i] + total) % 2;
    }

    VEC(int) boxes;
    FOR(i, 1, N + 1)
        if (Parity[i])
            boxes.push_back(i);

    cout << boxes.size() << "\n";
    FOR(i, 0, boxes.size())
        cout << boxes[i] << " ";
    cout << endl;
    return 0;
};


Measured memory_bytes: 3192
#include <bits/stdc++.h>
#include <math.h>
#include <chrono>
using namespace std;
#pragma GCC optimize("-O3")
#define endl "\n"
#define mp make_pair
#define st first
#define nd second
#define pii pair<int, int>
#define pb push_back
#define _upgrade ios_base::sync_with_stdio(0), cout.setf(ios::fixed), cout.precision(10) //cin.tie(0); cout.tie(0);
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define FWD(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define fwd(i, a, b) for (int i = (a); i < (b); ++i)
#define all(c) (c).begin(), (c).end()
#define what(x) cerr << #x << " is " << x << endl;
#define int long long

main()
{
    _upgrade;
    int n;
    cin >> n;
    int ile_zer = 0;
    vector<pii> X;
    rep(i, n)
    {
        int a;
        cin >> a;
        if (a == 0)
            ile_zer++;
        else
        {
            if (ile_zer > 0)
            {
                X.pb(mp(0, ile_zer));
                ile_zer = 0;
            }
            X.pb(mp(a, 1));
        }
    }
    if (ile_zer > 0)
    {
        X.pb(mp(0, ile_zer));
        ile_zer = 0;
    }
    n = X.size();
    int wynik = 0;
    rep(i, n)
    {
        int j = i + 1;
        int sum = X[i].st;
        int xoor = X[i].st;
        int ile = X[i].nd;
        while (j < n)
        {
            xoor = xoor ^ X[j].st;
            sum = sum + X[j].st;
            if (xoor == sum)
            {
                ile += X[j].nd;
                j++;
            }
            else
                break;
        }
        //cerr << wynik << " " << ile << endl;
        wynik = wynik + X[i].nd * (ile) - (X[i].nd * (X[i].nd - 1)) / 2;
    }
    cout << wynik << endl;
}

Measured memory_bytes: 6384
class Array
  def swap!(a, b)
    raise ArgumentError unless a.between?(0, self.count-1) && b.between?(0, self.count-1)

    self[a], self[b] = self[b], self[a]

    self
  end
end

def partition(p, r)
  x = @B[r]
  i = p - 1
  (p...r).each do |j|
    if @B[j].value <= x.value
      i += 1
      @B.swap!(i, j)
    end
  end
  @B.swap!(i+1, r)
  
  i+1
end

def quick_sort(n, p, r)
  if p < r
    q = partition(p, r)
    quick_sort(n, p, q-1)
    quick_sort(n, q+1, r)
  end
end

def merge(n, left, mid, right)
  n1 = mid - left
  n2 = right - mid
  n1.times do |i|
    @L[i] = @A[left + i]
  end
  
  n2.times do |i|
    @R[i] = @A[mid + i]
  end
  
  @L[n1] = Card.new
  @R[n2] = Card.new
  @L[n1].value = SENTINEL
  @R[n2].value = SENTINEL
  
  i = 0
  j = 0
  (left...right).each do |k|    
    if @L[i].value <= @R[j].value
      @A[k] = @L[i]
      i += 1
    else
      @A[k] = @R[j]
      j += 1
    end
  end
end

def merge_sort(n, left, right)
  if left+1 < right
    mid = (left + right) / 2
    merge_sort(n, left, mid)
    merge_sort(n, mid, right)
    merge(n, left, mid, right)
  end
end

@L = []
@R = []
SENTINEL = 20000000000.freeze

Card = Struct.new(:suit, :value)
@A = []
@B = []
stable = true

n = gets.to_i

n.times do |i|
  inputs = gets.split
  @A[i] = Card.new
  @B[i] = Card.new
  @A[i].suit = inputs[0]
  @B[i].suit = inputs[0]
  @A[i].value = inputs[1].to_i
  @B[i].value = inputs[1].to_i
end

merge_sort(n, 0, n)
quick_sort(n, 0, n-1)

n.times do |i|
  stable = false if @A[i].suit != @B[i].suit
end

puts stable ? 'Stable' : 'Not stable'
@B.each do |card|
  puts "#{card.suit} #{card.value}"
end


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

#define loop(n) for(int i = 0;i < (int)(n);++i)
#define rep(i,n) for(int i = 0;i < (int)(n);++i)
#define all(vec) (vec).begin(),(vec).end()
#define sort(vec) std::sort(all(vec))
#define rev(vec) std::reverse(all(vec))
#define vec std::vector
#define cout std::cout

void input(){return;}
template<typename First,typename... Rest> void input(First &first,Rest&... rest){
    std::cin >> first;
    input(rest...);
}

void inputVec(){return;}
template<typename First,typename... Rest> void inputVec(vec<First> &first,Rest&... rest){
    int N = first.size();
    for(int i = 0;i < N;i++){
        std::cin >> first[i];
    }
    inputVec(rest...);
}

template<typename First,typename Second> void inputTwoVec(vec<First> &first,vec<Second>& second){
    int N = first.size();
    for(int i = 0;i < N;i++){
        std::cin >> first[i] >> second[i];
    }
}

void calculate(){
    int n,k;
    input(n,k);
    vec<int> l(n);
    inputVec(l);
    sort(l);
    rev(l);
    int res = 0;
    rep(i,k){
        res += l[i];
    }
    cout << res << '\n';
}

int main(int,char**){
    calculate();    
}




Measured memory_bytes: 256
import math
def c(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
  
n=int(input())

ans=0
for i in range(1,n//3+1):
  ans+=c(n-2*i-1,i-1)
print(ans%(10**9+7))

Measured memory_bytes: 9196
#include <iostream>

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

int main()
{
  int group[] = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1};
  int x, y;
  cin >> x >> y;
  if(group[x] == group[y]) cout << "Yes" << endl;
  else cout << "No" << endl;
}


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

using namespace std;

int main() {
	int a, b;
	cin >> a >> b;

	int result;

	if (a >= 13) {
		result = b;
	} else if (a < 13 && a >= 6) {
		result = b / 2;
	} else {
		result = 0;
	}

	cout << result;
}


Measured memory_bytes: 256
import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.regex : regex;
import std.container;
import std.bigint;
import std.ascii;


void main()
{
  int a, b;
  readf("%s %s\n", &a, &b);
  if (!a || !b || (a < 0 && b > 0) || (a > 0 && b < 0)) {
    writeln("Zero");
  } else if (a < 0 && b < 0 && abs(a-b) % 2 == 0) {
    writeln("Negative");
  } else {
    writeln("Positive");
  }
}


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

using namespace std;

int main() {

	int n;
	cin >> n;

	int t, x, y;
	int oldt=0, oldx=0, oldy=0;
	int dist = 0;
	int dt = 0;
	for (int i = 0; i < n; i++) {

		cin >> t >> x >> y;

		dist = abs(x - oldx) + abs(y - oldy);
		dt = t - oldt;

		if (dist > dt) { cout << "No" << endl; return 0; }
		else if ((dist - dt) % 2 != 0) {
			cout << "No" << endl;
			return 0;
		}
	}
	cout << "Yes" << endl;
}

Measured memory_bytes: 256
#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;
typedef long long ll;
typedef double db;
typedef vector <ll> vll;
typedef pair <ll, ll> pll;
#define pb push_back
#define mp make_pair
#define MAX 1000000
#define mod 1000000007
#define all(_) _.begin(), _.end()
#define F first
#define S second
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>

int main()
{
    ios_base :: sync_with_stdio(false);
    cin.tie(NULL), cout.tie(NULL);
    string s;
    cin >> s;
    cout << (s == "AAA" || s == "BBB" ? "No" : "Yes") << endl; 
    return 0;
}

Measured memory_bytes: 256
using System;
using System.Linq;

public class Test
{
	public static void Main()
	{
		// your code goes here
		
		var hoi = Console.ReadLine().Split().Select(nyan => int.Parse(nyan)).ToArray(); //この呪文覚えたい
		int n = hoi[0];
		int m = hoi[1];
		
		var a = Console.ReadLine().Split().Select(nyaan => int.Parse(nyaan)).ToArray(); //この呪文覚えたい
		
		int sum = 0;
		for(int i=0;i!=m;i++){
			
			sum += a[i];
			
		}
		
		int ans = n - sum;
		if(ans<0){
			
			ans = -1;
			
		}
		
		Console.WriteLine(ans);
		
	}
}

Measured memory_bytes: 29216
#include<iostream>
#include<algorithm>
#include <cassert>
#include<string>
#include<vector>
#include <utility>
#include <math.h>
#include<cmath>
#include<map>
#include <limits>
# include <iomanip>
#define MOD 1000000009;
typedef long long ll;
#define rep(i,rept)	for(ll i = 0; i<rept;i++)
using namespace std;
int fibkaku[1000];
int gcd(int a, int b) {
	while (a % b != 0) {
		int c = 0;
		c = a % b;
		a = b;
		b = c;
	}
	return  b;
}



int main() {
	long long int N = 0, counter = 0, a = 0, b = 0, c = 0, kaku[100002], p = 0, s = 0, r = 3;
	bool okada = false, okada2 = false, okada3 = false;
	string input;

	int dp[1003];
	dp[1] = 1; dp[2] = 1;
	cin >> a;
	rep(i, a) {
		cin >> kaku[i];
	}
	dp[0] = 0, dp[1] = abs(kaku[1] - kaku[0]);
	for (int i = 2; i < a; i++) {
		dp[i] = min(dp[i - 1] + abs(kaku[i] - kaku[i - 1]),dp[i-2]+abs(kaku[i]-kaku[i-2]));
		
    }
	cout << dp[a-1] << endl;

}


Measured memory_bytes: 1024
X, Y = map(int, input().split())

ans = -1

if X % Y == 0:
    pass

else:
    i = 1
    while True:
        num = X * i
        if num > 10**18:
            break
        elif num % Y != 0:
            ans = num
            break
        else:
            i += 1
print(ans)

Measured memory_bytes: 3060
#include<iostream>
using namespace std;
int n,m,u,v,fa[100007];
int fin(int p){
	if(p==fa[p])return p;
	else return fa[p]=fin(fa[p]);
}
int main(){
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;i++)fa[i]=i;
	int cnt=0;
	for(int i=1;i<=m;i++){
		cin>>u>>v;
		if(fin(u)!=fin(v)){
			cnt++;
			fa[fin(u)]=fin(v);
		}
	}
	printf("%d\n",n-1-cnt);
}


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

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

  ll H; cin >> H;
  ll W; cin >> W;
  ll K; cin >> K;
  vector<vector<ll>> S(H, vector<ll>(W, 0));
  for (ll i = 0; i < H; i++) {
    string s; cin >> s;
    for (ll j = 0; j < W; j++) {
      S[i][j] = s[j] - '0';
    }
  }
  ll bitH = (1 << (H - 1));

  ll ans = H * W;
  for (ll i = 0; i < bitH; i++) {
    ll tempAns = 0;
    ll areaCnt = 0, tempi = i;

    for (ll j = 0; j < H; j++) {
      areaCnt += (tempi % 2);
      tempi /= 2;
    }
    tempAns = areaCnt;
    areaCnt++;

    vector<ll> cnt(areaCnt, 0);
    for (ll j = 0; j < W; j++) {
      ll area = 0;
      vector<ll> cntNew(areaCnt, 0);

      for (ll k = 0; k < H; k++) {
        if (S[k][j]) cntNew[area]++;
        if (i & (1 << k)) area++;
      }
      // cout << cntNew[0]; for (int i = 1; i < cntNew.size(); i++) { cout << ' ' << cntNew[i]; }
      // cout << '\n';

      bool ok = true;
      bool stop = false;
      for (ll k = 0; k < areaCnt; k++) {
        if (cnt[k] + cntNew[k] > K) ok = false;
        if (cntNew[k] > K) stop = true;
      }
      if (ok) {
        for (ll k = 0; k < areaCnt; k++) {
          cnt[k] += cntNew[k];
        }
      } else {
        tempAns++;
        for (ll k = 0; k < areaCnt; k++) {
          cnt[k] = cntNew[k];
        }
      }
      if (stop) {
        tempAns = H * W;
        break;
      }
    }
    // cout << ' ' <<  tempAns << '\n';
    ans = min(ans, tempAns);
  }
  cout << ans << '\n';
  return 0;
}

Measured memory_bytes: 384
#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
#define rrep(i, n) for(int i = n-1; i >= 0; --i)
#define fi first
#define se second
using namespace std;
using lint = long long;
using uint = unsigned int;
using ulint = unsigned long long;
using ldouble = long double;
using pii = pair<int, int>;
using pli = pair<lint, lint>;
using pdd = pair<double, double>;
using pld = pair<ldouble, ldouble>;
using v1i = vector<int>;
using v1li = vector<lint>;
using v2i = vector<vector<int>>;
using v2li = vector<vector<lint>>;
using v3i = vector<vector<vector<int>>>;
using v3li = vector<vector<vector<lint>>>;
using v1b = vector<bool>;
using v2b = vector<vector<bool>>;
using v3b = vector<vector<vector<bool>>>;
using v1c = vector<char>;
using v2c = vector<vector<char>>;
using v3c = vector<vector<vector<char>>>;
constexpr lint mod1 = 1e9+7;
constexpr lint mod2 = 998244353;

int main(){
  int x, y; cin >> x >> y;
  if(y % 2 == 0 && y >= x * 2 && y <= x * 4) cout << "Yes\n";
  else cout << "No\n";
  return 0;
}

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

int main(void){
    // Your code here!
    int a=0,b=0;
    for(int i =0; i < 3; i++){
        int tmp;
        cin >> tmp;
        if(tmp == 7) a++;
        if(tmp == 5) b++;
    }
    
    cout << ((a == 1 && b == 2)? "YES": "NO") << endl;
}


Measured memory_bytes: 256
#include <algorithm>
#include <cassert>
#include <cmath>
#include <climits>
#include <cstdlib>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define DEBUG 1
using namespace std;
constexpr int kMod = 1000000007;
typedef long long LL;

int main() {
  int K, N; cin >> K >> N;
  vector<int> A(N);
  for (int i = 0; i < N; ++i) cin >> A[i];

  int vmin = min(A[N-1]-A[0], K + A[0]-A[1]);
  for (int i = 1; i < N; ++i) {
    vmin = min(vmin, K + A[i-1] - A[i]);
    vmin = min(vmin, K + A[i] - A[i-1]);
  }
  cout << vmin << endl;
}


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

template <class Cost = int>
struct Edge {
    int src, dst;
    Cost cost;
    Edge(int src = -1, int dst = -1, Cost cost = 1)
        : src(src), dst(dst), cost(cost){};

    bool operator<(const Edge<Cost>& e) const { return this->cost < e.cost; }
    bool operator>(const Edge<Cost>& e) const { return this->cost > e.cost; }
};

template <class Cost = int>
using Edges = std::vector<Edge<Cost>>;

template <class Cost = int>
using Graph = std::vector<std::vector<Edge<Cost>>>;

void solvetree(int n) {
    std::vector<int> ws(n);
    for (auto& w : ws) std::cin >> w;

    Graph<> graph(n);
    for (int i = 0; i < n - 1; ++i) {
        int u, v;
        std::cin >> u >> v;
        --u, --v;

        graph[u].emplace_back(u, v);
        graph[v].emplace_back(v, u);
    }

    std::vector<int> dist(n, -1);
    std::queue<int> que;

    dist[0] = ws[0];
    que.push(0);

    while (!que.empty()) {
        int v = que.front();
        que.pop();

        for (auto e : graph[v]) {
            int u = e.dst;
            if (dist[u] != -1) continue;

            dist[u] = dist[v] + ws[u];
            que.push(u);
        }
    }

    std::cout << *std::max_element(dist.begin(), dist.end())
              << std::endl;
}

void solve() {
    int n, m;
    std::cin >> n >> m;

    if (m == n - 1) {
        solvetree(n);
        return;
    }

    std::vector<int> ws(n);
    for (auto& w : ws) std::cin >> w;

    Graph<> graph(n);
    std::vector<int> deg(n, 0);

    while (m--) {
        int u, v;
        std::cin >> u >> v;
        --u, --v;

        ++deg[u], ++deg[v];
        graph[u].emplace_back(u, v);
        graph[v].emplace_back(v, u);
    }

    int ans = 0;

    std::queue<int> que;
    for (int v = 0; v < n; ++v) {
        if (deg[v] == 1) que.push(v);
    }

    std::vector<bool> onpath(n, false);
    onpath[0] = true;

    while (!que.empty()) {
        int v = que.front();
        que.pop();

        if (onpath[v]) {
            ans += ws[v];
            ws[v] = 0;
        }

        for (auto e : graph[v]) {
            int u = e.dst;
            if (--deg[u] == 1) {
                que.push(u);
                if (onpath[v]) onpath[u] = true;
            }
        }
    }

    std::vector<int> dist(n, -1);
    for (int v = 0; v < n; ++v) {
        if (deg[v] > 1) {
            ans += ws[v];
            ws[v] = 0;
            que.push(v);
            dist[v] = 0;
        }
    }

    while (!que.empty()) {
        int v = que.front();
        que.pop();

        for (auto e : graph[v]) {
            int u = e.dst;
            if (dist[u] != -1) continue;

            dist[u] = dist[v] + ws[u];
            que.push(u);
        }
    }

    ans += *std::max_element(dist.begin(), dist.end());
    std::cout << ans << std::endl;
}

int main() {
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    std::ios::sync_with_stdio(false);

    solve();

    return 0;
}



Measured memory_bytes: 10716
from itertools import product
N, M = map(int, input().split())
denkyu = []
for i in range(M):
    denkyu.append([int(j) for j in input().split()])
p = [int(i) for i in input().split()]
ls = [0, 1]
ans = 0
for x in product(ls, repeat=N):
    num = 0
    for j, denkyu_ in enumerate(denkyu):
        num_light_on = 0
        for i, s in enumerate(denkyu_):
            if i != 0 and x[s-1] == 1:
                num_light_on += 1
        if num_light_on%2 == p[j]:
            num += 1
    if num == M:
        ans += 1
print(ans)

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



int main() {
	int n; cin >> n;
	long long int now = 0;
	for (int i = 0; i < n; ++i) {
		int a, b; cin >> a;
		char c; cin >> c;
		cin >> b;
		if (c == '(') {
			now += b;
		}
		else {
			now -= b;
		}
		if (now)cout << "No" << endl;
		else cout << "Yes" << endl;
	}
	return 0;
}

Measured memory_bytes: 3112
#include<algorithm>
#include<chrono>
#include<climits>
#include<numeric>
#include<iomanip>
#include<iostream>
#include<map>
#include<queue>
#include<random>
#include<set>
#include<stack>
#include<unordered_map>
#include<unordered_set>
#include<vector>
#include<cassert>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<string>
using namespace std;
 
#define rep(i, a, b) for(auto i = (a); i < (b); i++)
#define rrep(i, a, b) for(auto i = (a); i > (b); i--)
#define all(v) (v).begin(), (v).end()
#define print(v) {for(auto x : v) cout << x << ' '; cout << endl;}
#define printn(v, n) {for(int _i = 0; _i < n; _i++) cout << *(v + _i) << ' '; cout << endl;}
 
typedef unsigned long long ull;
typedef long long ll;
 
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
 
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<pii> vpii;
 
const int MAXN = 1e5 + 20;
int n;
int a[MAXN];


int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cin >> n;
    for(int i = 0; i < n; i++)
    	cin >> a[i];
    int res = 0;
    int cur = 0;
    for(int i = 1; i < n; i++) {
    	if(a[i] <= a[i - 1]) {
    		cur++;
    		res = max(res, cur);
    	}
    	else
    		cur = 0;
    }
    cout << res << endl;


    return 0;
}











Measured memory_bytes: 768
#include <bits/stdc++.h>
#define rep(i, a) for (int i = (int)0; i < (int)a; ++i)
#define rrep(i, a) for (int i = (int)a - 1; i >= 0; --i)
#define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i)
#define RREP(i, a, b) for (int i = (int)a - 1; i >= b; --i)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 60;

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 gcd(ll n, ll m)
{
	ll tmp;
	while (m != 0)
	{
		tmp = n % m;
		n = m;
		m = tmp;
	}
	return n;
}

ll lcm(ll n, ll m)
{
	return abs(n) / gcd(n, m) * abs(m); //gl=xy
}

using namespace std;

template<typename T>
vector<T> sieve(T n){//n以下の整数について最小の素因数を調べる
    vector<T>prime(n+1);
		for(int i=0;i<=n;++i)prime[i]=i;
    for(int i=2;i*i<=n;i++){
        if(prime[i]<i)continue;
				for(int j=i*i;j<=n;j+=i){
					if(prime[j]>=i)prime[j]=i;
				}
    }
    return prime;
}

template<typename T>
map< T, int > osa_k(T n,const vector<T>& min_factor){//min_factorはsieveで求めた配列を使う
  map< T, int > ret;
  while(n>1){
		ret[min_factor[n]]++;
		n/=min_factor[n];
	}
  if(n != 1) ret[n] = 1;
  return ret;
}


void solve()
{
	ll n;
	cin>>n;
	vector<ll>v=sieve(n);
	// for(auto x:v){
	// 	cout<<x<<"\n";
	// }
	ll ans=1;
	REP(i,2,n+1){
		ll cul=1;
		for(auto x:osa_k((ll)i,v)){
			cul*=x.second+1;
		}
		ans+=cul*i;
	}
	cout<<ans<<"\n";
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout << fixed << setprecision(15);
	solve();
	return 0;
}


Measured memory_bytes: 81316
#include <iostream>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <iomanip>
#include <set>
#include <cmath>
#include <math.h>

using namespace std;
        
int main(){
    int r;
    cin>>r;
    int g;
    cin>>g;
    cout<<2*g-r<<endl;
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <cmath>
#include<algorithm>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<iomanip>
#define _USE_MATH_DEFINES
#include <math.h>
#include <functional>
using namespace std;

#define rep(i,x) for(int i=0;i<x;i++)
#define repn(i,x) for(int i=1;i<=x;i++)

typedef long long ll;
const ll INF = 1e17;
const ll MOD = 1000000007;
const ll MAX = 1000001;

ll max(ll a, ll b) {
	if (a > b) { return a; }
	return b;
}

ll min(ll a, ll b) {
	if (a > b) { return b; }
	return a;
}

ll gcd(ll a, ll b) {
	if (b == 0) { return a; }
	if (a < b) { return gcd(b, a); }
	return gcd(b, a%b);
}

ll lcm(ll a, ll b) {
	return a * b / gcd(a, b);
}

struct edge {
	ll ind;
	ll fr;
	ll to;
	ll d;
};


///////////////////////////


int main() {

	ll a, b;
	cin >> a >> b;

	if (a*b % 2 == 1) { cout << "Odd"; }
	else { cout << "Even"; }

	system("PAUSE");

	

}


Measured memory_bytes: 504
char*p,S[9999];
i,j;c[99],t;
main()
{
	for(gets(S),gets(p=S);*p;c[*p++]++)for(j=2e3;j--;)t-=(*p^p[j]^p[j+j])>86;
	printf("%ld",1L*c[66]*c[71]*c[82]+t);
}

Measured memory_bytes: 1664
#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1000000000000000
using namespace std;
typedef long long ll;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
using ll = long long;
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;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}
long long dp[13];
int main() {
    string S;
    cin >> S;
    //後ろからとく
    const int N = 13;
    // dp[k] -> 13で割った余りがKのパターン

    dp[0] = 1;
    int mul = 1;
    for(int i = S.length() - 1; i >= 0; i--) {
        vector<long long> nextDP(13, 0);
        char c = S[i];
        if(c == '?') {
            for(int k = 0; k < 10; k++) {
                for(int j = 0; j < N; j++) {
                    nextDP[(k * mul + j) % N] += dp[j];
                    nextDP[(k * mul + j) % N] %= MOD;
                }
            }

        } else {
            int k = (int)(c - '0');
            for(int j = 0; j < N; j++) {
                nextDP[(k * mul + j) % N] += dp[j];
                nextDP[(k * mul + j) % N] %= MOD;
            }
        }
        mul *= 10;
        mul %= N;

        REP(j, N) {
            dp[j] = nextDP[j];
            //        cout << dp[j] << " ";
        }
        // cout << endl;
    }
    cout << dp[5] << endl;
}

Measured memory_bytes: 512
#include <bits/stdc++.h>
#define PI 3.14159265359
using namespace std;
using ll = long long int;

int main() {
  int A, B, H, M;
  cin >> A >> B >> H >> M;

  complex<double> S(0, A);
  complex<double> L(0, B);
  complex<double> rot_S(cos(-1 * H * PI / 6 - M * PI / 360), sin(-1 * H * PI / 6 - M * PI / 360));
  complex<double> rot_L(cos(-1 * M * PI / 30), sin(-1 * M * PI / 30));

  S *= rot_S;
  L *= rot_L;

  double argS, argL;

  if (arg(S) >= 0) {
    argS = arg(S);
  } else {
    argS = 2 * PI + arg(S);
  }

  if (arg(L) >= 0) {
    argL = arg(L);
  } else {
    argL = 2 * PI + arg(L);
  }

  cout << setprecision(15) << sqrt(pow(abs(S), 2) + pow(abs(L), 2) - 2 * abs(S) * abs(L) * cos(abs(arg(L/S))));
}

Measured memory_bytes: 4312
#include<iostream>
#include<cstdlib>
#include<stack>
#include<queue>
#include<string>
#include<algorithm>
using namespace std;

int main(){
    
    int h,w;
    char s[51][51];//data
    int v[51][51];//visited and min
    for(int i=0;i<=50;i++){
        for(int j=0;j<=50;j++){
            v[i][j]=-1;
        }
    }
    int wallcnt=0;
    cin>>h>>w;
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            cin>>s[i][j];
            if(s[i][j]=='#')wallcnt++;
        }
    }
    int nx,ny;
    queue<int> qx;
    queue<int> qy;

    v[0][0]=0;
    qx.push(0);
    qy.push(0);

    int dx,dy;
    int nex,ney;
    for(;;){
        if(qx.empty()){
            //cout<<nx<<ny<<"escape"<<endl;
            break;
        }
        nx=qx.front();
        ny=qy.front();
        qx.pop();
        qy.pop();

        //up
        dx=0;dy=1;
        nex=nx+dx;ney=ny+dy;
        if(ney<=w-1){
            if(s[nex][ney]=='.'){
                if(v[nex][ney]==-1){
                    v[nex][ney]=v[nx][ny]+1;
                    qx.push(nex);
                    qy.push(ney);
                }
            }
        }
        //down
        dx=0;dy=-1;
        nex=nx+dx;ney=ny+dy;
        if(0<=ney){
            if(s[nex][ney]=='.'){
                if(v[nex][ney]==-1){
                    v[nex][ney]=v[nx][ny]+1;
                    qx.push(nex);
                    qy.push(ney);
                }
            }
        }

        //left
        dx=-1;dy=0;
        nex=nx+dx;ney=ny+dy;
        if(0<=nex){
            if(s[nex][ney]=='.'){
                if(v[nex][ney]==-1){
                    v[nex][ney]=v[nx][ny]+1;
                    qx.push(nex);
                    qy.push(ney);
                }
            }
        }
        //right
        dx=1;dy=0;
        nex=nx+dx;ney=ny+dy;
        if(nex<=h-1){
            if(s[nex][ney]=='.'){
                if(v[nex][ney]==-1){
                    v[nex][ney]=v[nx][ny]+1;
                    qx.push(nex);
                    qy.push(ney);
                }

            }
        }

    }/*
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            cout<<s[i][j];
        }
        cout<<endl;
    }
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            cout<<v[i][j];
        }
        cout<<endl;
    }
*/
    int saitan=v[h-1][w-1];
    int dekasa=w*h;
    if(saitan==-1){
        cout<<-1;
        return 0;
    }
    int kai=dekasa-1-saitan-wallcnt;
    cout<<kai;
    
    return 0;
}

Measured memory_bytes: 256