akhauriyash/Code-Regression huggingface dataset:
/// kAAzuki Hoshino
/*
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
*/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long
typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int,int> pi;
typedef vector<pi> vpi;
#define inf 1000000000
#define mod 1000000007
#define dmp(x) cerr<<"line "<<__LINE__<<" "<<#x<<":"<<x<<endl
#define fs first
#define sc second
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define mt make_tuple
#define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
template<class S,class T> ostream& operator<<(ostream& o,const pair<S,T> &p){
	return o<<"("<<p.fs<<","<<p.sc<<")";
}
template<class T> ostream& operator<<(ostream& o,const vector<T> &vc){
	o<<"{";
	for(const T& v:vc) o<<v<<",";
	o<<"}";
	return o;
}

ordered_set s;

int a,b;


signed main(){
IOS;
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);

        cin >> a >> b;
        for(int i=b-a+1;i<a+b;i++){
            cout << i << " ";
        }



return 0;
}
///....


Measured memory_bytes: 256
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readlines
from math import sqrt

def isSquare(n):
    m = int(sqrt(n))
    for x in range(1, m+1):
        if x**2 == n:
            return True

def getDistance(xi, xj, dimention):
    d = 0
    for i in range(dimention):
        d += (xi[i] - xj[i])**2
    return d

def main():
    lines = input()

    n, d = list(map(int, lines[0].split()))
    x = []
    for i, xi in enumerate(lines[1:]):
        x.append(list(map(int, xi.split())))

    cnt = 0

    for i, xi in enumerate(x):
        for j, xj in enumerate(x[i+1:]):
            dist = getDistance(xi, xj, d)
            if isSquare(dist):
                cnt += 1
    print(cnt)

main()

Measured memory_bytes: 9092
#include<bits/stdc++.h>
using namespace std;
namespace FAST_IO
{
	template<typename T> void read(T &a)
	{
		a=0;
		int f=1;
		char c=getchar();
		while(!isdigit(c))
		{
			if(c=='-')
			{
				f=-1;
			}
			c=getchar();
		}
		while(isdigit(c))
		{
			a=a*10+c-'0';
			c=getchar();
		}
		a=a*f;
	}
	template <typename T> void write(T a)
	{
		if(a<0)
		{
			a=-a;
			putchar('-');
		}
		if(a>9)
		{
			write(a/10);
		}
		putchar(a%10+'0');
	}
	template <typename T> void writeln(T a)
	{
		write(a);
		puts("");
	}
}
int dp[100001];
bool wrong[100001];
int n,m;
int main()
{
	cin>>n>>m;
	while(m--)
	{
		int tmp;
		cin>>tmp;
		wrong[tmp]=true;
	}
	dp[0]=1;
	for(int i=1;i<=n;i++)
	{
		if(wrong[i])
		{
			continue;
		}
		if(!wrong[i-1])
		{
			dp[i]+=dp[i-1];
		}
		if(!wrong[i-2])
		{
			dp[i]+=dp[i-2];
		}
		dp[i]%=1000000007;
	}
	cout<<dp[n];
}

Measured memory_bytes: 768
#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string>
#include<iostream>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include <sstream>
#include<iomanip>
#include <ctype.h>
using namespace std;

//#include<bits/stdc++.h>


int main() {
	
	int a, b;
	cin >> a >> b;
	if (a*b == 15)cout << '*' << endl;
	else if (a + b == 15)cout << '+' << endl;
	else cout << "x" << endl;

	return 0;
}

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

int n;
vector<string> ans;

void dfs(string s,char c){
  vector<int> v;
  for(int i=0;i<n;i++)if(s[i]=='#')v.push_back(i);
  int A=v.size();
  if(!A)ans.push_back(s);
  else{
    s[v[0]]=c;
    for(int i=0;i<(1<<A-1);i++){
      string t=s;
      for(int j=0;j<A-1;j++)if((i>>j)&1)t[v[j+1]]=c;
      dfs(t,c+1);
    }
  }
}

int main(){
  dfs(string((cin>>n,n),'#'),'a');
  sort(ans.begin(),ans.end());
  for(string p:ans)cout<<p<<endl;
}


Measured memory_bytes: 7796
#include<iostream>
using namespace std;
int main() {
	int a, b, c;
	unsigned int i;
	cin >> a >> b >> c;
	bool masatoy = false;
	for ( i = a; i <= 10000; i = i + a) {
		if (i%b == c) {
			masatoy = true;
		}
	}
	if (masatoy == true) {
		cout << "YES" << endl;
	}
	else {
		cout << "NO" << endl;
	}
}

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

using namespace std;

#define EPS 1e-10

struct Point {
    double x, y;

    Point(){}
    Point(double x, double y) : x(x), y(y) {}
 
    Point operator + (const Point &p)const{ return Point(x+p.x, y+p.y); }
    Point operator - (const Point &p)const{ return Point(x-p.x, y-p.y); }
    Point operator * (const double &k)const{ return Point(x*k, y*k); }
    Point operator / (const double &k)const{ return Point(x/k, y/k); }
};

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

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

double norm(const Point &p){
    return dot(p, p);
}

double abs(const Point &p)
{
    return sqrt(norm(p));
}

double dist(const Point &a, const Point &b)
{
    return sqrt(pow(a.x-b.x, 2) + pow(a.y-b.y, 2));
}

typedef Point Vector;

int ccw(const Point &p0, const Point &p1, const Point &p2)
{
    Vector a = p1 - p0, b = p2 - p0;
    if (cross(a, b) > EPS)  return +1;
    if (cross(a, b) < -EPS) return -1;
    if (dot(a, b) < -EPS)   return +2; 
    if (norm(a) < norm(b))  return -2;
    return +0;
}

struct Segment {
    Point s, t;
    Segment(){}
    Segment(Point s, Point t) : s(s), t(t) {}
};

#define curr(G,i) (G[i%G.size()])
#define next(G,i) (G[(i+1)%G.size()])
typedef vector<Point> Polygon;
typedef Segment Line;

Point crosspointLL(const Line &a, const Line &b)
{
    Vector va = a.t-a.s, vb = b.t-b.s;
    double d = cross(vb, va);
    if (abs(d) < EPS) return b.s;
    return a.s + va * cross(vb, b.t - a.s) * (1.0 / d);
}

