akhauriyash/Code-Regression huggingface dataset:
#include <algorithm>
#include <cassert>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>

#include <limits.h>

using namespace std;

typedef long long ll;

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

const int MAX_N = 200000;

ll f(ll mod, int bit, bool to_one, const string &original_S) {
    // printf("mod: %lld, bit: %d, to_one: %d, %s\n", mod, bit, to_one, original_S.c_str());
    static map<ll, vector<ll>> powers;
    static map<ll, ll> memo;

    if (powers.find(mod) == powers.end()) {
        // power[i] is 2 ^ i % mod
        vector<ll> power(MAX_N + 1);
        power[0] = 1 % mod;

        for (int i = 1; i <= MAX_N; i++) {
            power[i] = (power[i - 1] * 2) % mod;
            // printf("power[%d]: %lld\n", i, power[i]);
        }
        powers[mod] = power;
    }

    vector<ll> &power = powers[mod];

    if (memo.find(mod) == memo.end()) {
        ll v = 0;
        string T = original_S;
        reverse(T.begin(), T.end());
        for (int i = 0; i < (int) T.size(); i++) {
            if (T[i] == '1') {
                v = (v + power[i]) % mod;
            }
        }
        memo[mod] = v;
    }

    ll ans = memo[mod];
    // printf("memo: %lld\n", ans);

    if (to_one) {
        ans = (ans + power[bit]) % mod;
    } else {
        if ((ans += mod - power[bit]) >= mod) ans -= mod;
    }

    return ans;
}

int count_bit(const string &S) {
    int ans = 0;

    for (int i = 0; i < (int) S.size(); i++) {
        if (S[i] == '1') {
            ans++;
        }
    }

    return ans;
}

int main(void) {
    int N;
    cin >> N;
    string S;
    cin >> S;

    const int bit_count = count_bit(S);

    for (int i = 0; i < N; i++) {
        bool change_to_one;
        ll mod;
        if (S[i] == '1') {
            change_to_one = false;
            mod = bit_count - 1;
        } else {
            change_to_one = true;
            mod = bit_count + 1;
        }
        if (mod == 0) {
            printf("%d\n", 0);
            continue;
        }

        ll x = f(mod, N - i - 1, change_to_one, S);

        int cnt = 1;
        while (x > 0) {
            int bit_count = __builtin_popcountll(x);
            x = x % bit_count;
            cnt++;
        }

        printf("%d\n", cnt);
    }

    return 0;
}


Measured memory_bytes: 8528
#include <bits/stdc++.h> 
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define size_of_array(array) (sizeof(array)/sizeof(array[0]))
#define max 100005
using ll =long long;
using namespace std;
using Graph=vector<vector<int>>;

int main(){

    string s;
    cin>>s;
    ll ans=0;
    rep(i,pow(2,s.size()-1)){
        ll k=1;
        int j;
        for(j=0;j<s.size()-1;j++){
            if((i>>j)&1){
                ans+=(s[s.size()-1-j]-'0')*k;
                k=1;
            }else{
                ans+=(s[s.size()-1-j]-'0')*k;
                k*=10;
            }
        }
        ans+=(s[s.size()-1-j]-'0')*k;
    }
    cout<<ans<<endl;
    return 0;
}

Measured memory_bytes: 256
from collections import defaultdict
S = input()
D = defaultdict(int)
for s in S:
    D[s] += 1

def main(D):
    if len(D.keys()) != 2:
        return 0
    else:
        for v in D.values():
            if v != 2:
                return 0
    return 1

if main(D):
    print("Yes")
else:
    print("No")

Measured memory_bytes: 3444
# -*- Coding: utf-8 -*-
import itertools#これは色々使える組み込み関数みたいなやつ
import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
N = int(input())
x, y = [0]*N, [0]*N#N個の空のリストを作成
l = list(range(N))#範囲がNのリストを作成する

for i in range(N):
  x[i], y[i] = map(int, input().split())
#分けて入力する形式を設定することで可読性が高く仕上がっている
#素晴らしいことだ


dis = 0
comb = list(itertools.permutations(l))
#prmutation:英語の意味としては順列である
'''p[, r]で
長さrのタプル列、重複なしのあらゆる並びを表す
今回はリストlの重複なしの並び替え順序を新たなリストに収納している
並び方を計算しリストに収納しているイメージ
l[0,1,2]
l[0,2,1]これにもリスト番号が0,1,2と割り振られている
これが全通り入っている
これ作った人はすごい
自分も早く理解したい
'''
for i in range(0, len(comb)):#i番目のパターンの時を考える。
  for j in range(0, N-1):#lのリスト番号を読み込み
    dis += math.sqrt((x[comb[i][j]]-x[comb[i][j+1]])**2 + (y[comb[i][j]]-y[comb[i][j+1]])**2)
'''
各経路の距離を足していき全距離分を経路数
で割れば平均距離が出るので各経路ごとの距離は
不必要と判断されている。
'''
print(dis/len(comb))


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

int main(){

  ll N,K;
  cin>>N>>K;

  ll A[N+1];
  ll done[N+1];
  rep(i,N){
    cin>>A[i+1];
    done[i+1]=0;
  }

  vector<int> v;
	
  done[1]=1;

  ll j=1;
  v.push_back(1);
  while(1){

    j=A[j];
    if(done[j]==2){break;}
    done[j]++;
    v.push_back(j);

  }
  
  ll S=v.size(); 
  if(K<S){cout<<v[K]<<endl;return 0;}

  ll N_out=0;
  ll N_loop=0;
  rep(i,N){
    if(done[i+1]==1)N_out++;
    if(done[i+1]==2)N_loop++;
  }
  
  
  ll d=((K-N_out)%N_loop);
  cout<<v[N_out+d]<<endl;
  
}


Measured memory_bytes: 8404
n = int(input())
ls = [(0,0,0)]
for _ in range(n):
    a,b,c=map(int, input().split())
    ls.append((a,b,c))

