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

#define ll long long
#define fornum(A,B,C) for(A=B;A<C;++A)
#define pii pair<int,int>
#define pll pair<ll,ll>

using namespace std;

/////////////////////////////////////////////////////
#define fls() cout.flush()

const ll L = 128;
const char chara[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
const ll C = 62;

ll Len;
ll ct[100];
ll i, j, k;
void stp1(){
    fornum(i,0,C){
        string outpt(L, chara[i]);
        cout << "? " << outpt << endl;
        fls();
        ll inpt;
        scanf("%lld", &inpt);
        ct[i] = L - inpt;
        Len += ct[i];
    }
}
string stp2(ll l,ll r){
    //printf("%lld,%lld\n", l, r);
    if(l==r){
        string s(ct[l], chara[l]);
        return s;
    }
    ll c = (l + r) / 2;
    string s1 = stp2(l, c);
    string s2 = stp2(c + 1, r);
    string s;
    ll i=0, j=0;
    while(i<s1.size()){
        cout << "? " << s << s1[i] << s2.substr(j) << endl;
        fls();
        ll inpt;
        scanf("%lld", &inpt);
        if (inpt == Len-(s.size() + 1 + s2.size() - j))
        {
            s += s1[i];
            ++i;
        }else{
            s += s2[j];
            ++j;
        }
    }
    s += s2.substr(j);
    return s;
}
int main(){
    stp1();
    string ans = stp2(0, C-1);
    cout << "! " << ans << endl;
    fls();
    return 0;
}

Measured memory_bytes: 3724
#include <iostream>
#include <algorithm>
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
ll n, ans = 0; ll a[114514];
signed main() {
	cin >> n;
	rep(i, n)cin >> a[i];
	rep(i, n) {
		if (a[a[i] - 1] - 1 == i)ans++;
	}
	cout << ans / 2 << endl;
	getchar(); getchar(); return 0;
}


Measured memory_bytes: 1024
#include<stdio.h>

#define MAX 10000
#define CODE_MIN 0x61
#define CODE_MAX 0x7a
#define CHANGE 0x20

void func_init(char str[]);
void func_output(char str[]);

main()
{
	char str[MAX];
	func_init(str);
	gets(str);
	//printf("%s\n", str);
	func_output(str);
	return 0;
}
void func_init(char str[])
{
	int i = 0;
	for(i = 0; i < MAX; i++)
	{
		str[i] = 0x00;
	}
}
void func_output(char str[])
{
	int i = 0;
	for(i = 0; str[i] != 0x00; i++)
	{
		//printf("str[%d] = 0x%x\n", i, str[i]);
		///*
		if(str[i + 1] != 0x00)
		{
			if((CODE_MIN <= str[i]) && (CODE_MAX >= str[i]))
			{
				printf("%c", str[i] - CHANGE);
			}
			else
			{
				printf("%c", str[i]);
			}
		}
		else
		{
			if((CODE_MIN <= str[i]) && (CODE_MAX >= str[i]))
			{
				printf("%c\n", str[i] - CHANGE);
			}
			else
			{
				printf("%c\n", str[i]);
			}
		}
		//*/
	}
}

Measured memory_bytes: 524
#include <iostream>
#include <string>
using namespace std;
const int P = 1000000007;

long long pow3(int n){
    long long p = 1;
    for(int i = 0; i < n; i ++) (p *= 3) %= P;
    return p;
}

int main(void){
    string s;
    cin >> s;
    int len = s.size();
    long long dp[100002][3] = {{0}};  // 欲しいのは dp[0][0]
    long long cntHatena[100001] = {0}, po[100001] = {0};
    
    po[len] = 1;
    for(int i = len-1; i >= 0; i --){
        po[i] = (((s[i] == '?') ? 3 : 1) * po[i+1]) % P;
    }
    char al[3] = {'A', 'B', 'C'};
    
    for(int i = len-1; i >= 0; i --){
        if(s[i] == 'C'){
            dp[i][2] = dp[i+1][2] + po[i+1];
        }
        else if(s[i] == '?'){
            dp[i][2] = 3 * dp[i+1][2] + po[i+1];
        }
        else{
            dp[i][2] = dp[i+1][2];
        }
        dp[i][2] %= P;
    }
    
    for(int j = 1; j >= 0; j --){
        for(int i = len-1; i >= 0; i --){
            if(s[i] == al[j]){
                dp[i][j] = (dp[i+1][j+1] + dp[i+1][j]) % P;
            }
            else if(s[i] == '?'){
                dp[i][j] = (dp[i+1][j+1] + 3 * dp[i+1][j]) % P;
            }
            else{
                dp[i][j] = dp[i+1][j];
            }
        }
    }
    printf("%lld\n", dp[0][0]);
}


Measured memory_bytes: 3584
#include <iostream>
#include <stdio.h>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>
#include <set>
#include <math.h>
#include <utility>
#include <stack>
#include <string.h>
#include <complex>
using namespace std;
const int INF = 1<<29;
const double EPS = 1e-8;
typedef vector<int> vec;
typedef vector<vec> mat;
typedef pair<int,int> P;
struct edge{int to,cost;};

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

int main(){
    int a,b,c;
    cin >> a >> b >> c;
    if((a&&b&&!c)||(!a&&!b&&c)){
        cout << "Open" << endl;
    }else{
        cout << "Close" << endl;
    }
    return 0;
}

Measured memory_bytes: 1156
#include <bits/stdc++.h>
#define For(i, a, b) for(int (i)=(int)(a); (i)<(int)(b); ++(i))
#define rFor(i, a, b) for(int (i)=(int)(a)-1; (i)>=(int)(b); --(i))
#define rep(i, n) For((i), 0, (n))
#define rrep(i, n) rFor((i), (n), 0)
#define fi first
#define se second
using namespace std;
typedef long long lint;
typedef unsigned long long ulint;
typedef pair<int, int> pii;
template<class T> bool chmax(T &a, const T &b){if(a<b){a=b; return true;} return false;}
template<class T> bool chmin(T &a, const T &b){if(a>b){a=b; return true;} return false;}
template<class T> T div_floor(T a, T b){
    if(b < 0) a *= -1, b *= -1;
    return a>=0 ? a/b : (a+1)/b-1;
}
template<class T> T div_ceil(T a, T b){
    if(b < 0) a *= -1, b *= -1;
    return a>0 ? (a-1)/b+1 : a/b;
}

constexpr lint mod = 1e9+7;
constexpr lint INF = mod * mod;
constexpr int MAX = 200010;

int main(){
    int T, t[35], n, M[110];
    while(scanf("%d", &T) && T){
        rep(i, T) scanf("%d", &t[i]);
        scanf("%d", &n);
        fill(M, M+110, mod);
        rep(i, n){
            int d, m;
            scanf("%d%d", &d, &m);
            chmin(M[d-1], m);
        }

        int dp[111][T];
        rep(i, 111)rep(j, T) dp[i][j] = mod;
        dp[0][0] = 0;
        rep(i, 110)rep(j, T)if(dp[i][j] < mod && t[j] <= M[i]){
            chmin(dp[i+1][(j+1)%T], dp[i][j]);
            chmin(dp[i+1][0], dp[i][j] + 1);
        }
        int ans = mod;
        rep(j, T) chmin(ans, dp[110][j]);
        printf("%d\n", ans);
    }
}


Measured memory_bytes: 3104
#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n,m,sum=0;
  cin>>n>>m;
  int a[m];
  for(int i=0;i<m;i++)
  {
    cin>>a[i];
    sum=sum+a[i];
  }
 if(sum>n)
 {
   cout<<"-1"<<endl;
 }
  else
  {
    cout<<n-sum<<endl;
  }
  return 0;
}

