Language: C++

#include <cstdio>
#include <cstring>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#define MEM(x, y) memset((x), (y), sizeof(x))
#define X first
#define Y second
typedef long long lld;
typedef std::pair<int,int> pii;
typedef std::vector<pii> vip;
typedef std::priority_queue<pii, vip, std::greater<pii>> pq;
const int INFN = 1E9+5;
const int MAXM = 2E5+5;
const lld MAXN = 1E10+5; // 2100^3
std::map<lld, int> count;
std::map<lld, int> coord;
int cntC=0, cntE=0, N; // Coord Compr, Edge Count
lld tem;

const int SRC=0, SNK=MAXM-1;
int dista[MAXM]{ };
lld   nxt[MAXM]{ };
int   prv[MAXM]{ };
int queue[MAXM]{ };
int upper[MAXM]{ };

void addEdge(int U, int V, int W)
{
	prv[cntE]=upper[U], nxt[cntE] = V, wei[cntE] = W, upper[U]=cntE++;
	prv[cntE]=upper[V], nxt[cntE] = U, wei[cntE] = 0, upper[V]=cntE++;
}

bool bfs()
{
	pq queue;
	MEM(dista, 63);
	dista[SRC] = 0;
	queue.emplace(dista[SRC], SRC);
	while(!queue.empty())
	{
		pii cur = queue[qtr[1]++];
		if(dista[cur.Y] < cur.X) continue;
		for(int E = upper[cur]; ~E; E = prv[E]) if(wei[E] > 0)
		{
			lld tem = dista[cur.Y] + wei[E];
			if(dista[nxt[E]] > tem)
			{
				dista[nxt[E]] = tem;
				queue.emplace(tem, nxt[E]);
			}
		}
	}
	return dista[SNK] < INFN;
}

int edmonds_karp()
{
	while(bfs())
	{
		memcpy(ptr, upper, sizeof(upper));
		dfs(SRC);
	}
}

int main()
{
	scanf("%d", &N);
	MEM(upper, -1);
	for(int i = 0; i < N; ++i)
	{
		scanf("%lld", &tem);
		coord[tem]=0;
		++count[tem];
	}
	for(auto& itr: count)
	{
		lld jtr=1LL;
		while(jtr*jtr*jtr < itr.X) ++jtr;
		while(jtr*jtr*jtr < MAXN)
		{
			coord[jtr*jtr*jtr] = 0;
			++jtr;
		}
	}
	for(auto& itr: coord) // O(Ncbrt(10^10))
		itr.Y = ++cntC;
	for(auto& itr: count)
	{
		addEdge(SRC, coord[itr.X], itr.Y);
		lld jtr = 1LL;
		while(jtr*jtr*jtr < itr.X) ++jtr;
		while(jtr*jtr*jtr < MAXN)
		{
			lld cube = jtr*jtr*jtr;
			addEdge(coord[itr.X], coord[cube], count[cube]);
			++jtr;
		}
	}
	printf("%d\n", N-edmonds_karp());
	return 0;
}

Compiler output:
a.cc: In function 'void addEdge(int, int, int)':
a.cc:31:44: error: 'wei' was not declared in this scope
   31 |         prv[cntE]=upper[U], nxt[cntE] = V, wei[cntE] = W, upper[U]=cntE++;
      |                                            ^~~
a.cc: In function 'bool bfs()':
a.cc:43:33: error: 'qtr' was not declared in this scope
   43 |                 pii cur = queue[qtr[1]++];
      |                                 ^~~
a.cc:45:34: error: no match for 'operator[]' (operand types are 'int [200005]' and 'pii' {aka 'std::pair<int, int>'})
   45 |                 for(int E = upper[cur]; ~E; E = prv[E]) if(wei[E] > 0)
      |                                  ^
a.cc:45:60: error: 'wei' was not declared in this scope
   45 |                 for(int E = upper[cur]; ~E; E = prv[E]) if(wei[E] > 0)
      |                                                            ^~~
a.cc: In function 'int edmonds_karp()':
a.cc:62:24: error: 'ptr' was not declared in this scope
   62 |                 memcpy(ptr, upper, sizeof(upper));
      |                        ^~~
a.cc:63:17: error: 'dfs' was not declared in this scope; did you mean 'ffs'?
   63 |                 dfs(SRC);
      |                 ^~~
      |                 ffs
a.cc:65:1: warning: no return statement in function returning non-void [-Wreturn-type]
   65 | }
      | ^