dpa = [0]*(n+1)
dpb = [0]*(n+1)
dpc = [0]*(n+1)

for x in range(1,n+1):
    a,b,c = ls[x]
    dpa[x] = max(dpc[x-1]+a,dpb[x-1]+a)
    dpb[x] = max(dpa[x-1]+b,dpc[x-1]+b)
    dpc[x] = max(dpa[x-1]+c,dpb[x-1]+c)


print(max(dpa[-1],dpb[-1],dpc[-1]))


Measured memory_bytes: 32408
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
#define all(x) (x).begin(),(x).end()
using namespace std;
const int INF=1145141919,MOD=1e9+7;
const int64_t LINF=8931145141919364364,LMOD=998244353;
// const int dy[]={0,-1,0,1,1,-1,-1,1};
// const int dx[]={1,0,-1,0,1,1,-1,-1};

int main() {
	int n; cin >> n;
	int a[n];
	rep(i,n) cin >> a[i];
	rep(i,n) {
		if(a[i] % 2 == 0) {
			if(a[i] % 3 != 0 and a[i] % 5 != 0) {
				cout << "DENIED" << '\n';
				return 0;
			}
		}
	}
	cout << "APPROVED" << '\n';
	return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
 
using namespace std;
typedef long long ll;
const int MAXN = 1e5 + 4;
int n;
pair<int, int> a[MAXN];
int main(){
	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	cin >> n;
	for(int i = 0;i < n;i ++)
		cin >> a[i].first, a[i].second = i;
	sort(a, a + n);
	int ans = 0;
	for( int i = 0; i < n; i ++){
		if( (a[i].second % 2) != (i % 2))
			ans ++;
	}
	cout << ans/2 << endl;
	return 0;
}


Measured memory_bytes: 1024
#define _GLIBCXX_DEBUG

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

constexpr ll INF = 1e16;

#define rep(i, N) for(ll i=0; i<N; ++i)

ll max(ll a, ll b) {return a < b ? b : a; }
ll min(ll a, ll b) {return a > b ? b : a; }
double maxf(double a, double b) { return a < b ? b : a; }

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

  int n = s.length();

  for (int i = 0; i < n; i++){
    if (i%2 == 0){
      if(s[i] == 'h' && s[i+1] == 'i'){
      } else{
        cout<<"No"<<endl;
        exit(0);
      }
    }
  }
  cout<<"Yes"<<endl;
  return 0;
}


Measured memory_bytes: 256
#include <iostream>

int main() {
	int A, B, ans=0;
	std::cin >> A >> B;
	B -=1;
	A -=1;
	if(B%A==0){
		ans = B/A;
	}
	else {
		ans = B/A+1;
	}
	std::cout << ans << std::endl;
	return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;}
template<class T> ostream& operator<<(ostream& o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;}

bool solve(){
    int n;
    cin >>n;

    multiset<int> rem;
    rep(i,1<<n){
        int x;
        cin >>x;
        rem.insert(x);
    }

    vector<int> v;
    int root = *rem.rbegin();
    v.pb(root);
    rem.erase(rem.find(root));

    rep(i,n){
        vector<int> add;
        for(int j:v){
            auto itr = rem.lower_bound(j);
            if(itr == rem.begin()) return false;

            --itr;
            add.pb(*itr);
            rem.erase(itr);
        }

        for(int j:add) v.pb(j);
    }

    return true;
}

int main(){
    cout << (solve()?"Yes":"No") << "\n";
    return 0;
}


Measured memory_bytes: 13884
from collections import defaultdict
N,W=map(int,input().split())

wvdic=defaultdict(list)
for i in range(N):
  w,v=map(int,input().split())
  wvdic[w].append(v)
#print(wvdic)  

wv_sorted=sorted(wvdic.items())
#print(wv_sorted)

wvslist=[]
for i in range(len(wv_sorted)):
  slist=[0]
  vlist=sorted(wv_sorted[i][1],reverse=True)
  for v in vlist:
    slist.append(slist[-1]+v)
  wvslist.append((wv_sorted[i][0],slist))
if len(wvslist)<4:
  for _ in range(4-len(wvslist)):
    wvslist.append((-1,[0]))
#print(wvslist)

max_answer=0
for w1 in range(len(wvslist[0][1])):
  ww1=wvslist[0][0]*w1
  v1=wvslist[0][1][w1]
  for w2 in range(len(wvslist[1][1])):
    ww2=wvslist[1][0]*w2
    v2=wvslist[1][1][w2]
    for w3 in range(len(wvslist[2][1])):
      ww3=wvslist[2][0]*w3
      v3=wvslist[2][1][w3]
      for w4 in range(len(wvslist[3][1])):        
        ww4=wvslist[3][0]*w4
        v4=wvslist[3][1][w4]
        ww_total=ww1+ww2+ww3+ww4
        #print(ww1,ww2,ww3,ww4,v1,v2,v3,v4)
        if ww_total<=W:
          vtotal=v1+v2+v3+v4
          max_answer=max(max_answer,vtotal)
          
print(max_answer)

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

namespace lineAralgebra
{


	class Program
	{
		static void Main(string[] args)
		{
			var input = Console.ReadLine().Split().Select(int.Parse).ToArray()[0];
			var found = false;	
		
			for(var i = 1; i < 10; i++) {
				for(var j = 1; j < 10; j++) {
					if (i * j == input) {
						found = true;
					}
				}
			}

			if (found) {
				System.Console.WriteLine("Yes");
			} else{
				System.Console.WriteLine("No");
			}
		}
	}
}

Measured memory_bytes: 13396
/*
                                                              _        ___    
                                                             //      /        
----__----------------)__----__------__--_/_----__---)__-----/------/___------
  /   ) /   / /   /  /   ) /   )   /   ) /    /   ) /   )   /      /    )     
_(___(_(___/_(___(__/_____(___(___/___/_(_ __(___/_/_______/______(____/______
          /                      /                                            
      (_ /                      /                                             */
