akhauriyash/Code-Regression huggingface dataset:
#include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
#include <stack>
#include <queue>
#include <functional>
#include <limits.h>
#include <set>
#include <map>
#include <tuple>
using namespace std;

#define ll long long
#define ull unsigned long long
#define rep(i,N) for (ll i=0;i<N;i++)
#define loop(i,N,M) for(ll i=N;i<M;i++)
#define MAX(v) *max_element(v.begin(),v.end())
#define MIN(v) *min_element(v.begin(),v.end())
#define SORTL2S(type,v) sort(v.begin(),v.end(),greater<type>())
#define SORTS2L(type,v) sort(v.begin(),v.end())
#define SORTMF(v,func) sort(v.begin(),v.end(),func)

template<typename A, size_t N, typename T>
void Fill(A(&array)[N], const T &val) {
	std::fill((T*)array, (T*)(array + N), val);
}

ll A, B, C, T, N, M, Q, X, Y, Z;
string S;
vector<ll> vec;

void solve() {
	cin >> N;
	cout << 3 * N*N;


}

int main() {
	solve();
	cout << endl;
	return 0;
}


Measured memory_bytes: 888
import java.util.*;

class Main {
    final Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        new Main().run();
    }

    private void run() {
        int n = sc.nextInt();
        int k = sc.nextInt();
        List<Long> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            list.add(sc.nextLong());
        }
        Collections.sort(list, Collections.reverseOrder());

        long sum = 0;
        for (int i = k; i < n; i++) {
            sum += list.get(i);
        }
        System.out.println(sum);
    }
}


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

int main() {
  int N ;
  cin >> N ;
  
  if(N%10==7){
    cout<<"Yes"<<endl;
  }
  
  else if(N/100==7){
    cout<<"Yes"<<endl;
  }
  
  else if(N%100-N%10==70){
   cout << "Yes" <<endl;
  }
  
  else {
    cout<<"No" << endl;
  }
}
  



Measured memory_bytes: 3636
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int n;
  int k=0;
  int a[101]={0};
  while(scanf("%d",&n)!=EOF){
    a[n]++;
  }
  for(int i=0;i<101;i++){
    if(k<a[i]){
      k=a[i];
    }
  }
  for(int i=0;i<101;i++){
    if(k==a[i]){
      printf("%d\n",i);
    }
  }
  return 0;
}

Measured memory_bytes: 1188
#include<bits/stdc++.h>
#include<cassert>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
#include <ext/pb_ds/detail/standard_policies.hpp>
using namespace std;
using namespace __gnu_pbds; 
typedef tree<
int,
null_type,
less<int>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;
#define pfi(a) printf("%d",a);
#define pfl(a) printf("%lld",a);
#define pfin(a) printf("%d\n",a);
#define pfln(a) printf("%lld\n",a);
#define sfi(a) scanf("%d",&a);
#define sfl(a) scanf("%lld",&a);
#define pb push_back
#define f(i,a,b) for(int i=a;i<b;i++)
#define ll long long
#define inf INT_MAX
#define llinf LONG_LONG_MAX
const int N=2e5+5;
const int M=1e9+7;


void solve(){
	int n,k;
	sfi(n) sfi(k)

	int vis[101]={0};

	f(i,0,k){
		int cnt;
		sfi(cnt)

		while(cnt--){
			int temp;
			sfi(temp)
			vis[temp]=1;
		}
	}

	int ans=0;

	f(i,1,n+1){
		if(!vis[i]){
			ans++;
		}
	}

	cout<<ans;
}



int main(){	
	
	solve();
	return 0;	
}

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

int main()
{
	int a,b,c,d,sum=0;
	char s[100];

    cin>>a>>b;
    if(a>b)
        cout<<a-1<<endl;
    else
    {
        cout<<a<<endl;
    }
    
	
	return 0;
}
	

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

int main() {
    int N;
    cin >> N;
    vector<int> v(N);
    bool j = true;
    int b = 10000, sum = 0;
    rep(i, 0, N){
        cin >> v[i];
        sum += v[i];
        if(v[i]%10 != 0){
            int tempb = v[i];
            b = min(b, tempb);
            j = false;
        }
    }
    if(sum%10 != 0){
        cout<< sum << endl;
        }
    else if(j){
        cout << "0" << endl;
    }
    else{
        cout<< sum - b << endl;
        }
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repp(i, n, m) for (int i = (int)(n); i < (int)(m); i++)
#define rrep(i, n, m) for (int i = n; i >= m; i--)
#define ALL(a) (a).begin(), (a).end()
#define p(a, b) printf(a, b);
#define c(s) cout << (s) << endl;
#define yes cout << "Yes" << endl;
#define no cout << "No" << endl;
#define YES cout << "YES" << endl;
#define NO cout << "NO" << endl;
#define cyn(c) cout << (c ? "Yes" : "No") << endl;
#define cYN(c) cout << (c ? "YES" : "NO") << endl;
#define pyn(c) printf("%s\n", c ? "Yes" : "No");
#define pYN(c) printf("%s\n", c ? "YES" : "NO");
#define INF 1e18
typedef long long LL;
typedef unsigned long long ULL;
typedef pair<LL, LL> P;
template <class T>
bool contain(const std::string &s, const T &v)
{
  return s.find(v) != std::string::npos;
}
ULL mod = 1e9 + 7;

int main(){
    int a[5]={},vmax=0,vindex=0,sum=0;
    rep(i,5){
      cin>>a[i];
      if(a[i]%10 != 0 && (10 - a[i]%10) > vmax){
        vmax = 10 - a[i]%10;
        vindex = i;
      }
    }
    // cout<<"vi:"<<a[vindex]<<endl;
    rep(i,5){
      if(i==vindex || a[i]%10 == 0){
        sum += a[i];
      }else{
        sum += a[i] + (10-a[i]%10);
      }
    }

    cout<<sum<<endl;
}


Measured memory_bytes: 256
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
int acs(const void *a, const void *b){return *(int*)a - *(int*)b;} /* 1,2,3,4.. */
int des(const void *a, const void *b){return *(int*)b - *(int*)a;} /* 8,7,6,5.. */
int cmp_char(const void *a, const void *b){return *(char*)a - *(char*)b;} /* a,b,c,d.. */
int cmp_str(const void *a, const void *b){return strcmp(*(const char **)a, *(const char **)b);} /* aaa,aab.. */
#define min(a,b) (a < b ? a: b)
#define max(a,b) (a > b ? a: b)
#define rep(i, l, r) for (int i = l; i < r; i++)
#define MAX 100001
#define MOD 1000000007

typedef long long int lli;

int main(void) {
  char s[11];
  scanf("%s", s);

  int n = strlen(s);
  int cnt = 0;
  int ans = 0;
  rep(i, 0, n) {
    if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') {
      cnt++;
    } else {
      ans = max(ans, cnt);
      cnt = 0;
    }
  }
  ans = max(ans, cnt);
  printf("%d\n", ans);
  return 0;
}


