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

#define lli long long int
#define REP(i,s,n) for(int i=s;i<n;i++)
#define NUM 2520
#define INF (1LL<<50)
#define DEBUG 0
#define mp(a,b) make_pair(a,b)
#define SORT(V) sort(V.begin(),V.end())
#define PI (3.141592653589794)
#define TO_STRING(VariableName) # VariableName
#define LOG(x) if(DEBUG)cout<<TO_STRING(x)<<"="<<x<<" "<<endl;
#define LOG2(x,y) if(DEBUG)cout<<TO_STRING(x)<<"="<<x<<" "<<TO_STRING(y)<<"="<<y<<endl;
#define LOG3(x,y,z) if(DEBUG)cout<<TO_STRING(x)<<"="<<x<<" "<<TO_STRING(y)<<"="<<y<<" "<<TO_STRING(z)<<"="<<z<<endl;
#define LOG4(w,x,y,z) if(DEBUG)cout<<TO_STRING(w)<<"="<<w<<" "<<TO_STRING(x)<<"="<<x<<" "<<TO_STRING(y)<<"="<<y<<" "<<TO_STRING(z)<<"="<<z<<endl;

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

lli f[110][10];
lli p[110][12];


int main(){

    lli N;
    cin>>N;
    REP(i,0,N){
        REP(j,0,10)cin>>f[i][j];
    }

    REP(i,0,N)REP(j,0,11)cin>>p[i][j];

    lli rtn = -INF;
    for(lli b=1;b<(1LL<<10);b++){
        lli ans = 0;

        REP(i,0,N){
            lli cnt = 0;
            REP(j,0,10){
                if(!(b&(1LL<<j)))continue;
                if(f[i][j]==0)continue;
                cnt++;
            }
            ans += p[i][cnt];
        }
        chmax(rtn,ans);
    }

    cout<<rtn<<endl;


    return 0;
}


Measured memory_bytes: 256
#include <iostream>

unsigned int A, B, C, X, Y;

int main() {
    std::cin >> A >> B >> C >> X >> Y;
    unsigned int price;

    unsigned int C2 = 2 * C;

    if (A + B > C2) {
        if (X > Y) {
            price = C2 * Y + std::min(A, C2) * (X - Y);
        } else {
            price = C2 * X + std::min(B, C2) * (Y - X);
        }
    } else {
        price = A * X + B * Y;
    }

    std::cout << price << std::endl;

    return 0;
}


Measured memory_bytes: 256
#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <cmath>
 
template<typename T>
inline std::string toStr(T&& t) {
    std::stringstream ss;
     
    ss << t;
     
    return ss.str();
}
 
bool isLoop(int i) {
    auto str1 = toStr(i);
    auto str2 = str1;
     
    std::reverse(str1.begin(), str1.end());
     
    return str1 == str2;
}
 
constexpr int max = 10 * 10 * 10 * 10;
int main() {
    int x, ans = 0;
     
    std::cin >> x;  
 
    for(int i = 0; i <= max; ++i) {
        if(isLoop(i) && std::abs(x - ans) > std::abs(x - i)) {
            ans = i;
        }
    }
     
    std::cout << ans << std::endl;
}

Measured memory_bytes: 3208
#include <iostream>
#include <algorithm>
#include <cstring>

#define REP(i, a, b) for ( int i = (a); i < (b); i++ )
#define REVREP(i, a, b) for ( int i = (a); i >= (b); i--)
#define DEBUG_INT(var) printf("the value of "#var" is %d\n", var)
#define PRINT_ARRAY(name, i) printf("the value of "#name"[%d] is %d\n", (i), name[(i)])
#define DEBUG_ARRAY(name, begin, end) REP(i, begin, end) PRINT_ARRAY(name, i)

#define YES puts("YES")
#define NO  puts("NO")
#define Yes puts("Yes")
#define No  puts("No")

using namespace std;

typedef long long ll;

int ans, N;
int d[52];

int main(void) {
    scanf("%d", &N);
    REP(i, 0, N) scanf("%d", &d[i]);

    REP(i, 0, N-1) {
    	REP(j, i+1, N) {
    		ans += d[i] * d[j];

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

	return 0;
}


Measured memory_bytes: 256
# include <bits/stdc++.h>
# define speed ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
// # pragma GCC optimize "-O3"
# define int long long
using namespace std;
  
const int N = 2 * 1e6 + 7;
const int mod = 1e9 + 7;

void solve() {
	int n;
	cin >> n;
	int x = n % 10;
	if ( x == 3 ) {
		cout << "bon";
	}
	else if ( x == 0 || x == 1 || x == 6 || x == 8 ) {
		cout << "pon";
	}
	else {
		cout << "hon";
	}
}

int32_t main() {
    speed;
    int T = 1;
    // cin >> T;
    while ( T-- ) {
    	solve();
    }
}


Measured memory_bytes: 3652
#include<bits/stdc++.h>
using namespace std;
int main(){
    ios::sync_with_stdio(false);
    cin.tie();
    string s;
    cin>>s;
    int nq;
    cin>>nq;
    int reverses = 0;
    deque<char> q;
    for(int i = 0; i < s.size(); i++)
    q.push_back(s[i]);
    while (nq--)
    {
        int t;
        cin>>t;
        if(t==1){
            reverses++;
        }else{
            int f;
            char c;
            cin>>f>>c;
            if(reverses%2){
                if(f == 1)
                f = 2;
                else
                {
                    f = 1;
                }
            }
            if(f == 1){
                q.push_front(c);
            }else
            {
                q.push_back(c);
            }
        }
    }
    if(reverses%2){
        for(auto it = q.rbegin(); it < q.rend(); it++){
            cout<<*it;
        }
        return 0;
    }else
    {
        for(auto it = q.begin(); it < q.end(); it++){
            cout<<*it;
        }
    }
    
    return 0;
}

Measured memory_bytes: 4056
import java.util.*;

class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int A = sc.nextInt();
        int B = sc.nextInt();
        int C = sc.nextInt();
        int X = sc.nextInt();

        int cnt = 0;
        for (int a = 0; a <= A; a++) {
            for (int b = 0; b <= B; b++) {
                int c = (X - 500*a - 100*b) / 50;
                if (0 <= c && c <= C) cnt++;
            }
        }
        System.out.println(cnt);
    }
}

