akhauriyash/Code-Regression huggingface dataset:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;

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

    static class CRepsept {
        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int k = in.nextInt();
            for (int i = 0, v = 7 % k; i < k; ++i) {
                if (v == 0) {
                    out.println(i + 1);
                    return;
                }
                v = (v * 10 + 7) % k;
            }
            out.println(-1);
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

        private int pread() {
            if (pnumChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= pnumChars) {
                curChar = 0;
                try {
                    pnumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (pnumChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = pread();
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}



Measured memory_bytes: 32584
import math
a, b, x = list(map(int, input().split()))


left = 0.0
right = 3.14159265 / 2


for i in range(10000):
    mid = left + (right-left)/2
    if math.tan(mid) < b / a:
        if x <= a*a*b - a*a*a*math.tan(mid)/2:
            left = mid
        else:
            right = mid

    else:
        if x <= a*b*b/2 / math.tan(mid):
            left = mid
        else:
            right = mid
print(mid*180/math.pi)


Measured memory_bytes: 40048
#!/usr/bin/env python3
import sys
INF = float("inf")

DX = [-1, 0, 1, -1, 1, -1, 0, 1]
DY = [-1, -1, -1, 0, 0, 1, 1, 1]


def solve(H: int, W: int, S: "List[str]"):
    S = [list(s) for s in S]
    for i in range(H):
        for j in range(W):
            if S[i][j] == "#":
                continue
            counter = 0
            for dx, dy in zip(DX, DY):
                if i+dy < 0 or H <= i+dy:
                    continue
                if j+dx < 0 or W <= j+dx:
                    continue
                if S[i+dy][j+dx] == "#":
                    counter += 1
            S[i][j] = str(counter)

    print(*["".join(s) for s in S], sep="\n")
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    S = [next(tokens) for _ in range(H)]  # type: "List[str]"
    solve(H, W, S)


if __name__ == '__main__':
    main()


Measured memory_bytes: 3188
f = [-1]*45
f[0]=1
f[1]=1

def fib(i):
    global f

    if i<=1:
        return f[i]
    if f[i] == -1:
        f[i] = fib(i-1)+fib(i-2)
    return f[i]

n=int(input())
print(fib(n))


Measured memory_bytes: 5600
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll MOD = 1e9+7;
const ll INF = 1e18;
#define rep(i,m,n) for(ll i = (m); i <= (n); i++)
#define zep(i,m,n) for(ll i = (m); i < (n); i++)
#define rrep(i,m,n) for(ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define printa(x,m,n) for(int i = (m); i <= n; i++){cout << (x[i]) << " ";} cout<<endl;

int main(){
    cin.tie(0); ios::sync_with_stdio(false);
    
    ll n; cin >> n;
    ll a[n]; zep(i, 0, n)cin >> a[i];

    ll ans = 0;
    zep(i, 1, n){
        ans += max(a[i - 1] - a[i], 0LL);
        a[i] = max(a[i - 1], a[i]);
    }
    print(ans)
    
    return 0;
}

Measured memory_bytes: 5196
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cstdint>
#include <cstdlib>
#include <cmath>
#include <complex>
#include <chrono>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#include <random>
#include <utility>
#include <limits>
#include <list>
#include <type_traits>

/* template start */
 
#define rep(i, a, b) for (long long i = (a); (i) < (b); (i)++)
#define all(i) i.begin(), i.end()

#ifdef LOCAL
#define debug(...) std::cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...)
#endif

void debug_out(){std::cerr<<std::endl;}

template<typename Head,typename... Tail>
void debug_out(Head h,Tail... t){
  std::cerr<<" "<<h;
  if(sizeof...(t)>0)std::cout<<" :";
  debug_out(t...);
}
 
template <typename T1, typename T2>
std::ostream& operator<<(std::ostream& os, std::pair<T1, T2> pa) {
  return os << pa.first << " " << pa.second;
}
 
template <typename T>
std::ostream& operator<<(std::ostream& os, std::vector<T> vec) {
  for (std::size_t i = 0; i < vec.size(); i++)os << vec[i] << (i + 1 == vec.size() ? "" : " ");
  return os;
}
 
template<typename T1,typename T2>
inline bool chmax(T1& a,T2 b){return a<b && (a=b,true);}
 
template<typename T1,typename T2>
inline bool chmin(T1& a,T2 b){return a>b && (a=b,true);}

template<typename Num>
constexpr Num mypow(Num a, long long b) {
  if(b==0)return 1;
  if (a==0)return 0;
  Num x = 1;
  while (b > 0) {
    if(b & 1)x*=a;
    a*=a;
    b >>= 1;
  }
  return x;
}

/* template end */

using ll = long long;

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

  ll n,m,k;
  std::cin>>n>>m>>k;

  std::vector<ll> suma(n+1,0),sumb(m+1,0);
  rep(i,0,n){
    ll a;
    std::cin>>a;
    suma[i+1]=suma[i]+a;
  }

  rep(i,0,m){
    ll b;
    std::cin>>b;

    sumb[i+1]=sumb[i]+b;
  }

  ll ans=0;

  rep(i,0,n+1){
    ll l=0,r=m+1;
    while(r-l>1){
      ll mid=(l+r)/2;
      if(sumb[mid] <= k - suma[i])l=mid;
      else r=mid;
    }
    if(suma[i]<=k)chmax(ans,i+l);
  }

  std::cout<<ans<<"\n";

  return 0;
}

Measured memory_bytes: 6360
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int , int> i_i;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> vvl;
typedef vector<vector<int>> vvi;
typedef vector<vector<char>> vvec;
typedef vector<vector<bool>> vveb;
typedef vector<vector<string>> vves;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define rep2(i,n) for(int i=2;i<(int)(n);i++)
#define repk(i,k,n) for(int i=k;i<(int)(n);i++)
#define fs first
#define sc second
#define pb push_back
#define pp pop_back
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define maxel(a) *max_element(all(a))
#define minel(a) *min_element(all(a))
#define acc accumulate
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
#define mod (1000000007)
typedef long long int64;
//const int64 INF = 1LL << 58;
#define dame { puts("-1"); return 0;}
#define YES { cout << "YES" << endl; return 0; }
#define NO { cout << "NO" << endl; return 0; }
#define Yes { cout << "Yes" << endl; return 0; }
#define No { cout << "No" << endl; return 0; }
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};

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

    int n;
    string s;
    cin >> n >> s;
    string mae,ushiro;
    if(n%2==1){No}
    mae = s.substr(0,n/2);
    ushiro = s.substr(n/2) ;
    if(mae==ushiro) Yes
    No 
    return 0;
}

Measured memory_bytes: 256
# Union Find 木
from sys import setrecursionlimit

#要素xが属するグループの根を返す
def find(parent, i):
    t = parent[i]
    if t < 0:
        return i
    t = find(parent, t)
    parent[i] = t
    return t

#xとyの木を併合
def unite(parent, i, j):
    i = find(parent, i)
    j = find(parent, j)
    if i == j:
        return
    parent[j] += parent[i]
    parent[i] = j


setrecursionlimit(10 ** 6)

N, M = map(int, input().split())
AB = [[int(c) - 1 for c in input().split()] for _ in range(M)]
# print(AB[::-1])

parent = [-1] * N
inconvenience = N * (N - 1) // 2
result = []
for a, b in AB[::-1]:
    # print(inconvenience)
    # print(parent)
    result.append(inconvenience)

    #a, bが属するグループの根をparentに記録する
    pa, pb = find(parent, a), find(parent, b)
    # print(pa, pb)
    # print(parent[pa], parent[pb], parent[pa] * parent[pb])

    #
    if pa != pb:
        inconvenience -= parent[pa] * parent[pb]

    #取り出した辺を併合
    unite(parent, a, b)

print(*result[::-1])


Measured memory_bytes: 43644
using System;
using System.Collections.Generic;
using System.Text;

namespace AtTest.C_Challenge
{
    class ABC_061
    {
        static void Main(string[] args)
        {
            Method(args);
            Console.ReadLine();
        }

        static void Method(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            int n = int.Parse(input[0]);
            long k = long.Parse(input[1]);
            var array = new long[100000];
            for (int i = 0; i < n; i++)
            {
                input = Console.ReadLine().Split(' ');
                int a= int.Parse(input[0]);
                long b = long.Parse(input[1]);
                array[a-1] += b;
            }

            long cnt = 0;
            for(int i = 0; i < 100000; i++)
            {
                cnt += array[i];
                if (k <= cnt)
                {
                    Console.WriteLine(i + 1);
                    break;
                }
            }
        }
    }
}


Measured memory_bytes: 17312
N,K = list(map(int,input().split()))
x = list(map(int,input().split()))
res = 999999999999999999
for i in range(N-K+1):
  res = min(min(abs(2*x[i])+abs(x[i+K-1]),abs(x[i])+abs(2*x[i+K-1])),res)
  if x[i]*x[i+K-1] >= 0:
    if x[i] >= 0:
    	res = min(res,x[i+K-1])
    else:
      	res = min(res,abs(x[i]))
  
print(res)  
  

Measured memory_bytes: 14252
#define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <clocale>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

using namespace std;

#define IOS ios::sync_with_stdio(false); cin.tie(0);
#define FOR(i, s, n) for(int i = (s), i##_len=(n); i < i##_len; ++i)
#define FORS(i, s, n) for(int i = (s), i##_len=(n); i <= i##_len; ++i)
#define VFOR(i, s, n) for(int i = (s); i < (n); ++i)
#define VFORS(i, s, n) for(int i = (s); i <= (n); ++i)
#define REP(i, n) FOR(i, 0, n)
#define REPS(i, n) FORS(i, 0, n)
#define VREP(i, n) VFOR(i, 0, n)
#define VREPS(i, n) VFORS(i, 0, n)
#define RFOR(i, s, n) for(int i = (s), i##_len=(n); i >= i##_len; --i)
#define RFORS(i, s, n) for(int i = (s), i##_len=(n); i > i##_len; --i)
#define RREP(i, n) RFOR(i, n, 0)
#define RREPS(i, n) RFORS(i, n, 0)
#define ALL(v) (v).begin(), (v).end()
#define SORT(v) sort(ALL(v))
#define RSORT(v) sort(ALL(v), greater<decltype(v[0])>())
#define SZ(x) ((int)(x).size())
#define REV(x) reverse(ALL(x))
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define MT make_tuple
#define BIT(n) (1LL<<(n))
#define UNIQUE(v) v.erase(unique(ALL(v)), v.end())

using ld = long double;
using ll = long long;
using ui = unsigned int;
using ull = unsigned long long;
using Pi_i = pair<int, int>;
using Pll_ll = pair<ll, ll>;
using VB = vector<bool>;
using VC = vector<char>;
using VD = vector<double>;
using VI = vector<int>;
using VLL = vector<ll>;
using VS = vector<string>;
using VSH = vector<short>;
using VULL = vector<ull>;

const int MOD = 1000000007;
const int INF = 1000000000;
const int NIL = -1;
const double EPS = 1E-10;

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


int main(){
    int N, allnum(1), bad(1); cin >> N;
    REP(i, N){
        int A; cin >> A;
        allnum *= 3;
        if(!(A % 2)) bad *= 2;
    }
    cout << allnum - bad << endl;
    return 0;
}


Measured memory_bytes: 256
#include <iostream>

int64_t A[10'000'010];

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

    for (int i = 1; i <= N; i++) {
        for (int j = i; j <= N; j += i) {
            A[j] += 1;
        }
    }

    int64_t ans = 0;
    for (int64_t k = 1; k <= N; k++) {
        ans += k * A[k];
    }

    std::cout << ans << '\n';
}

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

