akhauriyash/Code-Regression huggingface dataset:
#include <bits/stdc++.h>
using namespace std;

using i64=int64_t;

#define rep(i,x,y) for(i64 i=i64(x),i##_max_for_repmacro=i64(y); i<i##_max_for_repmacro; ++i)
#define debug(x) #x << "=" << (x)
 
#ifdef DEBUG
#define _GLIBCXX_DEBUG
#define print(x) std::cerr << debug(x) << " (L:" << __LINE__ << ")" << std::endl
#else
#define print(x)
#endif
 
const int inf=1.01e9;
const i64 inf64=4.01e18;
const double eps=1e-9;
 
template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec){
    os << "[";
    for (const auto &v : vec) {
        os << v << ",";
    }
    os << "]";
    return os;
}

void solve(){
    int N,M;
    cin >> N >> M;

    cout << (100*N+1800*M)*(1<<M) << endl;
}

int main(){
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);
    cout.setf(ios::fixed);
    cout.precision(16);
    solve();
    return 0;
}


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

//#define int long long
#define ll long long
#define all(v) (v).begin(), (v).end()
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<n;++i)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define EPS (1e-7)
#define gearup ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
typedef pair<ll, ll> P;
typedef vector<ll> vl;
typedef vector<vector<ll> > vvl;
typedef vector<vector<vector<ll> > > vvvl;
ll MOD = 1000000007;
const long long L_INF = 1LL << 60;
const int INF = 2147483647; // 2^31-1
const double PI = acos(-1);
//cout<<fixed<<setprecision(10);

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;}
template<class T> void debug(T v){rep(i,v.size()) cout<<v[i]<<" ";cout<<endl;}
const ll dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const ll dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};

signed main()
{   
    gearup;
    int n; cin >> n;
    if(n==1)cout << "Hello World" << endl;
    else{
        int a,b;cin >> a >> b;
        cout << a+b << endl;
    }
}


Measured memory_bytes: 256
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <string>
#include <iterator>
#include <cmath>
#include <deque>
#include <stack>
#include <functional>
#include <queue>
using namespace std;

signed main()
{
    {
        if (fopen("input.txt", "r")) {
            freopen("input.txt", "r", stdin);
            freopen("output.txt", "w", stdout);
        }
        std::ios_base::sync_with_stdio(false);
        std::cin.tie(NULL);
        std::cout.tie(NULL);
    }

    vector<int> v = { 1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51 };
    int k;
    cin >> k;
    cout << v[k - 1];
    return 0;
}

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

#define int long long
#define rep(i, x) for (int i = 0; i < (int) (x); i++)
#define reps(i, x) for (int i = 1; i <= (int) (x); i++)
#define per(i, x) for (int i = ((int) (x) - 1); i >= 0; i--)
#define sper(i, x) for (int i = ((int) (x)); i > 0; i--)
#define sqr(x) ((x) * (x))
#define mp make_pair
#define pb push_back
#define F first
#define S second
#define bit(n) (1LL << (n))
typedef vector<int> vint;
typedef pair<int, int> pint;
const double PI = 3.141592653589793238462643383279;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { a * b / gcd(a, b); }
template<class T, class U> bool chmax(T &a, const U &b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
template<class T, class U> bool chmin(T &a, const U &b) {
    if (b < a) {
        a = b;
        return true;
    }
    return false;
}
struct Init {
  Init() {
      cout << fixed << setprecision(20);
  };
} init;

int X, A;
signed main() {
    cin >> X >> A;
    if (X < A) { cout << 0 << endl; }
    else { cout << 10 << endl; }
}


Measured memory_bytes: 256
/*
Author: Babin Dutta
*/
 
#include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ll long long int
#define pb push_back
#define mp make_pair
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define f(i,n) for(int i=0;i<n;i++)
#define ff(i,a,b) for(int i=a;i<=b;i++)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define endl "\n"
#define inf 1e18
#define mm 998244353
 
ll power(ll x, ll y, ll p)
{
    ll res = 1;  
    x = x % p;  
    while (y > 0)
    {
        if (y & 1)
            res = (res*x) % p;
        y = y>>1; 
        x = (x*x) % p;  
    }
    return res;
}
ll modInverse(ll A,ll M)
{
    return power(A,M-2,M);
}

void solve(){
	int x, n; cin>>x>>n;
	int a[n];
	set<int> s;
	f(i,n){
		cin>>a[i];
		s.insert(a[i]);
	}
	if(!s.count(x)){
		cout<<x<<endl;
		return;
	}
	int y = x, z = x;
	while(true){
		y--;
		z++;
		if(!s.count(y)){
			cout<<y<<endl;
			return;
		}
		if(!s.count(z)){
			cout<<z<<endl;
			return;
		}
	}
}
 
int main(){
	#ifdef JUDGE
    freopen("input.txt", "rt", stdin);
    freopen("output.txt", "wt", stdout);
    #endif
	boost;
	int t=1; //cin>>t;
	for(int i=1;i<=t;i++) solve();
	return 0;
}

Measured memory_bytes: 3664
sx, sy, tx, ty = map(int,input().split())
x,y=tx-sx,ty-sy
trail='U'*y + 'R'*x
trail+='D'*y + 'L'*x
trail+='L'+'U'*(y+1)+'R'*(x+1)+'D'
trail+='R'+'D'*(y+1)+'L'*(x+1)+'U'
print(trail)

Measured memory_bytes: 3060
use std::io::prelude::*;
use std::io::stdin;
use std::str::FromStr;

fn main() {
    let n: usize = read();
    let csf: Vec<(i32, i32, i32)> = (0..n - 1).map(|_| (read(), read(), read())).collect();

    for i in 0..n {
        let mut ans = 0;
        for j in i..n - 1 {
            if ans < csf[j].1 {
                ans = csf[j].1;
            } else if ans % csf[j].2 == 0 {

            } else {
                ans = ans + csf[j].2 - ans % csf[j].2;
            }
            ans += csf[j].0;
        }
        println!("{}", ans);
    }
}

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let token: String = stdin
        .lock()
        .bytes()
        .map(|b| b.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().unwrap()
}


Measured memory_bytes: 4352
#include <iostream>
#include <set>
#include <vector>
#include <utility>
#include <queue>

using namespace std;

int V, E, r;
vector<pair<int, int> > edges[100010];
priority_queue <pair<int, int>, vector<pair<int, int> >, greater<pair<int, int> > > Q;
pair<int, int> Cost[100010];
const int Inf = 10000*100000 + 100;
bool t[100010], q[100010];
set<int> s;
int SizeQ;

int main() {
  cin >> V >> E >> r;
  for(int i = 0; i < E; i++) {
    int s;
    pair<int, int> e;
    cin >> s >> e.first >> e.second;
    edges[s].push_back(e);
  }
  for(int i = 0; i < V; i++) {
    Cost[i] = make_pair(Inf, i);
    t[i] = false;
    q[i] = false;
    //s.insert(i);
  }
  Cost[r].first = 0;
  Q.push(Cost[r]);
  SizeQ = 1;
  q[r] = true;
  while(SizeQ) {
    pair<int, int> u = Q.top();
    Q.pop();
    if(!t[u.second]) {
      SizeQ--;
      t[u.second] = true;
      /*
      s.erase(u.second);
      for(auto itr = s.begin(); itr != s.end(); itr++) {
	bool update = false;
	for(int i = 0; i < edges[*itr].size(); i++) {
	  if(Cost[edges[*itr][i].first].first != Inf && Cost[*itr].first > Cost[edges[*itr][i].first].first+edges[*itr][i].second) {
	    Cost[*itr].first = Cost[edges[*itr][i].first].first+edges[*itr][i].second;
	    update = true;
	  }
	}
	if(update) {
	  Q.push(Cost[*itr]);
	  if(!q[*itr]) {
	    SizeQ++;
	    q[*itr] = true;
	  }
	}
      }
      */
      for(int i = 0; i < edges[u.second].size(); i++) {
	if(Cost[edges[u.second][i].first].first > Cost[u.second].first + edges[u.second][i].second) {
	  Cost[edges[u.second][i].first].first = Cost[u.second].first + edges[u.second][i].second;
	  Q.push(Cost[edges[u.second][i].first]);
	  if(!q[edges[u.second][i].first]) {
	    SizeQ++;
	    q[edges[u.second][i].first] = true;
	  }
	}
      }
    }
  }
  for(int i = 0; i < V; i++){
    if(Cost[i].first != Inf) cout << Cost[i].first << endl;
    else cout << "INF" << endl;
  }
  return 0;
}

    

Measured memory_bytes: 13580
import java.util.Scanner;


public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		long num1,num2,gc1,gc2,lc1,lc2;

		while(sc.hasNextInt()){
			num1 = sc.nextInt();
			num2 = sc.nextInt();
			if(num1 >= num2){
				gc1 = num1;gc2 = num2;
				lc1 = num1;lc2 = num2;
			}else{
				gc1 = num2;gc2 = num1;
				lc1 = num2;lc2 = num1;
			}						//xx1?????§?????????xx2????°??????????????????£??\???
			long GCD,LCM;
			while(gc1 % gc2 != 0){
				GCD = gc1 % gc2;
				gc1 = gc2;
				gc2 = GCD;
			}
			LCM = (lc1*lc2)/gc2;
			System.out.println(gc2 + " " + LCM);
		}
		sc.close();
	}
}