Measured memory_bytes: 22996
K = int(input())

if(K in [1, 7]):
    print(1)
else:
    now = 7 % K
    a = 10 % K
    for n in range(2, 1000001):
        now = (now * a + 7) % K
        if(now == 0):
            print(n)
            break
    else:
        print(-1)


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

typedef long long ll;
#define REP(i,n) for(int i=0,_n=(int)(n);i<_n;++i)
#define ALL(v) (v).begin(),(v).end()
template<class T1,class T2>ostream& operator<<(ostream& os,const pair<T1,T2>&a){return os<<"("<<a.first<<","<<a.second<< ")";}
template<class T>void pv(T a,T b){for(T i=a;i!=b;++i)cout<<(*i)<<" ";cout<<endl;}
template<class T>void chmin(T&a,const T&b){if(a>b)a=b;}
template<class T>void chmax(T&a,const T&b){if(a<b)a=b;}

int nextInt() { int x; scanf("%d", &x); return x;}

const int SZ = 20000;
bool dp[2][SZ];

bool possible(vector<int> v, int g) {
  memset(dp, 0, sizeof(dp));
  const int O = SZ / 2;
  dp[0][0 + O] = true;
  REP(vi, v.size()) {
    int f = vi % 2;
    const int a = v[vi];
    REP(i, SZ) dp[1-f][i] = 0;
    REP(i, SZ) if (dp[f][i]) {
      dp[1-f][i - a] = true;
      dp[1-f][i + a] = true;
    }
  }
  // pv(ALL(v));
  // cout << g << endl;
  // cout << "result=" << dp[v.size() % 2][g + O] << endl;
  return abs(g) < O && dp[v.size() % 2][g + O];
}

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

  int gx, gy; cin >> gx >> gy;

  // cout << s << endl;
  while (s.size() > 0 && s[0] == 'F') {
    s = s.substr(1);
    gx--;
  }
  vector<int> xs, ys;
  {
    int d = 0;
    int l = -1;
    REP(i, s.size() + 1) {
      if (i == (int)s.size() || s[i] == 'T') {
        int len = i - l - 1;
        if (len != 0) {
          if (d == 0) xs.push_back(len);
          else ys.push_back(len);
        }
        l = i;
        d = 1 - d;
      }
    }
  }
  // cout << s << endl;
  // pv(ALL(xs));
  // pv(ALL(ys));

  if (possible(xs, gx) && possible(ys, gy)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }

  // int need = 0;
  // if (abs(y) != 0) { need += 1 + abs(y); }
  // if (x < 0) { need += 2; need += abs(x); }
  // if (x > 0) { need += abs(x); }

  // if (need > s) cout << "No" << endl;
  // else cout << "Yes" << endl;
  return 0;
}

int main() {
  for (;!cin.eof();cin>>ws) main2();
  return 0;
}



Measured memory_bytes: 384
#include<stdio.h>
#include<string.h>
int main(){
    char a[11],b[11],c[11];
    int A,B,C;
    scanf("%s%s%s",a,b,c);
    A = strlen(a);
    B = strlen(b);
    if(a[A-1]==b[0]&&b[B-1]==c[0])printf("YES");
    else printf("NO");
}


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

#define INF 1001001001
#define LINF 1001001001001001001
#define MOD 1000000007
#define MOD2 998244353

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

#define rep(i,n) for(int i=0,_i=(n);i<_i;++i)
#define rep1(i,a,b) for(int a_=(a),b_=(b),i=a_;i<b_;++i)
#define repr(i,n) for(int _i=(n),i=_i;i>0;--i)

#define db(x) cerr<<#x<<" = "<<x<<" ";
#define db2(x,y) cerr<<"("<<#x<<", "<<#y<<") = ("<<x<<", "<<y<<") ";
#define db3(x,y,z) cerr<<"("<<#x<<", "<<#y<<", "<<#z<<") = ("<<x<<", "<<y<<", "<<z<<") ";
#define ln cout<<endl;

#define all(a)  (a).begin(),(a).end()
#define dig(n)  to_string(n).length()

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define se second
#define fi first

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

ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return (a*b)/gcd(a,b);}

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

int main(){
    bool flag=true;
    ll ans=0,sum=0;

    string s;
    cin >>s;
    map<char,int>m;

    rep(i,s.length()){
        if(m[s[i]]==1){
            flag=false;
            break;
        }else{
            m[s[i]]=1;
        }
    }



    //cout <<fixed<<setprecision(16)<< << endl;
    //cout<<ans<<endl;
    if(flag)cout << "yes" <<endl;
    else cout << "no" <<endl;
    
    return 0;
}


Measured memory_bytes: 256
using System;
//using System.Linq;
//using System.Collections.Generic;

class Test
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());

        int[] R = new int[n];

        for (int i = 0; i < n; i++)
        {
            R[i] = int.Parse(Console.ReadLine());
        }

        int[] D = new int[n - 1];

        int sum = 0;
        int max = -999999999;
        for (int i = 0; i < n - 1; i++)
        {
            D[i] = R[i + 1] - R[i];
            sum += D[i];
            max = Math.Max(max, sum);
            if (sum < 0) sum = 0;
        }

        Console.WriteLine(max);
    }
}


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

//g++ -g -o yourexe yourfile.cpp
//./yourexe < yourinput.in > youroutput.out

#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

#define M 201

#define ll long long
#define ld long double
#define vi vector<string>
#define pi pair<ll, ll>
#define vii vector<pi>
#define vvi vector<vi>
#define pb push_back
#define endl "\n"

#define REP(i, s, e) for (ll i = s; i < e; i++)
#define RREP(i, s, e) for (ll i = s; i > e; i--)

#define all(v) v.begin(), v.end()
#define print(v) for (auto i: v) cerr << i << " ";

int main() {
    fast
    ll t;
    t=1;
    while(t--){
      ll n;
      cin>>n;
      ll d=n%10;
      if(d==3)cout<<"bon"<<endl;
      else if(d==0 || d==1 || d==6 || d==8)cout<<"pon"<<endl;
      else cout<<"hon"<<endl;
    }
    return 0;
}


Measured memory_bytes: 3640
n, k = gets.chomp.split(' ').map(&:to_i)
c = Hash.new(0)
n.times do
  a, b = gets.chomp.split(' ').map(&:to_i)
  c[a] += b
