akhauriyash/Code-Regression huggingface dataset:
#include <algorithm>
#include <climits>
#include <complex>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>

// using
using namespace std;

// typedef
typedef long long ll;

// define
#define FOR(i, a, b, c) for (int i = (int)(a); i < (int)(b); i += (int)(c))
#define REP(i, n) FOR(i, 0, n, 1)
#define RFOR(i, a, b, c) for (int i = (int)(a); i >= (int)(b); i -= (int)(c))
#define RREP(i, n) RFOR(i, n, 0, 1)
#define ALL(c) (c).begin(), (c).end()
#define SORT(c) sort(ALL(c))
#define REVERSE(c) reverse(ALL(c))
#define UNIQ(c) unique(ALL(c))
#define LB(c, x) lower_bound(c.begin(), c.end(), x)
#define UB(c, x) upper_bound(c.begin(), c.end(), x)
#define LI(c, x) distance(c.begin(), LB(c, x))
#define UI(c, x) distance(c.begin(), UB(c, x))

// functions
template <class T> T ceil(T a, T b) {
    return (a + b - 1) / b;
}
template <class T> T round(T a, T b) {
    return (a + b / 2) / b;
}
template <class T> T gcd(T a, T b) {
    return b ? gcd(b, a % b) : a;
}
template <class T> T lcm(T a, T b) {
    return a / gcd(a, b) * b;
}
template <class T> bool amax(T& a, const T& b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> bool amin(T& a, const T& b) {
    if (b < a) {
        a = b;
        return true;
    }
    return false;
}

// main
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int r, D, x;
    cin >> r >> D >> x;
    REP(i, 10) {
        x = r * x - D;
        cout << x << endl;
    }
    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
    
    void Main()
{

}

int main()
{
	
	
  int s,m,h;

  cin>>s;

   m = s / 60;
   h = m / 60;
   m = m % 60;
   s = s % 60;

  cout<<h<<":"<<m<<":"<<s<<endl;
  
  std::cin.tie(nullptr);
	std::ios_base::sync_with_stdio(false);
	std::cout << std::fixed << std::setprecision(15);
	Main();
}


Measured memory_bytes: 3108
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;
typedef long long ll;

int main(){
	ios_base::sync_with_stdio(false);
	ll n;
	cin >> n;
	if(n == 0){
		cout << 0 << endl;
	}else{
		cout << (64 - __builtin_clzll(n)) << endl;
	}
	return 0;
}

Measured memory_bytes: 1196
#include <bits/stdc++.h>
#define INF 114514810
#define FOR(i, r, n) for(int i=(r); i<(n); i++) 
#define REP(i, n) FOR(i, (0), n)

using namespace std;

int m, n;
long long int cx = 1, cy = 1;

int main()
{
	cin >> m >> n;
	cy = m;
	for (int i = 0; i < 5000; i++)
	{
		if (!n) {
			cout << cx << endl;
			return 0;
		}
		if (n & 1) cx = cx*cy % 1000000007;
		cy = cy*cy % 1000000007;
		n >>= 1;
	}
}

Measured memory_bytes: 1156
[n,x,y]=list(map(int,input().split()))
anslist=[0]*(n-1)
x-=1
y-=1
for i in range(n-1):
    for j in range(i+1,n):
        if j<=x or y<=i:
            kyori=j-i
        elif i<=x<=j<=y:
            kyori=min(j-i,x-i+1+y-j)
        elif x<=i<=y<=j:
            kyori=min(j-i,i-x+1+j-y)
        elif i<=x and y<=j:
            kyori=x-i+1+j-y
        elif x<=i and j<=y:
            kyori=min(j-i,i-x+1+y-j)
        else:kyori=1
        anslist[kyori-1]+=1
for i in range(len(anslist)):
    print(anslist[i])



Measured memory_bytes: 3444
#include<bits/stdc++.h>
#define ll long long
#define pii pair<ll int,ll int>
#define PI 2*acos(0)
#define INF 1e18
#define mx 200005
using namespace std;
//const ll int p=1000000007;
//vector<ll > prime;
//bool mark[mx];
ll int mod(ll int a,ll int b)
{
    ll int m=a%b;
    if(m<0) m=(b<0)?(m-b):(m+b);
    return m;
}
ll maxpow(ll n)
{
    return (n & (~(n-1)));
}
bool isPrime(ll n)
{
    if(n<2) return false;
    if(n==2) return true;
    if(n%2==0) return false;
    for(ll i=3;i*i<=n;i+=2){
        if(n%i==0) return false;
    }
    return true;
}
/*void init()
{
    mark[1]=1;
    int i,j,limit=sqrt(mx*1.0)+2;
    prime.push_back(2);
    for(i=4;i<mx;i+=2) mark[i]=1;
    mark[2]=0;
    for(i=3;i<mx;i+=2){
        if(!mark[i]){
            prime.push_back(i);
            if(i<=limit){
                for(j=i*i;j<mx;j+=2*i){
                    mark[j]=1;
                }
            }
        }
    }
}
/*
ll maxdiv(ll n)
{
    ll i,ans=1;
    for(i=0;i<prime.size();i++){
        if(n%prime[i]==0){
            ans=n/prime[i];break;
            //return ans;
        }
    }
    return ans;
}*/
ll lcm(ll a,ll b)
{
    ll ans=a*b;
    return (ans/__gcd(a,b));
}
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    ll n,i,j,k,z,x,sum,cnt,ans,H,W,m;
    cin>>H>>W>>m;
    ll h[m],w[m];
    map<ll,ll> row , col;
    map<pii, ll> mp;
    for(i=0;i<m;i++){
        cin>>h[i]>>w[i];
        row[h[i]]++;
        col[w[i]]++;
        mp[{h[i],w[i]}]++;
    }
    ll mr=-1,mc=-1;
    for(i=1;i<=H;i++) mr=max(mr,row[i]);
    for(i=1;i<=W;i++) mc=max(mc,col[i]);
    vector<ll> vr,vc;
    for(i=1;i<=H;i++) if(row[i]==mr) vr.push_back(i);
    for(i=1;i<=W;i++) if(col[i]==mc) vc.push_back(i);
    ans=mr+mc-1;
    for(i=0;i<vr.size();i++){
        for(j=0;j<vc.size();j++){
           if(mp[{vr[i],vc[j]}]==0){
            cout<<ans+1;
            return 0;
           }
        }
    }
    cout<<ans;
    return 0;
}
//1028C