Polygon convex_cut(const Polygon &pg, const Line &l)
{
    Polygon res;
    for (int i = 0; i < (int)pg.size(); i++) {
	Point cp = curr(pg,i), np = next(pg,i);
	if (ccw(l.s, l.t, cp) != -1) res.push_back(cp);
	if (ccw(l.s, l.t, cp)*ccw(l.s, l.t, np) < 0) {
	    res.push_back(crosspointLL(Line(cp, np), l));
	}
    }
    return res;
}

vector<Vector> normal_line_vector(const Line &l)
{
    vector<Vector> vs;
    Vector v = l.t - l.s, p = v / abs(v);
    vs.push_back(Point(-p.y, p.x));
    vs.push_back(Point(p.y, p.x));
    return vs;
}

vector<Line> translation(const Line &l, double d)
{
    vector<Vector> nlv = normal_line_vector(l);
    vector<Line> nl;
    nl.push_back(Line(l.s + nlv[0]*d, l.t + nlv[0]*d));
    nl.push_back(Line(l.s + nlv[1]*d, l.t + nlv[1]*d));
    return nl;
}

bool c(double d, const Polygon &pg)
{
    Polygon p = pg;
    for (int i = 0; i < (int)pg.size(); i++) {
        Line l(curr(pg, i), next(pg, i)), ll;
        vector<Line> nl = translation(l, d);
        ll = (ccw(l.s, l.t, nl[0].s) == 1 ? nl[0] : nl[1]);
        p = convex_cut(p, ll);
    }
    return (p.size() > 0);
}

int main()
{
    int n;
    while (cin >> n, n) {
        Polygon pg(n);
        for (int i = 0; i < n; i++) {
            cin >> pg[i].x >> pg[i].y;
        }

        double l = 0, r = 10000;
        for (int i = 0; i < 150; i++) {
            double mid = (l + r) / 2;
            if (c(mid, pg)) {
                l = mid;
            } else {
                r = mid;
            }
        }
        printf("%.8f\n", r);
    }
    return 0;
}

Measured memory_bytes: 3200
#include<iostream>
#include<string>
#include<algorithm>
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define REP(i,b) FOR(i,0,b)
using namespace std;

int main(void) {
	int n,k ;
	long long int sum;
	cin >> n>> k;
	sum = k;
	FOR(i, 1, n-1) {
		sum *= (k - 1);
	}
	cout << sum << endl;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < n; i++)
#define REPR(i, n) for(ll i = n; i >= 0; i--)
#define FOR(i, m, n) for (ll i = m; i < n; i++)
#define INF LLONG_MAX
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;


int main()
{
    ll n; cin >> n;
    ll res = n;
    for (size_t i = 0; i <= n; i++)
    {
        ll cc = 0;
        ll t = i;
        while (t > 0) cc += t % 6, t /= 6;
        t = n - i;
        while (t > 0) cc += t % 9, t /= 9;
        if (res > cc) res = cc;
    }
    cout << res << endl;
    
    return 0;
}

Measured memory_bytes: 256
import java.util.Scanner;

public class Main {

  public static void main(String[] args) {

    final Scanner scanner = new Scanner(System.in);

    final int a = scanner.nextInt();
    final int b = scanner.nextInt();
    final int value = Integer.parseInt(Integer.toString(a) + Integer.toString(b));

    final int lowerSqrt = (int) Math.sqrt(value);
    if (value % lowerSqrt == 0) {
      System.out.println("Yes");
    } else {
      System.out.println("No");
    }

  }

}


Measured memory_bytes: 21972
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<queue>
#include<cmath>
#include<cstdio>
#include<tuple>
#include<bitset>

using namespace std;
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<=n;++i)
#define ALL(x) x.begin(),x.end()
#define ll long long
const int inf=1000000007;
const int MOD=1000000007;
const int rest=MOD;

