akhauriyash/Code-Regression huggingface dataset:
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    INF = 10**18
    MOD = 10**9 + 7
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    _LI = lambda : [int(x)-1 for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()

    N,X,T = LI()
    ans = math.ceil(N/X)*T
    print(ans)
if __name__ == '__main__':
    main()

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

using ll = long long;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  int n, W;
  cin >> n >> W;
  
  vector<ll> w(n), v(n);
  for (int i = 0; i < n; i++) cin >> w.at(i) >> v.at(i);
  
  vector<vector<ll>> dp(n + 1, vector<ll>(100001, 1e18));
  dp.at(0).at(0) = 0;
  
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 100001; j++) {
      dp.at(i + 1).at(j) = dp.at(i).at(j);
      if (j >= v.at(i)) dp.at(i + 1).at(j) = min(dp.at(i + 1).at(j), dp.at(i).at(j - v.at(i)) + w.at(i));
    }
  }
  
  int ans = 0;
  for (int j = 0; j < 100001; j++) {
    if (dp.at(n).at(j) <= W) ans = max(ans, j);
  }
  
  cout << ans << '\n';
}

Measured memory_bytes: 80256
Black = 1
White = -1
Blank = 0

Next = [
  [1, 0, 0],
  [1, 1, 0],
  [0, 1, 0],
  [-1, 1, 0],
  [0, 0, 1],
  [1, 0, 1],
  [1, 1, 1],
  [0, 1, 1],
  [-1, 1, 1],
  [-1, 0, 1],
  [-1, -1, 1],
  [0, -1, 1],
  [1, -1, 1],
]

def move!(peg, x, y, color)
  n = peg.size - 2
  for z in 1..n do
    next if peg[x][y][z] != Blank
    peg[x][y][z] = color
    break
  end
end

def over?(peg, m)
  n = peg.size - 2
  for z in 1..n do
    for y in 1..n do
      for x in 1..n do
        next if peg[x][y][z] == Blank
        Next.each do |(dx, dy, dz)|
          color = peg[x][y][z]
          count = 1
          nx = x + dx
          ny = y + dy
          nz = z + dz
          while peg[nx][ny][nz] == color do
            count += 1
            nx += dx
            ny += dy
            nz += dz
          end
          return true if count >= m
        end
      end
    end
  end
  false
end

while true do
  n, m, p = gets.split.map(&:to_i)
  break if n | m | p == 0
  peg = Array.new(n + 2) {Array.new(n + 2) {Array.new(n + 2, Blank)}}

  player = Black
  win = Blank
  move = 0
  p.times do
    x, y = gets.split.map(&:to_i)
    next if win != Blank
    move += 1
    move!(peg, x, y, player)
    win = player if over?(peg, m)
    player *= -1
  end

  case win
    when Black
      printf "Black %d\n", move
    when White
      printf "White %d\n", move
    else
      puts "Draw"
  end
end

Measured memory_bytes: 6136
#include <iostream>
#include <fstream>
#include <set>
#include <map>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <algorithm>
#include <climits>
#include <cmath>
using namespace std;
#define ll long long int
#define rep(i,n) for( int i = 0; i < n; i++ )
#define rrep(i,n) for( int i = n; i >= 0; i-- )
#define REP(i,s,t) for( int i = s; i <= t; i++ )
#define RREP(i,s,t) for( int i = s; i >= t; i-- )
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000
#define int long long

signed main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n, m;
    cin >> n >> m;
    int a[100010];
    rep(i, n) cin >> a[i];
    int sum[100010] = {};
    rep(i, n) sum[i + 1] = (sum[i] + a[i]) % m;
    // rep(i, n) cout << sum[i + 1] << " ";
    // cout << endl;
    map<int, int> mp;
    rep(i, n) mp[sum[i + 1]]++;
    int ans = 0;
    rep(i, n) {
        if(sum[i + 1] == 0) ans++;
        ans += mp[sum[i + 1]] - 1;
    
        mp[sum[i + 1]]--;
        
    }
    cout << ans << endl;

    return 0;
}
// 0 1 1
// 0 1 0

Measured memory_bytes: 5760
#include <cstdio>
#include <algorithm>
using namespace std;

int N;
int as[1009];
int bs[1009];
bool used[1009];
int dp[1009][1009];

int solve(){
	for(int i=0; i<N; i++)for(int j=0; j<N-1; j++){
		if(bs[j] > bs[j+1]){
			swap(bs[j], bs[j+1]);
			swap(as[j], as[j+1]);
		}
	}
	for(int i=0; i<=N; i++)for(int j=0; j<=N; j++) dp[i][j] = 1<<29;
	dp[0][0] = 0;
	for(int i=0; i<N; i++)for(int j=0; j<N; j++)if(dp[i][j] < (1<<29)){
		dp[i+1][j] = min(dp[i+1][j], dp[i][j]);
		if(dp[i][j] + as[i] <= bs[i]){
			dp[i+1][j+1] = min(dp[i+1][j+1], dp[i][j] + as[i]);
		}
	}
	for(int i=N; i>=0; i--)if(dp[N][i] < (1<<29)) return i;
	return 0;
}

int main(){
	scanf("%d",&N);
	for(int i=0; i<N; i++){
		scanf("%d%d",as+i,bs+i);
	}
	printf("%d\n",solve());
	return 0;
}

Measured memory_bytes: 0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace C
{
    class Program
    {
        static void Main(string[] args)
        {
            var c0Row = Console.ReadLine().Split(' ')
                .Select(s => int.Parse(s))
                .ToList();
            var c1Row = Console.ReadLine().Split(' ')
                .Select(s => int.Parse(s))
                .ToList();
            var c2Row = Console.ReadLine().Split(' ')
                .Select(s => int.Parse(s))
                .ToList();
            var matrix = new List<List<int>> { c0Row, c1Row, c2Row };
            bool temp =
                AllEqualCow(matrix, 0, 1) && AllEqualCow(matrix, 1, 2) && AllEqualCow(matrix, 2, 0) &&
                AllEqualRow(matrix, 0, 1) && AllEqualRow(matrix, 1, 2) && AllEqualRow(matrix, 2, 0);
            if (temp)
            {
                Console.WriteLine("Yes");
            }
            else
            {
                Console.WriteLine("No");
            }

        }

        static bool AllEqualRow(List<List<int>> matrix, int i, int j)
        {
            int temp = matrix[0][i] - matrix[0][j];
            for(int k = 1; k < 3; k++)
            {
                if(temp != matrix[k][i] - matrix[k][j])
                {
                    return false;
                }
            }
            return true;
        }
        static bool AllEqualCow(List<List<int>> matrix, int i, int j)
        {
            int temp = matrix[i][0] - matrix[j][0];
            for (int k = 1; k < 3; k++)
            {
                if (temp != matrix[i][k] - matrix[j][k])
                {
                    return false;
                }
            }
            return true;
        }

    }
}


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


using ld = long double;
constexpr ld eps = 1e-8;


