akhauriyash/Code-Regression huggingface dataset:
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <queue>

using namespace std;

struct edge
{
    int v,w,nxt;
}e[400050];

int head[100050],ecnt;

void adde(int u,int v,int w)
{
    e[++ecnt].v = v;
    e[ecnt].w = w;
    e[ecnt].nxt = head[u];
    head[u] = ecnt;
}

int N,M;
int l[200050],r[200050];
int d[200050];
long long dist[100005];
queue<int> que;
bool vis[100050],inq[100050];

bool spfa(int st)
{
    que.push(st);
    inq[st] = true;
    dist[st] = 0;
    long long curmax = 0,curmin = 0;
    while(!que.empty())
    {
        int u = que.front();
        que.pop();
        for(int i = head[u];i;i = e[i].nxt)
        {
            int v = e[i].v;
            if(dist[v] == 12345678987654321)
            {
                dist[v] = dist[u] + e[i].w;
                curmax = max(curmax,dist[v]);
                curmin = min(curmin,dist[v]);
                if(curmax - curmin > 1000000000)
                    return false;
                vis[v] = 1;
                if(!inq[v])
                    que.push(v);
            }
            else if(dist[v] != dist[u] + e[i].w)
                return false;
        }
        inq[u] = false;
    }
    return true;
}

int main()
{
    for(int i = 1;i <= 100000; ++ i)
        dist[i] = 12345678987654321;
    scanf("%d%d",&N,&M);
    for(int i = 1;i <= M; ++ i)
    {
        scanf("%d%d%d",&l[i],&r[i],&d[i]);
        adde(l[i],r[i],d[i]);
        adde(r[i],l[i],-d[i]);
    }
    for(int i = 1;i <= N; ++ i)
    {
        if(!vis[i])
        {
            vis[i] = 1;bool l = spfa(i);
            if(!l)
            {
                printf("No\n");
                return 0;
            }
        }
    }
    printf("Yes\n");
    return 0;
}



Measured memory_bytes: 9088
#include <bits/stdc++.h>
using namespace std;
const int N = 102, M = 1000000007;

int n;

int dp[N][4][4][4];

bool stg(string s)
{
    int n = s.size();
    for (int i = 0; i < n - 1; ++i)
    {
        swap(s[i], s[i + 1]);
        for (int j = 0; j <= n - 3; ++j)
        {
            if (s[j] == '0' && s[j + 1] == '1' && s[j + 2] == '2')
                return false;
        }
        swap(s[i], s[i + 1]);
    }
    for (int j = 0; j <= n - 3; ++j)
    {
        if (s[j] == '0' && s[j + 1] == '1' && s[j + 2] == '2')
            return false;
    }
    return true;
}

