akhauriyash/Code-Regression huggingface dataset:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    s = S()
    t = S()
    if t[:-1] == s:
        return "Yes"

    return "No"

print(main())





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

#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) begin(r),end(r)
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)
#define vvl(v,w,h,init) vector<vector<ll>> v(w,vector<ll>(h,init))
#define mp(a,b) make_pair(a,b)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

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

template<typename T>
void O(T t){
  cout << t << endl;
}

const ll mod = 1e9+7;
constexpr ll inf = ((1<<30)-1)*2+1 ;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0,1,-1,1,-1};
const int dx[] = {0,-1,0,1,1,-1,-1,1};

template<typename T> 
void merge_set(set<T> &a, set<T> &b) {
  // b ???????????? a ???????????????????°??????????????????????
  if (a.size() < b.size()) swap(a, b);
  // a ??? b ??????????????¨??¨??\????????????
  a.insert(b.begin(), b.end());
  b = a;
  /* b->clear(); */
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll n,k;
  while(cin >> n && n){
    vector<vector<ll>> v(32);
    vector<set<ll>> vs(n+1);
    rep(i,n){
      cin >> k;
      ll u;
      vs[i].insert(i);
      rep(j,k){
        cin >> u;
        v[u].push_back(i);
      }
    }
    ll cnt = 0;
    ll ans = -1;
    REP(i,1,31){
      rep(j,v[i].size()){
        rep(k,v[i].size()){
          vs[v[i][j]].insert(v[i][k]); 
          merge_set(vs[v[i][j]],vs[v[i][k]]);
        }
      }
      rep(j,n){
        if(vs[j].size() == n){
          ans = i;
          break;
        }
      }
      if(ans != -1) break;
    }
    std::cout << ans << std::endl;
  }
  return 0;
}

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


int main(){

  int x1, x2,x3,x4,x5;
  cin >> x1>>x2>>x3>>x4>>x5;

  if(x1==0){cout << 1;}
  else if(x2==0){cout <<2;}
  else if(x3==0){cout <<3;}
  else if(x4==0){cout <<4;}
  else{cout <<5;}
  return 0;
}

Measured memory_bytes: 3620
#include<bits/stdc++.h>
using namespace std;
long long a,b,c,d,i,e,f,g,n,m,k,l,A[200005],B[200005],C[200005],ans,le,ri,mid;
map <long long,long long> mp;
int main() {
           cin>>n;
           cout<<2*(3.14159265359)*n;
}

Measured memory_bytes: 3800
#include <iostream>
using namespace std;
int main(){

  int n,a[100],result=0,i,j;

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

  for(i=0;i<n-1;i++){
    int now,minnum=101;
    for(j=i;j<n;j++) if(minnum>a[j]){
	now=j;
	minnum=a[j];
      }
    if(i!=now){
      swap(a[i],a[now]);
      result++;
    }
  }
  for(i=0;i<n-1;i++) cout<<a[i]<<" ";
  cout<<a[n-1]<<endl;

  cout<<result<<endl;
  return 0;
}



Measured memory_bytes: 3116
n = gets.to_i
ps = n.times.map { gets.split(' ').map(&:to_i) }

d1ps = ps.sort {|a, b| a[0] + a[1] <=> b[0] + b[1] }
d2ps = ps.sort {|a, b| a[0] - a[1] <=> b[0] - b[1] }
puts [
  (d1ps.first[0] - d1ps.last[0]).abs + (d1ps.first[1] - d1ps.last[1]).abs,
  (d2ps.first[0] - d2ps.last[0]).abs + (d2ps.first[1] - d2ps.last[1]).abs,
].max


Measured memory_bytes: 33344
fun main(args: Array<String>) {
    val List = readLine()!!.split(" ").map(String::toInt)
    val N = List[0]
    val A = List[1]
    val B = List[2]
    val C = N * A
    if(C > B) {
        println(B)
    } else {
        println(C)
    }
}

Measured memory_bytes: 35980
macro_rules ! input { ( source = $ s : expr , $ ( $ r : tt ) * ) => { let mut iter = $ s . split_whitespace ( ) ; input_inner ! { iter , $ ( $ r ) * } } ; ( $ ( $ r : tt ) * ) => { let s = { use std :: io :: Read ; let mut s = String :: new ( ) ; std :: io :: stdin ( ) . read_to_string ( & mut s ) . unwrap ( ) ; s } ; let mut iter = s . split_whitespace ( ) ; input_inner ! { iter , $ ( $ r ) * } } ; }
macro_rules ! input_inner { ( $ iter : expr ) => { } ; ( $ iter : expr , ) => { } ; ( $ iter : expr , mut $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let mut $ var = read_value ! ( $ iter , $ t ) ; input_inner ! { $ iter $ ( $ r ) * } } ; ( $ iter : expr , mut $ var : ident $ ( $ r : tt ) * ) => { let mut $ var = $ iter . next ( ) . unwrap ( ) . parse ::< usize > ( ) . unwrap ( ) ; input_inner ! { $ iter $ ( $ r ) * } } ; ( $ iter : expr , $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let $ var = read_value ! ( $ iter , $ t ) ; input_inner ! { $ iter $ ( $ r ) * } } ; ( $ iter : expr , $ var : ident $ ( $ r : tt ) * ) => { let $ var = $ iter . next ( ) . unwrap ( ) . parse ::< usize > ( ) . unwrap ( ) ; input_inner ! { $ iter $ ( $ r ) * } } ; }
macro_rules ! read_value { ( $ iter : expr , ( $ ( $ t : tt ) ,* ) ) => { ( $ ( read_value ! ( $ iter , $ t ) ) ,* ) } ; ( $ iter : expr , [ $ t : tt ; $ len : expr ] ) => { ( 0 ..$ len ) . map ( | _ | read_value ! ( $ iter , $ t ) ) . collect ::< Vec < _ >> ( ) } ; ( $ iter : expr , chars ) => { read_value ! ( $ iter , String ) . chars ( ) . collect ::< Vec < char >> ( ) } ; ( $ iter : expr , usize1 ) => { read_value ! ( $ iter , usize ) - 1 } ; ( $ iter : expr , $ t : ty ) => { $ iter . next ( ) . unwrap ( ) . parse ::<$ t > ( ) . unwrap ( ) } ; }
use std::cmp::min;
fn chmin<T: Clone + PartialOrd>(x: &mut T, y: &T) -> bool {
    if *x > *y {
        x.clone_from(y);
        true
    } else {
        false
    }
}
fn main() {
    input! { n, k, h:[isize; n] };
    let mut dp = vec![std::isize::MAX; n];
    dp[0] = 0;
    for i in 0..(n - 1) {
        for j in (i + 1)..(min(n, i + k + 1)) {
            let c = dp[i] + (h[i] - h[j]).abs();
            chmin(&mut dp[j], &c);
        }
    }
    println!("{}", dp[n - 1]);
}


