akhauriyash/Code-Regression huggingface dataset:
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<vector>
#include<map>
#include<set>
using namespace std;
#define ll long long
#define pb(x) push_back(x)
#define mp(a,b) make_pair(a,b)
#define fi first
#define se second
#define pr(x) cerr<<#x<<"="<<(x)<<endl
#define pri(x,lo) {cerr<<#x<<"={";for (int ol=0;ol<=lo;ol++)cerr<<x[ol]<<",";cerr<<"}"<<endl;}
#define id(o,p) ((o-1)*m+p)
#define inf 100000000
#define N 1000010
struct node
{
	int to,next,f;
}e[N];
char ch[1010],a[110][110];
int size,n,m,nm,maxx,S,T,g[N],he[N],dep[N],q[N],i,j,ans;
void add1(int o,int p,int q) {e[++size].to=p,e[size].next=g[o];g[o]=size,e[size].f=q;}
void add(int o,int p,int q) {add1(o,p,q);add1(p,o,0);/*printf("%d-->%d f=%d\n",o,p,q);*/}
bool bfs()
{
	for (i=0;i<=maxx;i++) dep[i]=0;
	dep[S]=1;
	int head=0,tail=0;
	q[++tail]=S;
	while (head!=tail)
	{
		int x=q[++head];
		for (int k=g[x];k;k=e[k].next)
		{
			int y=e[k].to;
			if (dep[y]==0&&e[k].f)
			{
				dep[y]=dep[x]+1;
				q[++tail]=y;
			}
		}
	}	
	return dep[T]!=0;
}
int dfs(int x,int flow)
{
	if (x==T) return flow;
	int now=0,used=0;
	for (int k=g[x];k;k=e[k].next)
	{
		int y=e[k].to;
		if (dep[y]==dep[x]+1&&e[k].f)
		{
			now=dfs(y,min(flow-used,e[k].f));
			used+=now;
			e[k].f-=now;
			e[k^1].f+=now;
			if (e[k].f) he[x]=k;
			if (used==flow) break;
		}
	}
	if (used==0) dep[x]=-1;
	return used;
}
void dinic()
{
	while (bfs())
	{
		for (int i=1;i<=maxx;i++) he[i]=g[i];
		ans+=dfs(S,inf);
	}
}
int main()
{
	scanf("%d %d",&n,&m);
	size=1;
	nm=n*m;
	maxx=2*nm+n+m;
	for (i=1;i<=n;i++)
	{
		scanf("%s",ch);
		for (j=1;j<=m;j++)
		{
			a[i][j]=ch[j-1];
			if (a[i][j]=='S') a[i][j]='o',S=id(i,j)+nm;
			if (a[i][j]=='T') a[i][j]='o',T=id(i,j);
			if (a[i][j]=='o')
			{
				add(id(i,j),id(i,j)+nm,1);
				add(id(i,j)+nm,i+2*nm,inf);
				add(i+2*nm,id(i,j),inf);
				add(id(i,j)+nm,j+2*nm+n,inf);
				add(j+2*nm+n,id(i,j),inf);
			}
		}
	}
	dinic();
	if (ans>=inf) printf("-1\n");else printf("%d\n",ans);
}

Measured memory_bytes: 10496
#![allow(unused_imports)]
use std::cmp::*;
use std::collections::*;
use itertools::Itertools;
use num::clamp;
use proconio::{input, marker::*, fastout};
use superslice::*;

