- 木牛流马
- 2009-07-25 12:48:02 @
学过回溯的都知道这就是个n皇后问题
2 条评论
-
hahayang LV 10 @ 2017-07-12 14:25:31
var n,k,h,i,j,t:longint; s:qword; begin readln(n,k,h); s:=1; for i:=n-k+1 to n do s:=s*i; for i:=1 to h do begin readln(t); for j:=2 to t do s:=s div j end; for i:=n-k+1 to n do s:=s*i; write(s) end.
-
2014-11-03 20:03:50@
典型的基础排列组合
- 1