Measured memory_bytes: 26100
#include<stdio.h>
#include <stdbool.h>

int main(){
   int x, y;
   bool judge = false;
   scanf("%d %d", &x, &y);
   
   for(int i=0; i<=x; i++){
      if(y == 2*i + 4*(x-i)){
         judge = true;
      }
   }
   if(judge){
      printf("Yes\n");
   } else {
      printf("No\n");
   }

   return 0;
}



Measured memory_bytes: 1656
#include <bits/stdc++.h>
using namespace std;
int main(){

int A, B, K;
  cin >> A >> B >> K;
  
  if(A + K - 1 < B - K + 1){
  for(int i = A; i <= A + K - 1;i++) cout << i << endl;
  for(int i = B - K + 1;i <= B;i++) cout << i << endl; 
  }
  else{
    if(A + K - 1 <= B){
  for(int i = A; i <= A + K - 1;i++) cout << i << endl;
  for(int i = A + K;i <= B;i++) cout << i << endl; 
  } 
  else for(int i = A; i <= B;i++) cout << i << endl;
  }
  
return 0;
  
}

Measured memory_bytes: 256
from itertools import combinations
h,w,k=[int(i) for i in input().split()]
a=[]
for i in range(h):
    a.append([i for i in input()])
# creating permutations of all lengths and values
ha=[int(i) for i in range(h)]
wa=[int(i) for i in range(w)]
cnt=0
for i in range(h):
    cnt+=a[i].count('#')
ans=0
for i in range(h):
    p=list(combinations(ha,i))
    for j in range(w):
        q=list(combinations(wa,j))
        for ii in p:
            for jj in q:
                da=[i[:] for i in a]
                for iii in ii:
                    for iiii in range(w):
                        if da[iii][iiii]=='#': da[iii][iiii]='.'
                for jjj in jj:
                    for jjjj in range(h):
                        if da[jjjj][jjj]=='#': da[jjjj][jjj]='.'
                chk=0
                for i in range(h):
                    chk+=da[i].count('#')
                if chk==k:
                    ans+=1
print(ans)
                    
                
        
        
        

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

int main(){
    int N,Q;
    cin>>N>>Q;
    vector<pair<int,string>> V;
    V.emplace_back(1,"kogakubu10gokan");
    for(int i=0;i<N;i++){
        int year;
        string name;
        cin>>year>>name;
        V.emplace_back(year,name);
    }
    N++;
    for(int i=N-1;i>=0;i--){
        if(V[i].first<=Q){
            cout<<V[i].second<<endl;
            return 0;
        }
    }
}

Measured memory_bytes: 3220
#include <bits/stdc++.h>
#define ll long long

using namespace std;

