akhauriyash/Code-Regression huggingface dataset:
/**********************************************
 *Author*        :XzzF
 *Created Time*  : 2018/5/27 9:46:49
 *Ended  Time*  : 2018/5/27 10:05:43
*********************************************/

#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
using namespace std;
typedef long long LL;
const int inf = 1 << 30;
const LL INF = 1LL << 60;
const int MaxN = 200000;

int n;
LL XOR[MaxN + 5], sum[MaxN + 5];

int main()
{
    while(scanf("%d", &n) != EOF)
	{
		XOR[0] = sum[0] = 0;
		for(int i = 1; i <= n; i++) {
			LL x;
			scanf("%lld", &x);
			XOR[i] = XOR[i - 1] ^ x;
			sum[i] = sum[i - 1] + x;
		}
		LL cnt = 0;
		for(int l = 1; l <= n; l++) {
			int lb = l, rb = n;
			int ans = 0;
			while(lb <= rb) {
				int mid = (lb + rb) >> 1;
				if((XOR[mid] ^ XOR[l - 1]) == (sum[mid] - sum[l - 1])) {
					ans = mid; lb = mid + 1;
				}
				else rb = mid - 1;
			}
			if(ans > 0) cnt += (LL)(ans - l + 1);
		}
		printf("%lld\n", cnt);
	}
    return 0;
}

Measured memory_bytes: 3328
import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int h = Integer.parseInt(sc.next());

        // 主処理
        int result = (a + b) * h / 2;

        // 出力
        System.out.println(result);
        sc.close();
    }
}


Measured memory_bytes: 21844
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using Pii = pair<int, int>;
using Pll = pair<ll, ll>;
#define rep(i, begin, n) for (int i = begin; i < n; i++)
#define repe(i, begin, n) for (int i = begin; i <= n; i++)
#define repr(i, begin, n) for (int i = begin; i > begin - n; i--)
#define repre(i, begin, end) for (int i = begin; i >= end; i--)

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

const int inf = 1000000007;
const int MOD = 1000000007;
const long long INF = 1000000000000000007;

// -------------------------------------------------------

int N;
int t[200], v[200];
double s[60000];
int tsum[200];
vector<double> vec;

double maxs(int tick) {
  double res = 0.5 * tick;
  // chmin(res, 0.5 * (tsum[N + 1] - tick));
  repe(i, 1, N + 1) {
    int s = tsum[i];
    int e = tsum[i + 1];
    double cv = v[i];
    if (e <= tick) {
      chmin(res, cv + 0.5 * (tick - e));
    } else if (s <= tick && tick <= e) {
      chmin(res, cv);
    } else {
      chmin(res, cv + 0.5 * (s - tick));
    }
  }
  return res;
}

int main() {
  cin >> N;
  repe(i, 1, N) {
    cin >> t[i];
    tsum[i + 1] = tsum[i] + 2 * t[i];
    tsum[i + 2] = tsum[i + 1];
  }
  repe(i, 1, N) { cin >> v[i]; }

  int tick = 0;
  repe(i, 1, N) {
    int ct = t[i];
    int cv = v[i];
    int nv = v[i + 1];
    for (int j = 1; j <= 2 * ct; ++j) {
      ++tick;
      s[tick] = min(s[tick - 1] + 0.5, maxs(tick));
    }
  }

  double ans = 0;
  rep(i, 0, tick) { vec.push_back(double(s[i] + s[i + 1]) / 4.0); }
  sort(vec.begin(), vec.end());
  for (auto e : vec) {
    ans += e;
  }
  cout << fixed << setprecision(20) << ans << endl;
}


Measured memory_bytes: 4216
#include<bits/stdc++.h>
using namespace std;
int main()
{
// #ifndef ONLINE_JUDGE
// 	freopen("input", "r", stdin);
// 	freopen("output", "w", stdout);
// #endif

	int n;	cin >> n;
	vector<int> v(n);

	for (int i = 0; i < n; ++i)	cin >> v[i];

	sort(v.begin(), v.end());

	long ans = v[n - 1];

	for (int i = n - 3, j = n - 2, ct = 0; i >= 0; --i)
	{
		ans += v[j];
		ct++;
		// cout << ans << " " << v[j] << endl;
		if (ct > 1)
			ct = 0,
			j--;

	}

	cout << ans << endl;
}

Measured memory_bytes: 3996
#include <iostream>
#include <cstdio>
#include <cassert>
#include <ctime>
#include <cmath>
#include <cstring>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define all(x) (x).begin(), (x).end()

#ifdef LOCAL
#define dbg(x) cerr << #x " = " << x << endl;
#define idbg(x) #x " = " << x
#include "pretty_print.h"
#else
#define dbg(x)
#define idbg(x) ""
#endif

#ifdef _WIN32
#  define LLD "%I64d"
#else
#  define LLD "%lld"
#endif

typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;

template <typename T> T sqr(T x) { return x * x; }
template <typename T> T abs(T x) { return x < 0? -x : x; }
template <typename T> T gcd(T a, T b) { return b? gcd(b, a % b) : a; }
template <typename T> bool chmin(T &x, const T& y) { if (x > y) { x = y; return true; } return false; }
template <typename T> bool chmax(T &x, const T& y) { if (x < y) { x = y; return true; } return false; }


int main(int /* argc */, char** /* argv */)
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    #ifdef LOCAL
    assert(freopen("inp", "r", stdin));
    assert(freopen("out", "w", stdout));
    #endif

    int n;
    while (cin >> n) {
        vector<int> a(n, 0);
        for (int i = 0; i < n; ++i) {
            cin >> a[i];
        }
        sort(all(a));
        bool ans = (unique(all(a)) - a.begin()) == n;
        cout << (ans? "YES" : "NO") << endl;
    }

    cerr << "Time execute: " << clock() / (double)CLOCKS_PER_SEC << " sec" << endl;
    return 0;
}


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

int main() {
  int n;
  ll s=0;

  cin >> n;

  rep(i,n+1) {
    if ((i%3==0)||(i%5==0)) continue;
    else s+=i;
  }
  cout << s << endl;
}

Measured memory_bytes: 3632
gets.to_i.times do
  s, o, r = 0, 0, [0] * 3
  
  while o < 3
    case gets.chomp
    
    when "HIT"
      s += 1 if r[2] == 1
      r.rotate!(-1)[0] = 1
        
    when "HOMERUN"
      s += r.count(1) + 1
      r = [0] * 3
    
    when "OUT"
      o += 1
    end
  end
  
  puts s
end