Measured memory_bytes: 128
#include "bits/stdc++.h"
// Begin Header {{{
#define all(x)          (x).begin(), (x).end()
#define rep(i, s, n)    for (i64 i = (s), i##_limit = (n); i < i##_limit; ++i)
#define repr(i, s, t)   for (i64 i = (s), i##_limit = (t); i >= i##_limit; --i)
#define VAR(type, ...)  type __VA_ARGS__; read(__VA_ARGS__);
#ifndef DBG
#define dump(...)
#endif
using namespace std;
using i64 = int_fast64_t;
using pii = pair<i64, i64>;
template <class T, class U> inline bool chmax(T &a, const U &b) { return b > a && (a = b, true); }
template <class T, class U> inline bool chmin(T &a, const U &b) { return b < a && (a = b, true); }
constexpr int INF  = 0x3f3f3f3f;
constexpr i64 LINF = 0x3f3f3f3f3f3f3f3fLL;

template <class T>
inline vector<T> makeV(const T &initValue, size_t sz) {
    return vector<T>(sz, initValue);
}

template <class T, class... Args>
inline auto makeV(const T &initValue, size_t sz, Args... args) {
    return vector<decltype(makeV<T>(initValue, args...))>(sz, makeV<T>(initValue, args...));
}

template <class T>
inline istream& operator>> (istream &is, vector<T> &vec) {
    for (auto &e : vec) is >> e;
    return is;
}

inline void read() {}

template <class Head, class... Tail>
inline void read(Head &head, Tail&... tail) { cin >> head; read(tail...); }

inline void print() { cout << "\n"; }

template <class Head, class... Tail>
inline void print(Head &&head, Tail&&... tail) {
    cout << head;
    if (sizeof...(tail)) cout << ' ';
    print(forward<Tail>(tail)...);
}

template <class T>
inline ostream& operator<< (ostream &os, const vector<T> &vec) {
    static constexpr const char *delim[] = { " ", "" };
    for (const auto &e : vec) os << e << delim[&e == &vec.back()];
    return os;
}
// }}} End Header

int N;
vector<vector<int>> hoge;

void dfs(int i, int last, vector<int> nn) {
    if (i >= N) {
        hoge.push_back(move(nn));
        return;
    }

    for (int x = 0; x <= last + 1; ++x) {
        auto cpy = nn;
        cpy[i] = x;
        dfs(i + 1, max(x, last), cpy);
    }

    return;
}

signed main() {
    ios_base::sync_with_stdio(false); cin.tie(nullptr);

    read(N);
    dfs(0, -1, vector<int>(N));

    for (const auto &e : hoge) {
        char t[255] {};
        char itr = 'a';
        char ans[20] {};
        rep(i, 0, N) {
            if (t[e[i]]) {
                ans[i] = t[e[i]];
            } else {
                t[e[i]] = itr++;
                ans[i] = t[e[i]];
            }
        }
        print(ans);
    }

    return 0;
}


Measured memory_bytes: 9648
using System;

namespace AOJ.Volume0
{
    public class Puzzle
    {
        public static int Main()
        {
            while (true)
            {
                var input = Console.ReadLine();
                if (string.IsNullOrEmpty(input)) { break; }

                string answer = "";
                for (int i = 1; i <= 9; i++)
                {
                    var tmp = input + i.ToString();
                    // ????????°?????????????????????4????????§
                    if (tmp.Replace(i.ToString(), "").Length < 10) { continue; }

                    if (Solve(tmp)) { answer += i.ToString() + " "; }
                }

                if (answer.Length > 0) { Console.WriteLine(answer.Trim()); }
                else { Console.WriteLine("0"); }
            }
            return 0;
        }

        private static bool Solve(string test)
        {
            // ????????°???2???????????£????????????
            if(test.Length == 2)
            {
                if(test[0] == test[1]) { return true; }
                else { return false; }
            }

            // ??°??????????????°???????????????
            var hist = new int[10];
            foreach (var t in test) { hist[int.Parse(t.ToString())]++; }

            for (int i = 1; i <= 9; i++)
            {

                // ???????????????
                if (hist[i] >= 3)
                {
                    var tmp = "";
                    for(int j = 1; j <= 9; j++)
                    {
                        tmp += new string(char.Parse(j.ToString()), j == i ? hist[j] - 3 : hist[j]);
                    }
                    if (Solve(tmp)) { return true; }
                }
                // ???????????????
                if (i <= 7 && hist[i] >= 1 && hist[i + 1] >= 1 && hist[i + 2] >= 1)
                {
                    var tmp = "";
                    for(int j = 1; j <= 9; j++)
                    {
                        int cnt = hist[j];
                        if(j == i || j == i+1 || j == i + 2) { cnt--; }
                        tmp += new string(char.Parse(j.ToString()), cnt);
                    }
                    if (Solve(tmp)) { return true; }
                }
            }

            // ?????????????????????????????°??±???
            return false;
        }
    }
}

Measured memory_bytes: 9396
#include<stdio.h>

int main(){
 int q,w,e,r,t,y;
 int i,j,k;
 int dp[21][11][156];
 
 dp[0][0][0] = 1;
 
 for(i = 1;i < 21;i++){
  dp[i][0][0]=1;
  for(j = 1;j < 11;j++){
   for(k = 1;k < 156;k++){
    dp[i][j][k] = (i<=k ? dp[i-1][j-1][k-i] : 0) + dp[i-1][j][k];
}}}

 while(scanf("%d%d%d",&q,&w,&e),q){
  printf("%d\n",dp[q][w][e]);
 }
 return 0;
}

Measured memory_bytes: 736
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
using namespace std;
//typedef __int64 LL;
//typedef long long int LL;
typedef pair<int,int> P;

const int MOD=1000000007;

int main()
{
	int n,r;
	cin>>n>>r;
	if(n>=10)cout<<r<<"\n";
	else cout<<r+100*(10-n)<<"\n";
	
	return 0;
}