int main()
{
    cin >> n;
    for (int j = 0; j < 4; ++j)
    {
        for (int k = 0; k < 4; ++k)
        {
            for (int t = 0; t < 4; ++t)
            {
                string s;
                s += (j + '0');
                s += (k + '0');
                s += (t + '0');
                if (stg(s))
                    dp[3][j][k][t] = 1;
            }
        }
    }
    for (int i = 3; i < n; ++i)
    {
        for (int j = 0; j < 4; ++j)
        {
            for (int k = 0; k < 4; ++k)
            {
                for (int t = 0; t < 4; ++t)
                {
                    for (int f = 0; f < 4; ++f)
                    {
                        string s;
                        s += (j + '0');
                        s += (k + '0');
                        s += (t + '0');
                        s += (f + '0');
                        if (stg(s))
                            dp[i + 1][k][t][f] = (dp[i + 1][k][t][f] + dp[i][j][k][t]) % M;
                    }
                }
            }
        }
    }
    int ans = 0;
    for (int j = 0; j < 4; ++j)
        for (int k = 0; k < 4; ++k)
            for (int t = 0; t < 4; ++t)
                ans = (ans + dp[n][j][k][t]) % M;
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
#pragma GCC diagnostic error "-Wconversion"
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define all(vec) vec.begin(), vec.end()
#define mp(a, b) make_pair(a, b)
typedef long long ll;
const ll INF = 1LL << 60;
const ll MOD = (1e9 + 7);
using namespace std;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
ll dp[100010];
ll gcd(ll x, ll y){
  return y == 0 ? x : gcd(y, x % y);
}
ll lcg(ll x, ll y){
  return x * y / gcd(x, y);
}
ll digits(ll x){
  ll length = 0;
  while (x > 0){
    x /= 10;
    length++;
  }
  return length;
  if (x == 0) return 0;
}
map<ll, ll> factor(ll n){
  map<ll, ll> ans;
  ll a = 2;
  while (n >= a * a){
    if (n % a == 0){
      ans[a]++;
      n /= a;
    }
    else a++;
  }
  ans[n]++;
  return ans;
}
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(){
  cout << fixed << setprecision(15);

  ll a, b, k; cin >> a >> b >> k;

  ll ans = 0;
  //string ans;

  if (a >= k) a -= k;
  else {
    k -= a;
    a = 0;
    b -= k;
    if (b < 0) b = 0;
  }  
  cout << a << endl << b << endl;
  //cout << ans << endl;
   
  return 0;
}

Measured memory_bytes: 256
// Solution to https://atcoder.jp/contests/dp/tasks/dp_p
#include <algorithm>
#include <cassert>
#include <iostream>
#include <vector>
using namespace std;

const int MOD = 1e9 + 7;

struct result {
    long long black = 1, white = 1;

    long long either() const {
        return (black + white) % MOD;
    }
};

int N;
vector<vector<int>> adj;

// Warning: this setup is only recommended when the `result` struct is O(1) space.
// Otherwise there is too much copying of `result` structs. In that case, use arrays_template.cc.
result extend(result root) {
    return root;
}

result attach(result root, result child) {
    result answer;
    answer.black = root.black * child.white % MOD;
    answer.white = root.white * child.either() % MOD;
    return answer;
}

result dfs(int node, int parent) {
    result answer;

    for (int neighbor : adj[node])
        if (neighbor != parent) {
            result child = dfs(neighbor, node);
            answer = attach(answer, extend(child));
        }

    return answer;
}

int main() {
    scanf("%d", &N);
    adj.assign(N, {});

    for (int i = 0; i < N - 1; i++) {
        int u, v;
        scanf("%d %d", &u, &v);
        u--; v--;
        adj[u].push_back(v);
        adj[v].push_back(u);
    }

    printf("%lld\n", dfs(0, -1).either());
}


Measured memory_bytes: 12672
#include <iostream>
#include <cmath>
#include <cstdio>
#include <string>
#include <cstring>
#include <memory>
#include <cstdlib>
#include <vector>
#include <stack>
#include <algorithm>
using namespace std;

stack<int> idx;
stack<pair<int, int> > tmp_water;
vector<int> ans;

int main(){
    //freopen("/Users/mac/Desktop/C++?¨????/test/test.txt", "r", stdin);
    string a;
    cin>>a;
    int all_sum=0;
    for (int i=0; i<(int)a.length(); i++) {
        if (a[i]=='\\') {
            idx.push(i);
        }
        if (a[i]=='/') {
            if (!idx.empty()) {
                int last=idx.top();
                idx.pop();
                all_sum+=i-last;
                int tmp_sum=0;
                while (tmp_water.size()&&tmp_water.top().first>last) {
                    tmp_sum+=tmp_water.top().second;
                    tmp_water.pop();
                }
                tmp_sum+=i-last;
                tmp_water.push(make_pair(last, tmp_sum));
                
            }
        }
    }
    cout<<all_sum<<endl;
    cout<<tmp_water.size();
    for (; tmp_water.size(); ) {
        ans.push_back(tmp_water.top().second);
        tmp_water.pop();
    }
    reverse(ans.begin(), ans.end());
    for (int i=0; i<ans.size(); i++) {
        cout<<' '<<ans[i];
    }
    cout<<endl;
    return 0;
}

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

#define IOS ios_base::sync_with_stdio(false); cin.tie(NULL);
#define ll long long
#define vi vector< int > 
#define pii pair< int, int >
#define mii map< int , int > 
#define F(start,stop) for(int i=start; i<stop; i++)
#define FRev(start,stop) for(int i=start; i>=stop; i--)
#define MOD1 1000000007
#define MOD2 998244353ac

int main()
{

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

	IOS

	
	int n,k;
	cin >> n >> k;
	int arr[n];

	F(0,n) cin >> arr[i];
	sort(arr, arr + n);


	int sum = 0;
	F(0, k) sum += arr[i];

	cout << sum << endl;
}

Measured memory_bytes: 3672
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int mod=1e9+7;
const int N=81;
int n,m;
int a[N][N],b[N][N];
int dp[N][N][20000];

bool ch(int x,int y){
	if(x<=n&&x>=1&&y<=m&&y>=1)return true;
	return false;
}
int sol(int x,int y,int cur){
	int tmp=abs(a[x][y]-b[x][y]);
	if(x==n&&y==m){
		return min(cur+tmp,abs(cur-tmp));
	}
	if(dp[x][y][cur]!=-1){
		return dp[x][y][cur];
	}
	int res=1e9;
	if(ch(x+1,y)){
		res=min(res,min(sol(x+1,y,cur+tmp),sol(x+1,y,abs(cur-tmp))));
	}
	if(ch(x,y+1)){
		res=min(res,min(sol(x,y+1,cur+tmp),sol(x,y+1,abs(cur-tmp))));	
	}
	return dp[x][y][cur]=res;
}
int main(){
	ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
	cin>>n>>m;
	memset(dp,-1,sizeof dp);
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
			cin>>a[i][j];
		}
	}
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
			cin>>b[i][j];
		}
	}
	sol(1,1,0);
	cout<<dp[1][1][0]<<endl;
	return 0;
}

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

#define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define pb push_back
#define ss second
#define ff first
#define sz(s) (int)s.size()
#define all(a) a.begin(),a.end()

#ifndef ONLINE_JUDGE
#define trace(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}

#else
#define trace(args...) { }
#endif

typedef long double ld;
typedef long long ll;
typedef pair<int,int> pii;

const int MAX_N = 1e5 + 10;
pii edge[MAX_N];
ll parent[MAX_N], size[MAX_N], n, m;

void make_set(int v) {
    parent[v] = v;
    size[v] = 1;
}

int find_set(int v) {
    return v == parent[v] ? v : (parent[v] = find_set(parent[v]));
}


void union_sets(int a, int b) {
    a = find_set(a);
    b = find_set(b);
    if (a != b) {
        if (size[a] < size[b])  
            swap(a, b);
        parent[b] = a;
        size[a] += size[b];
    }
}

int main()
{
  IOS;
  cin >> n >> m;
  for(int i = 1; i <= n; i++){
    make_set(i);
  }
  for(int i = 1; i <= m; i++){
    cin >> edge[i].ff >> edge[i].ss;
  }
  ll prev = (n * (n - 1)) / 2;
  vector<ll> ans(m + 1);
  ans[m] = prev;
  for(int i = m; i >= 1; i--){
    int u = edge[i].ff, v = edge[i].ss;
    if(find_set(u) == find_set(v)){
      ans[i - 1] = max(0LL, prev);
      continue;
    }
    prev -= (size[find_set(u)] * size[find_set(v)]);
    ans[i - 1] = max(0LL, prev);
    union_sets(u, v);
  }
  for(int i = 1; i <= m; i++)
    cout << ans[i] << '\n';
  return 0;
}

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

int main() {
    int H, W, M;
    cin >> H >> W >> M;
    set<pair<int, int>> targets;
    vector<int> hSum(H), wSum(W);
    for(int i = 0; i < M; i++) {
        int x, y;
        cin >> x >> y;
        targets.insert({x - 1, y - 1});
        hSum[x - 1]++;
        wSum[y - 1]++;
    }

    int maxWVal = 0, maxHVal = 0;
    vector<int> maxWs, maxHs;

    for(int i = 0; i < H; i++) {
        if(hSum[i] > maxHVal) {
            maxHs.clear();
            maxHs.push_back(i);
            maxHVal = hSum[i];
        } else if(hSum[i] == maxHVal) {
            maxHs.push_back(i);
        }
    }
    for(int j = 0; j < W; j++) {
        if(wSum[j] > maxWVal) {
            maxWs.clear();
            maxWs.push_back(j);
            maxWVal = wSum[j];
        } else if(wSum[j] == maxWVal) {
            maxWs.push_back(j);
        }
    }

    int ans = maxWVal + maxHVal - 1;
    bool ok = false;
    for(int w : maxWs) {
        for(int h : maxHs) {
            if(targets.find({h, w}) == targets.end()) {
                ans += 1;
                ok = true;
                break;
            }
        }
        if(ok) break;
    }
    cout << ans << endl;
}

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