int main() {
  int a, b, c, d, l, r;
  cin >> a >> b >> c >> d;
  l = a + b;
  r = c + d;
  
  if(l > r) {
    cout << "Left" << endl;
  }
  else if(l == r) {
    cout << "Balanced" << endl;
  }
  else {
    cout << "Right" << endl;
  }
}

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

#define rep(i,a,n) for (int i=a;i<=n;i++)
#define per(i,a,n) for (int i=n;i>=a;i--)
#define vi vector<int>
#define pii pair<int,int>
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define sz(x) ((int)(x).size())
#define mod(x) ((x)%MOD)
#define o(X) (1<<(X))
#define oL(X) (1LL<<(X))
#define LL long long
#define ppt(x) __builtin_popcount(x)
using namespace std;
const int INF=0x3f3f3f3f,N=1e6+5,MOD=1e9+7;
const LL INF_LL=0x3f3f3f3f3f3f3f3fLL;

template<typename T>
inline int getplc(T x,int y) { return (x>>y)&1; }
template<typename T>
T square(T x) {return x*x;}

LL qpow(LL a,LL b=MOD-2,LL _MOD=MOD){
	LL res=1;
	for(;b;b>>=1,a=a*a%_MOD){
		if(b&1)res=res*a%_MOD;
	}
	return res;
}