Measured memory_bytes: 72540
#include <stdio.h>
int main(void){
  int a,b,c;
  scanf("%d %d %d",&a,&b,&c);
  if(a==b) printf("%d",c);
  if(b==c) printf("%d",a);
  if(c==a) printf("%d",b);
  return(0);
}
	

Measured memory_bytes: 128
a,b,k=map(int,input().split())

if k>=b-a+1:
  for i in range(a,b+1):
    print(i)

else:
  a_set={i for i in range(a,a+k)}
  b_set={i for i in range(b-k+1,b+1)}

  ans_set = sorted(a_set | b_set)

  for i in ans_set:
    print(i)

Measured memory_bytes: 9152
from collections import Counter
n = int(input())
a = [int(i) for i in input().split()]
ans = Counter(a)
b = sorted(ans)
ans1 = []
for i in b[::-1]:
    if ans[i]>=2 and ans[i]<4:
        ans1.append(i)
    elif ans[i]>=4:
        ans1.append(i)
        ans1.append(i)
        
if len(ans1)>=2:
    sqr = ans1[0]*ans1[1]
    print(sqr)
else:
    print(0)


Measured memory_bytes: 69528
#include<bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef unsigned long long int ulli;
typedef long double ld;
const lli INF = 1e9 + 100;
const lli INF64 = (1LL << 61) + 100;
const lli MOD = 1e9 + 7;
const lli MH1 = 1599614977, MH2 = 2034417103, MH3 = 1090250123, MH4 = 2024491871;
const int N = 3005;
lli matrix[N][N];
lli dp[N][N][4];
lli bpow(lli baseee, lli exponenttt) {
	if(exponenttt < 0) return 0;
	lli res = 1;
	baseee %= MOD;
	while (exponenttt > 0) {
		if ((exponenttt & 1) == 1) res = (res*baseee) % MOD;
		baseee = (baseee*baseee) % MOD;
		exponenttt >>= 1;
	}
	return res;
}
lli multInverse(lli a) {//if_mod_is_prime
	return bpow(a, MOD - 2);
}
lli divm(lli a, lli b) {//if_mod_is_prime
	return (a * multInverse(b)) % MOD;
}
lli multm(lli a, lli b) {
	return (a * b) % MOD;
}
lli subm(lli a, lli b) {
	a += MOD;
	lli r = a - b;
	if(r >= MOD) return r - MOD;
	return r;
}
lli addm(lli a, lli b) {
	lli r = a + b;
	if(r >= MOD) return r - MOD;
	return r;
}
signed main() {
	ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	//	freopen("input.txt", "r", stdin);
	//	freopen("output.txt", "w", stdout);
    int r, c;
    cin >> r >> c;
    int k;
    cin >> k;
    for(int i = 1; i <= k; i++) {
        int rr, cc, vv;
        cin >> rr >> cc >> vv;
        matrix[rr][cc] = vv;
    }

    for(int i = 1; i <= r; i++) {
        for(int j = 1; j <= c; j++) {
            for(int kk = 0; kk <= 3; kk++) {
                if(kk == 0)
                    dp[i][j][kk] = max({dp[i][j-1][0], dp[i-1][j][0], dp[i-1][j][1], dp[i-1][j][2], dp[i-1][j][3]});
                else {
                    if(kk == 1)
                        dp[i][j][kk] = max({dp[i][j-1][0], dp[i-1][j][0], dp[i-1][j][1], dp[i-1][j][2], dp[i-1][j][3]}) + matrix[i][j];
                    dp[i][j][kk] = max({dp[i][j][kk], dp[i][j-1][kk], dp[i][j-1][kk-1] + matrix[i][j]});
                }
            }
        }
    }

    lli ans = 0;
    for(int kk = 0; kk <= 3; kk++)
        ans = max(ans, dp[r][c][kk]);
    cout << ans << "\n";
	return 0;
}


Measured memory_bytes: 355640
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <utility>
#include <tuple>
#include <algorithm>
#include <cstdio>
#include <cmath>
#define rep(i, n) for(int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

const int Mod = 1e9+7;

int main() {
  string S;
  cin >> S;
  vector<vector<int>> dp(S.size()+1, vector<int>(13));
  dp[0][0] = 1;
  for(int i=1; i<=S.size(); i++) {
    if(S[i-1] == '?') {
      rep(j, 10) {
        rep(k, 13) {
          int tmp = (k*10+j)%13;
          dp[i][tmp] += dp[i-1][k];
          dp[i][tmp] %= Mod;
        }
      }
    } else {
      rep(j, 13) {
        int tmp = (j*10+(S[i-1]-'0'))%13;
        dp[i][tmp] += dp[i-1][j];
        dp[i][tmp] %= Mod;
      }
    }
  }
  cout << dp[S.size()][5] << endl;
  return 0;
}

Measured memory_bytes: 8960
package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func nextInt() int {
	var i int
	if sc.Scan() {
		if num, err := strconv.Atoi(sc.Text()); err == nil {
			i = num
		}
	}
	return i
}

// 0.08かけして切り捨ててA円
// 0.1かけして切り捨ててB円
// 0.1でわると1桁目が切り捨てられる
// 0.08でわると整数部が税額
// 1. 1 から1250までループ
// 2. ループ値を0.08でわった整数部がaと一致するものを探す
// 3. その値を ループ値を0.1かけした整数部が一致すればその値を出力して終了

func main() {
	sc.Split(bufio.ScanWords)
	a, b := nextInt(), nextInt()
	for i := 0; i < 1250; i++ {
		noTaxPrice := i + 1
		taxEight := float32(noTaxPrice) * 0.08
		if int(taxEight) == a {
			if int(float32(noTaxPrice)*0.1) == b {
				fmt.Println(noTaxPrice)
				return
			}
		}
	}
	fmt.Println(-1)
}


Measured memory_bytes: 1776
#include <bits/stdc++.h>
#define int long long
#define ld long double
#define fio() ios_base::sync_with_stdio(false); cin.tie(NULL)
#define MOD 1000000007
#define nl '\n'
#define pb push_back
#define mp make_pair