#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define mp              make_pair
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define MX              200005
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         fixed<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define ull unsigned long long
#define ll long long


void add(int &a,int b){
    a+=b;
    if(a>=mod)
        a-=mod;
}

int32_t main()
{
   // sbs();
    // int t;cin>>t;
    // while(t--) {
        
    //     cout<<'\n';
    // }
    int h,w;cin>>h>>w;
    std::vector<std::vector<char>> a(h,std::vector<char> (w));
    for(int i=0;i<h;i++){
        for(int j=0;j<w;j++){
            cin>>a[i][j];
        }
    }
    std::vector<vi> dp(h,vi(w,0));
    int l=0;
    while(l<w && a[0][l]=='.'){
        dp[0][l]=1;l++;
    }l=0;
    while(l<h && a[l][0]=='.'){
        dp[l][0]=1;l++;
    }
    for(int i=1;i<h;i++){
        for(int j=1;j<w;j++){
            if(a[i][j]=='.'){
                if(dp[i-1][j]==0 && dp[i][j-1]==0)continue;
                if(dp[i-1][j] && dp[i][j-1]){
                    int k=0;
                    add(k,dp[i][j-1]);add(k,dp[i-1][j]);
                    add(dp[i][j],k);
                }else {
                    dp[i][j]=max(dp[i][j-1],dp[i-1][j]);
                }
            }
        }
    }
    cout<<dp[h-1][w-1]<<endl;
    return 0;
}

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

typedef long double ld;									// XD
#define int long long
#define PB push_back
#define all(x) (x).begin(),(x).end()
#define ii pair <int,int>
#define mii map <int,int>
#define vi vector<int>
#define vii vector< ii >
#define F first
#define S second
#define rep(i,a,b)  for(int i=a;i<b;i++)
#define rep1(i,a,b) for(int i=a;i<=b;i++)
#define repd(i,a,b) for(int i=a; i>=b; --i)
#define sz(x) (int)((x).size())
#define mem(a,x) memset(a,x,sizeof(a))
const long double PI=3.141592653589793238462643383279502884197169399375105820974944;
inline void io(){
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}

const int mod = 1e9 + 7;
const int inf = 3e16;
const int maxn = 1e5+5;

void solve(){
	int n; cin>>n;
	int sf[n+5] = {}, a[n];
	rep(i, 0, n) cin>>a[i];
	repd(i, n-1, 0){
		sf[i] = a[i] + sf[i+1];
		sf[i] = sf[i]%mod;
	}
	int ans = 0;
	rep(i, 0, n){
		ans = (ans + ((sf[i]-a[i]+mod)%mod)*(a[i]%mod))%mod;
	}
	cout<<ans;
}
signed main()
{
    ios_base::sync_with_stdio(false);cin.tie(0); //io();
    //cout<<setprecision(12);
    int tc=1;// cin>>tc;
    while(tc--){
        solve();cout<<'\n';
    }
    return 0;
}


Measured memory_bytes: 6772
#include <iostream>
#include <cstring>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
	int p[801][801],n,N,d;
	while(cin >> N && N){
		rep(i,801)rep(j,801) p[i][j]=-1;
		p[400][400]=0;
		for(int k=1;k<N;k++){
			cin >> n >> d;
			rep(i,801)rep(j,801)
				if(p[i][j] == n){
					if(d==0)p[i][j-1]=k;
					if(d==1)p[i+1][j]=k;
					if(d==2)p[i][j+1]=k;
					if(d==3)p[i-1][j]=k;
				}
		}
		int fx=801,fy=801,lx=0,ly=0;
		rep(i,801){
			rep(j,801){
				if(~p[i][j]){
					lx = max(j,lx);
					fx = min(j,fx);
					ly = max(i,ly);
					fy = min(i,fy);
				}
			}
		}
		cout << lx-fx+1 << " "<< ly-fy+1 << endl;
	}
}

Measured memory_bytes: 3372
let area =
  [| [1; 3]; [0; 2; 4]; [1; 5]
   ; [0; 4; 6]; [1; 3; 5; 7]; [2; 4; 8]
   ; [3; 7]; [4; 6; 8]; [5; 7] |]

let m_d =
  [| [|0; 0; 0; 0; 0; 0; 0; 0; 0|]
   ; [|0; 1; 2; 1; 2; 3; 2; 3; 4|]
   ; [|1; 0; 1; 2; 1; 2; 3; 2; 3|]
   ; [|2; 1; 0; 3; 2; 1; 4; 3; 2|]
   ; [|1; 2; 3; 0; 1; 2; 1; 2; 3|]
   ; [|2; 1; 2; 1; 0; 1; 2; 1; 2|]
   ; [|3; 2; 1; 2; 1; 0; 3; 2; 1|]
   ; [|2; 3; 4; 1; 2; 3; 0; 1; 2|]
   ; [|3; 2; 3; 2; 1; 2; 1; 0; 1|] |]

let idastar a limit space_i lower goal =
  let moved = [-1] in
  let rec doit i space_i moved lower =
    if i = limit then begin
      if a = goal then begin
        List.length moved - 1 |> Printf.printf "%d\n"; exit 0
      end;
    end else
      List.iter (fun j ->
        let x = a.(j) in
        if x = List.hd moved then () else
        let lower = lower - m_d.(x).(j) + m_d.(x).(space_i) in
        if lower + i > limit then ()
        else begin
          a.(j) <- 0;
          a.(space_i) <- x;
          doit (i + 1) j (x :: moved) lower;
          a.(j) <- x;
          a.(space_i) <- 0;
        end) area.(space_i) in
  doit 0 space_i moved lower