namespace geometry2d {


using point = std::complex<long double>;
using polygon = std::vector<point>;

bool eq(ld a, ld b) {
    return (std::abs(a - b) < eps);
}

long double dot(point a, point b) {
    return std::real(std::conj(a) * b);
}

long double cross(point a, point b) {
    return std::imag(std::conj(a) * b);
}

class line {
public:
    line()
        : a(point(0, 0)), b(point(0, 0))
    {}
    line(point a_, point b_)
        : a(a_), b(b_)
    {}

    point a, b;
};

int ccw(point a, point b, point c) {
    b -= a; c -= a;
    if(cross(b, c) > eps)           return 1;  // a -> b -> c : counterclockwise
    if(cross(b, c) < -eps)          return -1; // a -> b -> c : clockwise
    if(dot(b, c) < 0)               return 2;  // c -> a -> b : line
    if(std::norm(b) < std::norm(c)) return -2; // a -> b -> c : line
    return 0;                                  // a -> c -> b : line
}

point is_ll(line s, line t) {
    point sv = s.b - s.a, tv = t.b - t.a;
    assert(cross(sv, tv) != 0);
    return s.a + sv * cross(tv, t.a - s.a) / cross(tv, sv);
}


ld area(polygon const& p) {
    const int N = p.size();
    ld res = 0;
    for(int i=0; i<N; ++i) {
        res += cross(p[i], p[(i+1)%N]);
    }
    return res / 2;
}

// left side
polygon convex_cut(polygon const& p, line l) {
    const int N = p.size();
    polygon res;
    for(int i=0; i<N; ++i) {
        auto a = p[i], b = p[(i+1)%N];
        if(ccw(l.a, l.b, a) != -1) {
            res.push_back(a);
        }
        if(ccw(l.a, l.b, a) * ccw(l.a, l.b, b) < 0) {
            res.push_back(is_ll(line(a, b), l));
        }
    }
    return res;
}


line separate(point const& p1, point const& p2) {
    assert(p1 != p2);
    auto m = (p1 + p2) * point(0.5, 0);
    line res;
    res.a = m + (m - p1) * point(0, 1);
    res.b = m + (m - p1) * point(0, -1);
    return res;
}


} // namespace geometry2d

using namespace geometry2d;


int main() {
    int N, M;
    while(cin >> N >> M, N) {
        polygon p;
        for(int i=0; i<N; ++i) {
            ld x, y;
            cin >> x >> y;
            p.emplace_back(x, y);
        }
        vector<point> C;
        for(int i=0; i<M; ++i) {
            ld x, y;
            cin >> x >> y;
            C.emplace_back(x, y);
        }
        for(int i=0; i<M; ++i) {
            auto p2 = p;
            for(int j=0; j<M; ++j) {
                if(i == j) {
                    continue;
                }
                line l = separate(C[i], C[j]);
                if(ccw(l.a, l.b, C[i]) == -1) {
                    swap(l.a, l.b);
                }
                p2 = convex_cut(p2, l);
            }
            cout << fixed << setprecision(10) << area(p2) << endl;
        }
    }
}


Measured memory_bytes: 3284
#include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;

int main() {
	int tyo = 0, hisi = 0;

	while (true) {
		int a, b, c;
		char knm;
		cin >> a >> knm >> b >> knm >> c;
		if (cin.eof() || a == 0) { break; }

		if(pow(c,2)==pow(a,2)+pow(b,2)){
			tyo++;
		}
		else if(a==b){
			hisi++;
		}
	}
	cout << tyo << endl
		<< hisi << endl;
	return 0;
}

Measured memory_bytes: 3048
#include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<random>
#include<functional>
#include<algorithm>
#include<stack>
#include<cstdio>
#include<bitset>
#include<unordered_map>
#include <climits>
#include<fstream>
using namespace std;
///////////////////library zone!!!!!!!!!!!!!!!!!!!!!!!!!!!!
typedef long long ll;
typedef long double ld;
#define all(a) (a).begin(),(a).end()
const ll Mod = 1000000007;
struct P {
	ll pos, cost;
	bool operator<(const P &b) const { return cost < b.cost; }
	bool operator>(const P &b) const { return cost > b.cost; }
};
struct B {
	ll to, cost;
};
struct E {
	ll from, to, cost;
	bool operator<(const E &b) const { return cost < b.cost; }
	bool operator>(const E &b) const { return cost > b.cost; }
};
struct H {
	ll x, y;
	bool operator<(const H &b) const {
		if (x != b.x) return x < b.x;
		return y < b.y;
	}
	bool operator>(const H &b) const {
		if (x != b.x) return x > b.x;
		return y > b.y;
	}
	bool operator==(const H &b) const { return x == b.x&&y == b.y; }
	bool operator!=(const H &b) const { return (*this) != b; }
};
ll gcd(ll i, ll j) {
	if (i > j) swap(i, j);
	if (i == 0) return j;
	return gcd(j%i, i);
}
ll mod_pow(ll x, ll n, ll p) {
	ll res = 1;
	while (n > 0) {
		if (n & 1) res = res * x % p;
		x = x * x % p;
		n >>= 1;
	}
	return res;
}//x^n%p
const ll Inf = 3023372036854775807;
const int inf = 1500000000;
#define int long long
//----------------------------------------------------
int H, W, h, w;
int a[1000][1000];
signed main() {
	cin >> H >> W >> h >> w;
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			a[i][j] = 1000;
		}
	}
	int res = 0;
	int t = -(h*w - 1) * 1000 - 1;
	a[h - 1][w - 1] = t;
	for (int i = h - 1; i < H; i += h) {
		for (int j = w - 1; j < W; j += w) {
			a[i][j] = t;
		}
	}
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			res += a[i][j];
		}
	}
	if (res <= 0) {
		cout << "No\n";
		return 0;
	}
	cout << "Yes\n";
	for (int i = 0; i < H; i++) {
		for (int j = 0; j < W; j++) {
			cout << (j == 0 ? "" : " ") << a[i][j];
		}
		cout << endl;
	}
}

Measured memory_bytes: 5632
#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
struct node{
	int pre, to;
}edge[400010];
int head[200010], tot;
int n, a[200010];
int low[200010], cnt;
int ans[200010];
void add(int u, int v) {
	edge[++tot] = node{head[u], v};
	head[u] = tot;
}
void dfs(int x, int fa) {
	ans[x] = cnt;
	for (int i = head[x]; i; i = edge[i].pre) {
		int y = edge[i].to;
		if (y != fa) {
			if (low[cnt] < a[y]) {
				int b = cnt;
				low[++cnt] = a[y];
				dfs(y, x);
				cnt = b;
			} else {
				int p = lower_bound(low + 1, low + cnt + 1, a[y]) - low;
				int v = low[p];
				low[p] = a[y];
				dfs(y, x);
				low[p] = v;
			}
		}
	}
}
int main() {
	cin >> n;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
	}
	for (int i = 1, u, v; i < n; i++) {
		cin >> u >> v;
		add(u, v);
		add(v, u);
	}
	low[++cnt] = a[1];
	ans[1] = cnt;
	dfs(1, 0);
	for (int i = 1; i <= n; i++) {
		cout << ans[i] << "\n";
	}
	return 0;
}

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