end
c.keys.sort.each do |a|
  if (k > c[a])
    k -= c[a]
  else
    puts a
    break
  end
end

Measured memory_bytes: 7304
fun main(args: Array<String>) {
    val s = readLine() ?: ""
    val t = readLine() ?: ""
    val l = s.length

    val res = IntRange(0, l - 1).any {
        i -> IntRange(0, l - 1).all { j -> s[j] == t[(j + i) % l] }
    }

    println(if (res) "Yes" else "No")
}

Measured memory_bytes: 31872
/*
 * B.cpp
 *
 *  Created on: 2020/06/14
 *      Author: admin
 */


#include <iostream>


using namespace std;


int main(){
	int X,Y;
	cin >> X >> Y;

	bool Flag = false;
	for(int i = 0; i<=X; i++){
		if(Y == 2*i + 4*(X-i)){
			Flag = true;
			cout << "Yes";
		}
	}

	if(not Flag){
		cout << "No";
	}
}


Measured memory_bytes: 3636
def inpl(): return [int(i) for i in input().split()]

A, B = inpl()

def nextin(nwin):
    nx, ny = nwin
    if nx != 98:
        return(nx+2, ny)
    else:
        return(0,ny+2)

Wh = [['#' for _ in range(100)] for _ in range(50)]
nowin = [0,0]
for _ in range(A-1):
    ix, iy = nowin
    Wh[iy][ix] = '.'
    nowin = nextin(nowin)

Bl = [['.' for _ in range(100)] for _ in range(50)]
nowin = [0,1]
for _ in range(B-1):
    ix, iy = nowin
    Bl[iy][ix] = '#'
    nowin = nextin(nowin)
print('100','100')
for i in range(50):
    print(''.join(Wh[i]))

for j in range(50):
    print(''.join(Bl[j]))
    

Measured memory_bytes: 3188
{-# LANGUAGE BangPatterns #-}
import           Control.Exception           (assert)
import           Control.Monad
import           Control.Monad.Primitive
import qualified Control.Monad.ST            as ST
import qualified Data.Array.IO               as IO
import qualified Data.Array.ST               as ST
import qualified Data.Array.Unboxed          as A
import           Data.Bits
import qualified Data.ByteString.Char8       as BS
import           Data.Char
import           Data.Foldable
import           Data.List
import qualified Data.Map.Strict             as Map
import           Data.Maybe
import qualified Data.Sequence               as Seq
import qualified Data.Set                    as Set
import qualified Data.Vector                 as VB
import qualified Data.Vector.Mutable         as VBM
import qualified Data.Vector.Unboxed         as V
import qualified Data.Vector.Unboxed.Mutable as VM
import           Debug.Trace

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine
getIntVec n = V.unfoldrN n (BS.readInt . BS.dropWhile isSpace) <$> BS.getLine

readInteger = fst . fromJust . BS.readInteger
readIntegerList = map readInteger . BS.words
getInteger = readInteger <$> BS.getLine
getIntegerList = readIntegerList <$> BS.getLine

inf :: Int
inf = 10^18

main = do
  [k, s] <- getIntList

  let solve x y res
        | x > k = res
        | y > k = solve (x+1) 0 res
        | otherwise = let res' = if x + y <= s && s - (x + y) <= k
                                 then res + 1
                                 else res
                      in solve x (y+1) res'

  print $ solve 0 0 0

Measured memory_bytes: 4744
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define sint(a) scanf("%d",&a)
#define sint2(a,b) scanf("%d %d",&a,&b)
#define sll(a) scanf("%lld",&a)
#define sll2(a,b) scanf("%lld %lld",&a,&b)
#define mem(a,i) memset(a,i,sizeof(a))

typedef struct xx
{
    int bh,t;
};
xx a[1000005];
bool cmp(xx a,xx b)
{
    return a.t<b.t;
}
int main()
{
    int n;
    sint(n);
    for(int i=1;i<=n;i++)
    {
        sint(a[i].t);
        a[i].bh=i;
    }
    sort(a+1,a+n+1,cmp);
    for(int i=1;i<=n;i++)
        printf("%d ",a[i].bh);
    return 0;
}


Measured memory_bytes: 1536
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<queue>
#include<cmath>
#include<cstdio>
#include<tuple>
#include<bitset>
#include<map>

using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<=n;++i)
#define ALL(x) x.begin(),x.end()
using ll = long long;
using lint = long long;
typedef pair<int,int> P;
const lint inf=1e18+7;
const int MOD=1000000007;
struct Node{
  int row_no,col_no;
  int indegree;
  int dist;
  vector<Node*> child;
  vector<Node*> par;
  void build(int i,int j){
      row_no=i;col_no=j;indegree=0;
      dist=-1;
  }
};
vector<pair<int,int>> toposo(vector<vector<Node>> const& node,int n){
    vector<P> res;
    queue<Node> que;
    rep1(i,n){
        rep1(j,n){
            if(node[i][j].indegree==0){
                que.push(node[i][j]);
            }
        }
    }
    while(!que.empty()){
        Node buf=que.front();que.pop();
        int num=buf.child.size();
        res.push_back({buf.col_no,buf.row_no});
        rep(i,num){
            buf.child[i]->indegree-=1;
            if(buf.child[i]->indegree==0){
                que.push(*buf.child[i]);
            }
        }
    }
    return res;
}
void dfs(Node& node){
    if(node.dist!=-1){
        return;
    }
    int num=node.par.size();
    int res=0;
    rep(i,num){
        dfs(*node.par[i]);
        res=max(res,node.par[i]->dist+1);
    }
    node.dist=res;
}
signed main(){
    int n;cin>>n;
    vector<vector<Node>> node(n+1,vector<Node>(n+1));
    rep1(i,n){
        rep1(j,n)node[i][j].build(i,j);
    }
    rep1(i,n){
        int last=0;
        rep(j,n-1){
            int a;cin>>a;
            if(last==0){
                last=a;
                continue;
            }
            int mx=max(i,a);
            int mn=min(i,a);
            node[mx][mn].par.push_back(&node[max(last,i)][min(last,i)]);
            node[mx][mn].indegree+=1;
            node[max(last,i)][min(last,i)].child.push_back(&node[mx][mn]);
            last=a;
        }
    }
    if(toposo(node,n).size()<n*n){
        cout<<-1<<"\n";
        return 0;
    }
    int res=0;
    rep1(i,n){
        rep1(j,n){
            if(j>=i)break;
            if(node[i][j].child.size()==0){
                dfs(node[i][j]);
                res=max(res,node[i][j].dist);
                //printf("i,j=%lld,%lld, res=%lld\n",i,j,res);
            }
        }
    }
    cout<<res+1<<"\n";
    return 0;
}