using namespace std;
const int N = 100005;
vector<int> gr[N];
vector<int> rev[N];
int vis[N];
stack<int> st;
void dfs(int node)
{
	vis[node]=1;
	for(int it:gr[node])
		if(!vis[it])
			dfs(it);
	st.push(node);
}
int32_t main()
{
	fio();
	int n,m;
	cin>>n>>m;
	for(int i=0;i<m;i++)
	{
		int x,y;
		cin>>x>>y;
		gr[x].push_back(y);
		rev[y].push_back(x);
	}
	for(int i=1;i<=n;i++)
	{
		if(!vis[i])
			dfs(i);
	}
	map<int,int> dp;
	int ans=0;
	while(!st.empty())
	{
		int temp=0;
		int u=st.top();
		//cout<<u<<endl;
		//st.pop();
		for(int it:rev[u])
			temp=max(temp,dp[it]);
		st.pop();
		dp[u]=temp+1;
		ans=max(ans,dp[u]);
	}
	cout<<ans-1<<endl;
}



Measured memory_bytes: 20352
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long a = sc.nextLong();
        long b = sc.nextLong();
        long limit = sc.nextLong();

        List<Long> aList = new ArrayList<>();
        List<Long> bList = new ArrayList<>();
        aList.add(0L);
        bList.add(0L);
        for (int i = 1; i <= a; i++) aList.add(sc.nextInt() + aList.get(i-1));
        for (int i = 1; i <= b; i++) bList.add(sc.nextInt() + bList.get(i-1));

        long count = 0;
        int bCount = bList.size()-1;
        for (int i = 0; i <= a; i++) {
            while (true) {
                if (bCount < 0) break;
                if (aList.get(i) + bList.get(bCount) <= limit) {
                    count = Math.max(i+bCount, count);
                    break;
                }
                bCount--;
            }
        }
        System.out.println(count);
    }
}

Measured memory_bytes: 64484
import math

def plot(x,y):
    print(f'{x:.8f} {y:.8f}')

def Koch(n,x1,y1,x2,y2):
    if n==0:
        plot(x1,y1)
        return
    sx=(2*x1+x2)/3
    sy=(2*y1+y2)/3
    tx=(x1+2*x2)/3
    ty=(y1+2*y2)/3
    ux=(tx-sx)*(1/2)-(ty-sy)*(math.sqrt(3)/2)+sx
    uy=(tx-sx)*(math.sqrt(3)/2)+(ty-sy)*(1/2)+sy
    Koch(n-1,x1,y1,sx,sy)
    Koch(n-1,sx,sy,ux,uy)
    Koch(n-1,ux,uy,tx,ty)
    Koch(n-1,tx,ty,x2,y2)
    
n=int(input())
Koch(n,0,0,100,0)
plot(100,0)


Measured memory_bytes: 5748
#include <stdio.h>

int main(void)
{
	char str[100];
	int i;
	int j;
	int n;
	char c;
	
	while (scanf("%s", str) != EOF){
		i = 0;
		
		while (str[i] != '\0'){
			if (str[i] != '@'){
				printf("%c", str[i]);
			}
			else {
				i++;
				n = str[i++] - '0';
				c = str[i];
				for (j = 0; j < n; j++){
					printf("%c", c);
				}
			}
			i++;
		}
		printf("\n");
	}
	
	return (0);
}

Measured memory_bytes: 0
#include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define ALL(c) (c).begin(), (c).end()

typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef vector<VL> VVL;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;

int main() {
	string s;
	cin >> s;
	cout << (s.substr(0,4) == "YAKI" ? "Yes" : "No") << endl;



    return 0;
}





Measured memory_bytes: 256
#include <iostream>
#include <stdio.h>
#include <vector>
#define ll long long
using namespace std;

const int MAXN = 1e5 + 10;
vector<pair<int, ll> > gel[MAXN];
ll dis[MAXN];

void dfs(int x, int pre){
    for(int i = 0; i < gel[x].size(); i++){
        int y = gel[x][i].first;
        ll w = gel[x][i].second;
        if(y != pre){
            dis[y] = dis[x] + w;
            dfs(y, x);
        }
    }
}

int main(void){
    int n, x, y, z, q, k;
    scanf("%d", &n);
    for(int i = 1; i < n; i++){
        scanf("%d%d%d", &x, &y, &z);
        gel[x].push_back({y, z});
        gel[y].push_back({x, z});
    }
    scanf("%d%d", &q, &k);
    dfs(k, -1);
    while(q--){
        scanf("%d%d", &x, &y);
        printf("%lld\n", dis[x] + dis[y]);
    }
    return 0;
}


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

using namespace std;

typedef long long ll;
typedef vector<int> vi;

int main(){
  double a,b,h,m;
  cin>>a>>b>>h>>m;
  long double radians = (2.0*M_PI)*abs((h/12.0) + (m/720.0) - (m/60.0));
  long double c = pow(a,2) + pow(b,2) - (2*a*b*cosl(radians));
  c = sqrtl(c);
  printf("%20.20Lf\n",c);
}

Measured memory_bytes: 4144
#include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define LOOP(i) while(i--)
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

vector<ll> enum_div(ll n){
	vector<ll> ret;
	for(ll i=1;i*i<=n;++i){
		if(n%i==0){
			ret.push_back(i);
			if(i*i!=n){
				ret.push_back(n/i);
			}
		}
	}
	return ret;
}

vector<ll> enum_prime(ll N){
	deque<bool> is_prime(N+1,true);
	vector<ll> P;
	for(ll i=2;i<=N;i++){
		if(is_prime[i]){
			for(ll j=i*i;j<=N;j+=i){
				is_prime[j] = false;
			}
			P.emplace_back(i);
		}
	}
	return P;
}

// 入力された数字を素因数分解する ex)8を入力したら[2,2,2]が返る
vector<ll> prime_factor(ll n){
	ll sn = sqrt(n)+1;
	auto prime_list = enum_prime(sn);
	vector<ll> res;
	for(int i=0,ei=prime_list.size();i<ei;i++){
		ll v = prime_list[i];
		if(v*v>n) break;
		while(!(n%v)){
			n /= v;
			res.push_back(v);
		}
	}
	if(n>1){
		res.push_back(n);
	}

	return res;
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout<<fixed<<setprecision(10);

	ll N=in();
	if(!(N%2)){
		out(N,N,N/2);
		return 0;
	}
	for(ll h=1;h<=3500;h++){
		for(ll n=1;n<=3500;n++){
			ll V=N*h*n;
			ll W=4LL*h*n-N*h-N*n;
			if(W<=0 || V%W) continue;
			out(n,h,V/W);
			return 0;
		}
	}
	
	return 0;
}


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


#include "boost/multiprecision/cpp_int.hpp"
#include "boost/multiprecision/cpp_dec_float.hpp"
namespace mp = boost::multiprecision;
typedef mp::cpp_int LL;
typedef mp::number<mp::cpp_dec_float<1024>> DD;// 仮数部が1024ビットの浮動小数点数型(TLEしたら小さくする)



