akhauriyash/Code-Regression huggingface dataset:
using System;
using System.Collections.Generic;
class Program{
  public static void Main(string[] args){
    var S = new char[600000];
    string input = Console.ReadLine();
    int stidx = (600000 - input.Length) / 2, edidx = stidx + input.Length;
    for(var i=0; i<input.Length; i++){
      S[stidx + i] = input[i];
    }
    Console.ReadLine();
    bool reverse = false;
    while((input = Console.ReadLine()) != null){
      if(input == "1"){
        reverse = !reverse;
      }else{
        var prms = input.Split(' ');
        if(prms[1] == "1" ^ reverse){
          S[--stidx] = prms[2][0];
        }else{
          S[edidx++] = prms[2][0];
        }
      }
    }
    if(reverse){
        for(var i=0; i<(edidx-stidx+1)/2; i++){
          char a = S[stidx+i];
          S[stidx+i] = S[edidx-i-1];
          S[edidx-i-1] = a;
        }
    }
    Console.WriteLine(new string(S, stidx, edidx-stidx));
  }
}

Measured memory_bytes: 19380
#include <iostream>
#include <string>
#include <map>

int main(){
    using namespace std;

    int n;
    cin >> n;
    map<string, bool> dic;
    for(int i = 0; i < n; i++){
        string op, obj;
        cin >> op >> obj;
        if(op == "insert"){
            dic[obj] = true;
        }else{
            if(dic.count(obj)){
                cout << "yes" << endl;
            }else{
                cout << "no" << endl;
            }
        }
    }
    return 0;
}


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

int main() {
  int N, K;
  cin >> N >> K;
  vector<double> V(N);
  rep(i,0,N-1) {
    int p;
    cin >> p;
    V[i] = (p + 1) / 2.0;
  }

  double sum = 0;
  rep(i,0,K-1) sum += V[i];
  double ans = sum;
  for(int i = 1; i + K <= N; i++) {
    sum -= V[i-1];
    sum += V[i+K-1];
    ans = max(ans, sum);
  }

  printf("%.10f\n", ans);
  return 0;
}


Measured memory_bytes: 1792
use std::vec::Vec;

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

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

fn main() {
    let (t, x) = {
      let v: Vec<f64> = read_vec();
      (v[0], v[1])
    };

    println!("{}", t / x);

}


Measured memory_bytes: 4352
from collections import Counter

N = int(input())
A = list(map(int, input().split()))
counter = dict(Counter(A))
four = []
tow = []
for key in counter.keys():
    if counter[key] >= 4:
        four.append(key)
        tow.append(key)
    elif counter[key]>=2:
        tow.append(key)

if len(four) == 0 and len(tow) <= 1:
    print(0)
else:
    ans = 0
    four.sort(reverse=True)
    tow.sort(reverse=True)
    if len(four) >= 1:
        ans = max(ans, four[0]**2)
    if len(tow) >= 2:
        ans = max(ans, tow[1] * tow[0])
    print(ans)

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

typedef long double ld;

const ld EPS = 1e-9;
const ld INF = 1e10;
const ld PI = M_PI;

struct Point{
  ld x, y;
  Point(ld x, ld y):x(x), y(y){}
  Point(){}
};

Point operator+(const Point &a, const Point &b){
  return Point(a.x + b.x, a.y + b.y);
}
Point operator-(const Point &a, const Point &b){
  return Point(a.x - b.x, a.y - b.y);
}
Point operator*(const Point &a, const ld b){
  return Point(a.x * b, a.y * b);
}
Point operator*(const Point &a, const Point &b){
  return Point(a.x*b.x-a.y*b.y, a.x*b.y+a.y*b.x);
}
Point operator/(const Point &a, const ld b){
  return Point(a.x / b, a.y / b);
}

ld cross(const Point &a, const Point &b){
  return a.x*b.y - a.y*b.x;
}

ld dot(const Point &a, const Point &b){
  return a.x*b.x + a.y*b.y;
}

ld norm(const Point &a){
  return dot(a, a);
}

struct Line:vector<Point>{
  Line(Point a = Point(0, 0), Point b = Point(0, 0)){
    this->push_back(a);
    this->push_back(b);
  }
};

bool is_orthogonal(const Line &l1, const Line &l2){
  return dot(l1[0]-l1[1], l2[0]-l2[1]) == 0.0;
}

bool is_parallel(const Line &l1, const Line &l2){
  return cross(l1[0]-l1[1], l2[0]-l2[1]) == 0.0;
}

int main(){  
  int q;
  cin >> q;
  while(q--){
    Point p0, p1;
    Line l1, l2;
    cin >> p0.x >> p0.y >> p1.x >> p1.y;
    l1 = Line(p0, p1);
    
    cin >> p0.x >> p0.y >> p1.x >> p1.y;
    l2 = Line(p0, p1);
    
    if(is_orthogonal(l1, l2)) cout << 1 << endl;
    else if(is_parallel(l1, l2)) cout << 2 << endl;
    else cout << 0 << endl;
  }
  
  return 0;
}

Measured memory_bytes: 1236
// https://atcoder.jp/contests/abc114/tasks/abc114_d

#include <bits/stdc++.h>

using namespace std;

#define REP(i,n)   for(int i=0; i<(int)(n); i++)
#define FOR(i,b,e) for(int i=(b); i<=(int)(e); i++)
#define DUMP(a, n) REP(_i, n) printf("%d%c", a[_i], _i + 1 == n ? '\n' : ' ')
#define DUMP2D(a, n, m) REP(_i, n) REP(_j, m) printf("%d%c", a[_i][_j], _j + 1 == m ? '\n' : ' '); puts("")
#define ITR(c,it)  for(auto it = c.begin(); it != c.end(); it++)

//------------------------------------------------------------------------------
map<int, int> factorial_prime_factor(int n) {
  map<int, int> res;
  for (int m = 2; m <= n; m++) {
    int k = m;
    for (int i = 2; i * i <= k; i++) {
      while (k % i == 0) {
        res[i]++;
        k /= i;
      }
    }
    if (k != 1) res[k]++;
  }
  return res;
}

//------------------------------------------------------------------------------
const int N_MAX = 100;

int N;
map<int, int> pd;
vector<int>vs;

void solve() {
  pd = factorial_prime_factor(N);
  ITR(pd, it) vs.push_back(it->second);
  int L = vs.size();
  // DUMP(vs, L);
  int ans = 0;
  REP(i, L) {
    if (vs[i] >= 74) ans++;
    REP(j, L) {
      if (j == i) continue;
      if (vs[i] >= 4 && vs[j] >= 14) ans++;
      if (vs[i] >= 2 && vs[j] >= 24) ans++;
      REP(k, L) {
        if (k == i || k == j) continue;
        if (vs[i] >= 2 && vs[j] >= 4 && vs[k] >= 4 && j < k) ans++;
      }
    }
  }
  printf("%d\n", ans);
}