#[fastout()]
fn main() {
    input! {
        n: usize,
        a: [u64; n]
    }
    let m = 1_000_000_007u64;

    let mut ap = Vec::new();
    for mut v in a {
        let mut vp = HashMap::new();
        for p in 2.. {
            if p * p > v {
                break;
            }
            let mut count = 0;
            while v % p == 0 {
                count += 1;
                v /= p;
            }
            if count > 0 {
                vp.insert(p, count);
            }
        }
        if v != 1 {
            vp.insert(v, 1);
        }
        ap.push(vp);
    }

    let mut lcm = HashMap::new();
    for vp in &ap {
        for (&p, &count) in vp.iter() {
            lcm.entry(p).and_modify(|c| *c = max(*c, count)).or_insert(count);
        }
    }

    let mut ans = 0;
    for vp in ap {
        let mut res = 1;
        for (&p, &count) in &lcm {
            let sub = *vp.get(&p).unwrap_or(&0);
            for _ in 0..count - sub {
                res *= p;
                res %= m;
            }
        }
        ans += res;
        ans %= m;
    }

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


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

int main() {

    string T;
    int num,h;
    string left, right, Text;
    while(true){
        cin >> T;
        if(T == "-") break;
        cin >> num;
        for (int i=0; i<num; i++){
            cin >> h;
            left = T.substr(0, h);
            right = T.substr(h, T.size()-h);
            T = right+left;
        }
        cout << T << endl;
    }
    return 0;
}

Measured memory_bytes: 3148
#include <iostream>
#include <cfenv>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <limits>

#define rep(i,n) for(int (i)=0;(i)<(n); ++(i))
using namespace std;

int main() {
    string s, t;
    int a, b;
    cin >> s >> t;
    cin >> a >> b;

    string u;

    cin >> u;

    if (s == u) {
        cout << a - 1 << " " << b << endl;
    } else {
        cout << a << " " << b - 1 << endl;
    }

}

Measured memory_bytes: 888
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <bitset>
#include <map>
#include <string>

#define repd(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;

using namespace std;

int inputValue(){
	int a;
	cin >> a;
	return a;
}

void inputArray(int *p,int a){
	rep(i,a){
		cin >> p[i];
	}
}

void inputVector(vector<int> *p,int a){
	rep(i,a){
		int input;
		cin >> input;
		p -> push_back(input);
	}
}

template <typename T>
void output(T a,int precision){
	if(precision > 0){
		cout << setprecision(precision) << a << "\n";
	}else{
		cout << a << "\n";
	}
}

int main(){
	//source
	int N=inputValue();
	double x[N];
	string u[N];
	rep(i,N){
		cin >> x[i] >> u[i];
	}
	double result=0;
	rep(i,N){
		if(u[i]=="JPY"){
			result+=x[i];
		}else{
			result+=x[i]*380000.0;
		}
	}

	cout << result << endl;

	return 0;
}


Measured memory_bytes: 256
#include <stdio.h>

int main(){
  int n, a, b;  scanf("%d %d %d", &n, &a, &b);
  int ans = 0;
  for(int i=1; i<=n; i++){
    int sum = 0;
    int icopy = i;
    while(icopy > 0){
      sum += (icopy%10);
      icopy /= 10;
    }
    if(a <= sum && sum <= b)
      ans += i;
  }
  printf("%d\n", ans);
  return 0;
}


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

int mod = 1000000007;
ll dp[100005];;

ll gcd(long long a,long long b){

  if(b == 0)
    return a;
  else return gcd(b,a%b);
}


int main(){

     int n,k; cin>>n>>k;
    int a[n];
   map<int,int>mp;

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

     priority_queue<int>Q;

  for(map<int,int>::iterator it = mp.begin();it!= mp.end();it++)
  {
     // cout<<it->second<<" "<<endl;
     Q.push(it->second);
  }

  int sum = 0;

  if(mp.size() < k)
  k = mp.size();

  for(int i=0;i<k;i++){
    sum += Q.top();
     Q.pop();
  }

  //cout<<n<<"  "<<sum<<endl;

  cout<<n-sum<<endl;

 return 0;
 }


Measured memory_bytes: 14292
a,b=map(int,input().split())
import math
al=(a/0.08)
bl=(b/0.10)
ah=(a+1)/0.08
bh=(b+1)/0.10
#print(al,ah)
#print(bl,bh)
if ah<=bl or bh<=al:
  print(-1)
  exit()
print(math.ceil(max(al,bl)))

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

int main()
{
    string s, t;

    cin >> s >> t;
    bool f = true;
    for(int i = 0; i < s.size(); i++)
    {
        if(s[i] != t[i])
            f = false;
    }
    if(f && s.size() == t.size()-1)
    {
        cout << "Yes\n";
    }
    else
    {
        cout << "No\n";
    }
    return 0;
}


Measured memory_bytes: 3128
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for(i = 0; i < n; i++)
//2D::rep(i,j)rep(j,j)cin>>bin[i][j];
//vector<int> a(n)
#define Graph vector<vector<int>>
#define A1 cout<<"No"<<endl
#define A2 cout<<"Yes"<<endl
#define A3 cout<<ans<<
#define AA(i) cout<<i<<endl;
const int U=2e5+5;
const ll MOD=1000000007;
const int INF = 1001001001;

int main(){
    int i,N; cin >> N;
    vector<ll> A(N),B(N+1,0);
    rep(i,N) cin >> A[i];
    rep(i,N){
        B[N-1-i] = (A[N-i-1] + B[N-i])%MOD;
    }
    ll ans = 0;
    rep(i,N-1){
        ans = (ans + A[i]*B[i+1] %MOD)%MOD;
    }
    AA(ans);
    return 0;
}

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

int main()
{
  int64_t nAnum, nBnum, nXpos;
  cin >> nAnum >> nBnum >> nXpos;

  int64_t nDivHigh = nBnum / nXpos;
  int64_t nDivLow;
  if (nAnum - 1 < 0)
  {
    nDivHigh++;
    nDivLow = 0;
  }
  else
    nDivLow = (nAnum - 1) / nXpos;

  cout << (nDivHigh - nDivLow) << endl;
  return 0;
}

Measured memory_bytes: 384
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define fd(n) fixed<<setprecision(n)
ld dist(ll x,ll y,ll z, ll w)
{
	return  sqrt((	abs(x-z)*abs(x-z) + abs(y-w)*abs(y-w)))*1.0 ;
}


int main()
{

    
   ll n;
   cin>>n;
   ld avg=0;
   ll a[n],b[n],i,j;
   
   for( j=0;j<n;j++)
    cin>>a[j]>>b[j];
   
   for( i=0;i<n;i++)
    {
    	for(j=i+1;j<n;j++)
    	  {
    	  	avg=avg + dist(a[i],b[i],a[j],b[j]);
    	 
		  }
    	
	}
	
	ld ans = (ld)(avg/n)*2.0;
	
	cout<<fd(10)<<ans;
    
}






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

using namespace std;

// Repetitions
#define FOR(i,a,n) for(ll i = ((ll) a); i < ((ll) n); ++i)
#define FORR(i, s, g) for(ll i = ((ll)s - 1); i >= ((ll) g); --i)
#define REP(i, n) FOR(i, 0, n)
#define REPR(i, n) FORR(i, n, 0)

// Container Utils
#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
#define SORTALL(v) sort(ALL(v))
#define SZ(a) int((a).size())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())

// For Debug
#define DMP(x)  cerr << #x << " = " << (x) << endl
#define DBG(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl

// Aliases
#define PB push_back
#define MP make_pair
typedef long long ll;
typedef string str;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<long long> vll;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vpii;
typedef vector<pll> vpll;

// I/O Asynchronizing
struct aaa{
    aaa(){
        cin.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(20);
    };
}aaaaaaa;

int main() {
    str s, t, u;
    ll k, cnt = 0, cnt_2 = 0, cnt_3 = 0;
    cin >> s >> k;
    int len = s.length();
    t = s + s;
    u = t + s;
    FOR(i, 1, len) {
        if(s[i] == s[i - 1]) {
            cnt++;
            s[i] = '0';
        }
    }
    FOR(i, 1, t.length()) {
        if(t[i] == t[i - 1]) {
            cnt_2++;
            t[i] = '0';
        }
    }
    FOR(i, 1, u.length()) {
        if(u[i] == u[i - 1]) {
            cnt_3++;
            u[i] = '0';
        }
    }
    DBG(cnt);
    DBG(cnt_2);
    DBG(cnt_3);
    cout << (cnt_3 - cnt_2 != cnt_2 - cnt ? cnt_2 * (k / 2) + cnt * (k % 2) : cnt + (cnt_2 - cnt) * (k - 1)) << "\n";

    return 0;
}


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

# define Rep(i,a,b) for(int i=a;i<=b;i++)
# define _Rep(i,a,b) for(int i=a;i>=b;i--)
# define RepG(i,u) for(int i=head[u];~i;i=e[i].next)

typedef long long ll;

const int N=2e5+5;

template<typename T> void read(T &x){
   x=0;int f=1;
   char c=getchar();
   for(;!isdigit(c);c=getchar())if(c=='-')f=-1;
   for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+c-'0';
    x*=f;
}

int n,ans;
char s[N];
int sumw[N],sumr[N];

int main()
{
    int last=0;
    read(n);
    scanf("%s",s+1);
    int r=n;
    Rep(i,1,n){
        if(s[i]=='R')continue;
        while(r&&s[r]!='R')r--;
        if(i>=r)break;
        ans++;
        swap(s[i],s[r]);
    }
    printf("%d\n",ans);
    return 0;
}

Measured memory_bytes: 3920
#include<stdio.h>
#define MAX 2000000

int h, a[MAX+1];

void maxHeapify(int i){
	int l, r, largest, tmp;
	l = 2 * i;
	r = 2 * i + 1;
	
	if(l <= h && a[l] > a[i]){
		largest = l;
	} else {
		largest = i;
	}
	
	if(r <= h && a[r] > a[largest]){
		largest = r;
	}
	
	if(largest != i){
		tmp = a[i];
		a[i] = a[largest];
		a[largest] = tmp;
		maxHeapify(largest);
	}
}

int main(){
	scanf("%d", &h);
	
	for(int i = 1; i <= h; i++)
	{
		scanf("%d", &a[i]);
	}
	
	for(int i = h / 2; i >= 1; i--)
	{
		maxHeapify(i);
	}
	
	for(int i = 1; i <= h; i++)
	{
		printf(" %d", a[i]);
	}
	
	printf("\n");
	
	return 0;
}


Measured memory_bytes: 3748
#include<iostream>
#include<string>
#include<cstring>
using namespace std;
char a[100005];
long long b;
int main()
{
    cin>>a;
    for(int i=1;i<strlen(a);i++)
    if(a[i-1]!=a[i]) b++;
    cout<<b<<endl;
    return 0;
}

Measured memory_bytes: 384
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstring>
#include <cmath>
#include <queue>
#include <set>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0; i<n; i++)
typedef long long ll;
typedef pair<int,int> pii;

int main() {
	int n, m;
	cin >> n >> m;
	if(m==0) {
		cout << n+1 << endl;
		return 0;
	}
	vector<pii> cd(m);
	rep(i, m) {
		cin >> cd[i].first >> cd[i].second;
	}
	sort(cd.begin(), cd.end());
	vector<pii> v;
	int s=cd[0].first, t=cd[0].second;
	for(int i=1; i<m; i++) {
		if(t <= cd[i].first) {
			v.push_back(pii(s,t));
			s = cd[i].first;
			t = cd[i].second;
		} else {
			t = max(t, cd[i].second);
		}
	}
	v.push_back(pii(s,t));
	int res = n+1;
	rep(i, v.size()) {
		res += (v[i].second - v[i].first)*2;
	}
	cout << res << endl;

	return 0;
}

Measured memory_bytes: 1216
#include<cstdio>
#include<vector>
#include<algorithm>
#include<utility>
#include<numeric>
#include<iostream>
#include<array>
#include<string>
#define _USE_MATH_DEFINES

#include<math.h>
#include<unordered_map>

#define min(a,b) (a)>(b)?(b):(a)
#define max(a,b) (a)>(b)?(a):(b)

using namespace std;

int gcd(int x, int y)
{
	if (x%y == 0)
	{
		return y;
	}
	else
	{
		return gcd(y, x%y);
	}
}

int main()
{
	int x, y;
	cin >> x >> y;
	cout << gcd(x, y) << endl;
	return 0;
}

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

using namespace std;


int main() {
    long long a, b, c;
    cin >> a >> b >> c;
    if(a == 1 && b == 1 && c == 1) {
        cout << 0 << "\n";
        return 0;
    }
    if(a == b && b == c && c == a) {
        cout << -1 << "\n";
        return 0;
    }
    int ans = 0;
    if(a % 2 == 1 && b % 2 == 1 && c % 2 == 1) {
        int ha = (b + c) / 2;
        int hb = (c + a) / 2;
        int hc = (a + b) / 2;
        a = ha;
        b = hb;
        c = hc;
        ans++;
    }
    while(a % 2 == 0 && b % 2 == 0 && c % 2 == 0) {
        int ha = (b + c) / 2;
        int hb = (c + a) / 2;
        int hc = (a + b) / 2;
        a = ha;
        b = hb;
        c = hc;
        ans++;
    }
    cout << ans << "\n";
    return 0;
}

Measured memory_bytes: 3652
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <cmath>
#include <iomanip>
#include <bitset>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <utility>
#include <set>
using namespace std;
//cout <<  << endl;
typedef long long int ll;
typedef double ld;

int main(){
  	bool f=false;
  	string s;
    ll k,ans=0,ans2=1,count=1;
  	cin >> s >> k;
  	char x=s[0];
  	for (ll i=1;i<s.size();i++){
      	if (!f){
          	if (s[i]==x){
				x=s[i];
              	continue;
        	}
        }
      	if (s[i]==x){
          	count++;
        }else{
          	ans+=count/2;
          	count=1;
        }
        x=s[i];
      	f=true;
    }
  	ans*=k;
  	if (!f){
      	cout << k*s.size()/2 << endl;
      	return 0;
    }
    x=s[0];
  	for (ll i=1;i<s.size();i++){
      	if (s[i]==x){
              ans2++;
        }
        else break;
        x=s[i];
   	}
    ans+=ans2/2*k;
    if (s[0]==s[s.size()-1]){
      	if (ans2%2==1 && count%2==1)ans+=k-1;
    }
  	ans+=count/2*k;
  	if (ans>s.size()*k/2)ans=s.size()*k/2;
 	cout << ans << endl;
  	return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <vector>
#include <string.h>
#include <algorithm>
#include <cstring>
#include <queue>
#include <assert.h>
#include <cmath>
#include <deque>
#include <set>
#include <unordered_map>
#include <complex>
#include <fstream>
using namespace std;
using ll = long long;
using ld = long double;
const int mxn = 2e5+20;

vector<pair<int, int> > adj[mxn];

int main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

	int tc; cin>>tc;
	while(tc--) {
		int n; cin>>n;
		for(int i=1; i<=n; i++) adj[i].clear();
		vector<pair<int, pair<int, int> > > camels;
		for(int i=0; i<n; i++) {
			int k, l, r; pair<int, pair<int, int> > tmp;
			cin>>k>>l>>r; tmp.first = k; tmp.second = {l, r};
			camels.push_back(tmp);
		}
		for(auto x:camels) if(x.second.first>=x.second.second) adj[x.first].push_back(x.second);

		multiset<int> Set;
		ll added = 0ll;
		for(int i=1; i<=n; i++) {
			for(auto x:adj[i]) {Set.insert(x.first-x.second); assert(x.first-x.second>=0); added+=1ll*(x.first-x.second);}
			while(i<(int)Set.size()) {added-=1ll*(*Set.begin()); Set.erase(Set.begin());}
		}
		//cout << "added is " << added << '\n';

		for(int i=1; i<=n; i++) adj[i].clear();

		for(auto x:camels) if(x.second.first<x.second.second) adj[x.first+1].push_back(x.second);

		Set.clear();
		ll addedmore = 0ll;
		for(int i=n+1; i>=2; i--) {
			for(auto x:adj[i]) {Set.insert(x.second-x.first); assert(x.second-x.first>0); addedmore+=1ll*(x.second-x.first);}
			while(n+1-i<(int)Set.size()) {addedmore-=1ll*(*Set.begin()); Set.erase(Set.begin());}
		}
		//cout << "addedmore is " << addedmore << '\n';

		ll ans = 0;
		for(auto x:camels) ans+=1ll*min(x.second.first, x.second.second);

		//cout << "Original ans = " << ans << '\n';
		ans+=added; ans+=addedmore;
		cout << ans << '\n';

	}

	return 0;
}


Measured memory_bytes: 18088
#include <iostream>
#include <vector>
#include <algorithm>
#include <string.h>
#include <iomanip>
#include <math.h>
#include <string>
#include <queue>
#include <map>
#include <set>
#include <functional>

using namespace std;

typedef long long int ll;
typedef std::pair<int, int> pii;
typedef std::pair<ll, int> pli;
typedef std::pair<ll, ll> pll;

#define FOR(i,n,m) for(ll i=(ll)(m);i<(ll)(n);++i)
#define REP(i,n) FOR(i,n,0)
#define IREP(i,n) for(ll i=(ll)(n);i>=0;--i)
#define OF64 std::setprecision(10)

const ll MOD = 1000000007;
const ll INF = (ll)1e15;

int main()
{
	int X, Y;
	cin >> X >> Y;
	cout << X + Y / 2 << endl;
	return 0;
}

Measured memory_bytes: 256
#include<iostream>
#include<iomanip>
#include<math.h>
#include<vector>
#include<algorithm>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<string>
#include<time.h>
#define INF 1000000000ll
#define MOD 1000000007ll
#define EPS 1e-10
#define REP(i,m) for(long long i=0; i<m; ++i)
#define FOR(i,n,m) for(long long i=n; i<m; ++i)
#define DUMP(n,a) for(long long dump=0; dump<n; ++dump) { cout<<a[dump]; if(dump!=n-1) cout<<" "; else cout<<endl; }
#define ALL(v) v.begin(),v.end()
#define pb push_back
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef long double ld;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	ll n,a,b;
	cin>>n>>a>>b;
	vector<ll> x(n);
	REP(i,n) cin>>x[i];
	ll ret=0;
	REP(i,n-1) {
		if((x[i+1]-x[i])*a>b) ret+=b;
		else ret+=(x[i+1]-x[i])*a;
	}
	cout<<ret<<endl;
}