Measured memory_bytes: 8596
/*------------------------------------
........Bismillahir Rahmanir Rahim....
..........created by Abdul Aziz.......
------------------------------------*/
#include <iostream>
#include <algorithm>
#include <stdio.h>
#include <cmath>
#include <vector>
#include <set>
#include <list>
#include <stack>
#include <map>
#include <cstring>
#include <unordered_map>
#include <queue>
#define   mod  998244353
#define   int  long long 
#define   ld   long double
#define   pb   push_back
#define   vi  vector<int> 
#define   dbg(x)  cerr << #x << " = " << x << '\n'
#define   sz(x)  (int)x.size()
#define   all(a) (a.begin(),a.end())
#define   ff   first
#define   ss   second
#define   pii  pair<int,int> 
#define   lcm(a,b) (a*b)/__gcd(a,b) 
using namespace std;

inline void solve(){ 
    int n; cin>>n; 
    vi a(n),b(n);
    priority_queue<pii> pq; 
    for (int i=0;i<n;i++) { 
        cin >> a[i] >> b[i] ; 
        pq.push({a[i]+b[i],i}); 
    } 
    int  ans = 0 ; 
    for (int i=1;i<=n;i++){ 
        pii h=pq.top();
        pq.pop();
        if (i&1) ans += a[h.ss];
        else ans -= b[h.ss];
    } 
    cout << ans << endl ; 
}

signed main()
{
    int n=1; // cin>>n;
    while (n--) solve();
    return 0;
}
/*
 
10 
 
4 
1 1 
2 2 
3 4 
5 1 
 
 
*/


Measured memory_bytes: 6864
#include<bits/stdc++.h>
#define speedio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
using namespace std;
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;

typedef long long       ll;
typedef long double     ld;

typedef vector<int>     vi;
typedef vector<bool>    vb;
typedef vector<ll>      vll;
typedef vector<vi>      vvi;
typedef vector<vll>     vvll;
typedef vector<string>  vs;

typedef pair<int, int>  pii;
typedef pair<ll, int>   pli;
typedef pair<ll, ll>    pll;
typedef vector< pii >   vpi;
typedef vector< pll >   vpll;

// typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> oset;

#define pb           push_back
#define mod          1000000007
#define INF          1e17
#define mini         INT_MIN
#define maxo         INT_MAX
#define eb           emplace_back
#define ff           first
#define ss           second
#define re           return 
#define endl         "\n" 

#define all(c)       c.begin(),c.end()
#define be           begin()
#define en           end()
#define sz(x)        (ll)x.size()
#define mem(a,val)   memset(a,val,sizeof(a))
#define mk(x,y)      make_pair(x,y)
#define mid(s,e)     ((s)+((e)-(s))/2) 

#define fo(i,a,b)     for(ll i = (ll)(a); i <= (ll)(b); i++)
#define rf(i,a,b)    for(ll i = (ll)(a); i >= (ll)(b); i--)
#define read(a,n)    for(int i=0;i<n;i++)cin>>a[i];
#define show(a,n)    for(int i=0;i<n;i++)cout<<a[i]<<' ';cout<<endl;
#define p2(n)        (1LL << (n))
#define deb(x) cout <<#x << " = " << x << " | " << "LINE: "<<__LINE__<< endl;
template<typename... T> void rd(T&... args) { ((cin >> args), ...); }
template<typename... T> void pp(T... args) { ((cout << args << " "), ...); cout<<"\n"; }

void add(ll &x, ll y){ x += y; if(x>=mod) x %= mod; if(x<0) x = x%mod + mod; }

//============== *** START OF CODE ***

int r,g,b;   



void solve()
{
    int n;rd(n);
    string s;rd(s);
    ll ans = 0;
    for(char ch:s){
        if(ch=='R')r++;
        else if(ch=='B')b++;
        else g++;
    }
    ans += 1LL*r*g*b;
    for(int i=0;i<n;i++){
        for(int d=1;i+2*d<n;d++){
            if(s[i]!=s[i+d] and s[i+2*d]!=s[i+d] and s[i+2*d]!=s[i])ans--;
        }
    }
    pp(ans);
    
}


void prep(){}

//=============== *** END OF CODE ***

int main(){
    speedio; cout<<fixed<<setprecision(12);

// #ifndef ONLINE_JUDGE
//     freopen("input.txt", "r", stdin);
//     freopen("output.txt", "w", stdout);
// #endif

    prep();
    int t = 1;
    // cin >> t;
    while(t--)
        solve();

    return 0;
}

Measured memory_bytes: 3664
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
  int n,k,a,b,c,t=0,i;
  cin >> k >> n;
  cin >> b;
  c=b;
  for(i=1;i<n;i++){
    cin >> a;
    t=max(t,a-b);
    b=a;
  }
  t=max(t,k+c-b);
  cout << k-t << endl;
  return 0;
}

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

unordered_map<int, bool> mp;
const int nax = 1e4;

int main() {
    int n;
    cin >> n;
    int dig = n%10;

    if(dig==3) {
        cout << "bon\n";
    }else if(dig==0 || dig==1 || dig==6 || dig==8) {
        cout << "pon\n";
    }else {
        cout << "hon\n";
    }
    return 0;
}

Measured memory_bytes: 3624
#include<algorithm>
#include<string>
#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;

int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};


int main(){
    
    int N;
    cin >> N;
    int ans=0;
    REP(i,N){
        ans+=i+1;
    }
     cout << ans << endl;
    return 0;
}

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

using i64 = int64_t;

constexpr i64 INF = 1e13;

int main(){
    int v, e;
    cin >> v >> e;
    vector<vector<i64>> cost(v, vector<i64>(v, INF*2));
    for(int i=0;i<v;++i)cost[i][i] = 0;
    for(int i=0;i<e;++i){
        int s, t;
        i64 d;
        cin >> s >> t >> d;
        cost[s][t] = d;
    }

    for(int k=0;k<v;++k){
        for(int i=0;i<v;++i){
            for(int j=0;j<v;++j){
                if(cost[i][j] > cost[i][k] + cost[k][j])
                    cost[i][j] = cost[i][k] + cost[k][j];
            }
        }
    }

    bool negative_loop = false;
    for(int i=0;i<v;++i){
        if(cost[i][i] < 0){
            negative_loop = true;
            break;
        }
    }
    if(negative_loop){
        cout << "NEGATIVE CYCLE" << endl;
    }else{
        for(int i=0;i<v;++i){
            for(int j=0;j<v;++j){
                if(j)cout << " ";
                if(cost[i][j] < INF)cout << cost[i][j];
                else cout << "INF";
            }
            cout << endl;
        }
    }
    return 0;
}