typedef long double dd;
//#define i_7 (ll)(1E9+7)
#define i_7 998244353
#define i_5 i_7-2
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
typedef pair<ll,ll> l_l;
typedef pair<dd,dd> d_d;
ll inf=(ll)1E16;
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
void Max(ll &pos,ll val){pos=max(pos,val);}//Max(dp[n],dp[n-1]);
void Min(ll &pos,ll val){pos=min(pos,val);}
void Add(ll &pos,ll val){pos=mod(pos+val);}
dd EPS=1E-9;
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define fi first
#define se second
#define endl "\n"
#define SORT(v) sort(v.begin(),v.end())
#define ERASE(v) v.erase(unique(v.begin(),v.end()),v.end())
#define POSL(v,x) (lower_bound(v.begin(),v.end(),x)-v.begin())
#define POSU(v,x) (upper_bound(v.begin(),v.end(),x)-v.begin())
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}
template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}

void mod_print(ll k){
    ll P=1000;
    rep(y,1,P){
        ll x=mod(y*k);
        if(x+P>=i_7){
            x-=i_7;
        }
        if(abs(x)<=P){
            cout<<x<<"/"<<y<<endl;
            return;
        }
    }
    cout<<"nun"<<endl;
}
//////////////////////////


ll SOLVE(){
    DD a,b;cin>>a>>b;
    cout<<(LL)(a*b)<<endl;
    
    
    return 0;
}

int main(){fastio
    
    clock_t start = clock();
    SOLVE();
    clock_t end = clock();
    const double time = static_cast<double>(end - start) / CLOCKS_PER_SEC * 1000.0;
    cerr<<endl<<time<<"ms"<<endl;
    
    return 0;
}



Measured memory_bytes: 4120
#include <bits/stdc++.h>
using namespace std;
int main(){
  int A,B,ct=1,ans=0;
  cin>>A>>B;


  
  while(true){
    if(ct>=B){
      break;
    }
    ct+= -1+A;
    ans++;
  }

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


Measured memory_bytes: 256
#include <bits/stdc++.h>
#define rep(i,n) for(long long i=0; i<n; i++)
#define Rep(i,n) for(long long i=1; i<n; i++)
#define ll long long
#include <math.h>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <set>
#include <vector>


using namespace std;
#define PI acos(-1)
using P =pair<ll,ll>;

ll ketasu(ll a){
   ll num=1;
   while(a/10){
       num++;
       a/=10;
   }
   return num;
}

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

ll kosuu(ll a){
    ll sum=0;
    for(ll i=1;i*i<=a;i++){
        if(a%i==0){
            if(a!=1&&i*i!=a){
            sum+=2;
            }else{
             sum++;   
            }
        }
    }
    return sum;
}

ll n;



    vector<pair<ll,ll>>p;
void fs(ll a){
    for(ll i=2;i*i<=n;i++){
        ll cnt=0;
        while(n%i==0){
            n/=i;
            cnt++;
        }
        p.emplace_back(i,cnt);
    }
    return;
}


ll di[]={1,0,-1,0};
ll dj[]={0,-1,0,1};
int main()
{
 double d,t,s;
 cin>>d>>t>>s;
 double a=d/s;
 if(t<a){
     cout<<"No"<<endl;
     return 0;
 }
 cout<<"Yes"<<endl;
}
 




Measured memory_bytes: 3688
<?php
# C - Anti-Division

fscanf(STDIN, "%d %d %d %d", $A, $B, $C, $D);

$A = $A - 1;

#1からA
$ADividedC = intdiv($A, $C);
$ADividedD = intdiv($A, $D);
$ADividedCD = intdiv($A, lcm($C, $D));    
$AA = ($A - $ADividedC - $ADividedD + $ADividedCD);

#1からB
$BDividedC = intdiv($B, $C);
$BDividedD = intdiv($B, $D);
$BDividedCD = intdiv($B, lcm($C, $D));
$BB = ($B - $BDividedC - $BDividedD + $BDividedCD);

echo ($BB - $AA) . PHP_EOL;

function lcm($a, $b) {
    $x = $a * $b;
    if ($a < $b) {
        $tmp = $a;
        $a = $b;
        $b = $tmp;
    }
    $r = $a % $b;
    while ($r != 0) {
        $a = $b;
        $b = $r;
        $r = $a % $b;
    }
    return intdiv($x, $b);
}

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

int main(){
    string s;
    cin >> s;
    int len = s.length();
    string ans;
    for (int i = 0; i < len; i++){
        string direction = s.substr(i,1);
        if(direction == "0"){
            ans += "0";
        }
        else if (direction == "1"){
            ans += "1";
        }
        else {
            int ans_len = ans.length();
            ans = ans.substr(0, ans_len - 1);
        }
    }
    cout << ans << endl;
}

Measured memory_bytes: 256
import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int count=0;
		String W = sc.next();
		while(true){
			String T = sc.next();
			if(T.equals("END_OF_TEXT")){
				break;
			}else{
				T = T.toLowerCase();
				if(T.equals(W)||T.equals(W+",")||T.equals(W+".")){
					count++;
				}
			}
		}
		System.out.println(count);
	}
}

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

using namespace std;

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

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

const int MOD = 1000000007;
const int INF = 1000000000;
const int NIL = -1;

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



int main(){
    int n; cin >> n;
    vector<VI> A(n, VI(n, 0));
    REP(i, n){
        int u; cin >> u; --u;
        int k; cin >> k;
        REP(j, k){
            int v; cin >> v; --v;
            ++A[u][v];
        }
    }
    REP(i, n){
        REP(j, n){
            cout << (j ? " ": "") << A[i][j];
        }
        cout << "\n";
    }
    return 0;
}



Measured memory_bytes: 3148
A, B, K = map(int, input().split())
for i in range(K):
    if i % 2 == 0:
        if A % 2 != 0:
            A -= 1
        A /= 2
        B += A

    else:
        if B % 2 != 0:
            B -= 1
        B /= 2
        A += B
print(round(A), round(B))


Measured memory_bytes: 2940
"use strict";