Measured memory_bytes: 6396
#include <iostream>
#include <algorithm>
using namespace std;
int main(){

int a,b,c;
cin >> a >> b >> c;
if(b >= c){cout << b + c << endl;}
else{
  if(a + b >= c){cout << b + c << endl;}
  else{cout << a+b+b + 1 << endl;}
 }

return 0;
}

Measured memory_bytes: 256
#include <stdio.h>
int main(void)
{
    int N,min,mid,max,l,i,j;
    
    scanf("%d",&N);
    for(i=0;i<N;i++)
    {
        min=0; mid=0; max=0;
        for(j=0;j<3;j++)
        {
            scanf("%d",&l);
            if(j==0)
            {
                min=l;
            }
            else if(j==1)
            {
                if(l<min)
                {
                    max=min; min=l;
                }
                else if(l>=min)
                {
                    max=l;
                }
            }
            else if(j==2)
            {
                if(l<min)
                {
                    mid=min; min=l;
                }
                else if(l>=min && l<max)
                {
                    mid=l;
                }
                else if(l>=max)
                {
                    mid=max; max=l;
                }
            }
        }
        if(min*min+mid*mid==max*max) printf("YES\n");
        else printf("NO\n");
    }
    
    return 0;
}



Measured memory_bytes: 2044
#include <iostream>
#include <string>
#include <stack>
#include <sstream>
#include <cstdio>

using namespace std;

int main() {
	string a;
	while (getline(cin, a)) {
		bool hantei = true;
		stack<double> stk;
		while (hantei) {
			string b = "";
			while (true) {
				if (a[0] == ' ') {
					a = a.substr(1);
					break;
				} else if (a.size() == 1){
					b += a[0];
					hantei = false;
					break;
				} else {
					b += a[0];
					a = a.substr(1);
				}
			}
			if (b == "+") {
				double p = stk.top();
				stk.pop();
				double q = stk.top();
				stk.pop();
				stk.push(p+q);
			} else if (b == "-") {
				double p = stk.top();
				stk.pop();
				double q = stk.top();
				stk.pop();
				stk.push(q-p);
			} else if (b == "*") {
				double p = stk.top();
				stk.pop();
				double q = stk.top();
				stk.pop();
				stk.push(p*q);
			} else if (b == "/") {
				double p = stk.top();
				stk.pop();
				double q = stk.top();
				stk.pop();
				stk.push(q/p);
			} else {
				double k;
				stringstream ss;
				ss << b;
				ss >> k;
			    stk.push(k);
			}
		}
		printf("%.6f\n", stk.top());
	}
	return 0;
}

Measured memory_bytes: 1304
package main

import (
	"fmt"
	"sort"
)

func minimum0(xs []int) int {
	n := xs[0]
	for _, x := range xs {
		if n == 0 {
			n = x
		} else if x < n && 0 < x {
			n = x
		}
	}
	return n
}

func main() {
	var n int
	fmt.Scanf("%d\n", &n)

	as := make([]int, n)

	for i := range as {
		fmt.Scanf("%d", &as[i])
	}

	sort.Ints(as)

	xs := make([]int, n)
	xs[0] = as[0]

	for i := range as {
		if i == 0 {
			continue
		}
		xs[i] = as[i] % as[0]
	}

	z := minimum0(xs)
L:
	for i := range as {
		xs[i] = as[i] % z
	}
	z0 := minimum0(xs)
	if 0 < z0 && z0 < z {
		z = z0
		goto L
	}
	if z0 == 0 {
		z0 = z
	}

	fmt.Println(z0)
}

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

int fun(int a, int b, int c);

int main()
{
    int k;
    int a,b,c;
    long long int sum=0;
    scanf("%d",&k);
    for(a=1;a<=k;a++){
        for(b=1;b<=k;b++){
            for(c=1;c<=k;c++){
                sum+=fun(a,b,c);
            }
        }
    }
    printf("%I64d",sum);
    return 0;
}

int fun(int a, int b, int c){
    int m,i;
    if(a<=b)
    {
        m=a;
        if(m>c) m=c;
    }
    else{
        m=b;
        if(m>c) m=c;
    }
    for(i=m;i>0;i--){
        if(a%i==0 && b%i==0 && c%i==0)
        {
            break;
        }
    }
    return i;
}


Measured memory_bytes: 1736
// [AT2041 Divide a Cuboid] https://www.luogu.org/problem/AT2041
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;

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

    if (a%2 == 0 || b%2 == 0 || c%2 == 0)
    {
        cout << 0 << endl;
    } else {
        cout << min(min(a*b, b*c), a*c) << endl;
    }
    return 0;
}

Measured memory_bytes: 256
#include<stdio.h>
#define N 100
void printStatus(int,int[]);
int main(void)
{
  int A[100];//array
  int i,j;//counter
  int n;//the number of elements
  int mini;//indication of min. element
  int tmp;//temporary valuable for swapping
  int count=0;//counter of swap operations
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&A[i]);
  for(i=0;i<n;i++)
    {
      mini=i;
      for(j=i;j<n;j++)
        {
          if(A[j]<A[mini]) mini=j;
        }
      if(i!=mini)
        {
          tmp=A[i];
          A[i]=A[mini];
          A[mini]=tmp;
          count++;
        }
    }
  printStatus(n,A);
  printf("%d\n",count);
  return 0;
}
void printStatus(int n,int A[])
{
  int i;
  for(i=0;i<n;i++)
    {
      if(i>0) printf(" ");
      printf("%d",A[i]);
    }
  printf("\n");
}


Measured memory_bytes: 2140
#include <iostream>
#include <vector>
#include <cstring>
#include <cctype>
#include <string>
#include <cmath>
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;

int main(){
	vector<double>a(2), b(2);
	cin >> a[0] >> a[1] >> b[0] >> b[1];
	cout <<fixed<< sqrt(pow((a[0]-b[0]),double(2))+pow((a[1]-b[1]),double(2)));
	return 0;
}

Measured memory_bytes: 1280
table = {}
for i in range(ord('a'), ord('z') + 1):
    table[i] = []