int main() {
  string n;
  cin >> n;
  int total = 0;
  rep(i, n.length()) {
    int x = n[i] - '0';
    total += x;
  }
  if (total % 9 == 0) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}

Measured memory_bytes: 3752
#include <stdio.h>

int main(void){
int daze,J,M,doJ,doM;
int Jdaze,Mdaze;
scanf("%d%d%d%d%d",&daze,&J,&M,&doJ,&doM);
Jdaze = doJ * daze;
Mdaze = doM * daze;
Jdaze -= J;
Mdaze -= M;
Jdaze /= doJ;
Mdaze /= doM;
if(Mdaze > Jdaze)Mdaze = Jdaze;
printf("%d\n",Mdaze);
return 0;
}

Measured memory_bytes: 1024
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;

string rev(string s) {
    reverse(s.begin(), s.end());
    return s;
}

int main() {
    ios::sync_with_stdio(false);
    int m;
    cin >> m;
    while (m--) {
        string s;
        cin >> s;
        vector<string> v;
        v.push_back(s);
        v.push_back(rev(s));
        for (int i=1; i<(int)s.size(); ++i) {
            string s1, s2, s3, s4;
            s1 = s.substr(0,i);
            s2 = s.substr(i);
            s3 = rev(s1);
            s4 = rev(s2);
            v.push_back(s3 + s2);
            v.push_back(s1 + s4);
            v.push_back(s3 + s4);
            v.push_back(s2 + s1);
            v.push_back(s4 + s1);
            v.push_back(s2 + s3);
        }
        sort(v.begin(), v.end());
        int res = 1;
        for (int i=1; i<(int)v.size(); ++i) {
            res += v[i-1] != v[i];
        }
        cout << res << endl;
    }
    return 0;
}

Measured memory_bytes: 1296
#include<bits/stdc++.h>
#define ll long long 
#define ull unsigned long long 
#define ld long double
#define ui unsigned int 
using namespace std;
int main()
{
	for (int i = 1; i <= 9; i++) {
		for (int j = 1; j <= 9; j++) {
			cout << i << "x" << j << "=" << i * j<<endl;
		}
	}
}




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

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

  string a, b, c;
  cin >> a >> b >> c;

  cout << a[0] << b[1] << c[2] << '\n';

  return (0);
}


Measured memory_bytes: 3596
/*   ꧁༒☬महाकाल☬༒꧂ ꧁༒ঔमहाकालঔ༒꧂
                   
                   ঔৣ۝महाकालᴳᵒᵈ۝ঔৣ            
 
 */ 
#include<bits/stdc++.h>
using namespace std;
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//template <typename T, typename cmp=less<T>> using oset =tree<T, null_type, cmp, rb_tree_tag, tree_order_statistics_node_update>;
#define ll long long 
#define mod 1000000007
#define inf 100000000000000
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define _it iterator
#define all(_x) _x.begin(),_x.end()
#define f first
#define s second
#define pb push_back
void mahakal(){
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	freopen("error.txt","w",stderr);
	#endif
}
#define ar array
const ll maxN=1e5+5 , N=1e3+5;
ll n ,m ;
ll a[maxN];
ll dp[maxN];
void solve(){
	cin>> n >> m ;
	dp[0]=0;
	for(ll i=0;i<n ;i++)cin>>a[i];
	for(ll i=1;i<n ;i++){
		dp[i]=1e9;
		for(ll j=1;j<=min(i,m) ; j++){
			dp[i]=min(dp[i] , dp[i-j]+abs(a[i]-a[i-j]));
			// cerr<<i<<" "<<i-j<<" "<<a[i]<<" "<<a[i-j]<<" "<<dp[i-j]<<endl;
			// cerr<<i<<" "<<dp[i-j]+abs(a[i]-a[i-j])<<endl;;
		}
	}
	// for(ll i=0;i<n ; i++)cerr<<dp[i]<<" ";
	cout<<dp[n-1]<<endl;
}
int main(){
	//mahakal(),fast;
	ll t=1;
	// cin>> t ;
	while(t--)solve();

	return 0;
}

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

#define int ll
#define rep(i,n) for(int i=0,i##_cond=(n);i<i##_cond;++i)
#define FOR(i,a,b) for(int i=(a),i##_cond=(b);i<i##_cond;++i)
using ll  = long long;
using vi  = vector<int>;
constexpr int mod = 1e9+7;

// map<int,int> pf(int n){
//   map<int,int> res;
//   int i = 2;
//   while(n != 1){
//     if(n % i == 0){
//       res[i]++;
//       n /= i;
//     }else
//       i++;
//   }
//   return res;
// }

map<int,int> pf(int n){
  map<int,int> res;
  FOR(i,2,n/2+1){
    if(n == 1) break;
    while(n%i == 0){
      res[i]++;
      n /= i;
    }
  }
  return res;
}

class ModuloCombination{
public:
  vector<ll> fact, fact_inv;

  static ll mod_pow(ll a, ll n){
    if(n == 0) return 1;
    if(n % 2 == 0) return mod_pow((a * a) % mod, n/2);
    return (a * mod_pow(a, n-1) % mod);
  }

  ModuloCombination(ll N):fact(N+1), fact_inv(N+1){ // N log Nで初期化
    fact[0] = 1;
    FOR(i, 1, N+1) fact[i] = (i * fact[i-1]) % mod;
    FOR(i, 0, N+1) fact_inv[i] = mod_pow(fact[i], mod-2);
  }

  ll op(ll n, ll r){ // nCr
    if(r < 0 or n < r) return 0;
    return fact[n] * fact_inv[r] % mod * fact_inv[n-r] % mod;
  }
};

main(){
  int n,m; cin >> n >> m;
  auto fact = pf(m);

  ModuloCombination C(n+30);
  int res = 1;
  for(auto x : fact){
    int tmp = C.op(n+x.second-1,x.second);
    tmp %= mod;
    res *= tmp;
    res %= mod;
  }
  cout << res << endl;
}

Measured memory_bytes: 1792
// 2015/03/17 Tazoe

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

int main()
{
	int N, M, p;
	cin >> N >> M >> p;

	int d[10001];
	d[0] = p;

	for(int i=1; i<=M; i++){
		cin >> d[i];
	}

	sort(d, d+M+1);

	int c_min = N-1;

	for(int i=0; i<M+1; i++){
		int c1 = ((d[i]+N-p)%N)*2+(p+N-d[(i+1)%(M+1)])%N;
		c_min = min(c_min, c1);

		int c2 = ((p+N-d[i])%N)*2+(d[(i-1+M+1)%(M+1)]+N-p)%N;
		c_min = min(c_min, c2);
	}

	cout << c_min*100 << endl;

	return 0;
}