void input() {
  scanf("%d", &N);
}

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


Measured memory_bytes: 256
//https://atcoder.jp/contests/sumitrust2019/tasks/sumitb2019_d
#include <bits/stdc++.h>
#if LOCAL
#include "dump.hpp"
#else
#define dump(...)
#endif
using namespace std;
using ll=long long;
const ll LINF = 0x1fffffffffffffff;
#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
template<class T>bool chmax(T &a, const T &b) {if (a<b) { a=b; return 1; } return 0;}
template<class T>bool chmin(T &a, const T &b) {if (b<a) { a=b; return 1; } return 0;}
int main() {
  ll N; cin>>N;
  string S; cin>>S;

  auto check=[&](vector<ll> vec){
    ll p=0;
    FOR(i,0,S.size()){
      ll v= S.at(i)-'0';
      if(vec.at(p)==v){
        ++p;
        if(p==vec.size())return true;
      }
    }
    return false;
  };
  ll ans=0;
  FOR(i,0,10){
    FOR(j,0,10) FOR(k,0,10){
      if (check({i,j,k})){
        ++ans;
      }
    }
  }
  cout<<ans<<endl;  
  return 0;
}

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

class UnionFind {
	vector<int>par, sz;
public:
	UnionFind() {}
	UnionFind(int n) {
		par = sz = vector<int>(n);
		for (int i = 0; i < n; i++) {
			par[i] = i;
			sz[i] = 1;
		}
	}
	int find(int x) {
		if (par[x] == x)return x;
		return par[x] = find(par[x]);
	}
	void unite(int x, int y) {
		x = find(x); y = find(y);
		if (x == y)return;
		if (sz[x] > sz[y]) {
			par[y] = x;
			sz[x] += sz[y];
		}
		else {
			par[x] = y;
			sz[y] += sz[x];
		}
	}
	bool same(int x, int y) {
		return find(x) == find(y);
	}
	int size(int x) {
		return sz[find(x)];
	}
};
int main(){
	int n,m;cin>>n>>m;
	UnionFind uf(n);
	rep(i,m){
		int x,y,z;cin>>x>>y>>z;x--;y--;
		uf.unite(x,y);
	}
	int ans=0;
	rep(i,n){
		if(uf.find(i)==i)ans++;
	}
	cout<<ans<<endl;
}

Measured memory_bytes: 4028
#include <stdio.h>

int main(){
	double a,b,c,d,e,f, x,y,dd;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)>0){
		dd = (a*e-b*d);
		x=(c*e-b*f-(c*b*d)/a+(c*d*b)/a)/dd;
		y=(a*f-c*d)/dd;
		if(x==0)x=0;
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}

Measured memory_bytes: 0
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <stack>
using namespace std;
using ll = long long;
using ull = unsigned long long;
int main(int argc, char *argv[]) {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);//incompatible with `while (cin >> ...)'
    int a, b;
    cin >> a >> b;
    if ((a & 1) == 0 || (b & 1) == 0) {
        cout << "No" << endl;
    }
    else {
        cout << "Yes" << endl;
    }
    return 0;
}

Measured memory_bytes: 256
#include <stdio.h>


int main(void){
  int n;
  int no=1;

  scanf("%d",&n );

  for (int i = 1; i <= 9; i++) {
    if (n/i<=9 && n%i==0) {
      puts("Yes");
      no=0;
      break;
    }
  }

  if(no==1){
    puts("No");
  }

  return 0;
}


Measured memory_bytes: 128
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<sstream>
#include<cstdio>
#include<ctime>
#include<utility>
#include<cstdlib>
#include<iterator>
#include<queue>
#include<stack>
using namespace std;
typedef long long llong;
typedef unsigned long long ullong;
typedef unsigned int uint;
#define int long long
const int INF = 9223372036854775807;


namespace G {
}
//vector<vector<char>> map;
//vector<vector<bool>> flag;
int w, h;
int ans = 0;
int X, Y; //@?????????
queue<pair<int, int>> que;

/*
void check() {
	auto xy = que.front();
	que.pop();
	int x = xy.first;
	int y = xy.second;
	if (!flag[x][y]) {
		ans += 1;
		flag[x][y] = true;
	}
	else return;
	
	if ((map[x + 1][y] == '.') && (!flag[x + 1][y])) que.push(pair<int, int>(x + 1, y));
	if ((map[x - 1][y] == '.') && (!flag[x - 1][y])) que.push(pair<int, int>(x - 1, y));
	if ((map[x][y + 1] == '.') && (!flag[x][y + 1])) que.push(pair<int, int>(x, y + 1));
	if ((map[x][y - 1] == '.') && (!flag[x][y - 1])) que.push(pair<int, int>(x, y - 1));
}
*/

void check(vector<vector<char>> &map, vector<vector<bool>> &flag) {
	auto xy = que.front();
	que.pop();
	int x = xy.first;
	int y = xy.second;
	if (!flag[x][y]) {
		ans += 1;
		flag[x][y] = true;
	}
	else return;

	if ((map[x + 1][y] == '.') && (!flag[x + 1][y])) que.push(pair<int, int>(x + 1, y));
	if ((map[x - 1][y] == '.') && (!flag[x - 1][y])) que.push(pair<int, int>(x - 1, y));
	if ((map[x][y + 1] == '.') && (!flag[x][y + 1])) que.push(pair<int, int>(x, y + 1));
	if ((map[x][y - 1] == '.') && (!flag[x][y - 1])) que.push(pair<int, int>(x, y - 1));
}



signed main() {
	cin >> w >> h;
	while ((w != 0) && (h != 0)) {
		vector<vector<char>> map;
		vector<vector<bool>> flag;
		//cout << "w=" << w << " h=" << h << endl << endl;
		map = vector<vector<char>>(h + 2, vector<char>(w + 2,'#'));
		flag = vector<vector<bool>>(h + 2, vector<bool>(w + 2,true));
		for (int i = 1; i < h + 1; ++i) {
			for (int j = 1 ; j < w + 1; ++j) {
				cin >> map[i][j];
				flag[i][j] = false;
				if (map[i][j] == '@') {
					X = j;
					Y = i;
				}
			}
		}

		//cout << "map=" << map.size() << " map1=" << map[0].size() << endl;
		//cout << "X=" << X << " Y=" << Y << endl;

		ans = 0;
		while (!que.empty()) que.pop();
		que.push(pair<int,int>(Y,X));
		while (!que.empty()) {
			check(map,flag);
		}


		/*
		for (auto ngo : map) {
			for (auto ngoo : ngo) {
				cout << ngoo;
			}cout << endl;
		}
		cin >> w >> h;
		*/
		cout << ans << endl;
		cin >> w >> h;
	}
	return 0;
}