n = int(raw_input().strip())
for i in range(0, n):
    s = raw_input().strip()
    for j in range(ord('a'), ord('z') + 1):
        table[j].append(s.count(chr(j)))
word = ""
for (key, val) in table.items():
    for i in range(0, min(val)):
        word += chr(key)
print word


Measured memory_bytes: 2692
#include <stdio.h>
void print_time_lefts(int seconds) {
	int h, m, s, remain;

	h = seconds / 3600;
	remain = seconds % 3600;
	m = remain / 60;
	s = remain % 60;
	printf("%02d:%02d:%02d\n", h, m, s);
}

int main(void) {
	int h, m, s, std_time_lefts;

	while (1) {
		scanf("%d %d %d ", &h, &m, &s);
		if (h == -1 && m == -1 && s == -1)
			break;

		std_time_lefts = 7200 - h * 3600 - m * 60 - s;
		print_time_lefts(std_time_lefts);
		print_time_lefts(std_time_lefts * 3);
	}
	return 0;
}

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

//

#define RESIDUE(u,v) (capacity[u][v] - flow[u][v])
#define RCOST(u,v) (cost[u][v] + h[u] - h[v])
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)   FOR(i,0,n)
#define LL long long

LL d,m,n;

int main(){
  cin>>n>>m>>d;
  if(d!=0)
    printf("%.12f\n",2*((double)((n-d)*(m-1))/(double)(n*n)));
  else
    printf("%.12f\n",((double)((n-d)*(m-1))/(double)(n*n)));
  return 0;
}


Measured memory_bytes: 256
/* When Talent doesn't work, Hard work beats Talent*/

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")

#include"bits/stdc++.h"

using namespace std;

#define Fast_D cout<<fixed<<setprecision(13);
#define FastIO ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

#define nl "\n"
#define int long long
#define double long double
#define all(v) v.begin(),v.end()
#define scanstr(s) cin>>ws; getline(cin,s);
//#define Local = 1;
#ifdef Local
#define debug(x) cout << __LINE__ << " " << #x <<"..." << x << endl
#define dev(x) cout << __LINE__ << " " << #x << "..." ; for(auto &it : x) cout<< it << " "; cout << endl;
#define des(x) cout << __LINE__ << " " << #x << "..." << x << endl;
#else
#define debug(x) ;
#define dev(x);
#define des(x)
#endif

const double PI = 3.141592653589793;

void solve()
{
	string s;
	cin >> s;
	if(s.back()=='s')
	{
		s += 'e';
		s += 's';
		cout << s;
		return ;
	}
	s += 's';
	cout << s;
}

int32_t main()
{
	FastIO;
	Fast_D;
	int T;
	T=1;
	while(T--) solve();
	return 0;
}



Measured memory_bytes: 3652
#[allow(unused_macros)]
macro_rules! parse_line {
    ( $t:ty ) => (
        {
            let mut line = String::new();
            ::std::io::stdin().read_line(&mut line).unwrap();
            let mut iter = line.split_whitespace();
            iter.next().unwrap().parse::<$t>().unwrap()
        }
    );

    ( $( $t:ty), +) => (
        {
            let mut line = String::new();
            ::std::io::stdin().read_line(&mut line).unwrap();
            let mut iter = line.split_whitespace();
            ( $(iter.next().unwrap().parse::<$t>().unwrap()),* )
        }
    );
}

#[allow(unused_macros)]
macro_rules! read_line {
    () => (
        {
            let mut line = String::new();
            ::std::io::stdin().read_line(&mut line).unwrap();
            line.pop();
            line
        }
    )
}

#[allow(unused_macros)]
macro_rules! parse_vec {
    ( $t:ty ) => (
        {
            let mut line = String::new();
            ::std::io::stdin().read_line(&mut line).unwrap();
            let iter = line.split_whitespace();
            iter.map(|v| v.parse::<$t>().unwrap()).collect::<Vec<_>>()
        }
    )
}

fn solve(k: usize) -> Vec<usize> {
    use std::cmp::{min, max};

    let mut v = Vec::new();

    let n = max(k, 2);

    for i in 0..min(n, 50) {
            v.push(i);
    }

    let add = n / 50;

    for i in 0..v.len() {
        v[i] += add;
    }

    for i in 0..(k % 50) {
        for j in 0..v.len() {
            if i == j {
                v[j] += v.len();
            } else {
                v[j] -= 1;
            }
        }
    }

    v
}

fn main() {
    let k = parse_line!(usize);

    let v = solve(k);

    println!("{}", v.len());
    println!("{}", v.iter().map(|a| a.to_string()).collect::<Vec<String>>().join(" "));
}

#[test]
fn solve_test() {
    assert_eq!(solve(0), vec![0, 1]);
    assert_eq!(solve(3), vec![1,2,3]);
//    assert_eq!(solve(100), vec![]);
//    assert_eq!(solve(1234567894848), vec![]);
}


Measured memory_bytes: 4352
#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <vector>
#include <cmath>
#include <bitset>
#include <queue>

using namespace std;
typedef long long ll;

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

Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define ll long long                                    // long long省略
#define pb push_back                                    // push_back省略
#define mp make_pair                                    // make_pair省略
#define fi first                                        // first省略
#define se second                                       // second省略
#define itn int                                         // int誤字保険
#define count cout                                      // cout誤字保険
#define vecotr vector                                   // vector誤字保険
#define ednl endl                                       // endl誤字保険
#define opt() cin.tie(0); ios::sync_with_stdio(false)   // 入出力速度改善

#define rep(i,l,r) for(ll i=(l);i<(r);i++)               // 範囲[l, r)で刻み1のfor文(順方向)
#define repp(i,l,r,k) for(ll i=(l);i<(r);i+=(k))         // 範囲[l, r)で刻みkのfor文(順方向)
#define rrep(i,l,r) for(ll i=(r-1);i>=(l);i--)           // 範囲[l, r)で刻み1のfor文(逆方向)
#define rrepp(i,l,r,k) for(ll i=(r-1);i>=(l);i-=(k))     // 範囲[l, r)で刻みkのfor文(逆方向)
#define all(x) (x).begin(), (x).end()                   // vectorのポインタ位置指定用
#define max(p,q)((p)>(q)?(p):(q))                       // max拡張
#define min(p,q)((p)<(q)?(p):(q))                       // min拡張
#define bit(n,m)(((n)>>(m))&1)                          // 変数nのm番目のbitを取り出す

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int dy[]={0, 1, 0, -1};                                 // 4方向近傍
int dx[]={1, 0, -1, 0};                                 // 4方向近傍