#include "bits/stdc++.h"
using namespace std;
#define int long long
#define ld long double
#define repo(i, begin, end) for(__typeof(end)i=(begin)-((begin)>(end));i!=(end)-((begin)>(end));i+=1-2*((begin)>(end)))
#define ll long long
#define bug(x) cerr<<__LINE__<<": "<<#x<<" = "<<(x)<<"  ";
#define fastr ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define rep(i,a,b) for(int i = a; i < b; ++i)
#define rrep(i,a,b) for(int i = (a-1); i >= b; i--) 
#define fi first
#define se second
#define tit(v,i,c) get<c>(v[i])
#define mt make_tuple 
#define pb push_back
#define eb emplace_back
#define mp make_pair
double jk=0.004;
#define power(x,y) pow(x,y)+jk
#define endl "\n"
const long long mod=1e9+7;
const long long N=1000000000;
const int val=1000005;
int in(){
int n;cin>>n;
return n;}
void _do_(){
	ll a;ld b;
	cin>>a>>b;
	ll ans=b*100+0.5;
	printf("%lld\n",a * ans / 100);
	string s;
	//s=to_string(ans);
	//rep(i,0,s.size()-7)cout<<s[i];cout<<endl;
	//cout<<(ld)(a*ans/100)<<endl;


















	

}
signed main(){
fastr
int tc;
//cin>>tc;
tc=1;
while(tc--)_do_();
cerr<<"Time elapsed:";
cerr<<1000*clock()/CLOCKS_PER_SEC<<" ms ";
return 0;}

Measured memory_bytes: 3764
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right
from math import gcd,ceil,floor,factorial
# from fractions import gcd
from functools import reduce
from pprint import pprint
from statistics import mean,median,mode

INF = float("inf")

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    # lsはソート済みであること
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

def I():
    return int(input())

def MI():
    return map(int,input().split())

def RI():
    return list(map(int,input().split()))

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def S():
    return input()

def MS():
    return input().split()

def RS():
    return list(input())

def CS(n):
    return [ input() for _ in range(n) ]

def LS(n):
    return [ list(input()) for _ in range(n) ]

# ddict = defaultdict(lambda: 0)
# ddict = defaultdict(lambda: 1)
# ddict = defaultdict(lambda: int())
# ddict = defaultdict(lambda: list())
# ddict = defaultdict(lambda: float())

n = I()
a = RI()

lc = []
for i in range(n):
    if i==0:
        c = abs( a[i] )
    else:
        c = abs( a[i] - a[i-1] )
    lc.append(c)
# print(lc)
s = sum(lc)

for i in range(n):
    if i==0:
        ans = s - lc[i] - lc[i+1] + abs(a[1]) + abs(a[n-1])
    elif i==(n-1):
        ans = s - lc[i] + abs(a[n-2])
    else:
        ans = s - lc[i] - lc[i+1] + abs(a[i+1]-a[i-1]) + abs(a[n-1])
    print(ans)

Measured memory_bytes: 95980
#include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <iomanip>
#include <cmath>
using namespace std;

void solve(){
  long long n, ans = 0; cin >> n;
  for(int i = 1; i <= n - 1; i++){
    ans += i;
  }
  cout << ans << endl;
  return;
}

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


Measured memory_bytes: 256
#include<iostream>
#include<algorithm>
#include<math.h>
#include<queue>
#include<vector>
#include<climits>
#include<map>
#include<string>
#include<functional>
#include<iomanip>
#include<deque>
#include<random>
#include<set>
#include<bitset>
#include<cassert>

using namespace std;
typedef long long ll;
typedef double lldo;
#define mp make_pair
#define pub push_back
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
ll gcd(ll a, ll b) { if (a % b == 0) { return b; } else  return gcd(b, a % b); }
ll lcm(ll a, ll b) { if (a == 0) { return b; }return a / gcd(a, b) * b; }
template<class T>ll LBI(vector<T>& ar, T in) { return lower_bound(ar.begin(), ar.end(), in) - ar.begin(); }
template<class T>ll UBI(vector<T>& ar, T in) { return upper_bound(ar.begin(), ar.end(), in) - ar.begin(); }

ll n, ans = 0;

