akhauriyash/Code-Regression huggingface dataset:
import numpy as np
N = list(map(int, input().split()))
A = list(map(int, input().split())) 
numb = N[0]
bord = N[1]

A_p =np.array(A)
count =0

for n in range(numb):
    if A_p[n] >= bord:
        count +=1
        
print(count)


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

int main() {
  int sum = 0;
  int count = 0;
  vector<int> v(5);
  for(int i=0; i<5; i++) {
    int a;
    cin >> a;
    sum += a;
    if(a%10 == 0) count++;
    v[i] = a%10;
  }
  sort(v.rbegin(), v.rend());
  
  for(int i=0; i<4-count; i++) sum += 10-v[i];
  cout << sum << endl;
  return 0;
}

Measured memory_bytes: 3640
#include<bits/stdc++.h>
#define int long long
#define mod 1000000007
using namespace std;
int32_t main(){
    int n;
    cin>>n;
    double p[n+1];
    for(int i=1;i<=n;i++){
        cin>>p[i];
    }
    //dp[i][x] represents prob of atleast x heads by tossing first i coins (from 1...to...i)
    double dp[n+1][(n+1)/2+1];
    memset(dp,0,sizeof dp);
    dp[1][0]=1;
    dp[1][1]=p[1];
    for(int i=2;i<=n;i++){
        for(int x=0;x<=(n+1)/2;x++){
            if(x==0){
                dp[i][x]=1;
                continue;
            }
            dp[i][x]=p[i]*dp[i-1][x-1]+(1-p[i])*dp[i-1][x];
        }
    }
    cout<<fixed<<setprecision(10)<<dp[n][(n+1)/2]<<endl;
	return 0;
}

Measured memory_bytes: 35456
#include <iostream>
  #include <complex>
  #include <vector>
  #include <string>
  #include <algorithm>
  #include <cstdio>
  #include <numeric>
  #include <cstring>
  #include <ctime>
  #include <cstdlib>
  #include <set>
  #include <map>
  #include <unordered_map>
  #include <unordered_set>
  #include <list>
  #include <cmath>
  #include <bitset>
  #include <cassert>
  #include <queue>
  #include <stack>
  #include <deque>
 #include <iomanip>

  using namespace std;
   

//abcdefghijklmnopqrstuvwxyz
//ABCDEFGHIJKLMNOPQRSTUVWXYZ
  typedef long long ll;
  typedef long double lld;
  typedef string str;
  typedef unsigned long long ull;
  ll INF = INT_MAX;
  // ll mod = 998244353;
  lld PI = 3.141592653;

// const int N = 2e5 + 5;

// int a[N];
// int n,k;



// void solve(){

// string s;
// cin>>s;


// }
 
ll bb[200005];


int gs(int find, int l, int r){
  if (r-l==1) return l;
  int mid = (l+r)/2;
  if (bb[mid]>find){
    return gs(find, l, mid);
  }else{
    return gs(find, mid, r);
  }
}

  int main()
  {
      ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    
      
     
      int n,m,k;
      cin>>n>>m;
      cin>>k;
      vector<int> a(n), b(m);
      for (int i = 0;i<n;i++) cin>>a[i];
        for (int i = 0;i<m;i++) cin>>b[i];
      ll aa[n+1];
    aa[0] = 0;
    bb[0] = 0;
      for (int i = 1;i<=n;i++) aa[i] = aa[i-1]+a[i-1];
        for (int i = 1;i<=m;i++) bb[i] = bb[i-1]+b[i-1];

          int ans = 0;
      for (int f = 0; f<=n;f++){
        
        ll now = aa[f];
        now = k-now;
        // cout<<f<<" "<<now<<endl;
        if (now<0) break;
        int s = gs(now, 0, m+1);
        // cout<<f<<" "<<s<<endl;
        ans = max(ans, s+f);
      }
      cout<<ans<<"\n";
}



Measured memory_bytes: 7552
def main():
    N, P = (int(i) for i in input().split())

    def trial_division(n):
        divs = []
        for i in range(1, int(n**0.5)+1):
            if n % i == 0:
                divs.append(i)
                if i != n//i:
                    divs.append(n//i)
        return divs
    divs = trial_division(P)
    divs.sort()
    ans = 1
    for d in divs[1:]:
        # print(d, d**N, d**N <= P, P / d**N)
        # print(d)
        cur = 1
        for i in range(N):
            cur *= d
            if P < cur:
                break
        if P < cur:
            break
        if P % (d**N) == 0:
            ans = d
    print(ans)


if __name__ == '__main__':
    main()


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

#include<stdio.h>
#include<stdlib.h>

#define rep(i,n) for(ll i = 0; i < (ll)n; i++)
#define swap(a,b) a^=b;b^=a;a^=b;
#define chmax(a,b) {if(a < b) a = b;}
#define chmin(a,b) {if(a > b) a = b;}

using namespace std;
typedef long long ll;
const ll INF = 1LL << 60;

int main(void) {
	cin.tie(0);
	ios::sync_with_stdio(false);
	//Program Start	

	int N;
	cin >> N;


	cout << N + N * N + N * N * N << endl;


EndPoint:;

	//Program End
#ifndef DEBUG
	system("pause");
#endif // !DEBUG

	return 0;
}




Measured memory_bytes: 3680
#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(){
  int N;
  cin >> N;
  int a[N];
  rep(i,N) cin >> a[i];

  int ans = 0;
  int x = 1;
  int error = 1;

  rep(i,N){
    if(a[i]==1) error = 0;
    if(a[i]==x) x++;
    else ans++;
  }

  if(error) ans = -1;
  cout << ans << endl;

  return 0;
}

Measured memory_bytes: 1024
def f(a,c):
  b = [a.count(e) for e in a]
  if a!=b: b,c=f(b,c+1)
  return b, c

while input()!=0:
  a = map(int,raw_input().split())
  a, c = f(a,0)
  print c
  print " ".join(map(str,a))

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

int main()
{
    ll n, d;
    cin >> n >> d;
    int ans=0;
    for(int i=0; i<n; ++i){
        ll x, y;
        cin >> x >> y;
        if(x*x + y*y <= d*d)++ans;
    }
    cout << ans;
    return 0;
}


