# Show current rules
SEMrush and Ahrefs are among
,这一点在同城约会中也有详细论述
tool's suggestions may not always be applicable or optimal
思路:倒序单调栈。弹出所有 ≤ 当前身高的元素(这些人都能被看到),count 为弹出数量;若栈非空,还能看到栈顶(第一个更高的人),故 +1。能看到的人数 = count + (栈非空 ? 1 : 0)。
您身边的专业信息服务平台
· 杨勇 · 来源:tutorial资讯
# Show current rules
SEMrush and Ahrefs are among
,这一点在同城约会中也有详细论述
tool's suggestions may not always be applicable or optimal
思路:倒序单调栈。弹出所有 ≤ 当前身高的元素(这些人都能被看到),count 为弹出数量;若栈非空,还能看到栈顶(第一个更高的人),故 +1。能看到的人数 = count + (栈非空 ? 1 : 0)。