int main() {
  ll a, b, c;
  scanf("%lld %lld %lld", &a, &b, &c);
  ll l = 2LL * (a * b + c * (a + b)), r = a * a + b * b + c * c;
  if(l < r && c - a - b > 0)
    printf("Yes\n");
  else
    printf("No\n");
}

Measured memory_bytes: 256
#include<stdio.h>
#include<math.h>
#include<string.h>
typedef struct Dice{
	int d[6];
	int r[6];
}dice;
int main(void)
{
	dice num;
	int i,t[4]={0};
	char s[128];
	for(i=0;i<6;i++){
		scanf("%d",&(num.d[i]));
	}
	scanf("%s",s);
	for(i=0;i<strlen(s);i++){
		for(int c=0;c<6;c++){
			num.r[c]=num.d[c];
		}
		if(s[i]=='E'){
			t[0]++;
			num.r[2]=num.d[0];
			num.r[3]=num.d[5];
			num.r[5]=num.d[2];
			num.r[0]=num.d[3];
		}else if(s[i]=='W'){
			t[1]++;
			num.r[5]=num.d[3];
			num.r[2]=num.d[5];
			num.r[0]=num.d[2];
			num.r[3]=num.d[0];
		}else if(s[i]=='S'){
			t[2]++;
			num.r[0]=num.d[4];
			num.r[4]=num.d[5];
			num.r[5]=num.d[1];
			num.r[1]=num.d[0];
		}else if(s[i]=='N'){
			t[3]++;
			num.r[0]=num.d[1];
			num.r[1]=num.d[5];
			num.r[5]=num.d[4];
			num.r[4]=num.d[0];
		}
		for(int c=0;c<6;c++){
			num.d[c]=num.r[c];
		}
	}
	printf("%d\n",num.d[0]);
	return 0;
}

Measured memory_bytes: 2744
#include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	auto V=vecin(5);
	sort(ALL(V),greater<int>());

	REP(i,4){
		cout << V[i] << ' ';
	}
	out(V[4]);
	return 0;
}


Measured memory_bytes: 3140
#include<stdio.h>
#include<algorithm>
using namespace std;
int  a[100008];
int main()
{
	int n;
	while(~scanf("%d",&n)){
       for(int i=0;i<n;i++)
            scanf("%d",a+i);
            sort(a,a+n);
            int s=0;
       for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
            for(int k=j+1;k<n;k++){
                if(a[i]+a[j]>a[k])
                    s++;
            }
        }
       }
       printf("%d\n",s);
	}
}


Measured memory_bytes: 256
n = int(input())
top = list(map(int,input().split()))
bottom = list(map(int,input().split()))
topsum = []
bottomsum = []
topt = 0
bottomt = 0
for i in range(n):
    topt += top[i]
    bottomt += bottom[n-1-i]
    topsum.append(topt)
    bottomsum.append(bottomt)
bottomsum.reverse()

maxi = 0
for i in range(n):
    maxi = max(maxi, topsum[i] + bottomsum[i])

print(maxi)

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

typedef long long ll;
const int maxn = 100010;
int n, K;
ll a[maxn], s[maxn], pre[maxn], suf[maxn];

int main() {
    scanf("%d %d", &n, &K);
    for (int i = 1; i <= n; i++) {
        scanf("%lld", &a[i]), s[i] = s[i - 1] + a[i];
        pre[i] = pre[i - 1];
        if (a[i] > 0) pre[i] += a[i];
    }
    for (int i = n; i; i--) {
        suf[i] = suf[i + 1];
        if (a[i] > 0) suf[i] += a[i];
    }
    ll ans = 0;
    for (int i = 1; i + K - 1 <= n; i++) {
        ans = max(ans, pre[i - 1] + suf[i + K] + max(0LL, s[i + K - 1] - s[i - 1]));
    }
    printf("%lld\n", ans);
    return 0;
}

Measured memory_bytes: 3328
#include <iostream>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <cstring>
#include <cassert>
#include <utility>
#include <iomanip>

using namespace std;

#define sz(x) (int) x.size()
#define unique(x) x.erase(unique(x.begin(), x.end()), x.end())
#define all(a) a.begin(), a.end()
#define sqr(x) ((x) * (x)) 
#define y1 aksjdaskdjksjfksdjf
#define left kdnvldvoiwejifejg
#define right lkdsjflksdjfdjfk
#define prev asdasfsadjkjsdfjs
#define tm aklsjdasjdasjdkdjjf

const int MAXN = 10050;
const int mod = (int) 1e9 + 7;

string s;
int n;
int d;
int dp[MAXN][105];

int main() { 

  getline(cin, s);
  scanf("%d", &d);

  for (int i = 0; i <= 9; i++) {
    dp[0][i % d]++;
  }
  for (int i = 1; i < MAXN; i++) {
    for (int j = 0; j < d; j++) {
      for (int k = 0; k <= 9; k++) {
        int sum = (j + k) % d;
        dp[i][sum] = (dp[i][sum] + dp[i - 1][j]) % mod;
      }
    }
  }

  n = sz(s);
  int sum = 0;
  int ans = 0;

  for (int i = 0; i < n; i++) {
    for (int j = 0; j < s[i] - '0'; j++) {
      int need = (d - sum) % d;
      if (n - i - 2 >= 0) {
        ans = (ans + dp[n - i - 2][need]) % mod;
        // cerr << "DP " << n - i - 1 << " " << need << " " << dp[n - i - 2][need] << endl; 
      } else {
        if (need == 0) {
          ans = (ans + 1) % mod; 
        }
      }
      sum = (sum + 1) % d;
    }
  }

  ans = ans - 1;
  if (ans < 0) {
    ans += mod;
  }
  if (sum == 0) {
    ans = (ans + 1) % mod;
  }

  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 4352
import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.format;

void main() {
  auto s = readln;
  int n, a, b, c, d;
  s.formattedRead (" %d %d %d %d %d", &n, &a, &b, &c, &d);
  s = readln;
  --a;
  --b;
  --c;
  --d;
  auto rock = new bool[n];
  foreach (i; 0 .. n) {
    rock[i] = s[i] == '#';
  }
  void maxBlockLength (int x, int y, out int l1, out int l2) {
    debug stderr.writeln(x, ' ', y);
    auto z = rock[x .. y + 1];
    foreach (p; z.group) {
      if (p[0]) {
        l1 = max (l1, p[1]);
      }
      if (!p[0]) {
        l2 = max (l2, p[1]);
      }
    }
  }
  bool test () {
    int p1, q1, p2, q2, p3, q3;
    maxBlockLength (a, c, p1, q1);
    maxBlockLength (b, d, p2, q2);
    if (p1 >= 2 || p2 >= 2) {
      return false;
    }
    if (c < d) {
      return true;
    }
    rock[b] = true;
    maxBlockLength (a, c, p3, q3);
    if (p3 < 2) return true;
    rock[b] = false;
    rock[d] = true;
    maxBlockLength (a, c, p3, q3);
    if (p3 < 2) return true;
    return q2 > 2;
  }
  writeln (test () ? "Yes" : "No");
}



Measured memory_bytes: 2812
import java.util.Scanner;

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

    public static void solve(Scanner sc) {
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        if (Math.abs(a - c) <= d) {
            System.out.println("Yes");
        } else if (Math.abs(a - b) <= d && Math.abs(b - c) <= d) {
            System.out.println("Yes");
        } else {
            System.out.println("No");
        }
    }
}