Measured memory_bytes: 1024
#include <bits/stdc++.h>
#define FASTIO ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define LL long long int
using namespace std;

const int N = 1e5 + 5;
const int oo = 1e9 + 5;
const int MOD = 998244353;

void solve() {
    char a;
    cin >> a;
    if (a >= 'a' && a <= 'z') {
        cout << "a\n";
    } else {
        cout << "A\n";
    }
} 

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

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

const int MOD = 1000000007;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define copy(from, to) copy(from.begin(), from.end(), back_inserter(to))
#define sort(a) sort(a.begin(), a.end())
#define reverse(s) reverse(s.begin(), s.end())
#define p(s) cout << (s) << endl

typedef long long ll;
using namespace std;

template<class T>
void load(vector<T> &v, int n) {
  for (int i = 0; i < n; ++i) {
    T t;
    cin >> t;
    v.push_back(t);
  }
}

template<class T>
T max(vector<T> &v) {
  return *max_element(v.begin(), v.end());
}

template<class T>
T min(vector<T> &v) {
  return *min_element(v.begin(), v.end());
}

void py(bool isUpper = false) {
  if (isUpper) {
    p("YES");
  } else {
    p("Yes");
  }
}

void pn(bool isUpper = false) {
  if (isUpper) {
    p("NO");
  } else {
    p("No");
  }
}

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

  if (b < c || d < a) {
    p(0);
  } else  {
    p(min(b, d) - max(a, c));
  }
}