Measured memory_bytes: 3120
#include<iostream>
#include<algorithm>
#include<iomanip>
using namespace std;
int n,a,b;
long long c[60];

long long V(int x,int y){
	long long ret=1;
	for(int i=1;i<=x;i++){
		ret*=y;ret/=i;
		y--;
	}
	return ret;
}

int main(){
	cin>>n>>a>>b;
	for(int i=0;i<n;i++)cin>>c[i];
	sort(c,c+n,greater<long long>());
	
	long long cnt=0,ans;
	for(int i=0;i<a;i++)cnt+=c[i];
	
	long long x=0;
	for(int i=0;i<n;i++){
		if(c[i]==c[a-1])x++;
	}
	
	if(c[0]==c[a-1]){
		ans=0;
		for(int i=a;i<=b;i++){
			ans+=V(i,x);
		}
	}
	
	else{
		int r=0;
		for(int i=a-1;i>=0;i--){
			if(c[i]!=c[a-1])break;
			r++;
		}
		ans=V(r,x);
	}
	cout<<fixed<<setprecision(10)<<cnt/(a+0.0)<<endl;
	cout<<ans<<endl;
	return 0;
}


Measured memory_bytes: 256
#define _USE_MATH_DEFINES
#include<iostream>
#include<string>
#include<vector>
#include<list>
#include<algorithm>
#include<math.h>
#include<map>
#include<iomanip>
#include<functional>
#include<limits>
#include <unordered_map>
#include <numeric>
#include <array>
#include <queue>
#include <chrono>
#include <random>
#include <fstream>


using namespace std;
using  ull = unsigned long long int;

#define rep(i,n,m) for(long long int i=n;i<(long long int)(m);i++)
#define INF (1<<29)
#define MD 1000000007




int main() {
	int h, w;
	cin >> h >> w;

	vector<vector<char>>map(h, vector<char>(w));

	bool flag = true;

	vector<vector<bool>>b_map(h, vector<bool>(w, true));


	rep(i, 0, h) {
		flag = true;
		rep(j, 0, w) {
			cin >> map[i][j];
			if (map[i][j] == '#')flag = false;
		}
		if (flag) {
			rep(j, 0, w) {
				b_map[i][j] = false;
			}
		}
	}
	
	rep(i, 0, w) {
		flag = true;
		rep(j, 0, h) {
			if (map[j][i] == '#')flag = false;
		}
		if (flag) {
			rep(j, 0, h) {
				b_map[j][i] = false;
			}
		}
	}

	rep(i, 0, h) {
		flag = false;
		rep(j, 0, w) {
			if (b_map[i][j]) {
				cout << map[i][j];
				flag = true;
			}
		}
		if(flag)cout << endl;
	}






	
	return 0;
}

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

#define pb          push_back
#define F           first
#define S           second
#define rep(i,a,b)  for(int i=a; i<b; i++)
#define all(a)      (a).begin(),(a).end()
#define wa(x)       cout << (#x) << " -------- " << (x) << endl
#define line1	    printf("---------------------------\n")

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;

void pvi(auto v){
	for(auto it:v) cout << it << " ";
	cout << endl;
}

void solve();
signed main() {
	//ios_base::sync_with_stdio(false); cin.tie(NULL);

	int t=1; 
	//cin>>t;
	while(t--) solve();
	return 0;
}

//___________________________________________________________________________________________________________

void solve() {

	int n;
	cin>>n;

	vi a(1e5+5,0);
	vi b(1e5+5,0);

	rep(i,0,n){
		int t;
		cin>>t;
		if(i%2==0) a[t]++;
		else b[t]++;
	}

	int ma = max_element(all(a)) - a.begin();
	int mb = max_element(all(b)) - b.begin();

	if(ma == mb){

		int t;

		t = a[ma];
		a[ma] = -1;
		int ma2 = max_element(all(a)) - a.begin();
		a[ma] = t;

		t = b[mb];
		b[mb] = -1;
		int mb2 = max_element(all(b)) - b.begin();
		b[mb] = t;

		assert(ma != ma2);
		assert(mb != mb2);
		assert(ma != mb2);
		assert(mb != ma2);

		cout << min(n-a[ma]-b[mb2], n-a[ma2]-b[mb]) << endl;
	}

	else cout << n - a[ma] - b[mb] << endl;
}

Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ll long long
#define Author std::ios_base::sync_with_stdio(0);
#define ABHISHEK_SHARMA cout.tie(0);
#define IIIT_ALLAHABAD cin.tie(0);

int main(){
    //Booster
    Author
        ABHISHEK_SHARMA
        IIIT_ALLAHABAD
    //Driver Code here
    ll n, i, l, h, m, ans=0;
    cin>>n;
    ll a[n];
    for(i=0; i<n; i++){
        cin>>a[i];
    }
    for(i=0; i<n; i++){
        ans=ans+a[i]-1;
    }
    cout<<ans;
    return 0;
}

Measured memory_bytes: 256
#include<stdio.h>
int main(void){
    double x[50],min,max;
    scanf("%lf",&x[0]);
    min=x[0]; max=x[0];
    int i=1;
    while(scanf("%lf",&x[i])!=EOF){
        if(min>x[i]){
            double a;
            a=min; min=x[i]; x[i]=a;
        }
        if(max<x[i]){
            double a;
            a=min; max=x[i]; x[i]=a;
        }
        i++;
    }
   printf("%lf\n",max-min);
    return 0;
}


Measured memory_bytes: 2100
//M(int*a){return*a-*1[&a];}
M(int*a,int*b){return*a-*b;}
linearize(t){
	return t/100*60+t%100;
}
main(){
	int n,p,q,e[1000],en,k,cp,cq,i,longest;
	for(;scanf("%d%d%d",&n,&p,&q),n;){
		p=linearize(p);
		q=linearize(q);
		en=0;
		for(i=0;i<n;i++){
			scanf("%d",&k);
			for(;k--;){
				scanf("%d%d",&cp,&cq);
				cp=linearize(cp);
				cq=linearize(cq);
				e[en++]=cp*2+1;//bit0:1=Jn,0=I¹
				e[en++]=cq*2+0;
			}
		}
		qsort(e,en,4,M);
		cp=p;//Ôgð©nß½
		k=0;//»ÝÌCM
		longest=0;
		for(i=0;i<en;i++){
			int t=e[i]/2;
			if(t>q)
				break;
			if(e[i]%2==1){//CMJn
				if(++k==n){//SChªCM
					int t=e[i]/2-cp;
					if(t>longest)
						longest=t;
				}
			}else{//CMI¹
				if(k--==n){//SChªCMÅÍÈ­ÈÁ½
					cp=e[i]/2;
				}
			}
		}
		if(k<n&&q-cp>longest)
			longest=q-cp;
		printf("%d\n",longest);
	}
	exit(0);
}