Measured memory_bytes: 256
require 'set'

def sim(t, ds)
  return ds.shift if t == nil
  if i = ds.bsearch_index { |d| d > t }
    return ds.delete_at i
  end
  nil
end

loop do
  n = gets.to_i
  break if n == 0
  all = Set.new(1..2*n)
  taro = ds1 = n.times.map { gets.to_i }.sort
  hanako = ds2 = (all -ds1).sort
  t = nil
  until ds1.empty? || ds2.empty?
    t = sim(t, ds1)
    ds1, ds2 = ds2, ds1
  end
  puts hanako.size, taro.size
end


Measured memory_bytes: 7028
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define MOD 1000000007
#define INF 1e9
#define All(x) (x).begin(), (x).end()
typedef long long ll;
using namespace std;


int main() {
  string s;
  cin>>s;
  int sz=s.size();
  int idxa=200010,idxz=0;
  rep(i,sz){
    if(s[i]=='A'){
      idxa=min(i,idxa);
    }
    if(s[i]=='Z'){
      idxz=i;
    }
  }

  int ans=idxz-idxa+1;
  cout<<ans<<"\n";
  

  return 0;
}


Measured memory_bytes: 640
#include <stdio.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <cstdlib>
#include <list>
#include <numeric>
#define rep(i,n) for(int i=0;i<n;i++)
#define all(x) (x).begin(),(x).end()
using namespace std;

int a, b, c, n;
string s;



int main()
{
   cin>>a>>b;
  if(a*b%2==1)
    cout<<"Odd"<<endl;
  else
    cout<<"Even"<<endl;
	
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
const int N = 212345;
int dp[N][26];
char s[N];
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    cin >> s;
    int n = strlen(s);
    for (int i = n-1; i >= 0; --i) {
        copy_n(dp[i+1],26,dp[i]);
        dp[i][s[i]-'a'] = max(dp[i][s[i]-'a'], *min_element(dp[i],dp[i]+26)+1);
    }
    int c = min_element(dp[0],dp[0]+26)-dp[0], i = 0;
    int w = dp[0][c];
    while (w--) {
        cout << char(c+'a');
        while (s[i] != c+'a')
            ++i;
        ++i;
        c = min_element(dp[i],dp[i]+26)-dp[i];
    }
    cout << char(c+'a') << '\n';
}


Measured memory_bytes: 20736
n = int(input())
wlist = list(map(int, input().split()))

lsum, rsum = wlist[0], sum(wlist[1:])
ans = abs(lsum - rsum)

for i in range(1, n-1):
  lsum += wlist[i]
  rsum -= wlist[i]
  if ans > abs(lsum - rsum):
    ans = abs(lsum - rsum)
print(ans)


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

int main() {

    int n;
    cin >> n;

    vector<int> v(n);
    vector<map<int, int>> vCount(2);

    int vMax[2] = {0, 0};
    int vMaxNum[2] = {-1, -1};

    for(int i = 0; i < n; ++i) {
        cin >> v[i];
        
        int x = i % 2;
        if(vCount[x].find(v[i]) == vCount[x].end()) {

            vCount[x].emplace(v[i], 1);

            if(vMax[x] < vCount[x][v[i]]) {
                vMax[x] = vCount[x][v[i]];
                vMaxNum[x] = v[i];
            }

        } else {

            vCount[x][v[i]]++;
            
            if(vMax[x] < vCount[x][v[i]]) {
                vMax[x] = vCount[x][v[i]];
                vMaxNum[x] = v[i];
            }
        }
    }

    int count = 0;

    if(vMaxNum[0] != vMaxNum[1]) {
        count += n / 2 - vMax[0];
        count += n / 2 - vMax[1];
    }
    else {
       
        int count1 = 0;
        
        count1 += n / 2 - vMax[0];

        int nextMax = 0;
        for(const auto &vc : vCount[1]) {
            if(vc.first == vMaxNum[1])
                continue;
            nextMax = max(nextMax, vc.second);
        }

        count1 += n / 2 - nextMax;


        int count2 = 0;
        count2 += n / 2 - vMax[1];
        nextMax = 0;
        for(const auto &vc : vCount[0]) {
            if(vc.first == vMaxNum[0])
                continue;
            nextMax = max(nextMax, vc.second);
        }

        count2 += n / 2 - nextMax;
        
        count = min(count1, count2);
     //   cout << count1 << " " << count2 << endl;
    }

    cout << count << endl;

    return 0;

}

Measured memory_bytes: 5376
#include <cstdio>
#include <iostream>
#include <vector>
#include <queue>
#include <map>
#include <algorithm>
#include <cmath>
#include <string>

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

using namespace std;

template<class T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}

template<class T>
inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

void trace(int A[], int N) {
    for (int i = 0; i < N; ++i) {
        if (i > 0) cout << " ";
        cout << A[i];
    }
    cout << endl;
}

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

const unsigned long long INF = 1LL << 60;

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

int main() {
    int a[3];
    rep(i, 3) cin >> a[i];
    sort(a, a + 3);
    string ans;
    for (int i = 0; i < 3; i++) {
        ans += to_string(a[i]);
        if (i < 2) {
            ans += " ";
        }
    }
    cout << ans << endl;
}



Measured memory_bytes: 3268
#include <iostream>
#include <string>
#include <cstring>
#include <map>
#include <cmath>
#include <set>
#include <bitset>
using namespace std;

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

#define N 5010
#define X first
#define Y second

const int INF=1<<30;
const int Mod=1000000007;

bool pre[N][N],suf[N][N];
int a[N],q[N];