Measured memory_bytes: 256
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <queue>
#include <utility>
#include <numeric>
#include <cmath>
#include <bitset>
#include <stack>
#include <algorithm>
#define llc (long long)
#define pm %1000000007
#define ldc (long double)
using namespace std;


int main(){
	int n;cin>>n;
	int x, y;
	cin>>x>>y;
	cout<<min(x, y)<<" "<<max(0,x+y-n)<<"\n";
}

Measured memory_bytes: 256
#include <stdio.h>
 
int main( void ) {
  int a, b, sum, digit;
 
  while( scanf( "%d%d", &a, &b ) != EOF ) {
    for( sum = a + b, digit = 0; sum; sum /= 10, digit++ ) ;
    printf( "%d\n", digit );
  }

  return( 0 );
}

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

#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
const int INF = 1e9;

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

  int ans = 6 - a - b;
  cout << ans << endl;
  return 0;
}


Measured memory_bytes: 256
//////////////////////////
//      _        ____   //
//  U  /"\  u U /"___|  //
//   \/ _ \/  \| | u    //
//   / ___ \   | |/__   //
//  /_/   \_\   \____|  //
//   \\    >>  _// \\   //
//  (__)  (__)(__)(__)  //
//  Compro by NULL_CT©  //
//////////////////////////
// STL libs
#include <algorithm>
#include <array>
#include <bitset>
#include <cctype>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define REP(I, LIM) for (int I = 0; I < (LIM); I++)
#define ALL(LIST) (LIST.begin()), (LIST.end())

using namespace std;

constexpr int MOD = 10000007;

vector<long> divisor(long &_n) {
  vector<long> head, tail;
  for (long i = 1; i * i <= _n; i++) {
    if (_n % i == 0) {
      head.push_back(i);
      if (i * i != _n)
        tail.push_back(_n / i);
    }
  }
  head.insert(head.end(), tail.rbegin(), tail.rend());
  return head;
}

long kadanes(vector<long> &_ls) {
  long highestMax=0,currentMax=0,length=_ls.size();
  for(long i=0;i<length;i++){
    currentMax=max(_ls[i],currentMax+_ls[i]);
    highestMax=max(highestMax,currentMax);
  }
  return highestMax;
}

struct init {
  init() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    // cout<<fixed<<setprecision(20);
  }
} init;

/*----------------------------*/

int main() {
  string s;
  cin>>s;
  unsigned long a=0;
  for(auto i:s){
    a+=i-'0';
  }
  if(a % 9 == 0){
    cout<<"Yes\n";
  }else{
    cout<<"No\n";
  }
}


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