long long modinv(long long a, long long m) {
    long long b = m, u = 1, v = 0;
    while (b) {
        long long t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}
bool judge(int n,int k,int i){
  bool flag=true;
  if(i>k)flag=false;
  return flag;
}
signed main(){
  int n,kk;cin>>n>>kk;
  kk=min(kk,MOD);
  int res=0;
  vector<int> k(n+1,1);
  rep1(i,n){
    k[i]=k[i-1]*i;
    k[i]%=MOD;
    //cout<<k[i]<<endl;
  }
  rep(i,n){
    //if(i>K)break;
    if(judge(n,kk,i)){
      int buf=k[n]*modinv(k[n-i],MOD);
      buf%=MOD;
      buf*=modinv(k[i],MOD);
      int mul=k[n-1]*modinv(k[n-i-1],MOD);
      mul%=MOD;
      mul*=modinv(k[i],MOD);
      //printf("buf= %lld *%lld *%lld\n",k[n],modinv(k[n-i],MOD),modinv(k[i],MOD));
      //printf("buf*MOD=%lld *%lld *%lld\n",k[n],k[n-i],k[i]);
      buf%=MOD;mul%=MOD;
      buf*=mul;
      buf%=MOD;
      //printf("buf=%lld\n",buf);
      res+=buf;
      res%=MOD;
    }
    //printf("i=%lld res=%lld\n",i,res);
  }
  //cout<<modinv(k[n],MOD)*k[n]%MOD<<endl;
  cout<<res<<endl;
  return 0;
}


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

int main() {
  int N,K;
  string S;
  cin >> N >> K >> S;
  S = "R" + S + "L";
  int ans=0;
  
  for(int i=1;i<=N;i++){
    if(S[i]=='R'&&S[i+1]=='R') ans++;
    if(S[i]=='L'&&S[i-1]=='L') ans++;
  }
  ans += K*2;
    
  cout << min(ans,N-1) << endl;
  return 0;
}


Measured memory_bytes: 512
#include<iostream>
#include<algorithm>
#include<string>
#include<cstdio>
#include<vector>

using namespace std;

int main()
{
	vector<int>x(10000);
	int i = 0;
	while (1)
	{
		int flag = 1;
		cin >> x[i];
		if (x[i] == 0)
		{
			break;
		}
		i++;
	}
	for (int t = 0; t < i; t++)
	{
		cout << "Case " << t + 1 << ": " << x[t] << endl;
	}
	return 0;
}


Measured memory_bytes: 3136
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <array>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <sstream>
#include <stdio.h>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <list>
#include <numeric>
#include <stack>
#include <iomanip>

//using namespace std;

#define Rep(i,a,b) for(int i = a; i < b; ++i)
#define rep(i,b) Rep(i,0,b)
#define allof(a) (a).begin(), (a).end()

typedef long long ll;
const int inf = 1e9 + 7;
const ll infll = 1ll << 60ll;
const ll mod = 1e9 + 7;
// 0~3までは右左下上 4~7までは斜め
constexpr int dx[] = { 1, 0, -1, 0, 1, 1, -1, -1 };
constexpr int dy[] = { 0, -1, 0, 1, 1, -1, -1, 1 };

template<typename T> void chmax(T& a, T b) { a = std::max(a, b); }
template<typename T> void chmin(T& a, T b) { a = std::min(a, b); }
template<typename T> void chadd(T& a, T b) { a = a + b; }

namespace {  // 名前なし名前空間
	// gcd, lcm は C++17 でstdに標準入りしたので言語のバージョンに注意
	// 最大公約数
	ll gcd(ll a, ll b) {
		if (b == 0) return a;
		return gcd(b, a % b);
	}

	// 最小公倍数
	ll lcm(ll a, ll b) {
		return a / gcd(a, b) * b;
	}
}

int main() {

	ll n, k;
	std::cin >> n >> k;
	std::vector<ll> a(n), f(n);
	rep(i, n) std::cin >> a[i];
	rep(i, n) std::cin >> f[i];

	//// 優先度付きキューの比較式 圧倒的成長
	//auto c = [](std::pair<ll, ll> lhs, std::pair<ll, ll> rhs) {
	//	return lhs.first * lhs.second < rhs.first * rhs.second;
	//};
	//std::priority_queue<std::pair<ll, ll>, std::vector<std::pair<ll, ll>>, decltype(c)> pq(c);

	std::sort(allof(a));
	std::sort(allof(f), std::greater<ll>());

	std::vector<std::pair<ll, ll>> pa;

	rep(i, n) {
		pa.push_back({ a[i], f[i] });
	}

	ll left = -1;
	ll right = 1e12 + 10;

	while(right - left > 1) {
		ll mid = (right + left) / 2;

		ll cnt = 0;
		rep(i, n) {
			if(pa[i].first * pa[i].second > mid)
				cnt += pa[i].first - mid / pa[i].second;
		}

		if (cnt <= k) right = mid;
		else left = mid;
	}

	std::cout << right << std::endl;

	// 二分探索解けなかったの悔しい

	return 0;
}

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

#define _USE_MATH_DEFINES
#include <cmath>
#include <cstdlib>
#include <deque>
#include <algorithm>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <iterator>

using namespace std;

#define rep(i,a,b) for(int i=(a), i##_len=(b);i<i##_len;i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)

//#define int long long
#define SZ(x) ((int)(x).size())
#define pb push_back
#define mp make_pair

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<double, double> pdd;

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

const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;

int n;
ll W;
ll w[50], v[50];
pll ps[1 << 20];

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

	cin >> n >> W;
	rep(i, 0, n)cin >> v[i] >> w[i];

	int n1 = n / 2;
	rep(i, 0, 1 << n1)
	{
		ll tw = 0, tv = 0;
		rep(j, 0, n1)
		{
			if (i & (1 << j))
			{
				tw += w[j];
				tv += v[j];
			}
		}
		ps[i] = mp(tw, tv);
	}
	
	sort(ps, ps + (1 << n1));
	
	int m = 1;
	rep(i, 1, 1 << n1)
	{
		if (ps[m - 1].second < ps[i].second)
		{
			ps[m++] = ps[i];
		}
	}
	
	ll ans = 0;
	rep(i, 0, 1 << (n - n1))
	{
		ll tw = 0, tv = 0;
		rep(j, 0, n - n1)
		{
			if (i & (1 << j))
			{
				tw += w[j + n1];
				tv += v[j + n1];
			}
		}
		if (tw <= W)
		{
			ll ttv = (lower_bound(ps, ps + m, mp(W - tw, 0x3f3f3f3f3f3f3f3fLL)) - 1)->second;
			chmax(ans, ttv + tv);
		}
	}
	
	cout << ans << endl;
	
	return 0;
}


Measured memory_bytes: 19584
#include <iostream>
#include <algorithm>
#include <cstring>
#include <functional>
#include <bits/stdc++.h>


using namespace std;


int main()
{
    //std::ios_base::sync_with_stdio(false); 10.566
    long long int a,b,k,atemp,btemp,ktemp;
    cin>>a>>b>>k;
    atemp=a;
    btemp=b;
    ktemp=k;
    a=a-k>0?(a-k):0;
    k=k-atemp>0?k-atemp:0;
    b=b-k>0? b-k:0;
    cout<<a<<" "<<b<<endl;
    return 0;
}


Measured memory_bytes: 256
#include<bits/stdc++.h>
using namespace std;
#define maxn 300
#define inf 0x1fffffffffffffff
#define LL long long
LL c[maxn+5][maxn+5],d[maxn+5][maxn+5];
int main(){
//	freopen("1.in","r",stdin);
	int n,m,L,u,v,x;scanf("%d%d%d",&n,&m,&L);
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++)c[i][j]=c[j][i]=d[i][j]=d[j][i]=inf;
	}
	for(int i=0;i<m;i++){
		scanf("%d%d%d",&u,&v,&x);
		if(x<=L)c[u][v]=c[v][u]=x,d[u][v]=d[v][u]=1;
	}
	for(int k=1;k<=n;k++){
		for(int i=1;i<=n;i++){
			if(i==k)continue;
			for(int j=i+1;j<=n;j++){
				if(j==k)continue;
				if(c[i][k]!=inf&&c[j][k]!=inf){
					if(c[i][k]+c[j][k]<=L)c[j][i]=c[i][j]=min(c[i][j],c[i][k]+c[j][k]),d[i][j]=d[j][i]=1;
				}
//				if(d[i][k]!=inf&&d[j][k]!=inf)d[i][j]=d[j][i]=min(d[i][j],d[i][k]+d[j][k]);
			}
		}
	}
	for(int k=1;k<=n;k++){
		for(int i=1;i<=n;i++){
			if(i==k)continue;
			for(int j=i+1;j<=n;j++){
				if(j==k)continue;
				if(d[i][k]!=inf&&d[j][k]!=inf)d[i][j]=d[j][i]=min(d[i][j],d[i][k]+d[j][k]);
			}
		}
	}
	int q;scanf("%d",&q);
	for(int i=0;i<q;i++){
		scanf("%d%d",&u,&v);
		printf("%d\n",d[u][v]==inf?-1:d[u][v]-1);
	}
	return 0;
}

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