Measured memory_bytes: 167808
s = input()
n = len(s)
for i in range(n-1):
  if s[i] == s[i+1]:
    print(i+1,i+2)
    quit()
for i in range(n-2):
  if s[i] == s[i+2]:
    print(i+1,i+3)
    quit()
print(-1,-1)
    

Measured memory_bytes: 3188
#include <iostream>
#include <numeric>
#include <vector>
#include <algorithm>
#include <cmath>

using namespace std;
int main(int argc, char const *argv[]) {
  int N;
  cin >> N;
  long int T[1000], A[1000];
  for (size_t i = 0; i < N; i++) {
    cin >> T[i] >> A[i];
  }
  long int a = 1;
  for (size_t i = 1; i < N; i++) {
    a = (long int) max(ceil(T[i-1]*a / (long double) T[i]), ceil(A[i-1]*a / (long double) A[i]));
  }
  cout << (T[N-1] + A[N-1]) * a << endl;
  return 0;
}


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

#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define endl "\n"

using namespace std;
using ll = long long;

const ll MOD = 1000000007LL; // = 10^9 + 7
const double PI = 3.14159265358979;

void solve()
{
  int n, m;
  cin >> n >> m;
  if (n >= m)
  {
    cout << 0;
    return;
  }

  vector<ll> x(m);
  for(int i = 0; i < m; ++i)
  {
    cin >> x[i];
  }

  sort(x.begin(), x.end());
  vector<ll> diff(m - 1);
  for(int i = 0; i < m - 1; ++i)
  {
    diff[i] = x[i + 1] - x[i];
  }
  sort(diff.begin(), diff.end());
  cout << accumulate(diff.begin(), next(diff.begin(), m - n), 0);

}

int main()
{
  fastio;
  solve();

  return 0;
}

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

#define rep(i, a, b) for(int i = (a); i < (b); ++i)
#define per(i, a, b) for(int i = (b)-1; i >= (a); --i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fst first
#define snd second

template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<pii> vii;

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

ll solve(ll n) {
  ll ans = 0;
  for (ll x = 1; x*x <= n; ++x) {
    for (ll y = 1; y*y + x*x + x*y <= n; ++y) {
      for (ll z = 1; z*z + x*x + y*y + x*y + y*z + x*z <= n; ++z) {
        if (z*z+x*x+y*y+x*y+y*z+x*z == n) ++ans;
      }
    }
  }
  return ans;
}

int main() {
  cin.tie(0)->sync_with_stdio(0);
  cin.exceptions(cin.failbit);

  ll n;
  cin >> n;

  rep(i,1,n+1) cout << solve(i) << '\n';
}

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

using namespace std;

int main(void) {
    long n;
    cin >> n;
    
    constexpr double eps = 1e-11;
    using P = complex<double>;

    vector<P> xy(n);
    for(auto &t: xy) {
        double r, i;
        cin >> r >> i;
        t.real(r);
        t.imag(i);
    }

    double r = 1e15;

    for(int i=0; i<n; i++)
        for(int j=i+1; j<n; j++)
            for(int k=j+1; k<n; k++) {
                P pa = xy[i], pb = xy[j], pc = xy[k];
                P pu = ((pa - pb)*norm(pc) + (pb - pc)*norm(pa) + (pc - pa)*norm(pb)) / ((pa-pb)*conj(pc) + (pb-pc)*conj(pa) + (pc-pa)*conj(pb));

                double d = max(norm(pa-pu), max(norm(pb-pu), norm(pc-pu)));

                for(int l=0; l<n; l++) {
                    if(norm(xy[l] - pu) > d+eps)
                        goto bad;
                }

                r = min(d, r);
bad:
                continue;
            }

    for(int i=0; i<n; i++)
        for(int j=i+1; j<n; j++) {
            P pa = xy[i], pb = xy[j];
            P pu = (pa+pb)/2.0;

            double d = max(norm(pa-pu), norm(pb-pu));

            for(int l=0; l<n; l++) {
                if(norm(xy[l]-pu) > d+eps)
                    goto bad2;
            }

            r = min(d, r);
bad2:
            continue;
        }

    cout << setprecision(16) << sqrt(r) << endl;

}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main(){
  int N, K;
  cin >> N >> K;
  vector<int> A(N);
  for (int i = 0; i < N; i++){
    cin >> A[i];
  }
  vector<bool> dp(K + 1, false);
  for (int i = 1; i <= K; i++){
    for (int j = 0; j < N; j++){
      if (i - A[j] >= 0){
        if (!dp[i - A[j]]){
          dp[i] = true;
        }
      }
    }
  }
  cout << (dp[K] ? "First" : "Second");
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define INF 1145141919
#define MOD 1000000007
#define ALL(a) begin((a)),end((a))
#define MS(m,v) memset(m,v,sizeof(m))
#define D10  fixed<<setprecision(10)
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> P;
typedef long long ll;
struct edge
{
	int from, to, cost;
	bool operator < (const edge& e) const { return cost < e.cost; }
	bool operator >(const edge& e) const { return cost > e.cost; }
};
typedef vector<edge> edges;
///*************************************************************************************///
///*************************************************************************************///
///*************************************************************************************///

int main()
{
	int n, m;
	while (cin >> n >> m, n)
	{
		int h[1501], w[1501];
		h[0] = w[0] = 0;
		REP(i, n)
		{
			int tmp;
			cin >> tmp;
			h[i + 1] = h[i] + tmp;
		}
		REP(i, m)
		{
			int tmp;
			cin >> tmp;
			w[i + 1] = w[i] + tmp;
		}
		map<int, int> t;
		REP(i, n)for (int j = i + 1; j < n+1;j++)
		{
			int tmp = h[j] - h[i];
			if (t.find(tmp) == t.end()) t[tmp] = 1;
			else t[tmp]++;
		}
		int cnt = 0;
		REP(i, m)for (int j = i + 1; j < m + 1; j++)
		{
			int tmp = w[j] - w[i];
			if (t.find(tmp) != t.end()) cnt += t[tmp];
		}
		cout << cnt << endl;
	}
	return 0;
}

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

int main(){
  int h,w;

  while(1){
    cin>>h>>w;

    if (h==0 && w==0) break;

    for(int i=0;i<h;i++){
      for (int j=0;j<w;j++){
        cout<<"#";
      }
      cout<<endl;
    }
    cout<<endl;
  }
  return 0;
}


Measured memory_bytes: 3092
// -*- mode:c++; coding:utf-8; indent-tabs-mode:nil; -*-
// ALDS1_2-D

#include <algorithm>
#include <iostream>

static void print_ints(const int as[], const unsigned int n,
                       const char* sep = " ") {
  const char* out_sep = "";
  for (unsigned int i = 0; i < n; ++i) {
    std::cout << out_sep << as[i];
    out_sep = sep;
  }
  std::cout << std::endl;
}

static void print_int(const unsigned int n) {
  std::cout << n << std::endl;
}

static unsigned int cnt = 0;

inline
static void insert(int as[], const unsigned int i, const unsigned int d) {
  const int asi = as[i];
  unsigned int j = i;
  while (j >= d && asi < as[j-d]) {
    as[j] = as[j-d];
    j -= d;
    ++cnt;
  }
  as[j] = asi;
}

void insertion_sort(int as[], const unsigned int n, const unsigned int d) {
  for (unsigned int i = d; i < n; ++i) {
    insert(as, i, d);
  }
}

inline
unsigned int next_g(const unsigned int g) { return 3*g + 1; }

unsigned int gen_m(const unsigned int n) {
  unsigned int m = 1;
  for (unsigned int g = 1;;) {
    g = next_g(g);
    if (n < g) break;
    ++m;
  }
  return m;
}

void shell_sort(int as[], const unsigned int n) {
  cnt = 0;

  unsigned int m = gen_m(n);
  int gs[m];
  for (unsigned int g = 1, i = 0; i < m; ++i) {
    gs[m-1-i] = g;
    g = next_g(g);
  }
  print_int(m);
  print_ints(gs, m);

  for(unsigned int i = 0; i < m; ++i) {
    insertion_sort(as, n, gs[i]);
  }
  
  print_int(cnt);
}

int main(void) {
  unsigned int n;
  std::cin >> n;
  int as[n];
  for (unsigned int i = 0; i < n; ++i) {
    std::cin >> as[i];
  }

  shell_sort(as, n);
  print_ints(as, n, "\n");

  return 0;
}
// end

Measured memory_bytes: 5076
#include <bits/stdc++.h>
#define int long long
using namespace std;

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; ++i)
        cin >> a[i];
    sort(a.begin(), a.end());
    long double ans = a[0];
    for (int i = 1; i < n; ++i)
        ans = (ans + a[i]) / (long double)2;
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
import * as fs from "fs";

