[bzoj] 1628: [Usaco2007 Demo]City skyline
用单调栈维护,每当有一栋楼高度大于栈头,就++ans。小于则出栈。#include#define C (c=getchar())using namespace std;const int N=50005;int n,w,ans,p=1;int que[N],x[N],y[N];inline char nc(){ static char buf[100000],*p1=buf,*
原创
2017-05-31 08:49:59 ·
387 阅读 ·
0 评论