Measured memory_bytes: 21844
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] l = new int[31];
        for (int i = 0; i < 28; i++) {
            l[sc.nextInt()]++;
        }
        for (int i = 1; i < 31; i++) {
            if (l[i] == 0) {
                System.out.println(i);
            }
        }
    }
}


Measured memory_bytes: 26176
#include <iostream>


using namespace std;


uint64_t calc(uint64_t n, uint64_t m)
{
  if (m < 2 * n)
    return m / 2;

  return n + (m - 2 * n) / 4;
}


int main()
{
  uint64_t n, m;
  cin >> n >> m;

  cout << calc(n, m) << endl;

  return 0;
}


Measured memory_bytes: 256
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _1_7_d
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] a = Console.ReadLine().Split(' ');
            long n = long.Parse(a[0]);
            long m = long.Parse(a[1]);
            long l = long.Parse(a[2]);

            long[,] arrayA = new long[n,m];
            long[,] arrayB = new long[m,l];
            long[,] arrayC = new long[n,l];

            for (int i = 0; i < n; i++)
            {
                string[] b = Console.ReadLine().Split(' ');//1行読む
                for (int j = 0; j < m; j++)//1行読んだ配列を列ごとに処理
                {
                    arrayA[i, j] = int.Parse(b[j]);
                }
            }
            for (int i = 0; i < m; i++)
            {
                string[] b = Console.ReadLine().Split(' ');//1行読む
                for (int j = 0; j < l; j++)//1行読んだ配列を列ごとに処理
                {
                    arrayB[i, j] = int.Parse(b[j]);
                }
            }
            for (int i = 0; i < n; i++)
            {
                for (int j = 0; j < l; j++)
                {
                    for (int k = 0; k < m; k++)
                    {
                        arrayC[i, j] += arrayA[i, k] * arrayB[k,j];
                    } 
                    
                }
            }
            for (int i = 0; i < n; i++)
            {
                for(int j = 0; j < l;  j++)
                {
                    Console.Write(arrayC[i,j]);

                    if (j != l - 1)
                    {
                        Console.Write(' ');//空白
                    }
                }
                Console.Write('\n');
            }
            Console.ReadKey();
        }
    }
}



Measured memory_bytes: 18008
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1e18;
const ll MOD = 1e9+7;
#define REP(i,j,n) for(int i=j;i<n;i++)
#define rep(i,n) REP(i,0,n)


// Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n;
    cin >> n;
    n %= 1000;
    n = 1000 - n;
    n %= 1000;
    cout << n << endl;

}


Measured memory_bytes: 3636
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
typedef vector<int> vec;
using Graph = vector<vector<int>>;
//配列の添字ズレに注意
//=に注意
int main(){
    int N, M,ans=0; cin>>N>>M;
    Graph G(N);//添字の取り方によってはここをN+1とかにする
    for(int i=0;i<M;++i){
        int a,b;
        cin>>a>>b;
        G[a-1].push_back(b-1);
        G[b-1].push_back(a-1);
    }

    // BFS のためのデータ構造
    vector<int> num(N,0);
    vector<int> dist(N,0); // 全頂点を「未訪問」に初期化
    queue<int> que;
  
  
  rep(i,N){
    if(dist[i]==0){
      dist[i]=1;
      que.push(i);
      num[i]++;

      while(!que.empty()){
        int v=que.front(); 
        que.pop();
        // v から辿れる頂点をすべて調べる
        for(int nv : G[v]){
          if(dist[nv]==1) continue; // すでに発見済みの頂点は探索しな
            dist[nv]=1;
            que.push(nv);
            num[i]++;
        }
      }
    }  
  }

  rep(i,N)ans=max(ans,num[i]);
  cout<< ans<<endl;
}


Measured memory_bytes: 16364
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

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

    static class DSemiCommonMultiple {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int m = in.nextInt();
            int[] a = in.readIntArray(n);

            long lcm = 1;
            for (int x : a) {
                lcm = NumberTheory.lcm(lcm, x);
                if (lcm / 2 > m) {
                    out.println(0);
                    return;
                }
            }

            for (int x : a) {
                if ((lcm / 2) % x != x / 2) {
                    out.println(0);
                    return;
                }
            }

            long answer = m / (lcm / 2);
            answer = (answer + 1) / 2;
            out.println(answer);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public int[] readIntArray(int n) {
            int[] x = new int[n];
            for (int i = 0; i < n; i++) {
                x[i] = nextInt();
            }
            return x;
        }

    }

    static class NumberTheory {
        public static long gcd(long a, long b) {
            long c;
            while (a != 0) {
                c = a;
                a = b % a;
                b = c;
            }
            return b;
        }

        public static long lcm(long a, long b) {
            return (a / gcd(a, b)) * b;
        }

    }
}