let S = fs.readFileSync("/dev/stdin", "utf8").trim();

let count: number[] = new Array(S.length).fill(0);

for(let i=1; i<S.length; i++) {
    if (S[i-1] == 'R' && S[i] == 'L') {
        let j = i-1;
        let c = 0;
        while (j >= 0 && S[j] == 'R') {
            if (c%2 == 0) {
                count[i-1] += 1;
            } else {
                count[i] += 1;
            }
            c += 1;
            j -= 1;
        }
        j = i;
        c = 0;
        while (j < S.length && S[j] == 'L') {
            if (c%2 == 0) {
                count[i] += 1;
            } else {
                count[i-1] += 1;
            }
            c += 1
            j += 1;
        }
    }
}

console.log(count.join(' '));


Measured memory_bytes: 37032
#include <bits/stdc++.h>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long ll;
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(v, n) sort(v, v+n)
#define VSORT(v) sort(v.begin(), v.end())
#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 INF 999999999
const double EPS = 1e-10;
const double PI  = acos(-1.0);
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main(){
    
    int r,g,b;
    cin >> r>>g>>b;
    int result = 100*r+10*g+b;
    if(result%4==0){
        cout << "YES" << endl;
    }else{
        cout << "NO" << endl;
    }
    return 0;
}



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

// #undef DEBUG
// #define DEBUG
/// {{{ DEBUG --- ///
template <typename T> ostream &operator<<(ostream &o, const vector<T> &v) { if(&o == &cerr) { o << '{'; for(size_t i = 0; i < v.size(); i++) o << v[i] << (i + 1 != v.size() ? ", " : ""); o << "}"; } else { for(size_t i = 0; i < v.size(); i++) o << v[i] << (i + 1 != v.size() ? " " : ""); } return o; }
#ifdef DEBUG
#define dump(...) (cerr<<"["<<__LINE__<< "] "<<#__VA_ARGS__<<" = "<<make_tuple(__VA_ARGS__)<<"\n")
template<int n, class...T> typename enable_if<(n>=sizeof...(T))>::type _ot(ostream &, tuple<T...> const &){}
template<int n, class...T> typename enable_if<(n< sizeof...(T))>::type _ot(ostream & os, tuple<T...> const & t){ os << (n==0?"":", ") << get<n>(t); _ot<n+1>(os, t); }
template<class...T> ostream & operator<<(ostream &o, tuple<T...> const &t){ o << "("; _ot<0>(o, t); o << ")"; return o; }
#else
#define dump(...) (0)
#endif
/// }}}--- ///

const int N = 3e5 + 10;
ll a[N];

int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  ll k, n; cin >> k >> n;
  a[0] = 1;
  for(int i = 1; i <= n; i++) {
    a[i] = a[i - 1] * k;
    if(a[i] > n) break;
  }
  for(int i = 1; i <= n; i++) if(a[i] != 0) a[i] += a[i - 1];
  vector<int> ans;
  if(k % 2 == 0) {
    ans.emplace_back(k / 2);
    for(int i = 0; i < n - 1; i++) ans.emplace_back(k);
  } else {
    ll bias = 0;
    for(int i = 0; i < n; i++) {
      if(a[n - 1 - i] == 0) {
        ans.emplace_back((k + 1) / 2);
        bias = -i;
      } else {
        int ok = k, ng = i ? -1 : 0;
        while(ok - ng > 1) {
          int mid = (ok + ng) >> 1;
          ll bf = !!i + a[n - 1 - i] * mid;
          ll af = bias + a[n - 1 - i] * (k - mid);
          if(bf >= af) ok = mid;
          else ng = mid;
        }
        dump(ok);
        if(ok == 0) break;
        ans.emplace_back(ok);
        ll bf = !!i + a[n - 1 - i] * ok;
        ll af = bias + a[n - 1 - i] * (k - ok);
        bias = af - (bf - a[n - 1 - i]);
      }
    }
  }
  cout << ans << endl;
}