int main() {
	cin >> n;
	for (int i = 1; (ll)i * i <= n; i++) {
		if (!((n - 1) % i)) {
			if (i != 1)ans++;
			if ((n - 1) / i != i && (n - 1) / i != 1)ans++;
		}
		if (!(n % i)) {
			if (i != 1) {
				ll box = n;
				while (box) {
					if (!(box % i))box /= i;
					if (box % i == 1) {
						ans++;
						break;
					}
					if (box % i && box % i != 1)break;
				}
			}
			if (i != n / i && n / i != 1) {
				ll box2 = n;
				while (box2) {
					if (!(box2 % (n / i)))box2 /= n / i;
					if (box2 % (n / i) == 1) {
						ans++;
						break;
					}
					if (box2 % (n / i) && box2 % (n / i) != 1)break;
				}
			}
		}
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 256
<?php

function c_p($i,$j){
    global $sum,$a;
    $sum+=1;
    $a[$i][$j]="#";
}

function search($i,$j){
    global $a;
    if(isset($a[$i+1][$j]) and $a[$i+1][$j]=="."){
        c_p($i+1,$j);
        search($i+1,$j);
    }
    if(isset($a[$i-1][$j]) and $a[$i-1][$j]=="."){
        c_p($i-1,$j);
        search($i-1,$j);
    }
    if(isset($a[$i][$j+1]) and $a[$i][$j+1]=="."){
        c_p($i,$j+1);
        search($i,$j+1);
    }
    if(isset($a[$i][$j-1]) and $a[$i][$j-1]=="."){
        c_p($i,$j-1);
        search($i,$j-1);
    }
}


while(1){
    $a = array();
    $sum=1;
    fscanf(STDIN,"%d %d\n",$w,$h);

    if($w==0 && $h==0)
        exit;
    
    for($i=0;$i<$h;$i++){
        fscanf(STDIN,"%s\n",$a[$i]);
        $a[$i] = str_split($a[$i]);
    }
    
//print_r($a);
    for($i=0;$i<$h;$i++){
        for($j=0;$j<$w;$j++){       
            if($a[$i][$j]=="@"){
                $row = $i;
                $col = $j;
            }
        }
    }
    
    $sum=1;
    
    search($row,$col);
    echo $sum."\n";
}


?>

Measured memory_bytes: 7028
#include <iostream>
 using namespace std;
#include <math.h>

int main() {

	int buf=0;
	int i=1;

	while(cin >> buf){
		if(buf==0){
			break;
		}
		cout << "Case " << i << ": " << buf <<endl;
		i++;
	}



  return 0;
}


Measured memory_bytes: 3020
#include <iostream>      // cout, endl, cin
#include <string>        // string, to_string, stoi
#include <vector>        // vector
#include <algorithm>     // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility>       // pair, make_pair
#include <tuple>         // tuple, make_tuple
#include <cstdint>       // int64_t, int*_t
#include <cstdio>        // printf
#include <map>           // map
#include <queue>         // queue, priority_queue
#include <set>           // set
#include <stack>         // stack
#include <deque>         // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset>        // bitset
#include <cctype>        // isupper, islower, isdigit, toupper, tolower
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> Pl;
typedef pair<int, int> P;

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

  if (S == "AAA" || S == "BBB")
  {
    cout << "No" << endl;
  }
  else
  {
    cout << "Yes" << endl;
  }

  return 0;
}






Measured memory_bytes: 256
#include <bits/stdc++.h>
#include<vector>
using namespace std;
#define rep(i, n)        for(int i=0; i<(int)(n); ++i)
int main() {
  int a,b,c,d;
  cin>>a>>b>>c>>d;
  if(a+b==c+d)cout<<"Balanced";
  else if(a+b>c+d)cout<<"Left";
  else cout<<"Right";
}


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

int main(){
	int n;
	cin >> n;
	vector<int> d(n);
	for (int i=0; i<n; i++) cin >> d[i];
	sort(d.begin(),d.end());
	
	int border = n/2;
	int ans = d[border] - d[border-1];
	cout << ans << endl;
	return 0;
}

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

int main() {
  string s;
  cin >> s;
  s[5] = ' ';
  s[13] = ' ';
  cout << s << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define INF 10000000000000009
//#define INF 9223372036854775807
typedef long long ll;
#define REP(i,n) for(int i=0;i<(n);++i)
#define OREP(i,n) for(int i=1;i<=(n);++i)
#define ORREP(i,n) for(int i=(n);i>=1;--i)
#define ZREP(i,n) for(int i=1;i<(n);++i)
#define RREP(i,n) for(int i=(n)-1;i>=0;--i)
#define rollcall cout<<"I'm Sucu."<<endl;
#define YES(s) s?cout << "YES" << endl:cout << "NO" << endl
#define Yes(s) s?cout << "Yes" << endl:cout << "No" << endl
#define Taka(s) s?cout << "Takahashi" << endl:cout << "Aoki" << endl
#define out(s,t,u) s?cout << t << endl:cout << u << endl
#define int ll
#define Endl endl

int Roundup(int a,int b){
    return (a+b-1)/b;
}

signed main(){
    int N;
    int A[5];
    cin >> N;
    REP(i,5){cin >> A[i];}
    int mn=INF;
    REP(i,5){mn=min(mn,A[i]);}
    int Ans=4;
    Ans+=Roundup(N,mn);
    cout << Ans << endl;
    
    return 0;
}


Measured memory_bytes: 256
import java.math.BigInteger;
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		for(int i = 0; i < N; i++){
			String a = sc.next();
			String b = sc.next();
			BigInteger aa = new BigInteger(a);
			BigInteger bb = new BigInteger(b);
			if(a.length() > 80 || b.length() > 80 || String.valueOf(aa.add(bb)).length() > 80)
				System.out.println("overflow");
			else
				System.out.println(aa.add(bb));
		}
		}
}

Measured memory_bytes: 18032
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int n;
void Solve(){
    cin>>n;
    if(n==1) cout<<"Hello World"<<endl;
    else if(n==2){
        int a,b;
        cin>>a>>b;
        cout<<a+b<<endl;
    }
}
int main(){
    Solve();
    return 0;
}

Measured memory_bytes: 256
from collections import defaultdict
s=input()
n=len(s)
N=defaultdict(int)
x=0
for i in reversed(range(n)):
    x+=int(s[i])*pow(10,(n-i-1),2019)
    x%=2019
    N[x]+=1
ans=N[0]
for j in N.values():
    ans+=j*(j-1)//2
print(ans)

Measured memory_bytes: 69252
# https://atcoder.jp/contests/abc157/tasks/abc157_e

import sys
input = sys.stdin.readline


class SegmentTree:

    def __init__(self, n, op, e):
        """
        :param n: 要素数
        :param op: 二項演算
        :param e: 単位減
        例) 区間最小値  SegmentTree(n, lambda a, b : a if a < b else b, 10 ** 18)
            区間和     SegmentTree(n, lambda a, b : a + b, 0)
        """
        self.n = n
        self.op = op
        self.e = e
        self.size = 1 << (self.n - 1).bit_length()      # st[self.size + i] = array[i]
        self.tree = [self.e] * (self.size << 1)

    def built(self, array):
        """arrayを初期値とするセグメント木を構築"""
        for i in range(self.n):
            self.tree[self.size + i] = array[i]
        for i in range(self.size - 1, 0, -1):
            self.tree[i] = self.op(self.tree[i << 1], self.tree[(i << 1) + 1])

    def update(self, i, x):
        """i 番目の要素を x に更新"""
        i += self.size
        self.tree[i] = x
        while i > 1:
            i >>= 1
            self.tree[i] = self.op(self.tree[i << 1], self.tree[(i << 1) + 1])

    def get_val(self, l, r):
        """[l, r)の畳み込みの結果を返す"""
        l, r = l + self.size, r + self.size
        res = self.e
        while l < r:
            if l & 1:
                res = self.op(self.tree[l], res)
                l += 1
            if r & 1:
                r -= 1
                res = self.op(self.tree[r], res)
            l, r = l >> 1, r >> 1
        return res