#define ll long long
#define mod 1000000007
#define pb push_back
#define pi pair<ll,ll>
#define vi vector<int>
#define vpi vector< pi > 
#define IOS ios_base::sync_with_stdio(false),cin.tie(NULL)
const int N=100002;
int r[N],g[N],b[N];
int main()
{
	int n;
	cin>>n;
	string s;
	cin>>s;
	s=" "+s;
	for(int i=1;i<s.size();i++)
	{
		if(s[i]=='R' ) r[i]++;
		else if(s[i]=='G') g[i]++;
		else b[i]++;
		
		r[i]+=r[i-1];
		g[i]+=g[i-1];
		b[i]+=b[i-1];
	}
	ll res=0;
	for(int i=1;i<s.size();i++)
	{
		for(int j=i-1;j>1;j--)
		{
			if(s[i]=='R')
			{
				if(s[j]=='G')
				{
					if(j>i-j)
					res+=b[j-1]-(b[j-(i-j)]-b[j-(i-j)-1]);
					else
					res+=b[j-1];
				}

				else if(s[j]=='B')
				{
					if(j>i-j)
					res+=g[j-1]-(g[j-(i-j)]-g[j-(i-j)-1]);
				else res+=g[j-1];
				}
			}
			if(s[i]=='G')
			{
				if(s[j]=='R')
				{
					if(j>i-j)
					res+=b[j-1]-(b[j-(i-j)]-b[j-(i-j)-1]);
				else
					res+=b[j-1];
				}

				else if(s[j]=='B')
				{
					if(j>i-j)
					res+=r[j-1]-(r[j-(i-j)]-r[j-(i-j)-1]);
				else
					res+=r[j-1];
				}
			}
			if(s[i]=='B')
			{
				if(s[j]=='G')
				{
					//cout<<r[j-1]<<" "<<"wow";
					if(j>i-j)
					res+=r[j-1]-(r[j-(i-j)]-r[j-(i-j)-1]);
				else
					res+=r[j-1];
				}

				else if(s[j]=='R')
				{
					if(j>i-j)
					res+=g[j-1]-(g[j-(i-j)]-g[j-(i-j)-1]);
				else
					res+=g[j-1];
				}
			}
		}
		//cout<<res<<"\n";
	}
	cout<<res;
	return 0;
}

Measured memory_bytes: 3652
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		double a = in.nextDouble();
		double b = in.nextDouble();
		double x = in.nextDouble();
		System.out.println(solve(a, b, x));
		in.close();
	}

	private static double solve(double a, double b, double x) {
		x /= a;
		if (a * b / 2 > x) {
			double aa = x / b * 2;
			return Math.atan(b / aa) / Math.PI * 180;
		} else {
			x = a * b - x;
			double bb = x / a * 2;
			return Math.atan(bb / a) / Math.PI * 180;
		}
	}
}

Measured memory_bytes: 24532
#文字列の長さ len(測る文字)
#文字列の検索（何番目） List.index(検索する文字)


#A, B = [int(input()) for i in range(2)]
#A, B = [input() for i in range(2)]
N,K =map(int, input().split())
#N = int(input())
#S = input()

sum=0

#List = ['A','B','C','D','E']
#List=list(range(1))
List_A_all = list(range(3*K+1))
List_A_all =[]


#行列入力
for i in range(K):

    List_d = int(input())

    List_A = input().split()
    List_A_int= [int(s) for s in List_A]
    List_A_all.extend(List_A_int)

#print(List_A_all)

for t in range(N):
    if not t+1 in List_A_all:
        sum+=1


#print(List_d)
print(sum)


#1行のリスト作成
#for i in range(1):
#    X,Y,Z= map(int, input().split())
#    List=[X,Y,Z]

#List.sort()
#print(List[1])

#for i in range(3):
 #   sum += List[i][0]*List[i][1]*0.1

#print(int(sum))

#print(List.index(S)+1)

#salary = 0

#sum=0

#print(N)
#while sum!=N:

#    print(1)
#    sum+=1



#i=0からスタートなのに注意
#for i in range(N+1):
#    salary+= i*10000/N
#
#salary = int(salary)
#print(str(Y)+' '+str(X))

Measured memory_bytes: 9224
#include <bits/stdc++.h>
#define int long long
#define mod (int)(1e9+7)
#define inf (int)(3e18+7)
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<n;i++)
#define P pair<int,int>
#define PiP pair<int,pair<int,int>>
#define all(v) v.begin(),v.end()
#define mkp make_pair
#define mkt make_tuple
#define prique(T) priority_queue<T,vector<T>,greater<T>>
#define vecunique(vec) sort(vec.begin(), vec.end());decltype(vec)::iterator result = std::unique(vec.begin(), vec.end());vec.erase(result, vec.end())
using namespace std;

bool prime(int x) {
	for (int i = 2; i * i <= x; i++) {
		if (x % i == 0)return false;
	}
	return x > 1;
}
int gcd(int x, int y) {
	if (y == 0)return x;
	return gcd(y, x % y);
}
int lcm(int x, int y) {
	return x / gcd(x, y) * y;
}
int kai(int x) {
	if (x == 0)return 1;
	return kai(x - 1) * x % mod;
}
int mod_pow(int x, int y, int mod_) {
	int res = 1;
	while (y > 0) {
		if (y & 1) {
			res = res * x % mod_;
		}
		x = x * x % mod_;
		y >>= 1;
	}
	return res;
}
int comb(int x, int y) {
	if (y > x)return 0;
	return kai(x)* mod_pow(kai(x - y), mod - 2, mod) % mod * mod_pow(kai(y), mod - 2, mod) % mod;
}
/*--------Library Zone!--------*/