Measured memory_bytes: 3620
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
	int X,Y,A,B,C,aL,bL;
	int p[100000],q[100000],r[100000];
	long long int sum=0;
	bool pIn,qIn;
	cin>>X>>Y>>A>>B>>C;
	for(int i=0;i<A;i++)cin>>p[i];
	for(int i=0;i<B;i++)cin>>q[i];
	for(int i=0;i<C;i++)cin>>r[i];
	sort(p,p+A);
	sort(q,q+B);
	sort(r,r+C);
	aL=A-X;bL=B-Y;
	for(int i=C-1;i>=0;i--){
		pIn= aL<A && p[aL]<r[i];
		qIn= bL<B && q[bL]<r[i];
		
		if(pIn||qIn)sum+=r[i];
		else break;
		
		if(pIn&&qIn){
			if(p[aL]<q[bL])aL++;
			else bL++;
		}else if(pIn)aL++;
		else if(qIn)bL++;
	}
	for(int i=aL;i<A;i++)sum+=p[i];
	for(int i=bL;i<B;i++)sum+=q[i];
	cout<<sum;
	return 0;
}

Measured memory_bytes: 1408
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

      Scanner sc = new Scanner(System.in);
      int A = sc.nextInt();
      int B = sc.nextInt();
      int C = sc.nextInt();

      if(C - (A - B) >= 0) {
    	  System.out.println(C - (A - B));
      } else {
    	  System.out.println(0);
      }

      sc.close();

    }
}


Measured memory_bytes: 23764
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
using namespace std;


int main(){
	int H,W,N;
	cin >> H >> W >> N;
	vector<int> a(N);
	for(int i=0; i<N; i++) cin >> a[i];
	
	vector<vector<int>> map(H,vector<int>(W, 0));
	int colorp = 0;


	for(int i=0; i<H; i++){
		if(i%2 == 0) {
			for(int j=0; j<W; j++){
				map[i][j] = colorp+1;
				a[colorp]--;
				if(a[colorp] == 0) colorp++;
			}
		}else{
			for(int j=W-1; j>-1; j--){
				map[i][j] = colorp+1;
				a[colorp]--;
				if(a[colorp] == 0) colorp++;
			}
		}
	}

	for(auto v : map){
		for(auto i: v){
			cout << i << " ";
		}
		cout << endl;
	}
}


Measured memory_bytes: 384
import sys
input = sys.stdin.readline
q = int(input())

p=1000003

fdict={}
fdict[0]=1
for i in range(1,p):
    fdict[i]=fdict[i-1]*i%p

for i in range(q):
  x,d,n=(int(i) for i in input().split())
  if d==0:
    ans=pow(x,n,p)
  else:
    x=x*pow(d,p-2,p)%p    
    if p<=x+n-1:
      ans=0
    else:
      ans=pow(d,n,p)*fdict[x+n-1]*pow(fdict[x-1],p-2,p)%p
  print(ans%p)

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

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

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

    vector<int> dist(n);
    for(int i=0; i<n; i++){
        dist[i] = a[i+1] - a[i];
    }
    sort(dist.begin(), dist.end());
    reverse(dist.begin(), dist.end());

    cout << k - dist[0] << endl;
    return 0;
}

Measured memory_bytes: 1792
N = int(input())
dp = [0,0,0]
for i in range(N):
    li = [int(i) for i in input().split()]
    dp = [li[0]+max(dp[1],dp[2]),li[1]+max(dp[0],dp[2]),li[2]+max(dp[0],dp[1])]
print(max(dp))


Measured memory_bytes: 3060
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define pb push_back
#define F first
#define S second
#define nl cout<<"\n"
//cout<<fixed<<setprecision(11);
const ll MOD=1e9+7;
const ll ARR_MAX = 1e5+1;
const ll VAL_MAX = 1e5+1;
const ll INF=1e14;

void solve(){
    int n;cin>>n;
    string s;
    cin>>s;
    int ans=0;
    int flag=0;
    for(int i=0;i<n;i++){
        if(s[i]=='A'){
            flag=1;
        }
        else if(s[i]=='B' && flag==1){
            flag=2;
        }
        else if(s[i]=='C' && flag==2){
            flag=0;
            ans++;
        }
        else{
            flag=0;
        }
    }
    cout<<ans,nl;
}

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

Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
using System.Numerics;
using System.Text.RegularExpressions;