Measured memory_bytes: 1212
#include <iostream>
#include <limits>
#include <numeric>
#include <string>
#include <algorithm>
#include <vector>
#include <math.h>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <utility>
using namespace std;
#define INF 100000000
#define REP(i, n) for(int (i)=0; (i)<(n); (i)++)
#define rep(i, n) for(int (i)=1; (i)<=(n); (i)++)
typedef pair<int, int> P;
typedef long long ll;
int main(){
    string S;
    cin >> S;
    int c1 = 0, c2 = 0;
    for(int i=0; i<S.size(); i++){
        if(i%2 == 0){ //黒比較
            if(S[i] == '1') c1++; 
        }
        else{   //白比較
            if(S[i] == '0') c1++;
        }
    }

    for(int i=0; i<S.size(); i++){
        if(i%2 == 0){   //白比較
            if(S[i] == '0') c2++;
        }
        else{   //黒比較
            if(S[i] == '1') c2++;
        }
    }

    cout << min(c1, c2) << endl;

    return 0;
}

Measured memory_bytes: 512
#include<stdio.h>
main()
{
  int i,n,out=0,c,poi;
  char ivent[100][8];

  scanf("%d",&n);

  for(i=0;i<n;i++){
    int rui[4]={0};
    poi=0;
    c=0;
    out=0;
    while(out<3){
      scanf("%s",ivent[c]);
      if(!strcmp(ivent[c],"HIT")){
	if(rui[3]==1){
	  poi++;
	  rui[3]=0;
	}
	if(rui[2]==1){
	  rui[3]=1;
	  rui[2]=0;
	}
	if(rui[1]==1){
	  rui[2]=1;
	  rui[1]=0;
	}
	rui[1]=1;
      }

      if(!strcmp(ivent[c],"OUT")){
	out++;
      }

      if(!strcmp(ivent[c],"HOMERUN")){
	poi++;
	if(rui[1]==1)
	  poi++;
	if(rui[2]==1)
	  poi++;
	if(rui[3]==1)
	  poi++;
	rui[1]=rui[2]=rui[3]=0;
      }
    }
    printf("%d\n",poi);
  }
  return 0;
}

Measured memory_bytes: 0
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		ArrayList<String> a= new ArrayList<String>();
		int n= in.nextInt();
		int m= in.nextInt();
		in.nextLine();
		for (int i = 0; i < n; i++) {
			a.add(in.nextLine());
		}
		Collections.sort(a);
		for(String c: a){
			System.out.print(c);
		}
		System.out.println();
	}
}


Measured memory_bytes: 10176
////////////////////////////////////////////////
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
namespace my {
char itoc(int i) { return i + '0'; }
int ctoi(char c) { return c - '0'; }
ll gcd(ll a, ll b) {  // O( log(a) )
  a = abs(a);
  b = abs(b);
  if (a < b) swap(a, b);
  while (b != 0) {
    a %= b;
    swap(a, b);
  }
  return a;
}
ll lcm(ll a, ll b) { return a * (b / my::gcd(a, b)); }  // O( log(a) )
bool isPrime(ll n) {                                    // O( sqrt(n) )
  bool flag = true;
  for (ll i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      flag = false;
      break;
    }
  }
  return flag;
}
vector<pair<ll, ll>> primeFac(ll n) {  // O( sqrt(n) )
  vector<pair<ll, ll>> ret;
  for (ll i = 2; i * i <= n; i++) {
    if (n % i != 0) continue;
    ll exp = 0;
    while (n % i == 0) {
      n /= i;
      exp++;
    }
    ret.push_back(make_pair(i, exp));
  }
  if (n != 1) ret.push_back(make_pair(n, 1));
  return ret;
}
template <typename T>
void input_vec(vector<T> &a, ll n) {
  for (ll i = 0; i < n; i++) {
    T tmp;
    cin >> tmp;
    a.push_back(tmp);
  }
}
template <typename T>
void input_set(set<T> &a, ll n) {
  for (ll i = 0; i < n; i++) {
    T tmp;
    cin >> tmp;
    a.insert(tmp);
  }
}
}  // namespace my
////////////////////////////////////////////////

int main() {
  int n, x, t;
  cin >> n >> x >> t;
  int ans;
  if (n % x == 0)
    ans = t * (n / x);
  else
    ans = t * (n / x + 1);
  cout << ans << endl;
}

Measured memory_bytes: 3628
import java.io.*;

public class Main {

  static final long MOD = 1000000007L;
  static final int MAX = 2000011;

  static long[] fac = new long[MAX];
  static long[] finv = new long[MAX];

  static long powerMOD(long a, long b){
    long result = 1L;
    while(b > 0){
      if(b % 2 == 1) result = (result * a) % MOD;
      a = (a * a) % MOD;
      b = (b>>1);
    }
    return result;
  }

  static void combIni(){
    fac[0] = 1; fac[1] = 1;
    finv[0] = 1; finv[1] = 1;
    for(int i = 2; i < MAX; i++){
      fac[i] = fac[i-1] * i % MOD;
      finv[i] = finv[i-1] * powerMOD(i, MOD - 2) % MOD;
    }
  }

  static long combMOD(int n, int r){
    if(n < r) return 0;
    if(n < 0 || r < 0) return 0;
    if(r == 0) return 1;
    return fac[n] * (finv[r] * finv[n-r] % MOD) % MOD;
  }

  public static void main(String[] args) throws IOException {

    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] in1 = br.readLine().split(" ");
    int r1 = Integer.parseInt(in1[0]);
    int c1 = Integer.parseInt(in1[1]);
    int r2 = Integer.parseInt(in1[2]);
    int c2 = Integer.parseInt(in1[3]);

    br.close();

    combIni();

    long ans = (combMOD(r2 + c2 + 2, r2 + 1) - 1
      + combMOD(r1 + c1, r1) - 1) % MOD;
    ans -= (combMOD(r1 + c2 + 1, r1) - 1 + combMOD(r2 + c1 + 1, c1) - 1) % MOD;
    while(ans < 0) ans += MOD;
    ans %= MOD;

    System.out.println(ans);
  }
}

Measured memory_bytes: 53460
N = int(input())
h = list(map(int, input().split(" ")))

counter = 0
while sum(h) != 0:
  flag = 0
  for i in range(N):
    if h[i] != 0:
      h[i] -= 1
      flag += 1
    elif h[i] == 0 and flag !=0:
      counter += 1
      flag = 0
  if flag != 0:
    counter+=1
            
print(counter)
       

Measured memory_bytes: 3060
N = int(input())
NM = 1000
fs = [list() for _ in range(NM+1)]

from collections import Counter
C = Counter()
for i in range(2, N+1):
  if len(fs[i]) == 0:
    for j in range(i, N+1, i):
      d = j
      while j % i == 0:
        fs[j].append(i)
        j //= i
        C[i] += 1

M = 10**9 + 7
ans = 1
for v in C.values():
  ans = (ans * (v+1)) % M