let () =
  let a = Array.init 9 (fun _ -> Scanf.scanf "%d " (fun i -> i)) in
  let rec f i =
    if i = 9 then assert false
    else if a.(i) = 0 then i
    else f (i + 1) in
  let space_i = f 0 in
  let goal = [|1; 2; 3; 4; 5; 6; 7; 8; 0|] in
  let rec g i acc =
    if i = 9 then acc
    else g (i + 1) (acc + m_d.(a.(i)).(i)) in
  let lower = g 0 0 in
  for limit = lower to 31 do
    idastar a limit space_i lower goal;
  done

Measured memory_bytes: 4388
#include <stdio.h>
#include <iostream>
#include <vector>
#include <tuple>
#include <queue>
using namespace std;

#define NUM 10000
#define NIL -1
#define INF 1000000000
#define WHITE 0
#define BLACK 1
int node_num;
vector<tuple<int, int>> G[NUM];
priority_queue<tuple<int, int>> PQ;
int V[NUM];
int color[NUM];

void init(void){
    scanf("%d", &node_num);

    for(int i = 0; i < node_num; i++){
        int u, k;
        scanf("%d", &u);
        scanf("%d", &k);

        for(int j = 0; j < k; j++){
            int v_, c;
            scanf("%d", &v_);
            scanf("%d", &c);
            G[u].push_back(make_tuple(v_, c));
        }
    }

    for(int i = 0; i < node_num; i++){
        color[i] = WHITE;
        V[i] = INF;
    }
}

void updateAround(int n){
    color[n] = BLACK;
    for(int i = 0; i < G[n].size(); i++){
        int old_dist = V[get<0>(G[n][i])];
        int new_dist = V[n] + get<1>(G[n][i]);
        if (new_dist < old_dist){
            V[get<0>(G[n][i])] = new_dist;
            PQ.push(make_tuple(-new_dist, get<0>(G[n][i])));
        }
    }

    int min_index = NIL;
    int min_value = INF;
    while(!PQ.empty()){
        tuple<int, int> f = PQ.top(); PQ.pop();
        if(color[get<1>(f)] == BLACK){
            continue;
        }
        min_value = -get<0>(f);
        min_index = get<1>(f);
        break;
    }

    if(min_index != NIL){
        updateAround(min_index);
    }
}

int main(void){
    init();

    V[0] = 0;
    updateAround(0);

    for(int i = 0; i < node_num; i++){
        printf("%d %d\n", i, V[i]);
    }
}





Measured memory_bytes: 8124
#include <algorithm>
#include <chrono>
#include <cstring>
#include <iomanip>
#include <istream>
#include <map>
#include <numeric>
#include <ostream>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>


using namespace std;


int primes[25] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53,
                  59, 61, 67, 71, 73, 79, 83, 89, 97};

class Solution {
  int ar[25];
  int dp[25][76];
  int rek(int cur, int f) {
    if (f > 75 || cur == 25)
      return f == 75;
    if (dp[cur][f] == -1) {
      int rez = 0;
      for (int ctr1 = 0; ctr1 <= ar[cur]; ++ctr1)
        rez += rek(cur + 1, f * (ctr1 + 1));
      dp[cur][f] = rez;
    }
    return dp[cur][f];
  }
 public:
  void solve(std::istream& in, std::ostream& out) {
    memset(ar, 0, sizeof(ar));
    memset(dp, -1, sizeof(dp));
    int n;
    in >> n;
    for (int ctr1 = 0; ctr1 < 25; ++ctr1)
      for (int ctr2 = primes[ctr1]; ctr2 <= n; ctr2 *= primes[ctr1])
        ar[ctr1] += n / ctr2;
    out << rek(0, 1);
  }
};

void solve(std::istream& in, std::ostream& out)
{
  out << std::setprecision(12);
  Solution solution;
  solution.solve(in, out);
}
// Powered by caide (code generator, tester, and library code inliner)


#include <fstream>
#include <iostream>


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


  istream& in = cin;


  ostream& out = cout;

  solve(in, out);
  return 0;
}



Measured memory_bytes: 384
#include<iostream>
#include<cstdio>
#include<cstring>

const int N=105,M=N*N*10;

int begin[N*2],next[M],to[M];
int n,e;

int pat[N*2];
bool vis[N*2],sel[N*2];

bool dfs(int p)
{
	if(vis[p])return 0;
	vis[p]=1;

	for(int i=begin[p],q;i;i=next[i])
	{
		if(vis[q=to[i]])continue;
		if(!sel[q])
		{
			pat[p]=q,pat[q]=p,sel[p]=sel[q]=1;
			return 1;
		}

		if(dfs(pat[q]))
		{
			pat[p]=q,pat[q]=p,sel[p]=sel[q]=1;
			return 1;
		}
	}
	return 0;
}

int solve()
{
	int ret=0;
	for(int i=1;i<=n*2;i++)
		if(!sel[i])
		{
			memset(vis,0,sizeof(vis));
			dfs(i);
		}

	for(int i=1;i<=n*2;i++)
		ret+=sel[i];
	return ret/2;
}

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

void add(int x,int y,bool k=1)
{
	to[++e]=y;
	next[e]=begin[x];
	begin[x]=e;
	if(k)add(y,x,0);
}

#define id(x,k) ((x)+(k)*n)

int main()
{
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
		scanf("%d%d",a+i,b+i);
	for(int i=1;i<=n;i++)
		scanf("%d%d",c+i,d+i);

	for(int i=1;i<=n;i++)
		for(int j=1;j<=n;j++)
			if(a[i]<c[j] && b[i]<d[j])
				add(id(i,0),id(j,1));

	printf("%d\n",solve());

	return 0;
}


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

namespace ITP1_5
{
    class Program
    {
        static void Main(string[] args)
        {
            while (true)
            {
                string[] strArray = Console.ReadLine().Split(' ');
                int height = int.Parse(strArray[0]);
                int width = int.Parse(strArray[1]);

                if (height == 0 && width == 0)
                {
                    break;
                }

                for (int i = 0; i < height; ++i)
                {
                    // ??????????????????????±???????
                    char c;
                    if (i == 0 || i == (height-1)) 
                    {
                        c = '#';
                    }
                    else {
                        c = '.';
                    }

                    // 1?????????
                    Console.Write('#');
                    for (int h = 1; h < width-1; ++h)
                    {
                        Console.Write(c);
                    }
                    Console.Write('#');
                    Console.WriteLine();
                }

                Console.WriteLine();
            }
        }
    }
}