Measured memory_bytes: 3688
package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)

	ss := make([]string, n)

	l, r := 0, n-1
	for _, i := range []int{l, r} {
		fmt.Println(i)
		fmt.Scan(&ss[i])
		if ss[i] == "Vacant" {
			return
		}
	}

	for {
		m := (l + r) / 2
		fmt.Println(m)
		fmt.Scan(&ss[m])

		if ss[m] == "Vacant" {
			return
		}

		if (m-l)%2 == 1 && ss[l] == ss[m] {
			r = m
		}
		if (m-l)%2 == 0 && ss[l] != ss[m] {
			r = m
		}

		if (r-m)%2 == 1 && ss[r] == ss[m] {
			l = m
		}
		if (r-m)%2 == 0 && ss[r] != ss[m] {
			l = m
		}
	}
}


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

int main() {
  int N;
  cin >> N;
  int A[114514], B[114514]; 
  for (int i = 0; i < N; i++) {
   cin >> A[i]; 
   B[i] = A[i] % 2; 
  }
  int sum = 0; 
for (int i = 0; i < N; i++) {
   sum += B[i]; 
  }
  if(sum % 2 == 0) cout << "YES" << endl;
  else cout << "NO" << endl; 
}

Measured memory_bytes: 1024
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(){
    int n,q;
    string s;
    cin >> n >> q >> s;
    vector<int> acuAC(n);
    acuAC[0] = 0;
    for(int i = 1; i < n; i++)
    {
        if (s[i-1] == 'A' && s[i] == 'C') {
            acuAC[i] = acuAC[i-1] + 1;
        }
        else
        {
            acuAC[i] = acuAC[i-1];
        }
    }
    vector<int> ans(q);
    for(int i = 0; i < q; i++)
    {
        int l,r;
        cin >> l >> r;
        ans[i] = acuAC[r-1] - acuAC[l-1];
    }
    for(int i = 0; i < q; i++)
    {
        cout << ans[i] << endl;
    }
}

Measured memory_bytes: 1792
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
string s[110];
int main()
{
	int n,l;
	scanf("%d%d",&n,&l);
	for(int i=1;i<=n;i++)
	{
		cin>>s[i];
	}
	sort(s+1,s+n+1);
	for(int i=1;i<=n;i++) cout<<s[i];
	cout<<endl;
}

Measured memory_bytes: 3172
import sys
import numpy as np
from heapq import heappop, heappush

# A* algorithm (Dijikstraの応用)
# Dijikstra: actual cost の順
# A*: score( actual_cost + heuristic cost) の順(scoreが同じ場合はactual_costの順)
# ただしA* algorithm は hueristic_costが計算できるのが前提。また、全頂点への始点からの距離を求めるならDijikstraを使う。今回はstart, endが決まっているのでA*を使った。
def main():
    H, W = map(int, sys.stdin.readline().split())

    grid = np.array([list(sys.stdin.readline().rstrip()) for _ in range(H)], dtype='U')
    grid = np.pad(grid, 1, mode='constant')
    # atcoderではnp.pad() のargにconstant_valuesを指定できないみたい

    
    i = j = 1             # start
    c = 0                 # real cost
    h = (H - 1) + (W - 1) # heuristic cost 
    s = c + h             # score
    q = []                # status: open
    heappush(q, (s, c, i, j))
    visited = set()       # status: closed
    
    # 今回は最短距離を求めれば良いので必要ないが、最短経路を求める場合にはparent_nodeの記録が必要
    parent = [[None] * (W + 1) for _ in range(H+1)]

    can_go = False
    while q:
        s, c, i, j = heappop(q)
        if (i, j) in visited:
            continue
        visited.add((i, j))
        if c == s: # h == 0 ならそこがgoal
            can_go = True
            break
        for dy, dx in [(1, 0), (0, 1), (-1, 0), (0, -1)]:
            y = i + dy
            x = j + dx
            if grid[y][x] == '.' and not (y, x) in visited:
                parent[y][x] = (i, j)
                h = (H - y) + (W - x)
                s = h + c + 1
                heappush(q, (s, c+1, y, x))
 
    if can_go:
        ans = np.sum(grid == '.') - (c + 1)
    else:
        ans = -1
    print(ans)

    
    # 経路も求める場合はこんな感じ
    # i, j = H, W
    # res = [(H, W)]
    # while parent[i][j]:
    #     i, j = parent[i][j]
    #     res.append((i, j))
    # res = list(reversed(res))
    # print(res)

if __name__ == "__main__":
    main()

Measured memory_bytes: 12628
#include<iostream>
#include<string>

using namespace std;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	string S;
	cin >> S;

	if (S == "SUN") {
		cout << 7 << endl;
	}
	if (S == "MON") {
		cout << 6 << endl;
	}
	if (S == "TUE") {
		cout << 5 << endl;
	}
	if (S == "WED") {
		cout << 4 << endl;
	}
	if (S == "THU") {
		cout << 3 << endl;
	}
	if (S == "FRI") {
		cout << 2 << endl;
	}
	if (S == "SAT") {
		cout << 1 << endl;
	}
	return 0;
}

Measured memory_bytes: 256
a = int(input())
li = list(map(int,input().split()))
total = 1
i = 1
for i in range(a):
    total = total*li[i]
    if total > 1000000000000000000:
        total = -1
        break
for i in range(a):
    if li[i] == 0:
        total = 0

print(total)

Measured memory_bytes: 21652
import kotlin.math.*
import java.io.BufferedReader
import java.io.InputStreamReader
import java.util.*