int n, m, cnt[114514];
bool b[114514];
signed main() {
	cin >> n >> m;
	rep(i, n)cnt[i] = 1;
	b[0] = 1;
	rep(i, m) {
		int f, t; cin >> f >> t; f--; t--;
		if (cnt[f] == 1 && b[f]) {
			b[f] = 0; b[t] = 1;
		}
		else if (b[f]) {
			b[t] = 1;
		}
		cnt[f]--; cnt[t]++;
	}
	int ans = 0;
	rep(i, n)ans += b[i];
	cout << ans << endl;
}


Measured memory_bytes: 1152
#include<bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
#define mem(x,y) memset(x,y,sizeof(x)) //memset array
#define fo(i,r,k)  for((i) = r; (i) < (k); i=i+1)
#define fok(i,k,n) for((i) = k; (i) > n; i=i-1)
#define deb(x) cout << #x << " = " << x << endl
#define deb2(x, y) cout << #x << " = " << x << ", " << #y << " = " << y << endl
#define deb3(x, y, z) cout << #x << " = " << x << ", " << #y << " = " << y << ", " << #z << " = " << z << endl
#define bug puts("Hello");
#define mp make_pair
#define pb push_back
#define pi pair<int,int>
#define pl pair<long long,long long>
#define vi vector<int>
#define vl vector<long long>
#define vpl vector<pair<long long,long long>>
#define vpi vector<pair<int,int>>
#define all(x) x.begin(),x.end()
#define f first
#define s second
#define br cout<<"\n";
#define sortall(x) sort(x.begin(),x.end())
#define modexpo poww
ll modexpo(ll x,ll y,ll m){x=x%m;if(y==0){return 1;}if(y%2==0){return modexpo(x*x,y/2,m); }else{return (x*modexpo(x*x,y/2,m))%m; }}
void io();
const int mod  = 1e9+7;
const int maxn = 2e5 + 10;
int n,k,a[maxn]; 
int dp[maxn]; 
int rec(int n)
{   
    if(dp[n]!=-1) return dp[n]; 
    
    int ans = INT_MAX;
    int i; 
    for(i=max(1,n-k);i<n;i++)
    {
        ans = min(ans,abs(a[n]-a[i]) + rec(i)); 
    }
    return dp[n] = ans;
}

int main()
{
int i,j;
cin>>n>>k;
fo(i,1,n+1) cin>>a[i]; 
mem(dp,-1);
dp[0] = 0;
dp[1] = 0;
dp[2] = abs(a[1]-a[2]); 
rec(n);
cout<<dp[n]; 
return 0;
}

void io()
{
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
#endif
}


Measured memory_bytes: 12444
#include<bits/stdc++.h>
#define crap ios_base::sync_with_stdio(0);cin.tie(0)
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define endl "\n"
#define int ll

using namespace std;

const int mod = 1e9+7;
int A[25][25];
int n;
int dp[1<<21];
/*
int solve(int num, int mask){
    if(num<0 && mask==(1<<n)-1)return 1;
    if(num<0) return 0;
    if(mask>=(1<<n)-1) return 0;

    if(dp[num][mask]!=-1) return dp[num][mask];
    dp[num][mask]=0;
    for(int i=0;i<n;i++){
        if(A[num][i] && !(mask & 1<<i) ){
            int ms = mask|(1<<i);
            dp[num][mask] = (dp[num][mask] %mod + solve(num-1,ms)%mod)%mod;
        }
    }
    return dp[num][mask];
}*/

int32_t main()
{
   
   
    crap;
    /*memset(dp,-1,sizeof(dp));
    cin>>n;
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++) cin>>A[i][j];
    }
    int ans = solve(n-1,0);
    cout<<ans<<endl;*/
  	
    dp[0]=1;
    cin>>n;
    for(int i=0;i<n;i++)
        for(int j=0;j<n;j++) cin>>A[i][j];

    //for(int a=0;a<n;a++){
        for(int mask=0;mask<(1<<n);mask++){
            int a = __builtin_popcount(mask);
            for(int b=0;b<n;b++){
                if(A[a][b] && !(mask & (1<<b))){
                    int msk = mask|(1<<b);
                    dp[msk]= ( dp[msk]%mod +dp[mask]%mod)%mod;
                }
            }
        }
    //}
    cout<<dp[(1<<n)-1]<<endl;
}

Measured memory_bytes: 16640
#include <iostream>
#include <cstdio>
#include <vector>
#include <iomanip>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <map>
#include <set>
#include <cmath>
using namespace std;

int main() {
    int N;
    int K;

    cin >> N >> K;

    vector <int> A(N);
    double low = 1;
    double up = 1;

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

    double ans = 1e+20;

    for (int i = 0; i < 100; ++i) {
        double mid = (low+up) / 2;
        long long cutNeeded = 0;

        for (int i = 0; i < N; ++i) {
            long long needed = (long long) ceil((double)A[i] / mid);
            cutNeeded += (needed-1);
        }

        // cout << "DEBUG " << mid << " " << cutNeeded << endl;

        if (cutNeeded <= K) { // [low, mid]
            up = mid;
            ans = mid;
        } else { // [mid, up]
            low = mid;
        }
    }

    // cout << "DEBUG " << ans << endl;
    cout << (long long) ceil(ans) << endl;

    return 0;
}

Measured memory_bytes: 3960
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int , int> i_i;
typedef vector<ll> vel;
typedef vector<int> vei;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> ve_vel;
typedef vector<vector<int>> ve_vei;
typedef vector<vector<char>> ve_vec;
typedef vector<vector<bool>> ve_veb;
typedef vector<vector<string>> ve_ves;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<(int)(n);i++)
#define rep2(i,n) for(int i=2;i<(int)(n);i++)
#define repk(i,k,n) for(int i=k;i<(int)(n);i++)
#define fs first
#define sc second
#define pub push_back
#define pob pop_back
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define maxel(a) *max_element(all(a))
#define minel(a) *min_element(all(a))
#define acc accumulate
#define EPS (1e-7)
//#define INF (1e9)
#define PI (acos(-1))
#define mod (1000000007)
typedef long long int64;
const int64 INF = 1LL << 58;
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 (a>b) { a=b; return 1; } return 0; }

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

    int N, M; cin >> N >> M;
    vector<i_i> P(M); 
    rep(i,M) {
        int a, b; cin >> a >> b;
        P[i].fs = b; P[i].sc = a;
    }
    sort(all(P));

    int now = 0; int ans = 0;
    rep(i,M) {
        if(P[i].sc <= now) continue;
        if(now < P[i].sc) { now = P[i].fs - 1; ans++; }
    }
    cout << ans << endl;
    return 0;
}