using namespace std;

const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
//#define rep(i, n) for (ll i = 0; i < (n); ++i)
//typedef pair<ll, ll> P;
typedef pair<double, double> P;
const ll INF = 10e17;
#define cmin(x, y) x = min(x, y)
#define cmax(x, y) x = max(x, y)
#define ret() return 0;

double equal(double a, double b) {
    return fabs(a - b) < DBL_EPSILON;
}

std::istream &operator>>(std::istream &in, set<string> &o) {
    string a;
    in >> a;
    o.insert(a);
    return in;
}

std::istream &operator>>(std::istream &in, queue<int> &o) {
    ll a;
    in >> a;
    o.push(a);
    return in;
}

bool contain(set<int> &s, int a) { return s.find(a) != s.end(); }

//ofstream outfile("log.txt");
//outfile << setw(6) << setfill('0') << prefecture << setw(6) << setfill('0') << rank << endl;
// std::cout << std::bitset<8>(9);
//const ll mod = 1e10;

typedef priority_queue<ll, vector<ll>, greater<ll> > PQ_ASK;

int main() {
    string s;
    cin >> s;
    bool b = [&] {
        rep(i, s.size() - 1) if (s.substr(i, 2) == "AC") return true;
        return false;
    }();
    string ans = b ? "Yes" : "No";
    cout << ans << endl;
}


Measured memory_bytes: 256
#include <stdio.h>
int main()
{
  int n, cnt = 0,check=0;
  char s;
  scanf("%d",&n);
  for(int i=0;i<n+1;i++)
  {
    scanf("%c",&s);  
    if('A'==s)	check=1;
    else if('B'==s && check==1) check=2;
    else if('C'==s && check==2) 
    {
      check=0; 
     cnt++;
    }
      else check=0;
    
  }
    printf("%d",cnt);
    return 0;
}

Measured memory_bytes: 1712
import java.math.*;
import java.util.*;
class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int k = sc.nextInt();
        String s = sc.next();
        if(s.length()<=k){
            System.out.println(s);
        } else {
            System.out.println(s.substring(0, k)+"...");
        }
    }
}


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

#define int long long
#define vvi vector<vector<int>>
#define vec vector
#define pq priority_queue
#define all(v) (v).begin(), (v).end()
#define uniqueV(x) sort(x.begin(), x.end()); x.erase(unique(x.begin(), x.end()), x.end());
#define rep(i, n) for (int (i) = (0); (i) < (n); ++(i))
#define repp(i, m, n) for (int (i) = (m); (i) < (n); ++(i))
#define dbg(x) cerr << #x << ": " << x << endl;
#define dbg2(x, y) cerr<<"("<<#x<<", "<<#y<<") = "<<"("<<x<<", "<<y<<")"<<endl;
#define dbg3(x, y, z) cerr<<"("<<#x<<", "<<#y<<", "<<#z<<") = "<<"("<<x<<", "<<y<<", "<<z<<")"<<endl;
#define dbgB(value, size) cerr<<#value<<": "<<bitset<size>(value) << endl;
#define line() cerr << "---------------" << endl;

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

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

template<typename T>
void print1(T begin, T end) {
	while (begin != end) {
		cerr << (*begin) << " ";
		*begin++;
	}
	cerr << endl;
}

template<typename T>
void print2(T Array, int height, int width) {
	for (int i = 0; i < height; i++) {
		for (int j = 0; j < width; j++) {
			cerr << " " << Array[i][j];
		}
		cerr << endl;
	}
}

void print() { std::cerr << endl; }
template <class Head, class... Tail>
void print(Head&& head, Tail&&... tail) {
	std::cerr << head << " ";
	print(std::forward<Tail>(tail)...);
}

template<class T>
void Add(T &a, const T &b, const T &mod=1000000007) {
	int val = ((a % mod) + (b % mod)) % mod;
	if (val < 0) { val += mod; }
	a = val;
}

template <typename X, typename T> auto vectors(X x, T a) { return vector<T>(x, a); }
template <typename X, typename Y, typename Z, typename... Zs> auto vectors(X x, Y y, Z z, Zs... zs) { auto cont = vectors(y, z, zs...); return vector<decltype(cont)>(x, cont); }

// ------------------------------------------------------------------------------------------

int n;
vec<int> cand;
int dp[111111];

int rec(int sum) {
	if (sum >= n) {
		if (sum == n) {
			return 0;
		}
		return 1e18;
	}

	if (dp[sum] != 1e18) {
		return dp[sum];
	}

	int ret = 1e18;
	rep (i, cand.size()) {
		chmin(ret, rec(sum + cand[i]) + 1);
	}

	return dp[sum] = ret;
}

signed main() {
	cin >> n;

	rep (i, 111111) {
		dp[i] = 1e18;
	}

	cand.push_back(1);
	int num = 6;
	while (1) {
		if (num > n) break;
		cand.push_back(num);
		num *= 6;
	}
	num = 9;
	while (1) {
		if (num > n) break;
		cand.push_back(num);
		num *= 9;
	}

	int ans = rec(0);

	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 4224
#include <bits/stdc++.h>
#define rep(i, n) for(ll i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
const double PI=acos(-1);

template<typename T>
istream& operator>> (istream& is, vector<T> &vec){
    for(T& x: vec) is >> x;
    return is;
}

int main(){
    ll n; cin >> n;
    vector<ll> a(n); cin >> a;
    sort(a.begin(), a.end());
    vector<ll> as(n, 0);
    rep(i, n){
        if(i > 0) as[i] += as[i-1] + a[i];
        else as[i] += a[i];
    }
    vector<ll> ab(n, false);
    ab[n-1] = true;
    rep(i, n){
        if(i == n-1) continue;
        if(as[i]*2 >= a[i+1]) ab[i] = true;
    }
    ll cnt = 0;
    for(ll i = n-1; i >= 0; --i){
        if(!ab[i]) break;
        cnt++;
    }
    cout << cnt << endl;
    return 0;
}

Measured memory_bytes: 5564
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 , mut $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let mut $ var = read_value ! ( $ iter , $ t ) ; input_inner ! { $ iter $ ( $ r ) * } } ; ( $ iter : expr , mut $ var : ident $ ( $ r : tt ) * ) => { let mut $ var = $ iter . next ( ) . unwrap ( ) . parse ::< usize > ( ) . unwrap ( ) ; input_inner ! { $ iter $ ( $ r ) * } } ; ( $ iter : expr , $ var : ident : $ t : tt $ ( $ r : tt ) * ) => { let $ var = read_value ! ( $ iter , $ t ) ; input_inner ! { $ iter $ ( $ r ) * } } ; ( $ iter : expr , $ var : ident $ ( $ r : tt ) * ) => { let $ var = $ iter . next ( ) . unwrap ( ) . parse ::< usize > ( ) . unwrap ( ) ; 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 > ( ) . unwrap ( ) } ; }
use std::cmp::min;
fn main() {
    input! { n, a: [usize; n] };
    let mut dp = vec![vec![0; n]; n];
    for k in 1..n {
        for i in 0..(n - k) {
            let mut x = std::usize::MAX;
            let mut s = a[i + k];
            for j in 0..k {
                x = min(x, dp[i][i + j] + dp[i + j + 1][i + k]);
                s += a[i + j];
            }
            dp[i][i + k] = x + s;
        }
    }
    println!("{}", dp[0][n - 1]);
}