print(ans)
        
  


Measured memory_bytes: 3444
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;
typedef vector<int> VI;
const ll MOD = 1000000007;
#define REP(i, n) for(int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
int main() {
	int n;
	cin >> n;
	
	cout << 3 * n * n;

}

Measured memory_bytes: 256
#include <iostream>

using namespace std;
int main()
{
    string a;
    bool b = true;
    cin>>a;
    for (int i=0; i<a.size(); i=i+2)
    {
        if (a[i] == 'L')
        {
            b=false;
        }
    }
    for (int i=1; i<a.size(); i=i+2)
    {
        if (a[i]== 'R')
        {
            b=false;
        }
    }
    if (b==true)
    {
        cout<<"Yes";
    }
    else
    {
        cout<<"No";
    }
    return 0;
}

Measured memory_bytes: 256
# coding: utf-8
# Your code here!
N = int(input())
L = list(map(int, input().split()))
ans = 1

for n in range(N):
 ans = L[n]*ans
 if ans >= 1000000000000000001: ans = -1
 if ans == -1: break

for n in range(N):
 if L[n] == 0: ans = 0
print(ans)

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

struct Unionfind {
  // tree number
  vector<int> par;
  // constructor
  Unionfind(int n = 1) : par(n, -1) {}
  // search root
  int root(int x) {
    if (par[x] < 0) return x;
    return par[x] = root(par[x]);
  }
  // is same?
  bool issame(int x, int y) { return root(x) == root(y); }

  // add
  // already added, return 0
  bool uni(int x, int y) {
    x = root(x);
    y = root(y);
    if (x == y) return 0;
    if (par[x] > par[y]) swap(x, y);
    par[x] += par[y];
    par[y] = x;
    return 1;
  }
  int size(int x) { return -par[root(x)]; }
};

int n, m;
Unionfind uf;

int main() {
  cin >> n >> m;
  uf = Unionfind(n);
  for (int i = 0; i < m; ++i) {
    int a, b;
    cin >> a >> b;
    uf.uni(--a, --b);
  }
  int res = 0;
  for (int i = 0; i < n; ++i) res = max(res, uf.size(i));
  cout << res << endl;
  return 0;
}

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

int main()
{
  int len;
  cin >> len;
  vector<int> nums(len);
  for (int i = 0; i < len; i++)
  {
    cin >> nums.at(i);
  }
  sort(nums.begin(), nums.end());
  vector<int> dp(nums.at(len - 1) + 1);
  int ans = 0;
  for (int n : nums)
  {
    if (dp.at(n))
    {
      dp.at(n)++;
      continue;
    }
    for (int i = n; i < dp.size(); i += n)
    {
      dp.at(i)++;
    }
  }
  for (int n : nums)
  {
    if (dp.at(n) == 1)
    {
      ans++;
    }
  }
  cout << ans << endl;
}


Measured memory_bytes: 7948
package main

import "fmt"
import "strings"

var N int
var tmp string

type Stack []string

func NewStack() *Stack {
	var stack Stack
	stack = make([]string, 0, 0)
	return &stack
}

func (s *Stack) Push(st string) {
	*s = append(*s, st)
}

func (s *Stack) Pop() string {
	st := (*s)[len(*s)-1]
	if len(*s) == 1 {
		*s = make([]string, 0, 0)
	} else {
		*s = (*s)[:len(*s)-1]
	}
	return st
}

func (s *Stack) Len() int {
	return len(*s)
}

func (s *Stack) Last() string {
	return (*s)[len(*s)-1]
}

func (s *Stack) Index(i int) string {
	return (*s)[i]
}

func main() {
	fmt.Scan(&N)
	fmt.Scan(&tmp)
	info := strings.Split(tmp, "")
	stack := NewStack()
	for i := 0; i < len(info); i++ {
		if stack.Len() == 0 {
			stack.Push(info[i])
		} else {
			if stack.Last() == "(" && info[i] == ")" {
				stack.Pop()
			} else {
				stack.Push(info[i])
			}
		}
	}

	prefix := ""
	suffix := ""
	for i := 0; i < stack.Len(); i++ {
		//		fmt.Println(stack.Index(i))
		if stack.Index(i) == "(" {
			suffix += ")"
		} else {
			prefix += "("
		}
	}
	fmt.Println(prefix + tmp + suffix)

	/*
		var remove []int

		for {
			remove = make([]int, 0, 0)
			for i := 0; i < len(info)-1; i++ {
				if info[i] == "(" && info[i+1] == ")" {
					remove = append(remove, i)
					remove = append(remove, i+1)
				}
			}
			if len(remove) == 0 {
				break
			}
			for _, r := range remove {
				info = del(r, info)
			}
		}

		left := 0
		right := 0
		for i := 0; i < len(info); i++ {
			if info[i] == ")" {
				right += 1
			} else {
				left += 1
			}
		}

		prefix := ""
		suffix := ""
		for i := 0; i < left; i++ {
			suffix += ")"
		}
		for i := 0; i < right; i++ {
			prefix += "("
		}
		fmt.Println(prefix + tmp + suffix)
	*/

}

/*
func del(pos int, origin []string) []string {
	origin = append(origin[:pos], origin[pos+1:]...)
	return origin
}
*/


Measured memory_bytes: 640
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using pairll=pair<ll,ll>;
#define ABS(x) ( (x)>0 ? (x) : -(x) )

ll gcd(ll a, ll b) {
	if(a==0||b==0) return 0;
	if(a<b) swap(a,b);
	ll tmp = a%b;
	while(tmp!=0) {
		a = b;
		b = tmp;
		tmp = a%b;
	}
	return b;
}

ll factorial(ll x) {
	ll f=1;
	for(ll i=2; i<x; i++) {
		f*=i;
	}
	return f;
}

ll npr(ll n, ll r) {
	ll result=1;
	for(ll i=r+1; i<=n; i++) result*=i;
	return result;
}

bool IsPrime(ll num) {
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false; // 偶数はあらかじめ除く

    double sqrtNum = sqrt(num);
    for (ll i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            // 素数ではない
            return false;
        }
    }

    // 素数である
    return true;
}

ll GreaterBinarySearch(ll *array, ll key, ll max, ll min) {
	if(array[max]<array[min]) {
		return NULL;
	} else {
		ll mid = max + (min-max)/2;
		if(array[mid]<key) {
			return GreaterBinarySearch(array,key,max,mid-1);
		} if(array[mid]>key) {
			return GreaterBinarySearch(array,key,mid+1,min);
		} else {
			return mid;
		}
	}
}

int main() {
	int n,k; cin>>n>>k;
	int h[n]; for(int &hi: h) cin>>hi;
	ll score[n]; for(ll &sc: score) sc=1LL<<60;
	score[0]=0;

	for(int i=0; i<n; i++) {
		for(int j=1; j<=k; j++) {
			if(i+j>n-1) break;
			score[i+j] = min(score[i+j],score[i]+ABS(h[i+j]-h[i]));
		}
	}
	cout << score[n-1] << endl;
}