Measured memory_bytes: 3240
import sys
import collections

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    S = input().strip()
    Q = int(input())

    rev = 0
    sdeq = collections.deque()
    for s in S:
        sdeq.append(ord(s) - ord('a'))

    for i in range(Q):
        A = [x for x in input().split()]
        if len(A) == 1:
            rev = (rev + 1) % 2
        else:
            f = int(A[1])
            c = A[2]
            if f == 1:
                if rev == 0:
                    sdeq.appendleft(ord(c) - ord('a'))
                else:
                    sdeq.append(ord(c) - ord('a'))
            else:
                if rev == 0:
                    sdeq.append(ord(c) - ord('a'))
                else:
                    sdeq.appendleft(ord(c) - ord('a'))

    if rev == 0:
        for i in list(sdeq):
            print(chr(i + ord('a')), end="")
    else:
        for i in list(sdeq)[::-1]:
            print(chr(i + ord('a')), end="")
    print()



if __name__ == '__main__':
    main()


Measured memory_bytes: 12012
#include <bits/stdc++.h>
#define rep(i,n) for (int i = (0); i < (n); ++i)
#define rrep(i,n) for(int i = 1; i <= (n); ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
#define srep(i,s,t) for (int i = s; i < t; ++i)
#define rng(x) (x).begin(),(x).end()
#define rrng(x) (x).rbegin(),(x).rend()
#define limit(x,l,r) max(l,min(x,r))
#define lims(x,l,r) (x = max(l,min(x,r)))
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
#define show(x) cout << #x << " = " << (x) << endl
#define show2(x,y) cout << #x << " = " << (x) << ", " << #y << " = " << (y) << endl
#define show3(x,y,z) cout << #x << " = " << (x) << ", " << #y << " = " << (y) <<  ", " << #z << " = " << (z) << endl
#define showv(v) rep(i,v.size()) printf("%d%c", v[i], i==v.size()-1?'\n':' ')
#define showv2(v) rep(j,v.size()) showv(v[j])
#define showt(t,n) rep(i,n) printf("%d%c", t[i], i==n-1?'\n':' ')
#define showt2(t,r,c) rep(j,r) showt(t[j],c)
#define showvp(p) rep(i,p.size()) printf("%d %d\n", p[i].first, p[i].second);
#define printv(v) rep(i,v.size()) printf("%d\n", v[i])
#define printt(t,n) rep(i,n) printf("%d\n", t[i])
#define incl(v,x) find(rng(v),x)!=v.end()
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define pcnt __builtin_popcountll
#define bn(x) ((1<<x)-1)
#define dup(x,y) (((x)+(y)-1)/(y))
#define newline puts("")
#define uni(x) x.erase(unique(rng(x)),x.end())
#define SP << " " <<
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using pii = pair<int, int>;
using tiii = tuple<int, int, int>;
typedef vector<pii> vp;
typedef vector<tiii> vt;
const int mod = 1000000007;
const double EPS = 1e-9;
const int INF = (1<<30)-1;
const ll INFLL = (1LL<<62)-1;
#define dame { puts("No"); return 0;}
#define yn {puts("Yes");}else{puts("No");}
inline int in() { int x; scanf("%d",&x); return x;}
//cout << fixed << setprecision(10);
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; }

char a[105][105];
bool ci[105], cj[105];

int main () {
  int h, w;
  cin >> h >> w;
  rep(i,h)rep(j,w) cin >> a[i][j];

  rep(i,h) {
    rep(j,w) {
      if (a[i][j] == '#') {
        ci[i] = true;
        break;
      }
    }
  }
  rep(j,w) {
    rep(i,h) {
      if (a[i][j] == '#') {
        cj[j] = true;
        break;
      }
    }
  }

  rep(i,h) {
    rep(j,w) {
      if (!ci[i] || !cj[j]) continue;
      cout << a[i][j];
    }
    if (ci[i]) cout << '\n';
  }
  return 0;
}

Measured memory_bytes: 256
import java.util.*;
import java.util.Map.Entry;
 
class Main {
	 static int mod =  (int) (Math.pow(10,9)+7);
	 static int[] ans;
//	 static int mod = 998244353;
   public static void main(String[] args) {
	   
       Scanner sc = new Scanner(System.in);
       int  N = sc.nextInt();
       int  M = sc.nextInt();
       int  K = sc.nextInt();
       
       Unionfind uf = new Unionfind(N);
       
       ans=new int[N];
       
       int [][]like = new int [M][2];
       for (int i=0 ; i<M; i++) {
    	   like[i][0] = Integer.parseInt(sc.next())-1;
    	   like[i][1] = Integer.parseInt(sc.next())-1;
    	   uf.union(like[i][0], like[i][1]);
       }
       
       int [][]dislike = new int [K][2];
       for (int i=0 ; i<K; i++) {
    	   dislike[i][0] = Integer.parseInt(sc.next())-1;
    	   dislike[i][1] = Integer.parseInt(sc.next())-1;
       }
       for(int i=0;i<N;i++) {
    	   ans[i]=uf.getSize(i)-1;
       }
       
       for(int i=0;i<M;i++) {
    	   ans[like[i][0]]--;
    	   ans[like[i][1]]--;
       }
       
       for(int i=0;i<K;i++) {
    	   if(uf.same(dislike[i][0],dislike[i][1])){
        	   ans[dislike[i][0]]--;
        	   ans[dislike[i][1]]--;
    	   }
       }
		for(int i = 0;i<N;i++) {
			System.out.println(ans[i]);
		}
   }
   

}

class Unionfind {
	   
		private int[] data;
		private int []size;
		
		public Unionfind(int size) {
			this.data = new int [size];
			this.size = new int [size];
			for(int i = 0 ;i < size ;i++) {
				this.size[i] = 1;
			}
			Arrays.fill(this.data, -1);
		}
		
		public void union(int x , int y ) {
			if((x = root(x)) != (y = root(y))) {
				if(data[y] < data[x]) {
					final int t = x;
					x = y;
					y = t;
				}
				data[x] += data[y];
				size[root(x)] += size[root(y)];
				data[y] = x;
			}
		}
		
		public int getSize(int i) {
			return size[root(i)];
		}
		
		public int root(int x) {
			if(data[x] < 0) {
				return x;
			}
			else {
				return data[x] = root(data[x]);
			}
		}
		
		public boolean same(int x, int y) {
			return root(x) == root(y);
		}
		
	}

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

using ll = long long;
using ull = unsigned long long;
using st = string;
using ch = char;
using db = double;
using bl = bool;
using vll = vector<long long>;
using vdb = vector<db>;
using vvll = vector<vll>;
using vst = vector<st>;
using vch = vector<char>;
using pll = pair<ll, ll>;
using vpll = vector<pll>;
using vvpll = vector<vpll>;
#define rep(i, m, n) for (ll i = (ll)(m); i < (ll)(n); i++)
#define vrep(i, vec) for(auto& i : vec)
#define vin(vec) for(auto& i : vec) cin >> i
#define all(v) v.begin(), v.end()
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;}
const ll mod = 1000000007;
const ll inf = 1LL << 60;
const db pi = acos(-1.0L);