Measured memory_bytes: 4352
#include <iostream>

using namespace std;

int order[2001][2001];

int sum_square(int x1, int y1, int x2, int y2) {
	return order[x2][y2] - order[x2][y1] - order[x1][y2] + order[x1][y1];
}

int main(int argc, char *argv[]) {
	int N, K;
	cin >> N >> K;

	for (int i = 0; i < N; i++) {
		int x, y;
		char c;
		cin >> x >> y;
		cin >> c;
		if (c == 'W') {
			x += K;
		}
		order[x % (2 * K) + 1][y % (2 * K) + 1] += 1;
	}

	for (int x = 1; x <= 2 * K; x++) {
		for (int y = 1; y <= 2 * K; y++) {
			order[x][y] += order[x - 1][y] + order[x][y - 1] - order[x - 1][y - 1];
		}
	}

	int ans = 0;
	for (int x = 1; x <= K; x++) {
		for (int y = 1; y <= K; y++) {
			int cnt = 0;
			cnt += sum_square(0, 0, x, y);
			cnt += sum_square(x, y, x + K, y + K);
			cnt += sum_square(x + K, y + K, 2 * K, 2 * K);
			cnt += sum_square(x + K, 0, 2 * K, y);
			cnt += sum_square(0, y + K, x, 2 * K);
			cnt = max(N - cnt, cnt);
			ans = max(ans, cnt);
		}
	}

	cout << ans << endl;
	return 0;
}

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

using namespace std;

typedef long long ll;
typedef double dd;

ll calc(ll len) {
  if (len <= 2) {
    return 0;
  } else {
    return 1 + calc((len - 1) / 2);
  }
}

void solve(ll test_num) {
  (void) test_num;
  ll X;
  cin >> X;
  ll res = 2;
  for (ll low = 3, hig = 1LL << 60; low <= hig;) {
    const ll mid = (low + hig) >> 1;
    if (calc(mid) <= X) {
      res = mid;
      low = mid + 1;
    } else {
      hig = mid - 1;
    }
  }
  cout << res << endl;
}

void init() {

}

int main() {
#ifdef AZN
  const auto start_time = chrono::system_clock::now();
  freopen("/home/azneye/Documents/Stuff/input.txt", "r", stdin);
#endif
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  init();
  ll tests = 1;
  //cin >> tests;
  for (ll test = 1; test <= tests; ++test) {
    solve(test);
  }
#ifdef AZN
  cerr << "Took: " << ((chrono::system_clock::now() - start_time).count() / 1e9) << " s" << endl;
#endif
  return 0;
}

Measured memory_bytes: 384
#include "bits/stdc++.h"
using namespace std;
#define REP(i,a) for(int i = 0; i < (a);i++)
#define ALL(a) (a).begin(),(a).end()
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const int MOD = 1e9 + 7;
using Graph = vector < vector<int>>;
/*第二引数で第一引数を割ったときの切り上げの計算*/
long long int maxtime(long long int x, long long int y) {
	return(x + y - 1) / y;

}
/*最大公約数*/
long long int lcm(long long int number1, long long int number2) {
	long long int m = number1;
	long long int n = number2;

	if (number2 > number1) {
		m = number2;
		n = number1;
	}
	long long int s = -1;
	while (s != 0) {
		s = m % n;
		m = n;
		n = s;
	}
	return m;
}
/*最大公倍数*/
long long int gcd(long long int number1, long long int number2) {
	long long int m = number1;
	long long int n = number2;
	return m / lcm(m, n) * n;
}

