2006年8月11日

人生苦短 及时行乐

摘要: 天是棺材盖,地是棺材板,喜怒哀乐事,全在棺材里 阅读全文

posted @ 2006-08-11 18:06 我的blog 阅读(537) 评论(2) 推荐(0) 编辑

螺旋矩阵

摘要: 原题如下:打印出参数为N的矩阵,比如输入3,则打印出1 2 3 8 9 47 6 5输入4打印出1 2 3 412 13 14 511 16 15 610 9 8 7下面是我的答案 #include "stdafx.h"#include #include using namespace std;void PrintArray(int* arr, int len){ int i,j = 0; ... 阅读全文

posted @ 2006-08-11 16:55 我的blog 阅读(231) 评论(0) 推荐(0) 编辑

从已知的数字中找出所有的组合

摘要: 原题大置如此:比如有数字123,那么所有的组合为:123121323123如果为1234的话,那么组合为12341213142324341231242341234我的答案如下: #include //回溯void Back(int opts[], int len, int count){ int index = 0; int i; for( i = count; i > 1; ... 阅读全文

posted @ 2006-08-11 16:51 我的blog 阅读(292) 评论(0) 推荐(0) 编辑

导航