private var fs = BufferedReader(InputStreamReader(System.`in`))
private fun readLn() = fs.readLine()!!
private fun readStrings() = readLn().split(" ")
private fun readLong() = readLn().toLong()
private fun readLongs() = readStrings().map { it.toLong() }
private fun readInt() = readLn().toInt()
private fun readInts() = readStrings().map { it.toInt() }
fun main() {
//    val t = readInt()
//    for (tt in 0 until t) {
        solveA()
//    }
}
fun solveA() {
    var K = readInt()
    var ans = ""
    for(i in 0 until K){
        ans += "ACL"
    }
    println(ans)
}



Measured memory_bytes: 33860
#include <iostream>
#include <vector>

using namespace std;

int main(void)
{
	int n;
	int max_val;
	int min_val;

	cin >> n;
	vector<int> R(n);

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

	max_val = R[1] - R[0];
	min_val = R[0];

	for(int j = 1; j < n; j++)
	{
		max_val = max_val > (R[j] - min_val) ? max_val : (R[j] - min_val);
		min_val = min_val < R[j] ? min_val : R[j];
	}
	cout << max_val << endl;
	return 0;
}



Measured memory_bytes: 3632
#include <iostream>
#include <iterator>
#include <algorithm>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <cstring>
#include <stack>
#include <vector>
#include <list>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <limits>
#include <utility>
#define EPS (1e-10)
#define REP(i,n) for(int i=0;i<n;i++)
#define equals(a,b) (fabs((a) - (b)) < EPS)
#define ll long long
using namespace std;

//typedef pair<int,int> P;
//const ll MOD = 1000000007;
//const ll INF = 100000000;

long double X;

//stack<int> stack;
//queue<int> que;
//priority_queue<int> pque;
//set<int> s; set<int>::iterator ite;
//multiset<int> ms; multiset<int>::iterator ite;
//map<int, int> m; map<int, int>::iterator ite;
//multimap<int, int> mm; multimap<int, int>::iterator ite;

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

void solve() {
  int i=0;
  long double yokin = 100;
  while (yokin < X) {
    yokin = floor(yokin * 1.01);
    i++;
  }
  cout << i << endl;
}

int main(int argc, char const *argv[]) {

  cin >> X;

  solve();
  return 0;
}



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

int main(){
    int A,B;
    cin>>A>>B;

    int ans1=2*A-1;
    int ans2=2*B-1;
    int ans3=2*A;

    if(A>B){
        cout<<ans1<<endl;
    }else if(A<B){
        cout<<ans2<<endl;
    }else{
        cout<<ans3<<endl;
    }

    return 0;
}


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

using namespace std;
typedef pair<int,int> pii;
typedef long long int ll;

#define INF 1 << 30
#define REP(i,n) for(ll i=0; i<(int)(n); i++)
#define FOR(i,k,n) for(ll i=(k);i<(int)(n);i++)



vector<bool> gen_sosuu(vector<bool> sosuu){
  int size = sosuu.size();
  REP(i,size){
    sosuu[i] = true;
  }
  sosuu[0] = false;
  sosuu[1] = false;
  sosuu[2] = true;
  FOR(i,2,sqrt(size)+1){
    if(sosuu[i] == false) continue;
    for(int j = 2; i*j<size;j++){
      sosuu[i*j] =false;
    }
  }
  return sosuu;
}

string s;

int main(){
  cin >> s;
  bool flag = true;
  if(s[0]!='A') flag = false;
  int cnt = 0;
  FOR(i,2,s.size()-1){
    if(s[i]=='C') cnt++;
  }
  if(cnt!=1) flag = false;
  cnt = 0;
  REP(i,s.size()){
    if(s[i]>=97&&s[i]<=122) cnt++;
  }
  if(cnt != s.size()-2) flag = false;

  if(flag) cout << "AC" <<endl;
  else cout << "WA" <<endl;
}


Measured memory_bytes: 256
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};
    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };
    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };
    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };
    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };
    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

use std::collections::HashMap;

fn main() {
    input! {
        n: usize,
        aa: [usize;n]
    }
    let mut m = HashMap::new();
    for a in aa {
        *m.entry(a).or_insert(0) += 1;
    }
    println!("{}",
        m.iter().filter(|&(_k,v)| *v % 2 != 0).count());
}


Measured memory_bytes: 14588
W,H,c = input().split()
W,H = int(W),int(H)
for i in range(H):
    for j in range(W):
        if (j,i) == (0,0) or (j,i) == (0,H-1) or (j,i) == (W-1,0) or (j,i) == (W-1,H-1):
            print('+',end='')
        elif j in (0,W-1):
            print('|',end='')
        elif i in (0,H-1):
            print('-',end='')
        elif (j,i) == ((W-1)//2,(H-1)//2):
            print(c,end='')
        else:
            print('.',end='')
    print()


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

int main()
{
  int n, k, ans = 0, h;

  cin >> n >> k;
  for (int i = 0; i < n; i++)
  {
    cin >> h;
    if (k <= h)
      ans++;
  }
  cout << ans << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
using namespace std;
#define ll long long int
#define ld long double
#define ff first
#define ss second  
#define endl '\n'
#define pb push_back
#define t_case ll tt; cin>>tt; while (tt--)
#define all(v) v.begin(),v.end()
#define ub(a,x) upper_bound(all(a),x)-a.begin()
#define lb(a,x) lower_bound(all(a),x)-a.begin()
#define fr(a,b,c) for (ll a=b;a<c;a++)
#define take(xx,n) for (int i=0;i<n;i++) cin>>xx[i];
#define take1(xx,n) for (int i=1;i<=n;i++) cin>>xx[i];
#define fastio ios_base::sync_with_stdio(false); cin.tie(NULL);
const auto inf=LLONG_MAX; 

int main() 
{
	fastio
	//t_case
	{
		ll sum=0,f=0,ans=0,n,m=0,mx=-inf,mn=inf,p ;cin>> n ;
		ll a[n]; take (a,n);ans=__gcd(a[0],a[1]);
		fr(i,2,n) ans=__gcd(ans,a[i]);
		if (ans>1 ) cout<<"not coprime";
		else {
			map<int,int> mp;
			f=0;
			fr(i,0,n) {
				fr(j,2,sqrt(a[i])+1) {
					if (a[i]%j==0) {
						if (mp[j]){
							f=1; goto level;
						}
						mp[j]++;
						while(a[i]%j==0) a[i]=a[i]/j;
					}
				}
				if (a[i]>2){
					if (mp[a[i]]) {
						f=1; goto level;
					}
					mp[a[i]]++;
				}
			}
			
			level :
			if (!f) cout<<"pairwise coprime";
			else cout<<"setwise coprime";
		}
		//cout<<ans;
		cout<<endl;
	}
	return 0;
}

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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=(n)-1;i>=0;i--)
#define VSORT(v) sort(v.begin(), v.end())
#define DVSORT(v) sort(v.begin(), v.end(),greater<int>())
#define SORT(v, n) sort(v, v+n)
#define DSORT(v,n) sort(v, v+n,greater<int>())
#define vi vector<int>
#define pb push_back
#define P pair<int,int>


template <class T> void chmin(T&a, const T&b) { a = min(a,b); }
template <class T> void chmax(T&a, const T&b) { a = max(a,b); }

const double EPS =1e-9;
const long INF =999999999;
const long MOD =1000000007; //10^9+7
#define PI 3.14159265258979

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

int main(void){
	int N,numbers[200001]={};
	ll sum=0,result=200000000000000LL;
	
	cin>>N;
	REP(i,N){
		cin>>numbers[i];
		sum+=numbers[i];
	}

	ll x=0;
	REP(i,N-1){
		x+=numbers[i];
		chmin(result,abs(sum-2*x));
	}
	cout<<result<<endl;
	return 0;
}



Measured memory_bytes: 1024
n = int(input())
cnt = 0
f = False
for i in range(n):
    a = list(map(int, input().split()))
    if a[0] == a[1]:
        cnt += 1
    else:
        cnt = 0
    if cnt == 3:
        f = True
if f:
    print("Yes")
else:
    print("No")

Measured memory_bytes: 9180
import math

a, b, c_deg = map(int, input().split())

S = 0.50 * a * b * math.sin(math.radians(c_deg))
c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(c_deg)))
L = a + b + c
h = b * math.sin(math.radians(c_deg))

