雕刻时光

just do it……nothing impossible
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年9月5日

摘要: 患病的奶牛N只,D种病毒,最多包含K种病毒,求包含最多有几头牛6 3 201 11 21 32 2 12 2 1看到D的范围比较小<=15,用011,表示患了第2,3钟病毒的奶牛a[i]在枚举K种病毒,如110 (用STL里的排列函数枚举)m如m|a[i]==m,说明a[i]包括在m里,add++记录最大值View Code #include<algorithm>#include<iostream>#include<string.h>#include<stdio.h>using namespace std;int a[1009];bool 阅读全文

posted @ 2011-09-05 21:09 huhuuu 阅读(200) 评论(0) 推荐(0) 编辑