Measured memory_bytes: 0
#include<vector>
#include<cmath>
#include<map>
#include<cstdlib>
#include<iostream>
#include<sstream>
#include<fstream>
#include<string>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<set>
#include<stack>
#include<bitset>
#include<functional>
#include<ctime>
#include<queue>
#include<deque>
#include<complex>
#include<cassert>
using namespace std;
#define pb push_back
#define pf push_front
typedef long long lint;
typedef complex<double> P;
#define mp make_pair
#define fi first
#define se second
typedef pair<int,int> pint;
#define All(s) s.begin(),s.end()
#define rAll(s) s.rbegin(),s.rend()
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
int main()
{
	lint n,m,lo=0,hi=1145141919810893LL;
	cin>>n>>m;
	while(hi>lo){
		lint mi=(lo+hi+1)/2;
		lint nm=m-max(0LL,mi-n)*2;
		if(nm>=mi*2) lo=mi;else hi=mi-1;
	}
	cout<<lo<<endl;
}


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

lint binpow(lint n, lint x, lint mod)
{
  lint tgt = 1;
  lint dig = n;
  while (x > 0) {
    if (x%2) {
      tgt = (tgt * dig) % mod;
    }
    dig = (dig * dig) % mod;
    x /= 2;
  }
  return tgt;
}

class Comb
{
private:
  lint mod;
  vector< lint > fact;
  vector< lint > factf;
public:
  Comb(lint size, lint mod) : mod(mod), fact(size+1, 0), factf(size+1, 0) {
    fact[0] = 1;
    factf[0] = 1;
    for (lint i = 1; i <= size; ++i) {
      fact[i] = fact[i-1]*i%mod;
      factf[i] = binpow(fact[i], mod-2, mod);
    }
  }
  lint comb(lint n, lint k) {
    if (n<k) return 0;
    if (k==0 || n==k) return 1;
    return ((fact[n] * factf[k]) % mod * factf[n-k]) % mod;
  }
};