##################################################################################################################

def popcount(x):
    return bin(x).count("1")

N = int(input())
st = SegmentTree(N, lambda a, b: a | b, 0)
S = input().strip()
data = []
for s in S:
    data.append(1 << (ord(s) - ord("a")))
st.built(data)
Q = int(input())
for _ in range(Q):
    q, a, b = input().split()
    if q == "1":
        st.update(int(a)-1, 1 << (ord(b) - ord("a")))
    if q == "2":
        a = int(a) - 1
        b = int(b)
        print(popcount(st.get_val(a, b)))

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

int main() {
    long long int n,m,a,ans=0;cin>>n;
    m=sqrt(n);
    
    for(long long int i=m;m>=1;--i){
        if(n%i==0){
            a=max(i,n/i);
            while(a>0){
                ans+=1;
                a/=10;
            }
            break;
        }
    }
    cout<<ans<<endl;
    
	return 0;
}

Measured memory_bytes: 256
import java.util.Scanner;
public class Main {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
       int[][] arr=new int[3][3];
       
       for(int i=0;i<3;i++){
           for(int j=0;j<3;j++)
               arr[i][j]=sc.nextInt();
           System.out.println();
       }
       
       int n=sc.nextInt();
       for(int k=0;k<n;k++){
           int val=sc.nextInt();
           for(int i=0;i<3;i++){
               for(int j=0;j<3;j++)
                    if(val==arr[i][j])
                        arr[i][j]=0;
            }
       }
       if(arr[0][0]==0 && arr[1][1]==0 && arr[2][2]==0)
           System.out.println("Yes");
       else if(arr[0][2]==0 && arr[1][1]==0 && arr[2][0]==0)
           System.out.println("Yes"); 
       
       else if(arr[0][0]==0 && arr[0][1]==0 && arr[0][2]==0)
           System.out.println("Yes");
       else if(arr[1][0]==0 && arr[1][1]==0 && arr[1][2]==0)
           System.out.println("Yes");
       else if(arr[2][0]==0 && arr[2][1]==0 && arr[2][2]==0)
           System.out.println("Yes");
       
       else if(arr[0][0]==0 && arr[1][0]==0 && arr[2][0]==0)
           System.out.println("Yes");
       else if(arr[0][1]==0 && arr[1][1]==0 && arr[2][1]==0)
           System.out.println("Yes");
       else if(arr[0][2]==0 && arr[1][2]==0 && arr[2][2]==0)
           System.out.println("Yes");
       
       else
           System.out.println("No");
    }
}

Measured memory_bytes: 22868
#include <iostream>
#define REP(i, a, n) for(int i = (a); i < (n); i++)
using namespace std;

int main(void) {
  long N, T;
  long t[200000];

  cin >> N >> T;
  REP(i, 0, N) cin >> t[i];

  long ans = T;
  REP(i, 0, N - 1) ans += min(t[i + 1] - t[i], T);

  cout << ans << endl;

  return 0;
}


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

public class Main {

    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        int n = in.nextInt();
        int[] val = new int[n];
        long total = 0;
        for (int i = 0; i < n; i++) {
            val[i] = in.nextInt();
            total += val[i];
        }
        long[][] dp = new long[n][n];

        for (int gap = 0; gap < n; gap++) {
            for (int i = 0; i < n; i++) {
                if (i + gap >= n) {
                    break;
                }
                if (gap == 0) {
                    dp[i][i + gap] = val[i];
                } else if (gap == 1) {
                    dp[i][i + gap] = Math.max(val[i], val[i + gap]);
                } else {
                    dp[i][i + gap] = Math.max(val[i] + Math.min(dp[i + 2][i + gap], dp[i + 1][i + gap - 1]),
                            val[i + gap] + Math.min(dp[i + 1][i + gap - 1], dp[i][i + gap - 2]));
                }
            }
        }


        long ans = dp[0][n - 1];
        out.println(2 * ans - total);
        out.close();
    }

    private static void dfs(Vertex v, Set<Vertex> visited, Stack<Vertex> st) {
        visited.add(v);
        for (Vertex n : v.adj) {
            if (!visited.contains(n))
                dfs(n, visited, st);
        }
        st.add(v);
    }

    static class Vertex {
        int i;

        public Vertex(int i) {
            this.i = i;
        }

        List<Vertex> adj = new ArrayList<>();
    }

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

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

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

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

        public double nextDouble() {
            return Double.parseDouble(next());
        }

    }
}


Measured memory_bytes: 129748
#include<iostream>
#include<string>
#include<vector>
#include<stdio.h>
#include<algorithm>
#include<math.h>
#include<numeric>
#include<iomanip>
#include<deque>
#include<tuple>
#include<queue>
#include<stack>
#include<map>
#include<cstdint>
#include<unordered_map>
#include<boost/multiprecision/cpp_int.hpp>


#define rep(i, n) for(int i = 0; i < ( int)(n); i++)
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define vi vector<int>
#define vll vector<ll>
#define all(x) (x).begin(),(x).end()
#define F first
#define S second


namespace mp = boost::multiprecision;

using cpp_int = mp::cpp_int;
using ll = long long;
using namespace std;

int main() {
	string s;
	string t = "NWSE";
	vector<int>NWSE(4);
	cin >> s;
	rep(i, s.size()) {
		rep(j, 4) {
			if (s[i] == t[j]) {
				NWSE[j]++;
			}
		}
	}
	bool ans = true;
	rep(i, 2) {
		if ((NWSE[i] > 0 && NWSE[i + 2]==0) 
			or (NWSE[i] == 0 && NWSE[i + 2] > 0) ){
			ans = false;
		}
	}

	if (ans) {
		cout << "Yes" << endl;
	}
	else {
		cout << "No" << endl;
	}
}