int main()
{
	//freopen("in.in","r",stdin);
	//freopen("out.out","w",stdout);

	int n,k,ans=0; cin >> n >> k;
	if (n==1) 
	{
		printf("0\n");
		return 0;
	}
	for (int i=1;i<=n;i++) cin >> a[i];
	pre[0][0]=1;
	for (int i=1;i<=n;i++) 
	{
		memcpy(pre[i],pre[i-1],sizeof(pre[i-1]));
		for (int j=0;j+a[i]<=k;j++) pre[i][j+a[i]]|=pre[i-1][j];
	}
	suf[n+1][0]=1;
	for (int i=n;i>=1;i--)
	{
		memcpy(suf[i],suf[i+1],sizeof(suf[i+1]));
		for (int j=0;j+a[i]<=k;j++) suf[i][j+a[i]]|=suf[i+1][j];
	}
	for (int i=1;i<=n;i++)
	{
		bool flag=false;
		for (int j=k-1;j>=0 && j>=k-a[i];j--) if (pre[i-1][j] || suf[i+1][j]) flag=true;
		if (flag) continue;
		
		int f=1,r=0,p=0; if (pre[i-1][0]) q[++r]=0;
		for (int j=k-1-a[i];j>=0;j--)
		{
			if (!suf[i+1][j]) continue;
			
			while ((p+1)<=k-1-j) 
			{
				p++;
				if (pre[i-1][p]) q[++r]=p;
			}
			while (f<=r && q[f]<k-a[i]-j) f++;
			if (f<=r) flag=true; 
		}
		if (!flag) ans++;
	}
	printf("%d\n",ans);
	return 0;
}

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

int main(){
    int minimum = INT_MAX, road, maximumTime, cost, time;
    cin >> road >> maximumTime;
    for(int i=0; i<road; i++) {
        cin >> cost >> time;
        if(time <= maximumTime && cost < minimum) minimum = cost;
    }
    if(minimum != INT_MAX) cout << minimum << endl;
    else cout << "TLE\n";
    return 0;
}



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

int main(int argc, char const *argv[])
{
	int x = 0;
	int current;
	int count;
	cin >> count;
	for (int i = 0; i < count; ++i)
	{
		cin >> current;
		if ((x + 1) == current) x ++;
	}
	if (x == 0) cout << -1;
	else cout << count - x;
	return 0;
}


Measured memory_bytes: 764
import java.io.*;
import java.util.*;

public class Main {
  public static void main(String[] args) {
    new Main().run();
  }

  private void run() {
    try(BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out)) {

        String[] lines = in.readLine().split(" ");
        int n = Integer.parseInt(lines[0]);
        int m = Integer.parseInt(lines[1]);

        TreeMap<Long,Long> map = new TreeMap<>();

        lines = in.readLine().split(" ");
        Long b = 0L;
        for (int i = 0; i < n; i++) {
          b = Long.parseLong(lines[i]);
          if(map.containsKey(b)) map.put(b, map.get(b) + 1);
          else  map.put(b, 1L);
        }

        Long c = 0L;
        for (int i = 0; i < m; i++) {
          lines = in.readLine().split(" ");
          b = Long.parseLong(lines[0]);
          c = Long.parseLong(lines[1]);
          if(map.containsKey(c)) map.put(c, map.get(c) + b);
          else map.put(c, b);
        }

        Long N = new Long(n);
        Long ans = 0L;
        Long k, v;
        Iterator<Long> ite = map.descendingKeySet().iterator();
        for(Long cnt = 0L; cnt < N; cnt += v) {
          k = ite.next();
          v = map.get(k);
          if(cnt + v < N) ans += k * v;
          else ans += k * (n - cnt);
        }

        out.println(ans);
        out.flush();
    }
    catch(IOException e) {
      System.err.println(e);
    }
  }
}

Measured memory_bytes: 78444
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define rep2(i,n) for(int i=0;i<=n;i++)
#define repr(i,a,n) for(int i=a;i<n;i++)
#define all(a) a.begin(),a.end()
#define P pair<long long,long long>
#define double long double
#define INF 1e10
#define MOD 1e9+7
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
signed main(){
double a,b;
  cin>>a>>b;
  cout<<a/b;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
#define reps(i,n) for(int i = 1; i <= n; i++)
#define rrep(i,n) for(int i = n-1; i >= 0; i--)
#define rreps(i,n) for(int i = n; i >= 1; i--)
#define co(x) cout << x <<endl
#define cs(x) cout << x <<" "
#define cer(x) cerr << x <<endl
#define ALL(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
#define ERASE(x,val) x.erase(remove(ALL(x), val), x.end())
#define pb push_back

typedef long long ll;
typedef unsigned long long ull;
using namespace std;
ll mod = 1e9 + 7;
template<class T>inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; }return false; }
template<class T>inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; }return false; }

int main()
{
	int n, k; cin >> n >> k;
	int ans;
	if (k == 1)ans = 0;
	else ans = n - k;
	co(ans);
	return 0;
}


Measured memory_bytes: 256
#include "bits/stdc++.h"
using namespace std;
int main(){
    stack<char> st;
    string s;
    cin >> s;
    int n = s.size();
    for(int i = 0; i < n; i++){
        if(s.at(i) != 'B')
        st.push(s.at(i));
        else if(!st.empty())
        st.pop();
    }
    string a;
    while(!st.empty()){
        a.push_back(st.top());
        st.pop();
    }
    reverse(a.begin(), a.end());
    cout << a << endl;
    return 0;
}

Measured memory_bytes: 256
A = [[] for i in range(3)]
A[0] = list(map(int, input().split(' ')))
A[1] = list(map(int, input().split(' ')))
A[2] = list(map(int, input().split(' ')))
bingo = [[0, 0, 0] for i in range(3)]
N = int(input())
for i in range(N):
    num = int(input())
    for j in range(3):
        for k in range(3):
            bingo[j][k] = 1 if A[j][k] == num else bingo[j][k]
            # print(num, A[j][k])

flag = False
if (bingo[0][0] and bingo[1][1] and bingo[2][2]) or (bingo[0][2] and bingo[1][1] and bingo[2][0]):
    flag = True

if flag == False:
    for i in range(3):
        if (bingo[0][i] and bingo[1][i] and bingo[2][i]) or (bingo[i][0] and bingo[i][1] and bingo[i][2]):
            flag = True
            break

if flag:
    print('Yes')
else:
    print('No')

Measured memory_bytes: 3188
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define mfill(x,y) memset(x,y,sizeof(x))
#define all(v) v.begin(), v.end()
#define in(x,y,h,w) if(0<=x&&x<h&&0<=y&&y<w)
#define y0 y12345
#define y1 y54321

#ifdef LOCAL
#define debug(...) fprintf(stderr,__VA_ARGS__)
#else
#define debug(...) 42
#endif

using ul = unsigned long;
using ll = long long;
using P = pair<int, int>;
using vint = vector<int>;using vvint = vector<vector<int>>;
using vll = vector<ll>;using vvll = vector<vector<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;}
template <class T>void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
	v.assign(a, vector<T>(b, t));
}
template <class T>T gcd(T &a, T &b){if(a<b){swap(a,b);} T r = a%b; while(r!=0){a=b;b=r;r=a%b;} return b;}