Measured memory_bytes: 39400
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE BangPatterns #-}

import Control.Applicative
import Control.Monad
import Control.Arrow
import Data.List
import Data.Maybe
import Data.Char
import qualified Data.ByteString.Char8 as B
import Text.Printf

readInt = ( readLn :: IO Int )
readInts = map ( read :: String -> Int ) . words <$> getLine

getList = map ( fst . fromJust . B.readInt ) . B.words <$> B.getLine

which a b f = if f then a else b
mp [ a, b ] = ( a, b )

main = do
	n <- readInt
	let
		six = reverse $ takeWhile ( <= n ) [ 6 ^ k | k <- [ 0 .. ] ]
		nine = reverse $ takeWhile ( <= n ) [ 9 ^ k | k <- [ 0 .. ] ]
	print $ minimum $ do
		a <- [ 0 .. n ]
		let
			b = n - a
		return $ solve six a + solve nine b

solve _ 0 = 0
solve (a:as) rest
	| a <= rest = 1 + solve (a:as) ( rest - a )
	| otherwise = solve as rest

Measured memory_bytes: 892
#!/usr/bin/python3

import math

#標準出力からの読み込み
input_1 = input()
a = int(input_1.split(" ")[0])
b = int(input_1.split(" ")[1])
h = int(input_1.split(" ")[2])
m = int(input_1.split(" ")[3])

#H時M分の時のAとBの間の角度を計算
#Aから見たBを計算してpiを超えていたら2piから引く
theta = abs(m/60.0 - (h/12.0 + m/60.0/12.0))*2*math.pi
if theta >= math.pi:
    theta = 2*math.pi - theta

#判定ロジック
#余弦定理

output = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(theta))
print(output)


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

prize_list = [300000, 200000, 100000]

ans = 0
if X <= 3:
    ans += prize_list[X-1]
if Y <= 3:
    ans += prize_list[Y-1]
if X == 1 and Y == 1:
    ans += 400000
print(ans)

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

void solve() {
    int M; cin >> M;
    vector<P> pairs(M);
    rep(i, M) cin >> pairs[i].first >> pairs[i].second;
    long long sum  = 0;
    long long len = 0;
    rep(i, M) {
        long long a = (long long)pairs[i].first * pairs[i].second;
        sum += a;
        len += pairs[i].second;
    }
    long long ans = (sum - 1) / 9 + len - 1;
    cout << ans << '\n';
}

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


Measured memory_bytes: 3328
#include<bits/stdc++.h>
typedef long long ll;
const ll mod=1e9+7;
const ll inf=0x3f3f3f3f;
const int N=2e5+5;
using namespace std;
ll f[N];
ll ksm(ll a,ll b)
{
    ll ans=1;
    for(;b;b>>=1,a=a*a%mod) if(b&1) ans=ans*a%mod;
    return ans;
}
void fac(int n)
{
    f[0]=1;
    f[1]=1;
    for(int i=2;i<=n;i++) f[i]=f[i-1]*i%mod;
}
ll C(ll a,ll b)
{
    return f[a]*ksm(f[b],mod-2)%mod*ksm(f[a-b],mod-2)%mod;
}
int main()
{
    fac(2100);
    ll n,k;cin>>n>>k;
    for(int i=1;i<=k;i++)
    {
        if(i>n-k+1) cout<<0<<endl;
        else
        {
            cout<<C(n-k+1,i)*C(k-1,i-1)%mod<<endl;
        }
 
    }
    return 0;
}

