随笔分类 -  母函数

摘要:#include#include#include#include#include#define LL __int64using namespace std;int num[30];int c1[100];int c2[100];void fun(){ int i,j,k,l; memse... 阅读全文
posted @ 2015-08-17 22:30 sola94 阅读(158) 评论(0) 推荐(0)
摘要:母函数#include#include#include#include#includeusing namespace std;int dp[50];struct Clas{ int v,c;};Clas cla[50];int c1[500000];int c2[500000];int t,n... 阅读全文
posted @ 2015-07-30 16:53 sola94 阅读(165) 评论(0) 推荐(0)
摘要:题意:有1 5 10 25 50 五种硬币 最多取100个 问有多少种方式能凑成 n思路:dp#include#include#include#include#includeusing namespace std;int op[10]={1,5,10,25,50};int dp[300][300... 阅读全文
posted @ 2015-07-27 23:07 sola94 阅读(111) 评论(0) 推荐(0)
摘要:题意:有n种物品 每种价值 vi 有 ci件 问分成两堆 最平均的价值分配是多少 思路:01背包#include#include#include#include#includeusing namespace std;int v[100],m[100];int dp[300000];int main(... 阅读全文
posted @ 2015-07-27 20:30 sola94 阅读(149) 评论(0) 推荐(0)
摘要:题意:有 1 2^2 3^2...17^2 十七种硬币 问有多少种方式可以凑够 n思路:#include#include#include#includeusing namespace std;int c1[400],c2[400];void fun(int n){ int i,j,k; ... 阅读全文
posted @ 2015-07-27 15:53 sola94 阅读(125) 评论(0) 推荐(0)
摘要:Description"Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says."The second problem is, given ... 阅读全文
posted @ 2014-12-08 21:20 sola94 阅读(154) 评论(0) 推荐(0)
摘要:题意: 拉登有面值 1 2 5 的钱币 分别 n1 n2 n5 个 求出最大能连续组合到多大 思路: 想来想去都有bug 最后简单粗暴的一个一个来处理了#include#include#include#include#include#include#include#define mem... 阅读全文
posted @ 2014-08-16 00:41 sola94 阅读(124) 评论(0) 推荐(0)