ITeye博客

2011清华考研机试题1

Midnight0101 · 2011-08-09 14:40 · 算法 · 编程语言 · 水 · Markdown

题目描述 [url]http://ac.jobdu.com/problem.php?id=1088[/url] 水~ [code="c++"] #include using namespace std; int main() { int l,m; int trees[10008]; while(cin>>l>>m) { int i,j,ans=0; for(i=0;i<=l;i++) trees[i]=0; for(i=0;i>a>>b; for(j=a;j<=b;j++) trees[j]=1; } for(i=0;i<=l;i++) if(trees[i]==0) ans++; cout<

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。