I model an economy inhabited by heterogeneous individuals that form teams and choose an appropriate production technology. The model characterizes how the technological environment shapes the equilibrium assignment of individuals into teams. I apply the theoretical insights to study cross-country differences in the allocation of talent and technology. Their low endowment of technology, coupled with the possibility of importing advanced technology from the frontier, leads poor countries to a different economic structure -- one with a stronger concentration of talent and a larger cross-sectional productivity dispersion. As a result, the efficient equilibrium in poor countries resembles economic features that are often cited as evidence of misallocation. Micro data from countries of all income levels document cross-country differences in the allocation of talent that support the theoretical predictions. A quantitative version of the model suggests that a sizable fraction of the larger productivity dispersion documented in poor countries is due to differences in the efficient allocation.