int main(){
    ll a,b;cin>>a>>b;
    cout << (a*b % 2 == 0 ? "Even" : "Odd") << ednl;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
typedef long long ll;
typedef long double ld;
const double pi=acos(-1.0);
const ll mod=pow(10,9)+7;
const ll INF=pow(2,31)-1;
typedef pair<int,int> P;
typedef vector<int> vi;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

ll gcd(ll a , ll b){
	if(b == 0) return a;
	return gcd(b , a % b);	
}
ll lcm(ll a , ll b){
	ll g = gcd(a , b);
	ll lc = (a/g) * b;
	return lc;
}

int main(){
    ios::sync_with_stdio(false);
    map<string,int> cnt;
    int n;
    cin >> n;
    rep(i,n){
        string s;
        cin >> s;
        cnt[s]++;
    }
    int m;
    cin >> m;
    rep(i,m){
        string t;
        cin >> t;
        cnt[t]--;
    }
    int ans=0;
    for (auto p:cnt){
        ans=max(ans,p.second);
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
#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>

using namespace std;

#define REP(i,n) for(int i=0;i<int(n);i++)
#define foreach(c,itr) for(__typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
typedef long long ll;
typedef pair<int,int> P;

int main(void){
	int i;

	cin.tie(0);
	ios_base::sync_with_stdio(false);

	string S,T="CODEFESTIVAL2016";
	cin >> S;
	int ans=0;
	REP(i,16) if(S[i]!=T[i]) ans++;

	cout << ans << endl;

	return 0;
}


Measured memory_bytes: 256
/// 8:15 PM 21/06/20
/// Author: t_bone_289 (An Immature Programmer.... I'm still developing !!)
#include<bits/stdc++.h>

using namespace std;
#define pll pair<ll,ll>
#define fi first
#define se second
#define mp make_pair
#define pb emplace_back
#define endl '\n'
#define VARIABLE_ERROR(x) cout << #x << " = " << x << endl;
#define CONTAINER_ERROR(v) cout << "{";for (auto &x:v) { cout << x << ','; }cout << "}" << endl;
#define PI 3.14159265358979323846
#define M 1000000007
#define INF 1e15
typedef long long ll;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    ll n, k;
    cin >> n >> k;
    vector<ll> v(n);
    for (auto &x:v) {
        cin >> x;
    }
    sort(v.begin(), v.end());
    ll ans = 0;
    for (ll i=0;i<k;i++) {
        ans += v[i];
    }
    cout << ans;
    return 0;
}

Measured memory_bytes: 3632
#include<bits/stdc++.h>
#define ll long long
#define vll vector<ll>
#define llin(a) ll a;cin>>a;
#define llin2(a,b) ll a,b;cin>>a>>b; 
#define llin3(a,b,c) ll a,b,c;cin>>a>>b>>c;
// #define vecin(n,v) for(ll i=0;i<n;i++) cin>>v[i];
#define vecout(n,v) for(ll i=0;i<n;i++) cout<<v[i]<<" "; cout<<endl;
#define fr(i,s,n) for(ll i=s;i<n;i++ )
// #define endl "\n "
#define test cout<<"test line"<<endl;
#define pll pair<ll,ll>
#define vpll vector<pll>
#define mod 1000000007
#define endl "\n"
using namespace std;
ll max(ll a,ll b){return a>b?a:b;}
ll min(ll a,ll b){return a<b?a:b;}
void swapper(ll* a,ll* b) {ll temp=*a;*a=*b;*b=temp;}
using namespace std;
int main(){
	llin(n);
	ll k=n%10;
	if(k==2 || k==4 || k==5 || k==7 || k==9)
		cout<<"hon"<<endl;
	else if(k==0 || k==1 || k==6 || k==8)
		cout<<"pon"<<endl;
	else
		cout<<"bon"<<endl;
	return 0;
}


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

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

  vector<int>p(N);
  
  for(int i = 0 ; i < N ; i++){
  	cin >> p.at(i);
  }
  
  sort(p.begin(),p.end());
  
  int sum = 0;
 
  if(N < K){
  	for(int i = 0 ; i < N ; i++){
  		sum += p.at(i);
  	}
  }else{
  	for(int i = 0 ; i < K ; i++){
  		sum += p.at(i);
  	}  	
  }
  
  
  cout << sum << endl;
  
  return 0;
}


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

int main() {
  int n;
  cin>>n;
  if(n==1)cout<<0<<endl;
  else cout<<1<<endl;
  
  return 0;
  

}


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

template <class T>
inline void read(T &res)
{
	res = 0; bool bo = 0; char c;
	while (((c = getchar()) < '0' || c > '9') && c != '-');
	if (c == '-') bo = 1; else res = c - 48;
	while ((c = getchar()) >= '0' && c <= '9')
		res = (res << 3) + (res << 1) + (c - 48);
	if (bo) res = ~res + 1;
}

template <class T>
inline T Min(const T &a, const T &b) {return a < b ? a : b;}

template <class T>
inline T Max(const T &a, const T &b) {return a > b ? a : b;}

const int N = 2e5 + 5, djq = 1e9 + 7;

int n, top, stk[N], le[N], ri[N], mx[N], f[N], s[N];

struct elem
{
	int x, v, id;
} a[N];

inline bool pmoc(elem a, elem b) {return a.v < b.v;}

inline bool comp(elem a, elem b) {return a.x < b.x;}

int main()
{
	read(n); int cur = n + 1;
	for (int i = 1; i <= n; i++) read(a[i].x), read(a[i].v);
	std::sort(a + 1, a + n + 1, comp);
	for (int i = 1; i <= n; i++) a[i].id = i;
	std::sort(a + 1, a + n + 1, pmoc);
	for (int i = n; i >= 1; i--) cur = Min(cur, a[i].id), le[a[i].id] = cur;
	cur = 1;
	for (int i = 1; i <= n; i++) cur = Max(cur, a[i].id), ri[a[i].id] = cur;
	f[0] = s[0] = 1;
	for (int i = 1; i <= n; i++) mx[ri[i]] = Max(mx[ri[i]], le[i]);
	for (int i = 1; i <= n; i++) mx[i] = Max(mx[i], mx[i - 1]);
	for (int i = 1; i <= n; i++)
		f[i] = (s[i - 1] - (mx[i - 1] ? s[mx[i - 1] - 1] : 0) + djq) % djq,
			s[i] = (s[i - 1] + f[i]) % djq;
	return std::cout << (s[n] - (mx[n] ? s[mx[n] - 1] : 0) + djq) % djq << std::endl, 0;
}

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

int main() {
  int n; cin >> n;
  vector<int> a(n);
  const int INF = 10e8;
  int ans = INF;
  rep(i,n) cin >> a[i];
  rep(i,n) {
    if (a[i] % 2 == 1) {
      ans = 0;
      break;
    }

    int cnt = 0;
    while (a[i] % 2 != 1) {
      a[i] /= 2;
      cnt++;
    }
    ans = min(ans, cnt);
  }
  cout << ans << endl;
  return 0;
}

Measured memory_bytes: 3616
N, K = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
MOD = 10**9 + 7
def calc(X):
  ans = 1
  for x in X:
    ans *= x
    ans %= MOD
  return ans

def solve(A):
  if N == K:
    return calc(A)
  if max(A) < 0 and K % 2:
    return calc(sorted(A, reverse=True)[:K])
  
  sA = sorted(((abs(a), -1 if a < 0 else 1) for a in A), reverse=True)
  #print(sA)
  cn = 0
  for i in range(K):
    if sA[i][1] < 0:
      cn += 1
  if cn % 2 == 0:
    return calc([s[0] for s in sA[:K]])
  pA = sorted([abs(a) for a in A if a >= 0], reverse=True)
  nA = sorted([abs(a) for a in A if a < 0], reverse=True)
  #print(pA, nA)
  if (len(nA) >= cn + 1 and len(pA) >= K - cn - 1 and K - cn - 1 >= 0 and
      len(nA) >= cn - 1 and len(pA) >= K - cn + 1):
    candidates = []
    candidates.append((nA[cn-1] * nA[cn], calc(pA[:K-cn-1] + nA[:cn+1])))
    candidates.append((pA[K-cn-1] * pA[K-cn], calc(pA[:K-cn+1] + nA[:cn-1])))
    #print(candidates)
    return(max(candidates)[1])
    
  if len(nA) >= cn + 1 and len(pA) >= K - cn - 1 and K - cn - 1 >= 0:
    #print(cn, cn+1)
    return(calc(pA[:K-cn-1] + nA[:cn+1]))
  if len(nA) >= cn - 1 and len(pA) >= K - cn + 1:
    #print(cn, cn-1)
    return(calc(pA[:K-cn+1] + nA[:cn-1]))
  

print(solve(A))


Measured memory_bytes: 113768
//       Author: Mostafa Mounir Shehab
 
#include <bits/stdc++.h>
using namespace std;
 
#define PI  3.14159265  // PI = acos(-1)
#define EPS (1e-10)
#define endl "\n"
#define SZ(v) (int)(v.size())
typedef long long ll;
typedef long double ld;
//template <class Type>
 
 
void Fast(){
	std::ios_base::sync_with_stdio(0);
	cin.tie(NULL); cout.tie(NULL); cerr.tie(NULL);
}
 
inline int D(){
	int t;
	scanf("%d",&t);
	return t;
}
inline ll llD(){
	ll t;
	scanf("%lld",&t);
	return t;
}
 
 
ll MOD=1e9 + 7; 
const int N=1e6 + 5;
ll arr[N];
ll dp[N];
ll OO=1e12; 
 
ll n,m,k,cnt,SU,idx,len,MN,MX;
ll l,r,mid;
ll a,b,c,d,s;
 
ll Solve(int idx){
	
	ll &ret=dp[idx];
	if(~ret)
		return ret;
		
	if(idx == n)
		return ret = 0;
	if(idx > n)
		return ret = OO;
	
	
	ret=OO;
	for(int i=1;i<=k;++i)
		ret = min(ret , abs(arr[idx] - arr[idx+i]) + Solve(idx+i));
	
	return ret;
}

 
 
 
int main(){
	cin>>n>>k;
	for(int i=1;i<=n;++i)
		cin>>arr[i];
	
	memset(dp,-1,sizeof dp);
	
	cout<<Solve(1)<<endl;


		
}
 
 


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

typedef long long ll;
typedef pair<ll,ll> edge;


int main(){
    ll n, odds;
    cin >> n;
    double res;
    if( n==1 ) res = 1.0;
    else{
        odds = (n+1)/2;
        res = odds/(double)n;
    }
    cout << res << endl;
    return 0;
}


Measured memory_bytes: 256
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> i_i;
typedef pair<ll, int> ll_i;
typedef pair<double, int> d_i;
typedef pair<ll, ll> ll_ll;
typedef pair<double, double> d_d;
struct edge { int u, v; ll w; };

ll MOD = 1000000007;
ll _MOD = 1000000009;
double EPS = 1e-10;

bool f(string& s, string& t, int& i, int j) {
	int n = s.length(), m = t.length();
	for (int j = 0; j < m; j++) {
		if (i == n) return false;
		if (s[i] == '(' && t[j] == ')') {
			i--;
			if (!f(s, t, i, 0)) return false;
		}
		else if (s[i] == ')' && t[j] == '(') return false;
		else i++;
	}
	return true;
}

bool check(string& s, string& t) {
	int i = 0;
	return f(s, t, i, 0);
}

int main() {
	string s; cin >> s;
	int n = s.length(), N = n / 4;
	int m, x = 0, ma = -1;
	for (int i = 0; i < n; i++) {
		if (x > ma) {
			m = i;
			ma = x;
		}
		if (s[i] == '(') x++;
		if (s[i] == ')') x--;
	}
	vector<int> l;
	x = 0; ma = 1;
	for (int i = m - 1; i >= 0; i--) {
		if (s[i] == '(') x++;
		if (s[i] == ')') x--;
		if (x > ma) {
			l.push_back(i);
			ma = x;
		}
	}
	vector<int> r;
	x = 0; ma = 1;
	for (int i = m + 1; i <= n; i++) {
		if (s[i - 1] == ')') x++;
		if (s[i - 1] == '(') x--;
		if (x > ma) {
			r.push_back(i);
			ma = x;
		}
	}
	map<int, string> mp;
	for (int k = 0; k < l.size(); k++) {
		string t = s.substr(l[k], r[k] - l[k]);
		int m = t.length(), M = m / 4;
		if (N % M == 0) mp[M] = t;
	}
	vector<int> dp(N + 1, INT_MAX / 2);
	dp[1] = 0;
	for (auto z: mp) {
		int M = z.first;
		string t = z.second;
		for (int d = 1; d < M; d++)
			if (M % d == 0 && mp.count(d) && check(t, mp[d]))
				dp[M] = min(dp[M], dp[d] + M / d - 1);
	}
	cout << dp[N] << endl;
}

Measured memory_bytes: 13892
#include <bits/stdc++.h>
using namespace std;
#define log(x) cout << a + pow(a, 2) + pow(a, 3);
 
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	short a;
	cin >> a;
	log(a);
	return 0;
}

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

