#P1317. 低洼地
低洼地
题目描述
一组数,分别表示地平线的高度变化。高度值为整数,相邻高度用直线连接。找出并统计有多少个可能积水的低洼地?
如图:地高变化为 。
输入格式
两行,第一行 表示有 个数。第 行连续 个数表示地平线高度变化的数据,保证首尾为 。 高度 。
输出格式
一个数,可能积水低洼地的数目。
By signing up a HFOJ universal account, you can submit code and join discussions in all online judging services provided by us.