Measured memory_bytes: 5296
#include <bits/stdc++.h>
#define int   long long
#define vi   vector<int>
#define pii  pair<int,int>
#define pss  pair<string,string>
#define psi  pair<string,int>
#define vpii  vector<pair<int,int> >
#define vpss  vector<pair<string,string> >
#define vpsi  vector<pair<string,int> >
#define pb   push_back
#define mp   make_pair
#define ff   first
#define ss   second
#define fast  ios::sync_with_stdio(false); cin.tie(NULL);
#define f(i,a,b)  for(int i=a;i<=b;i++)
#define rf(i,a,b)  for(int i=a;i>=b;i--)
#define out(v,n)   f(i,0,n-1)cout<<v[i]<<" ";cout<<endl;
#define in(v,n)   f(i,0,n-1)cin>>v[i];
#define endl  "\n"
using namespace std;
signed main()
{
    fast
    int n; cin>>n;
    string x;
    cin>>x;
    int c=0;;
    f(i,0,n-3)
    {
        if(x[i]=='A' && x[i+1]=='B' && x[i+2]=='C') c++;
    }
    cout<<c;
}


Measured memory_bytes: 256
#include <iostream>
#include <climits>


const int inf = INT_MAX / 3;
const int max_v = 15;

int d[max_v][max_v];
int dp[(1 << max_v)][max_v];  // S?????¢????????£????????????????????????v??????????????´???


using namespace std;

int main() {
	int V, E;
	cin >> V >> E;

	for (int i = 0; i < V; i++) {
		for (int j = 0; j < V; j++) {
			d[i][j] = (i == j) ? 0 : inf;

		}
	}

	for (int i = 0; i < E; i++) {
		int ts,tt , td;
		cin >> ts >> tt >> td;
		d[ts][tt] = td;
	}

	for (int s = (1 << V) - 1; s >= 0; s--) {
		for (int v = 0; v < V; v++) {
			dp[s][v] = inf;
		}
	}

	dp[(1 << V) - 1][0] = 0;

	for (int s = (1 << V) - 1; s >= 0; s--) {
		for (int v = 0; v < V; v++) {
			for (int u = 0; u < V;u++) {
				//cout << "s:" << s << " v:" << v << " u:" << u << endl;
				if (!((s >> u) & 1)) {
					dp[s][v] = min(dp[s][v], dp[s | 1 << u][u] + d[u][v]);
				//	cout << " dp:" << dp[s][v] << endl;

				}
			}
		}
	}

	if (dp[0][0] >= inf) {
		cout << -1 << endl;
	} else {
		cout << dp[0][0] << endl;
	}
	return 0;
}

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

int main() {
  int people = 0, n, l, r;
  
  cin >> n;
  
  for (int i = 0; i < n; i++) {
    cin >> l >> r;
    people += r - l + 1;
  }
  
  cout << people << endl;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string s;
  int count=0;
  cin >> s;

  if(s[0]=='1') count++;
  if(s[1]=='1') count++;
  if(s[2]=='1') count++;

  cout << count << endl;
      	
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define int long long
using namespace std; 
queue<int> q;
int a,n,k,cnt;
signed main()
{
	scanf("%lld",&n);
	for(int i=1;i<=9;i++)
		q.push(i);
	n--;
	while(n--)
	{
		int f=q.front();
		q.pop();
		a=f%10;
		if(a!=0)
			q.push(f*10+a-1);
		q.push(f*10+a);
		if(a!=9)
			q.push(f*10+a+1);
	}
	printf("%lld",q.front());
	return 0;
}

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

// コンテスト中のみ
#define int long long

#define ll long long
#define rep(i,n) for(int i = 0; i < (n); i++)
#define P pair<ll,ll>
int MOD = 1000000007;
const ll INF = 1LL << 60;


signed main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int n; cin >> n;
	int ac = 0, wa = 0, tle = 0, re = 0;
	rep(i, n) {
		string s; cin >> s;
		if (s == "AC")ac++;
		else if (s == "WA")wa++;
		else if (s == "TLE")tle++;
		else re++;
	}
	cout << "AC x" << " " << ac << '\n';
	cout << "WA x" << " " << wa << '\n';
	cout << "TLE x" << " " << tle << '\n';
	cout << "RE x" << " " << re << '\n';

	return 0;
}

Measured memory_bytes: 3632
package main

import "fmt"

func main(){
	var X int64;
	var in int64 ;

	in = 100;

	fmt.Scan(&X);
	var i int64;
	i = 0;
	for i = 1 ; i < 10000 ; i++{
		in = int64(float64(in) * 1.01);

		if in >= X {
			break;
		}
	}
	
	fmt.Println(i);
}

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

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

	ll n,m;
	cin >> n >> m;
	ll a=(n*(n-1))/2;
	ll b=(m*(m-1))/2;
	cout << a+b << endl;

	return 0;
}

Measured memory_bytes: 256
#include<stdio.h>

int main(){
  char a;
  scanf("%c",&a);
  if(a=='A'){
    printf("T");
  }else if(a=='C'){
    printf("G");
  }else if(a=='T'){
    printf("A");
  }else{
    printf("C");
  }
  return 0;
}


Measured memory_bytes: 128
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long K = in.nextLong();
        long current = 100;
        int res = 0;
        while (current < K) {
            current = (long)(current * 1.01);
            res++;
        }
        System.out.println(res);
    }
}

Measured memory_bytes: 35776
#include <bits/stdc++.h>
using namespace std;
typedef long long  ll;
const ll MAX = 2000001;
const ll MOD = 1000000007;

long long fac[MAX], finv[MAX], inv[MAX];
long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}
// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