int main(void)
{
  cin.tie(0);
  ios::sync_with_stdio(false);
  lint mod = 1e9+7;
  Comb comb(2e5, mod);
  lint h, w, a, b;
  cin >> h >> w >> a >> b;
  lint ans = 0;
  for (lint i=0; i<h-a; ++i) {
    ans += comb.comb(i+b-1, i) * comb.comb(h-i-1+w-b-1, h-i-1) % mod;
    ans %= mod;
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 3328
#include<bits/stdc++.h>
using namespace std;
long long koyakusuu(long long a,long long b){
  long long r;
  r=a%b;
  long long c;
  c=r;
  if(r==0){
    return b;
  }
  else{
    koyakusuu(b,c);
  }
}
    
int main(){
  int N;
  cin>>N;
  vector<long long>rec(N);
  for(int i=0;i<N;i++){
    cin>>rec.at(i);
  }
  sort(rec.begin(),rec.end());
  long long seki;
  long long minmin;
  minmin=rec.at(0);
  for(int i=1;i<N;i++){
    long long l;
    l=minmin;
    minmin=l/koyakusuu(l,rec.at(i))*rec.at(i);
  }
  cout<<minmin<<endl;
}

Measured memory_bytes: 256
use std::io::Read;

fn read<T: std::str::FromStr>() -> T {
    let stdin = std::io::stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let s: String = read();
    let n = s.len();
    let mut res = 0;
    for i in 0..n / 2 {
        if s.as_bytes()[i] != s.as_bytes()[n - i - 1] {
            res += 1;
        }
    }

    println!("{}", res);
}


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

int main(){
  int N;
  string s;
  int count = 0;
  int countNO = 0;
  cin >> N;
  cin >> s;
  for(int i=0; s[i] != '\0'; i++){
    if(s[i] == 'R') count++;
    else countNO++;
  }
  if(count > countNO) cout << "Yes";
  else cout << "No";
  return 0;
}


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

#define ll long long
#define ld long double
#define precision(x,d) cout<<fixed<<setprecision(d)<<x
#define all(x) x.begin(),x.end()
#define IOS ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);srand(time(NULL));
#define MOD 1000000007
#define INF LONG_LONG_MAX
#define NINF LONG_LONG_MIN
#define endl "\n"
#define yes cout<<"YES"<<endl
#define no cout<<"NO"<<endl

ll mod_pow(ll a,ll b)
{
    ll ans = 1;
    while(b)
    {
        if(b%2)
            ans = (ans*a)%MOD;
        a = (a*a)%MOD;
        b /= 2;
    }
    return ans;
}

int main()
{
    IOS;
    ll t,k,n,d,m,u,v;
    t=1;
    //cin >> t;
    while(t--)
    {
        cin >> n;
        ll ans = 1;
        ans = mod_pow(10,n);
        ans -= 2*mod_pow(9,n);
        ans = (ans+mod_pow(8,n))%MOD;
        if(ans<0)
            ans += MOD;
        cout << ans << endl;
    }
    return 0;
}
//ctrl+c


Measured memory_bytes: 3640
#include <cstdio>
using namespace std;
long long N;
long long X, M;
long long ans;
bool ud[100010];
long long ls[100010];
int lp, lsu;
int main()
{
	scanf("%lld %lld %lld", &N, &X, &M);
	ud[X] = true;
	ls[1] = X; 
	for (int i = 2; i <= 100010; i++)
	{
		X = X*X%M;
		if (ud[X])
		{
			lp = X;
			lsu = i-1;
			break;
		}
		else
		{
			ud[X] = true;
			ls[i] = X;
		}
	}
	if (N <= lsu)
	{
		for (int i = 1; i <= N; i++)
		{
			ans += ls[i];
		}
	}
	else
	{
		int i;
		for (i = 1; i <= lsu; i++)
		{
			if (ls[i] != lp)
			{
				ans += ls[i];
			}
			else
			{
				break;
			}
		}
		long long sm = 0;
		for (int j = i; j <= lsu; j++)
		{
			sm += ls[j];
		}
		ans += ((N-(i-1)) / (lsu-i+1)) * sm;
		int rs;
		rs = (N-(i-1)) % (lsu-i+1);
		for (int j = 0; j < rs; j++)
		{
			ans += ls[i+j];
		}
	}
	printf("%lld\n", ans);
	return 0;
}

Measured memory_bytes: 2216
// pub mod my_io {
//     use std::io::stdin;
//     use std::str::FromStr;
//
//     pub fn read_line<T>() -> Vec<T>
//     where
//         T: FromStr,
//         <T as std::str::FromStr>::Err: std::fmt::Debug,
//     {
//         let mut s = String::new();
//         stdin().read_line(&mut s).ok();
//         s.trim()
//             .split_whitespace()
//             .map(|x| x.parse().unwrap())
//             .collect()
//     }
// }
//
// use my_io::read_line;

use std::io::stdin;
use std::str::FromStr;

fn read_line<T>() -> Vec<T>
where
    T: FromStr,
    <T as std::str::FromStr>::Err: std::fmt::Debug,
{
    let mut s = String::new();
    stdin().read_line(&mut s).ok();
    s.trim()
        .split_whitespace()
        .map(|x| x.parse().unwrap())
        .collect()
}

fn main() {
    let res: Vec<i32> = read_line();
    println!("{} {} {}", res[2], res[0], res[1]);
}


Measured memory_bytes: 4352
import java.util.Scanner;

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

    private void run() {
        Scanner scanner = new Scanner(System.in);
        int K = scanner.nextInt();
        int X = scanner.nextInt();

        for(int i = X - (K -1); i < X + K; i ++) {
            System.out.print(i);
            if(i+1 < X + K)System.out.print(" ");
        }


    }
}


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

int main()
{
  int a,b[200];
  scanf("%d",&a);
  int i,mi=9999999999,ma=0;
  for(i=0;i<a;i++)
  {
      scanf("%d",&b[i]);
      if(b[i]>ma)
         ma=b[i];
      if(b[i]<mi)
         mi=b[i];
  }
  a=ma-mi;
  printf("%d\n",a);
    return 0;
}


Measured memory_bytes: 256
#![allow(unused_imports)]
use proconio::input;
use proconio::marker::*;
use std::collections::HashSet;

fn main() {
  input! {
    h: usize,
    w: usize,
    s: [Chars;h],
  }
  
  for r in 0..h {
    for c in 0..w {
      if s[r][c] == '.' { continue }
      let mut count = 0;
      if 0 < r && s[r-1][c] == '#' {
        count += 1;
      }
      
      if 0 < c && s[r][c-1] == '#' {
        count += 1;
      }
      
      if r < h-1 && s[r+1][c] == '#' {
        count += 1;
      }
      
      if c < w-1 && s[r][c+1] == '#' {
        count += 1;
      }
      
      if count == 0 {
        println!("No");
        return;
      }
    }
  }
  println!("Yes");
}

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

typedef long long ll;
typedef tuple<ll,ll,ll> T;

const ll inf=1e18;
const ll MAX=2500;
ll N,S;
vector<pair<ll,pair<ll,ll>>> g[100];
ll c[100],d[100];

void solve(int x){
    if(S>=MAX) S=MAX;
    vector<vector<ll>> dp(N+1,vector<ll>(MAX+1,inf));
    priority_queue<pair<ll,pair<ll,ll>>,vector<pair<ll,pair<ll,ll>> >,greater<pair<ll,pair<ll,ll>> > > que;
    que.push({0,{x,S}});
    dp[0][S]=0;
    while(!que.empty()){
        pair<ll,pair<ll,ll>> p=que.top(); que.pop();
        ll time=p.first;
        ll u=p.second.first;
        ll cost=p.second.second;
        if(time>dp[u][cost]) continue;
        if(cost+c[u]<=MAX){
            ll n_cost=cost+c[u];
            ll n_time=time+d[u];
            if(dp[u][n_cost]>n_time){
                dp[u][n_cost]=n_time;
                que.push({n_time,{u,n_cost}});
            }
        }
        for(auto tmp:g[u]){
            ll v=tmp.first;
            ll a=tmp.second.first;
            ll b=tmp.second.second;
            ll n_cost=cost-a;
            if(n_cost<0) continue;
            ll n_time=time+b;
            if(dp[v][n_cost]>n_time){
                dp[v][n_cost]=n_time;
                que.push({n_time,{v,n_cost}});
            }
        }
    }
    
    for(int i=1;i<N;i++){
        ll ans=inf;
        for(int j=0;j<=MAX;j++){
            ans=min(dp[i][j],ans);
        }
        cout << ans << endl;
    }
}

int main(){
    ll M; cin >> N >> M >> S;
    for(int i=0;i<M;i++){
        ll u,v; cin >> u >> v; u--;v--;
        ll a,b; cin >> a >> b;
        g[u].push_back({v,{a,b}});
        g[v].push_back({u,{a,b}});
    }
    for(int i=0;i<N;i++){
        cin >> c[i] >> d[i];
    }
    solve(0);
}

Measured memory_bytes: 7440
#include<iostream>
#include<map>
#include<vector>
#include<cmath>
#include<string>
#include<cstring>
#include<algorithm> 
#include<climits>
#include<stack>
#include<queue>
#include<set>
#include<cctype>
#include<bitset> 
#include<type_traits>
#include<numeric>
#include<array>
using namespace std;

# define REP(i,n) for (int i=0;i<(n);++i)
# define rep(i,a,b) for(int i=a;i<(b);++i)
# define p(s) std::cout << s ;
# define pl(s)  std::cout << s << endl;
# define printIf(j,s1,s2) cout << (j ? s1 : s2) << endl;
# define YES(j) cout << (j ? "YES" : "NO") << endl;
# define Yes(j) std::cout << (j ? "Yes" : "No") << endl;
# define yes(j) std::cout << (j ? "yes" : "no") << endl;
# define all(v) v.begin(),v.end()
# define showVector(v) REP(i,v.size()){p(v[i]);p(" ")} pl("")
template<class T> inline bool chmin(T &a, T b){ if(a > b) { a = b; return true;} return false;}
template<class T> inline bool chmax(T &a, T b){ if(a < b) { a = b; return true;} return false;}
typedef long long int ll;
typedef pair<int,int> P_ii;
typedef pair<double,double> P_dd;

template<class T>
vector<T> make_vec(size_t a){
    return vector<T>(a);
}

template<class T, class... Ts>
auto make_vec(size_t a, Ts... ts){
  return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));
}

template<typename T,typename V>
typename enable_if<is_class<T>::value==0>::type
fill_v(T &t,const V &v){t=v;}

template<typename T,typename V>
typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t,const V &v){
  for(auto &e:t) fill_v(e,v);
}

const int mod = 1000000007;
const int MOD = 1000000007;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;

void addM(long long &a, long long b) {
    a += b;
    if (a >= MOD) a -= MOD;
}

void mulM(long long &a, long long b) {
    a = ((a%MOD)*(b%MOD))%MOD ;
}

// a^b mod M
long myPow(long a,long b,int M) {
    long ret = 1;
    long tmp = a;
    while(b>0) {
        if((b&1)==1) ret = (ret * tmp) % M;
        tmp = (tmp * tmp) % M;
        b = b>>1;
    }
    return ret;
}

 // nCk mod M