Measured memory_bytes: 256
import sys
from collections import deque

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

in_n = lambda: int(readline())
in_nn = lambda: map(int, readline().split())
in_s = lambda: readline().rstrip().decode('utf-8')
in_nl = lambda: list(map(int, readline().split()))
in_nl2 = lambda H: [in_nl() for _ in range(H)]
in_map = lambda: [s == ord('.') for s in readline() if s != ord('\n')]
in_map2 = lambda H: [in_map() for _ in range(H)]
in_all = lambda: map(int, read().split())


def main():

    N = in_n()
    A = in_nl()

    pa, ma = [], []
    for i in range(N):
        if A[i] >= 0:
            pa.append(A[i])
        else:
            ma.append(A[i])

    pa = deque(sorted(pa))
    ma = deque(sorted(ma)[::-1])

    max_value = 0
    ans = []
    while pa or ma:

        if len(pa) >= 1 and len(ma) >= 1:
            if len(pa) == 1 and len(ma) == 1:
                p, m = pa.popleft(), ma.popleft()
                ans.append((p, m))
                max_value = p - m
            elif len(pa) >= 2 and len(ma) >= 1:
                p, m = pa.popleft(), ma[0]
                ans.append((m, p))
                ma[0] -= p
            elif len(pa) >= 1 and len(ma) >= 2:
                p, m = pa[0], ma.popleft()
                ans.append((p, m))
                pa[0] -= m
        elif len(pa) >= 2:
            if len(pa) == 2:
                p1, p2 = pa.popleft(), pa.popleft()
                p1, p2 = max(p1, p2), min(p1, p2)
                ans.append((p1, p2))
                max_value = p1 - p2
            else:
                p1, p2 = pa.popleft(), pa.popleft()
                ans.append((p1, p2))
                if (tp := p1 - p2) >= 0:
                    pa.appendleft(tp)
                else:
                    ma.append(tp)
        elif len(ma) >= 2:
            if len(ma) == 2:
                m1, m2 = ma.popleft(), ma.popleft()
                m1, m2 = max(m1, m2), min(m1, m2)
                ans.append((m1, m2))
                max_value = m1 - m2
            else:
                m1, m2 = ma.popleft(), ma.popleft()
                ans.append((m1, m2))
                pa.appendleft(m1 - m2)

    print(max_value)
    print('\n'.join(map(lambda a: '{} {}'.format(a[0], a[1]), ans)))


if __name__ == '__main__':
    main()


Measured memory_bytes: 34500
#include <bits/stdc++.h>
#define rep(i,n) for ((i)=1;(i)<=(n);(i)++)
#define foreach(c,itr) for (__typeof((c).begin()) itr=(c).begin();itr!=(c).end();++itr)
using namespace std;
const int mod=1e9+7;
int n,i,j,f[100005],inv[100005],ans;
int main(){
	cin>>n;
	inv[1]=f[1]=1;
	for(i=2;i<=n;i++){
		inv[i]=1ll*(mod-mod/i)*inv[mod%i]%mod;
		f[i]=(f[i-1]+inv[i])%mod;
	}
	rep(i,n){
		int x;
		cin>>x;
		ans=(ans+1ll*x*(f[i]+f[n-i+1]-1))%mod;
	}
	rep(i,n){
		ans=1ll*ans*i%mod;
	}
	cout<<ans<<endl;
	return 0;
}

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

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

typedef long long ll;

int main()
{
    ll a,b,v,w,t;
    cin>> a >> v >> b >> w >> t;
    if(a>b) swap(a,b);
    if(a+t*v>=b+t*w) cout<< "YES" <<endl;
    else cout<< "NO" <<endl;
    return 0;
}

Measured memory_bytes: 3648
// In the name of Allah
    // There is no power but from God the Almighty
   // No God except Allah
   #include <bits/stdc++.h>
   #define mp make_pair
   #define f1 first
   #define f2 second
   #define pb push_back
   #define pii pair<int ,int>
   #define ios  ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
   using namespace std;
   const int mox=1e5+9;
   vector<int> v[mox];
   bool ok[mox];
   bool ans;
   void dfs(int x ,int dad=-1)
   {
       for(int i:v[x])
       {
          if(i!=dad)
          {
            dfs(i,x);
          }
       }
       if(!ok[x])
       {
         if(dad==-1)
         {
            ans=1;
         }
         else if(!ok[dad])
         {
           ok[dad]=1;
           ok[x]=1;
         }
         else
         {
           ans=1;
         }
       }
   }
   main()
   {
    int n;
    cin>>n;
    for(int i=0 ; i<n-1 ; i++)
     {
       int a,b;
       cin>>a>>b;
       v[a].pb(b);
       v[b].pb(a);
     }
     dfs(1);
     if(ans)
     {
       cout<<"First";
     }
     else
     {
       cout<<"Second";
     }
   }


Measured memory_bytes: 9316
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define call(var) cout<<#var<<"="<<var<<endl;
#define dup(x,y) (((x)+(y)-1)/(y))
using ll=long long;
using vi = vector<int>;
using vl = vector<ll>;
using vb = vector<bool>;
using Graph = vector<vi>;
using P = pair<int,int>;
const int MOD=(int)1e9+7;
const int INF=(int)1e9;
const ll LINF=(ll)1e18;
const int INTMAX = 2147483647;
template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;}
template<class t,class u> void chmin(t&a,u b){if(b<a)a=b;}

struct UnionFind {
    vector<int> d;
    UnionFind(int n): d(n,-1) {}
    int root(int x) {
        if (d[x] < 0) return x;
        return d[x] = root(d[x]);
    }
    bool unite(int x, int y) {
        x = root(x); y = root(y);
        if (x == y) return false;
        if (d[x] > d[y]) swap(x,y);
        d[x] += d[y];
        d[y] = x;
        return true;
    }
    bool same(int x, int y) { return root(x) == root(y);}
    int size(int x) { return -d[root(x)];}
};