int main(){
	ll h, w, k;
	cin >> h >> w >> k;
	vst graph(h);
	vin(graph);
	
	ll ans = mod;
	rep(bitt, 0, 1 << (h - 1)){
		bitset<10> bit(bitt);
		vvll v = {{0}};
		rep(i, 0, h - 1){
			if(bit.test(i)) v.push_back({i + 1});
			else v.back().push_back(i + 1);
		} 
		ll n = v.size(), cut = 0;
		vll sum(n, 0);
		bl check1 = false;
		rep(x, 0, w){
			vll now(n);
			rep(i, 0, n) vrep(y, v.at(i)) if(graph.at(y).at(x) == '1') now.at(i)++;
			rep(i, 0, n) if(now.at(i) > k) check1 = true;
			bl check2 = false;
			rep(i, 0, n) if(now.at(i) + sum.at(i) > k) check2 = true;
			if(check2){
				swap(now, sum);
				cut++;
			}
			else rep(i, 0, n) sum.at(i) += now.at(i);
		}
		if(check1) continue;
		chmin(ans, n + cut - 1);
	}
	cout << ans << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <functional>
#include <cmath>
#include <set>
#include <queue>
#include <vector>
#include <climits>
#include <sstream>
#include <iomanip>
#include <map>
#include <stack>
using namespace std;

int main()
{
	unsigned long long N;
	cin >> N;

	auto func = [](unsigned long long num)
	{
		auto count = 0;
		while (num > 0)
		{
			num /= 10;
			++count;
		}
		return count;
	};

	auto result = 1000;
	for (auto i = 1ull; i <= (unsigned long long)sqrt(N) + 1; ++i)
	{
		if (N % i > 0)
		{
			continue;
		}
		auto temp = N / i;

		result = min(result, max(func(i), func(temp)));
	}

	cout << result << endl;

	return 0;
}

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

#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()

typedef long long ll;
typedef array<int, 3> tri;
typedef long double ld;

template <class T> istream& operator>>(istream& I, vector<T>& v) {for (T &e: v) I >> e; return I;}
template <class T> ostream& operator<<(ostream &O, const vector<T>& v) {for (const T &e: v) O << e << ' '; return O;}


void dfs(int a, const vector<vector<int>>& adj, vector<bool>& vis, vector<int>& cc) {
        cc.emplace_back(a);
        vis[a] = 1;
        for (auto b: adj[a]) {
                if (!vis[b]) {
                        dfs(b, adj, vis, cc);
                }
        }
}


void _main() {
        int n, m; cin >> n >> m;
        vector<int> perm(n + 1);
        for (int i = 1; i <= n; i++) cin >> perm[i];
        vector<vector<int>> adj(n + 1);
        while (m--) {
                int a, b; cin >> a >> b;
                adj[a].emplace_back(b);
                adj[b].emplace_back(a);
        }

        vector<bool> vis(n + 1);
        int ans = 0;
        for (int i = 1; i <= n; i++) {
                if (vis[i]) continue;
                vector<int> cc;
                dfs(i, adj, vis, cc);
                vector<int> bb;
                for (auto it: cc) bb.emplace_back(perm[it]);
                sort(all(bb));
                sort(all(cc));
                for (auto b: bb) {
                        ans += binary_search(all(cc), b);
                }
        }


        cout << ans;
}



signed main() {
        ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
//        freopen("input.txt", "r", stdin);
        int _t = 1;
//        cin >> _t;
        while (_t--) _main();
        return 0;
}


Measured memory_bytes: 15196
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;

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

    static class Task3 {
        public void solve(int testNumber, Scanner in, PrintWriter out) {
            int n = in.nextInt();
            long cnt[] = new long[n + 1];

            long tot = 1;
            for (int i = 2; i <= n; ++i) {
                for (int j = i; j <= n; j += i) {
                    cnt[j]++;
                }
                cnt[i]++;
                tot += (i * cnt[i]);
            }
            out.println(tot);
        }

    }
}



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

int main()
{
  string S;
  cin >>S;
  int N=S.length();
  bool Yes_Flag =true;
  
  for(int i=0; i<(N-1)/2;i++){
  	if(S[i]!=S[N-i-1]){ Yes_Flag=false;break;}
    if(S[i]!=S[(N-1)/2-i-1]){Yes_Flag=false;break;}
    if(S[(N+3)/2+i-1]!=S[N-i-1]){Yes_Flag=false;break;}
  }
  
  if(Yes_Flag){cout << "Yes" <<endl;}
  else{cout << "No" <<endl;}
}

Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <climits>
#include <iomanip>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
int main(){
  ll n;
  cin >> n;
  double res = 0;
  for(int i = 0;i < n;i++){
    ll in;
    cin >> in;
    res += (double)1 / in;
  }
  res = 1 / res;
  cout << fixed << setprecision(10) << res << endl;
}

Measured memory_bytes: 3772
#include<iostream>
using namespace std;
int sum(int a) {
	int ret = 0;
	while (a > 0) {
		ret += a % 10;
		a /= 10;
	}
	return ret;
}
int main() {
	int n, a, b;
	cin >> n >> a >> b;
	int s = 0;
	for (int i = 1; i <= n; i++) {
		int ss = sum(i);
		if (ss<= b && ss >= a) s += i;		
	}
	cout << s;
}

Measured memory_bytes: 3592
# coding: utf-8
# hello worldと表示する
#float型を許すな
#numpyはpythonで
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7


x,y,z,k=MI()
set_=set()
A=sorted(LI(),reverse=True)
B=sorted(LI(),reverse=True)
C=sorted(LI(),reverse=True)
Q=[[(A[0]+B[0]+C[0])*(-1),0,0,0]]
heapify(Q)
set_.add((0,0,0))
i=0
ans=[]
xl,yl,zl=0,0,0
al=[]
al=[[0,0,0]]
while i<k:
    a,u,v,w=heappop(Q)
    ans.append([-a,u,v,w])
    print(-a)
    i+=1
    if u+1<x and (u+1,v,w) not in set_:
        heappush(Q,[-A[u+1]-B[v]-C[w],u+1,v,w])
        set_.add((u+1,v,w))
    if v+1<y and (u,v+1,w) not in set_:
        heappush(Q,[-A[u]-B[v+1]-C[w],u,v+1,w])
        set_.add((u,v+1,w))
    if w+1<z and (u,v,w+1) not in set_:
        heappush(Q,[-A[u]-B[v]-C[w+1],u,v,w+1])
        set_.add((u,v,w+1))


    

    
    