template <typename T>
T Smax(T x) { return x; }
template<typename T, typename... Args>
T Smax(T a, Args... args) {
	return max(a, Smax(args...));
}
template <typename T>
T Smin(T x) { return x; }
template<typename T, typename... Args>
T Smin(T a, Args... args) {
	return min(a, Smin(args...));
}

template <typename T>
#define errorl(args...) {  \
	string _s = #args;   \
	replace(_s.begin(), _s.end(), ',', ' ');  \
    stringstream _ss(_s);  \
    istream_iterator<string> _it(_ss);  \
    errl(_it, args);  \
}
void errl(istream_iterator<string> it) {}
template<typename T, typename... Args>
void errl(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	errl(++it, args...);
}
#define error(args...) {  \
    string _s = #args;  \
    replace(_s.begin(), _s.end(), ',', ' ');  \
    stringstream _ss(_s);  \
    istream_iterator<string> _it(_ss);  \
    err(_it, args);  \
    cerr<<endl; \
}
void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << "=" << a << " # ";
	err(++it, args...);
}

int a[N];

void Solve() {
	int n, m;
	cin >> n;

	m = 3 * n;
	for (int i = 1; i <= m; i++) {
		cin >> a[i];
	}

	sort(a + 1, a + 1 + m);

	LL ans = 0;

	rep (i, 1, n) {
		ans += a[m - i * 2 + 1];
	}

	cout << ans << endl;
}


int main() {
#ifndef ONLINE_JUDGE
	freopen("in.txt","r",stdin);
//  freopen("o1.txt","w",stdout);
#endif
	ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);
	Solve();
	return 0;
}


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

bool cmp(int x, int y){
	return x > y;
}

int a[105];