class Program
{
    static int[] ReadInts()
        => Console.ReadLine()
            .Split(new[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries)
            .Select(s => int.Parse(s))
            .ToArray();

    static void Main(string[] args)
    {
        var s = Console.ReadLine();
        var t = Console.ReadLine();
        if (t.StartsWith(s) && s.Length + 1 == t.Length)
        {
            Console.WriteLine("Yes");
        }
        else
        {
            Console.WriteLine("No");
        }
    }
}


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

using i64 = int64_t;

constexpr int INF = 1e9;

int pop_count(int n){
    int res = 0;
    while(n > 0){
        res += (n&1);
        n >>= 1;
    }
    return res;
}

int main(){
    int n;
    cin >> n;
    vector<vector<int>> v(2, vector<int>());
    for(int i=0;i<n;++i){
        int tmp;
        cin >> tmp;
        v[0].push_back(tmp);
    }
    for(int i=0;i<n;++i){
        int tmp;
        cin >> tmp;
        v[1].push_back(tmp);
    }
    vector<vector<int>> dp(1<<n, vector<int>(n, INF));
    for(int i=0;i<n;++i)dp[0][i] = 0;
    for(int i=0;i<(1<<n);++i){
        for(int j=0;j<n;++j){
            if(dp[i][j] == INF)continue;
            if(i != 0 && !(i&(1<<j)))continue;
            for(int k=0;k<n;++k){
                if(i&(1<<k))continue;
                int m = pop_count(i);
                int front = (i == 0 ? 0 : v[abs(m-1-j)%2][j]);
                int next = v[abs(m-k)%2][k];
                if(next < front)continue;
                int idx = k - pop_count(((1<<(k+1))-1)&i) + m;
                // cerr << idx << endl;
                dp[i|(1<<k)][k] = min(dp[i|(1<<k)][k], dp[i][j]+abs(m-idx));
            }
        }
    }

    int ans = INF;
    for(int i=0;i<n;++i){
        ans = min(ans, dp[(1<<n)-1][i]);
    }

    cout << (ans == INF ? -1 : ans) << endl;

    return 0;
}

Measured memory_bytes: 26880
#include <bits/stdc++.h>
using namespace std;
int main(){
 int N, M;
 cin >> N >> M;
 vector<vector<int>> data(M, vector<int>(2,0));
 for(int i = 0; i < M; i++){
   for(int j = 0; j < 2; j++){
     cin >> data.at(i).at(j);
   }
 }
 vector<int> count(N);
 for(int i = 0; i < M; i++){
   for(int j = 0; j < 2; j++){
     for(int k = 0; k < N; k++){
       if(k+1 == data.at(i).at(j))count.at(k)++;
     }
   }
 }
 for(int k = 0; k< N; k++){
   cout << count.at(k) << endl;
 }
}

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

using namespace std;

int main(void) {
	int num, i, j = 0;
	long long ans = 0, sum = 0;
	cin >> num;
	vector<int> a(num), b(num), c(num), d(num, 0);
	for (i = 0; i < num; i++)
		scanf("%d", &a[i]);
	for (i = 0; i < num; i++)
		scanf("%d", &b[i]);
	for (i = 0; i < num; i++)
		scanf("%d", &c[i]);
	sort(a.begin(), a.end());
	sort(b.begin(), b.end());
	sort(c.begin(), c.end());
	for (i = 0; i < num; i++) {
		while (j < num && a[j] < b[i])
			j++;
		d[i] = j;
	}
	j = 0;
	for (i = 0; i < num; i++) {
		while (j < num && b[j] < c[i]) {
			sum += d[j];
			j++;
		}
		ans += sum;
	}
	cout << ans << "\n";
	return 0;
}

Measured memory_bytes: 1792
h,w = gets.chomp.split(" ").map(&:to_i)
s = h.times.map{"#"+gets.chomp+"#"}.unshift("#"*(w+2)).push("#"*(w+2))
ans = 0
s.each do |str|
  ans += str.count(".")
end
vst = [[1,1]]
disp = [[0,1],[0,-1],[1,0],[-1,0]]
size = -1
bsize = 0
while size != bsize
  size = bsize
  bsize = vst.size
  vst[size..-1].each do |i,j|
    if i == h && j == w
      puts ans-1
      exit
    end
    disp.each do |k,l|
      if s[i+k][j+l] == "."
        vst << [i+k,j+l]
        s[i+k][j+l] = "#"
      end
    end
  end
  ans -= 1
end
puts "-1"

Measured memory_bytes: 3324
#include <algorithm>
#include <cmath>
#include <iostream>
#include <limits>
#include <numeric>
#include <string>
#include <vector>

using namespace std;
int main() {
    int a, b;
    cin >> a >> b;
    if(a > b) {
        cout << a - 1 << endl;
    } else {
        cout << a << endl;
    }
}


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

vector<ll> enum_div(ll n) {
  vector<ll> ret;
  for(ll i = 1; i*i <= n; i++) {
    if(n%i == 0) ret.push_back(i);
  }
  sort(ret.begin(), ret.end());
  return ret;
}

int main() {
  ll n;
  cin >> n;
  vector<ll> vec = enum_div(n);
  ll ans = LLONG_MAX;
  rep(i, vec.size()) {
    ll m = vec.at(i) + n/vec.at(i) - 2;
    ans = min(ans, m);
  }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 256
import java.util.Scanner

object Main {
  def main(args: Array[String]) {
    val sc = new Scanner(System.in)
    val n = sc.nextInt
    val arr: Array[Int] = Array.fill(n)(sc.nextInt)

    var v, j = 0
    for (i <- 1 to n - 1) {
      println(arr.toList.mkString(" "))
      v = arr(i)
      j = i - 1
      while (j >= 0 && arr(j) > v) {
        arr(j + 1) = arr(j)
        j -= 1
      }
      arr(j + 1) = v
    }
    println(arr.toList.mkString(" "))
  }
}

Measured memory_bytes: 47844
#include<bits/stdc++.h>
#include<cmath>
#define SZ(x) ((int)x.size())
#include<vector>
#include<set>
#include<map>
#define ll long long
#define lli long long int
#define REP(i,a,b) for(ll i=a;i<b;i++)
#define pb push_back
#include<string>
#include<cctype>
#include<queue>
#define ii pair<int,int>
#include <sstream>
#define lli long long int
#define pairs pair<int,int>
#define mod 1000000007
const double PI = 3.141592653589793238460;
typedef std::complex<double> Complex;
typedef std::valarray<Complex> CArray;
using namespace std;
ll pows(ll a,ll n,ll m)
{
	ll res=1;
	while(n)
	{
	if(n%2!=0)
	{
		res=(res*a)%m;
		n--;
		}
		else
		{
			a=(a*a)%m;
			n=n/2;
			}	
	}
	return res%m;
}
ll  gcd(ll a,ll b)
{
	if(b==0)
	return a;
	else 
	return gcd(b,a%b);
}
bool isprime(ll n)
{
	if(n==1)
	{
		return false;
	}
	for(ll i=2;i*i<=n;i++)
	{
		if(n%i==0)
		{
			return false;
		}
	}
	return true;
}
bool istrue(string s)
{
	int i=0;
	int j=s.size()-1;
	while(i<j)
	{
	if(s[i]==s[j])
	{
		i++;
		j--;
		}
		else
		{
			return false;
			}	
	}
	return true;
}
int main()
{
   ios::sync_with_stdio(false);
	 cin.tie(0);
    cout.tie(0);
ll n;
cin>>n;
ll a[200001];
for(int i=0;i<n;i++)
{
	cin>>a[i];
}
ll ans=0;
for(ll i=1;i<n;i++)
{
	if(a[i]<a[i-1])
	{
		ans=ans+a[i-1]-a[i];
		a[i]=a[i-1];
	}
}
cout<<ans<<endl;
}
 
 
 

 


Measured memory_bytes: 5148
import sys
input = sys.stdin.readline
N, M = map(int, input().split())
ship = [[] for i in range(N+1)]

for i in range(M):
    a, b = map(int, input().split())
    ship[a].append(b)
    ship[b].append(a)

flag = 0
for i in ship[1]:
    if N in ship[i]:
        flag = 1
if flag == 1:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")


Measured memory_bytes: 38320
#include<bits/stdc++.h>
#define REP(i, n) for(int i=0; i<(int)(n); i++)
#define RREP(i, n) for(int i=0; i>(int)(n); i--)
#define ALL(v) v.begin(), v.end()
#define INF 2e9
typedef long long ll;
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(a>b){a=b; return 1;}return 0;}

using namespace std;

int dp[101010];
int a[111];

int main(void)
{
	int N, K;
	cin >> N >> K;
	REP(i, N){
		cin >> a[i];
	}
	REP(i, K+1){
		dp[i] = 0;
	}
	REP(i, K+1){
		REP(k, N){
			if((i-a[k]>=0)and(dp[i-a[k]]==0)){
				dp[i] = 1;
			}
		}
	}
	if(dp[K]==1){
		cout << "First";
	}else{
		cout << "Second";
	}
	cout << "\n";
	return 0;
}


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

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    long long int t,c=0;
    t=1;
    while(t--)
    {
        string a,b;
        cin>>a>>b;
        for(int i=0;i<a.length();i++)
        {
            if(a[i]!=b[i])
            c++;
        }
        cout<<c<<endl;
    }
	return 0;
}

