题目中的:
“𝑎 表示小 S 一组人的战力,用数组 𝑏 表示小 Q 一组人的战力: int a[1000005], b[1000005];” 这样会占用许多内存,所以应该这样:
int n; cin>>n; int s[n+1],q[n+1];
仅个人见解,有疑问欢迎在评论区讨论(^W^)