Measured memory_bytes: 3532
N, Y = map(int,(input().split()))
a = min(Y // 10000,N)
flag = False

if Y == N * 10000:
    print(str(N) + ' 0 0')
else:
    for i in range(a+1):
        for j in range(N-i+1):
            k = N-i-j
            temp = (i * 10000) + (j * 5000) + (k * 1000)
            if temp == Y:
                print(str(i) + ' ' + str(j) + ' ' + str(k))
                flag = True
                break
        if flag:
            break

    if flag is not True:
        print('-1 -1 -1')

Measured memory_bytes: 3064
#include <bits/stdc++.h>
using namespace std;
#define rep2(i,m,n) for (int i = (m); i < (n); ++i)
#define rep(i,n) rep2(i,0,n)
typedef long long int ll;
typedef long double ld;
typedef pair<int, int> P;
template<typename T> struct V : vector<T> { using vector<T>::vector; };
V() -> V<int>;
V(size_t) -> V<int>;
template<typename T> V(size_t, T) -> V<T>;
template<typename T> vector<T> make_vec(size_t n, T a) { return vector<T>(n, a); }
template<typename... Ts> auto make_vec(size_t n, Ts... ts) { return vector<decltype(make_vec(ts...))>(n, make_vec(ts...)); }
template<typename T> ostream &operator<<(ostream &os, const vector<T> &v) { for (auto &e : v) os << e << ' '; return os; }
struct fast_ios { fast_ios(){ cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
const int INF = 1<<30;
const ll LINF = 1LL<<61;

int main()
{
    int n, x, t;
    cin >> n >> x >> t;
    cout << t * ((n + x - 1) / x) << endl;
    return 0;
}

Measured memory_bytes: 3632
#include<stdio.h>
#include<string.h>
const int N = 1300;
const int M = 256;
int main()
{
	char str[N];
	int ary[M] = {0};
	while(fgets(str, 1300, stdin))
	{
		for(int i = 0; i < strlen(str) - 1; i++)
		{
		 	if(str[i] >= 'A' && str[i] <= 'Z')
		 	{
		 		ary[str[i] + 32]++;
			}
			else
			{
				ary[str[i]]++;
			}
		}
		
	}
	for(int i = 'a'; i <= 'z'; i++)
	{
		printf("%c : %d\n", i, ary[i]);
	}
	return 0;
} 


Measured memory_bytes: 2696
#!/usr/bin python3
# -*- coding: utf-8 -*-

n = int(input())
for k in range(10000):
    if k*(k-1) == 2*n:
        break
    elif k*(k-1) > 2*n:
        print('No')
        exit()
print('Yes')
print(k)
ret = [[] for _ in range(k)]
ii = 0
for i in range(k-1):
    for j in range(1,k-i):
        ret[i].append(ii+j)
        ret[i+j].append(ii+j)
    ii += k-i-1
for i in range(k):
    print(' '.join(map(str,[k-1] + ret[i])))


Measured memory_bytes: 17184
#include <stdio.h>

int main()
{
  int N = 0;
  int A[3][3];
  int b[10];
  int i,k,l = 0;
  scanf("%d %d %d",&A[0][0],&A[0][1],&A[0][2]);
  scanf("%d %d %d",&A[1][0],&A[1][1],&A[1][2]);
  scanf("%d %d %d",&A[2][0],&A[2][1],&A[2][2]);
  scanf("%d",&N);
  while (i < N)
  {
    scanf("%d",&b[i]);
    k = 0;
    while(k < 3)
    {
      l = 0;
      while (l < 3)
      {
        if (A[k][l] == b[i])
        {
          A[k][l] = 0;
        }
        l++;
      }
      k++;
    }
    i++;
  }
  i = 0;
  while (i < 3)
  {
    if (A[i][0] == 0 && A[i][1] == 0 && A[i][2] == 0)
  	{
   	 printf("Yes");
   	 return (0);
  	}
    i++;
  }
  i = 0;
  while (i < 3)
  {
    if (A[0][i] == 0 && A[1][i] == 0 && A[2][i] == 0)
  	{
   	 printf("Yes");
   	 return (0);
  	}
    i++;
  }
  if ((A[0][0] == 0 && A[1][1] == 0 && A[2][2] == 0) || (A[0][2] == 0 && A[1][1] == 0 && A[2][0] == 0))
  {
    printf("Yes");
    return (0);
  }
  else
    printf("No");
}


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

typedef pair<int,int>p;


p data1[100001];
p data2[100001];

int main(){
  
  int n;

  cin>>n;

  int v;

  for(int i=0;i<n;i++){

    cin>>v;

    if(i%2==0){
      data1[v].first++;
      data1[v].second=v;
    }else{
      data2[v].first++;
      data2[v].second=v;
    }
  }
  
  sort(data1,data1+100001,greater<p>());
  sort(data2,data2+100001,greater<p>());

  
  if(data1[0].second==data2[0].second){
    if(data1[0].first>data2[0].first){
      cout<<n-data1[0].first-data2[1].first<<endl;
    }else if(data1[0].first<data2[0].first){
      cout<<n-data2[0].first-data1[1].first<<endl;
    }
    else{
      if(data1[1].first>data2[1].first){
	cout<<n-data2[0].first-data1[1].first<<endl;
      }else{
	cout<<n-data1[0].first-data2[1].first<<endl;
      }
    }
    
  }else{
    cout<<n-data1[0].first-data2[0].first<<endl;
  }
  
  return 0;

}


Measured memory_bytes: 1920
#include <iostream>
#include <cmath>
#include <algorithm>
#include <climits>
#include <vector>
#include <string>
#include <set>
#include <iomanip>
#include <map>
#define rep(i,n) for (int i=0;i<(n);++i)
using namespace std;
using ll = long long;
const int INF = 10000000;

int main(){
    int n, k, q;
    cin >> n >> k >> q;
    vector<int> ans(n, k-q);

    rep(i, q){
        int a;
        cin >> a;
        ans[a-1]++;
    }

    rep(i,n){
        if(ans[i]>0) cout << "Yes" << endl;
        else cout << "No" << endl;
    }
    return 0;
}


Measured memory_bytes: 1024
#include<iostream>
#include <vector>
using namespace std;
 
int main()
{
    int d;
 
    while(cin >> d)
    {
        int y=0;
 
        for(int i=1; i*d<600; i++)
        {
            y += d*(d*i)*(d*i);
        }
 
       cout << y << endl;
    }
 
}

Measured memory_bytes: 1164
N,M,X=map(int,input().split())
A=list(map(int,input().split()))

s=[0 for i in range(N)]
for i in range(M):
    s[A[i]]=1
    
for i in range(X):
    cnt_0=sum(s[:X])

for j in range(N-X):
    cnt_N=sum(s[X:])

print(min(cnt_0,cnt_N))

Measured memory_bytes: 9204
#include<stdio.h>
#include<string.h>
int main()
{
	long long a,b,c,d,e,f,g,h,i,j,k,l;
	scanf("%lli",&a);
	for(c=d=0;a;a--)
	{
		scanf("%lli",&b);
		if(b<c)
		{
			d+=(c-b);
		}
		else c=b;
	}
	printf("%lli\n",d);
	return 0;
}

Measured memory_bytes: 1732
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a[110];
  cin >> n;
  for(int i=0; i<n; i++){
    cin >> a[i];
  }
  int maxx=0;
  for(int i=0; i<n; i++){
    for(int j=0; j<n; j++){
      maxx = max(maxx,a[i]-a[j]);
    }
  }
  cout << maxx << endl;
}

Measured memory_bytes: 256
# coding: utf-8
# Your code here!
import sys
import math
n=int(input())
ans=n
for i in range(1,int(math.sqrt(n))+1):
    if n%i==0:
        a=i
        b=int(n/i)
        if a+b-2<=ans:
            ans=a+b-2
print(ans)
    


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

int main() {
  int N, K, a, b, c; 
  cin >>N >>K; 
  a = 1;
  for (int i=0; i<N; i++) {
    b = a*2;
    c = a+K;
    if(b < c ) {
      a = b;
    }
    else {
      a =c;
    }
  }
  cout << a <<endl;
  
}

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

int main() {
  int N;
  cin >> N;
  vector<string> s(N);
  for(int i=0;i<N;i++){
    cin >> s[i];
  }
  int M;
  cin >> M;
  vector<string> t(M);
  for(int i=0;i<M;i++){
    cin >> t[i];
  }
  
  int cnt,result =0;
  for(int i=0;i<N;i++){
    for(int j=0;j<N;j++){
//        cout << "+ "<< i << ": " << j << " : " << s[i] << " : " << s[j] << endl;
        if(s[i]==s[j]){
          cnt++;
        }
    }
    for(int j=0;j<M;j++){
//        cout << "- "<< i << ": " << j << " : " << s[i] << " : " << s[j] << endl;
        if(s[i]==t[j]){
          cnt--;
        }
    }  
//    cout << cnt << " : " << result << endl;
    result = max(cnt,result);
    cnt =0;
  }
  cout << result << endl;
}

Measured memory_bytes: 256
// D - Multiple of 2019
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0;i<(n);++i)
#define irep(i,s) for(int i=(s);i>=0;--i)
#define modadd(x,y,m) x=(x+(y))%m
#define modmul(x,y,m) x=(x*(y))%m

int main(){
	string S; cin>>S;
	int N = S.size();
	int m = 2019; // gcd(2019, 10) = 1 relatively prime
	vector<int> r_count(m, 0); // [0,m-1] count of (mod m)
	int ten = 1; // S[left, right) -> 10^right init 10^0 = 1
	int r = 0; // remainder
	r_count[r]++;
	irep(left, N-1){ // left:[N-1,0]
		modadd(r, (S[left]-'0')*ten, m);
		modmul(ten, 10, m);
		r_count[r]++;
	}
	ll ans = 0;
	rep(r, m) ans += r_count[r]*(r_count[r]-1)/2; // [0,m-1] nC2
	cout<< ans <<endl;
}

Measured memory_bytes: 3732
#include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <cstring>
#include <set>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int MOD = 1000000007;

int main() {
  string s; cin >> s;
  int K; cin >> K;
  set<string> dict;
  rep(i, s.length()) {
    for(int j=1; j<=min(K, (int)s.length()-i); j++) {
      dict.insert(s.substr(i,j));
    }
  }

  auto itr = dict.begin(); rep(i, K-1) ++itr;
  cout << *itr << endl;
  return 0;
}

Measured memory_bytes: 1664
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <string>

using namespace std;

using ll = long long;
using ld = long double;

#ifdef EBUG
#define debug(x) cout << "\033[31m" << #x << ": " << x << "\033[0m\n";
#else
#define debug(x)
#endif

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

ll n;
int main() {
  cin >> n;
  n %= 10;
  switch (n) {
    case 2:
    case 4:
    case 5:
    case 7:
    case 9:
      cout << "hon" << endl;
      break;
    case 0:
    case 1:
    case 6:
    case 8:
      cout << "pon" << endl;
      break;
    case 3:
      cout << "bon" << endl;
  }
}

Measured memory_bytes: 3636
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define inf 500000000
#define IOS ios_base::sync_with_stdio(0)
#define meM(y,a) memset(y,a,sizeof y)
#define sC(a) scanf("%d",&a)
#define alL(a) a.begin(),a.end()
#define prinT(a,sz)  cout<<a[0];for(int i=1;i<sz;i++)cout<<" "<<a[i];cout<<endl
#define ranD srand(chrono::steady_clock::now().time_since_epoch().count());
typedef pair<int,int>pi;
typedef pair<ll,ll>pll;
//int fx[]={0,0,1,-1};
//int fy[]={1,-1,0,0};
//int gx[]={0,0,1,1,1,-1,-1,-1};
//int gy[]={1,-1,0,1,-1,0,1,-1};
bool check(int n,int p){return (1<<p)&n;}
vector<int>v[100010];
pi ara[100010];
int main()
{
    IOS;
    int n,m;cin>>n>>m;
    for(int i=0;i<m;i++)
    {
        int a,b;cin>>a>>b;
        v[a].pb(b);
        ara[i]={a,b};
    }
    for(int i=1;i<=n;i++)sort(v[i].begin(),v[i].end());
    for(int i=0;i<m;i++)
    {
        int a=ara[i].ff;
        int pos=upper_bound(v[a].begin(),v[a].end(),ara[i].ss)-v[a].begin();
//        cout<<a<<" "<<pos<<endl;
        printf("%06d%06d\n",a,pos);
    }
}


Measured memory_bytes: 7808
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

#define ll long long
#define db long double
#define ii pair<int,int>
#define vi vector<int>
#define fi first
#define se second
#define sz(a) (int)(a).size()
#define all(a) (a).begin(),(a).end()
#define pb push_back
#define mp make_pair
#define FN(i, n) for (int i = 0; i < (int)(n); ++i)
#define FEN(i,n) for (int i = 1;i <= (int)(n); ++i)
#define rep(i,a,b) for(int i=a;i<b;i++)
#define repv(i,a,b) for(int i=b-1;i>=a;i--)
#define SET(A, val) memset(A, val, sizeof(A))
typedef tree<int ,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>ordered_set ;
// order_of_key (val): returns the no. of values less than val
// find_by_order (k): returns the kth largest element.(0-based)
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
  const char* comma = strchr(names + 1, ','); cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif
const int N=100005;
ll a[N],b[N];
int main()
{
  std::ios::sync_with_stdio(false);
  cin.tie(NULL) ; cout.tie(NULL) ;
  int n,a1,b1;
  ll sum=0;
  cin>>n>>a1>>b1;
  rep(i,1,n+1) cin>>a[i],sum+=(a[i]+b1-1)/b1;
  ll low=1,high=sum;
  while(low<high)
    {
      ll mid=(low+high)>>1;
      rep(i,1,n+1) b[i]=a[i]-(ll)mid*b1;
      ll diff=a1-b1;
      ll cnt=0;
      rep(i,1,n+1)
	if(b[i]>0) cnt+=(b[i]+diff-1)/diff;
      if(cnt>mid) low=mid+1;
      else high=mid;
    }
  cout<<low<<endl;
  return 0 ;
}


Measured memory_bytes: 1792
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = int.Parse(Console.ReadLine());
            if(a%2 == 1)
            {
                Console.WriteLine((a / 2));
            }
            else
            {
                Console.WriteLine(((a / 2) -1));
            }            

        }
    }
}