int main()
{
	int n;
	cin >> n;
	for(int i = 0; i < n; i++){
		cin >> a[i];
	}
	sort(a, a + n, cmp);
	int ans = 0;
	for(int i = 0; i < n; i += 2){
		ans += (a[i] - a[i+1]);
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 256
/*
*/
#include <iostream>
#include <algorithm>
#include <vector>
#include <deque>
#include <string>
#include <cmath>
#include <numeric>

int main()
{
    int n;
    std::cin >> n;

    std::vector<int> w(n);
    int sum = 0;
    for (int i = 0; i < n; i++)
        std::cin >> w[i];

    sum = std::accumulate(w.begin(), w.end(), 0);
    int tmp = 0, i;
    int min = sum;

    for (i = 0; i < n; i++)
    {
        tmp += w[i];
        min = std::min(min, std::abs(sum - 2 * tmp));
    }

    std::cout << min << std::endl;
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{  ll n;
cin>>n;
ll a[n],c=0;
for(int i=1;i<=n;i++)
{   cin>>a[i];
    if(i%2 != 0 && a[i]%2 != 0)
        c++;
}

cout<<c<<endl;
return 0;
}


Measured memory_bytes: 3592
/*
Till the roof comes off, till the lights go out
Till my legs give out, can’t shut my mouth.
Till the smoke clears out. Am I high? Perhaps
I'ma rip this shit till my bones collapse.
*/
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <deque>
#include <set>
#include <stack>
#include <string.h>
#include <map>
#include <vector>
#include <queue>
#include <math.h>
#include <stack>
#include <complex>

#define pb push_back
#define f first
#define s second
#define ll long long
#define sz(v)      ((int)((v).size()))
#define X real()
#define Y imag()
#define angle(a)                (atan2((a).imag(), (a).real()))
#define vec(a,b)                ((b)-(a))
#define same(p1,p2)             (dp(vec(p1,p2),vec(p1,p2)) < EPS)
#define dp(a,b)                 ( (conj(a)*(b)).real() )	// a*b cos(T), if zero -> prep
#define cp(a,b)                 ( (conj(a)*(b)).imag() )	// a*b sin(T), if zero -> parllel
#define len(a)               (hypot((a).imag(), (a).real()))
#define normalize(a)            (a)/length(a)

using namespace std;

typedef pair<int,ll>ii;
typedef pair<ii,int>node;
typedef complex<double>point;


const int N=1005;
const int M=101;
const double EPS = 1e-9;
const int INF =1e9;

ll gcd(ll a, ll b) { return b == 0 ? a : gcd(b, a % b); }
ll lcm(ll a,ll b){return a*b/gcd(a,b);}
double getDist(point a,point b){return sqrt((a.X-b.X)*(a.X-b.X)+(a.Y-b.Y)*(a.Y-b.Y));}
int dcmp(double x, double y) {return fabs(x - y) <= EPS ? 0 : x < y ? -1 : 1;}

ll mod=1000000007;
ll power(ll base,int p){if(!p)return 1;ll ret=power(base,p/2);ret*=ret;ret%=mod;if(p&1)ret*=base,ret%=mod;return ret;}
ll modInverse(int a){return power(a,mod-2);}

vector<ll>v;
int n;
bool can(ll l){
 for(ll total=l;total>max(l-100,0ll);total--){
   ll sum=total;
   for(int i=0;i<n;i++){
        ll k = v[i] - n*1ll + total +n;
        k/=((n+1)*1ll);
        if(v[i]-k*n*1ll+total-k>=n)k++;
        sum-=k;
   }
   if(sum>=0)return 1;
 }return 0;
}
int main()
{
    //freopen("test.in","r",stdin);
    // freopen("test.out","w",stdout);
    scanf("%d",&n);
    for(int i=0;i<n;i++){
        ll a;
        cin>>a;
        v.pb(a);
    }
    sort(v.begin(),v.end());
    if(v[n-1]<n){
        cout<<0;
        return 0;
    }
    reverse(v.begin(),v.end());
    ll low=0,high=1e18;
    while(low+1<high){
        ll mid=(low+high)/2;
        if(can(mid))
            high=mid;
        else
            low=mid+1;
    }
    if(can(low))cout<<low;
    else cout<<high;
  return 0;
}

/*
100% reason to Remember THE NAME
*/


Measured memory_bytes: 256
package main
 
import (
  "bufio"
  "os"
  "strconv"
  "strings"
  "fmt"
)
 
var reader = bufio.NewReaderSize(os.Stdin, 1000000)
var writer = bufio.NewWriter(os.Stdout)
func NextLine() string {
  var line, buffer []byte
  var isPrefix bool = true
  var err error
  for isPrefix {
    line, isPrefix, err = reader.ReadLine()
    if err != nil { panic(err) }
    buffer = append(buffer, line...)
  }
  return string(buffer)
}
func NextInt() int {
  var n int
  n, _ = strconv.Atoi(NextLine())
  return n
}
func NextIntVec() []int {
  L := strings.Split(NextLine(), " ")
  N := make([]int, len(L))
  for i := range N {
    N[i], _ = strconv.Atoi(L[i])
  }
  return N
}
func Write(s interface{}) {
  fmt.Fprintln(writer, s)
}
func Output() {
  _ = writer.Flush()
}

func main() {
  X := NextLine()
  d := 0
  cnt := 0
  for _, x := range X {
    if x == 'S' {
      d--
    } else {
      d++
      if cnt < d { cnt = d }
    }
  }
  Write(cnt * 2)
  Output()
}

Measured memory_bytes: 1280
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int mod=1e9+7;
const int N=1e6+10;
void read(int &a)
{
    a=0;int d=1;char ch;
    while(ch=getchar(),ch>'9'||ch<'0') if(ch=='-') d=-1;
    a=ch^48;
    while(ch=getchar(),ch>='0'&&ch<='9') a=(a<<3)+(a<<1)+(ch^48);
    a*=d;
}
void read(ll &a)
{
    a=0;int d=1;char ch;
    while(ch=getchar(),ch>'9'||ch<'0') if(ch=='-') d=-1;
    a=ch^48;
    while(ch=getchar(),ch>='0'&&ch<='9') a=(a<<3)+(a<<1)+(ch^48);
    a*=d;
}
int main()
{
    int n,x,t;
    read(n),read(x),read(t);
    if(n%x==0) printf("%d\n",n/x*t);
    else printf("%d\n",(n/x+1)*t);
    return 0;
}


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

int main()
{
    double r;
    cin >> r;
    double ans = 2*r*3.1415;
    cout << 2*r * 3.141592 << endl;
    return 0;
}

Measured memory_bytes: 3784
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for(int i = 0; i < (n); i++)
#define MEM(a, x) memset(a, x, sizeof(a))
#define ALL(a) a.begin(), a.end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())
typedef long long ll;

string s;

int main(int argc, char const *argv[]) {
	ios_base::sync_with_stdio(false);
	cin >> s;
	set<char> st;
	bool ok = true;
	FOR(i, s.size()) {
		if (st.count(s[i])) ok = false;
		st.insert(s[i]);
	}
	cout << (ok ? "yes" : "no") << endl;
	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <map>

using namespace std;

typedef long long ll;

ll n, ans;
string s;
map<pair<string, string>, ll> ma;

int main()
{
    cin>>n>>s;
    for(ll i = 0; i < (1 << n); i++)
    {
        string s1, s2;
        s1 = s2 = "";
        for(ll j = 0; j < n; j++)
        {
            if(i & (1 << j)) s1.push_back(s[j]);
            else s2.push_back(s[j]);
        }
        ma[make_pair(s1, s2)]++;
    }
    for(ll i = 0; i < (1 << n); i++)
    {
        string s1, s2;
        s1 = s2 = "";
        for(ll j = 0; j < n; j++)
        {
            if(i & (1 << j)) s1.push_back(s[2 * n - j - 1]);
            else s2.push_back(s[2 * n - j - 1]);
        }
        ans += ma[make_pair(s1, s2)];
    }
    cout<<ans<<endl;
    return 0;
}


Measured memory_bytes: 91904
N, K = map(int, input().split())
P = 998244353
S = list(list(map(int, input().split())) for _ in range(K))

dp = [0]*(N+1)
tmp = 1
for i in range(1, N+1):
    tmp += dp[i]
    for s in S:
        l, r = s
        if i+l <= N:
            dp[i+l] += tmp
            dp[i+l] %= P
        if i+r+1 <= N:
            dp[i+r+1] -= tmp
            dp[i+r+1] %= P
print(dp[N])


Measured memory_bytes: 16944
#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define per(i,b,a) for(int i=b;i>=a;i--)
#define For(i,a,b) for(int i=a;i<=b;i++)
#define Forenska(it,c) for(__typeof((c).begin()) it=(c).begin();it!=(c).end();it++)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define sqr(x) ((x)*(x))
#define lowbit(x) ((x)&(-x))
#define GREATER(x) x,vector<x>,greater<x>
#define randIn(L,R) (((LL)rand()*rand())%(R-L)+L)
using namespace std;
typedef long long LL;
typedef pair<int,int> pii;
typedef pair<LL,LL> pLL;
typedef vector<int> vec;
typedef vector<LL> vecL;
typedef vector<pii> vecP;
typedef vector<pLL> vecPL;
typedef vector<string> vecS;
typedef vector<vec> mat;
typedef complex<double> point;
const long double PI=3.14159265358979323846264338327950288419716939937510582097;
const LL INFLL=0x3f3f3f3f3f3f3f3f;
const int INF=0x3f3f3f3f;
const long double EPS=1e-10;
int lcm(int a,int b)
{
	return a/__gcd(a,b)*b;
}
int read()
{
    int x=0;
    char ch=' ';
    bool flag=false;
    while(ch<'0' || ch>'9')
    {
        if(ch=='-')flag=true;
        ch=getchar();
    }
    while(ch>='0' && ch<='9')
    {
        x=(x<<3)+(x<<1)+ch-'0';
        ch=getchar();
    }
    return flag?-x:x;
}

int main()
{
	cout<<lcm(2,read())<<endl;
	return 0;
}



Measured memory_bytes: 256
#include <iostream>
#include <cmath>

int main(int argc, char const *argv[]) {
    int N; std::cin >> N;
    int ans=1;
    int mod = 1000000007;
    for (size_t i = 0; i < N; i++) {
        ans=ans*(i+1)%mod;
    }
    std::cout << ans << '\n';
    return 0;
}


Measured memory_bytes: 256
#include<iostream>

using namespace std;


int main() {
	int n;
	while (cin >> n) {
		int answ = 0;
		for (int i = 0; i < n; i++) {
			int a;
			cin >> a;
			answ += a - 1;
		}
		cout << answ << endl;
	}
	return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define MOD 1000000007
#define ff first
#define ss second
#define pb push_back
#define N 2009

ll inv[N], fac[N], finv[N];

void make()
{
	fac[0] = fac[1] = 1;
	inv[1] = 1;
	finv[1] = finv[0] = 1;
	for(int i = 2; i < N; ++i)
	{
		fac[i] = i * fac[i - 1] % MOD;
		inv[i] = MOD - MOD/i * inv[MOD % i] % MOD;
		finv[i] = inv[i] * finv[i - 1] % MOD;
	}
}

ll C(ll n, ll k)
{
	if(n < k || n < 0) return 0;
	return fac[n] * finv[n - k] % MOD* finv[k] % MOD;
}

ll gcd(ll a, ll b)
{
	if(b == 0)
		return a;
	return gcd(b, a % b);
}
int n, m;
int s[N], t[N];
ll dp[N][N];
ll dpf(int i, int j)
{
	if(i == n || j == m)
		return 0;
	if(dp[i][j] >= 0)
		return dp[i][j];
	if(s[i] == t[j])
		dp[i][j] = (1 + dpf(i + 1, j) + dpf(i, j + 1))% MOD;
	else
		dp[i][j] = (dpf(i + 1, j) + dpf(i, j + 1) - dpf(i + 1, j + 1) + MOD) % MOD;
	return dp[i][j];
}

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(NULL);
	memset(dp, -1, sizeof(dp));
	cin >> n >> m;
	for (int i = 0; i < n; ++i)
	{
		cin >> s[i];
	}
	for (int i = 0; i < m; ++i)
	{
		cin >> t[i];
	}
	ll ans = (dpf(0, 0) + 1) % MOD;
	cout << ans << "\n";
	return 0;
}

Measured memory_bytes: 32128
number=input()
number=int(number)
subject=input().rstrip().split()
#print(subject)
subject=list(map(int,subject))
subject1=[0 for i in range(number)]
count=0
j=0
while j < 1:
    for i in range(number):
        if subject[i]%2!=0:
            j+=1
            break
    if j==1:
        break
    for i in range(number):
        subject[i]=subject[i]/2
    count+=1

print(count)

Measured memory_bytes: 3064
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>

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

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 EACH(t,i,c) for(t::iretator i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)

const double EPS = 1e-10;

int main() {
	int n, r;

	while(cin >> n >> r, n) {
		vi yama(n);
		REP(i, n) {
			yama[i] = n-i;
		}

		int p, c;
		REP(i, r) {
			cin >> p >> c;
			
			vi yama1(p-1);
			REP(j, p-1) {
				yama1[j] = yama[j];
			}

			vi yama2(c);
			REP(j, c) {
				yama2[j] = yama[j+p-1];
			}

			vi yama3(0);
			REP(j, yama2.size()) {
				yama3.push_back(yama2[j]);
			}

			REP(j, yama1.size()) {
				yama3.push_back(yama1[j]);
			}

			REP(j, yama3.size()) {
				yama[j] = yama3[j];
			}
		}

		cout << yama[0] << endl;
	}



}

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

int main() {
	int x;
	cin >> x;
	
	int t = 1800;

	for (int i = 1; i < 9; i++) {
		if (t <= x) {
			cout << i;
			break;
		}
		t = t - 200;
	}
	return 0;
}

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

int main(){
  int a,b,c;
  cin>>a>>b>>c;
  if(
    ((a==5)or(a==7))
    and ((b==5)or(b==7))
    and ((c==5)or(c==7))
    and (a+b+c==17)
    )cout<<"YES";
  else cout<<"NO";
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,cc,n) for(int i=cc;i<=n;++i)
#define drep(i,cc,n) for(int i=cc;i>=n;--i)
#define sz(s) (int)(s.size())
#define vecprint(v) rep(i,0,v.size()-1)cout << v[i] << " ";cout << endl;
#define arrprint(v,n) rep(i,0,n-1)cout << v[i] << " ";cout << endl;
#define matprint(v,n,m) rep(i,0,n-1){rep(j,0,m-1){cout << v[i][j] << " ";}cout << endl;}
#define SORT(v) sort(v.begin(), v.end())
#define REV(v) reverse(v.begin(), v.end())
using namespace std;
const int mod=1000000007;
const int INF=1001001001;
typedef long long ll;
typedef pair<int,int> P;
template<typename T>
using priority_queue_rev = priority_queue<T, vector<T>, greater<T>>; //小さいものから取り出す

int main(){
    string s,t;
    cin >> s;
    cin >> t;
    string ans= "Yes";
    rep(i,0,sz(s)-1){
        if(s[i] != t[i])ans = "No";
    }

    cout << ans << endl;
//  printf("%.10f\n",ans);

    return 0;
}

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

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

using namespace std;

#define MAX 100010

int bit[MAX];

inline void add(int x,int w) {
  for(;x<MAX;x+=(x&-x)) bit[x] += w;
}

inline int sum(int x) {
  int ret = 0;
  for(;x>0;x-=(x&-x)) {
    ret += bit[x];
  }
  return ret;
}

int main() {
  int n,q;
  cin >> n >> q;
  int c,x,y;
  rep(i,q) {
    cin >> c >> x >> y;
    if( c == 0 ) {
      add(x,y);
    } else {
      cout << sum(y) - sum(x-1) << endl;
    }
  }
  
  return 0;
}

Measured memory_bytes: 3456
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repI(i, d, n) for (int i = (d); i < (n); ++i)
#define reps1(i, n) for (int i = 1; i < (n); ++i)
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

using ll = long long;
using P = pair<int, int>;
using Pl = pair<ll, ll>;
using M = map<int, int>;
using Ml = map<ll, ll>;
ll const INF = 1ll<<61;
double pi = 3.141592653589793238;
ll n;
vector<vector<ll>> f;
vector<vector<ll>> p;
ll ans = -INF;

void dfs(vector<ll> list) {
  if (ll(list.size()) == 10) {
    if (count(list.begin(), list.end(), 1) == 0) return;

    ll sum = 0;
    rep(i, n) {
      ll cnt = 0;
      rep(j, 10) {
        if (list[j] == f[i][j] && list[j] == 1) cnt++;
      }
      sum += p[i][cnt];
    }

    chmax(ans, sum);

    return;
  }

  list.push_back(0);
  dfs(list);
  list.back()++;
  dfs(list);
}

int main() {
  cin >> n;
  f.assign(n ,vector<ll>(10));
  p.assign(n, vector<ll>(11));
  rep(i, n) {
    rep(j, 10) cin >> f[i][j];
  }
  rep(i, n) {
    rep(j, 11) cin >> p[i][j];
  }

  dfs(vector<ll>());

  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 3628
#include <iostream>
#include <map>
#include <algorithm> 
using namespace std;
int a[300000];
int main()
{
    int n;
    while(cin>>n)
    {
        for(int i=1;i<=n;++i)   
        {
            cin>>a[i];
        }
        if(n&1)
        {
            cout<<a[n];
            for(int i=n-2;i>=1;i-=2)
                cout<<" "<<a[i];
            for(int i=2;i<=n-1;i+=2)
                cout<<" "<<a[i];
            cout<<endl;
        }else
        {
            cout<<a[n];
            for(int i=n-2;i>=2;i-=2)
                cout<<" "<<a[i];
            for(int i=1;i<=n-1;i+=2)
                cout<<" "<<a[i];
            cout<<endl;
        }
    }
    return 0;
}

Measured memory_bytes: 2944
using System;
using System.Linq;
class Program
{
    static void Main()
    {
        var s = string.Join("", Console.ReadLine().Reverse());
        bool yes = true;
        var word = new string[4] { "maerd", "esare", "resare", "remaerd" };
        var len = new int[4] { 5, 5, 6, 7 };
        for (int i = 0; i < s.Length;)
        {
            for (int j = 0; j < 4; j++)
            {
                if (i + len[j] <= s.Length && s.Substring(i, len[j]) == word[j])
                {
                    i += len[j];
                    break;
                }
                else if (j == 3)
                {
                    yes = false;
                    i = int.MaxValue;
                    break;
                }
            }
        }
        Console.WriteLine(yes ? "YES" : "NO");
    }
}

Measured memory_bytes: 14304
#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007;
int main() {
    int s; cin>>s;
    vector<int>dp(s+1);
    dp[0]=1;
    for(int sum=1;sum<=s;sum++) {
        for(int x=3;x<=s;x++) {
            if(sum-x>=0) {
                dp[sum]=(dp[sum]+dp[sum-x])%mod;
            }
        }
    }
    cout<<dp[s]<<endl;
}
// 0 1 2 3 4 5 6 7
// 1 

Measured memory_bytes: 3628
import java.util.Scanner;

public class Main {

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

Measured memory_bytes: 23892
#include <iostream>
#include <sstream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <memory>
#include <complex>
#include <numeric>
#include <cstdio>
#include <iomanip>

#define REP(i,m,n) for(int i=int(m);i<int(n);i++)
#define EACH(i,c) for (auto &(i): c)
#define all(c) begin(c),end(c)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort(begin(c),end(c))
#define pb emplace_back
#define MP make_pair
#define SZ(a) int((a).size())

#ifdef LOCAL
#define DEBUG(s) cout << (s) << endl
#define dump(x)  cerr << #x << " = " << (x) << endl
#define BR cout << endl;
#else
#define DEBUG(s) do{}while(0)
#define dump(x) do{}while(0)
#define BR 
#endif
using namespace std;

using UI = unsigned int;
using UL = unsigned long;
using LL = long long int;
using ULL = unsigned long long;
using VI = vector<int>;
using VVI = vector<VI>;
using VLL = vector<LL>;
using VS = vector<string>;
using PII = pair<int,int>;
using VP = vector<PII>;

//struct edge {int from, to, cost;};

constexpr double EPS = 1e-10;
constexpr double PI  = acos(-1.0);
//constexpr int INF = INT_MAX;

template<class T> inline T sqr(T x) {return x*x;}

long long power(long long x, long long n, long long mod = 1000000009) {
    if (n == 0) return 1;
    if (n % 2 == 0) return power(x * x % mod, n/2, mod);
    else return x * power(x, n-1, mod) % mod;
}

void resolve() {
    int n,m;
    cin >> n >> m;
    cout << (m * 1900 + (n - m) * 100) * power(2,m) << endl;
}

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

Measured memory_bytes: 764
// C.

#include <iostream>
#include <sstream>
#include <algorithm>
#include <vector>

using namespace std;

typedef long long LL;

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

int main(int argc, char* argv[]) {
	LL a, b;
	cin >> a >> b;
	LL ans = lcm(a, b);
	cout << ans << endl;
	return 0;
}


Measured memory_bytes: 256
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
#include<string.h>
#include<math.h>
#include<ctype.h>
#define MOD 10000007
#define rep(i,n) for(ll i=0;i<n;i++)
#define revrep(i,n) for(ll i=n;i>0;i--)

typedef long long ll;

ll fac[100001], inv[100001];

ll mygcd(ll a, ll b) { if (b == 0) return a; return mygcd(b, a % b); }

ll mylcm(ll a, ll b) { return a / mygcd(a, b) * b; }

ll mymax(ll a, ll b) { return (a > b) ? a : b; }

ll mymin(ll a, ll b) { return (a < b) ? a : b; }

int myasc(const void* a, const void* b) { return *(ll*)a - *(ll*)b; }

int mydsc(const void* a, const void* b) { return *(ll*)b - *(ll*)a; }

ll mypow(ll a, ll b) {
	ll x;
	if (b == 0) return 1;
	else if (b % 2 == 1) return a * mypow(a, b - 1) % MOD;
	x = mypow(a, b / 2);
	return x * x % MOD;
}

ll mycomb(ll a, ll b) {
	if (a < b || a < 0 || b < 0)return 0;
	return fac[a] * inv[a - b] * inv[b] % MOD;
}

int main() {
	ll n, k, a, aa[100001] = {}, sum = 0;
	scanf("%lld", &n, &k);
	rep(i, n) {
		scanf("%lld", &a);
		aa[a]++;
		sum += a;
	}
	ll q, b, c;
	scanf("%lld", &q);
	rep(i, q) {
		scanf("%lld%lld", &b, &c);
		sum += aa[b] * (c - b);
		aa[c] += aa[b];
		aa[b] = 0;
      	printf("%lld\n",sum);
	}

	return 0;
}

Measured memory_bytes: 2928
#include <iostream>
#include <string.h>
#include <vector>

using namespace std;

#define MAX 114

vector<int> G[MAX];
int col[MAX];
bool found;

void dfs(int v)
{
    col[v] = 0;
    for(int i = 0 ; i < (int)G[v].size() ; i++){
        int to = G[v][i];
        if(col[to] == -1){
            dfs(to);
        }else if(col[to] == 0){
            found = true;            
            return;
        }
    }
    col[v] = 1;
}
    
int main()
{
    int M, N;
    cin >> M >> N;
    
    auto canGraph = [=](){
        int l[MAX][MAX], u[MAX][MAX];
        for(int i = 0 ; i < MAX ; i++){
            for(int j = 0 ; j < MAX ; j++){
                l[i][j] = -1;
                u[i][j] = 101;
            }
        }
        int K, s, t;
        string c;
        bool poss = 1;
        for(int i = 0 ; i < M ; i++){
            cin >> K;
            for(int j = 0 ; j < K ; j++){
                cin >> s >> c >> t;
                --s;
                if(c == ">="){
                    l[i][s] = max(l[i][s], t);
                }else{
                    u[i][s] = min(u[i][s], t);
                }
            }
            for(int j = 0 ; j < N ; j++){
                if(l[i][j] > u[i][j]){
                    poss = 0;
                    break;
                }
            }
        }

        if(!poss) return false;

        auto isConnect = [=](int from, int to){
            for(int i = 0 ; i < N ; i++){
                if(u[from][i] <= l[to][i]){
                    return true;
                }
            }
            return false;
        };
        
        for(int from = 0 ; from < M ; from++){
            for(int to = 0 ; to < M ; to++){
                if(from == to) continue;
                if(isConnect(from, to)){
                    G[from].push_back(to);
                }
            }
        }
        found = false;
        memset(col, -1, sizeof(col));
        for(int i = 0 ; i < M ; i++){
            if(col[i] == -1){
                dfs(i);
            }
        }                                       
        return !found;
    };
    
    cout << (canGraph() ? "Yes" : "No") << endl;
    return 0;
}

Measured memory_bytes: 3444
#include<iostream>
using namespace std;
int main(){
	double n;
	while(cin>>n){
		if(n<=48.0)cout<<"light fly"<<endl;
		else if(n<=51.0)cout<<"fly"<<endl;
		else if(n<=54.0)cout<<"bantam"<<endl;
		else if(n<=57.0)cout<<"feather"<<endl;
		else if(n<=60.0)cout<<"light"<<endl;
		else if(n<=64.0)cout<<"light welter"<<endl;
		else if(n<=69.0)cout<<"welter"<<endl;
		else if(n<=75.0)cout<<"light middle"<<endl;
		else if(n<=81.0)cout<<"middle"<<endl;
		else if(n<=91.0)cout<<"light heavy"<<endl;
		else cout<<"heavy"<<endl;
	}
	return 0;
}

Measured memory_bytes: 1220
#include <bits/stdc++.h>
using namespace std;
 
#define ll long long 
#define inf 0x3f3f3f3f
#define infll 0x3f3f3f3f3f3f3f3f
#define all(x) (x).begin(),(x).end()
#define forn(i, a, b) for (int i=a; i<(signed)(b); ++i)
#define pb push_back
 
 
// debug templates 
#define debug(x)       cerr<< #x <<" : "<< x << endl;
#define debuga(A,N)    cerr<< #A <<" : [";for(int i = 0; i<N;i++) cerr<<A[i]<<" "; cerr<<"]\n";
#define debuga2(A,N,M) cerr<< #A << " : \n"; for(int i=0;i<N;i++){cerr<<"[";for(int j=0;j<M;++j) cerr<<A[i][j]<<" ";cerr<<"]\n";}
#define debugp(p)      cerr<< #p <<" : "<<"("<<(p).first<<","<<(p).second<<")\n";
#define debugv(v)      cerr<< #v <<" : "<<"[";for(int i = 0; i< (v).size(); i++) cerr<<v[i]<<" "; cerr<<"]\n";
#define debugv2(v)     cerr<< #v << " : \n"; for(int i=0;i<v.size();i++){cerr<<"[";for(int j=0;j<(v[0].size());++j) cerr<<v[i][j]<<" ";cerr<<"]\n";}
#define debugs(m)      cerr<< #m <<" : [ "; for(auto itr = m.begin(); itr!=m.end();itr++) cerr<<*itr<<" "; cerr<<"]\n";
#define debugm(m)      cerr<< #m <<" : [ "; for(auto itr = m.begin();itr!=m.end(); itr++) cerr<<"("<<itr->first<<","<<itr->second<<") ";cerr<<"]\n";
 

void solve(){
	int ans = 0;
	string s,t; cin >> s >> t;
	forn(i,0,s.size()) if(s[i] != t[i]) ++ans;
	cout << ans;
}
 
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	
	solve();
	return 0;
}
 


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

typedef long long ll;

const ll INF=1000000010;
ll a,b,ans[4];
int main(){
  cin>>a>>b;

  //最初に反転
  a=-a;ans[0]++;
  if(b>=a)ans[0]+=(b-a);
  else ans[0]=INF;

  //最初かつ最後
  b=-b;ans[1]+=2;
  if(b>=a)ans[1]+=(b-a);
  else ans[1]=INF;

  //反転なし
  b=-b;
  a=-a;
  if(b>=a)ans[2]+=(b-a);
  else ans[2]=INF;

  //最後のみ反転
  b=-b;ans[3]++;
  if(b>=a)ans[3]+=(b-a);
  else ans[3]=INF;


  sort(ans,ans+4);

  cout<<ans[0]<<endl;

  return 0;
}


Measured memory_bytes: 256
N,T=map(int,input().split())
T_S=list(map(int,input().split()))
ans=T
for i in range(1,N):
    if abs(T_S[i]-T_S[i-1])<=T:
        ans+=abs(T_S[i]-T_S[i-1])
    else:
        ans+=T
print(ans)

Measured memory_bytes: 25200
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <numeric>
#include <string.h>
using namespace std;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1<<29;
const long long  INFL = 1e18;
const int MOD = 1000000007;
int a ,b, c;
void solve() {
	cin >> a >> b >> c;
	string ans = (a + b) >= c ? "Yes" : "No";
	cout << ans << endl;
	return;
}

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

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

int main(){
  int n;cin>>n;
  int d[n];
  for(int i=0;i<n;i++){
    cin>>d[i];
  }
  long sum=0;
  for(int i=0;i<n;i++)
    for(int j=i+1;j<n;j++){
      sum+=d[i]*d[j];
    }
  cout<<sum;
}

Measured memory_bytes: 256
#include<iostream>
#include<cstdio>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<set>
#include<complex>
#include<string>
#include<cstring>
using namespace std;
#define rep2(x,from,to) for(long long x=(from);(x)<(to);(x)++)
#define rep(x,to) rep2(x,0,to)
#define INF 10000000000000000
#define debug(x) cout<<#x<<": "<<x<<endl

#define all(x) x.begin(),x.end()
typedef pair<long long,long long> P;
typedef pair<long long,P> PP;
long long a,b,q;
long long s[100007];
long long t[100007];
long long x[100007];
long long now;
long long ss,tt;
long long rs,rt;
long long ans;
int main()
{
	
	cin>>a>>b>>q;
	rep(i,a)cin>>s[i];
	rep(i,b)cin>>t[i];
	rep(i,q)cin>>x[i];
	s[a]=INF;
	t[b]=INF;
	rep(i,q)
	{
		ans=INF;
		now=x[i];
		ss=(long long)(lower_bound(s,s+a+1,now)-s);
		tt=(long long)(lower_bound(t,t+b+1,now)-t);
		//
		if(ss!=a&&tt!=b){
		rs=ss;
		rt=tt;
		ans=min(ans,max(s[rs],t[rt])-now);
		}
		//
		if(ss!=0&&tt!=b)
		{
		rs=ss-1;
		rt=tt;
		ans=min(ans,(now-s[rs])+(t[rt]-now)+min((now-s[rs]),(t[rt]-now)));
		}
		//
		if(ss!=a&&tt!=0)
		{
		rs=ss;
		rt=tt-1;
		ans=min(ans,(now-t[rt])+(s[rs]-now)+min((now-t[rt]),(s[rs]-now)));
		}
		//
		if(ss!=0&&tt!=0)
		{
		rs=ss-1;
		rt=tt-1;
		ans=min(ans,now-min(s[rs],t[rt]));
		}
		cout<<ans<<endl;
	}
	return 0;
}

Measured memory_bytes: 3712
#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <functional>
#include <bitset>

using namespace std;
using lint = long long int;
long long int INF = 1001001001001001LL;
int inf = 1000000007;
long long int MOD = 1000000007LL;
double PI = 3.1415926535897932;

template<typename T1,typename T2>inline void chmin(T1 &a,const T2 &b){if(a>b) a=b;}
template<typename T1,typename T2>inline void chmax(T1 &a,const T2 &b){if(a<b) a=b;}

#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()

/* do your best */

int main() {
  double r; cin >> r;
  printf("%.10f\n", 2.0 * r * PI);
  return 0;
}


Measured memory_bytes: 3760
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
	long long t=0,k=0,h=0,sum=0,sum1=0;
	vector <long long> v;
	cin >>t >>k;
	for (int i=0;i<t;i++)
	{
		cin >>h;
		v.push_back(h);
		sum+=h;
	}
	sort (v.begin(),v.end());
	reverse (v.begin(),v.end());
	if (k>=t)
	{
		cout <<"0"<<endl;
		return 0;
	}
	for (int i=0;i<k;i++)
		sum1+=v[i];
	cout <<sum-sum1<<endl;
	return 0;
}

Measured memory_bytes: 3444
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;



int main() {
	vector<string> wetherT = { "Sunny","Cloudy","Rainy","Sunny" };
	string w;
	cin >> w;
	int ansi;
	for (int i = 0; i < 3; i++) {
		if (w == wetherT.at(i)) {
			ansi = i + 1;
		}
	}
	cout << wetherT.at(ansi);
}

Measured memory_bytes: 256