vint dx = {-1, 0, 1, 0}, dy = {0, -1, 0, 1};
vint dx8 = {-1, -1, -1, 0, 1, 1, 1, 0}, dy8 = {-1, 0, 1, 1, 1, 0, -1, -1};

int main() {
	cin.tie(0);
   	ios::sync_with_stdio(false);
	debug("debug test\n");
   	int n,m;
	ll x,y;cin>>x>>y;
	ll ans = 1;
	while(x*2<=y){
		ans++;
		x *= 2;
	}
	cout << ans << endl;
	return 0;
}


Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main(void){
	int c[3][3];
	cin >> c[0][0] >> c[0][1] >> c[0][2];
	cin >> c[1][0] >> c[1][1] >> c[1][2];
	cin >> c[2][0] >> c[2][1] >> c[2][2];
	bool r = true;
	for( int i =0 ; i < 3; i++){
		int diff[3];
		int diff2[3];
		for(int j = 0; j < 3; j++){
			diff[j] = c[i%3][j] - c[(i+1)%3][j];
		}
		r &= (diff[0] == diff[1] && diff[0] == diff[2]);

		for(int j = 0; j < 3; j++){
			diff[j] = c[j][i%3] - c[j][(i+1)%3];
		}
		r &= (diff[0] == diff[1] && diff[0] == diff[2]);
	}
	if(r)
		cout << "Yes" << flush;
	else
		cout << "No" << flush;
}


Measured memory_bytes: 256
import numpy as np
import math

l,r=list(map(int, input().split()))


out = 2018
flag = False
for i in range(l,r+1):
    for j in range(i+1, r+1):
        out = min(out, int((i*j)%2019))
        if out == 0:
            flag = True
            break
    if flag:
        break

print(out)


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

int A[1000010], G[100], cnt = 0;

void swap(int *a, int *b) {
	int tmp = *a;
	*a = *b;
	*b = tmp;
}

void reverse(int *A, int n) {
	for (int i = 0; i < n/2; ++i) swap(&A[i], &A[n - 1 - i]);
}

void insertionSort(int *A, int n, int g) {
	for (int i = g; i < n; ++i) {
		int v = A[i];
		int j = i - g;
		while (j >= 0 && A[j] > v) {
			A[j+g] = A[j];
			j -= g;
			cnt++;
		}
		A[j+g] = v;
	}
}

void shellSort(int *A, int n) {
	int m = 0;
	G[m] = 1;
	while (true) {
		m++;
		G[m] = 3*G[m - 1] + 1;
		if (G[m] > n) break;
	}
	reverse(G, m);
	printf("%d\n", m);
	for (int i = 0; i < m; ++i) {
		if (i != m-1) printf("%d ", G[i]);
		else printf("%d\n", G[i]);
	}
	for (int i = 0; i < m; ++i) {
		insertionSort(A, n, G[i]);
	}
}

int main() {
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; ++i) {
		scanf("%d", &A[i]);
	}
	shellSort(A, n);

	printf("%d\n", cnt);
	for (int i = 0; i < n; ++i) {
		printf("%d\n", A[i]);
	}
}



Measured memory_bytes: 5752
#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m;
  cin>>n>>m;
  vector<int> a(n);
  vector<bool> b(n);
  fill(a.begin(),a.end(),1);
  fill(b.begin(),b.end(),false);
  b[0]=true;
  for(int i=0;i<m;i++){
    int x,y;
    cin>>x>>y;
    x--,y--;
    a[x]--,a[y]++;
    if(b[x])
      b[y]=true;
    if(a[x]==0)
      b[x]=false;
  }
  int c=0;
  for(int i=0;i<n;i++){
    if(b[i])
      c++;
  }
  cout<<c<<endl;
}

Measured memory_bytes: 640
/* 
	Author: ankrypt
*/

#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;
template<class T> using oset=tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define MOD 1000000007
#define ll long long int
#define u64 unsigned long long int
#define ff first
#define ss second
#define all(x) x.begin(), x.end() 
#define ub upper_bound
#define lb lower_bound
#define MAX_INT 15
#define fi(a, b, c, d) for(int a = b; i < c; i += d)
#define fl(a, b, c, d) for(ll a = b; i < c; i += d)

ll N, M, A, B, C;
ll arr[MAX_INT], arr1[MAX_INT], data[MAX_INT];
vector<ll> V;


int main() {
	scanf("%lld %lld", &A, &B);
	if(A == 1 || B == 1) {
		printf("1\n");
		exit(0);
	}
	ll ans = ceil((A * B) / 2.0);
	printf("%lld\n", ans);
	
	return 0;
}
/*
	Powered by Buggy Plugin
*/




Measured memory_bytes: 256
#include <stdio.h>
#include <stdbool.h>
#define MAX_P 100000

int i=0,head,tail,TIME=0;
int MAX,QUAM;

struct que{
	char N[20];
	int Ptime;
};
struct que Q[MAX_P];

int main(){
    scanf("%d%d",&MAX,&QUAM);
    for(tail=0;tail<MAX;tail++){
        scanf("%s %d",&Q[tail].N,&Q[tail].Ptime);
    }

	for(head=0,tail=MAX;head!=tail;head=(head+1)%(MAX+1))
	{
		i=head;
		if(Q[i].Ptime<=QUAM)
		{
			TIME+=Q[i].Ptime;
			printf("%s %d\n",Q[i].N,TIME);
			Q[i].Ptime=0;
		}else    		{
			TIME+=QUAM;
			Q[tail].Ptime=Q[i].Ptime-QUAM;
			strcpy(Q[tail].N,Q[i].N);
			tail=(tail+1)%(MAX+1);
		}
	}
	return 0;
}