Measured memory_bytes: 1024
#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}
 
#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};
 
    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
 
    ($next:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}
 
#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };
 
    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };
 
    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };
 
    ($next:expr, bytes) => {
        read_value!($next, String).into_bytes()
    };
 
    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };
 
    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}
 

fn main() {
    input!{
    	s: String,
    }
    match s.as_str() {
    	"Sunny"  => println!("{}","Cloudy"),
    	"Cloudy" => println!("{}","Rainy"),
    	"Rainy"  => println!("{}","Sunny"),
    	_        => println!("{}","fail"),
    }
}


Measured memory_bytes: 4352
#include <bits/stdc++.h>
using namespace std;
int main(){
    long long a,b,c,k,border,ans;
    border = pow(10,18);
    cin >> a >> b >> c >> k;
    if(k == 0){
        ans=a-b;
    }else{
        if(k%2==0)k=2;
        if(k%2==1)k=1;
        for(int i = 0; i < k; i++){
            long long tmpA,tmpB,tmpC;
            tmpA = b+c;
            tmpB = a+c;
            tmpC = a+b;
            ans = tmpA-tmpB;
            a = tmpA;
            b = tmpB;
            c = tmpC;
            //cout << a << " " << b << " " << c << " " << ans <<endl;
        }
    }
    if(abs(ans)>=border){
        cout << "Unfair" << endl;
    }else{
        cout << ans << endl;
    }
    return 0;
}

Measured memory_bytes: 3564
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long long mod = 1e9 + 7, ac = 1e6 + 3, bc = 30;

int bfs(vector<vector<pair<int, int>>>& G, int a, int b)
{
	vector<ll> C(G.size(), 1e9);
	C[a] = 1;
	deque<int> Q{a};
	while (!Q.empty())
	{
		int v = Q.front(); Q.pop_front();
		for (auto x : G[v])
		{
			if (C[x.first] > C[v] + x.second)
			{
				C[x.first] = C[v] + x.second;
				if (x.second) Q.push_back(x.first);
				else Q.push_front(x.first);
			}
		}
	}
	return C[b];
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int k; cin >> k;
	vector<vector<pair<int, int>>> G(k);
	for (int i = 0; i < k; i++)
	{
		G[i].push_back({i * 10 % k, 0});
		G[i].push_back({(i + 1) % k, 1});
	}
	cout << bfs(G, 1, 0) << '\n';
}


Measured memory_bytes: 6656
#include<bits/stdc++.h>
using namespace std;
int main()
{
	int x;
	cin>>x;
	
	vector<bool> exp(x+1);
	
	exp[1]=1;
	
	for(int b=2;b<=x;b++)
	{
		int v=b*b;
		while(v<=x)
		{
			exp[v]=1;
			v*=b;
		}
	}
	
	for(int i=x;i>=1;i--)
	{
		if(exp[i])
		{
			cout<<i<<endl;
			return 0;
	    }
	}
	return 0;
}

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

int main() {
	//入力
	string S;
	cin >> S;

	//処理
	string T = "ATCG";

	int ans = 0; //ATCG文字列の最大長
	int now = 0; //今見ている文字を末尾とするATCG文字列の最大長
	for (int i = 0; i < S.size(); i++)
	{
		bool isATCG = false;
		for (int j = 0; j < T.size(); j++)
		{
			if (S[i] == T[j]) isATCG = true;
		}

		if (!isATCG) {
			//違う場合は0にする
			now = 0;
		}
		else {
			//ATCG文字の場合は、前の文字列に1つ文字を足せる
			now++;
			//最大値を更新する
			ans = max(now, ans);
			// if(now > ans) ans = now; も同じ
		}
	}

	cout << ans << endl;
}



Measured memory_bytes: 256
#include "bits/stdc++.h"
using namespace std;
#define int               long long
#define pb                push_back
#define ppb               pop_back
#define pf                push_front
#define ppf               pop_front
#define all(x)            (x).begin(),(x).end()
#define uniq(v)           (v).erase(unique(all(v)),(v).end())
#define sz(x)             (int)((x).size())
#define fr                first
#define sc                second
#define pii               pair<int,int>
#define rep(i,a,b)        for(int i=a;i<b;i++)
#define mem1(a)           memset(a,-1,sizeof(a))
#define mem0(a)           memset(a,0,sizeof(a))
#define ppc               __builtin_popcount
#define ppcll             __builtin_popcountll

template<typename T1,typename T2>istream& operator>>(istream& in,pair<T1,T2> &a){in>>a.fr>>a.sc;return in;}
template<typename T1,typename T2>ostream& operator<<(ostream& out,pair<T1,T2> a){out<<a.fr<<" "<<a.sc;return out;}
template<typename T,typename T1>T amax(T &a,T1 b){if(b>a)a=b;return a;}
template<typename T,typename T1>T amin(T &a,T1 b){if(b<a)a=b;return a;}

const long long INF=1e18;
const int32_t M=1e9+7;
const int32_t MM=998244353;

const int N=1e5+5;

int a[N];
int b[N];
int c[N];