Measured memory_bytes: 1408
using System;
public class Hello{
    public static void Main(){
        string[] s = Console.ReadLine().Split(' ');
        int a = int.Parse(s[0]);
        int b = int.Parse(s[2]);
        if(s[1] == "+"){
            Console.WriteLine(a + b);
        }else if(s[1] == "-"){
            Console.WriteLine(a - b);
        }
    }
}


Measured memory_bytes: 11092
def li():
    return list(map(int, input().split()))
def mi():
    return map(int, input().split())
def ii():
    return int(input())
def lim(N):
    return [int(input()) for i in range(N)]

N = ii()
A = li()

bunbo = 0

for i in range(N):
    bunbo += 1 / A[i]

print(1 / bunbo)

Measured memory_bytes: 3060
n=int(input())
S=list(map(int,input().split(" ")))
q=int(input())
T=list(map(int,input().split(" ")))

def bs(A, key, left, right):
    if left > right:
        return -1
    else:
        mid=left+(right-left)//2
        #print(mid)
        if A[mid]>key:
            return bs(A, key, left,mid-1)
        elif A[mid]<key:
            return bs(A, key, mid+1,right)
        else:
            return mid
count=0
for i in T:
    if bs(S,i,0,n-1)!=-1:
        count+=1
print(count)


Measured memory_bytes: 16708
#include <iostream>
#include <string>
#include <vector>
using namespace std;

void _149() {
    string s, t;
    cin >> s >> t;
    cout << t + s << endl;
}

void _148() {
    int a, b;
    cin >> a;
    cin >> b;

    int c = 0;
    if ((a != 1) && (b != 1))
        c = 1;
    else if ((a != 2) && (b != 2))
        c = 2;
    else if ((a != 3) && (b != 3))
        c = 3;
    cout << c << endl;
}

void _147() {
    int a, b, c;
    cin >> a >> b >> c;

    if (a + b + c >= 22)
        cout << "bust" << endl;
    else
        cout << "win" << endl;
}

void _146() {
    string s;
    cin >> s;

    vector<string> list = {"SAT", "FRI", "THU", "WED", "TUE", "MON", "SUN"};
    for (int i = 0; i < list.size(); ++i) {
        if (s == list[i])
            cout << i + 1 << endl;
    }
}

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



Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
int main()
{
  int MAX=101010;
  vector<int> is_prime(MAX,1);
  is_prime[0]=0, is_prime[1]=0;
  for(int i=2; i<MAX; i++){
    if(!is_prime[i]) continue;
    for(int j=i*2; j<MAX; j+=i){
      is_prime[j]=0;
    }
  }

  vector<int> a(MAX,0);
  for(int i=0; i<MAX; i++){
    if(i%2==0) continue;
    if(is_prime[i] && is_prime[(i+1)/2]) a[i]=1;
  }

  vector<int> s(MAX+1,0);
  for(int i=0; i<MAX; i++){
    s[i+1]=s[i]+a[i];
  }

  int Q;
  cin >> Q;
  vector<int> ans;
  for(int q=0; q<Q; q++){
    int l,r;
    cin >> l >> r;
    r++;
    ans.push_back(s[r]-s[l]);
  }
  for(int i=0; i<ans.size(); i++){
    cout << ans.at(i) << endl;
  }
}

Measured memory_bytes: 2296
#include <iostream>
#include <cstdio>
#define ERROR return puts("No"), 0;
#define OK return puts("Yes"), 0;
using namespace std;
const int N = 1e5 + 5;
int n, m, head[N], tot, deg[N], mx, mxc, vis[N], A, B;
struct node{int to, nex;}a[N << 1];
inline int read()
{
	int x = 0, f = 1; char ch = getchar();
	while(ch < '0' || ch > '9') {if(ch == '-') f = -1; ch = getchar();}
	while(ch >= '0' && ch <= '9') {x = (x << 3) + (x << 1) + (ch ^ 48); ch = getchar();}
	return x * f;
}
void add(int x, int y) {a[++ tot].to = y; a[tot].nex = head[x]; head[x] = tot;}
void dfs(int x)
{
	vis[x] = 1;
	for(int i = head[x]; i; i = a[i].nex)
	{
		int y = a[i].to;
		if(vis[y] == 2) A ? B = y : A = y;
		else if(!vis[y]) dfs(y);
	}
}
int main()
{
//	freopen(".in", "r", stdin);
//	freopen(".out", "w", stdout);
	n = read(); m = read();
	for(int i = 1, x, y; i <= m; i ++)
	{
		x = read(); y = read();
		add(x, y); add(y, x);
		deg[x] ++; deg[y] ++;
	}
	for(int i = 1; i <= n; i ++)
	{
		if(deg[i] & 1) ERROR
		else if(deg[i] > mx) mx = deg[i], mxc = 1;
		else if(deg[i] == mx) mxc ++;
	}
	if(mx >= 6) OK
	else if(mx == 2 || mxc == 1) ERROR//mx==2 
	else if(mxc > 2) OK
	else
	{
		int cnt = 0;
		for(int i = 1; i <= n; i ++) if(deg[i] == 4) vis[i] = 2;
		for(int i = 1; i <= n; i ++) if(!vis[i]) A = B = 0, dfs(i), cnt += (A == B);
		puts(cnt ? "Yes" : "No");
	}
	fclose(stdin);
	fclose(stdout);
	return 0;
}


Measured memory_bytes: 3328
n,m,k=map(int,input().split())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
x,y=[0],[0]
for i in range(n):
    x.append(a[i]+x[i])
for j in range(m):
    y.append(b[j]+y[j])

ans=0
j=m
for i in range(n+1):
    if x[i]>k:
        break
    while y[j]>k-x[i]:
        j-=1
    ans=max(i+j,ans)
print(ans)

Measured memory_bytes: 47400
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <cmath>
#include <iomanip>

using namespace std;
using ll = long long;

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

ll GCD(ll x, ll y) {
    if (y == 0) return x;
    else return GCD(y, x % y);
}
int main()
{
    char X, Y;
    cin >> X >> Y;

    if (X < Y) { cout << "<" << endl; }
    else if (X > Y) { cout << ">" << endl; }
    else { cout << "=" << endl; }
}

Measured memory_bytes: 256
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

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

	void solver() {
		Scanner sc = new Scanner(System.in);
		long N = sc.nextLong();
		long P = sc.nextLong();
		long Q = sc.nextLong();
		long[] C = new long[(int)N];
		for (int i = 0; i < N; i++) {
			C[i] = sc.nextInt();
		}
		Long[] a = new Long[(int)N];
		for (int i = 0; i < N; i++) {
			a[i] = C[i] + i * P;
		}
		Arrays.sort(a, new Comparator<Long>() {
			@Override
			public int compare(Long o1, Long o2) {
				return -Long.compare(o1, o2);
			}
		});
		for (int i = 1; i < N; i++) {
			a[i] += a[i - 1];
		}
		long ans = P * N * (2 * Q + N - 1) / 2;
		long diff = N * (N - 1) * P / 2;
		// i + 1:?£??????§?£??????????????????°???
		for (int i = 0; i < N; i++) {
			ans = Math.max(ans, a[i] + P * (N - (i + 1)) * (2 * Q + 2 * (N - (i + 1) - 1)) / 2 - diff);
		}
		System.out.println(ans);
	}
}