Measured memory_bytes: 3704
/*#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp>*/
#include <bits/stdc++.h>

using namespace std;
//using namespace __gnu_pbds;
 
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> ordered_set;

#define FOR(i, a, b) for (int i=a; i<b; i++)
#define F0R(i, a) for (int i=0; i<a; i++)
#define FORd(i,a,b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i,a) for (int i = (a)-1; i >= 0; i--)
 
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define lb lower_bound
#define ub upper_bound

const int MOD = 1000000007;
double PI = 4*atan(1);

int N;
vi adj[100001];

int dfs(int p, int node) {
    int win = 0;
    for (int i: adj[node]) if (i != p) win ^= (dfs(node,i)+1);
    return win;
}

int main() {
	cin >> N;
	F0R(i,N-1) {
	    int a,b; cin >> a >> b;
	    adj[a].pb(b);
	    adj[b].pb(a);
	}
	if (dfs(0,1) != 0) cout << "Alice";
	else cout << "Bob";
}

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

public class Main 
{

	public static void main(String[] args) 
	{
		Scanner sc = new Scanner(System.in);
		BigInteger a = new BigInteger(sc.next());
		BigInteger b = new BigInteger(sc.next());
		
		System.out.println(a.modPow(b, new BigInteger("1000000007")));
	}

}



Measured memory_bytes: 26360
#include <bits/stdc++.h>
#define SORT(a) sort(a.begin(), a.end())
#define RSORT(a) sort(a.rbegin(), a.rend())
#define REP(i, n) for (int i = 0; i < n; i++)
#define RREP(i, n) for (int i = n; 0 <= i; i--)
#define FOR(i, start, end) for (int i = start; i < end; i++)
#define RFOR(i, start, end) for (int i = start; end <= i; i--)
#define ALL(a) a.begin(), a.end()
#define MOD(a) a %= 1'000'000'007
#define INF32 1'050'000'000
#define INF64 4'000'000'000'000'000'000
using ll = long long;
using namespace std;
template <class T> inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}

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

    int N;
    cin >> N;
    vector<vector<int>> alp(N, vector<int>(26));
    vector<string> S(N);
    for (auto &&i : S) {
        cin >> i;
    }

    REP(i, N) {
        REP(j, S[i].size()) { alp[i][S[i][j] - 'a']++; }
    }

    vector<int> mn(26, INF32);
    REP(i, 26) {
        REP(j, N) { chmin(mn[i], alp[j][i]); }
    }

    REP(i, 26) {
        char s = 'a' + i;
        if (mn[i] != INF32)
            REP(j, mn[i]) { cout << s; }
    }
    std::cout << '\n';

    return 0;
}

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

int main(){
  int N;
  cin >> N;
  vector<long long> L(N+2);
  L[0]=2;
  L[1]=1;
  for(int i=0;i<N+1;i++){
    if(i<2){
      continue;
    }
    L[i]=L[i-1]+L[i-2];
  }
  cout << L[N] << endl;
}	

Measured memory_bytes: 256
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
static const int MAX = 100000;

int solve(int data[], int n) {
  vector<int> l;
  l.push_back(data[0]);

  for (int i = 1; i < n; i++){
    if (l.back() < data[i]) {
      l.push_back(data[i]);
    } else {
      *lower_bound(l.begin(), l.end(), data[i]) = data[i];
    }
  }

  return l.size();
}

int main() {
  int data[MAX];
  int n;
  cin >> n;
  for (int i = 0; i < n; i++)
    cin >> data[i];

  cout << solve(data, n) << endl;
}

Measured memory_bytes: 3720
#define LOCAL
#define _USE_MATH_DEFINES
#include <array>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include <vector>
#include <queue>
#include <stack>
#include <list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <complex>
#include <cmath>
#include <numeric>
#include <bitset>
#include <functional>
#include <random>
#include <ctime>

using namespace std;

template <typename A, typename B>
ostream& operator <<(ostream& out, const pair<A, B>& a) {
  out << "(" << a.first << "," << a.second << ")";
  return out;
}
template <typename T, size_t N>
ostream& operator <<(ostream& out, const array<T, N>& a) {
  out << "["; bool first = true;
  for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "]";
  return out;
}
template <typename T>
ostream& operator <<(ostream& out, const vector<T>& a) {
  out << "["; bool first = true;
  for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "]";
  return out;
}
template <typename T, class Cmp>
ostream& operator <<(ostream& out, const set<T, Cmp>& a) {
  out << "{"; bool first = true;
  for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "}";
  return out;
}
#ifdef LOCAL
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
#else
#define trace(...) 42
#endif
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
  cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << ": " << arg1 << " |";
  __f(comma + 1, args...);
}

typedef long long int64;
typedef pair<int, int> ii;
const int INF = 1 << 29;
const int MOD = 1e9 + 7;
mt19937 mrand(random_device{}());
int rnd(int x) { return mrand() % x; }

struct fast_ios {
  fast_ios() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
  };
} fast_ios_;