int main() {
	int N, M;
	cin >> N >> M;
	int s[32][32] = {};
	for (int i = 0; i < N; i++) {
		int k = 0;
		cin >> k;
		for (int j = 0; j < k; j++) {
			int b;
			cin >> b;
			s[i][b] = 1;
		}
	}
	int ans = 0;
	for (int i = 1; i <= M; i++) {
		for (int j = 0; j < N; j++) {
			if (s[j][i] != 1) {
				break;
			}
			if (j == N - 1) {
				ans++;
			}
		}
	}
	cout << ans;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
#include<math.h>
using namespace std;
#define MAX 15
#define MAX_NIGHTS 301
#define MOD 998244353
#define EPS 0
int n;
char s[MAX];
void printstr(int length,int max_allow)
{
    int i;
    if(length==0)
    {
        for(i=n;i>0;i--)
        {
            printf("%c",s[i]);
        }
        printf("\n");
    }
    else
    {
        for(i=0;i<max_allow;i++)
        {
            s[length]=('a'+i);
            printstr(length-1,max_allow);
        }
        s[length]=('a'+i);
        printstr(length-1,max_allow+1);
    }
}
int main()
{
    scanf("%d",&n);
    printstr(n,0);
    return 0;
}


Measured memory_bytes: 1536
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define clr(a) memset(a, 0, sizeof(a))
#define deb(x) cout << #x << "=" << x << endl
#define si(x) scanf("%d", &x)
#define sl(x) scanf("%lld", &x)
#define ss(s) scanf("%s", &s)
#define pi(x) printf("%d\n", x)
#define pl(x) printf("%lld\n", x)
#define ps(s) printf("%s\n", s)
#define deb2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define sz(x) x.size()
#define rep(n) for (int i = 0; i < n; i++)
#define repc(i, n) for (int i = 0; i < n; i++)
#define FOR(i, x, y) for (int i = x; i < y; i++)
#define DEC(i, x, y) for (int i = x; i >= y; i--)
#define all(v) v.begin(), v.end()
#define min3(a, b, c) min(a, min(b, c))
#define max3(a, b, c) max(a, max(b, c))
#define alla(a, n) a, a + n
using namespace std;

// Some typedef's
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> ii;
typedef vector<int> vi;
typedef vector<ll> vlli;
typedef vector<ii> vii;

template <typename T>
T modpow(T base, T exp, T modulus)
{
    base %= modulus;
    T result = 1;
    while (exp > 0)
    {
        if (exp & 1)
        result = (result * base) % modulus;
        base = (base * base) % modulus;
        exp >>= 1;
    }
    return result;
}

ll lcm(ll a, ll b) { return (a * (b / __gcd(a, b))); }

// Some contants
const ll inf = 1e12 + 7;
const double eps = 1e-9;
const long double pi = 1.00 * acos(-1.00);

int n, GC, maxi;
vi inp;

const int MAXN = 1e6 + 1;
int divisors[MAXN];

void solve()
{
    clr(divisors);
    bool flag = 1;

    FOR(i, 0, n){
        ll curr = inp[i];
        for (int j = 1; j <= sqrt(curr); j++){
            if(curr % j == 0){
                
                divisors[j]++;

                if(j != curr/j){
                    divisors[curr / j]++;
                }

                if (divisors[j] > 1  && j > 1)
                {
                    flag = 0;
                    break;
                }
                if(divisors[curr/j] > 1 && (curr/j) > 1){
                    flag = 0;
                    break;
                }
            }
        }
        if(!flag){
            break;
        }
    }
    
    if(flag){
        cout << "pairwise coprime\n";
    }else{
        cout << "setwise coprime\n";
    }
}

int main()
{

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

    cin >> n;
    GC = 0;
    maxi = INT_MIN;
    rep(n)
    {
        int tmp;
        cin >> tmp;
        inp.pb(tmp);
        GC = __gcd(GC, tmp);
        maxi = max(maxi, tmp);
    }
    if(GC > 1){
        cout << "not coprime\n";
    }else{
        solve();
    }

    return 0;
}


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

int main() {
	char a[101];
	int k = 0;
	for(int i=1; i!=101; i++){
		cin >> a[i];
		if(a[i] == 'L' || a[i] == 'R' || a[i] == 'U' || a[i] == 'D'){
			if(i % 2 == 1){
				if(a[i] == 'L'){
					k = 1;
					break;
				}
			}else{
				if(a[i] == 'R'){
					k = 1;
					break;
				}
			}
		}else{
			break;
		}
	}
	if(k == 0){
		cout << "Yes\n";
	}else{
		cout << "No\n";
	}
	return 0;
}

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

#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());


void c_p_c()
{
  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
}

int32_t main()
{
  //c_p_c();
  string s;
  cin >> s;
  int p = 0,m = 0,n = s.size();
  for(int i=0;i<n;i++)
  {
    p += (s[i] == '+');
    m += (s[i] == '-');
  }
  cout<<p-m<<endl;
  return 0;
}



Measured memory_bytes: 256
#include<bits/stdc++.h>
#define int long long int
using namespace std;
#define pb push_back
int32_t main()
{
	#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	#endif

	string s;
	cin >> s;
	if(s=="RRR"){
		cout << 3 << endl;
	}
	else if(s=="RRS"||s=="SRR"){
		cout << 2 << endl;
	}
	else if(s=="RSR"||s=="RSS"||s=="SRS"||s=="SSR"){
		cout << 1 << endl;
	}
	else{
		cout << 0 << endl;
	}


	return 0;
}


Measured memory_bytes: 3656
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = 1e9;
const int MOD = 1e9 + 7;

int main()
{
  double t, x;
  cin >> t >> x;
  cout << fixed << setprecision(10) << t / x << endl;

  return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = a; i<=b; i++)
#define FORD(i, a, b) for (int i = a; i>=b; i--)
#define REP(i, a) for (int i = 0; i<a; i++)
#define N 100100
#define pp pair<int, int>

using namespace std;
int n, a[N], cnt[N];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    cin>>n;
    int ans = 0;
    REP(i, n) {
        cin>>a[i];
        REP(j, 3) {
            cnt[a[i] + j - 1]++;
            ans = max(ans, cnt[a[i] + j - 1]);
        }
    }
    cout<<ans;
}



Measured memory_bytes: 1024
#pragma comment(linker, "/STACK:64000000")
#include <iostream>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <ctime>
#include <sstream>
#include <algorithm>
#include <functional>
#include <numeric>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>

using namespace std;

#define f first
#define s second
#define pb push_back
#define mp make_pair
#define ll long long
#define pii pair < int, int >
#define pll pair < long long, long long>
#define ull unsigned long long
#define y1 stupid_cmath
#define left stupid_left
#define right stupid_right
#define vi vector <int>
#define sz(a) (int)a.size()
#define forit(it, s) for(__typeof(s.begin()) it = s.begin(); it != s.end(); it++)
#define all(a) a.begin(), a.end()
#define sqr(x) ((x) * (x))

const int inf = (int)1e9;
const int mod = inf + 7;
const double eps = 1e-9;
const double pi = acos(-1.0);

int n, a[100100];
int incr[100100], decr[100100];
int dp[100100];

int calc(int ind) {
    if (ind == n) return 0;
    int &res = dp[ind];
    if (res != -1) return res;
    res = 1 + calc(ind + 1);
    for (int d = 0; d < 50; d++) {
        int pos = decr[ind];
        if (pos - d > ind) res = min(res, 1 + calc(pos - d));
        pos = incr[ind];
        if (pos - d > ind) res = min(res, 1 + calc(pos - d));
    }
    return res;
}

int main(){

    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%d", a + i);
    }

    incr[n - 1] = decr[n - 1] = n;
    for (int i = n - 2; i >= 0; i--) {
        if (a[i] > a[i + 1]) incr[i] = i + 1;
        else incr[i] = incr[i + 1];
        if (a[i] < a[i + 1]) decr[i] = i + 1;
        else decr[i] = decr[i + 1];
    }

    memset(dp, -1, sizeof dp);

    printf("%d\n", calc(0));

    return 0;
}


Measured memory_bytes: 4992
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep2(i, x, n) for(int i = x; i <= n; i++)
#define rep3(i, x, n) for(int i = x; i >= n; i--)
#define elif else if
#define sp(x) fixed << setprecision(x)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const ll MOD = 1e9+7;
//const ll MOD = 998244353;
const int inf = (1<<30)-1;
const ll INF = (1LL<<60)-1;
const ld EPS = 1e-10;
template<typename T> bool chmax(T &x, const T &y) {return (x < y)? (x = y, true) : false;};
template<typename T> bool chmin(T &x, const T &y) {return (x > y)? (x = y, true) : false;};