// 二項係数計算
long long COM(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

int main(){
    COMinit();
    ll k;
    string s;
    cin>>k>>s;
    ll L = s.length();
    ll ans =0;
    for(ll i = L; i<= k+L; i++){
        ans +=( (modpow(25,i-L,MOD)* COM(i-1,L-1) %MOD)* modpow(26,L+k-i,MOD) )%MOD;
        ans %= MOD;
    }
    cout<<ans<<endl;
//    cout << fixed << setprcision(10);
}

Measured memory_bytes: 52144
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;

int main()
{
    int n,r;
    cin>>n>>r;
    if(n>=10) cout<<r<<endl;
    else cout<<r+(10-n)*100<<endl;
    return 0;
}


Measured memory_bytes: 256
import sys
from collections import defaultdict

N, M = map(int, input().split())
d = defaultdict(int)

for i in range(M):
    s, c = map(int, input().split())

    # 数指定に矛盾があったら終わり
    if (d[s] != 0) & (d[s] != c):
        print(-1)
        sys.exit()

    # 桁数に矛盾があったら終わり
    elif ((s == 1) & (c == 0)) & (N > 1):
        print(-1)
        sys.exit()

    # 初めて出会ったものはメモしていく
    elif d[s] == 0:
        d[s] = c
    else:
        continue

# 1桁ならそのまま出す
if N==1:
    print(d[1])
    sys.exit()

# 2桁以上の場合は最も大きい桁を1、それ未満の桁を0で初期化
ans = ["1"] + ["0"] * (N - 1)

# 値更新
for s, c in d.items():
    ans[int(s) - 1] = str(c)

print("".join(ans))

Measured memory_bytes: 3316
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <queue>
#include <climits>
#include <utility>
typedef long long ll;
using namespace std;

int main(void){
  ll a, b, c;
  string B;

  cin >> a >> B;

  b = ll(stoi(B.substr(0,B.size()-3)));
  c = ll(stoi(B.substr(B.size()-2,2)));

  ll ans = a * b + ((a*c)/100);

  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 3636
#include<stdio.h>

int main()

{
    
	int h,m,s,S;
    
   
	scanf("%d",&S);
    
 
	h=S/3600;
    
	m=S%3600/60;
    
	s=S%3600%60;
	   
   
	printf("%d:%d:%d\n",h,m,s);
    
    

	return 0;

}


Measured memory_bytes: 2124
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <iomanip>
#include <cassert>
#include <random>
#include <tuple>

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

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


int main() {
    int n;
    ll k;
    cin >> n >> k;

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

    sort(a.begin(), a.end());
    sort(f.rbegin(), f.rend());

    ll cnt = 0;
    ll r = 1e12 + 1;
    ll l = -1;
    ll mid = (r + l) / 2;
    ll num = 0;
    while (r - l > 1) {
        mid = (r + l) / 2;
        cnt = 0;

        rep(i, n) {
            if (mid >= f[i] * a[i]) continue;
            if (mid < f[i]) num = 0;
            else num = mid / f[i];

            cnt += a[i] - num;
        }

        if (cnt <= k) r = mid;
        else l = mid;
    }

    cout << r << endl;

}


Measured memory_bytes: 3456
//Daniel Grzegorzewski
#include <bits/stdc++.h>

#define MP make_pair
#define PB push_back
#define ST first
#define ND second
#define int long long

using namespace std;

typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<PII> VII;
typedef long long LL;

void init_ios()
{
     ios_base::sync_with_stdio(0);
     cin.tie(0);
}

const int N = 2010;

int n, x, a[N], mn[N], res = 1e18;

signed main()
{
    init_ios();
    cin >> n >> x;
    for (int i = 0; i < n; ++i) {
    	cin >> a[i];
    	mn[i] = a[i];
    }
    for (int i = 0; i < n; ++i) {
    	int tmp = 0;
    	for (int j = 0; j < n; ++j)
    		tmp += mn[j];
    	res = min(res, tmp+i*x);
    	for (int j = 0; j < n; ++j) {
    		if (j > i)
    			mn[j] = min(mn[j], a[j-i-1]);
    		else
    			mn[j] = min(mn[j], a[n+j-i-1]);
    	}
    }
    cout<<res<<"\n";
}

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

typedef long long ll;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define ALL(a) (a).begin(), (a).end()
using namespace std;

ll N, C;
ll x[100001], rx[100001];
ll sum[100001], rsum[100001];
ll v[100001], section_max[100001];

int main() {
    cin >> N >> C;
    REP(i, N) cin >> x[i + 1] >> v[i + 1];
    REP(i, N) {
        rx[i + 1] = C - x[N - i];
        sum[i + 1] = sum[i] + v[i + 1];
        rsum[i + 1] = rsum[i] + v[N - i];
    }

    ll ans = 0;
    REP(i, N) section_max[i + 1] = max(section_max[i], sum[i + 1] - x[i + 1] * 2);
    REP(i, N + 1) ans = max(ans, section_max[N - i] + rsum[i] - rx[i]);

    section_max[0] = 0;
    REP(i, N) section_max[i + 1] = max(section_max[i], rsum[i + 1] - rx[i + 1] * 2);
    REP(i, N + 1) ans = max(ans, section_max[N - i] + sum[i] - x[i]);

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

Measured memory_bytes: 4992
#include <stdio.h>

int main(){
 int A, B, C;
 scanf("%d %d %d", &A, &B, &C);
 if(A==B && A==C && B==C){
  printf("No");
 }else if(A==B || A==C || B==C){
  printf("Yes");
 }else{
  printf("No");
 }
 return 0;
}

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

int main() {
  int N;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    if (A[i] == 0) {
      cout << 0 << endl;
      return 0;
    }
  }
  ll ans = 1;
  for (int i = 0; i < N; i++) {
    if ((1000000000000000001+ans-1)/ans <= A[i]) {
      ans = -1;
      break;
    }
    ans *= A[i];
  }
  cout << ans << endl;
}


Measured memory_bytes: 4052
#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <string>
#include <tuple>

using namespace std;

#define fastInp cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);

typedef long long ll;
typedef long double ld;

const ll SZ = 1e5 + 10, INF = 1e9 * 1e8 + 10;
ll n;
vector<vector<pair<ll, ll>>> tree;
ll dist[300][300], d[SZ];
bool used[SZ];
ll sAll = 0;

void input() {
	cin >> n;

	tree.resize(n);
	for (int i = 0; i < n - 1; i++) {
		ll u, v, c;
		cin >> u >> v >> c;
		sAll += c;
		u--; v--;
		tree[u].push_back({ v, c });
		tree[v].push_back({ u, c });
	}
}

void dfs(int v) {
	used[v] = 1;

	for (auto to : tree[v]) {
		if (!used[to.first]) {
			d[to.first] = d[v] + to.second;
			dfs(to.first);
		}
	}
}

void construct() {
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			dist[i][j] = INF;
		}
	}
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			used[j] = 0;
			d[j] = 0;
		}
		dfs(i);
		for (int j = 0; j < n; j++) {
			dist[i][j] = d[j];
		}
	}
}