int nCk(int n,int k,int M) {
    long ret = 1;
    int mi = min(k, n-k);
    for(int i=1;i<=mi;i++) {
        ret = (ret * myPow(i,M-2,M)) % M;
    }
    for(int i=n-mi+1;i<=n;i++) {
        ret = (ret * i) % M;
    }
    return (int)ret;
}

int main(){

    ll N,M;cin >> N >> M;
    cout << (1900*M+100*(N-M))*(1 << M) << endl;

    return 0;
}

Measured memory_bytes: 256
#include<stdio.h>
#include<math.h>
int main()
{
    long long N,b,i,sum=0,r;
    scanf("%lld %lld",&N,&b);
    for(i=0;N!=0;i++)
    {
        r=N % b;
        //printf("%lld\n",r);
        //sum=sum+r*pow(i,10);
        //printf("%lld\n",sum);
        N=N/b;
    }
    printf("%lld",i);
    return 0;
}

Measured memory_bytes: 128
#include <iostream>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstdlib>
#include <vector>

using namespace std;
int t;
string str;

int ans;
int cnt;

vector<string> v;

bool rec(int x, int p) {
  bool flag = false;
  if(x > t) return false;
  if(p == str.length()) {
    if(x > ans) {
      v.clear();
      ans = x;
      cnt = 1;
      return true;
    } else if(x == ans) {
      cnt++;
      return false;
    }
    return false;
  }
  for(int i = 1; p+i <= str.length(); i++) {
    string s = str.substr(p, i);
    if(rec(x + atoi(s.c_str()), p+i)) {
      v.push_back(s);
      flag = true;
    }
  }
  return flag;
}

void solve() {
  ans = -1;
  rec(0, 0);
  if(ans == -1) cout << "error" << endl;
  else if(cnt != 1) cout << "rejected" << endl;
  else {
    cout << ans;
    for(int i = v.size()-1; i >= 0; i--) {
      cout << " " << v[i];
    }
    cout << endl;
  }
}

main() {
  while(( cin >> t >> str ) && (t || (str != "0"))) {
    solve();
  }
}

Measured memory_bytes: 0
#include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
using namespace std;
typedef long long ll;
int main(void){
	int x,y;
	cin>>x>>y;
	cout<<x+y/2<<endl;
}
/*reveres begin end
cout<<"\n";
  m.insert(std::make_pair('c', 30));
  .erase(v.begin() + 2)
*/


Measured memory_bytes: 768
package main

import(
    "fmt"
    "sort"
    "strings"
)



func main() {
    var H,W int
    fmt.Scan(&H,&W)
    var s = make([]string, H)
    for i:=0; i<H; i++{
        fmt.Scan(&s[i])
    }
    var h = make(map[int]bool)
    var w = make(map[int]bool)
    for i:=0; i<H; i++{
        var flg = true
        for j:=0; j<W; j++{
            if s[i][j]=='#'{
                flg = false
            }
        }
        if flg {
            h[i] = false
        } else {
            h[i] = true
        }
    }
    for i:=0; i<W; i++{
        var flg = true
        for j:=0; j<H; j++{
            if s[j][i]=='#'{
                flg = false
            }
        }
        if flg {
            w[i] = false
        } else {
            w[i] = true
        }
    }
    for i:=0; i<H; i++{
        flg := false
        for j:=0; j<W; j++{
            if h[i] && w[j]{
                fmt.Printf("%c", s[i][j])
                flg = true
            }
        }
        if flg{
            fmt.Println("")
        }
    }
}





func abs32(a int) int {
    if a<0{
        return -a
    }
    return a
}

func abs64(a int64) int64 {
    if a<0{
        return -a
    }
    return a
}

func min32(a, b int) int {
    if a >= b {
        return b
    }
    return a
}

func max32(a, b int) int {
    if a >= b {
        return a
    }
    return b
}

func min64(a, b int64) int64 {
    if a >= b {
        return b
    }
    return a
}

func max64(a, b int64) int64 {
    if a >= b {
        return a
    }
    return b
}

func gcd(a, b int64) int64 {
    if a % b == 0 {
        return b
    } else {
        return gcd(b, a%b)
    }
}

func lcm(a, b int64) int64 {
    return a / gcd(a, b) * b
}

func scanNums(len int) (nums []int){
    var num int
    for i:=0; i<len; i++{
        fmt.Scan(&num)
        nums = append(nums,num)
    }
    return
}

func scanNums64(len int) (nums []int64){
    var num int64
    for i:=0; i<len; i++{
        fmt.Scan(&num)
        nums = append(nums,num)
    }
    return
}

func scanString(len int) (str []string){
    var s string
    for i:=0; i<len; i++{
        fmt.Scan(&s)
        str = append(str,s)
    }
    return
}

func scanTwoNums(n,m int) ([][]int){
    Nums := make([][]int, n)
    for i:=0; i<n; i++{
        Nums[i] = make([]int, m)
    }
    return Nums
}

func SortString(s string) string{
    t := strings.Split(s, "")
    sort.Strings(t)
    return strings.Join(t, "")
}


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

class B
{
	static void Main()
	{
		Func<int[]> read = () => Console.ReadLine().Split().Select(int.Parse).ToArray();
		var h = read();
		Console.WriteLine(new int[h[0]].Select(_ => read()).OrderBy(r => r[0]).FirstOrDefault(r => r[1] <= h[1])?[0].ToString() ?? "TLE");
	}
}


Measured memory_bytes: 13524
#include<iostream>
#include<string>
#include<vector>
#include<stdio.h>
#include<algorithm>
#include<stdlib.h>
#define _USE_MATH_DEFINES
#include<math.h>
#include<numeric>
#include<iomanip>

using namespace std;

int main() {
	int w, a, b; cin >> w >> a >> b;
	int a1 = a + w;
	int d=0;
	if (a1 < b) {
		d = b - (a + w);
	}
	else if(b+w<a){
		d = a - b - w;
	}
	else if (a <= b + w && b + w <= a1) {
		d = 0;
	}
	else if (a <= b && b <= a + w) {
		d = 0;
	}
	cout << d << endl;
	
}







Measured memory_bytes: 256
#include <iostream>

using namespace std;

void solve()
{
	int L, A, B, C, D;
	cin >> L >> A >> B >> C >> D;
	int count1 = 0;
	while(A > 0)
	{
		A -= C;
		++count1;
	}
	int count2 = 0;
	while(B > 0)
	{
		B -= D;
		++count2;
	}
	cout << L - max(count1, count2) << endl;
}

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

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

long long int pow_long(long long int x, long long int n) {
	long long int r = 1;
	for (int i = 0; i < n; i++) {
		r = r * x;
	}

	return r;
}