int main(){
    int N;
    string A, B, C;
    cin >> N >> A >> B >> C;
    int ans = 0;
    rep(i, N){
        set<char> s;
        s.insert(A[i]), s.insert(B[i]), s.insert(C[i]);
        ans += sz(s)-1;
    }
    cout << ans << endl;
}

Measured memory_bytes: 256
class BIT:
    def __init__(self, n):
        self.n = n
        self.bit = [0]*(self.n+1) # 1-indexed

    def init(self, init_val):
        for i, v in enumerate(init_val):
            self.add(i, v)

    def add(self, i, x):
        # i: 0-indexed
        i += 1 # to 1-indexed
        while i <= self.n:
            self.bit[i] += x
            i += (i & -i)

    def sum(self, i, j):
        # return sum of [i, j)
        # i, j: 0-indexed
        return self._sum(j) - self._sum(i)

    def _sum(self, i):
        # return sum of [0, i)
        # i: 0-indexed
        res = 0
        while i > 0:
            res += self.bit[i]
            i -= i & (-i)
        return res

class RangeAddBIT:
    def __init__(self, n):
        self.n = n
        self.bit1 = BIT(n)
        self.bit2 = BIT(n)

    def init(self, init_val):
        self.bit2.init(init_val)

    def add(self, l, r, x):
        # add x to [l, r)
        # l, r: 0-indexed
        self.bit1.add(l, x)
        self.bit1.add(r, -x)
        self.bit2.add(l, -x*l)
        self.bit2.add(r, x*r)

    def sum(self, l, r):
        # return sum of [l, r)
        # l, r: 0-indexed
        return self._sum(r) - self._sum(l)

    def _sum(self, i):
        # return sum of [0, i)
        # i: 0-indexed
        return self.bit1._sum(i)*i + self.bit2._sum(i)

import sys
import io, os
#input = sys.stdin.buffer.readline
input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline

def main():
    n, d, a = map(int, input().split())
    XH = []
    for i in range(n):
        x, h = map(int, input().split())
        XH.append((x-d, h))
    XH.sort()
    X = []
    H = []
    for x, h in XH:
        X.append(x)
        H.append(h)

    bit = RangeAddBIT(n+1)
    bit.init(H)
    import bisect
    ans = 0
    for i in range(n):
        h = bit.sum(i, i+1)
        if h > 0:
            q = (h+a-1)//a
            ans += q
            j = bisect.bisect_right(X, X[i]+2*d)
            bit.add(i, j, -q*a)
    print(ans)

if __name__ == '__main__':
    main()


Measured memory_bytes: 121012
#!/usr/bin/env python3
n, m, c = map(int, input().split())
b = list(map(int, input().split()))
a = [(list(map(int, input().split()))) for _ in range(n)]

cnt = 0

for i in range(n):
    num = c
    for j in range(m):
        num += a[i][j] * b[j]
    if num > 0:
        cnt += 1

print(cnt)


Measured memory_bytes: 9128
#include <stdio.h>
#include <stdlib.h>

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

int main(void){
	int n;
	scanf("%d", &n);
	int *l = malloc(sizeof(int) * n);
	for(int i = 0; i < n; i++){
		scanf("%d", l + i);
	}
	int count = 0;
	qsort(l, n, sizeof(int), cmp);
	for(int i = 0; i < n; i++){
		for(int j = i + 1; j < n; j++){
			if(l[i] == l[j])continue;
			for(int k = j + 1; k < n; k++){
				if(l[i] == l[k] || l[j] == l[k])continue;
				if(l[i] + l[j] <= l[k])continue;
				if(l[j] + l[k] <= l[i])continue;
				if(l[k] + l[i] <= l[j])continue;
				count++;
			}
		}
	}
	printf("%d\n", count);
	return 0;
}


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

int main()
{
    ll K, X;
    cin >> K >> X;
    ll s = X - K + 1;
    ll e = X + K - 1;
    for (ll i = s; i <= e; ++i) {
        cout << i << " ";
    }
    cout << endl;
}


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

int main(){
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  
  int N; cin>>N;
  map<int,int> mp1,mp2;
  rep(i,N){
    int v; cin>>v;
    if(i%2){
      mp1[v]++;
    }else{
      mp2[v]++;
    }
  }
  int ans=N;
  int ma=0,x=-1;
  for(auto m:mp1){
    if(ma<m.second) ma=m.second,x=m.first;
  }
  ans-=ma;
  ma=0;
  for(auto m:mp2){
    if(ma<m.second){
      if(x!=m.first) ma=m.second;
      else ma=max(ma,m.second-mp1[x]);
    }
  }
  ans-=ma;
  
  int tmp=N;
  ma=0;
  for(auto m:mp2){
    if(ma<m.second) ma=m.second,x=m.first;
  }
  tmp-=ma;
  ma=0;
  for(auto m:mp1){
    if(ma<m.second){
      if(x!=m.first) ma=m.second;
      else ma=max(ma,m.second-mp2[x]);
    }
  }
  tmp-=ma;
  cout<<min(ans,tmp)<<endl;
  return 0;
}


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

const int mod = 1e9+7;
const int INF = 2000000;
const double PI = acos(-1.0);

int main() {
    string s;
    cin >> s;
    if(s[s.size()-1] == 's') s += "es";
    else s += "s";
    cout << s << endl;
}

Measured memory_bytes: 3628
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
using ll = long long;
using P = pair<int,int>;
const int INF = 1001001001;
int dp[1100][5000];//dp[iこまで鍵をつかう][状態]とできるか
int main()
{
    int n,m;
    cin >> n >> m;
    vector<P> keys(m);
    rep(i,m){ 
        int a,b;
        int res = 0;
        cin >> a >> b;
        rep(j,b){
            int c;
            cin >> c;
            res |= 1<<(c-1);
        }
        keys[i] = P(a,res);//こすと、あける箱の集合

    }
    
    rep(i,m+1)rep(j,1<<(n+1))dp[i][j] = INF;
    dp[0][0] = 0;
    rep(i,m)rep(j,1<<n){
        int ni = i+1;
        int nj = j | keys[i].second;
        dp[i+1][j] = min(dp[i+1][j],dp[i][j]);
        dp[ni][nj] = min(dp[ni][nj],dp[i][j]+keys[i].first);
    }
    int ans = INF;
    rep(i,m+1)ans = min(ans,dp[i][(1<<n)-1]);
    if(ans == INF)ans = -1;
    cout << ans << endl;


    return 0;
}

Measured memory_bytes: 20736