signed main(){
  int A,B,ans=0;
  cin>>A>>B;
  if(A-B>0)ans=A-B;
  cout<<ans<<endl;
}

Measured memory_bytes: 384
import java.util.Scanner;
import java.lang.Object;
import java.math.*;
public class Main{
	public static void main(String[] args){
		Scanner stdIn=new Scanner(System.in);
		int a=stdIn.nextInt();
		int b=stdIn.nextInt();
		int d=a/b;
		int r=a%b;
		double f=(double)a/b;
		System.out.print(d+" "+r+" ");
		System.out.println(BigDecimal.valueOf(f).toPlainString());
	}
}

Measured memory_bytes: 26596
N, Q = map(int, input().split())
s = input()
tds = [input().split() for _ in range(Q)]

barely_safe_left = 0
barely_safe_right = N - 1
for t, d in reversed(tds):
    if barely_safe_left >= N or barely_safe_right < 0:
        break
    if s[barely_safe_left] == t and d == 'L':
        barely_safe_left += 1
    if s[barely_safe_right] == t and d == 'R':
        barely_safe_right -= 1
    if barely_safe_left - 1 >= 0 and s[barely_safe_left - 1] == t and d == 'R':
        barely_safe_left -= 1
    if barely_safe_right + 1 < N and s[barely_safe_right + 1] == t and d == 'L':
        barely_safe_right += 1