Measured memory_bytes: 11092
n=int(input())


def c(s):
    if int(s)>n :
        return 0
    if "7" in s and "5" in s and "3" in s :
        ans=1
    else :
        ans=0
    for i in "753" :
        ans+=c(s+i)
    return ans

print(c("0"))


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

int main()
{
  int k,c=0;
  cin>>k;
  for (int i=1;i<=k;i++)
  {
      for(int j=k;j>=1;j--)
      {
           if(i%2 == 0&& j%2!=0)
        {
          c++;
         }
      }

  }
  cout<<c;
}


Measured memory_bytes: 256
#include <ctime>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <set>
#include <map>
using namespace std;

typedef long long ll;
typedef double lf;
typedef long double Lf;
typedef pair <int,int> pii;
typedef pair <ll, ll> pll;

#define TRACE(x) cerr << #x << "  " << x << endl
#define FOR(i, a, b) for (int i = (a); i < int(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define _ << " " <<

#define fi first
#define sec second
#define mp make_pair

const int MAXN = 100100;

int n, k;

ll p[MAXN], pref[MAXN], pref1[MAXN], suf[MAXN];

int main() {
  scanf("%d %d",&n,&k);
  REP(i, n) scanf("%lld",&p[i]);
  pref[0] = p[0];
  FOR(i, 1, n) pref[i] = pref[i - 1] + p[i];

  for (int i = n - 1; i >= 0; i--) {
    suf[i] = suf[i + 1];
    if (p[i] > 0) suf[i] += p[i];
  }

  if (p[0] > 0) pref1[0] = p[0];

  FOR(i, 1, n) {
    pref1[i] = pref1[i - 1];
    if (p[i] > 0) pref1[i] += p[i];
  }

  ll sol = 0;
  REP(i, n) {
    if (i + k - 1 >= n) break;
    ll tmp = pref[i + k - 1];
    if (i) tmp -= pref[i - 1];
    if (tmp < 0) tmp = 0;
    if (i) tmp += pref1[i - 1];
    if (i + k < n) tmp += suf[i + k];
    sol = max(sol, tmp);
  }

  cout << sol << endl;

  return 0;
}