int main(){
    int n,m;cin >> n >> m;
    vi p(n);
    rep(i,n) cin >> p[i];

    UnionFind uf(n);
    rep(i,m){
        int a,b;cin >> a >> b;
        --a;--b;
        uf.unite(a,b);
    }

    int ans = 0;
    rep(i,n){
        if(uf.same(i,p[i]-1)) ++ans;
    }
    cout << ans << endl;
}

Measured memory_bytes: 1024
package main

import (
    "fmt"
    "os"
    "bufio"
    "strconv"
    "strings"
)

func ScanSplitIntLine(size int) []int {
    scanner := bufio.NewScanner(os.Stdin)
    scanner.Split(bufio.ScanWords)
    line := make([]int, 0, size)
    for i := 0; i < size; i++ {
        scanner.Scan()
        stringInput := scanner.Text()
        intInput, err := strconv.Atoi(stringInput)
        if err != nil {
            fmt.Println(err)
        }
        line = append(line, intInput)
    }
    return line
}

func main() {
    defs := ScanSplitIntLine(4)
    // 少ないのを常に1とする
    column := defs[0]
    line := defs[1]
    w1Num := defs[2]
    h1Num := defs[3]
    
    upper := strings.Repeat("0", line - w1Num)
    upper += strings.Repeat("1", w1Num) + "\n"
    bottom := strings.Repeat("1", line - w1Num)
    bottom += strings.Repeat("0", w1Num) + "\n"
    answer := strings.Repeat(upper, h1Num)
    answer += strings.Repeat(bottom, column-h1Num)
    fmt.Println(strings.TrimSpace(answer))
}


Measured memory_bytes: 5632
import java.io.*; 
import java.util.*; 
  
 class Main 
{ 
    public static void main(String args[]) 
    { 
      //  try{
        Scanner sc=new Scanner(System.in);
        String s=sc.next();
        String t=sc.next();
        int c=0;
        for(int i=0;i<s.length();i++)
        {
            if(s.charAt(i)!=t.charAt(i))
            c++;
        }
        System.out.println(c);
      //  }catch(Exception e)
      //  {
      //      return;
     //   }
    } 
} 

Measured memory_bytes: 41128
#include <bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) for (int i = (int)(n-1); i >= 0; i--)
#define sz(x) int(x.size())
#define bitsz(x) int(__builtin_popcount(x))
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb(x) push_back(x)
#define INF 1e9
#define LINF 1e18
#define mod 1000000007
template<class T> inline bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T &a, const T &b) { if (a > b) { a = b; return 1; } return 0; }
template < typename T > inline string toString( const T &a ) { ostringstream oss; oss << a; return oss.str(); };
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> LP;
const int di[4] = {1,0,-1,0};
const int dj[4] = {0,1,0,-1};


int main() {
    int n; cin >> n;
    vector<ll> l(n);
    rep(i,n) cin >> l[i];
    int ans = 0;
    rep(i,n) {
        for (int j=i+1; j<n; j++) {
            for (int k=j+1; k<n; k++) {
                if (l[i]==l[j] || l[j]==l[k] || l[k]==l[i]) continue;
                if (l[i]+l[j]>l[k] && l[j]+l[k]>l[i] && l[k]+l[i]>l[j]) ans++;
            }
        }
    }
    cout << ans << endl;
}

Measured memory_bytes: 3612
from sys import stdin
A, B = [int(_) for _ in stdin.readline().rstrip().split()]
ans = 10**9+1
if A <= B:
  ans = min(ans, B-A)
if -A <= B:
  ans = min(ans, B+A+1)
if A <= -B:
  ans = min(ans, -B-A+1)
if -A <= -B:
  ans = min(ans, -B+A+2)
print(ans)

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

int main() {
    double n;
    cin >> n;
    vector<double> h(n);
    rep(i, n) cin >> h[i];
    int ans = 0;
    rep(i, n) {
        int j = i;
        int cnt = 0;
        while(h[j] >= h[j + 1] and j < n - 1) {
            cnt++;
            j++;
            i = j;
        }
        ans = max(ans, cnt);
        cnt = 0;
    }
    cout << fixed << setprecision(5) << ans << endl;
    return 0;
}


Measured memory_bytes: 4092
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define fi first
#define se second
#define dbg(x) cout<<#x" = "<<((x))<<endl
template<class T,class U> ostream& operator<<(ostream& o, const pair<T,U> &p){o<<"("<<p.fi<<","<<p.se<<")";return o;}
template<class T> ostream& operator<<(ostream& o, const vector<T> &v){o<<"[";for(T t:v){o<<t<<",";}o<<"]";return o;}

int main(){
    int n,q;
    scanf(" %d %d", &n, &q);

    vector<int> u;
    unordered_map<int,vector<int>> IN,OUT;
    rep(i,n){
        int s,t,x;
        scanf(" %d %d %d", &s, &t, &x);
        IN[s-x].pb(x);
        OUT[t-x].pb(x);

        // printf(" [%d %d)\n", s-x,t-x);
        u.pb(s-x);
        u.pb(t-x);
    }

    set<int> ASK;
    rep(i,q){
        int d;
        scanf(" %d", &d);
        ASK.insert(d);
        u.pb(d);
    }

    sort(all(u));
    u.erase(unique(all(u)), u.end());

    set<int> X;
    for(int i:u){
        for(int j:OUT[i]) X.erase(j);
        for(int j:IN[i]) X.insert(j);

        if(ASK.count(i)){
            int ans = -1;
            if(!X.empty()) ans = *X.begin();
            printf("%d\n", ans);
        }
    }
    return 0;
}


Measured memory_bytes: 99312
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

n,m = mi()