int main() {
	int temp = pow_long(74, 5);

	long long int X;
	cin >> X;
	long long int Max = pow_long(10, 2);
	long long int A=0, B=0;
	bool cov = false;
	while (true) {

		long long int B_temp = -X + pow_long(A, 5);
		B = -A;
		while (true) {
			long long int B_5 = pow_long(B, 5);
			if (B_5 == B_temp) {
				B_temp;
				cov = true;
				break;
			}
			if (B >= A) {
				break;
			}
			B++;
		}
		if (cov == true) {
			break;
		}

		A++;
	}



	cout << A << " " << B;
	return 0;
}

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

int main(){
    string s;
    cin>>s;
    int  count=0;
    for(int i=0;i<s.size();i++){
       if(s.at(i)=='x'){
          count++;
          }
     } 
     if(count<8){
       cout<<" YES"<<endl;
       }
     else if(count>=8){
       cout<<"NO"<< endl;
       }
}
       

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

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

  //記号判定
  if (s.size() <= k) cout << s << endl;
  else {
    string ans = s.substr(0,k);
    ans += "...";
    cout << ans << endl;
  }
}


Measured memory_bytes: 3576
s=input()
stack=[2]
n=len(s)

cnt=0
for i in range(n):
  if s[i]=='0' and stack[-1]=='1':
    stack.pop()
    cnt+=2
  elif s[i]=='1' and stack[-1]=='0':
    stack.pop()
    cnt+=2
  else:
    stack.append(s[i])
print(cnt)
  

Measured memory_bytes: 3956
n=int(input())
a=list(map(int,input().split()))

mod=10**9+7

ans=0
for i in range(60):
  on=0
  for j in a:
    if (j>>i)&1:
      on+=1
  ans+=(on*(n-on))*(2**i)
  ans%=mod

print(ans)

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

using namespace std;


int N, A[201], B[200];

void F()
{
  cout << "Impossible" << endl;
  exit(0);
}

int main()
{
  cin >> N;

  int low = 0;
  for(int i = 0; i < N; ++i) {
    int K;
    cin >> K;
    B[i] = K;
    A[K]++;
    low = max(low, K);
  }

  int cost = low + 1;
  int small = N;
  for(int i = 0; i <= low; i++) {
    if(i <= low / 2) cost--;
    if(i > (low + 1) / 2) ++cost;
    --A[cost];

    if(A[cost] < 0) F();
    small = min(small, cost);
  }

  for(int i = 0; i < small; i++) {
    if(A[i] > 0) F();
  }
  if(A[small] >= 1) F();

  cout << "Possible" << endl;
}


Measured memory_bytes: 384
#include <bits/stdc++.h>
#define aut(a,x) __typeof(x) a=(x)
using namespace std;namespace NYAN{
/*******************************************************************/
typedef long long ll;
const int K=1e5+5;
ll a[K];
void main(){
    //freopen("input.txt","r",stdin);

    int k; scanf("%d",&k);
    for(int i=1; i<=k; ++i){
        cin>>a[i];
    }
    if(a[k]!=2){
        puts("-1"); return;
    }
    ll mi=2, ma=3;
    for(int i=k-1; i>=1; --i){
        mi = ((mi-1)/a[i]+1)*a[i];
        if(mi > ma){
            puts("-1"); return;
        }
        ma = ma/a[i]*a[i] + a[i]-1;
    }
    cout<<mi<<' '<<ma<<'\n';
}
/*******************************************************************/
}int main(){NYAN::main(); return 0;}


Measured memory_bytes: 1024
#include<iostream>
#include<sstream>

using namespace std;

string format(int a, int b, int c) {
	stringstream ss;
	ss << a << " " << b << " " << c;
	return ss.str();
}

string solve(int n, int y) {
	for (int a = 0; a <= n; a++) {
		for (int b = 0; a + b <= n; b++) {
			int c = n - a - b;
			if (a * 10000 + b * 5000 + c * 1000 == y) return format(a, b, c);
		}
	}
	return format(-1, -1, -1);
}


int main()
{
	int n, y;
	cin >> n >> y;

	string answer = solve(n, y);
	cout << answer << endl;

    return 0;
}



Measured memory_bytes: 256
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <typeinfo>
#include <numeric>
#include <functional>
#include <unordered_map>
#include <bitset>
#include <stack>


using namespace std;
using ll = long long;
using ull = unsigned long long;

const ll INF = 1e16;
const ll MOD = 1e9 + 7;

#define REP(i, n) for(ll i = 0; i < n; i++)






vector<vector<int>> g;

int dfs(int now, int par){
    vector<int> depth;
    for(auto &child : g[now]){
        if(child == par) continue;
        depth.push_back(dfs(child, now));
    }
    sort(depth.begin(), depth.end());
    int mx = 0;
    for(int i = 0; i < depth.size(); i++){
        mx = max(mx, depth[i] + ((int)depth.size() - i));
    }
    return mx;
}

int main() {
    int n;
    cin >> n;
    g.resize(n);
    for(int i = 1; i < n; i++){
        int a;
        cin >> a;
        a--;
        g[i].push_back(a);
        g[a].push_back(i);
    }
    cout << dfs(0, -1) << endl;
}


Measured memory_bytes: 15104
#include <iostream>
#include <cmath>
#include <cstdio>
using namespace std;
 
struct po{
  int f,a,t,x,y;
};
 
int main() {
 
  int n;
  cin >> n;
 
  po D[101];
  for(int i=0;i<n;i++) cin >>D[i].f >> D[i].a >> D[i].t >> D[i].x >> D[i].y;
 
  for(int i=0;i<n;i++) 
    for(int j=n-1;j>i;i++) 
      if(D[i].f > D[i+1].f) {
    po t = D[i];
    D[i] = D[i+1];
    D[i+1] = t;
      } 
 
  int ans[2] = {-1,-1};
  int time[2] ={};
 
  for(int i=0;i<n-1;i++) {
    if(D[i].t == D[i+1].t && D[i].a != D[i+1].a){
      int dis = (D[i+1].x-D[i].x)*(D[i+1].x-D[i].x)+(D[i+1].y-D[i].y)*(D[i+1].y-D[i].y);
    if(ans[D[i].t] < dis) {
      ans[D[i].t] = dis;
      time[D[i].t] = D[i+1].f - D[i].f;
    }else if(ans[D[i].t] == dis && time[D[i].t] > D[i+1].f-D[i].f) time[D[i].t] = D[i+1].f- D[i].f;
    }
  }
 
  if(ans[0] !=-1) printf("%.9lf %.9lf\n",sqrt(ans[0]),time[0]/60.0);
  else cout << -1 <<" " << -1 << endl;
 
  if(ans[1] !=-1) printf("%.9lf %.9lf\n",sqrt(ans[1]),time[1]/60.0);
  else cout << -1 <<" " << -1 << endl;
 
  return 0;

}

Measured memory_bytes: 1248
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>


