摘要: 1 #include<stdio.h> 2 3 int main() 4 { 5 int i, k, h[25], max; 6 int j, temp, dp[25]; 7 8 while(scanf("%d", &k) != EOF) 9 {10 for(i=1; i<=k; i++)11 {12 scanf("%d", &h[i]);13 }14 15 for (i=k; i>0; i--)16 {17 temp = 0;... 阅读全文
posted @ 2011-08-16 20:31 zhongya 阅读(114) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int i,j, N, h[1002],dp2[1002]; int temp, dp[1002], max; while(scanf("%d", &N) != EOF) { for(i=1; i<=N; i++) { scanf("%d", &h[i]); } dp[1] = 1; for (i=2; i<=N; i++) { temp = 0; for (j=1; j<i; j++) { if ((h[i]>h[j]) && 阅读全文
posted @ 2011-08-16 17:28 zhongya 阅读(129) 评论(0) 推荐(1) 编辑
摘要: #include<stdio.h>int main(){ int i, j, N, temp, max; int high[102],dp1[102],dp2[102]; while(scanf("%d", &N) != EOF) { scanf("%d", &high[1]); for(i=2; i<=N; i++) { scanf(" %d",&high[i]); } dp1[1] = 1; for (i=2; i<=N; i++) { temp = 0; for (j=1; j&l 阅读全文
posted @ 2011-08-16 17:23 zhongya 阅读(160) 评论(0) 推荐(1) 编辑