if barely_safe_left > barely_safe_right:
    print(0)
else:
    print(barely_safe_right - barely_safe_left + 1)
    

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


int main(){
  int K;
  int A,B;

  cin >> K >> A >> B;

  for(int i=A;i<=B;++i){
    if(i % K == 0){
      cout << "OK" << endl;
      return 0;
    }
  }

  cout << "NG" <<endl;
  return 0;
}


Measured memory_bytes: 3592
#include<stdio.h>

#define N 100000
#define NIL -1

void degree(int);
int depth(int);

typedef struct{
    int p;
    int l;
    int r;
}Node;

Node T[N];
int x = 0;

int main(){
    int i, j, n, c, k, newcode, left, right;
    
    scanf("%d", &n);
    
    for(i = 0; i < n; i++) T[i].p = T[i].l = T[i].r = NIL;
    
    for(i = 0; i < n; i++){
        scanf(" %d%d", &newcode, &k);
        for(j = 0; j < k; j++){
            scanf("%d", &c);
            T[c].p = newcode;
            if(j == 0) T[newcode].l = c;
            else T[left].r = c;
            left = c;
        }
    }
    
    for(i = 0; i < n; i++){
        x = 0;
        printf("node %d: parent = %d, depth = %d, ", i, T[i].p, depth(i));
        if(T[i].p == NIL) printf("root, [");
        else if(T[i].l == NIL) printf("leaf, [");
        else printf("internal node, [");
        x = 0;
        degree(T[i].l);
        printf("]\n");
    }
    
    return 0;
    
}

void degree(int nodeid){
    if(nodeid != NIL){
        if(x != 0){
            printf(", ");
        }
        printf("%d", nodeid);
        x++;
        degree(T[nodeid].r);
    }
}

int depth(int nodeid){
    if(T[nodeid].p == NIL) return x;
    else {
        x++;
        return depth(T[nodeid].p);
    }
}

Measured memory_bytes: 1784
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define FAST  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> 
#define ll long long int 
#define ar array
#define pb push_back
#define fi(a,b) for(int i=a;i<(b);i++)
#define fj(a,b) for(int j=a;j<(b);j++)
#define fk(a,b) for(int k=a;k<(b);k++)
#define lb lower_bound
#define ub upper_bound
//hash base 177013


int main()
{
    FAST;
    //#ifndef ONLINE_JUDGE
    //    freopen("input.txt","r",stdin);
    //    freopen("output.txt","w",stdout);
    //#endif
    //ll testcase;
    //cin>>testcase;
    //while(testcase--)
    {
		int n,k,t;
		cin>>n>>k>>t;
		if(n%k==0)
		{
			cout<<(n/k)*t<<'\n';
		}
		else
		{
			cout<<(n/k)*t+t<<'\n';
		}
		
		
    }
}


Measured memory_bytes: 3608
data = input().split(" ")
A = int(data[0])
B = int(data[1])
C = int(data[2])
K = int(data[3])
ans = 0
if A >= K:
    ans = K
else:
    K -= A
    ans += A
    if B >= K:
        pass
    else:
        K -= B
        ans -= K
print(ans)

Measured memory_bytes: 9196
import java.util.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main {

	int INF = 1 << 28;
	int days[] = {31, 29, 31, 30, 31 , 30, 31, 31, 30, 31, 30, 31};
	String[] to = {"Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", "Wednesday"};
	
	void run() {
		Scanner sc = new Scanner(System.in);
		for(;;) {
			int m = sc.nextInt();
			int d = sc.nextInt();
			if( (m|d) == 0 ) break;
			int dd = 0;
			for(int i=1;i<m;i++) dd+= days[i-1];
			dd += d-1;
			System.out.println( to[dd%7] );
		}
	}

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

	void debug(Object... os) {
		System.err.println(Arrays.deepToString(os));
	}
}

Measured memory_bytes: 11000
#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define REP(i,n) for (int64_t i=0; i<(n); ++i)
#define P pair<int,int>
using ll=int64_t;
using namespace std;
#define ketasuu(n) fixed<<setprecision(n)
#define btoe(p) p.begin(),p.end()
#define etob(p) p.rbegin(),p.rend()




