Implement the top-k routing mechanism used in Sparse Mixture-of-Experts (MoE) models. In MoE architectures like Kimi K2 (384 experts, 8 active) and DeepSeek-V3, each token is routed to only the top-K experts based on router scores, enabling massive model capacity with fixed compute cost. Your task is to implement the routing logic that selects experts, computes routing weights via softmax over selected experts, and combines expert outputs.