int main() {
  int n;
  cin >> n;
  bool found = false;
  while (n--) {
    int x;
    cin >> x;
    if (x % 2 == 0) {
      if (!(x % 3 == 0 || x % 5 == 0)) found = true;
    }
  }
  if (found) {
    cout << "DENIED" << endl;
  } else {
    cout << "APPROVED" << endl;
  }
  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;

const int MOD = 1000000007;

ll dp[101010][2];

int main() {
    string l;
    cin >> l;
    int n = l.size();
    dp[0][0] = 1;
    for (int i = 0; i < n; i++) {
        int t = l[i] - '0';
        for (int j = 0; j < 2; j++) {
            for (int k = 0; k <= (j == 0 ? t : 1); k++) {
                if (k == 0) {
                    dp[i + 1][j || k < t] += dp[i][j];
                } else {
                    dp[i + 1][j || k < t] += dp[i][j] * 2LL;
                }
                dp[i + 1][j || k < t] %= MOD;
            }
        }
    }
    cout << (dp[n][0] + dp[n][1]) % MOD << endl;
}

Measured memory_bytes: 2048
#![allow(unused_imports)]
#![allow(non_snake_case)]
use std::cmp::*;
use std::collections::*;
use std::io::Write;

#[allow(unused_macros)]
macro_rules! debug {
    ($($e:expr),*) => {
        #[cfg(debug_assertions)]
        $({
            let (e, mut err) = (stringify!($e), std::io::stderr());
            writeln!(err, "{} = {:?}", e, $e).unwrap()
        })*
    };
}

fn main() {
    let n = read::<usize>();
    let t = read_vec::<u64>();
    let a = read_vec::<u64>();
    let big_int = 1000_000_000 + 7;

    let mut t_must = vec![0; n];
    t_must[0] = t[0];
    for i in 1..n {
        if t[i] > t[i - 1] {
            t_must[i] = t[i];
        }
    }

    let mut a_must = vec![0; n];
    a_must[n - 1] = a[n - 1];
    for i in 0..n - 1 {
        if a[i] > a[i + 1] {
            a_must[i] = a[i];
        }
    }

    for i in 0..n {
        if a_must[i] != 0 && t_must[i] != 0 && a_must[i] != t_must[i] {
            println!("{:?}", 0);
            return;
        }
        if a_must[i] != 0 && t[i] < a_must[i] {
            println!("{:?}", 0);
            return;
        }
        if t_must[i] != 0 && a[i] < t_must[i] {
            println!("{:?}", 0);
            return;
        }
    }

    let mut ans = 1u64;
    for i in 0..n {
        if a_must[i] == 0 && t_must[i] == 0 {
            ans *= min(t[i], a[i]);
            ans %= big_int;
        }
    }
    println!("{:?}", ans);
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}


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

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

  if(c - a - b <= 0) {
    cout << "No" << '\n';
    return 0;
  }

  ll left = 4LL * a * b;
  ll right = (c - a - b) * (c - a - b);
  if(left < right) {
    cout << "Yes" << '\n';
  } else {
    cout << "No" << '\n';
  }
}


Measured memory_bytes: 3636
#include <vector>
#include <iostream>
#include <cmath>
#include <string>
#include <algorithm>
#include <numeric>
using namespace std;

int main(){
    int a;
    cin >> a;
    for(int i=1;;i++){
        if(i*i>a){
            cout << (i-1)*(i-1);
            break;
        }
    }
}

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

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

int main() {
  int H,W;
  cin >> H >> W;
  ll count=0;
  
  rep(i,H){
    if(i%2==0)
      count += W/2 + W%2;
    else
      count += W/2;
  }
  
  if(H==1 || W==1)
    count = 1;
  
  cout << count << endl;
        
}


Measured memory_bytes: 256
#include <iostream>
#include<bits/stdc++.h>
#include<vector>
#define fo(i,n) for(long long i=0;i<n;i++)
#define ll long long int
#define inf 999999999999999999
#define pb push_back
#define MOD 1000000007
#define tr(c,it) for(auto it = (c).begin(); it != (c).end(); ++it)
#define fio ios_base::sync_with_stdio(false);cin.tie(0);
using namespace std;
//cerr<< '\n' << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms\n" ;
 
void SieveOfEratosthenes() 
{ 
    bool prime[10000001];
    memset(prime, true, sizeof(prime)); 
  
    for (ll p=2; p*p<=10000000; p++) 
    { 
        if (prime[p] == true) 
        { 
            // Update all multiples of p greater than or  
            // equal to the square of it 
            // numbers which are multiple of p and are 
            // less than p^2 are already been marked.  
            for (ll i=p*p; i<=10000000; i += p) {
                prime[i] = false; 
            }
        } 
    }  
} 
ll binpow(ll a, ll b) {
    ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = (res * a);
        a = (a * a);
        b >>= 1;
    }
    return res;
}
ll gcd(ll a,ll b)
{
	if(b%a==0)
	   return a;
	return gcd(b%a,a);
}
ll nCrModpDP(ll n, ll r, ll p) 
{ 
    ll C[r+1]; 
    memset(C, 0, sizeof(C));   
    C[0] = 1;
    for (ll i = 1; i <= n; i++) 
    {
        for (ll j = min(i, r); j > 0; j--) 
            C[j] = (C[j] + C[j-1])%p; 
    } 
    return C[r]; 
} 
ll nCrModp(ll n, ll r, ll p) 
{ 
   // Base case 
   if (r==0) 
      return 1; 
   ll ni = n%p, ri = r%p; 
  
   return (nCrModp(n/p, r/p, p) * 
           nCrModpDP(ni, ri, p)) % p; 
} 
int32_t main() 
{
    fio
	ll j,i,n,t,l,r,c,h,k,m,maxi,d,x;
	string s,w;
	cin>>s>>w;
	c=0;
	for(j=0;j<s.length();j++)
	{
		if(s[j]!=w[j])
			c++;
	}
	cout<<c;

}




	

		

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

using namespace std;
#define ll long long
#define int long long

#define rep(i, a) for (int i = 0; (i) < (int) (a); (i)++)
#define reps(i, a, b) for (int i = (int) (a); (i) < (int) (b); (i)++)
#define rrep(i, a) for (int i = (int) a-1; (i) >= 0; (i)--)
#define rreps(i, a, b) for (int i = (int) (a)-1; (i) >= (int) (b); (i)--)
#define MP(a, b) make_pair((a), (b))
#define PB(a) push_back((a))
#define all(v) (v).begin(), (v).end()
#define PRINT(f) if((f)){cout << (TRUE__) << endl;}else{cout << FALSE__ << endl;}
#define TRUE__ "Yes"
#define FALSE__ "No"
#define PERM(v) next_permutation(all(v))
#define UNIQUE(v) sort(all(v));(v).erase(unique(all(v)), v.end())
#define CIN(type, x) type x;cin >> x

#ifdef LOCAL
	#define lcout(a) cout << a;
	#define lcoutln(a) cout << a << endl;
	#define lcerr(a) cerr << a;
	#define lcerrln(a) cerr << a << endl;