print(f"{S:.5f} {L:.5f} {h:.5f}")


Measured memory_bytes: 5724
#include <bits/stdc++.h>
#define rep(i,n) for(ll i = 0; i < n; i++)
using namespace std;
typedef long long ll;
 
int main(){
  int K, X;
  cin >> K >> X;
  if (500*K >= X)
  {
    cout << "Yes" << endl;
  }
  else
  {
    cout << "No" << endl;
  }
  

  return 0;
}

Measured memory_bytes: 256
n = int(input())
a = [0] + list(map(int,input().split())) + [0]
b = sum([abs(a[i]-a[i+1]) for i in range(n+1)])

for i in range(n):
    t = b
    if not (a[i]<=a[i+1]<=a[i+2] or a[i]>=a[i+1]>=a[i+2]):
        t -= abs(a[i]-a[i+1])
        t -= abs(a[i+1]-a[i+2])
        t += abs(a[i]-a[i+2])
    print(t)


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


int main() {

  int N, ans;

  cin >> N;


  vector<int> L(1000);
  vector<int> R(1000);

  for ( int i = 0; i < N; i++ ) {
   cin >> L.at(i) >> R.at(i);
  }


 
  ans = 0;

  for ( int i = 0; i < N; i++ ) {
   ans += R.at(i) - L.at(i) +1;
  }
  

  cout << ans << endl;



}


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

int main(){
    int H,W;
    while(1){
        cin >> H >> W;
        if(H==0 && W==0) break;
        
        for(int i=0; i<H; i++){
            for(int j=0; j<W; j++){
                cout << "#";
                
            }
            cout << endl;
        
        }
        cout << endl;
    }
    return 0;
}


Measured memory_bytes: 3080
/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author tatsumack
 */

#include <iostream>
#include <fstream>

#include <iostream>
#include <limits.h>
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>

#include <list>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <queue>
#include <unordered_map>
#include <unordered_set>