Measured memory_bytes: 3796
#include <cstdio>
#include <cmath>
using namespace std;

int main(){
  long long a, b, c;
  scanf("%lld %lld.%lld",&a,&b,&c);
  b = b*100 + c;
  a *= b;
  a /= 100;
  printf("%lld\n",a);
}


Measured memory_bytes: 1732
#include <iostream>
#include <string>
#include <list>
#include <algorithm>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n; cin >> n;

    list<int> li;
    int ignore = 0;

    for (int i=0; i<n; ++i) {
        string op; cin >> op;
        if (op == "insert") {
            int key; cin >> key;
            li.push_front(key);
        } else if (op == "delete") {
            int key; cin >> key;
            list<int>::iterator end_it = li.end();
            advance(end_it, -ignore);
            list<int>::iterator pos = find(li.begin(), end_it, key);
            if (pos != end_it) {
                li.erase(pos);
            }
        } else if (op == "deleteFirst") {
            li.pop_front();
        } else if (op == "deleteLast") {
            ignore ++;
        }
    }

    list<int>::iterator end_it = li.end();
    advance(end_it, -ignore);
    for (list<int>::iterator it = li.begin(); it != end_it; ++it) {
        cout << ((it == li.begin()) ? "" : " ") << *it;
    }
    cout << endl;
    return 0;
}

Measured memory_bytes: 32480
import java.util.*;
     
class Main{
    public static void main(String[] args) {
        
        try(Scanner sc = new Scanner(System.in);
        
        ){
 
            String hitachi = sc.next();
            StringBuilder sb = new StringBuilder();
            int yesFlg = 0; 
            for(int i = 0; i < 5; i++){
                sb.append("hi");
                if(hitachi.equals(sb.toString())){
                    System.out.println("Yes");
                    yesFlg += 1; 
                }
            }
            if(yesFlg == 0){
                System.out.println("No");
            }
 
        }catch(Exception e){
            e.printStackTrace();
        }        
    }
}

Measured memory_bytes: 23764
#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ll long long int
#define N 200100
#define pii pair<int,int>
#define rep(i,k,n) for(int i=k;i<n;i++)
#define vi vector<int>
#define inf 1e9
vector<string> v;
void permute(string a,int l,int r){
	if(l==r){
		v.push_back(a);
	} else{
		for(int i=l;i<=r;i++){
			swap(a[l],a[i]);
			permute(a,l+1,r);
			swap(a[l],a[i]);
		}
	}
}
void solve(){
	int n;
	cin>>n;
	string a="";
	for(int i=1;i<=n;i++){
		a+='0'+i;
	}
	permute(a,0,n-1);
	sort(v.begin(),v.end());
	// for(auto i:v){
	// 	cout<<i<<endl;
	// }
	string s1="";
	for(int i=1;i<=n;i++){
		int temp;
		cin>>temp;
		s1+='0'+temp;
	}
	string s2="";
	for(int i=1;i<=n;i++){
		int temp;
		cin>>temp;
		s2+='0'+temp;
	}
	int pos1,pos2;
	for(int i=0;i<v.size();i++){
		if(v[i]==s1){
			pos1=i;
			break;
		}
	}
	for(int i=0;i<v.size();i++){
		if(v[i]==s2){
			pos2=i;
			break;
		}
	}
	cout<<abs(pos1-pos2)<<endl;
}

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

Measured memory_bytes: 2424
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int ctoi(const char c) {
    if ('0' <= c && c <= '9') return (c - '0');
    return -1;
}
vector<int> input(int n) {
    vector<int> vec(n);
    for (int i = 0; i < n; i++) {
        cin >> vec.at(i);
    }
    return vec;
}
void output(vector<int> vec) {
    for (int i = 0; i < vec.size(); i++) {
        cout << vec[i] << " ";
    }
    return;
}
vector<vector<int>> input(int n, int m) {
    vector<vector<int>> table(n, vector<int>(m));
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            cin >> table. at(i).at(j);
        }
    }
    return table;
}
void output(vector<vector<int>> table) {
    for (int i = 0; i < table.size(); i++) {
        for (int j = 0; j < table.at(0).size(); j++) {
            cout << table.at(i).at(j) << " ";
        }
        cout << endl;
    }
}
long long perm(int n, int r) {
    if (n < r) {
        cout << "error" << endl;
        return 0;
    }
    long long perm = 1;
    for (int i = n; i > n - r; i--) {
        perm *= i;
    }
    return perm;
}
long long comb(int n, int r) {
    if (n < r) {
        cout << "error" << endl;
        return 0;
    }
    long long comb = perm(n,r);
    for (int i = r; i > 0; i--) {
        comb /= i;
    }
    return comb;
}
long long homo(int n, int r) {
    return comb(n + r - 1, n - 1);
}
long long fact(int n) {
    long long fact = 1;
    for (int i = n; i > 0; i--) {
        fact *= i;
    }
    return fact;
}
int gcd(int a, int b)
{
    if (a % b == 0)
    {
        return(b);
    }
    else
    {
        return(gcd(b, a % b));
    }
}
int lcm(int a, int b) {
    return a * b / gcd(a, b);
}
int main() {
  long long a,b,c,k;
  cin >> a >> b >> c >> k;
  if(k%2==0){
    cout << a-b << endl;
  }else{
    cout << b-a << endl;
  }
}


Measured memory_bytes: 764
/**
 * 2019/02/19
 * ABC074C
 * WAWA
 */
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        int e = sc.nextInt();
        int f = sc.nextInt();
        int answater = a * 100;
        int anssuger = 0;
        double ansper = 0;
        for (int i = 0; 100 * a * i <= f; i++) {// aの使用回数
            for (int j = 0; 100 * a * i + 100 * b * j <= f; j++) {// bの使用回数
                if (i == 0 && j == 0) {// 水がない
                    continue;
                }
                for (int k = 0; 100 * a * i + 100 * b * j + k * c <= f; k++) {// cの使用回数
                    for (int l = 0; 100 * a * i + 100 * b * j + k * c + l * d <= f; l++) {// dの使用回数
                        if (c * k + d * l > (a * i + b * j) * e) {// 使用している砂糖の量 > 溶かすことのできる砂糖の量
                            continue;
                        }
                        double tmp = (k * c + l * d) * 1.0 / (100 * a * i + 100 * b * j + k * c + l * d);

                        if (tmp > ansper) {
                            ansper = tmp;
                            answater = 100 * a * i + 100 * b * j + k * c + l * d;
                            anssuger = k * c + l * d;
                        }
                    }
                }
            }
        }
        System.out.println(answater + " " + anssuger);
    }
}