void solve(){
	int n;
	cin>>n;
	rep(i,0,n){
		cin>>a[i];
	}
	sort(a,a+n);
	deque<int> d;
	int fr = 0, bk = n-1;
	d.pf(a[fr++]);
	while(1){
		if(fr > bk) break;
		d.pf(a[bk--]);
		if(fr > bk) break;
		d.pb(a[bk--]);
		if(fr > bk) break;
		d.pf(a[fr++]);
		if(fr > bk) break;
		d.pb(a[fr++]);
	}
	rep(i,0,n) b[i] = d.front(),d.ppf();
	
	fr = 0, bk = n-1;
	d.pf(a[bk--]);
	while(1){
		if(fr > bk) break;
		d.pf(a[fr++]);
		if(fr > bk) break;
		d.pb(a[fr++]);
		if(fr > bk) break;
		d.pf(a[bk--]);
		if(fr > bk) break;
		d.pb(a[bk--]);
	}
	rep(i,0,n) c[i] = d.front(),d.ppf();
	
	int ans1 = 0;
	rep(i,1,n){
		ans1 += abs(b[i] - b[i-1]);
	}
	
	int ans2 = 0;
	rep(i,1,n){
		ans2 += abs(c[i] - c[i-1]);
	}
	
	cout<<max(ans1,ans2);
}
signed main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	#ifdef SIEVE
		sieve();
	#endif
	#ifdef NCR
		init();
	#endif
	int t=1;
	//cin>>t;
	while(t--) solve();
	return 0;
}


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

int A[100001];

int main() {
  int N,M, max, min, sumM, sumP;
  int i, j, k;
  scanf ("%d", &N);
  
  for (i=0;i<N;i++) {
      scanf("%d", &A[i]);
  }
  
  max = -10000;
  min = 10000;
  for (i=0;i<N;i++) {
    if (max<A[i]) {max=A[i]; j=i;}
    if (min>A[i]) {min=A[i]; k=i;}
  }
  if (j==k) k=1;
  
  sumP=0;
  sumM=0;
  for (i=0;i<N;i++) {
    if (i!=j && i!=k) {
      if (A[i]>0) sumP+=A[i];
      if (A[i]<0) sumM+=A[i];
    }
  }
  M = sumP-sumM+max-min;
  printf ("%d\n", M);
  
  for (i=0;i<N;i++) {
    if (i!=j && i!=k) {
      if (A[i]>0) {printf("%d %d\n", min, A[i]); min=min-A[i];}
      else        {printf("%d %d\n", max, A[i]); max=max-A[i];}
    }
  }
  printf("%d %d\n", max, min);
  
  return 0;
}




Measured memory_bytes: 2176
#include <bits/stdc++.h>
#define PB push_back
using namespace std;

int a[2005];

int main(){
	int n,x,y;
	scanf("%d%d%d",&n,&x,&y);
	for(int i=1;i<=n;i++){
		scanf("%d",&a[i]);
	}
	if(n==1)printf("%d\n",abs(a[1]-y));
	else printf("%d\n",max(abs(a[n]-y),abs(a[n]-a[n-1])));
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main(){
    int N,M,s,c;
    cin >> N >> M;

    vector<int> num = vector<int>(N,-1);
    bool exist = true;

    for (int i = 0; i < M; i++) {
        cin >> s >> c;
        s--;
        if(num.at(s)==-1){
            num.at(s) = c;
        }else if (num.at(s)==c){
        }else{
            exist = false;
        }  
    }
    if(N==1){
        if(num.at(0)==-1){
            num.at(0) = 0;
        }
    }
    if(N!=1){
        if(num.at(0)==-1){
            num.at(0) = 1;
        }else if(num.at(0)==0){
            exist = false;
        }
        for (int i = 1; i < N; i++) {
            if(num.at(i)==-1){
                num.at(i) = 0;
            }
        }
    }
    if(exist){
        for (int i = 0; i < num.size(); i++) {
            cout << num.at(i);
        }
        cout << endl;
    }else{
        cout << -1 << endl;
    }
}

Measured memory_bytes: 256
import java.util.*;

public class Main {

    static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
    static long mod = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int X = sc.nextInt();
        int T = sc.nextInt();

        System.out.println(((N + X -1)/ X) * T);

    }

}




Measured memory_bytes: 35636
#include <bits/stdc++.h>
#define REP(i, n) for(ll i = 0; i < (ll)n; i++)
#define FOR(i, a, b) for(ll i = (a); i < (ll)b; i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF (1ll << 60)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
using vl = vector<ll>;
using vvl = vector<vl>;
typedef double db;
typedef string str;
typedef pair<ll, ll> p;
constexpr int MOD = 1000000007;
using ll = long long;
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

void print(const std::vector<int> &v) {
    std::for_each(v.begin(), v.end(), [](int x) { std::cout << x << " "; });
    std::cout << std::endl;
}