Measured memory_bytes: 79168
import sys
N, K, Q = map(int, input().split())
A = (int(x) for x in sys.stdin.read().split())
score = [K - Q] * (N + 1)
for a in A:
  score[a] += 1
print("\n".join("No" if s <= 0 else "Yes" for s in score[1:]))

Measured memory_bytes: 12624
#include<iostream>
#include<stdio.h>
#include<string>
#include<vector>
#include<map>
#include<tuple>
#include<algorithm>
#include<cmath>
#include<limits>
#include<set>
#include<queue>
using namespace std;
#define int long  long int
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
signed main()
{
	int N, Q;
	string S;
	cin >> N >> Q >> S;
	vector<int>l(Q), r(Q);
	rep(i, Q)cin >> l[i] >> r[i];
	vector<int>v(N + 1, 0);
	for(int i=2;i<=N;i++)
	{
		v[i] = v[i - 1];
		if (S[i - 2] == 'A' && S[i - 1] == 'C')v[i]++;
	}
	rep(i, Q)cout << v[r[i]] - v[l[i]] << endl;
}

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

int getRank(double x) {
	if (1.1 <= x) return 0;
	if (0.6 <= x) return 1; 
	if (0.2 <= x) return 2;
	return 3;
}

int main() {
	int resutls[4][2];
	double a, b;
	memset(resutls, 0, sizeof(resutls));
	while (cin >> a >> b) {
		resutls[getRank(a)][0]++;
		resutls[getRank(b)][1]++;
	}
	for (int i = 0; i < 4; i++) {
		cout << resutls[i][0] << ' ' << resutls[i][1] << endl;
	}
	return 0;
}

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

using namespace std;

int main()
{
	int a, b;
	while(~scanf("%d%d", &a, &b))
	{
		int sum;
		sum = a + b;
		if(sum < 10)
			cout << sum << endl;
		if(sum >= 10)
			cout << "error" << endl;	
	}	
	return 0;
} 

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


int main() {
  string a,b;
  cin >> a >> b;
  int N = a.size();
  int count = 0;
  for(int i = 0; i < N; i++){
   if(a.at(i)==b.at(i)){
    continue;
   }
   else{
    count += 1;
   }
  }
  cout << count << endl;
}

Measured memory_bytes: 3928
#include <cstdio>
#include <climits>
#include <algorithm>
#include <cstring>

using namespace std;

typedef long long ll;
int n;
int a[333],v[333];
ll dp[333][333];

ll cost(int a,int b)
{
  ll res = 0;
  char s[11],t[11];
  int al = sprintf(s,"%d",a)-1;
  int bl = sprintf(t,"%d",b)-1;
  int c = 0;
  while( al >= 0 || bl >= 0 ) {
    if( al < 0 ) {
      res += c;
      c = (t[bl]-'0'+c)/10;
    } else if ( bl < 0 ) {
      res += c;
      c = (s[al]-'0'+c)/10;
    } else {
      res += ((s[al]-'0')*(t[bl]-'0')+c);
      c = ((s[al]-'0')+(t[bl]-'0')+c)/10;
    }
    al--;
    bl--;
  }
  res += c;
  return res;
}

ll solve(int s,int t)
{
  if( s == t ) return 0;//a[s];
  if( dp[s][t] >= 0 ) return dp[s][t];
  ll res = LLONG_MAX;
  for( int i = s; i < t; i++ ) {
    int l = solve(s,i);
    int r = solve(i+1,t);
    /*
    printf("[%d,%d]=%d\n",s,i,v[i+1]-v[s]);
    printf("[%d,%d]=%d\n",i+1,t,v[t+1]-v[i+1]);
    */
    res = min(res,l+r+cost(v[i+1]-v[s],v[t+1]-v[i+1]));
  }
  return dp[s][t] = res;
}

int main(void)
{
  scanf("%d",&n);
  for( int i = 0; i < n; i++ ) scanf("%d",a+i);
  for( int i = 0; i < n; i++ ) v[i+1] += v[i]+a[i];
  memset(dp,-1,sizeof(dp));
  //printf("%d\n",cost(2,3));
  //printf("%d\n",cost(99,1934));
  //printf("%d\n",cost(1934,99));
  ll res = solve(0,n-1);
  printf("%lld\n",res);
  return 0;
}

Measured memory_bytes: 1936
A, B = map(int, input().split())
cnt = 0
for i in range(A, B+1):
    f = True
    str_i = str(i)
    lim = int(len(str_i) / 2)
    for j in range(lim):
        if str_i[j] != str_i[-j-1]:
            f = False
    if f:
        cnt += 1
print(cnt)

Measured memory_bytes: 9196
#include<iostream>
using namespace std;
int main()
{
	int n,i,max=0;
	cin>>n;
	int a[n];
	for(i=0;i<n;i++){
		cin>>a[i];
		max+=a[i]; 
	} 
	max-=n;
	cout<<max<<endl;	
	return 0;
}

Measured memory_bytes: 256
#include <iostream>

using namespace std;

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

    int a[N-1];
    int b, c;

    for (int j=0; j < N; j++){
        cin >> a[j];
    }
    
    b = 1;

    for (int i=0; i < N; i++){
        
        if ( a[i] == b ){
            b += 1;
        }
    
    }

    c = 0;

    if ( b == 1){
        c = c - 1;
    } else {
        c = N - b + 1; 
    }
    
    cout << c << endl;

    return 0;
}


Measured memory_bytes: 1024
(a, b)=list(map(int, input().split()))

k = list(map(int, input().split()))

ksum= sum(k)
k.sort(reverse=True)
#print(k)
p = 'Yes'
for i in range(b):
    #print(i)
    if k[i] < ksum/4/b:
        p = 'No'
        break
print(p)

Measured memory_bytes: 3060
#include <stdio.h>
#include <stdlib.h>
int main(){
    int n;
    int ans=0;
    scanf("%d", &n);
    int p[n];
    for (int i = 0; i <n ; ++i) {
        scanf("%d",&p[i]);
    }
    for (int i =0 ; i <n ; ++i) {
            if(p[0]>=p[i]){
                ans++;
                p[0]=p[i];
            }
    }
    printf("%d", ans);
}

Measured memory_bytes: 896
#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = int(a); i < int(b); i++)
#define rer(i, a, b) for(int i = int(a) - 1; i >= int(b); i--)

using namespace std;
typedef long long int ll;
typedef pair <int, int> P;