Measured memory_bytes: 21716
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
//#include <boost/multiprecision/cpp_ll.hpp>
//typedef boost::multiprecision::cpp_ll ll;
typedef long double dd;
#define i_7 (ll)(1E9+7)
//#define i_7 998244353
#define i_5 i_7-2
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
typedef pair<ll,ll> l_l;
ll inf=(ll)1E16;
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
void Max(ll &pos,ll val){pos=max(pos,val);}//Max(dp[n],dp[n-1]);
void Min(ll &pos,ll val){pos=min(pos,val);}
void Add(ll &pos,ll val){pos=mod(pos+val);}
dd EPS=1E-9;
string alp="abcdefghijklmnopqrstuvwxyz";
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);


int main(){
    string s;cin>>s;
    ll q;cin>>q;
    string ans;
    
    rep(i,0,q-1){
        ans+='0';
    }
    ans+=s;
    rep(i,0,q-1){
        ans+='0';
    }
    ll l=q-1;
    ll r=q+s.size();
    
    ll qi;
    ll c=0;
    ll f;
    char t;
    rep(i,0,q-1){
        cin>>qi;
        if(qi==1){
            c++;
        }else{
            cin>>f>>t;
            if((f+c)%2==0){
                //cout<<ans[r]<<' '<<t<<endl;
                ans[r]=t;
                r++;
            }else{
                //cout<<ans[r]<<' '<<t<<endl;
                ans[l]=t;
                l--;
            }
        }
    }
    if(c%2==0){
        string ss;
        rep(i,0,ans.size()-1){
            if(ans[i]!='0'){
                ss+=ans[i];
            }
        }
        cout<<ss<<endl;
    }else{
        string ss;
        for(ll i=ans.size()-1;i>=0;i--){
            if(ans[i]!='0'){
                ss+=ans[i];
            }
        }
        cout<<ss<<endl;
    }
    //cout<<ans<<endl;
    
    return 0;
}




Measured memory_bytes: 1724
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep2(i,s,f) for(int i=s;i<f;i++)
#define INF 1000000000000000000
#define MOD 1000000007
#define endl "\n"
#define fcout cout<<fixed<<setprecision(15)
typedef pair<int, int> P;
//struct edge { int to, cost; };

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; }

bool prime(int n) {
    for (int i = 2; i <= sqrt(n); i++) {
        if (n % i == 0)return false;
    }
    return n != 1;
}
int gcd(int x, int y) {
    if (y == 0)return x;
    return gcd(y, x % y);
}
int lcm(int x, int y) {
return x / gcd(x, y) * y;
}
int mod_pow(int n, int p, int m) {
    if (p == 0) return 1;
    if (p % 2 == 0) {
        int t = mod_pow(n, p / 2, m);
        return (t * t) % m;
    }
    return n * mod_pow(n, p - 1, m) % m;
}
int extGCD(int a, int b, int& x, int& y) {
    if (b == 0) {
        x = 1;
        y = 0;
        return a;
    }
    long long d = extGCD(b, a % b, y, x);
    y -= a / b * x;
    return d;
}
int modinv(int a, int m) {
    int b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}
int modinv2(int a, int mod) {
    return mod_pow(a, mod - 2, mod);
}
int digit(int x) {
    int cnt = 0;
    while (x > 0) {
        cnt += x % 10;
        x /= 10;
    }
    return cnt;
}
int read() {
    int tmp;
    cin >> tmp;
    return tmp;
}
int xor128() {
    static int x = 123456789, y = 362436069, z = 521288629, w = 88675123;
    int t = (x xor (x << 11));
    x = y; y = z; z = w;
    return (w = (w xor (w >> 19)) xor (t xor (t >> 8)));
}
map<int, int> factaring(int x) {
    map<int, int>ans;
    int now = 2;
    while (now * now <= x) {
        if (x % now == 0) {
            x /= now;
            ans[now]++;
        }
        else now++;
    }
    if (x != 1) ans[x]++;
    return ans;
}
int comb(int n, int k, int mod) {
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    k = min(k, n - k);
    int x = 1, y = 1;
    rep(i, k) {
        y *= i + 1;
        y %= mod;
    }
    for (int i = n - k + 1; i <= n; i++) {
        x *= i;
        x %= mod;
    }
    return x * modinv(y, mod) % mod;
}


signed main() {
    //srand((unsigned)time(NULL));

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

    int n;
    int ans = 0;
    cin >> n;
    for (int i = 1; i <= n; i++) {
        string s = to_string(i);
        if (s.size() % 2 == 1) ans++;
    }
    cout << ans << endl;

    return 0;
}