int main() {
    int N, A, B;
    cin >> N >> A >> B;
    vector<int> P(N);
    REP(i, N) { cin >> P[i]; }
    map<int, int> cnt;
    REP(i, N) {
        if(P[i] <= A) {
            cnt[0]++;
        }
        if(A + 1 <= P[i] and P[i] <= B) {
            cnt[1]++;
        }
        if(P[i] >= B + 1) {
            cnt[2]++;
        }
    }
    int ans = 100;
    REP(i, 3) { ans = min(ans, cnt[i]); }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 256
/*
[soundhound2018-summer-qual] B - Acrostic
*/

#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
typedef pair<int, int> pii;
typedef pair<ll, int> pli;

string S;
int W;

string solve() {
    string ret;
    for (int i = 0; i < (int)S.size(); i += W) {
        ret += S[i];
    }
    return ret;
}

int main() {
    cin >> S;
    cin >> W;

    cout << solve() << endl;

    return 0;
}


Measured memory_bytes: 256
#include <cstdio>
#include <cstdint>
#include <vector>
#include <algorithm>
#include <string>
#include <utility>

int main() {
  int N, K;
  scanf("%d %d", &N, &K);

  int res = 0;
  for (int i = 1; i+K-1 <= N; ++i) ++res;
  printf("%d\n", res);
}


Measured memory_bytes: 128
#include <iostream>

int main ()
{
  int n;
  std::cin >> n;
  for (int i = n; i <= 999; i++) {
	if ((i / 100 == (i / 10) % 10) && ((i / 10) % 10 == i % 10)) {
	   std::cout << i << std::endl;
       return 0;
    }
  }
  return 0;
}

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

int main()
{
    ll a,b,c,d,x,val;
    cin>>a>>b>>c>>d;
    val=c/b;
    if(c%b!=0)
    {
        val++;
    }

    val--;

    x=a-val*d;

    if(x<=0)
    {
        cout<<"No";
    }

    else
    {
        cout<<"Yes";
    }
}

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

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

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

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

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

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


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

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

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

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

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

vector<pair<long long, long long> > prime_factorize(long long n) {
    vector<pair<long long, long long> > res;
    for (long long p = 2; p * p <= n; ++p) {
        if (n % p != 0) continue;
        int num = 0;
        while (n % p == 0) { ++num; n /= p; }
        res.push_back(make_pair(p, num));
    }
    if (n != 1) res.push_back(make_pair(n, 1));
    return res;
}


int main() {
    int n1=0,n2=0,n3=0,n4=0;

    REP(i,6){
        int a;
        cin >> a;

        if(a==1) n1++;
        else if(a==2) n2++;
        else if(a==3) n3++;
        else if(a==4) n4++;       
    }

    vector<int> v = {n1,n2,n3,n4};
    sort(all(v));

    YES(v[0]==1 && v[1]==1 && v[2]==2 && v[3]==2)

    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <array>
#include <map>
#include <algorithm>
#include <cmath>
#include <vector>
#include <fstream>
#include <string>
#include <random>
#include <queue>
#include <iomanip>
#include <functional>
#include <climits>
#include <tuple>
#include <unordered_map>
#include <limits>
#include <functional>
#include <cassert>
#include <numeric>
#include <bitset>
#include <set>

#define FOR(x,n) for(int x = 0; x < n; x++)
#define INPUT(x) scanf("%d",&x)
#define PUT(x) printf("%d\n",x)
#define DPUT(x) printf("%.15lf\n",x)
#define GET(x,y) std::get<x>(y)
#define CHMAX(x,y) x = std::max(x,y)
#define CHMIN(x,y) x = std::min(x,y)
#define SP_END (i != n - 1 ? ' ' : '\n') ;

using namespace std;

using ll = long long int;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vll = std::vector<ll>;
using vpll = std::vector<pll>;
using vpii = std::vector<pii>;
using vi = std::vector<int>;
using vvi = std::vector<vi>;
using vvpii = std::vector<vpii>;
using vch = std::vector<char>;
using vvch = std::vector<vch>;
using tiii = std::tuple<int, int, int>;

const ll mod197 = 1000000007LL;
const ll INF = 10000000000LL;

const double PI11 = 3.14159265359;

const int dis[5] = { 0,1,0,-1,0 };

const int disD[4] = { 0,1,1,0 };
const int disLD[3] = { 0,1,0 };

const char disC[4] = { 'U','D','R','L' };
const char disY[4] = { -1,1,0,0 };
const char disX[4] = { 0,0,1,-1 };

ll digit_sum(ll n) {
	ll s = 0;
	while (n != 0) s += n % 10, n /= 10;
	return s;
}

int main(void) {

	int n, k;
	cin >> n >> k;

	cout << (n - 1 + k - 2) / (k - 1) << endl;

	return 0;
}


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

int veloc(int l, int r, int v, int x)
{
    if (x <= l) return v + (l - x);
    else if (x >= r) return v + (x - r);
    return v;
}

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

    int l[n + 2], r[n + 2], v[n + 2];

    l[0] = r[0] = l[1] = 0;
    for (int i = 1; i <= n; i++) {
        cin >> t;
        l[i] = r[i - 1];
        r[i] = l[i] + t * 2;
    }
    l[n + 1] = r[n + 1] = r[n];

    v[0] = 0;
    for (int i = 1; i <= n; i++) { cin >> v[i]; v[i] *= 2; }
    v[n + 1] = 0;

    int pr = 0;
    int ans = 0;
    for (int x = 1; x <= r[n]; x++) {
        int mn = 1e9;
        for (int i = 0; i <= n + 1; i++) {
            mn = min(mn, veloc(l[i], r[i], v[i], x));
        }
        ans += pr + mn;
        pr = mn;
    }
    cout << fixed << setprecision(12) << double(ans) / 8 << endl;
}


Measured memory_bytes: 384
#include <bits/stdc++.h>
#define INF INT_MAX
#define ll  long long
#define ull unsigned long long
#define rep(i,n) for(ll i=0; i<n; ++i)
#define FOR(i, s, e) for(ll i=s; i<e; ++i)
#define MOD 1000000007
using namespace std;
template<class T> inline bool chmin(T& a, T b) { if(a>b) {a=b; return true;} return false;}
template<class T> inline bool chmax(T& a, T b) { if(a<b) {a=b; return true;} return false;}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int A,B,C,D;
  cin>>A>>B>>C>>D;

  int cnt=1;
  while(A>0&&C>0) {
    if(cnt%2) {
      C-=B;
    } else {
      A-=D;
    }
    if(C<=0) cout<<"Yes"<<endl;
    if(A<=0) cout<<"No"<<endl;
    ++cnt;
  }
}

Measured memory_bytes: 3612
import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
# input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplt(n): return [tuple(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

k = inp()
ans = 'ACL' * k
print(ans)


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

int main() {
    int a, b, c;
    cin >> a >> b >> c;
    if (a < b) swap(a, b);
    if (b < c) swap(b, c);
    if (a < b) swap(a, b);
    cout << abs(a-b) + abs(b-c) << endl;
}

Measured memory_bytes: 256
use std::collections::HashMap;
use std::io::*;
use std::str::FromStr;

//https://qiita.com/tubo28/items/e6076e9040da57368845
fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let mut ans = false;
    let n: usize = read();
    let mut map_a = HashMap::new();
    for _ in 0..n {
        let count = map_a.entry(read::<usize>()).or_insert(0);
        *count += 1;
    }

    if map_a.len() == 1 {
        if let Some(_x) = map_a.get(&0) {
            ans = true;
        }
    } else if map_a.len() == 2 {
        let mut values: Vec<usize> = map_a.values().map(|i| *i).collect();
        values.sort();
        if values[0] == n / 3 && values[1] == (n / 3) * 2 {
            ans = true;
        }
    } else if map_a.len() == 3 {
        let values: Vec<usize> = map_a.values().map(|i| *i).collect();
        let keys: Vec<usize> = map_a.keys().map(|i| *i).collect();
        if values[0] == n / 3 && values[1] == n / 3 && values[2] == n / 3 {
            if keys[0] ^ keys[1] ^ keys[2] == 0 {
                ans = true;
            }
        }
    }

    println!("{}", if ans { "Yes" } else { "No" });
}


Measured memory_bytes: 5340