Measured memory_bytes: 2880
#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=int(a);i<int(b);++i)
#define SIZE 200005
#define INF 1000000005LL
#define MOD 1000000007
using namespace std;
typedef long long int ll;
typedef pair <int,int> P;
int main(){
    int h,w,k;
    cin >> h >> w>>k;
    vector<vector<char>> field(h,vector<char>(w));
    rep(i,0,h){
        rep(j,0,w){
            cin >> field[i][j];
        }
    }
    int n_w = pow(2,w);
    int n_h = pow(2,h);
    int ans = 0;
    rep(i,0,n_h){
        rep(j,0,n_w){
            stringstream ss_w;
            ss_w << bitset<6>(j);
            stringstream ss_h;
            ss_h << bitset<6>(i);
            string t = ss_w.str();
            string s = ss_h.str();
            //cout<<t<<endl;

            vector<vector<char>> field_copy(h,vector<char>(w));
            field_copy = field;
            rep(a,0,h){
                rep(b,0,w){
                    if(s[5-a]=='1'){
                        rep(nya,0,w){
                            field_copy[a][nya]='!';
                        }
                        
                    }
                    if(t[5-b]=='1'){
                        rep(nya,0,h){
                            field_copy[nya][b]='!';
                        }
                    }
                }
            }
            int cnt=0;
            // rep(a,0,h){
            //     rep(b,0,w){
                    
            //         cout<<field_copy[a][b];
            //     }
            //     cout<<endl;
            // }
            rep(a,0,h){
                rep(b,0,w){
                    if(field_copy[a][b]=='#'){
                        cnt++;
                        //cout<<"wa"<<endl;
                    }
                }
            }
            if(cnt==k){
                ans++;
            }
        }
    }
    cout<<ans<<endl;
  return 0;
}

Measured memory_bytes: 4072
using System;
using System.Linq;
using System.Collections.Generic;

namespace program
{
    class Program
    {
        static void Main()
        {
          Console.WriteLine((Input.ScanInt()-2)*180);
        }
    }

    static class Input
    {
        static public int ScanInt() { return int.Parse(Console.ReadLine()); }
        static public uint ScanUint() { return uint.Parse(Console.ReadLine()); }
        static public double ScanDouble() { return double.Parse(Console.ReadLine()); }
        static public long ScanLong() { return long.Parse(Console.ReadLine()); }
        static public ulong ScanUlong() { return ulong.Parse(Console.ReadLine()); }
        static public int[] ScanIntArray() { return Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); }
        static public uint[] ScanUintArray() { return Console.ReadLine().Split(' ').Select(x => uint.Parse(x)).ToArray(); }
        static public double[] ScanDoubleArray() { return Console.ReadLine().Split(' ').Select(x => double.Parse(x)).ToArray(); }
        static public long[] ScanLongArray() { return Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray(); }
        static public ulong[] ScanUlongArray() { return Console.ReadLine().Split(' ').Select(x => ulong.Parse(x)).ToArray(); }

        static public string ScanStr() { return Console.ReadLine(); }
        static public string[] ScanStrArray() { return ScanStr().Split(' '); }
    }

    static class MyMath
    {
        public static int GCD(int a, int b)
        {
            Func<int, int, int> gcd = null;
            gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
            return a > b ? gcd(a, b) : gcd(b, a);
        }
        public static ulong GCD(ulong a, ulong b)
        {
            Func<ulong, ulong, ulong> gcd = null;
            gcd = (x, y) => y == 0 ? x : gcd(y, x % y);
            return a > b ? gcd(a, b) : gcd(b, a);
        }
        public static int LCM(int a, int b)
        {
            return a * b / GCD(a, b);
        }
        public static ulong LCM(ulong a, ulong b)
        {
            return a * b / GCD(a, b);
        }
    }
}


Measured memory_bytes: 13140
#include<bits/stdc++.h>				//Written by ThiDaiLoc
using namespace std;				//Team Three Wolves
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef vector<ll> vi;
typedef pair<ll,ll> pll;
typedef pair<ll,pll> triple;

#define fu(i,a,b)   for(ll i=a;i<=b;i++)
#define fd(i,b,a)   for(ll i=b;i>=a;i--)
#define fuv(i,a)    for(ll i=0;i<a.size();i++)
#define fdv(i,a)    for(ll i=(ll)a.size()-1;i>=0;i--)
#define ms(a,x)     memset(a, x, sizeof a)
#define prec(n)     fixed<<setprecision(n)
#define uni(a)      (a).erase(unique(all(a)), (a).end())
#define pb(i)       push_back(i)
#define popb()      pop_back()
#define sc(a)       cin>>a
#define sc2(a,b)    cin>>a>>b
#define pr(a)       cout<<a<<endl
#define pr2(a)      cout<<a<<" "
#define bit(n,i)    (((n)>>(i))&1)
#define lowb(a,n,x) lower_bound(a,a+n,x) -a
#define lowb2(a,x)  lower_bound(all(a),x) -a.begin()
#define all(x)      (x).begin(), (x).end()
#define sz(a)       (ll)a.size()
#define le(s)       (ll)s.length()		
#define ast(x,a,b)  assert(x>=a and x<=b)				
#define re          return 	
#define	mp(a,b)     make_pair(a,b)
#define se          second
#define fi          first 
#define debug(x)    cerr << #x << " = " << x << endl
#define INPUT       freopen("locin.txt", "r", stdin)
#define OUTPUT      freopen("locout.txt", "w", stdout)
inline ll isqrt(ll k) {ll r = sqrt(k) + 1; while (r * r > k) r--; return r;}
inline ll icbrt(ll k) {ll r = cbrt(k) + 1; while (r * r * r > k) r--; return r;}
inline ll minize(ll& a,ll b){return a=(a>b?b:a);}
inline ll maxize(ll& a,ll b){return a=(a<b?b:a);}
inline string toString(ll n) {stringstream ss; ss << n;return ss.str();}
double const eps = 1e-6;
ll const Base=1e9+7,oo=1e17,MAXN=1e6;


ll A[MAXN+5];

ll Solves(){
	
	ll n,m,k,cnt=0,ans=0,x,y,q,c,sum=0,v,t;
	// PROCESS IN HERE
	sc2(n,m);
	cout<<max(n+m,max(n+n-1,m+m-1))<<endl;


	re 0;
	// Hack it if you can :)
}

int main(){
	//INPUT;
	ll JUDGE_ONLINE = 1;
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll test=1;
//	sc(test);
	fu(T,1,test){
//		cout<<"Case #"<<T<<": ";
		Solves();
	}
	if (!JUDGE_ONLINE) cout << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";  
		
}

Measured memory_bytes: 256
/* winners never quit and quitters never win.
      #swap                                 */
      
#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;
#pragma GCC optimize ("-O3")
using ll = long long;
using ld = long double;
const ll mod = 1000000007;
const ll inf = 1000000000000000000;
const ll rk = 256;
const ld PI = 3.141592653589793;

typedef tree<
int,
null_type,
less<int>,
rb_tree_tag,
tree_order_statistics_node_update>
ordered_set;

