Parallel Merge
2026/3/9小于 1 分钟
Parallel Merge
题面
并行合并两个已排序数组 A(M) 与 B(N)(float32,非降序)到输出 C(M+N),强调并行策略(分治/对角线划分等)以避免串行依赖。
Implementation Requirements
- Use only GPU native features (external libraries are not permitted)
- The solve function signature must remain unchanged
- 合并结果写入 C
Examples
A=[1,3,5,7], B=[2,4,6,8] → C=[1,2,3,4,5,6,7,8]
A=[-1,1,3], B=[2] → C=[-1,1,2,3]Constraints
- 1 ≤ M,N ≤ 50,000,000;M+N ≤ 50,000,000
- 输入已非降序;元素为 float32
- Performance: M=N=25,000,000