随笔分类 -  xdACM

摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 void splitnum(int n, int k, int &way, vector ans) //对n进... 阅读全文
posted @ 2014-07-05 12:10 Marrybe 阅读(1007) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 9 int a[20]={0,1}; //a[i]=1表示i已经使用过, a[i]=0表示i尚未使用过10 int... 阅读全文
posted @ 2014-07-04 22:18 Marrybe 阅读(146) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 6 int cnk(int n, int k) 7 { 8 int a,b; 9 a=b=1;10 for(int i=0; i0)28 {... 阅读全文
posted @ 2014-07-04 09:01 Marrybe 阅读(143) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 6 struct GT_cls //创建函数对象 7 { 8 public: 9 GT_cls(int t=0):a(t){}10 11 bool operat... 阅读全文
posted @ 2014-07-03 21:41 Marrybe 阅读(147) 评论(0) 推荐(0)