int main(){
    int a,b; cin>>a>>b;
    if(a<=8 && b<=8){
        cout<<"Yay!"<<endl;
    }
    else cout<<":("<<endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
 
#ifndef LOCAL_
#define fprintf if( false ) fprintf
#endif // LOCAL_
#define dump() fprintf(stderr, "#%s.%d\n", __func__, __LINE__);
#define dumpl(x1) fprintf(stderr, "#%s.%d (%s) = (%ld)\n", __func__, __LINE__, #x1, x1);
#define dumpll(x1, x2) fprintf(stderr, "#%s.%d (%s, %s) = (%ld, %ld)\n", __func__, __LINE__, #x1, #x2, x1, x2);
#define dumplll(x1, x2, x3) fprintf(stderr, "#%s.%d (%s, %s, %s) = (%ld, %ld, %ld)\n", __func__, __LINE__, #x1, #x2, #x3, x1, x2, x3);
#define dumpd(x1) fprintf(stderr, "#%s.%d (%s) = (%lf)\n", __func__, __LINE__, #x1, x1);
#define dumpdd(x1, x2) fprintf(stderr, "#%s.%d (%s, %s) = (%lf, %lf)\n", __func__, __LINE__, #x1, #x2, x1, x2);
#define loop for(;;)
typedef int64_t Int;
typedef std::vector<Int> LI;
const double pi = 3.14159265358979323846264338;
const Int mod = 1000000007;
 
template<typename T> void scan1(T& x) { fprintf(stderr, "unknown type\n"); }
template<> void scan1(Int& x) { if( scanf("%" PRId64, &x) < 0 ) exit(0); }
template<> void scan1(std::string& x) { if( not ( std::cin >> x ) ) exit(0); }
template<> void scan1(LI& xs) { for(Int &x : xs) scan1(x); }
void scan() {}
template<typename Head, typename... Tail>
void scan(Head& x, Tail&... xs) {
  scan1(x); scan(xs...);
}
 
template<typename T>
struct Maybe {
   T x;
   bool valid;
   Maybe() : valid(false) {}
   Maybe(T x_) : x(x_), valid(true) {}
   operator T() const {
      assert( valid );
      return x;
   }
};
 
struct Solver {
   Solver() { fprintf(stderr, "--------Solver begin--------\n"); }
   ~Solver() { fprintf(stderr, "--------Solver end--------\n"); }
   void solve() {
      Int x, y; scan(x, y);
      Int res = y - x + y;
      printf("%ld\n", res);
   }
};
 
int main() {
   loop std::unique_ptr<Solver>(new Solver())->solve();
}
 
 

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

int b[20];
int main(){
	int n,m,c,ans=0;
	scanf("%d %d %d", &n, &m, &c);
	for(int i = 0; i < m; i++) scanf("%d", &b[i]);
	for(int i = 0; i < n; i++){
		int val = 0;
		for(int j = 0; j < m; j++){
			int x;
			scanf("%d", &x);
			val += x*b[j];
		}
		if(val>-c) ans++;
	}
	printf("%d\n", ans);
	
	return 0;
}

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

#define REP(i,n) for(ll i=0;i<ll(n);++i)
#define RREP(i,n) for(ll i=ll(n)-1;i>=0;--i)
#define FOR(i,m,n) for(ll i=m;i<ll(n);++i)
#define RFOR(i,m,n) for(ll i=ll(n)-1;i>=ll(m);--i)
#define ALL(v) (v).begin(),(v).end()
#define UNIQUE(v) v.erase(unique(ALL(v)),v.end());
#define INF 1000000001ll
#define MOD 1000000007ll
#define EPS 1e-9

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


using namespace std;

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

template <class T> bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return false; }
template <class T> bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; }
bool ok;
void dfs(vvi &g, vi &color, int v, int c) {
	color[v] = c;
	REP(i, g[v].size()) {
		if (color[g[v][i]] != -1 && color[g[v][i]] == c)ok = false;
	}
	REP(i, g[v].size()) {
		if (color[g[v][i]] == -1)dfs(g, color, g[v][i], c ^ 1);
	}
}
int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int n, m;
	while (cin >> n >> m, n) {

		vvi g(n);
		REP(i, m) {
			int a, b;
			cin >> a >> b;
			a--; b--;
			g[a].push_back(b);
			g[b].push_back(a);
		}
		ok = true;
		vi color(n, -1);
		dfs(g, color, 0, 0);
		if (!ok) {
			cout << 0 << endl;
		}
		else {
			int cnt = 0;
			REP(i, n)cnt += color[i];
			if (cnt == n - cnt) {
				if (cnt % 2 == 0) {
					cout << 1 << endl;
					cout << cnt / 2 << endl;
				}
				else {
					cout<<0<<endl;
				}
			}
			else {
				if (cnt % 2 == 0) {
					if ((n - cnt) % 2 == 0) {
						cout << 2 << endl;
						cout << min(cnt, n - cnt) / 2 << endl;
						cout << max(cnt, n - cnt) / 2 << endl;
					}
					else {
						cout << 1 <<  endl;
						cout << cnt /2 << endl;
					}
				}
				else {
					if ((n - cnt) % 2 == 0) {
						cout << 1 << endl;
						cout << (n - cnt) / 2 << endl;
					}
					else {
						cout << 0 << endl;
					}
				}
			
			}
		}
	}
}


Measured memory_bytes: 3212
#include <iostream>
#include <set>

using namespace std;

typedef long long ll;

int n;
ll a[202020];
ll b[202020];
set<pair<ll,int>> s;
ll c;

void rip() {
    cout << "-1\n";
    exit(0);
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cin >> n;
    for (int i = 1; i <= n; i++) cin >> a[i];
    for (int i = 1; i <= n; i++) {
        cin >> b[i];
        s.insert({b[i],i});
    }
    while (s.size()) {
        auto sr = *s.rbegin();
        s.erase(sr);
        int i = sr.second;
        if (a[i] == b[i]) {
            continue;
        } else {
            int vi = i-1 >= 1 ? i-1 : n;
            int oi = i+1 <= n ? i+1 : 1;
            ll x = b[vi]+b[oi];
            ll y = max(max(b[vi],b[oi]),a[i]);
            if (b[i]-x < a[i]) rip();
            ll u = (b[i]-y)/x;
            if (u == 0) {
                c++;
                b[i] -= x;
            } else {
                c += u;
                b[i] -= x*u;
            }
            s.insert({b[i],i});
        }
    }
    for (int i = 1; i <= n; i++) if (a[i] != b[i]) rip();
    cout << c << "\n";
}

Measured memory_bytes: 17920
#include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <string>
#include <queue>
#include <algorithm>
#include <map>
#include <cmath>
#include <numeric>
#include <list>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <tuple>
#include <deque>
#include <complex>

using namespace std;

/*
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
*/

typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<long long, long long> pll;
typedef vector<pll> vpll;

typedef long double ld;
typedef vector<ld> vld;

typedef vector<bool> vb;