int main() {
	int N, T, A;
    cin>> N>>T>>A;
	int H[N];
	rep(i,0,N) cin >> H[i];
	double t[N];
	rep(i,0,N){
		t[i]=T-H[i]*0.006;
	}
	double c=1000;
	int k=0;
	rep(i,0,N){
		if(abs(A-t[i])<c){
			c=abs(A-t[i]);
			k=i;
		}
	}
    cout << k+1 << endl;
}


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

int main(){
    int H,W;
    cin >> H >> W;
    vector<string> picture(H);
    rep(i,H){
        cin >> picture[i];
    }
    rep(i,W + 2){
        cout << "#";
    }
    cout << endl;
    rep(i,H){
        cout << "#" << picture[i] << "#" << endl;
    }
    rep(i,W + 2){
        cout << "#";
    }
    cout << endl;
}


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

typedef long long ll;

#define v(T) vector<T>
#define ttt(T) tuple<T, T, T>
#define pb push_back
#define mp make_pair
#define rep(i, s, n) for(ll i=s;i<n;i++)
#define repeq(i,s,n) for(ll i=s;i<=n;i++)
#define poiu(n) for(ll i=0; i < n; i++)
#define MOD (ll)10e9+7
#define endl '\n'

template<typename T>
void max_self(T& a, T b) { a=a>b?a:b; }
template<typename T>
void min_self(T& a, T b) { a=a<b?a:b; }

using namespace std;

ll n;
ll a[200005];
ll total[200005];


int main() {
    vector<ll> unique;
    
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    cin >> n;

    unique.reserve(200005);
    for(ll i=0; i<n; i++) {
        cin >> a[i];
        if(total[a[i]]==0)
            unique.pb(a[i]);
        total[a[i]]++;
    }

    ll total_combos = 0;
    ll temp;
    for(ll x : unique)
        temp=total[x], total_combos+=temp*(temp-1)/2;
    
    for(ll i=0; i<n; i++) {
        cout << total_combos-total[a[i]]+1 << endl;
    }
    return 0;

}



Measured memory_bytes: 5760
/**
 *      purpose : 
 *      author  : kyomukyomupurin
 *      created : 2018-12-22 21:33:01
**/

#pragma GCC optimize ("Ofast")
#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
using pii = pair<int, int>;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define all(v) (v).begin(), (v).end()
#define print(x) cout << (x) << '\n'
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define fi first
#define se second

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(__null);
    
    int n; cin >> n;
    int a[n]; 
    rep(i, n) cin >> a[i];

    rep(i, n){
        if (a[i] % 2 == 1) {
            print("first"); return 0;
        }
    }

    print("second");
    
    return 0;
}

Measured memory_bytes: 640
#include <bits/stdc++.h>
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define pb push_back
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define ll long long
using namespace std;

const ll P = 1000000007;
int gcd(int a, int b) { return b != 0 ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }

int main()
{
  cout << fixed << setprecision(10);
  string S;
  cin >> S;
  if(S=="Sunny")
  {
    cout << "Cloudy" << endl;
  }
  else if(S=="Cloudy")
  {
    cout << "Rainy" << endl;
  }
  else
  {
    cout << "Sunny" << endl;
  }
  return 0;
}


Measured memory_bytes: 256
#include <stack>
#include <queue>
#include <bitset>
#include <unordered_set>
#include <unordered_map>
#include <map>
#include <set>
#include <tuple>
#include <cmath>
#include <random>
#include <algorithm>
#include <vector>
#include <iostream>
#include <fstream>
#include <chrono>

#define fio ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr)

#define ri(x) i64 x; cin >> x
#define rii(x, y) i64 x, y; cin >> x >> y
#define ri3(x, y, z) i64 x, y, z; cin >> x >> y >> z
#define ri4(x, y, z, u) i64 x, y, z, u; cin >> x >> y >> z >> u
#define rvi(x, n) vi x(n); cin >> x
#define rvvi(x, n, m) vvi x(n, vi(m)); cin >> x
#define rx(x, t) t x; cin >> x

#define ws(x) cout << x << ' '
#define wl(x) cout << x << '\n'
#define wln cout << '\n'

#define dbg(x) cerr << '[' << #x << "]: " << x << '\n'

#define fa(x, v) for (auto &x : v)
#define fi(i, n) for (i32 i = 0; i < n; i++)
#define fp(i, n) for (i32 i = 1; i < n; i++)
#define fr(i, n) for (i32 i = n - 1; i >= 0; i--)
#define fu(x) ri(_x); fi(x, _x)

#define l first
#define r second
#define all(x) x.begin(), x.end()
#define bit(x) ((u64) 1 << (u32) (x))

using namespace std;

typedef uint32_t u32;
typedef uint64_t u64;
typedef int32_t i32;
typedef int64_t i64;
typedef vector<i64> vi;
typedef vector<vi> vvi;
typedef pair<i64, i64> pi;

template<typename T>
inline istream &operator>>(istream &in, vector<T> &v) {
    fa(x, v) in >> x;
    return in;
}

template<typename T>
inline ostream &operator<<(ostream &out, const vector<T> &v) {
    fa(x, v) ws(x);
    wln;
    return out;
}


int main() {
    fio;

    ri3(a, b, c);
    ri(k);
    while (b <= a) {
        b *= 2;
        k--;
    }
    while (c <= b) {
        c *= 2;
        k--;
    }
    if (k >=0 ) wl("Yes"); else wl("No");

    return 0;
}


Measured memory_bytes: 3644
#include<stdio.h>
#include<stdlib.h>

#define INF 1000000
#define NIL NULL
#define WHITE 5000
#define BLACK 5001

void initializeSingleSource(void);
void dijkstra(void);

int v[101][101],c[101][101];
int *d,*pi,*color,*k;
int n;

int main(){
  int i,j;
  int *u;

  scanf("%d",&n);

  u = malloc(sizeof(int)*n);
  d = malloc(sizeof(int)*n);
  pi = malloc(sizeof(int)*n);
  color = malloc(sizeof(int)*n);
  k = malloc(sizeof(int)*n);

  for(i = 0;i < n;i++){
    scanf("%d %d",&u[i],&k[i]);
    for(j = 0;j < k[i];j++){
      scanf("%d",&v[i][j]);
      scanf("%d",&c[i][j]);
    }
  }

  dijkstra();

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

  return 0;
}

void initializeSingleSource(){
  int i;
  for(i = 0;i < n;i++){
    d[i] = INF;
    pi[i] = NIL;
    color[i] = WHITE;
  }
  d[0] = 0;
}