Measured memory_bytes: 175664
n,p=map(int,input().split())
s=input()

count=0
if p==2:
    for i in range(n):
        if int(s[i])%2==0:
            count+=i+1
elif p==5:
    for i in range(n):
        if int(s[i])%5==0:
            count+=i+1
else:
    lis=[1]
    for i in range(n-1):
        lis.append((lis[i]*10)%p)
    lis.reverse()
    for i in range(n):
        lis[i]=(int(s[i])*lis[i])%p
    unum=[1]
    for i in range(p-1):
        unum.append(0)
    num=0
    for i in range(n):
        num=(num+lis[n-i-1])%p
        unum[num]+=1
    for i in range(p):
        unumi=unum[i]
        count+=(unumi*(unumi-1))*0.5
print(round(count))

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

int main()
{
    string x;
    int c=1,mx=0;
    cin>>x;
    for(int i=0; i<3; i++)
    {
        if(x[i]==x[i+1]) c++;
        else
        {
            if(c>mx) mx=c;
            c=1;
        }
    }
    if(c>mx) mx=c;

    if(mx>=3)
        cout<<"Yes"<<endl;
    else
        cout<<"No"<<endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,s,n) for(int i=s;i<n;i++)
#define pb push_back
#define all(x) (x).begin(),(x).end()
using namespace std;
using P=pair<int,int>;
using G=vector<vector<int>>;
using ll=long long;




int main(){
	ll n; cin>>n;
	ll t[n];
	rep(i,0,n) cin>>t[i];

	if(n==1){
		cout<<t[0]<<endl;
		return 0;
	}

	ll g=__gcd(t[0],t[1]);
	ll sai=t[0]/g * t[1];

	rep(i,1,n){
		//g=__gcd(g,t[i]);
		sai=sai/__gcd(sai,t[i]) *t[i];
	}
	
	cout<<sai<<endl;
}


Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int bfrv[][][] = new int[5][4][11];
        int b = 0;
        int f = 0;
        int r = 0;
        int v = 0;
        for (int i = 0; i < n; i++) {

            b = sc.nextInt();
            f = sc.nextInt();
            r = sc.nextInt();
            v = sc.nextInt();

            bfrv[b][f][r] += v;
            if (bfrv[b][f][r] < 0) {
                bfrv[b][f][r] = 0;
            }
        }
        for (int i = 1; i < 5; i++) {
            for (int j = 1; j < 4; j++) {
                for (int k = 1; k < 11; k++) {
                    System.out.print(" ");
                    System.out.print(bfrv[i][j][k]);
                }
                System.out.println("");
            }
            if (i != 4) {
                System.out.println("####################");
            }
        }
    }
}

Measured memory_bytes: 29424
#include <bits/stdc++.h>
using namespace std;
int a[203][203];
int gcd(int x,int y)
{
	int r;
	int m=x,n=y;
	do
	{
		r=m%n;
		m=n;
		n=r;	
	}while(r);
	a[x][y]=m,a[y][x]=m;
	return m;
}
int main()
{
	int n;
	long long ans=0;
	cin>>n;
	for(int i=1;i<=n;i++)
		for(int j=1;j<=n;j++)
			for(int k=1;k<=n;k++)
				if(a[i][j]==0)
					ans+=gcd(gcd(i,j),k);
				else
					ans+=gcd(a[i][j],k);
	cout<<ans<<endl;
	return 0;
}


 

Measured memory_bytes: 3764
#include<iostream>
#include<algorithm>
#include<functional>

using namespace std;

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

	int a[3];

	for(int i = 0; i < 3; i++) {
		cin >> a[i];
	}

	sort(a, a + 3, greater<int>());

	int ans = a[0] * 10 + a[1] + a[2];

	cout << ans << endl;

	return 0;
}



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

using namespace std;

int main(void) {

	int a, b, c,sum,s;

	cin >> a >> b >> c;

	s = (a + b + c) / 2;

	sum = sqrt(s*(s - a)*(s - b)*(s - c));

	printf("%d\n", sum);

	return 0;
}

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

using namespace std;

#define rg register
#define In inline
#define ll long long

const int N = 6000;

namespace IO{
	In int read(){
		int s = 0,ww = 1;
		char ch = getchar();
		while(ch < '0' || ch > '9'){if(ch == '-')ww = -1;ch = getchar();}
		while('0' <= ch && ch <= '9'){s = 10 * s + ch - '0';ch = getchar();}
		return s * ww;
	}
	In void write(int x){
		if(x < 0)x = -x,putchar('-');
		if(x > 9)write(x / 10);
		putchar('0' + x % 10);
	}
}
using namespace IO;

ll mod;

namespace ModCalc{
	In void Inc(ll &x,ll y){
		x += y;if(x >= mod)x -= mod;
	}
	In void Dec(ll &x,ll y){
		x -= y;if(x < 0)x += mod;
	}
	In ll Add(ll x,ll y){
		Inc(x,y);return x;
	}
	In ll Sub(ll x,ll y){
		Dec(x,y);return x;
	}
}
using namespace ModCalc;

ll power(ll a,ll n){
	ll x = a,s = 1;
	while(n){
		if(n & 1)s = s * x % mod;
		x = x * x % mod;
		n >>= 1;
	}
	return s;
}

int n;
ll jc[N+5],iv[N+5];
ll p2[N+5],p3[N+5];

void prepro(){
	jc[0] = 1;
	for(rg int i = 1;i <= N;i++)jc[i] = jc[i-1] * i % mod;
	iv[N] = power(jc[N],mod - 2);
	for(rg int i = N - 1;i >= 0;i--)iv[i] = iv[i+1] * (i + 1) % mod;
	p2[0] = 1;ll iv2 = power(2,mod - 2);
	for(rg int i = 1;i <= N;i++)p2[i] = p2[i-1] * iv2 % mod;
	p3[0] = 1;ll iv3 = power(3,mod - 2);
	for(rg int i = 1;i <= N;i++)p3[i] = p3[i-1] * iv3 % mod;
}