#else
	#define lcout(a) 
	#define lcoutln(a) 
	#define lcerr(a) 
	#define lcerrln(a) 
#endif

signed main()
{
    int a, b, c;
    cin >> a >> b >> c;
    PRINT(a<=c && c<=b);
}


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

int jyo(int);

int main(){
  int s,t,u;
  cin>>s;
  for(int i=1;i<=s;i++){
    cin>>u;
    cout<<"Case "<<i<< ":"<<endl;
    for(int j=0;j<10;j++){
      t=jyo(u);
      cout<<t/100<<endl;
      u=t/100;
    }
  }
  return 0;
}

int jyo(int n){
  n*=n;
  n-=(n/10000000)*10000000;
  n-=(n/1000000)*1000000;
  return n;
}

Measured memory_bytes: 1160
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;

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

	long p=0;
	long ans=0;
	
	while(p<s.size()){
		if(s[p]=='O'){
			long st=p;
			while(s[p]=='O') p++;
			long ed=p;
			
			//printf("O %ld~%ld\n", st, ed);
			
			long tmplevel=ed-st; //このレベルの可能性
			bool flag=true;
			
			long jst=st-tmplevel;
			if(jst<0) flag=false;
			if(flag){
				for(long i=jst; i<st; ++i){
					if(s[i]!='J') flag=false;	
				}	
			}
			
			long ied=ed+tmplevel;
			if(ied>s.size()) flag=false;
			if(flag){
				for(long i=ed; i<ied; ++i){
					if(s[i]!='I') flag=false;
				}	
			}
			
			if(flag){
				if(ans<tmplevel) ans=tmplevel;	
			}
			p=ed;
		}	
		else p++;
	}
	
	printf("%ld\n", ans);
}

Measured memory_bytes: 2052
package main

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

var sc = bufio.NewScanner(os.Stdin)

func Scan() string {
	sc.Scan()
	return sc.Text()
}
func iScan() int {
	n, _ := strconv.Atoi(Scan())
	return n
}
func fScan() float64 {
	n, _ := strconv.ParseFloat(Scan(), 64)
	return n
}
func stringToInt(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}
func SScan(n int) []string {
	a := make([]string, n)
	for i := 0; i < n; i++ {
		a[i] = Scan()
	}
	return a
}
func iSScan(n int) []int {
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = iScan()
	}
	return a
}
func abs(x int) int {
	if x < 0 {
		x = -x
	}
	return x
}
func larger(a, b int) int {
	if a < b {
		return b
	} else {
		return a
	}
}
func smaller(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}
func max(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x < a[i] {
			x = a[i]
		}
	}
	return x
}
func min(a []int) int {
	x := a[0]
	for i := 0; i < len(a); i++ {
		if x > a[i] {
			x = a[i]
		}
	}
	return x
}
func sum(a []int) int {
	x := 0
	for _, v := range a {
		x += v
	}
	return x
}

var mod int = 1000000007

func main() {
	buf := make([]byte, 0)
	sc.Buffer(buf, mod)
	sc.Split(bufio.ScanWords)
	n := iScan()
	s := SScan(n)
	d := make(map[[26]int]int)
	for i := 0; i < n; i++ {
		x := [26]int{}
		for _, v := range s[i] {
			x[int(v)-97]++
		}
		d[x]++
	}
	ans := 0
	for _, v := range d {
		ans += v * (v - 1) / 2
	}
	fmt.Println(ans)
}


Measured memory_bytes: 31008
#pragma once

#include <bits/stdc++.h>

#define M_PI       3.14159265358979323846   // pi

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> VI;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> t3;

#define rep(a,n) for(int a = 0;a < n;a++)
#define repi(a,b,n) for(int a = b;a < n;a++)

const ull mod = 1000000007;

template<typename T>
struct TriSearch {
	T solve(T left, T right, function<T(T)> pred, function<bool(T, T)> condition) {
		while (condition(left, right))
		{
			T lmid = (left * 2 + right) / 3;
			T rmid = (left + right * 2) / 3;
			T L = pred(lmid);
			T R = pred(rmid);
			if (L > R) left = lmid;
			else right = rmid;
		}
		return right;

	}
};


int main(void)
{
	ll n;
	cin >> n;
	vector<vector<ll>> vs(n, vector<ll>(4,0));
	rep(i, n) {
		char c;
		cin >> vs[i][0] >> vs[i][1] >> c;
		if (c == 'U') 
		{
			vs[i][2] = 0;
			vs[i][3] = 1;
		}
		else if (c == 'D')
		{
			vs[i][2] = 0;
			vs[i][3] = -1;
		}
		else if (c == 'L')
		{
			vs[i][2] = -1;
			vs[i][3] = 0;
		}
		else
		{
			vs[i][2] = 1;
			vs[i][3] = 0;
		}
	}
	TriSearch<double> t;
	double area = 2e18;
	int count = 0;
	double r = t.solve(0, 1e9, [&](double v) {
		double xmin = 1e18, xmax = -1e18, ymin = 1e18, ymax = -1e18;
		for (auto e : vs) {
			double x = e[0] + e[2] * v;
			double y = e[1] + e[3] * v;
			xmin = min(xmin, x);
			xmax = max(xmax, x);
			ymin = min(ymin, y);
			ymax = max(ymax, y);
		}
		auto a = (xmax - xmin) * (ymax - ymin);
		area = min(a, area);
		return a;
		}, [&](double l, double r) {
			count++;
			return count < 150;
		});
	cout << std::fixed << std::setprecision(15) << area << endl;
	return 0;
}


Measured memory_bytes: 8960
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

void nxt(int& y,int& m,int& d){
    if(y%3&&m%2==0){
        if(++d==20){
            d=1;
            if(++m==11){
                m=1;
                ++y;
            }
        }
    }
    else {
        if(++d==21){
            d=1;
            if(++m==11){
                m=1;
                ++y;
            }
        }
    }
}

void solve(){
    int y,m,d;
    cin>>y>>m>>d;
    int ans=0;
    while(y!=1000||m!=1||d!=1){
        nxt(y,m,d);
        ++ans;
    }
    cout<<ans<<endl;
}
int main(){
    int n;
    cin>>n;
    rep(i,n)solve();
    return 0;
}


Measured memory_bytes: 3088