Measured memory_bytes: 256
if __name__ == '__main__':
    A, B, C, D, E, F = map(int, input().split())

    answer_sugarwater = -1
    answer_sugar = -1
    max_strength = -1

    for a in range(0,F//(100*A)+1):
        for b in range(0,(F-a*A)//(100*B)+1):
            water = 100*(a*A+b*B)
            for c in range(0, (F-water)//C+1):
                for d in range(0, (F-water-c*C)//D+1):
                    if water == 0:
                        continue
                    sugar = c*C+d*D
                    strength = 100 * sugar / (water + sugar)
                    # print(str(water) + ' ' + str(sugar) + ' ' + str(strength))
                    if max_strength < strength and water + sugar <= F and sugar <= water/100*E:
                        max_strength = strength
                        answer_sugarwater = water + sugar
                        answer_sugar = sugar
    print(str(answer_sugarwater) + ' ' + str(answer_sugar))



Measured memory_bytes: 3064
#include <bits/stdc++.h>
#define lol long long
using namespace std;
int main(){
  int n,x,p,ans=10000,a[200]={};
  cin>>x>>n;
  for(int i=0;i<n;i++){
    cin>>p;
    a[p]=1;
  }
  for(int i=0;i<=101;i++){
    if(a[i]==0 && abs(x-i)<abs(x-ans)) ans=i;
    if(abs(x-i)==abs(x-ans) && i<ans) ans=i;
  }
  cout<<ans<<"\n";
  return(0);
}

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

using namespace std;

#define LOG(...) fprintf(stderr, __VA_ARGS__)
// #define LOG(...)
#define FOR(i, a, b) for(int i = (int)(a); i < (int)(b); ++i)
#define REP(i, n) for(int i = 0; i < (int)(n); ++i)
#define RREP(i, n) for(int i = (int)(n - 1); i >= 0; --i)
#define RFOR(i, a, b) for(int i = (int)(b - 1); i >= (int)(a); --i)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define EXIST(s, e) ((s).find(e) != (s).end())
#define SORT(c) sort(ALL(c))
#define RSORT(c) sort(RALL(c))
#define SQ(n) (n) * (n)
#define BIT(x, i) (((x) >> (i)) & 1)

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<pii> vpi;
typedef vector<pll> vpl;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vc> vvc;
typedef vector<vll> vvll;

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

  int cnt = 0;
  char c = s[0];
  FOR(i, 1, s.length()) {
    if (c != s[i]) {
      cnt++;
      c = s[i];
    }
  }
  cout << cnt << endl;
}


Measured memory_bytes: 512
#include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <climits>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <cassert>
#include <unordered_map>

using namespace std;
const int MOD = 1000000007;
typedef long long ll;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int a,b,c,d,e; cin >> a >> b >> c >> d >> e;
    if (a == 0)
        cout << 1 << '\n';
    else if (b == 0)
        cout << 2 << '\n';
    else if (c == 0)
        cout << 3 << '\n';
    else if (d == 0)
        cout << 4 << '\n';
    else
        cout << 5 << '\n';
    return 0;
}



Measured memory_bytes: 3512
using Yorukatsu034.Questions;
using Yorukatsu034.Extensions;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace Yorukatsu034.Questions
{
    /// <summary>
    /// ABC045
    /// </summary>
    public class QuestionA : AtCoderQuestionBase
    {
        public override IEnumerable<object> Solve(TextReader inputStream)
        {
            var a = inputStream.ReadInt();
            var b = inputStream.ReadInt();
            var h = inputStream.ReadInt();
            yield return (a + b) * h / 2;
        }
    }
}


namespace Yorukatsu034
{
    class Program
    {
        static void Main(string[] args)
        {
            IAtCoderQuestion question = new QuestionA();    // 問題に合わせて書き換え
            var answers = question.Solve(Console.In);
            foreach (var answer in answers)
            {
                Console.WriteLine(answer);
            }
        }
    }
}

#region Base Classes

namespace Yorukatsu034.Questions
{

    public interface IAtCoderQuestion
    {
        IEnumerable<object> Solve(string input);
        IEnumerable<object> Solve(TextReader inputStream);
    }

    public abstract class AtCoderQuestionBase : IAtCoderQuestion
    {
        public IEnumerable<object> Solve(string input)
        {
            var stream = new MemoryStream(Encoding.Unicode.GetBytes(input));
            var reader = new StreamReader(stream, Encoding.Unicode);

            return Solve(reader);
        }

        public abstract IEnumerable<object> Solve(TextReader inputStream);
    }

}

#endregion

#region Extensions

namespace Yorukatsu034.Extensions
{
    internal static class TextReaderExtensions
    {
        internal static int ReadInt(this TextReader reader) => int.Parse(ReadString(reader));
        internal static long ReadLong(this TextReader reader) => long.Parse(ReadString(reader));
        internal static double ReadDouble(this TextReader reader) => double.Parse(ReadString(reader));
        internal static string ReadString(this TextReader reader) => reader.ReadLine();

        internal static int[] ReadIntArray(this TextReader reader, char separator = ' ') => ReadStringArray(reader, separator).Select(int.Parse).ToArray();
        internal static long[] ReadLongArray(this TextReader reader, char separator = ' ') => ReadStringArray(reader, separator).Select(long.Parse).ToArray();
        internal static double[] ReadDoubleArray(this TextReader reader, char separator = ' ') => ReadStringArray(reader, separator).Select(double.Parse).ToArray();
        internal static string[] ReadStringArray(this TextReader reader, char separator = ' ') => reader.ReadLine().Split(separator);
    }
}

#endregion

Measured memory_bytes: 13268
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <set>
#include <map>
#include <vector>
#include <math.h>
#include <stdlib.h>

typedef long double ld;
typedef long long ll;

using namespace std;

#define MMAX 100000

int f(int x, int m) {
	return (x * m) / 100;
}

int main() {
	int a, b;
	cin >> a >> b;
	for (int i = 1; i <= MMAX; i++) {
		if (f(i, 8) == a && f(i, 10) == b) {
			cout << i << endl;
			return 0;
		}
	}
	cout << "-1" << endl;

	return 0;
}


Measured memory_bytes: 3620
#include <iostream>
#include <cassert>
#define GET_MACRO(_1,_2,_3,_4,_5,_6,_7,_8,NAME,...) NAME
#define pr(...) cerr<< GET_MACRO(__VA_ARGS__,pr8,pr7,pr6,pr5,pr4,pr3,pr2,pr1)(__VA_ARGS__) <<endl
#define pr1(a) (#a)<<"="<<(a)<<" "
#define pr2(a,b) pr1(a)<<pr1(b)
#define pr3(a,b,c) pr1(a)<<pr2(b,c)
#define pr4(a,b,c,d) pr1(a)<<pr3(b,c,d)
#define pr5(a,b,c,d,e) pr1(a)<<pr4(b,c,d,e)
#define pr6(a,b,c,d,e,f) pr1(a)<<pr5(b,c,d,e,f)
#define pr7(a,b,c,d,e,f,g) pr1(a)<<pr6(b,c,d,e,f,g)
#define pr8(a,b,c,d,e,f,g,h) pr1(a)<<pr7(b,c,d,e,f,g,h)
//INSERT ABOVE HERE


template<typename T>
class Deque{
public:
  T *val;
  int sz;
  int length;
  int head, tail;
  
  Deque(){sz = 0, length = 0, val = new T[0];}
  Deque(int size, T init = T()){
    length = 1;
    while(length < size) length *= 2;
    val = new T[length];
    sz = size;
    head = 0;
    tail = 0;
    for(int i=0;i<size;i++) val[tail++] = init;
  }
  
  Deque(const Deque &t){
    sz = t.size();
    length = 1;
    while(length < sz) length *= 2;
    val = new T[length];
    head = 0;
    tail = 0;
    for(int i=0;i<sz;i++) val[tail++] = t[i];
  }

  ~Deque(){
    delete [] val;
  }
  
  T& operator [] (int i){assert(0 <= i && i < sz);return val[(head + i)%length];}
  T& operator [] (int i)const{assert(0 <= i && i < sz);return val[(head + i)%length];}
  int size()const{return sz;}
  int empty()const{return sz == 0;}

  void increaseMemory(){
    int length_ = length;
    
    length = length * 2;
    if(length == 0) length = 1;
    T *val2 = new T[length];
    for(int i=0;i<sz;i++) val2[i] = val[(head + i)%length_];
    head = 0;
    tail = sz;
    delete [] val;
    val = val2;
  };
  
  void push_back(T v){
    if(sz == length) increaseMemory();
    sz++;
    val[tail++] = v;
    if(tail == length) tail = 0;
  }
  
  void push_front(int v){
    if(sz == length) increaseMemory();
    sz++;
    head--;
    if(head == -1) head = length - 1;
    val[head] = v;
  }

  void pop_back(){
    assert(sz > 0);
    sz--;
    tail--;
    if(tail == -1) tail = length - 1;
  }
  
  void pop_front(){
    assert(sz > 0);
    sz--;
    head++;
    if(head == length) head = 0;
  }
};
template <typename T>
using vector = Deque<T>;

class UF{
public:
  int V;
  vector<int> par,rnk,sz;
  UF(){}
  UF(int V):V(V),par(V),rnk(V,0),sz(V,1){for(int i=0;i<V;i++)par[i]=i;}
  
  int find(int x){
    assert(x < V);
    if(par[x]==x)return x;
    return par[x]=find(par[x]);
  }
  
  void unite(int x,int y){
    x=find(x), y=find(y);
    if(x==y)return;
    if(rnk[x]<rnk[y])par[x]=y, sz[y] += sz[x];
    else{
      par[y]=x;
      sz[x] += sz[y];
      if(rnk[x]==rnk[y])rnk[x]++;
    }
  }

  bool same(int x,int y){return find(x)==find(y);}

  int size(int x){return sz[find(x)];}
};


signed main(){
  int n, q;
  std::cin>>n>>q;

  UF uf(n);
  
  for(int i=0;i<q;i++){
    int com, x, y;
    std::cin>>com>>x>>y;

    if(com == 0) uf.unite(x, y);
    else std::cout<<uf.same(x, y)<<std::endl;

    
  }
  return 0;
}



Measured memory_bytes: 3204
#include <iostream>

using namespace std;

int main(){
    int m1;
    int m2;
    int d1;
    int d2;
    cin >> m1 >> d1;
    cin >> m2 >> d2;
    if(d2 == 1){
        cout << "1" << endl;
    }
    else{
        cout << "0" << endl;
    }
}

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

#define rp(i, k, n) for (int i = k; i < n; i++)
typedef long long ll;
typedef double ld;



template<class T>inline bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>inline bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const ll INF = 1ll << 60;
const ll MOD = 1e9 + 7ll;
const double PI=3.14159265358979323846;


int main() {
    int N, M;
    cin >> N >> M;
    vector<vector<int>> list(M);
    rp(i, 0, N) {
        int a, b;
        scanf("%d%d", &a, &b);
        if(a <= M) {
            a--;
            list.at(a).emplace_back(b);
        }
    }
    int ans = 0;
    priority_queue<int> Q;
    
    rp(i, 0, M) {
        for(auto x: list.at(i)) Q.push(x);
        if(!Q.empty()){
            ans += Q.top();
            Q.pop();
        }
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 8552
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define Rep(i,s,n) for(int i=s;i<n;i++)
#define per(i,s,n) for(int i=n-1;i>=s;i--)
#define fi first
#define se second
#define all(c) c.begin(),c.end()
typedef long long int ll;
typedef long double ld;
typedef pair<ld, ll> P;

void Ans(bool x){if(x) cout<<"Yes"<<endl;else cout<<"No"<<endl;}

const ll INF=1001000000;
const ll mod=1000000007;

int main(){
  int n;
  cin>>n;
  vector<ll> a(n);
  rep(i,n){
    cin>>a[i];
  }
  sort(all(a));
  /*Rep(i,1,n){
    if(i>=int(a.size())) break;
    if(a[i-1]==a[i]){
      a.erase(a.begin()+i);
    }
  }
  */
  
  
  //int o=a.size();
  int ans=0;
  rep(i,n){
    Rep(j,i+1,n){
      Rep(l,j+1,n){
        if(a[i]+a[j]>a[l]&&a[i]!=a[j]&&a[i]!=a[l]&&a[l]!=a[j]){
          ans++;
          //cout<<a[i]<<a[j]<<a[l]<<endl;
        }
      }
    }
  }
  
  cout<<ans<<endl;
}



Measured memory_bytes: 3632
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int num;
int main()
{
    int a;
    int temp;
    vector<int> cost(1e5+1,0);
    vector<int> dp(1e5+1,0);
    while(cin>>a){
        fill(cost.begin(),cost.end(),0);
        fill(dp.begin(),dp.end(),0);
        for(int i=0;i<a;i++){
            cin>>cost[i];
        }
        temp=0;
        dp[0]=0;
        dp[1]=abs(cost[1]-cost[0]);
        for(int i=2;i<a;i++){
            dp[i]=min(dp[i-1]+abs(cost[i-1]-cost[i]),dp[i-2]+abs(cost[i-2]-cost[i]));
        }
        cout<<dp[a-1]<<endl;
    }
}


Measured memory_bytes: 3840
#include<iostream>
#include<string>
#include<algorithm>
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
#include<iostream>
#include<fstream>
#define ll long long
using namespace std;

int main()
{

  long long n;
  cin >> n;
  long long hairetu[n];
  long long count = 0;
  long long ans = 0;
  
  for (long long i = 0; i < n; i++)
  {
    cin >> hairetu[i];
  }

  for (long long i = 0; i < n;i++)
  {
    if(hairetu[i] >= hairetu[i+1])
    {
      //cout << i << endl;
      count++;
    }
    else if(hairetu[i] < hairetu[i+1])
    {
      if(count > ans)
      {
        ans = count;
      }
      count = 0;
    }
  }
  cout << ans << endl;
}



Measured memory_bytes: 1024
#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<list>
#define REP(i,m,n) for(int i=(int)(m);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define ll long long

using namespace std;

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

	int a;
	int temp = 0;
	rep(i, n) {
		cin >> a;
		temp += a;
	}
	if (h <= temp) {
		cout << "Yes" << endl;
	}
	else cout << "No" << endl;

	return 0;
}

Measured memory_bytes: 256
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   main.cpp                                           :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: monoue <marvin@student.42.fr>              +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/04/22 12:30:15 by monoue            #+#    #+#             */
/*   Updated: 2020/05/05 17:01:06 by monoue           ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include <bits/stdc++.h>

/* #include <boost/multi_array.hpp> */
/* #include <boost/optional.hpp> */
/* #include <boost/range/irange.hpp> */
/* #include <boost/range/algorithm.hpp> */
/* #include <boost/range/adaptors.hpp> */
/* #include <boost/multiprecision/cpp_int.hpp> */
/* #include <boost/algorithm/string/classification.hpp> // is_any_of */
/* #include <boost/algorithm/string/split.hpp> */
/* #include <boost/algorithm/string/join.hpp> */
/* #include <boost/algorithm/string/replace.hpp> */
/* #include <boost/math/tools/minima.hpp> */
/* namespace adaptor = boost::adaptors; */
/* using boost::math::tools::brent_find_minima; */
/* using boost::irange; */
/* using boost::algorithm::join; */
/* using boost::algorithm::split; */
/* using boost::algorithm::replace_all; */
/* using boost::multiprecision::cpp_int; */

using namespace std;

#define	int	long long
#define MOD 1000000007
#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++)
#define rrep(i, n) for (int i = (n); i >= 0; --i)

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

// TOP
const int	dy[4] = {0, 1, 0, -1};
const int	dx[4] = {1, 0, -1, 0};

void	Main()
{
	int	h, w;
	cin >> h >> w;
	vector<string>	field(h);
	rep(i, h)
		cin >> field[i];
	int white;
	white = 0;
	rep(y, h)
	{
		rep(x, w)
		{
			if (field[y][x] == '.')
				white++;
		}
	}
	queue<PII>	que;
	VVI	dist(h, VI(w, -1));
	dist[0][0] = 1;
	que.push(PII(0, 0));
	while (!que.empty())
	{
		int y, x;

		y = que.front().first;
		x = que.front().second;
		que.pop();
		rep(dir, 4)
		{
			int ny, nx;
			ny = y + dy[dir];
			nx = x + dx[dir];
			if (ny < 0 || ny >= h || nx < 0 || nx >= w)
				continue;
			if (field[ny][nx] == '#')
				continue;
			if (dist[ny][nx] != -1)
				continue;
			dist[ny][nx] = dist[y][x] + 1;
			que.push(PII(ny, nx));
		}
	}
	if (dist[h - 1][w - 1] == -1)
		cout << -1 << endl;
	else
		cout << white - dist[h - 1][w - 1] << endl;
}
// END

int32_t	main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout << fixed << setprecision(15);
	Main();
}


Measured memory_bytes: 256
#include <iostream>
#include <complex>
#include <vector>
#include <queue>
#include <cmath>
#include <cstdio>

using namespace std;

typedef complex<double> P;
static const double EPS = 1e-6;

inline double dot(const P& a, const P& b) { return a.real()*b.real() + a.imag()*b.imag(); }
inline double cross(const P& a, const P& b) { return a.real()*b.imag() - b.real()*a.imag(); }
int ccw(const P& a, P b, P c)
{
  b -= a;
  c -= a;
  if (cross(b, c) > EPS) {
    return +1;
  } else if (cross(b, c) < -EPS) {
    return -1;
  } else if (dot(b, c) < -EPS) {
    return +2;
  } else if (dot(b, b) + EPS < dot(c, c)) {
    return -2;
  } else {
    return 0;
  }
}

struct segment/*{{{*/
{
  P a, b;
  segment() {}
  segment(const P& x, const P& y) : a(x), b(y) {}

  // AOJ 2402 Milkey Way
  inline bool intersects(const segment& seg) const
  {
    return ccw(a, b, seg.a) * ccw(a, b, seg.b) <= 0
      && ccw(seg.a, seg.b, a) * ccw(seg.a, seg.b, b) <= 0;
  }

  // AOJ 2402 Milkey Way
  inline double distance(const P& p) const
  {
    if (dot(b-a, p-a) < EPS) {
      return abs(p-a);
    } else if (dot(a-b, p-b) < EPS) {
      return abs(p-b);
    } else {
      return abs(cross(b-a, p-a))/abs(b-a);
    }
  }

  // AOJ 2402 Milkey Way
  inline double distance(const segment& seg) const
  {
    if (intersects(seg)) {
      return 0;
    } else {
      return
        min(
            min(distance(seg.a), distance(seg.b)),
            min(seg.distance(a), seg.distance(b)));
    }
  }
};/*}}}*/

int main() {
    while(true) {
        int N, M, L;
        cin >> N >> M >> L;
        if(!N && !M && !L) break;

        vector<segment> segments;
        vector<vector<double> > dist(N*5, vector<double>(N*5, 0));
        for(int i = 0; i < N; ++i) {
            int x, y, a, r;
            cin >> x >> y >> a >> r;
            P base(x, y);
            P pos = polar(double(r), (a+90)*M_PI/180);
            P rot = polar(double(1), 144*M_PI/180);
            for(int i = 0; i < 5; ++i) {
                P next = pos*rot;
                segments.push_back(segment(base+pos, base+next));
                pos = next;
            }
        }
        for(int i = 0; i < segments.size(); ++i) {
            for(int j = 0; j < i; ++j) {
                dist[i][j] = dist[j][i] = segments[i].distance(segments[j]);
            }
        }

        M--; L--;
        priority_queue<pair<double, int> > q;
        q.push(make_pair(0, 5*M));
        vector<double> memo(segments.size(), 1.0/0.0);
        memo[5*M] = 0;

        double ans = -100;
        while(!q.empty()) {
            double cost = -q.top().first;
            int pos = q.top().second;
            q.pop();
            if(cost > memo[pos]) continue;
            if(pos/5 == L) {
                ans = cost;
                break;
            }

            for(int i = 0; i < segments.size(); ++i) {
                double nc = cost + dist[pos][i];
                if(nc < memo[i]) {
                    memo[i] = nc;
                    q.push(make_pair(-nc, i));
                }
            }
        }

        printf("%.7f\n", fabs(ans));
    }

    return 0;
}

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

namespace b
{
    class Program
    {
        static void Main(string[] args)
        {
            var n = Console.ReadLine();

            var x = int.Parse(n);
            var s = n.ToCharArray().Select(i => int.Parse(i.ToString())).Sum();

            Console.WriteLine(x % s == 0 ? "Yes" : "No");
        }
    }
}


Measured memory_bytes: 11220