function Main(input) {
  const n = parseInt(input, 10);
  const nums = [64, 32, 16, 8, 4, 2, 1];

  const ans = nums.find(v => n >= v);
  console.log(ans);
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Measured memory_bytes: 7500
h,w,k = map(int,input().split())

mp = [input() for i in range(h)]

mp_h = []
for i in range(h):
    cnt = 0
    for j in range(w):
        if(mp[i][j]=="#"):
            cnt+=1
    mp_h.append(cnt)

mp_w=[]
for i in range(w):
    cnt = 0
    for j in range(h):
        if(mp[j][i]=="#"):
            cnt+=1
    mp_w.append(cnt)

sum_all = sum(mp_w)

sub_sum = sum_all - k
if(sub_sum < 0):
    print(0)
    exit()


from itertools import combinations

lw = range(w)
lh = range(h)
l_w = [[x for x in combinations(lw,i)] for i in range(0,w+1)]   
l_h = [[x for x in combinations(lh,i)] for i in range(0,h+1)]

def check(t_w,t_h):
    
    t_sum = 0
    cnt = 0
    for x in t_w:
        t_sum += mp_w[x]
    for y in t_h:
        t_sum += mp_h[y]
    
    for x in t_w:
        for y in t_h:
            if(mp[y][x]=="#"):
                cnt += 1
    t_sum -= cnt
    
    if((sum_all-t_sum)==k):
        return True
    return False

#i個選ぶ，j個選ぶ
ans = 0
for i in range(w+1):
    if(i==0):
        target_w = []
    else:
        target_w = l_w[i-1]
    for j in range(h+1):
        if(j==0):
            target_h = []
        else:
            target_h = l_h[j-1]
        for t_w in target_w:
            for t_h in target_h:
                if(check(t_w,t_h)):
                    ans += 1
print(ans)

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

int main(){
	string st;
	cin >> st;
	int count = 0;
	rep(i, 4){
      rep(j, 4){
      	if(st.at(i) == st.at(j)) count++;
      }
    }
	if(count == 8){
    	cout << "Yes" << endl;
    }else{
    	cout << "No" << endl;
    }
}

Measured memory_bytes: 256
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include<set>
using namespace std;


int main() {
    int a, b;
    cin >> a >> b;
    if(a == 1 && b != 1){
        cout << "Alice";
    }
    else if(b == 1 && a != 1){
        cout << "Bob";
    }
    else if(b > a){
        cout << "Bob";
    }
    else if(b < a){
        cout << "Alice";
    }
    else{
        cout << "Draw";
    }
    cout << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#include <cmath>
#include <numeric>
using namespace std;
#define rep(i,a,b) for(int64_t i=(a); i<(b); ++i) // a ≦ i < b 
#define Rrep(i,a,b) for(int64_t i=(a);i>=(b);--i) // reverse repeat. a から b まで減少．
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend() //逆イテレータ
#define INF 10000000000000
#define MOD 1000000007LL
#define RANGE(a,b,c) (a).begin()+(b),(a).begin()+(c) // [b,c) イテレータ
using PII = pair<int64_t, int64_t>;
using VI = vector<int64_t>;
using VVI = vector<VI>;
using VS = vector<string>;
using VP = vector<PII>;
using i64 = int64_t;
template<typename T> void invec(vector<T> &A){for(T& a : A) cin >> a;} // input vector

// グリッドグラフの移動ベクトル
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

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

int H, W; cin>> H >> W;
VS S(H); invec(S);

i64 maxi = 0;
rep(sh, 0, H) rep(sw, 0, W){
    if (S[sh][sw] == '#') continue;
    rep(gh, 0, H) rep(gw, 0, W){
        if (S[gh][gw] == '#') continue;
        VVI dist(H, VI(W, -1)); // 最短距離．「未訪問」は-1．
        dist[sh][sw] = 0; // 初期条件
        queue<PII> que;
        que.push(PII(sh, sw)); 
        // BFS
        while (!que.empty()) {
            PII v = que.front(); 
            que.pop();
            rep(i, 0, 4) {
                int nh = v.first + dy[i], nw = v.second + dx[i];
                if (nh < 0 || nw < 0 || nh >= H || nw >= W) continue;
                if (dist[nh][nw] != -1 || S[nh][nw] == '#') continue;
                dist[nh][nw] = dist[v.first][v.second] + 1;
                if (nh == gh && nw == gw) {
                    maxi = max(maxi, dist[nh][nw]);
                    break;
                }
                que.push(PII(nh, nw));
            }
            if (dist[gh][gw] != -1) break;
        }
    }
}
cout << maxi << endl;
}
// 書いて考える．場合分け．情報整理．
// 境界，出力文字列 チェック．行末にスペース入れない．
// 可読性優先．高速化次点．
// まずは全探索，次にDP
// 制限を見る．境界に注意．求めたい量の変域．動かせる量．
// 偶奇，逆から，ソート，出現回数，出現位置，DP， 余事象，包除
// データ構造． 問題の特徴量．単調性，二分探索
// 存在判定：構成方法，入力の特徴
// gcd, lcm ,素因数分解．
// 例外を十分に含む一般化．想像力の限界
// 小さい系から例示
// 代数的処理．前処理によるクエリ高速化．
// 始めは過剰に例示・場合分けしてもいい．各場合を確実に対処．
// 自明な例から処理，除外．
// 小数のときは，精度の設定する．doubel 変数に数値を入力するときは 123. とする．
// テストケース作成は数表あり
// 実行エラー：vector添え字超え．0割り．



Measured memory_bytes: 256
/*  -*- coding: utf-8 -*-
 *
 * a.cc: A - Blackjack
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

/* typedef */

/* global variables */

/* subroutines */

/* main */

int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);

  if (a + b + c >= 22) puts("bust");
  else puts("win");
  return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> P;
typedef pair<int,int> Pi;
#define rep(i,n) for(ll i=0;i<n;i++)
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define fi first
#define se second
#define endl "\n"

template<typename T> inline bool chmax(T &a, T b){if(a<b){a=b;return true;}return false;}
template<typename T> inline bool chmin(T &a, T b){if(a>b){a=b;return true;}return false;}
template<typename T> ostream& operator<<(ostream& s,const complex<T>& d) {return s<<"("<<d.real()<<", "<<d.imag()<< ")";}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const pair<T1,T2>& d) {return s<<"("<<d.first<<", "<<d.second<<")";}
template<typename T> ostream& operator<<(ostream& s, const vector<T>& d){int len=d.size();rep(i,len){s<<d[i];if(i<len-1) s<<" ";}return s;}
template<typename T> ostream& operator<<(ostream& s,const vector<vector<T>>& d){int len=d.size();rep(i,len){s<<d[i]<<endl;}return s;}
template<typename T> ostream& operator<<(ostream& s,const set<T>& v){s<<"{ ";for(auto itr=v.begin();itr!=v.end();++itr) {if (itr!=v.begin()) {s<< ", ";}s<<(*itr);}s<<" }";return s;}
template<typename T> ostream& operator<<(ostream& s,const multiset<T>& v){s<<"{ ";for(auto itr=v.begin();itr!=v.end();++itr) {if (itr!=v.begin()) {s<< ", ";}s<<(*itr);}s<<" }";return s;}
template<typename T1, typename T2> ostream& operator<<(ostream& s,const map<T1,T2>& m){s<<"{"<<endl;for(auto itr=m.begin();itr!=m.end();++itr){s<<" "<<(*itr).first<<" : "<<(*itr).second<<endl;}s<<"}"<<endl;return s;}

