判断·sort 的区间是左闭右开

judge 难度 3

#sort#stl

sort(a, a+3) 排了几个?

题目

对 int a[5] = {5,4,3,2,1} 执行 sort(a, a+3); 后,整个数组变成 1 2 3 4 5。
来小码星球,动手写一遍 →