int main(){
//	freopen("AGC043D.in","r",stdin);
//	freopen("AGC043D.out","w",stdout);
	n = read() * 3,mod = read();
	prepro();
//cout << 1 << endl;
	ll ans = 0;
	for(rg int n3 = 0;3 * n3 <= n;n3++){
		for(rg int n2 = 0;n - 3 * n3 - 2 * n2 >= n2;n2++){
			int n1 = n - 3 * n3 - 2 * n2;
//cout << n1 << " " << n2 << " " << n3 << endl;
			Inc(ans,jc[n] * iv[n1] % mod * iv[n2] % mod * iv[n3] % mod * p2[n2] % mod * p3[n3] % mod);
//cout << ans << endl;
		}
	}
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 384
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using static System.Console;
using static System.Convert;
using static System.Math;

class Program
{
    static void Main(string[] args)
    {
        var nm = Array.ConvertAll(ReadLine().Split(' '),int.Parse);
        WriteLine((1900* nm[1]+(nm[0]-nm[1])*100)*Pow(2,nm[1]));

    }
}


Measured memory_bytes: 13140
while True:
 a, op, b = input().split()   # 3変数ともに文字列として読み込む
 a = int(a)                   # a を整数に変換
 b = int(b)                   # b を整数に変換
 if op=="+":
  print(a+b)
 elif op=="-":
  print(a-b)
 elif op=="/":
  print(a//b)
 elif op=="*":
  print(a*b)
 else:
  break



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

using namespace std;

typedef long long ll;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<vll> vvll;
typedef pair<ll, ll> pii;
typedef pair<string, ll> psi;
typedef pair<ll, string> pis;
typedef pair<ll, vll> plv;

#define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define REP(i, a, b) for(ll i=ll(a);i<=ll(b);++i)
#define REPR(i, a, b) for(ll i=ll(a);i>=ll(b);--i)
#define pb push_back
#define mp make_pair
#define all(v) (v).begin(),(v).end()

template<typename T>
T absolute(T a, T b) { return a >= 0 ? a : -a; }

template<typename T>
T sqr(T a) { return a * a; }

ll read() {
    ll res, f = 1;
    register char ch;
    while ((ch = getchar()) > '9' || ch < '0')(ch == '-') && (f = -1);
    for (res = ch - '0'; (ch = getchar()) >= '0' && ch <= '9'; res = res * 10 + ch - '0');
    return res * f;
}

int main() {
    fastio
    string s;
    cin >> s;
    ll b = 0, a = 0, r = 0, t = 1;
    for (ll i = 0; i < s.size(); ++i) {
        if((s[i]-'0')!= r)a++;
        else if((s[i]-'0')!= t)b++;
        r^=1,t^=1;
    }
    cout << min(a, b) << endl;
    return 0;
}

Measured memory_bytes: 512
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
S_MAP = lambda: map(str, INPUT().split())

sys.setrecursionlimit(10 ** 9)


def main():
    N = INT()

    ans = 0
    for i in range(N):
        X, U = S_MAP()
        ans += int(X) if U == "JPY" else float(X) * 380000

    print(ans)


if __name__ == '__main__':
    main()

Measured memory_bytes: 38256
import java.io.PrintWriter
import java.util.*
import java.math.*
import java.lang.*
import kotlin.comparisons.*

val pw = PrintWriter(System.out)
val MOD: Long = (1e+9 + 7).toLong()

fun main(args: Array<String>) {
    val w = read()

    println(if(w.all { c -> w.filter { it == c }.count() % 2 == 0 } ) "Yes" else "No")
    pw.flush()
}

/****** Declared Functions and Data Structures ******/
// IO
fun read() = readLine()!!
fun readInt() = read().toInt()
fun readLong() = read().toLong()
fun readDouble() = read().toDouble()
fun readListOfString() = read().split(" ")
fun readListOfInt() = readListOfString().map { it.toInt() }
fun readListOfLong() = readListOfString().map { it.toLong() }
fun readListOfDouble() = readListOfString().map { it.toDouble() }

fun Double.format(digits: Int) = String.format("%.${digits}f", this)
fun Float.format(digits: Int) = String.format("%.${digits}f", this)

fun print(value: Any) { pw.print(value) }
fun println(value : Any) { pw.println(value) }


// Extensions
fun<T> List<T>.toBuckets(bucketKeys: List<T>): Map<T, Int> {
    val buckets = bucketKeys.associate { t -> Pair(t, 0) }.toMutableMap()
    this.forEach { t ->
        buckets[t] = buckets[t]!! + 1
    }
    return buckets
}

fun <K, V> Map<K, V>.toMutableMap(): MutableMap<K, V> = HashMap(this)

// Util Functions
fun<T> permutations(src: List<T>): List<List<T>> {
    if(src.size == 1) return listOf(src)
    val perms = mutableListOf<List<T>>()
    val insertElement = src[0]
    permutations(src.drop(1)).forEach { perm ->
        for(i in 0..perm.size) {
            val newPerm = perm.toMutableList()
            newPerm.add(i, insertElement)
            perms.add(newPerm.toList())
        }
    }
    return perms
}

// return nCr, if you want nCr, please access v[n][r]
fun combinations(n: Long): List<List<Long>> {
    val v = (0..n).map { (0..n).map{0L}.toMutableList() }.toMutableList()
    for(i in 0 until v.size) {
        v[i][0] = 1L
        v[i][i] = 1L
    }
    for(i in 0 until v.size) {
        for(j in 1 until i) {
            v[i][j] = (v[i-1][j-1] + v[i-1][j]) % MOD
        }
    }
    return v.map { it.toList() }.toList()
}

// should be a >= b
fun gcd(a: Long, b: Long): Long = 
    if(b == 0L) a else gcd(b, a % b)

// shoud be a >= b
fun lcm(a: Long, b: Long): Long = 
    a / gcd(a, b) * b

fun sumDigits(num_: Long): Long {
    var num = num_
    var rtn: Long = 0
    while(num != 0.toLong()) {
        val tmp = num % 10
        rtn += tmp
        num /= 10
    }
    return rtn
}

fun Double.isDecimal(): Boolean = ((this - Math.floor(this)) != 0.0)

// Data Structures
class Stack<T>(private var st: MutableList<T> = mutableListOf<T>()) {
    fun isEmpty() = st.isEmpty()
    fun top(): T = st.last()
    fun push(e: T) { st.add(e) }
    fun pop() { st = st.dropLast(1).toMutableList() }
}

class Queue<T>(private var que: MutableList<T> = mutableListOf<T>()) {
    fun isEmpty() = que.isEmpty()
    fun top(): T = que.first()
    fun push(e: T) { que.add(e) }
    fun pop() { que = que.drop(1).toMutableList() }
}


Measured memory_bytes: 33736
#include <bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(0); cin.tie(); cout.tie();

#define MAXX 500005
#define PI 3.14159265358979323846264338327950
#define F first
#define S second
#define ll   long long int
#define mod  1000000007



int main()
{
	FAST;
	ll n;
	cin >> n;
	ll t;
	cin >> t;
	ll c, d;
	ll mn = 1000;
	bool a = false;
	for(ll i = 0; i < n; i ++){
		cin >> c >> d;
		if(d <= t){
			mn = min(mn, c);
			a = true;
		}
	}
	if(a){
		cout << mn;
	}
	else{
		cout << "TLE";
	}
}

Measured memory_bytes: 3540