void dijkstra(){
  int i,j,mincost,u1,v1;

  initializeSingleSource();

  while(1){
    mincost = INF;
    for(i = 0;i < n;i++){
      if(color[i] != BLACK && d[i] < mincost){
	mincost = d[i];
	u1 = i;
      }
    }

    if(mincost == INF)break;

    color[u1] = BLACK;

    for(v1 = 0;v1 < k[u1];v1++){
      if(color[v[u1][v1]] != BLACK && (d[u1] + c[u1][v1]) < d[v[u1][v1]]){
	pi[v[u1][v1]] = u1;
	d[v[u1][v1]] = d[u1] + c[u1][v1];
      }
    }
  }
}

Measured memory_bytes: 680
#include <stdio.h>

#define N 100
#define MAX(A,B) \
  ( (A) > (B) ? (A) : (B) )
#define MIN(A,B) \
  ( (A) < (B) ? (A) : (B) )

/** Application main entry point. */
int
main (
  int     argc,
  char  * argv[ ]
  )
{
  int i, j;

  for ( ; ; )
  {
    int cmx[ N ] = { 0 };
    int rmx[ N ] = { 0 };
    int d[ N ][ N ];
    int n;
    
    scanf ( "%d", &n );
    if ( !( n ) ) break ;

    for ( i = 0; i < n; ++i )
    for ( j = 0; j < n; ++j )
    {
      scanf ( "%d", &d[ i ][ j ] );
      if ( j == 0 ) rmx[ i ] = d[ i ][ j ];
      if ( i == 0 ) cmx[ j ] = d[ i ][ j ];
    }

    for ( i = 0; i < n; ++i )
    for ( j = 0; j < n; ++j )
    {
      rmx[ i ] = MIN( rmx[ i ], d[ i ][ j ] );
      cmx[ i ] = MAX( cmx[ i ], d[ j ][ i ] );
    }

    for ( i = 0; i < n; ++i )
    for ( j = 0; j < n; ++j )
    {
      if ( cmx[ i ] == rmx[ j ] )
      {
        printf ( "%d\n", cmx[ i ] );
        goto ESC;
      }
    }
    puts ( "0" );

ESC: ;
  }

  return ( 0 );
}

Measured memory_bytes: 0
#include<stdio.h>
#define ll long long
ll n,k,i,d,j,tmp,c;
bool ok[102];
int main()
{
	scanf("%lld%lld",&n,&k);
	for (i=1;i<=k;++i)
	{
		scanf("%lld",&d);
		for (j=1;j<=d;++j)
		{
			scanf("%lld",&tmp);
			ok[tmp]=1;
		}
	}
	for (i=1;i<=n;++i) if (!ok[i]) ++c;
	printf("%lld",c);
}

Measured memory_bytes: 1736
#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
#define rrep(i,n) for(int i=n-1;i>=0;--i)
#define yesno(flg) if(flg){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define MAX_N 1002
#define i197 1000000007

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P1;
typedef pair<int,int> Pi;
typedef pair<double,Pi> Pdi;
typedef pair<ll,int>Pli;
typedef pair<P1,ll> P2;
const ll INF=1000000000000000001;
struct edge{int to,cost;};
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
struct Road{double cost;int a,b;};

int main() {

	int a,b,c,d,e;

	cin>>a;
	cin>>b;
	cin>>c;
	cin>>d;
	cin>>e;

	int total=0;
	int t2=0;
	total=a+b+c+d+e;
	a=a%10;
	b=b%10;
	c=c%10;
	d=d%10;
	e=e%10;
	if(a>0)total+=10-a;
	if(b>0)total+=10-b;
	if(c>0)total+=10-c;
	if(d>0)total+=10-d;
	if(e>0)total+=10-e;

	if(t2<10-b&&b>0)t2=10-b;
	if(t2<10-a&&a>0)t2=10-a;
	if(t2<10-c&&c>0)t2=10-c;
	if(t2<10-d&&d>0)t2=10-d;
	if(t2<10-e&&e>0)t2=10-e;
	cout<<total-t2<<endl;
	return 0;

}


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

using namespace std;