ll ans = 0, sub[SZ], ans2 = 0, sm[SZ], psh[SZ], vl[SZ];

vector<tuple<ll, ll, ll>> edges;
vector<ll> vec;


ll kek = INF;


void dfs2(int v) {
	used[v] = 1;

	sub[v] = 1;
	for (auto to : tree[v]) {
		if (!used[to.first]) {
			sm[v] += to.second;
			dfs2(to.first);
			sm[v] += sm[to.first];
			sub[v] += sub[to.first];
			ll sz1 = sub[to.first], sz2 = n - sub[to.first];
			if (sz1 > sz2) {
				psh[to.first] += to.second;
				sz1 = min(sz1, sz2 + 1);
			}
			else if (sz2 > sz1) {
				psh[0] += to.second;
				psh[to.first] -= to.second;
				sz2 = min(sz2, sz1 + 1);
			}

			if (abs(sz1 - sz2) >= 1) {
				edges.push_back({ 1, 1, 1 });
			}
			ans += (min(sz1, sz2) * 2 - 1) * to.second;
			ans2 += (sz1 + sz2 - 1) * to.second;
		}
	}

	
	for (auto to : tree[v]) {
		vec.push_back(min(sm[v] + to.second, sAll - sm[v] + to.second));
	}
}

ll p(int v) {
	used[v] = 1;

	for (auto to : tree[v]) {
		if (!used[to.first]) {
			if (sub[to.first] > n / 2) return p(to.first);
		}
	}

	return v;
}

ll sol() {
	dfs2(0);

	sort(vec.rbegin(), vec.rend());
	if (edges.size() != (n - 1)) {
		//cout << 2 / 0;
		//cout << 2 / 0;
		return ans2;
	}
	else {
		for (int i = 0; i < n; i++) used[i] = 0;
		ll kek = p(0);

		ll vl = INF;
		for (auto to : tree[kek]) {
			vl = min(vl, to.second);
		}

		return ans2 - vl;
	}
}

int main() {
	fastInp;

	input();

	cout << sol();

	return 0;
}

Measured memory_bytes: 29428
import java.util.Scanner;

public class Main
{
	public static void main(String arg[])
	{
		Scanner in = new Scanner(System.in);
		
		while(in.hasNext())
		{
			int n = in.nextInt();
			if(n==-1)
				return;
			int uti = 1150;
			int be = 4280;
			int count=11;
			if(n>10)
				while(count<=20&&count<=n)
				{
					uti+=125;
					count++;
				}
			if(n>20)
				while(count<=30&&count<=n)
				{
					uti+=140;
					count++;
				}
			if(n>30)
				while(count<=n)
				{
					uti+=160;
					count++;
				}

			System.out.println(be-uti);
		}
	}
}

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

int main() {
    int a, b, c;
    cin >> a >> b >> c;
    
    set<int> syurui;
    syurui.insert(a);
    syurui.insert(b);
    syurui.insert(c);
    
    cout << syurui.size() << endl;
}


Measured memory_bytes: 256
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>

#define file(s) if (fopen(s".in", "r")) freopen(s".in", "r", stdin), freopen(s".out", "w", stdout)

using namespace std;

typedef long long ll;

const int N = 2e5 + 5;
const int mod = 1e9 + 7;
const int INF = 1e9;
const double PI = acos(-1.0);

int t, n, k, a[N], dp[N];

int main() {
    cin >> n;
    cin >> k;
//    k = 2;
    for (int i = 1; i <= n; ++i) {
        cin >> a[i];
        int mn = INF;
        for (int j = max(1, i - k); j < i; ++j) {
            mn = min(mn, dp[j] + abs(a[i] - a[j]));
        }
        if (mn == INF)
            mn = 0;
        dp[i] += mn;
    }
    cout << dp[n];
}


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

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;

#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>

#define ll long long
#define ld long double
#define pb push_back
#define eb(a) emplace_back(a)

#define xx first
#define yy second
#define mp make_pair
#define pll pair<ll,ll>
#define mll map<ll,ll>
#define vll vector<ll>
#define pdd pair<double,double>
#define ALL(v) (v).begin(), (v).end()

const ll MOD=1e9+7; ;
const ll inf=1e18;

#define MODSET(d) if ((d) >= MOD) d %= MOD;
#define MODNEGSET(d) if ((d) < 0) d = ((d % MOD) + MOD) % MOD;
#define put(x) cout<<#x<<" = "<<x<<endl;

#define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
	cerr << *it << " = " << a << endl;
	err(++it, args...);
}

ll power(ll a,ll n){
    ll ans=1;
    while(n){
        if(n&1)
            ans=(ans*a);
        n>>=1;
        a=(a*a);
    }
    return ans;
}


ll powerMod(ll a,ll n){
    ll ans=1;
    while(n){
        if(n&1)
            ans=(ans*a)%MOD;
        n/=2;
        a=(a*a)%MOD;
    }
    return ans;
}

ll powerMod1(ll a,ll n,ll mod){
	a = a%mod;
    ll ans=1;
    while(n){
        if(n&1)
            ans=(ans*a)%mod;
        n>>=1;
        a=(a*a)%mod;
    }
    return ans;
}

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

ll sumdigit(ll n){
    ll sum=0;
    while(n){
        sum+=n%10;
        n=n/10;
    }
    return sum;
}

ll countSetBit(ll a){
    return __builtin_popcount(a);
}
ll countBit(ll a){
    ll sum=0;
    while(a){
        sum++;
        a>>=1;
    }
    return sum;
}

