解题报告
reliveyy
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU 1171 Big Event in HDU(多重背包)
#include #include using namespace std;int n,v[60],m[60],sum,dp[250010];int main(){ while(cin >> n) { if(n<0)break; sum = 0; for(int i=0;i<n;i++) {原创 2012-08-24 00:50:03 · 531 阅读 · 0 评论 -
HDU 1085 Holding Bin-Laden Captive!
#include using namespace std;int num_1,num_2,num_5,c1[8010],c2[8010];int main(){ while(cin >> num_1 >> num_2 >> num_5) { if(num_1==0&&num_2==0&&num_5==0)break; for(int i=0原创 2012-08-23 14:22:26 · 418 阅读 · 0 评论 -
HDU 1100 Trees Made to Order (Catalan数)
#include #include using namespace std;int catalan[19]={ 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 208012, 742900, 2674440, 9694845, 35357670, 129644790, 47763原创 2012-08-23 19:03:21 · 674 阅读 · 0 评论 -
HDU 1027 Ignatius and the Princess II
#include #include using namespace std;int main(){ int m,n,a[1010]; while(cin >> n >> m) { for(int i=0;i<n;i++)a[i]=i+1; for(int i=0;i<m-1;i++)next_permutation(a,a+n);原创 2012-08-23 13:59:06 · 361 阅读 · 0 评论 -
HDU 1153 Magic Bitstrings (找规律)
#include using namespace std;long long p;int a[100010];int main(){ while(cin >> p) { if(p==0)break; if(p==2)cout << "Impossible" << endl; else {原创 2012-08-23 21:25:44 · 1588 阅读 · 0 评论
分享