int main(void) {
  char str_s[101];
  char ans[101]={0};
  
  int l;
  int i;

  //printf("%d", (int)log10(9));
  scanf("%s", str_s);
  
  l = strlen(str_s);

  for(i=0; i<l; i++) {
    ans[i] = 'x';
  }
  
  printf("%s\n", ans); 

  return 0;

}

Measured memory_bytes: 128
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = Integer.parseInt(sc.next());
        int b = Integer.parseInt(sc.next());
        int c = Integer.parseInt(sc.next());
        if (a < b && b < c)
            System.out.println("Yes");
        else
            System.out.println("No");
    }
}


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

signed main(){
    int n, k;
    cin >> n >> k;
    vector<long long> array(n);
    for(int i = 0; i < n; ++i) cin >> array[i];
    long long res = 100000000000000;
    for(int i = 0; i + k - 1 < n; ++i){
       res = min(res, abs(array[i]) + abs(array[i] - array[i + k - 1])) ;
       res = min(res, abs(array[i + k - 1]) + abs(array[i] - array[i + k - 1])) ;
    }
    cout << res << endl;
    return 0;
}

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

int main() {
    vector<long long> abcde;
    long long n_people;
    cin >> n_people;
    for (int i = 0; i < 5; ++i) {
        long long people;
        cin >> people; abcde.push_back(people);
    }

    long long min_people = abcde[0];
    for (int i = 0; i < abcde.size(); ++i) {
        if (min_people > abcde[i]) {
            min_people = abcde[i];
        }
    }
    long long x_time = n_people / min_people;
    if (n_people % min_people != 0) {
        ++x_time;
    }

    cout << 4 + x_time << endl;
}

Measured memory_bytes: 256
#include<cstdio>
#include<cmath>
#include<climits>
#include<algorithm>
#include<sstream>
#include<iostream>
#include<string>
#include<queue>
#include<stack>
#include<set>
#include<list>
#include<map>
#include<vector>

using namespace std;


#define rep(i,n) for(int i=0; i<n; i++)
#define rept(i,a,b) for(int i=a; i<b; i++)
#define ll long long
#define MOD 1000000007

#define IMIN INT_MIN;
#define IMAX INT_MAX;


int main(){
	int A, B, T;
	cin >> A >> B >> T;
	int ans;
	ans = T / A;
	ans *= B;
	cout << ans << endl;


	return 0;
}



Measured memory_bytes: 256
#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	double n;
	while(cin>>n){
		double t=n/9.8;
		double y=t*t*4.9;
		int ans=1;
		while(5*ans-5<y)ans++;
		cout<<ans<<endl;
	}
}

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

int main() {
  vector<int> input(3);
  cin >> input[0] >> input[1] >> input[2];

  sort(input.begin(), input.end());

  cout << input[2]*10 + input[1] + input[0] << endl;

  return 0;
}


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

namespace A
{
    class Program
    {
        public static void Main(string[] args)
        {
            var s = ReadLineStringSplit();

            Console.WriteLine(s[0].Substring(0, 1) + s[1].Substring(0, 1)+s[2].Substring(0, 1));
            ReadLine();
        }

        /// <summary>
        /// コンビネーション
        /// </summary>
        /// <param name="n"></param>
        /// <param name="m"></param>
        /// <returns></returns>
        static int nCm(int n, int m)
        {
            if (m == 0) return 1;
            if (n == 0) return 0;
            return n * nCm(n - 1, m - 1) / m;
        }

        /// <summary>
        /// stringを一文字ずつintにキャストして配列に変換します。
        /// </summary>
        /// <param name="str"></param>
        /// <returns></returns>
        public static int[] StringCharArrayIntArray(string str)
        {
            List<int> b = new List<int>();
            for (int i = 0; i < str.Length; i++) {
                b.Add( int.Parse(str[i].ToString()));
            }
            return b.ToArray();
        }

        public static string ReadLine()
        {
            return Console.ReadLine();
        }

        public static int ReadLineInt()
        {
            return int.Parse(Console.ReadLine());
        }

        public static string[] ReadLineStringSplit(char a = ' ')
        {
            return ReadLine().Split(a).ToArray();
        }

        public static int[] ReadLineIntSpilit(char a = ' ')
        {
            return ReadLine().Split(a).Select(x => int.Parse(x)).ToArray();
        }

        static string[] GetAplhaLowerArray() => new string[]{ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"};
        static string[] GetAplhaUpperArray() => new string[] { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" };
    }
}

Measured memory_bytes: 13268
#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <utility>
#include <functional>
#include <cstring>
#include <queue>
#include <stack>
#include <math.h>
#include <iterator>
#include <vector>
#include <string>
#include <set>
#include <math.h>
#include <iostream>
#include <random>
#include<map>
#include <iomanip>
#include <time.h>
#include <stdlib.h>
#include <list>
#include <typeinfo>
#include <list>
#include <set>
#include <cassert>
#include<fstream>
#include <unordered_map>
#include <cstdlib>
using namespace std;
#define Ma_PI 3.141592653589793
#define eps 0.00000001
#define LONG_INF 3000000000000000000
#define GOLD 1.61803398874989484820458
#define MAX_MOD 1000000007
#define REP(i,n) for(long long i = 0;i < n;++i)                                                                             
#define seg_size 524288
int main() {
	long long n, m;
	cin >> n >> m;
	long long ans = m * 1900 + (n-m)*100;
	for (int i = 0;i < m;++i) {
		ans *= 2;
	}
	cout << ans << endl;
	return 0;
}

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

class Program
{
	static void Main(string[] args)
	{
		var input = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
		bool flag = false;

		for (int x = 0; x <= input[0]; x++)
		{
			if (flag) break;
			for (int y = 0; y <= input[0] - x; y++)
			{
				if ((1000 * x) + (5000 * y) + (10000 * (input[0] - x - y)) == input[1])
				{
					Console.WriteLine((input[0] - x - y).ToString() + " " + y.ToString() + " " + x.ToString());
					flag = true;
					break;
				}
			}
		}

		if (!flag)
		{
			Console.WriteLine("-1 -1 -1");
		}
	}
}

Measured memory_bytes: 11348
#include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<long long> vlong;
#define rep(i, n) REP(i, 0, n)
#define all(v) v.begin(), v.end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define INF 2e9
signed main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a,b,c;
  cin>>a>>b>>c;
  if((a<c && c<b) || (b<c && c<a)){
    cout<<"Yes";
  }
  else{
    cout<<"No";
  }
  return(0);
}


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

int main()
{
    string w, t;
    int cnt = 0;
    
    cin >> w;
    while (cin >> t && t != "END_OF_TEXT") {
        transform(t.begin(), t.end(), t.begin(), ::tolower);
        if (t == w) cnt++;
    }
    cout << cnt << endl;
}



Measured memory_bytes: 3144