int main() {

	int a, b, c;

	scanf("%d %d %d", &a, &b, &c);

	if(a + b >= c) {
		printf("Yes\n");
	} else {
		printf("No\n");
	}

	return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
#include <stdlib.h>

struct card {
    char mark;
    int val;
    int index;
};

int
bubble_sort(struct card *C, int N)
{
    int i, j;
    struct card tmp;

    for (i = 0; i < N; i++) {
        for (j = N -1; j > i; j--) {
            if (C[j].val < C[j - 1].val) {
                tmp = C[j];
                C[j] = C[j - 1];
                C[j - 1] = tmp;
            }
        }
    }
    return 0;
}

int
selection_sort(struct card *C, int N)
{
    int i, j, minj;
    struct card tmp;

    for (i = 0; i < N; i++) {
        minj = i;
        for (j = i; j < N; j++) {
            if (C[j].val < C[minj].val)
                minj = j;
        }
        if (C[i].val != C[minj].val) {
            tmp = C[i];
            C[i] = C[minj];
            C[minj] = tmp;
        }
    }
    return 0;
}

void
print_card(struct card *c, int n)
{
    int i;

    for (i = 0; i < n; i++) {
        printf("%c%d", c[i].mark, c[i].val);
        if (i != (n - 1))
            printf(" ");
    }
    printf("\n");
}

int
chk_stable(struct card *c, int n) {
    int i;

    for (i = 0; i < n - 1; i++) {
        if (c[i].val == c[i + 1].val) {
            if (c[i].index > c[i + 1].index)
                return 1;
        }
    }
    return 0;
}

int
main()
{
    int N, i, res;
    struct card cb[36], cs[36];
    char str[4];

    scanf("%d", &N);

    for (i = 0; i < N; i++) {
        scanf("%s", str);
        cb[i].mark = str[0];
        cs[i].mark = str[0];
        cb[i].val = atoi(&str[1]);
        cs[i].val = atoi(&str[1]);
        cb[i].index = i;
        cs[i].index = i;
    }

    bubble_sort(cb, N);
    print_card(cb, N);
    res = chk_stable(cb, N);
    if (res)
        printf("Not stable\n");
    else
        printf("Stable\n");

    selection_sort(cs, N);
    print_card(cs, N);
    res = chk_stable(cs, N);
    if (res)
        printf("Not stable\n");
    else
        printf("Stable\n");

    return 0;
}


Measured memory_bytes: 2092
//#include <bits/stdc++.h>
//#include <stdio.h>
#include<iostream>
#include<cstdio>
#include<bitset>
#include<algorithm>
#include<vector>
#include<list>
#include<queue>
#include<stack>
//#include <bits/stdc++.h>
#include<string>
#include<string.h>
#include<cmath>
#include<utility>
#include<functional>
#include<map>
#include<set>
#include<cctype>
#include<fstream>
#include <numeric>
#include <iomanip>
#include <cstring> 
using namespace std;
using ll=long long;

#define FOR(i, a, b) for( int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for( int i=(a);i>=(b);i--)
#define LFOR(i, a, b) for( long long int i=(a);i<=(b);i++)
#define LRFOR(i, a, b) for(long long int i=(a);i>=(b);i--)
#define MOD 1000000007
#define LLONG_MAX 9223372036854775800

#include <iostream>
#include <cmath>
using namespace std;
 

 
bool isPrimeNum( ll x ){ // 素数である場合 true を返す
  if( x <= 1 ){ // 1以下である場合は素数でないことがすぐにわかる
    return false;
  }
  // sqrt( double型 ) は引数の平方根を double型で返すので、int型でキャスト
  int n = (int)sqrt( (double)x );
  for( int i = 2; i <= n; i++ ){
    if( x % i == 0 ){ // 割り切る整数がある場合、即判定終了
      return false;
    }
  }
  return true; // 割り切る整数がない場合、素数である
}

constexpr ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
constexpr ll lcm(ll a,ll b){return a*b/gcd(a,b);}
constexpr ll abs(ll a,ll b){
if(a>=b)return a-b;
if(a<b)return b-a;
}
constexpr ll min(ll a,ll b){
if(a>=b)return b;
if(a<b)return a;
}

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

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

int main() {
  ll N,K;
  cin >> N>>K;
	ll h[N];
  ll dp[N];
  
	FOR(i,0,N-1){
		cin>>h[i];
    dp[i]=LLONG_MAX;
	}
	dp[0]=0;
  dp[1]=abs(h[0],h[1]);
	FOR(i,2,N-1){
    ll cost=LLONG_MAX;
    FOR(j,1,K){
      if(i-j>=0){
        ll tmp=dp[i-j]+abs(h[i],h[i-j]);
        cost=min(cost,tmp);
      }
  //cout<<cost<<endl;
    }
    dp[i]=cost;
	}
  cout<<dp[N-1]<<endl;

	FOR(i,0,N-1){
  //cout<<dp[i]<<endl;
	}

}

Measured memory_bytes: 1792
#include <stdio.h>

#define MAX 100000
typedef long long llong;
int n,k;
llong T[MAX];

int check(llong P){
	int i = 0;
	for(int j = 0; j < k; j++){
		llong s = 0;
		while(s + T[i] <= P){
			s += T[i];
			i++;
			if(i == n) return n;
		}
	}
	return i;
}

int solve(){
	llong left = 0;
	llong right = 100000 * 10000;
	llong mid;
	while(right - left > 1){
		mid = (left + right) / 2;
		int v = check(mid);
		if(v >= n){ right = mid;}
		else {left = mid;}
	}
	return right;
}

int main(){
	scanf("%d %d", &n, &k);
	for(int i = 0; i<n; i++){
		scanf("%d", &T[i]);
	}
	llong ans = solve();
	printf("%d\n",ans);
}



Measured memory_bytes: 2636
n,m = list(map(int, input().split()))
ls = [0 for i in range(n)]

for i in range(m):
    a,b = list(map(int, input().split()))
    a = a - 1
    b = b - 1
    ls[a] = ls[a] + 1
    ls[b] = ls[b] + 1

for i in range(n):
    print (ls[i])


Measured memory_bytes: 3060
import java.util.*

open class MainKt {
    companion object Static {
        @JvmStatic
        fun main(args: Array<String> = arrayOf()) {
            MainKt().solve()
        }
    }

    val scanner = Scanner(System.`in`)

    fun printf(pattern: String, vararg args: Any): Unit {
        println(String.format(pattern, *args))
    }

    open fun println(line: String) {
        kotlin.io.println(line)
    }

    fun println(line: Int) {
        println(line.toString())
    }

    fun println(line: Long) {
        println(line.toString())
    }

    open fun readLine(): String {
        return scanner.nextLine()
    }

    fun readArg(): String {
        return readLine()
    }

    fun readInt(): Int {
        return readArg().toInt()
    }

    fun readLong(): Long {
        return readArg().toLong()
    }

    fun readIntList(): List<Int> {
        return readArgList().map { it.toInt() }
    }

    fun readLongList(): List<Long> {
        return readArgList().map { it.toLong() }
    }

    fun readArgList(): List<String> {
        return readLine().split(" ")
    }

    fun solve(): Unit {
        val list = readIntList().sorted()
        println(list[1] + list[0])
    }
}

Measured memory_bytes: 34044
#include <iostream>
#include <ctype.h>
#include <string>

using namespace std;

int main()
{
	string s;
	int alpha[26] = {};

	while(1){
		getline(cin, s);
		if (s == "")
			break;

		for (int i = 0; i < s.length(); i++){
			if (isalpha(s[i])){
				int c = (int)(tolower(s[i]) - 'a');
				alpha[c]++;
			}
		}
	}

	for (int i = 0; i < 26; i++) {
		cout << (char)('a' + i) << " : " << alpha[i] << endl;
	}

	return 0;
}



Measured memory_bytes: 3108
x,y = map(int,input().split())
if x == y:
  print("Yes")
else:
  if (x == 4 or x == 6 or x == 9 or x == 11) and (y == 4 or y == 6 or y == 9 or y == 11):
    print("Yes")
  elif (x == 1 or x == 3 or x == 5 or x == 7 or x == 8 or x == 10 or x == 12) and (y == 1 or y == 3 or y == 5 or y == 7 or y == 8 or y == 10 or y == 12):
    print("Yes")
  else:
    print("No")

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

int main() {
  int n;
  cin >> n;
  int sum;
  for (int i = 0; i < n; i++) {
    int l;
    int r;
    cin >> l;
    cin >> r;
    sum += r - l + 1;
    }
  cout << sum << endl;
}

Measured memory_bytes: 256
#include <iostream>
#include <set>
#include <vector>
#include <string>
#include <algorithm>
#include <iterator>
#include <map>
#include <utility>
#include <list>
#include <climits>
#include <bitset>
#include <numeric>

using namespace std;

#define rep(i, n) for(int i = 0; i < n; i++)
#define repi(i, n) for(auto i = (n).begin(); i != (n).end(); i++)
#define in_arr(type, a, n) copy_n(istream_iterator<type>(cin), n, (a).begin());
#define ll long long int

int main(){
    ll n;
    cin >> n;
    rep(i, n + 1){
        ll sum = ((ll)i) * (i + 1) / 2;
        if(sum < n){
            continue;
        }
        rep(j, i){
            if(sum - n == j + 1)
                continue;
            cout << j + 1 << endl;
        }
        break;
    }
    return 0;
}


Measured memory_bytes: 256