bzoj luogu sol 首先,要保证一个格子的左边和上方都放满了棋子,就需要这个点的左上方那个矩形都放满了棋子. 这样放棋子状态就会是一个自左下至右上的轮廓线. 状态数?\(C_{20}^{10}\).相当于是从左下角走到右上角一共要走\(20\)步,在其中选出\(10\)向上走其余的向右走. 也可以打个表看一看... #include<cstdio> #include<algorithm> using namespace std; int n,m,a[20],tot; vo
Summer is coming! It's time for Iahub and Iahubina to work out, as they both want to look hot at the beach. The gym where they go is a matrix a with n lines and mcolumns. Let number a[i][j] represents the calories burned by performing workout at the