const ll mod=1e9+7;
const ll inf=1e17;
const int INF=1e9;
const double EPS=1e-10;
const double PI=acos(-1);

int main(){
	cin.tie(0);ios::sync_with_stdio(false);
	char x;
	cin>>x;
	char y=tolower(x);
	if(x==y){
		cout<<"a"<<endl;
	}else{
		cout<<"A"<<endl;
	}
}

Measured memory_bytes: 3648
n = int(input())
l = [input() for i in range(n)]

import collections

c = collections.Counter(l)
#各要素ごとの出現回数

value_max = max(c.values())

#valueで大きい順(降順)にソートする(タプルになる)
for k in sorted(k for k in c if c[k] == value_max ):
    print(k)




Measured memory_bytes: 35476
#include<stdio.h>
#include<string.h>
int main()
{
    int n,i,j,l;
    char s[101][101],temp[101];
    scanf("%d%d",&n,&l);
    for(i=0;i<n;i++)
    {
        scanf("%s",&s[i]);
    }
    for(i=0;i<n;i++)
    {
        for(j=i+1;j<n;j++)
        {
            if(strcmp(s[i],s[j])>=1)
            {
                strcpy(temp,s[i]);
                strcpy(s[i],s[j]);
                strcpy(s[j] , temp);
            }
        }
    }
    for(i=0;i<n;i++)
    {
        printf("%s",s[i]);
    }
    return 0 ;



}



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

using namespace std;

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

	int a, b, c;
	long long k;
	cin >> a >> b >> c >> k;
	if(k % 2 == 1)cout << b - a << endl;
	else cout << a - b << endl;

	return 0;
}


Measured memory_bytes: 256
#include <stdio.h>
#include <string.h>
int main()
{
	int a,b,c;
	scanf("%d %d %d", &a, &b, &c);
	if(a==b && b!=c){
		printf("Yes\n");
 	}
	else if (a==c && b!=a){
		printf("Yes\n");
	}
	else if ( b==c && a!=b){
		printf ("Yes\n");
	}
	else{
		printf("No\n");
	}
	return 0;
}

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

#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()

using namespace std;

typedef long long ll;
typedef vector<ll> vll;
typedef pair<ll, ll> pll;
typedef long double ld;

const ll mod = (ll)1e9 + 7;
const ll mxN = 200200;



void solve(){
	ll n;
	cin>>n;
	unordered_map<string,ll> ma;
	for(int i=0;i<n;i++){
		string s;
		cin>>s;
		ma[s]+=1;
	}
	cin>>n;
	unordered_map<string,ll> mb;
	for(int i=0;i<n;i++){
		string s;
		cin>>s;
		mb[s]+=1;
	}
	ll ans =0;
	for(auto i:ma)
		ans=max(ans,i.se-mb[i.fi]);
	cout<<ans<<"\n";



}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.precision(20);
	cout << fixed;

	//ll t;cin>>t;while(t--)
	solve();

}


Measured memory_bytes: 256
#include<stdio.h>
int main(void)
{
	int a,b,n,s[100],f[100],box[10001],flg,j,i;
	flg=0;
	scanf("%d %d %d",&a,&b,&n);
	for(i=0;i<=10000;i++){
		box[i]=0;
	}
	for(i=a*10+1;i<b*10;i++){
		box[i]++;
	}
	for(i=0;i<n;i++){
		scanf("%d %d",&s[i],&f[i]);
		for(j=s[i]*10+1;j<f[i]*10;j++){
			box[j]++;
		}
	}
	for(i=0;i<=10000;i++){
		if(box[i]>1){
			flg=1;
			printf("1\n");
			break;
		}
	}
		if(flg==0){
			printf("0\n");
		}
		return 0;
}


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

cnt1 = 0
cnt4 = 0
cnt2 = 0
for i in a:
    if i % 2 != 0:
        cnt1 += 1
    elif i % 4 == 0:
        cnt4 += 1
    elif i % 2 == 0:
        cnt2 += 1

if n % 2 == 0:
    if cnt1 <= cnt4:
        print("Yes")
    else:
        print("No")
else:
    if cnt1 - 1 <= cnt4:
        print("Yes")
    else:
        print("No")

Measured memory_bytes: 62576
// 2013/11/25 Tazoe

#include <iostream>
using namespace std;

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

	int M[200][3];
	for(int i=0; i<N; i++){
		for(int j=0; j<3; j++){
			cin >> M[i][j];
		}
	}

	for(int i=0; i<3; i++){
		for(int j=0; j<N-1; j++){
			bool f = false;

			for(int k=j+1; k<N; k++){
				if(M[j][i]==M[k][i]){
					M[k][i] = 0;
					f = true;
				}
			}

			if(f){
				M[j][i] = 0;
			}
		}
	}

	for(int i=0; i<N; i++){
		cout << M[i][0]+M[i][1]+M[i][2] << endl;
	}

	return 0;
}

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

#define rep(i, a, b) for (int i = (a), i##end = (b); i <= i##end; ++i)
#define per(i, a, b) for (int i = (a), i##end = (b); i >= i##end; --i)

mt19937 Rnd(chrono::high_resolution_clock::now().time_since_epoch().count());

template <typename T>
inline void chkmax(T &x, T y) { if (x < y) x = y; }

template <typename T>
inline void chkmin(T &x, T y) { if (x > y) x = y; }

inline int read() {
  #define nc getchar()
  int x = 0;
  char c = nc;
  while (c < 48) c = nc;
  while (c > 47) x = x * 10 + (c ^ 48), c = nc;
  return x;
  #undef nc
}

typedef long long ll;

void solve() {
  ll x;
  cin >> x;
  ll cur = 100;
  int res = 0;
  while (1) {
    if (cur >= x) {
      cout << res << endl;
      return;
    }
    cur = cur + cur / 100;
    res++;
  }
}