#define int long long
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REPS(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define FOR(i, a, b) for (int i = (a), i##_len = (b); i <= i##_len; ++i)
#define REV(i, a, b) for (int i = (a); i >= (b); --i)
#define CLR(a, b) memset((a), (b), sizeof(a))
#define DUMP(x) cout << #x << " = " << (x) << endl;
#define INF 1001001001001001001ll
#define fcout cout << fixed << setprecision(12)

using namespace std;

typedef pair<int, int> P;

class ACurtain {
public:
    static constexpr int kStressIterations = 0;
    static void generateTest(std::ostream& test) {
    }

    void solve(std::istream& cin, std::ostream& cout) {
        int a, b;
        cin >> a >> b;
        cout << max(0LL, a - b * 2) << endl;
    }
};


signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    std::istream& in(std::cin);
    std::ostream& out(std::cout);

    ACurtain solver;
    solver.solve(in, out);
    return 0;
}


Measured memory_bytes: 256
#include <string>
#include <iostream>
using namespace std;
string s = "kstnhmyr", t;
int main() {
	cin >> t;
	for(int i = 0; i < t.size(); i += 2) {
		if(t[i] >= '2') cout << s[t[i] - 50];
		if(t[i] != '0') {
			switch(t[i + 1]) {
				case 'T': cout << 'a'; break;
				case 'L': cout << 'i'; break;
				case 'U': cout << 'u'; break;
				case 'R': cout << 'e'; break;
				case 'D': cout << 'o'; break;
			}
		}
		else {
			switch(t[i + 1]) {
				case 'T': cout << "wa"; break;
				case 'D': cout << "wo"; break;
				case 'U': cout << "nn"; break;
			}
		}
	}
	cout << endl;
}

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

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

using namespace std;
using ll = long long int;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using edge = struct
{
    int to, cost;
};

const int MOD = 1e9 + 7;
const int iINF = 1e9;
const long long int llINF = 1e18;
const double PI = acos(-1.0);

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

int main()
{
    vector<int> day = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

    REP(i, 1, 12) day[i] += day[i - 1];

    int month, da;

    while(cin >> month >> da, month)
    {
        string ans;
        switch((day[month - 1] + da) % 7)
        {
            case 0:
                ans = "Wednesday";
                break;
            case 1:
                ans = "Thursday";
                break;
            case 2:
                ans = "Friday";
                break;
            case 3:
                ans = "Saturday";
                break;
            case 4:
                ans = "Sunday";
                break;
            case 5:
                ans = "Monday";
                break;
            case 6:
                ans = "Tuesday";
                break;
        }

        cout << ans << endl;
    }

    return 0;
}


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

using namespace std;

#define LIMIT 100
typedef pair<int64_t, int64_t> ii;
typedef int64_t ll;
int gcd(ll a, ll b) { return (b==0)?a:gcd(b, a%b); }
int lcm(ll a, ll b) { ll i=(a/gcd(a,b))*b; assert(i>0); return i; }

//  ***** MAIN *****
int main(){
  //ios::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  int o = 1;

  for(int i = 1; i < 4; i++){
    if(s[i] == s[i-1]) o++;
    else o = 1;
    if(o >= 3){
      std::cout << "Yes" << std::endl;
      return 0;
    }
  }

  std::cout << "No" << std::endl;

  return 0;
}



Measured memory_bytes: 256
#include "bits/stdc++.h"
using namespace std;
#define FOR(i,a,b) for(int i =(a);i<(b);i++)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=(n)-1;i>=0;i--)
#define REPS(i,n) for(int i=1;i<=(n);i++)
#define RREPS(i,n) for(int i=(n);i>0;i--)
#define mp make_pair
#define pb(a) push_back(a)
typedef long long ll;

int main(){
  string s;
  cin >> s;
  vector<pair<char,int> > v;
  int cnt = 0;
  REP(i,s.length()){
    if(s[i] == 'x') cnt++;
    else{
      if(cnt != 0) v.pb(mp('x',cnt));
      cnt = 0;
      v.pb(mp(s[i],1));
    }
  }
  if(cnt != 0) v.pb(mp('x',cnt));
  int ans = 0;
  int l = 0;
  int r = v.size()-1;
  while(l < r){
    char cl = v[l].first;
    char cr = v[r].first;
    if(cl == cr){
      ans += abs(v[l].second - v[r].second);
      l++;
      r--;
    }
    else if(cl == 'x'){
      ans += v[l].second;
      l++;
    }
    else if(cr == 'x'){
      ans += v[r].second;
      r--;
    }
    else{
      ans = -1;
      break;
    }
  }
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 1528
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<map>
#include<math.h>

#define rep(i,a,n) for(int (i)=(a);(i)<(n);(i)++)
#define rrep(i,a,n) for(int (i)=(a);(i)>=(n);(i)--)

#define INF 1000000000
#define MOD 1000000007

typedef  long long ll;

using namespace std;

double euclid_distance(double a,double b){
    return sqrt(a*a+b*b);
}

int gcd(long long int a,long long int b){
    long long int r;
    if(a < b){
        a = a^b;
        b = a^b;
        a = a^b;
    }
    while ((r=a%b)) {
        a = b;
        b = r;
    }
    return b;
}

void Integer_factorization(long long int b,long long int n){
    long long int a = 2;
    long long int count = 0;
    long long int ans = 1;
    long long int ndash = n;
    if(b == 1) cout << n << endl;
    else{
    while(ndash >= a*a){
        if(n % a  == 0){
            count++;
            n/=a;

        if(count % b == 0){
            ans *= a;
        }
        }else{a++;count = 0;}
    }
    cout<<  ans << endl;
    }
}

void ys(){
    cout << "Yes" << endl;
}

void yb(){
    cout << "YES" << endl;
}

void ns(){
    cout << "No" << endl;
}

void nb(){
    cout << "NO" << endl;
}


void solve(void){
    int n ,T;
    cin >> n >> T;
    int c[n],t[n];
    rep(i,0,n) cin >> c[i] >> t[i];
    int ans = INF;
    rep(i,0,n){
        if(t[i] <= T && ans > c[i]){
            ans = c[i];
        }
    }
    if(ans != INF) cout << ans << endl;
    else cout << "TLE" <<endl;
}


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


Measured memory_bytes: 256
#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

int main() {
  string s; cin >> s;
  int n = s.size();
  vector<int> ans(n, 0);

  // solve about R
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'R') cnt++;
    else {
      ans[i] += cnt / 2;
      ans[i-1] += (cnt + 1) / 2;
      cnt = 0;
    }
  }
  // solve about L
  cnt = 0;
  for (int i = n-1; i >= 0; i--) {
    if (s[i] == 'L') cnt++;
    else {
      ans[i] += cnt / 2;
      ans[i+1] += (cnt + 1) / 2;
      cnt = 0;
    }
  }

  for (int i = 0; i < n; i++) {
    cout << ans[i];
    cout << (i == n-1 ? "\n" : " ");
  }

  return 0;
}

Measured memory_bytes: 1024
#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define REP(i,a,b) for (int i = a; i <b; i++)
typedef long long ll;
#define int ll
typedef vector<int> vi;
typedef vector<long long> vl;
typedef pair<int,int> pi;
#define trace(x) cout<<#x<<"="<<x<<"\n";
#define sz(x) (int)(x.size())
#define mod 1000000007
#define endl "\n"
template < typename F, typename S >
ostream& operator << ( ostream& os, const pair< F, S > & p ) {
    return os << "(" << p.first << ", " << p.second << ")";
}

template < typename T >
ostream &operator << ( ostream & os, const vector< T > &v ) {
    os << "{";
    typename vector< T > :: const_iterator it;
    for( it = v.begin(); it != v.end(); it++ ) {
        if( it != v.begin() ) os << ", ";
        os << *it;
    }
    return os << "}";
}

template < typename T >
ostream &operator << ( ostream & os, const set< T > &v ) {
    os << "[";
    typename set< T > :: const_iterator it;
    for ( it = v.begin(); it != v.end(); it++ ) {
        if( it != v.begin() ) os << ", ";
        os << *it;
    }
    return os << "]";
}

template < typename F, typename S >
ostream &operator << ( ostream & os, const map< F, S > &v ) {
    os << "[";
    typename map< F , S >::const_iterator it;
    for( it = v.begin(); it != v.end(); it++ ) {
        if( it != v.begin() ) os << ", ";
        os << it -> first << " = " << it -> second ;
    }
    return os << "]";
}

#define deb(x) cerr << #x << " = " << x << endl;



int32_t main(){
    ios::sync_with_stdio(false);
    int cur=100;
    int x;
    cin>>x;
    int ans=0;
    while(cur<x){
        cur=(cur)+cur/100;
        ans++;
    }
    cout<<ans<<"\n";

    return 0;
}

Measured memory_bytes: 3656
PROGRAM Step
      IMPLICIT NONE
      INTEGER,PARAMETER :: p = 8
      integer(p) :: n,i,ans
      integer(p),allocatable :: a(:)
      
      read*,n
      allocate( a(n) )
      read*,a
      
      ans = 0
      do i = 2,n
        if( a(i)<a(i-1) )then
          ans = ans + (a(i-1)-a(i))
          a(i) = a(i-1)
        end if
      end do
      
      print*,ans
      
      
      stop
      !debugg
      
      
      
      END PROGRAM

Measured memory_bytes: 4656
# include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <functional>
using namespace std;
int main() {
	vector<int> top;
	int n, a, b, c;
	cin >> n >> a >> b >> c;
	int aa;
	for (int i = 0; i < n; i++) {
		cin >> aa;
		top.emplace_back(aa);
	}
	std::sort(top.begin(), top.end(), std::greater<int>());
	int mmax = 0, cal = 0;
	for (int i = 0; i < n; i++) {
		cal += top[i];
		mmax = max(mmax, (c + cal) / (a + (i + 1)*b));
	}
	cout << mmax << endl;
}

