2010年4月19日

So Many Skirt

摘要: xiaoA is a beautiful girl, and she has so many skirts that she won't wear a skirt a second time before the skirt is washed. Now xiaoA wants to go shopping, how many skirts she can choose to wear? In order to distinguish these skirts, she gives out every skirt with a unique name. Input The first 阅读全文

posted @ 2010-04-19 19:56 speedmancs 阅读(318) 评论(0) 推荐(0) 编辑

代码着色和windows live writer真好

摘要: 可以很方便地写博客园的文章了。该死的IE,居然不支持代码着色插件,ff正常。 阅读全文

posted @ 2010-04-19 17:14 speedmancs 阅读(145) 评论(0) 推荐(0) 编辑

一道简单的回溯搜索题

摘要: 在一个4*4的小方格(如图所示)中放置8个*号,使得每行每列放且仅放两个*号。┌─┬─┬─┬─┐│*│*│ │ │├─┼─┼─┼─┤│*│ │*│ │├─┼─┼─┼─┤│ │*│ │*│├─┼─┼─┼─┤│ │ │*│*│└─┴─┴─┴─┘求出所有的基本解。#include <iostream>using namespace std;const int N = 4;int selected[N][N];int colCoins[N]; //记录每列当前的硬币数量int gCount = 0;void Print(){ cout << "第" < 阅读全文

posted @ 2010-04-19 16:55 speedmancs 阅读(418) 评论(0) 推荐(0) 编辑

导航