int main() {
//  int T = read();
//  while (T--) solve();
  solve();
  return 0;
}

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

int main(){
  int a, b, k;
  scanf("%d", &a);
  scanf("%d", &b);
  scanf("%d", &k);
  
  int counter = 0, result;
  for (int i=min(100, min(a,b)); i>=1; i--){
    if (a % i == 0 && b % i == 0){
      ++counter;
      if (counter == k){
		result = i;
        break;
      }
    }
  }
  printf("%d", result);
  return 0;
}

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

struct Benri { Benri() { std::cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(12);}} benri;

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;
using vll = vector<long long>;
using vvll = vector<vll>;
using pll = pair<ll, ll>;
using ull = unsigned long long;

template <typename T> using PQ = priority_queue<T>;
template <typename T> using minPQ = priority_queue<T, vector<T>, greater<T>>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define pb push_back
#define mp make_pair
#define F first
#define S second

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

constexpr long long MOD = 1000000007;
//constexpr long long MOD = 998244353;
//constexpr int INF = 1001001001;
constexpr ll INF = 1001001001001001001ll;
constexpr double EPS = 1e-10;
using number = long long;


vvll dp(101, vll(100005));

int main() {
    int N, W; cin >> N >> W;
    vll w(N + 1, 0), v(N + 1, 0);
    rep(i, N) cin >> w[i + 1] >> v[i + 1];

    dp[0].assign(100005,INF);
    dp[0][0] = 0;

    for (int i = 1 ; i <= N; i++) {
        rep(j, 1e5 + 1) {
            if (j - v[i] < 0) dp[i][j] = dp[i - 1][j];
            else dp[i][j] = min(dp[i - 1][j], dp[i - 1][j - v[i]] + w[i]);
        }
    }

    ll ans = 0;
    rep(j, 1e5 + 1) if (dp[N][j] <= W) ans = j;

    cout << ans << endl;

}


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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
using P = pair<ll, ll>;
using V = vector<ll>;
#define rep(i, n) for(ll i=0;i<(ll)(n);i++)
#define rep1(i, n) for(ll i=1;i<=(ll)(n);i++)
#define rep2(i, m, n) for(ll i=m;i<(ll)(n);i++)
#define rrep(i, n, m) for(ll i=n;i>=(ll)(m);i--)
#define ALL(obj) (obj).begin(), (obj).end()
#define MOD 1000000007
#define INF 1000000000

const double PI = 3.141592653589;

void solve_abc_a() {
	ll r;
	float ans;
	//string ans = "No";

	cin >> r;
	ans = 2 * r * PI;

	cout << fixed;
	cout << setprecision(6) << ans;

	return;
}

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

	solve_abc_a();

	return 0;
}

Measured memory_bytes: 3804
#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++)
int main()
{
    int A;
    cin >> A;
    
    cout << (A%2==0?A:A*2) << endl; 

   return 0;
}

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

int main() {
  vector<int> pack(3);
  for(int i = 0; i < 3; ++i) cin >> pack.at(i);
  sort(pack.begin(), pack.end());
  if(pack[0] + pack[1] == pack[2]) cout << "Yes" << endl;
  else cout << "No" << endl;
}

Measured memory_bytes: 256
package main

import (
  "bufio"
  "fmt"
  "os"
  "strconv"
  "strings"
)

const size = 1000000
var reader = bufio.NewReaderSize(os.Stdin,size)
func NextLine() string {
  var line,buffer []byte
  var isPrefix bool = true
  var err error
  for ;isPrefix; {
    line,isPrefix,err = reader.ReadLine()
    if err != nil { panic(err) }
    buffer = append(buffer,line...)
  }
  return string(buffer)
}
func NextInt() int {
  var n int
  n,_ = strconv.Atoi(NextLine())
  return n
}
func NextIntArray() []int {
  var s []string = strings.Split(NextLine()," ")
  var n int = len(s)
  var a []int = make([]int,n)
  for i:=0;i<n;i++ {
    a[i],_ = strconv.Atoi(s[i])
  }
  return a
}

func main() {
  var n int = NextInt()
  var h []int = NextIntArray()
  var c []int = make([]int,n)
  c[0] = 0
  c[1] = abs(h[1]-h[0])
  for i:=2;i<n;i++ {
    c[i] = min(c[i-1]+abs(h[i]-h[i-1]),c[i-2]+abs(h[i]-h[i-2]))
  }
  fmt.Println(c[n-1])
}
func abs(n int) int {
  if n < 0 { return -n }
  return n
}
func min(n int,m int) int {
  if n < m { return n }
  return m
}

Measured memory_bytes: 5376
#include<stdio.h>
int main(void)
{
	int ct,map[10][10],answer[11][11];
	while(1){
		scanf("%d",&ct);
		if(ct==0){
			return 0;
		}
		for(int f1=0;f1<11;f1++){
			for(int f2=0;f2<11;f2++){
				answer[f1][f2]=0;
			}
		}
		for(int f1=0;f1<ct;f1++){
			for(int f2=0;f2<ct;f2++){
				scanf("%d",&map[f1][f2]);
				answer[f1][f2]=map[f1][f2];
			}
		}
		for(int f1=0;f1<ct;f1++){
			for(int f2=0;f2<ct;f2++){
				answer[f1][ct]+=map[f1][f2];
				answer[ct][f1]+=map[f2][f1];
			}
		}
		for(int f1=0;f1<ct;f1++){
			answer[ct][ct]+=answer[f1][ct];
		}
		for(int f1=0;f1<ct+1;f1++){
			for(int f2=0;f2<ct+1;f2++){
				printf("%5d",answer[f1][f2]);
			}
			printf("\n");
		}
	}
	return 0;
}

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

using namespace std;

const int Nmax = 2e5 + 10;
const int Mod = 1e9 + 7;
const int oo = 2e9;

int n;
int a[Nmax], viz[Nmax], s[Nmax];
long long k;

int main()
{
/**
    #ifndef ONLINE_JUDGE
        ifstream cin("test.in");
        ofstream cout("test.out");
    #endif // ONLINE_JUDGE
*/

    cin >> n >> k;

    for(int i = 1; i <= n; i++)
        cin >> a[i];

    int x = 1;
    while(viz[x] != 1)
    {
        viz[x] = 1;
        x = a[x];
        k--;

        if(k == 0)
        {
            cout << x << "\n";
            return 0;
        }
    }

    int lgciclu = 0;

    while(viz[x] != 2)
    {
        viz[x]++;
        lgciclu++;
        s[lgciclu] = x;
        x = a[x];
    }

    cout << s[k%lgciclu + 1];
    return 0;
}