def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n
    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]
    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
        for k in range(p-1,r,p):
                    numerator[k - offset] /= pivot
                    denominator[k] /= pivot
    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])
    return result

a = 0
if n >= 2:
    a = cmb(n,2)

b = 0
if m >= 2:
    b = cmb(m,2)

print(a+b)

Measured memory_bytes: 3064
#include <iostream>

using namespace std;

int main(){
    int n,a;
    int max,min;
    long sum=0;
    cin >> n;
    for(int i=0;i<n;++i){
        cin >> a;
        if(i==0){
            max = min = a;
        }
        if(max<a){
            max = a;
        }
        if(min>a){
            min = a;
        }
        sum += a;
    }
    cout << min << " " << max << " " << sum << endl;
    return 0;
}


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

#define ms(s, n) memset(s, n, sizeof(s))
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FORd(i, a, b) for (int i = (a) ; i >= (b); i--)
#define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++)
#define sz(a) int((a).size())
#define present(t, x) (t.find(x) != t.end())
#define all(a) (a).begin(), (a).end()
#define uni(a) (a).erase(unique(all(a)), (a).end())
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define sp system("pause")
#define prec(n) fixed<<setprecision(n)
#define bit(n, i) (((n) >> (i)) & 1)
#define bitcount(n) __builtin_popcountll(n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vii;
const int MOD = (int) 1e9 + 7;
const int INF = (int) 1e9;
const ll LINF = (ll) 1e18;
const ld PI = acos((ld) -1);
const ld EPS = 1e-9;
const int N = (int) 1e5 + 10;
void TimeExecution() {
    cout << "\n\n===>> Time Execution: " << clock() / (double)1000 << " sec(s).";
}
int t;
int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    /*
    #ifndef ONLINE_JUDGE
        freopen("in.txt", "r", stdin);
        freopen("out.txt", "w", stdout);
    #endif
4 1
....
....
.#..
....
#
    */
    int n, m;
    cin >> n >> m;
    string a[n + 1], b[m + 1];
    FOR(i, 1, n) cin >> a[i];
    FOR(i, 1, m) cin >> b[i];
    bool ok;
    FOR(i, 1, n - m + 1)
        FOR(j, 1, n - m + 1)
        {
            ok = 1;
            FOR(k, 1, m)
                FOR(l, 0, m - 1)
                {
                    if(b[k][l] != a[i + k - 1][j + l - 1])
                    {
                        ok = 0;
                        break;
                    }
                   // if(i + k - 1 == 3 && j + l == 1) cout <<1212 << " " << a[i + k - 1][j + l] << " " << b[k][l] << (a[i + k - 1][j + l] == b[k][l]) << " " << ok << endl;
                }
            if(ok)
            {
               // cout << i << " " << j << endl;
                cout << "Yes";
                return 0;
            }
        }
    cout << "No";
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int kakuketanoha(int a){
int sum;
while(a > 0){
sum += a % 10;
a /= 10;
}
return sum;
}
int main(){
  int N;
  cin >> N;
  int S;
  S = kakuketanoha(N);
  if(N % S == 0){
    cout << "Yes";
  }else{
    cout << "No";
  }
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define all(c) begin(c), end(c)
#define dump(x) cerr << __LINE__ << ":\t" #x " = " << (x) << endl

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


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using lint = long long;
const lint mod = 1e9 + 7;
#define all(x) (x).begin(), (x).end()
#define bitcount(n) __builtin_popcountl((lint)(n))
#define fcout cout << fixed << setprecision(15)
#define highest(x) (63 - __builtin_clzl(x))
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T = string, class U = char>int character_count(T text, U character){ int ans = 0; for(U i: text){ ans += (i == character); } return ans; }
lint power(lint base, lint exponent, lint module){ if(exponent % 2){ return power(base, exponent - 1, module) * base % module; }else if(exponent){ lint root_ans = power(base, exponent / 2, module); return root_ans * root_ans % module; }else{ return 1; }}
struct position{ int y, x; }; position mv[4] = {{0, -1}, {1, 0}, {0, 1}, {-1, 0}}; // double euclidean(position first, position second){ return sqrt((second.x - first.x) * (second.x - first.x) + (second.y - first.y) * (second.y - first.y)); }
template<class T, class U> string to_string(pair<T, U> x){ return to_string(x.first) + "," + to_string(x.second); } string to_string(string x){ return x; }
template<class itr> void array_output(itr start, itr goal){ string ans; for(auto i = start; i != goal; i++) ans += to_string(*i) + " "; if(!ans.empty()) ans.pop_back(); cout << ans << endl; }
template<class itr> void cins(itr first, itr last){ for(auto i = first; i != last; i++){ cin >> (*i); } }
template<class T> T gcd(T a, T b){ if(a && b){ return gcd(min(a, b), max(a, b) % min(a, b)); }else{ return a; }} template<class T> T lcm(T a, T b){ return a / gcd(a, b) * b; }
struct combination{ vector<lint> fact, inv; combination(int sz) : fact(sz + 1), inv(sz + 1){ fact[0] = 1; for(int i = 1; i <= sz; i++){ fact[i] = fact[i - 1] * i % mod; } inv[sz] = power(fact[sz], mod - 2, mod); for(int i = sz - 1; i >= 0; i--){ inv[i] = inv[i + 1] * (i + 1) % mod; } } lint C(int p, int q) const{ if(q < 0 || p < q) return 0; return (fact[p] * inv[q] % mod * inv[p - q] % mod); } };
template<class itr> bool next_sequence(itr first, itr last, int max_bound){ itr now = last; while(now != first){ now--; (*now)++; if((*now) == max_bound){ (*now) = 0; }else{ return true; } } return false; }

int main(){
    int N;
    cin >> N;
    cout << (N + 1) / 2 << endl;
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        if (a < b) {
            System.out.println("a < b");
        } else if (a == b) {
            System.out.println("a == b");
        } else {
            System.out.println("a > b");
        }
    }
}



Measured memory_bytes: 26116