Measured memory_bytes: 3328
#define LOCAL

#undef _GLIBCXX_DEBUG

#include <bits/stdc++.h>
using namespace std;

#define IOS ios::sync_with_stdio(false);cin.tie(0)
#define all(x) x.begin(), x.end()
#define ff first
#define ss second
#define LLINF 1e18
#define INF (int)1e9+1

// Copied from Gennady-Korotkevich's template

template <typename A, typename B>
string to_string(pair<A, B> p);

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);

string to_string(const string& s) {
	return '"' + s + '"';
}

string to_string(const char* s) {
	return to_string((string)s);
}

string to_string(bool b) {
	return (b ? "true" : "false");
}

string to_string(vector<bool> v) {
	bool first = true;
	string res = "{";
	for (int i = 0; i < static_cast<int>(v.size()); i++) {
		if (!first) {
			res += ", ";
		}
		first = false;
		res += to_string(v[i]);
	}
	res += "}\n";
	return res;
}

template <size_t N>
string to_string(bitset<N> v) {
	string res = "";
	for (size_t i = 0; i < N; i++) {
		res += static_cast<char>('0' + v[i]);
	}
	return res;
}

template <typename A>
string to_string(A v) {
	bool first = true;
	string res = "{";
	for (const auto& x : v) {
		if (!first) {
			res += ", ";
		}
		first = false;
		res += to_string(x);
	}
	res += "}\n";
	return res;
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
	return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
	return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
	return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}

template <typename A, typename B, typename C, typename D, typename E>
string to_string(tuple<A, B, C, D, E> p) {
	return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + "," + to_string(get<4>(p)) + ")";
}

void debug_out() {
	cerr << endl;
}

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
	cerr << " " << to_string(H);
	debug_out(T...);
}

#ifdef LOCAL
#define debug(...) cerr << "\n[" << #__VA_ARGS__ << "]:\n", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

// End of Gennady-Korotkevich's template 

using llong = long long;
using PII = pair<int, int>;

const llong MOD = 1e9 + 7;

int main() {
	IOS;
	llong maxXpY = -LLONG_MAX, minXpY = LLONG_MAX, maxXmY = -LLONG_MAX, minXmY = LLONG_MAX;
	int n; cin >> n;
	for (int i = 0; i < n; i++) {
		llong x, y; cin >> x >> y;
		maxXpY = max(maxXpY, x + y);
		maxXmY = max(maxXmY, x - y);
		minXpY = min(minXpY, x + y);
		minXmY = min(minXmY, x - y);
	}
	cout << max(maxXpY - minXpY, maxXmY - minXmY);
}

Measured memory_bytes: 3660
// 標準入力
var fs = require('fs'),
length = fs.fstatSync(process.stdin.fd).size,
buffer = new Buffer(length),
bytesRead = fs.readSync(process.stdin.fd, buffer, 0, length, 0),
input = buffer.toString('utf8', 0, bytesRead).split('\n');
main();
 
function main(){
  var read = 0;
  var resultCase = 1;
  while(true){
    var maxWeight = +input[read++];
    if(!maxWeight){
      break;
    }
     
    var treasures = +input[read++];
    var pdp = new Int16Array(maxWeight + 1);
    for(var i = treasures; i--;){
      var c = input[read++].split(",");
      var tv = +c[0];
      var tw = +c[1];
 
      var dp = new Int16Array(maxWeight + 1);
      for(var w = 1; w <= maxWeight; w++){
        var pdpw = pdp[w];
        dp[w] = (w-tw < 0) ? pdpw : Math.max(pdp[w-tw] + tv, pdpw);
      }
      pdp = dp;
    }
 
    var resultWeight = 1001;
    var resultCost = 0;
    for(var i = 0; i <= maxWeight; i++){
      var pdpi = pdp[i];
      if(pdpi > resultCost){
        resultCost = pdpi;
        resultWeight = i;
      }
    }
     
    console.log("Case " + resultCase++ + ":\n" + resultCost + "\n" + resultWeight);
  }
}
 
function max(a, b) {
  var t = a - b;
  return a - (t & (t >> 31));
}

Measured memory_bytes: 12412