Measured memory_bytes: 5696
import sys
input = sys.stdin.readline
import math

def is_prime(n):
    if n == 1: return False
    for i in range(2, int(math.sqrt(n)) + 1):
        if n % i == 0:
            return False
    return True

like_2017 = [is_prime(n) and is_prime((n+1)//2) for n in range(1, 100001, 2)]
cumsum = [0] * len(like_2017)
cumsum[0] = like_2017[0]
for i in range(1, len(cumsum)):
    cumsum[i] = cumsum[i-1] + like_2017[i]

q = int(input())
for _ in range(q):
    l, r = map(int, input().split())
    l, r = l // 2, r // 2
    if l == 0:
        print(cumsum[r])
    else:
        print(cumsum[r] - cumsum[l-1])


Measured memory_bytes: 5724
<?php
$input_line = trim(fgets(STDIN));
$bank = 100;
$tax = 1.01;
$year = 0;

$money = 0;

while (1) {;
    
    if ($input_line <= $bank) {
        break;
    }
    $bank = (int)($bank * $tax);
    $year++;
}

echo $year;

  ?>

Measured memory_bytes: 16220
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef tuple<ll,ll,ll> PP;
typedef vector<ll> vi;
typedef vector<vi> vvi;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define REP(i,k,n) for(ll i=(ll)(k);i<(ll)(n);i++)
#define all(v) v.begin(),v.end()
#define lb(v,k) (lower_bound(all(v),k)-v.begin())
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
const int mod=1e9+7;
const ll inf=1001001001001001;
template<class T> bool chmin(T&a,T b){if(a>b){a=b;return true;}return false;}
template<class T> bool chmax(T&a,T b){if(a<b){a=b;return true;}return false;}
template<class T> void out(T a){cout<<a<<'\n';}
template<class T> void outv(T v){rep(i,v.size()){if(i)cout<<' ';cout<<v[i];}cout<<'\n';}
template<class T> void outvv(T v){rep(i,v.size())outv(v[i]);}

int main(){
    int n,q;cin>>n>>q;
    vi v(n);
    rep(i,n)cin>>v[i];
    vector<P> query(q);
    vi ans(q);
    rep(i,q)cin>>query[i].fi;
    rep(i,q)query[i].se=i;
    sort(all(query));reverse(all(query));
    int w=0;
    ll sum=0;
    for(int i=n-1;i>=0;i-=2)sum+=v[i];
    REP(i,1,(n+1)/2){
        while(w<q){
            if(query[w].fi>(v[n-i-1]+v[n-i*2-1])/2){
                ans[query[w].se]=sum;
                w++;
            }
            else break;
        }
        sum-=v[n-1-i*2];
        sum+=v[n-1-i];
    }
    REP(i,w,q)ans[query[i].se]=sum;
    for(ll x:ans)out(x);
}

Measured memory_bytes: 4864
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string>
#include <utility>
#include <vector>

using namespace std;

// conversion
//------------------------------------------
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T> inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}

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

// typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

// container util
//------------------------------------------
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i, c)                                                             \
  for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(s, e) ((s).find(e) != (s).end())
#define SORT(c) sort((c).begin(), (c).end())

// repetition
//------------------------------------------
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)

// constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI = acos(-1.0);

// clear memory
#define CLR(a) memset((a), 0, sizeof(a))

// debug
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x)                                                               \
  cerr << #x << " = " << (x) << " (L" << __LINE__ << ")"                       \
       << " " << __FILE__ << endl;

int f(int x){
  int y=0;
  REP(i,x){
    y+=i;
  }
  return y;
}
void solve(long long N, std::vector<std::string> s) {
  REP(i, N){
    SORT(s[i]);
  }
  SORT(s);
  SORT(s);
  // REP(i,N+1){
  //   debug(s[i]);
  // }
  VI list;
  LL ans=0;
  LL cnt=0;
  bool flag =false;
  for(LL i=0; i<N-1;i++){
    if(s[i] == s[i+1]){
      cnt++;
      ans+=cnt;
    }
    else{cnt=0;}
  }
  cout<<ans<<endl;
}

int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<std::string> s(N);
  for (int i = 0; i < N; i++) {
    std::cin >> s[i];
  }
  solve(N, std::move(s));
  return 0;
}


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

/*
*/
struct LCA {
    int v;
    int root;
    int h;
    vector< vector< int > > parent;
    vector< int > depth;
    vector< vector< int > > g;
    LCA(int v, int root) : v(v), root(root), depth(v, -1), g(v) {
        h = 1;
        while ((1 << h) < v) ++h;
        parent.assign(h, vector< int >(v, -1));
    }
    void add_edge(int start, int to) {
        g[start].push_back(to);
    }
    void build() {
        dfs(root, -1, 0);
        for (int i = 0; i + 1 < parent.size(); ++i) {
            for (int j = 0; j < v; ++j) {
                if (parent[i][j] != -1) parent[i + 1][j] = parent[i][parent[i][j]];
            }
        }
    }
    int get(int u, int v) {
        if (depth[u] > depth[v]) swap(u, v);
        for (int i = 0; i < parent.size(); ++i) {
            if ((depth[v] - depth[u]) & (1 << i)) v = parent[i][v];
        }
        if (u == v) return u;
        for (int i = parent.size() - 1; i >= 0; --i) {
            if (parent[i][u] != parent[i][v]) {
                u = parent[i][u];
                v = parent[i][v];
            }
        }
        return parent[0][u];
    }
    void dfs(int v, int p, int d) {
        parent[0][v] = p;
        depth[v] = d;
        for (int e : g[v]) if (e != p) dfs(e, v, d + 1);
    }
};

/*
    verified https://onlinejudge.u-aizu.ac.jp/courses/library/5/GRL/all/GRL_5_C
*/
int main() {
    int n; cin >> n;
    LCA lca(n, 0);
    for (int i = 0; i < n; ++i) {
        int k; cin >> k;
        for (int j = 0; j < k; ++j) {
            int c; cin >> c;
            lca.add_edge(i, c);
            lca.add_edge(c, i);
        }
    }
    lca.build();
    int q; cin >> q;
    vector< int > ress;
    for (int i = 0; i < q; ++i) {
        int u, v; cin >> u >> v;
        ress.push_back(lca.get(u, v));
    }
    for (int res : ress) cout << res << endl;
}



Measured memory_bytes: 19208