ll length(ll a){
    ll ans=0;
    while(a){
        ans++;
        a=a/10;
    }
    return ans;
}

bool isVowel(char c){
	if(c=='a' or c=='e' or c=='i' or c=='o' or c=='u')
		return true;
	return false;
}
template <typename T>
void max_self(T &a, T b ){
	a = max(a, b);
}

bool is_palin(string s){
	string t=s;
	reverse(t.begin(),t.end());
	return t==s;
}

int main()
{
    fast;
    int t;
    //~ cin>>t;
    t=1;
    
    while(t--){
			ld a;
			cin>>a;
			a = (a/3)*(a/3)*(a/3);
			cout<<fixed<<setprecision(10)<<a;
    }
    return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h> 
using namespace std;
using ll = long long;
#define F first
#define S second

int n, a[105];

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

    int ans = 0;

    for(int i = 0; i < n; ++i) ans += (a[i]%2==1 && (i+1)%2==1);

    cout << ans << '\n';
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();
    return 0;
}

Measured memory_bytes: 3596
import java.io.*;
    import java.util.*;
    public class Main{
      public static void main(String[] args) throws IOException{
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int a = Integer.parseInt(reader.readLine());
        int b = Integer.parseInt(reader.readLine());
        int c = Integer.parseInt(reader.readLine());
        System.out.println((int)Math.ceil((double)c/(double)Math.max(a,b)));
      }
    }

Measured memory_bytes: 21076
# abc172_a.py
# https://atcoder.jp/contests/abc172/tasks/abc172_a

# A - Calc /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 100点

# 問題文
# 整数 aが入力されます。値 a+a2+a3を出力してください。

# 制約
#     1≤a≤10
#     aは整数である。

# 入力
# 入力は以下の形式で標準入力から与えられる。
# a

# 出力
# 値 a+a2+a3を整数として出力せよ。

# 入力例 1
# 2

# 出力例 1
# 14

# a=2のとき、a+a2+a3=2+22+23=2+4+8=14となります。

# 解答は整数として出力してください。14.0 などの出力は不正解と判定されます。

# 入力例 2
# 10

# 出力例 2
# 1110


def calculation(lines):
    a = int(lines[0])
    lines_result = list()
    lines_result.append(a+a**2+a**3)
    return lines_result


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['2']
        lines_export = [14]
    if pattern == 2:
        lines_input = ['10']
        lines_export = [1110]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')


# 起動処理
if __name__ == '__main__':
    main()


Measured memory_bytes: 9120
// luogu-judger-enable-o2
#include <cstring>
#include <algorithm>
#include <iostream>
#include <cstdio>

#define MAXN 200005
#define MAXB 21

using namespace std;

const int INF = 1e9 + 2e6;
int v[MAXN], n, m;
int d[MAXN], up[MAXN][MAXB], down[MAXN][MAXB], pre[1 << MAXB], suf[1 << MAXB];
int visit[MAXN];

int read() {
    char c = getchar();
    int x = 0, s = 1;
    while (!isdigit(c)) {
        if (c == '-')
            s = -1;
        c = getchar();
    }
    while (isdigit(c)) {
        x = (x << 3) + (x << 1) + c - '0';
        c = getchar();
    }
    return x * s;
}

void init() {
    while (v[++m] >= 1)
        v[m + 1] = v[m] >> 1;
    d[0] = -INF;
    d[n + 1] = INF;
    for (int j = 1; j <= m; ++j) {
        for (int i = 1; i <= n; ++i)
            if (d[i] - d[i - 1] <= v[j])
                up[i][j] = up[i - 1][j];
            else
                up[i][j] = i;
        for (int i = n; i >= 1; --i)
            if (d[i + 1] - d[i] <= v[j])
                down[i][j] = down[i + 1][j];
            else
                down[i][j] = i;
    }
}

void solve() {
    memset(suf, 0x3f, sizeof(suf));
    memset(pre, -0x3f, sizeof(pre));
    suf[0] = n + 1;
    pre[0] = 0;
    int limit = (1 << m) - 1;
    for (int s = 0; s <= limit; ++s) {
        for (int i = 1; i <= m; ++i) {
            if (s >> (i - 1) & 1)
                continue;
            int t = s | (1 << (i - 1));
            if (pre[s] >= 0)
                pre[t] = max(pre[t], down[pre[s] + 1][i]);
            if (suf[s] <= n + 1)
                suf[t] = min(suf[t], up[suf[s] - 1][i]);
        }
    }
    for (int s = 0; s <= limit; ++s) {
        if (s & 1)
            continue;
        int t = limit ^ s ^ 1;
        int a = up[suf[t] - 1][1], b = down[pre[s] + 1][1];
        if (a <= b) {
            ++visit[a];
            --visit[b + 1];
        }
    }
    for (int i = 1; i <= n; ++i)
        visit[i] = visit[i - 1] + visit[i];
    for (int i = 1; i <= n; ++i)
        if (visit[i])
            puts("Possible");
        else
            puts("Impossible");
}

int main() {
    n = read();
    v[1] = read();
    for (int i = 1; i <= n; ++i)
        d[i] = read();
    init();
    solve();
}




Measured memory_bytes: 53632
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n - 1; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i <= n; i++)
#define FORR(i, m, n) for(int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
 
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<ll, ll>;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll a, b, c, d, e, f;
    cin >> a >> b >> c >> d >> e >> f;
    vll water(31, 0);
    REP(i, 30){
        REP(j, 30){
            if(a * i + b * j > 30) continue;
            water[a * i + b * j] = 1;
        }
    }
    ll resw, ress, init = 1;
    REP(i, 31){
        if(!i || !water[i]) continue;
        ll w = 100 * i, s, bound = e * i;
        REP(j, 101){
            REP(k, 101){
                s = c * j + d * k;
                if(w + s > f || s > bound || !s) continue;
                if(init){
                    init = 0;
                    resw = w;
                    ress = s;
                }
                else if(s * (resw + ress) > ress * (w + s)){
                    resw = w;
                    ress = s;
                }
            }
        }
    }
    if(init){
        cout << a * 100 << " " << 0 << endl;
        return 0;
    }
    cout << resw + ress << " " << ress << endl;
    return 0;
}

Measured memory_bytes: 256