template <typename T>
void make_unique(vector<T>& vec) {
  sort(all(vec));
  vec.erase(unique(all(vec)), vec.end());
}

#define endl '\n'
#define pb push_back
#define mp make_pair
#define vc vector
#define fs first
#define sec second
#define pq priority_queue
#define lb lower_bound
#define ub upper_bound
#define pll pair<ll,ll> 
#define pls pair<ll,string>
#define psl pair<string,ll>
#define plc pair<ll,char>
#define pcl pair<char,ll>
#define pss pair<string,string>
#define all(x) (x).begin(), (x).end()
#define tol(s) transform(s.begin(),s.end(),s.begin(),::tolower);
#define tou(s) transform(s.begin(),s.end(),s.begin(),::toupper);
#define printclock cerr<<"Time : "<<1000*(ld)clock()/(ld)CLOCKS_PER_SEC<<"ms\n";

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}

#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define T ll t=0;cin>>t;for(ll test=0;test<t;test++)

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());


ll nxt() {
    ll TemporaryVariable;
    cin >> TemporaryVariable;
    return TemporaryVariable;
}

struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};

 
int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
	//isprime();
	//coeff();
	/*freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);*/
    ll fact[1000005]={0};
    rep(a,1,1000005)
    {
        for(ll b=a;b<1000005;b+=a)
        {
            fact[b]++;
        }
    }
    ll n=nxt();
    ll ans=0;
    rep(c,1,n)
    {
        ans+=(fact[c]);
    }
    cout<<ans<<endl;
	printclock;
	return 0;
}

Measured memory_bytes: 11624
#include <algorithm>
#include <iostream>
#include <numeric>
#include <vector>
#include <string>
#include <bitset>
#include <queue>
#include <tuple>
#include <cmath>
#include <map>
#include <cstring>

template<typename T> bool chmax( T &a, const T &b ) { if ( a <= b ) { a = b; return ( true ); } else { return ( false ); } }
template<typename T> bool chmin( T &a, const T &b ) { if ( a >= b ) { a = b; return ( true ); } else { return ( false ); } }

using namespace std;

using ll = long long;
using ull = unsigned long long;

using Pint = pair<int, int>;
using Pll  = pair<ll, ll>;
using Pull = pair<ull, ull>;

#define eb emplace_back
#define pb push_back
#define mp make_pair
#define mt make_tuple

#define F first
#define S second

#define rep( i, n ) for ( int i = 0; i < (int)( n ); ++i )
#define reps( i, n ) for ( int i = 1; i <= (int)( n ); ++i )
#define rrep( i, n ) for ( int i = (int)( ( n ) - 1 ); i >= 0; --i )
#define rreps( i, n ) for ( int i = (int)( ( n ) ); i > 0; --i )
#define arep( i, v ) for ( auto &&i : ( v ) )

template<typename T> T gcd( const T a, const T b ) { return ( b ? gcd( b, a % b ) : a ); }

#define ALL( c ) ( c ).begin(), ( c ).end()
#define RALL( c ) ( c ).rbegin(), ( c ).rend()
#define UNIQUE( c ) ( c ).erase( unique( ( c ).begin(), ( c ).end() ), ( c ).end() )

constexpr ll MOD = 1000000007LL;

#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define next asdnext
#define prev asdprev

template<typename T = ll> class UnionFind {
public:
	UnionFind( T n ) { rep( i, n ) { par.resize( n ); siz.resize( n ); par[i] = i; siz[i] = 1; } }
	T find( T x ) { if ( x == par[x] ) return ( x ); else return( par[x] = find( par[x] ) ); }
	void unite( T x, T y ) { T xx = find( x ); T yy = find( y ); if ( xx == yy ) return;
		if ( siz[xx] <= siz[yy] ) swap( xx, yy ); par[yy] = xx; siz[xx] += siz[yy]; }
private:
	vector<T> par, siz;
};

template<typename T = ll> T power( T a, T b, T m = MOD ) {
	T res = 1;
	while ( b > 0 ) { if ( b & 1 ) res = res * a % m;
		a = a * a % m; b >>= 1; }
	return ( res );
}

/*
constexpr ll MAX = 500010;
ll fact[MAX];
ll inv[MAX];
ll inv_fact[MAX];

template<typename T> void initComb( T n, T m = MOD )
{
	fact[0] = fact[1] = inv_fact[0] = inv_fact[1] = 1;
	inv[1] = 1;
	for ( int i = 2; i < n; i++ ) {
		fact[i] = ( fact[i - 1] * i ) % m;
		inv[i] = m - inv[m % i] * ( m / i ) % m;
		inv_fact[i] = inv_fact[i - 1] * inv[i] % m;
	}
}

template<typename T> T comb( T n, T r, T m = MOD )
{
	if ( n < r ) return ( 0 );
	if ( n < 0 || r < 0 ) return ( 0 );
	return ( fact[n] * ( inv_fact[r] * inv_fact[n - r] % m ) % m );
}
*/

void replace( string &s, string t, string r ) {
	string::size_type p = 0;
	while ( ( p = s.find( t, p ) ) != string::npos ) {
		s.replace( p, t.length(), r );
		p += r.length();
	}
}


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

	ll cnt = 0;
	rep( i, 3 ) if ( s[i] == '1' ) cnt++;
	cout << cnt << endl;

	return ( 0 );
}


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


void solve(long long N, long long K, std::vector<long long> A){
    ll ans = 0;
    ll right = 0;
    while(true){
        if(right == 0) right += K;
        else right += K - 1;
        ans ++;
        if(right >= N) break;
    }
    cout << ans << endl;
    return;
}

int main(){
    long long N;
    scanf("%lld",&N);
    long long K;
    scanf("%lld",&K);
    std::vector<long long> A(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&A[i]);
    }
    solve(N, K, std::move(A));
    return 0;
}


Measured memory_bytes: 3964
#!/usr/bin/python3
# -*- coding: utf-8 -*-
n = int(input())
l_list = list(map(int, input().split()))
l_list.sort()
count = 0
for i in range(0, n - 2):
    for j in range(i + 1, n - 1):
        for k in range(j + 1, n):
            a = l_list[i]
            b = l_list[j]
            c = l_list[k]
            if a == b or b == c or c == a:
                continue
            if a + b > c:
                count += 1
            else:
                break
print(count)


Measured memory_bytes: 9184
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
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(a > b){a = b; return 1;}return 0;}
typedef long long ll;