#define rep(i, n) for (ll i = 0; i < (n); i++)
#define reps(i, n) for (ll i = 1; i <= (n); i++)
#define rrep(i, n) for (ll i = (n) - 1; i >= 0; i--)
#define rreps(i, n) for (ll i = (n); i >= 1; i--)
#define all(v) (v).begin(), (v).end()

template <class T> void chmin(T& a, T b) { a = min(a, b);}
template <class T> void chmax(T& a, T b) { a = max(a, b);}

constexpr int INF = 1 << 30;
constexpr ll INFL = 1LL << 60;
constexpr ll MOD = 1000000007;
constexpr ld EPS = 1e-12;
ld PI = acos(-1.0);

void solve() {
    ll x;
    cin >> x;
    cout << (1999 - x) / 200 + 1 << endl;
    return;
}

int main() {
    std::cin.tie(nullptr);
    std::ios_base::sync_with_stdio(false);
    cout << fixed << setprecision(15);
    solve();
}

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

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




Measured memory_bytes: 256
from math import factorial
N=map(int,input().split())
A=list(map(int,input().split()))

tmp=[0]
sum=0
for i in range(len(A)):
    sum+=A[i]
    tmp.append(sum)

tmp.sort()
tmp.append(1.2)

def combinations_count(n, r):
    return factorial(n) // (factorial(n - r) * factorial(r))

cnt=1
ans=0
for i in  range(0,len(tmp)-1):
    if tmp[i]==tmp[i+1]:
        cnt+=1
    elif tmp[i]!=tmp[i+1]:
        if cnt>1:
            ans+=combinations_count(cnt,2)
        cnt=1

print(ans)

Measured memory_bytes: 99536
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int maxn=100000+10;
int n,a[maxn],b[maxn],c[maxn],dp[maxn][4];
int main()
{
	cin>>n;
	for(int i=1;i<=n;i++)cin>>a[i]>>b[i]>>c[i];
	for(int i=1;i<=n;i++)
	{
		dp[i][0]=max(dp[i][0],max(dp[i-1][1]+a[i],dp[i-1][2]+a[i]));
		dp[i][1]=max(dp[i][1],max(dp[i-1][0]+b[i],dp[i-1][2]+b[i]));
		dp[i][2]=max(dp[i][2],max(dp[i-1][0]+c[i],dp[i-1][1]+c[i]));
	}
	cout<<max(dp[n][0],max(dp[n][1],dp[n][2]))<<endl;
	return 0;
}

Measured memory_bytes: 6284
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bitset>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<deque>
#include<list>
#include<iomanip>
#include<cmath>
#include<cstring>
using namespace std;

#define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repr(i, 0, n)
#define INF 2e9
#define MOD 1000000007
//#define MOD 998244353
#define LINF (long long)4e18
#define jck 3.141592

using ll = long long;
using Pi = pair<int,int>;
using Pl = pair<ll,ll>;

void warshallFloyd(int N,vector<vector<ll>> &dist){
	rep(k,N)rep(i,N){
		if(dist[i][k] == LINF) continue;
		rep(j,N){
			if(dist[k][j] == LINF) continue;
			dist[i][j] = min(dist[i][j],dist[i][k] + dist[k][j]);
		}
	}
}

int main(){
	int N,M; cin >> N >> M;
	vector<vector<ll>> dist(N,vector<ll>(N,LINF));
	vector<vector<ll>> G(N,vector<ll>(N));
	rep(i,N)rep(j,N) if(i == j) dist[i][j] = 0;
	rep(i,M){
		int a,b; cin >> a >> b;
		a--; b--;
		ll c; cin >> c;
		dist[a][b] = c;
		dist[b][a] = c;
		G[a][b] = c;
		G[b][a] = c;
	}
	warshallFloyd(N,dist);
	int ans = 0;
	rep(i,N)rep(j,N){
		if(i < j){
			if(dist[i][j] < G[i][j]) ans++;
		}
	}
	cout << ans << endl;

}
   


Measured memory_bytes: 384
#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 RVSORT(v) sort(v.rbegin(), v.rend());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
#define MOD 1000000007
using namespace std;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
typedef pair<int, P> PP;
typedef pair<ll, LP> LPP;

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

int gcd(int a,int b){return b?gcd(b,a%b):a;}

ll modpow(ll n,ll k){
  if(k == 1){
    return n;
  }else if(k == 0){
    return 1;
  }else if(k%2==0){
    ll memo = modpow(n,k/2)%MOD;
    return memo*memo%MOD;
  }else{
    return n * modpow(n,k-1)%MOD;
  }
}

int main(){

  ll a,b,c,d;cin>>a>>b>>c>>d;
  ll num1 = (a-1)/c + (a-1)/d - (a-1)/(c*d/gcd(c,d));
  ll num2 = b/c + b/d - b/(c*d/gcd(c,d));
  //cout<<num1<<endl<<num2<<endl;
  cout<<(b-a + 1) - (num2-num1)<<endl;

 

  return 0;
}

Measured memory_bytes: 256
#include <iostream>
using namespace std;
int main(void){
    int H, W, A, B; cin >> H >> W >> A >> B;
    for (int i = 0; i < H; i++) {
        for (int j = 0; j < W; j++) {
            if ((j < A && i < B) || (A <= j && B <= i)) {
                cout << 0;
            } else {
                cout << 1;
            }
        }
        cout << endl;
    }
}


Measured memory_bytes: 1280
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1e9+7;

int exgcd(int a,int b,int &x,int &y){
	while(b){
		int t{a/b};
		swap(a-=t*b, b);
		swap(x-=t*y, y);
	}
	return a;
}
int exgcd(int a,int b){
	int x{1},y{0};
	return exgcd(a,b,x,y);
}
int inverse(int a,int mod){
	int x{1},y{0};
	exgcd(a,mod,x,y);
	return (x%mod+mod)%mod;
}

int main(){
	
	int n, k; cin>>n>>k;
	vector<int>a(n);
	for(auto &i:a)cin>>i;
	sort(a.begin(),a.end());
	ll ans{};
	vector<ll> c(n);
	k--;
	c.at(k)=1;
	
	for(int i=k+1; i<n; i++){
		c.at(i) = (c.at(i-1)*(i)%MOD*inverse(i-k,MOD))%MOD;
	}
	for(int i=k; i<n; i++){
		ans += c.at(i)*a.at(i);
		ans=(ans%MOD+MOD)%MOD;
	}
	for(int i=0; i+k<n; i++){
		ans -= c.at(n-i-1)*a.at(i);
		ans=(ans%MOD+MOD)%MOD;
	}
	cout << ans << endl;
	
}


Measured memory_bytes: 1408