标签:else href max int color i++ pre ref nbsp
http://poj.org/problem?id=2559
1 a[n + 1] = p = 0; 2 for (int i = 1; i <= n + 1; i++) 3 { 4 if (a[i] > s[p]) 5 { 6 s[++p] = a[i], w[p] = 1; 7 } 8 else 9 { 10 int width=0; 11 while (s[p] > a[i]) 12 { 13 width += w[p]; 14 ans = max(ans, (long long)width * s[p]); 15 p--; 16 } 17 s[++p] = a[i], w[p] = width + 1; 18 } 19 }
标签:else href max int color i++ pre ref nbsp
原文地址:https://www.cnblogs.com/universeplayer/p/10655729.html