摘要:
N皇后Problem Description 在N N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行一个正整数N≤10,表示棋盘和皇后 阅读全文
摘要:
Problem Description Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO". Input each test case contains two numbers 阅读全文
摘要:
静态变量static,只进行一次初始化。 include include using namespace std; int main() { for(int i=0;i include int main() { char str[ ]="This , a sample string OK." cha 阅读全文