Measured memory_bytes: 3124
#include <bits/stdc++.h>
using namespace std;
int main(void){
    int N;
    cin >> N;
    vector<int> A(N);
    for(int i = 0; i < N; i++) cin >> A[i];
    sort(A.begin(),A.end());
    map<int,int> mp;
    for(int i = 0; i < N; i++) mp[A[i]]++;
    long long ans = 1;
    if(N == 1){
        cout << 1 << endl;
    }
    else if(N%2 == 1){
        if(A[0] != 0 || A[1] == 0){
            cout << 0 << endl;
            return 0;
        }
        for(int i = 1; i < N-2; i += 2){
            if(A[i] != A[i+1] || A[i+1] == A[i+2]){
                cout << 0 << endl;
                return 0;
            }
            if(A[i]%2 != 0){
                cout << 0 << endl;
                return 0;
            }
        }
        for(int i = 0; i < mp.size()-1; i++){
            ans *= 2;
            ans %= 1000000007;
        }
        cout << ans << endl;
    }
    else{
        for(int i = 0; i < N-2; i += 2){
            if(A[i] != A[i+1] || A[i+1] == A[i+2]){
                cout << 0 << endl;
                return 0;
            }
            if(A[i]%2 != 1){
                cout << 0 << endl;
                return 0;
            }
        }
        for(int i = 0; i < mp.size(); i++){
            ans *= 2;
            ans %= 1000000007;
        }
        cout << ans << endl;
    }
}


Measured memory_bytes: 3584
#include<bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp> 
// using namespace boost::multiprecision;
// #define int cpp_int
using namespace std;

#define fastio 			ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define int 			long long
#define ll 				long long
#define ld 				long double
#define vi 				vector<int>
#define pii 			pair<int,int>
#define vpii 			vector< pair<int,int> >
#define uset			unordered_set
#define umap 			unordered_map
#define maxpq 			priority_queue<int>
#define minpq			priority_queue<int,vi,greater<int>()>

#define all(v) 			v.begin(),v.end()
#define part(v,s,e)		v.begin()+s,v.begin()+e
#define rev(v)			reverse(v.begin(),v.end())
#define sz(x)			(int)x.size()
#define def(v)			memset(v,-1,sizeof(v));
#define def0(v)			memset(v,0,sizeof(v));
#define minv(a)			*min_element(all(a))
#define maxv(a)			*max_element(all(a))
#define sumv(a)			accumulate(all(a),0)

#define	lb				lower_bound
#define	ub				upper_bound
#define	desc			greater<int>()
#define	pb				emplace_back
#define	mp				make_pair
#define	F				first
#define	S				second

#define	mod 			1000000007
#define	inf 			1000000000000000
#define infty			1000000000000000000LL
#define	md				998244353
#define	PI				acos(-1.0)
#define	endl 			"\n"
#define	rr				return
#define	br				cout<<"\n";

#define gcd(a,b)		__gcd(a,b)
#define lcm(a,b)		(a/(__gcd(a,b)))*b

#define setbits(x) 		__builtin_popcountll(x)
#define zerobits(x)		__builtin_ctzll(x)

#define ip(v)	 		for(auto& i:v)	cin>>i;
#define op(v) 			for(auto i:v)	cout<<i<<" ";cout<<endl;
#define deb(x) 			cout <<"Value of " #x << " : " << x << endl;



void solve()
{	

	string s;
	cin>>s;

	if(s=="Sunny")
	cout<<"Cloudy\n";
	else if(s=="Cloudy")
	cout<<"Rainy\n";
	else
	cout<<"Sunny\n";	

}	

int32_t main()
{

	fastio
	cout<<setprecision(15)<<fixed;



	int t=1;
	// cin>>t;
	
	for(int i=1;i<=t;i++)
	{
		// cout<<"Case "<<i<<" : "<<endl;
		solve();
	}
	
	#ifndef ONLINE_JUDGE	
		cerr<<"time taken : "<<(float)clock()/CLOCKS_PER_SEC<<" secs"<<endl;
	#endif

	return 0;
}

Measured memory_bytes: 256
#include  <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define repk(i,m,n) for(ll i=m;i<n;i++)
typedef long long ll;
using namespace std;
int main()
{
    ll h,w,a,b;
    cin>>h>>w>>a>>b;
    ll aw=w-a;
    ll bh=h-b;
    rep(i,bh)
    {
        rep(j,aw)
            cout<<1;
        rep(j,a)
            cout<<0;
        cout<<endl;
    }
    rep(i,b)
    {
        rep(j,aw)
            cout<<0;
        rep(j,a)
            cout<<1;
        cout<<endl;
    }
}


Measured memory_bytes: 1280
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cassert>
const int N=1e5+5;
int n,val[N];

namespace utils{
	template <class T> inline void apn(T &x,const T y){x>y?x=y:0;}
	template <class T> inline void apx(T &x,const T y){x<y?x=y:0;}
	inline int nxi(){
		int x=0;
		char c;
		while(((c=getchar())>'9'||c<'0')&&c!='-');
		const bool f=(c=='-')&&(c=getchar());
		while(x=x*10-48+c,(c=getchar())>='0'&&c<='9');
		return f?-x:x;
	}
}
using namespace utils;

int main(){
	n=nxi();
	if(nxi()<2){
		puts("0");
		return 0;
	}
	for(int i=1; i<=n; ++i){
		val[i]=nxi();
	}
	int res=0,ans=0;
	for(int mx=0,i=n; i>=1; --i){
		apx(res,mx-val[i]);
		apx(mx,val[i]);
	}
	for(int mx=0,i=n; i>=1; --i){
		ans+=mx-val[i]==res;
		apx(mx,val[i]);
	}
	printf("%d\n",ans);
	return 0;
}


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

int solve(vector<vector<int>>&v,int n)
{
    int dp[n][3];
    dp[0][0]=v[0][0];
    dp[0][1]=v[0][1];
    dp[0][2]=v[0][2];
    for(int i=1; i<n; i++)
    {
        dp[i][0]=v[i][0]+max(dp[i-1][1],dp[i-1][2]);
        dp[i][1]=v[i][1]+max(dp[i-1][0],dp[i-1][2]);
        dp[i][2]=v[i][2]+max(dp[i-1][0],dp[i-1][1]);
    }
    return max(dp[n-1][0],max(dp[n-1][1],dp[n-1][2]));
}

int main()
{
    int n;
    cin>>n;
    vector<vector<int>> v;
    for(int i=0; i<n; i++)
    {
        vector<int> vi(3);
        cin>>vi[0]>>vi[1]>>vi[2];
        v.push_back(vi);
    }
    cout<<solve(v,n);
}

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

const int maxn = 8;

int n, m;
char mp[maxn][maxn + 1];

