摘要: 1 #include "stdio.h" 2 #include "stdlib.h" 3 4 // using back tracking solve the problem 5 6 int N = 8; 7 8 int a[N]={0}, b[2*N-1]={0}, c[2*N-1]={0}; 9 char queen[N];10 /*11 * a[col-1] 记录第 col 列有无皇后, 1 表示有。12 * b[row+col-2] 记录从左上数第 row+col-1 条斜率为 1 的线上有无皇后。13 * c... 阅读全文
posted @ 2012-07-26 17:45 Double_win 阅读(195) 评论(0) 推荐(0) 编辑
摘要: Little Petya very much likes computers. Recently he has received a new "Ternatron IV" as a gift from his mother. Unlike other modern computers, "Terna 阅读全文
posted @ 2012-07-26 17:41 Double_win 阅读(224) 评论(0) 推荐(0) 编辑