摘要: 题意: 求在n*n(nn时,ans=0; f[i][j]代表在前n行放了j个棋子. 转移方程 f[i][j]=f[i-1][j]+f[i-1][j-1]*(n-j+1);#include using namespace std;int f[11][11], n, m, ans;int mai... 阅读全文
posted @ 2015-03-07 13:58 keambar 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 题意: 有m(m#include #include using namespace std;struct node { int p, val; bool operator val; }} tem;priority_queue ql;int ans[1009];int n, m,... 阅读全文
posted @ 2015-03-07 11:14 keambar 阅读(208) 评论(0) 推荐(0) 编辑