int main(void) {
  scanf("%d%d", &n, &m);
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%s", mp[i]);
    for (int j = 0; j < m; ++j) cnt += (mp[i][j] == '#');
  }
  if (cnt != n + m - 1) {
    puts("Impossible");
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (mp[i][j] == '#' && !(i == n - 1 && j == m - 1)) {
        if ((i == n - 1 || mp[i + 1][j] == '.') && (j == m - 1 || mp[i][j + 1] == '.')) {
          puts("Impossible");
          return 0;
        }
      }
    }
  }
  puts("Possible");
  return 0;
}


Measured memory_bytes: 128
using System;
 
namespace Sample
{
  class Sample
  {
    static void Main(string[] args)
    {
    string[] str =Console.ReadLine().Split(' ');
      int X=int.Parse(str[0]);
      int A=int.Parse(str[1]);
      if(X<A){
        Console.WriteLine(0);
      }else{
        Console.WriteLine(10);
      }
    
    }
    
  }

}

Measured memory_bytes: 11092
#include<bits/stdc++.h>
using namespace std;
int ans=0;
int main()
{
	ios_base::sync_with_stdio(false);
	int n,d;
	cin>>n>>d;
	for(int i=0;i<n;i++)
	{
		long long r,r1;
		cin>>r>>r1;
		long long u2=r*r+r1*r1;
		long double u=sqrt(u2)+0.999999;
		int now=u;
		if(now<=d&&now>=0)
			ans++;
	}
	cout<<ans<<endl;
	return 0;
}

Measured memory_bytes: 3668
# https://atcoder.jp/contests/abc169/tasks/abc169_b


N = gets.to_i
As = gets.split.map(&:to_i)
ans = 1;
As.each{|x|
  if (x == 0)
    ans = 0;
    break;
  end
  ans = ans * x if ans != -1
  if (ans > 1000000000000000000)
    ans = -1;
  end 
}

puts ans


Measured memory_bytes: 21720
#include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>

#define repi(i,a,b) for(int i = (a);i < (b); i++)
#define rep(i,a) repi(i,0,a)
#define repd(i,a,b) for(int i = (a); i >= (b); i--)
#define repit(i,a) for(__typeof((a).begin()) i = (a).begin(); i != (a).end(); i++)

#define all(u) (u).begin(),(u).end()
#define rall(u) (u).rbegin(),(u).rend()
#define UNIQUE(u) (u).erase(unique(all(u)),(u).end())

#define pb push_back
#define mp make_pair
#define INF 1e9
#define EPS 1e-8
#define PI acos(-1.0)

using namespace std;

typedef long long ll;
typedef vector<int> vi;
int n, l;
vector<double> s, t, u;

bool C3(double v, double start) {
  double volume = start;
  double before = 0;
  rep(i, n) {
    volume += (s[i] - before) * v;
    if(volume > l) volume = l;

    double d = v - u[i];
    volume += d * (t[i] - s[i]);
    if(volume > l) volume = l;
    else if(volume < -EPS) return false;
    before = t[i];
  }
  return true;
}

bool C2(double v, double start) {
  double volume = start;
  double before = 0;
  rep(i, n) {
    volume += (s[i] - before) * v;
    if(volume > l) volume = l;

    double d = v - u[i];
    volume += d * (t[i] - s[i]);
    if(volume > l) volume = l;
    //    else if(volume < -EPS) return false;
    before = t[i];
  }
  volume += (86400-before) * v;
  return volume > start - EPS;
}

bool C(double v) {
  double lower = 0;
  double upper = l;
  double mid;
  double tl;
  while(upper - lower > EPS) {
    mid = (lower + upper) / 2.0;
    if(C3(v, mid)) upper = mid;
    else lower = mid;
    //    cout << mid << endl;
  }
  //    cout << v << " " << lower << " " << upper << endl;
  if(l == upper) return false;
  tl = lower;
  upper = l;
  while(upper - lower > EPS) {
    mid = (lower + upper) / 2.0;
    if(C2(v, mid)) lower = mid;
    else upper = mid;
  }

  return upper > tl + EPS * 10.0;
}

int main(){
  while(cin >> n >> l, n||l) {
    s.resize(n);
    t.resize(n);
    u.resize(n);
    rep(i, n) cin >> s[i] >> t[i] >> u[i];
    double lower = 0;
    double upper = INF;
    double mid;
    while(upper - lower > EPS) {
      mid = (lower + upper) / 2.0;
      if(C(mid)) upper = mid;
      else lower = mid;
    }
    printf("%.6f\n", upper);
    
  }
  return 0;
}

Measured memory_bytes: 3120
#include<stdio.h>
int main(void){
    int a,b,ab,o,g;
    char x[2],v;
    a=b=ab=o=0;
    while(scanf("%d%c%s",&g,&v,x)!=EOF){
        if(x[0]=='A')(x[1]=='B')?ab++:a++;
        else if(x[0]=='B')b++;

        else o++;
    }
    printf("%d\n%d\n%d\n%d\n",a,b,ab,o);
    return 0;
}

Measured memory_bytes: 596
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef map<int,int> mii;
typedef map<ll,ll> mll;
#define pi 3.141592653589793
#define mod 998244353
#define pb push_back
#define all(v) v.begin(),v.end()
#define tc int t;cin>>t;while(t--)
#define pqmax priority_queue<int>
#define pqmin priority_queue<int,vi,greater<int>>
#define fast_io ios_base::sync_with_stdio(0), cin.tie(NULL)
#define tc_g int tt;cin>>tt;for(int ti=1;ti<=tt;ti++)
#define case_g "Case #"<<ti<<": "
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
typedef tree<int, null_type, greater_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_multiset;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
typedef tree<int, int, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_map;

int main() {
	fast_io;
	ll n, m;
	cin >> n >> m;
	vl a(m);
	ll sum = 0;
	for (int i = 0;i < m;i++) {
		cin >> a[i];
		sum += a[i];
	}
	if (sum > n)
		cout << -1 << '\n';
	else
		cout << n - sum << '\n';
}


