poj3250
//(棧)poj3250將第i頭牛能看到多少牛傳化為第i頭牛能被多少牛看見
/*
#include <stdio.h>
#include <stack>
using namespace std;
int main(){
unsigned long N,ans=0;
stack<unsigned long>s;
scanf("%ld",&N);
while(N--){
unsigned long cowHigh;
scanf("%ld",&cowHigh);
while(!s.empty()&&s.top()<=cowHigh) s.pop();
ans+=s.size();
s.push(cowHigh);
}
printf("%ld",ans);
return 0;
}
//*/
浙公網(wǎng)安備 33010602011771號(hào)