int N;
vector<string> ans;

void BFS(int n){
  queue<string> q;
  q.push("a");
  while(!q.empty()){
    string s = q.front(); q.pop();
    if(s.size() == n){
      ans.push_back(s);
    }else{
      int cnt = 0;
      REP(i, s.size()){
        cnt = max(cnt, (s[i]-'a'));
      }
      for(int j = 0; j <= cnt+1; j++){
        string S = s + (char)('a' + j);
        q.push(S);
      }
    } 
  }
}

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  BFS(N);
  for(auto i : ans){
    cout << i << endl;
  }
}

Measured memory_bytes: 10744
#pragma GCC optimize ("O3")
#include <iostream>
#include <iomanip>
#include <istream>
#include <ostream>
#include <sstream>
#include <iterator>
#include <vector>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <bitset>
#include <utility>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <ctime>
#include <cctype>
#include <cstdlib>
#include <numeric>
#define IINF 1000000000
#define INF 3223372036854775807
#define MOD 1000000007
#define mod 1000000007
#define INT_MAX_ 2147483647
#define EPS (1e-10)
#define REP(i, a, n) fo-r (ll i = a; i < (ll)(n); i++)
#define REPE(i, a, n) for (ll i = a; i <= (ll)(n); i++)
//#define rep(i,n)for (ll i = 0; i < (ll)(n); i++)
#define rep(i,l,r)for(ll i=(l);i<(r);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define Endl endl
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define eb emplace_back
#define mmax(x,y)(x>y?x:y)
#define mmin(x,y)(x<y?x:y)
#define chmax(x,y) x=mmax(x,y)
#define chmin(x,y) x=mmin(x,y)
#define all(x) (x).begin(),(x).end()
#define siz(x) (ll)(x).size()
#define PI acos(-1.0)
#define me memset
#define bit(n,k) ((n>>k)&1)
#define lg length()
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef pair<int,int>Pin;
typedef pair<ll,ll>Pll;
template<class T> using V=vector<T>;
template<typename T> using min_priority_queue = priority_queue<T, vector<T>, greater<T> >;
long long GCD(long long a, long long b) {return b?GCD(b,a%b):a;}
long long LCM(long long a, long long b) {return a/GCD(a,b)*b;}
ll pom(ll a,ll n,int m){ll x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;}
#define invp(a,p)pom(a,p-2,p)
int dx[4]={-1,0,1,0};
int dy[4]={0,-1,0,1};
int ddx[8]={-1,0,1,0,1,1,-1,-1};
int ddy[8]={0,-1,0,1,1,-1,1,-1};
ll cmp1(pair<Pll,ll> a,pair<Pll,ll> b){
        return a.fi.se>b.fi.se;
}
ll cmp2(pair<ll,ll> a,pair<ll,ll> b){
    if(a.fi!=b.fi)
        return  a.se<b.se;
    else
        return a.se>b.se;
}
//----------------------------------------------------------------------

//----------------------------------------------------------------------
int main(int argc, char * argv[]){
    cin.tie(0);
    ios::sync_with_stdio(false);
    //-------------------------------  
    //ll begin_t=clock();
    //freopen("big.txt", "r", stdin);
    //freopen("out3.txt", "w", stdout);
    //------------------------------
    ll n;cin>>n;
    ll ans=0;
    for(ll i=1;i<n;i++){
        for(ll j=1;i*j<n;j++){
            ans++;
        }
    }
    cout<<ans<<Endl;
    //------------------------------
    //fclose(stdin);
    //fclose(stdout);
    //ll end_t=clock();cout<<"time="<<end_t-begin_t<<"ms"<<endl;
    //------------------------------- 
    return 0;
}
//----------------------------------------------------------------------









































Measured memory_bytes: 3648
h, w = map(int, input().split())

mine = [list(input()) for _ in range(h)]


def update(masu):
    if masu == '.':
        return 1
    elif masu == '#':
        return masu
    else:
        return masu + 1


for i in range(h):
    for j in range(w):
        now = mine[i][j]
        ul = mine[max(i - 1, 0)][max(j - 1, 0)]
        u = mine[max(i - 1, 0)][j]
        ur = mine[max(i - 1, 0)][min(j + 1, w - 1)]
        dl = mine[min(i + 1, h - 1)][max(j - 1, 0)]
        d = mine[min(i + 1, h - 1)][j]
        dr = mine[min(i + 1, h - 1)][min(j + 1, w - 1)]
        r = mine[i][min(j + 1, w - 1)]
        l = mine[i][max(j - 1, 0)]

        if now == '#':
            mine[max(i - 1, 0)][max(j - 1, 0)] = update(ul)
            mine[max(i - 1, 0)][j] = update(u)
            mine[max(i - 1, 0)][min(j + 1, w - 1)] = update(ur)
            mine[min(i + 1, h - 1)][max(j - 1, 0)] = update(dl)
            mine[min(i + 1, h - 1)][j] = update(d)
            mine[min(i + 1, h - 1)][min(j + 1, w - 1)] = update(dr)
            mine[i][min(j + 1, w - 1)] = update(r)
            mine[i][max(j - 1, 0)] = update(l)

for ans in mine:
    print(''.join(list(map(str, ans))).replace('.', '0'))


Measured memory_bytes: 3188
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <string.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define forn(i,a,b) for(int i=a;i<=b;i++)
#define INF 2147483647
#define LLINF 9223372036854775807
using namespace std;
map<int,int> mp;
int a[200010];
int main(){
	int n;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>a[i];
		mp[a[i]+i]++;
	}
	long long cnt=0;
	for(int i=0;i<n;i++){
		if(i-a[i]>=1){
			cnt+=mp[i-a[i]];
		}
	}
	cout<<cnt<<endl;
	return 0;
}

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

using ll = long long;
#define double long double
#define rep(i, n) for (long long i = 0; i < (n); ++i)
#define repr(i, a, b) for (auto i = (a); i < (b); ++i)
#define itr(x, c) for (auto&& x : (c))
#define updatemax(t, v) ((t) = std::max((t), (v)))
#define updatemin(t, v) ((t) = std::min((t), (v)))
#define endl _endl
const char _endl = (cin.tie(0), cout.tie(0), ios::sync_with_stdio(0), cout.precision(16), '\n');

int main() {
  ll n, m;
  cin >> n >> m;
  cout << (n - 1) * (m - 1) << endl;
}


Measured memory_bytes: 3624