Measured memory_bytes: 3728
#include <bits/stdc++.h>
using namespace std;
using LL = long long int;
#define incID(i, l, r) for(int i = (l)    ; i <  (r); ++i)
#define decID(i, l, r) for(int i = (r) - 1; i >= (l); --i)
#define incII(i, l, r) for(int i = (l)    ; i <= (r); ++i)
#define decII(i, l, r) for(int i = (r)    ; i >= (l); --i)
#define inc(i, n)  incID(i, 0, n)
#define dec(i, n)  decID(i, 0, n)
#define inc1(i, n) incII(i, 1, n)
#define dec1(i, n) decII(i, 1, n)
#define inID(v, l, r) ((l) <= (v) && (v) <  (r))
#define inII(v, l, r) ((l) <= (v) && (v) <= (r))
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define FR front()
#define BA back()
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
auto setmin   = [](auto & a, auto b) { return (b <  a ? a = b, true : false); };
auto setmax   = [](auto & a, auto b) { return (b >  a ? a = b, true : false); };
auto setmineq = [](auto & a, auto b) { return (b <= a ? a = b, true : false); };
auto setmaxeq = [](auto & a, auto b) { return (b >= a ? a = b, true : false); };
#define SI(v) static_cast<int>(v.size())
#define RF(e, v) for(auto & e: v)
#define until(e) while(! (e))
#define if_not(e) if(! (e))
#define ef else if
#define UR assert(false)
#define IN(T, ...) T __VA_ARGS__; IN_(__VA_ARGS__);
void IN_() { };
template<typename T, typename ... U> void IN_(T & a, U & ... b) { cin >> a; IN_(b ...); };
template<typename T> void OUT(T && a) { cout << a << endl; }
template<typename T, typename ... U> void OUT(T && a, U && ... b) { cout << a << " "; OUT(b ...); }

// ---- ----

template<typename T> istream & operator>>(istream & s, vector<T> & v) { RF(e, v) { s >> e; } return s; }
template<typename T> ostream & operator<<(ostream & s, vector<T> const & v) {
	inc(i, SI(v)) { s << (i == 0 ? "" : " ") << v[i]; }
	return s;
}

int main() {
	IN(int, n, m);
	vector<int> a(n);
	cin >> a;
	
	int s = 0;
	RF(e, a) { s += e; }
	
	int c = 0;
	RF(e, a) { if_not(4 * m * e < s) { c++; } }
	OUT(c >= m ? "Yes" : "No");
}


Measured memory_bytes: 256
#include <stdio.h>

int main(){
  int k=0,ch,n[105],i,j,a;
  scanf("%d",&a);
  for(i=0;i<a;i++){
    scanf("%d",&n[i]);
  }
  for(i=0;i<a-1;i++){
    for(j=1;j<a-i;j++){
      if(n[j]<n[j-1]){
	ch=n[j];
	n[j]=n[j-1];
	n[j-1]=ch;
	k++;
      }
    }
  }
  for(i=0;i<a-1;i++)printf("%d ",n[i]);
  printf("%d\n",n[a-1]);
  printf("%d\n",k);
  return 0;
}

Measured memory_bytes: 2708
from math import fabs

def main():
  n = int(input())
  T, A = list(map(int, input().split()))
  H = list(map(int, input().split()))
  
  place = 0
  m = 1000000000
  for i, h in enumerate(H):
    t_h = T - h * 0.006
    dif = fabs(A - t_h)
    if dif < m:
      m = min(m, dif)
      place = i+1
  print(place)
main()

Measured memory_bytes: 3060
#include <stdlib.h> //必須
#include <stdio.h>
int compare_int(const void *a, const void *b) //事前に入れる
{
    return *(int *)a - *(int *)b;
}

int main(void)
{
    int n;
    long long sum=0;
    int ans=1;
    scanf("%d",&n);
    int data[200010][2];//dut time
    for(int i=0;i<n;i++){
        scanf("%d %d",&data[i][1],&data[i][0]);
    }

    qsort(data, n, sizeof(data[0]), compare_int); //ソート関数（配列めい、総数、固定、比較方法）

    for (int i = 0; i < n; i++)
    {
      
        sum+=data[i][1];
       // printf("%d %d::%d\n", data[i][1], data[i][0],sum);
        if(sum >data[i][0]){
            ans=0;
            break;
        }
       
    }
    if(ans){
        printf("Yes\n");
    }else{
        printf("No\n");
    }
}

Measured memory_bytes: 3324
#include <bits/stdc++.h>
#ifdef HIRO
#define d(f_, ...) printf((f_), ##__VA_ARGS__)
#else
#define d(f_, ...)
#endif

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef queue<int> qi;
typedef queue< pair<int, int> > qp;
#define mp make_pair
#define pi 3.14159265358979323846
#define MAX max_element
#define MIN min_element
#define all(v) v.begin(), v.end()
#define gt(T) greater<T>()
#define sum(v) accumulate(v.begin(), v.end(), 0)
#define uni(v) do{ \
  sort(v.begin(), v.end()); \
  decltype(v)::iterator result = unique(v.begin(), v.end()); \
  v.erase(result, v.end()); \
}while(0)
#define fi(init, n) for(int i = init; i < n; ++i)
#define fj(init, n) for(int j = init; j < n; ++j)
#define fk(init, n) for(int k = init; k < n; ++k)
#define zero(x) memset(x, 0, sizeof(x))
#define negative(x) memset(x, ~0, sizeof(x))
const ll MOD = 1e9 + 7;
const int INF = 1e9;
const int di[] = { 0, 1, 0, -1 };
const int dj[] = { 1, 0, -1, 0 };

template<typename T>
T gcd(T a, T b) {
	return b ? gcd(b, a % b) : a;
}
template<typename T>
T lcm(T a, T b) {
	return a * b / gcd(a, b);
}
template<typename T>
int finder(vector<T> vec, T number) {
	auto itr = find(vec.begin(), vec.end(), number);
	size_t index = distance(vec.begin(), itr);
	if (index != vec.size()) return 1;
	else return 0;
}
ll frac(ll n){
	if (n == 0) return 1;
	return (n * frac(n - 1)) % MOD;
}
template<class T> inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template<class T> inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}

int arr[500010];
int main(int argc, char** argv) {
#ifdef HIRO
  string quiz(argv[1]);
  string id(argv[2]);
  string filename("input/" + quiz + "/" + id + ".txt");
  ifstream fin(filename);
  if (fin.peek() == ifstream::traits_type::eof()) {
    cout << "No input.";
    return 0;
  }
  ifstream cin(filename);
  std::cin.rdbuf(cin.rdbuf());
#endif
  ll ans = 0;
  // ll n;
  // cin >> n;
  // ll n, m;
  // cin >> n >> m;
  // ll n, m, k;
  // cin >> n >> m >> k;
  string s;
  cin >> s;
  int n = s.size();
  fi(0, s.size()) {
    if(s[i] == '<')
      arr[i + 1] = arr[i] + 1;
  }
  for(int i = s.size() - 1; i >= 0; --i) {
    if(s[i] == '>')
      arr[i] = max(arr[i], arr[i + 1] + 1);
  }
  ans = accumulate(arr, arr + n + 1, 0ll);
  // fi(0, s.size() + 1)
  //   ans += arr[i];
  cout << ans << endl;
  return 0;
}



Measured memory_bytes: 2820