摘要: 题目:http://poj.org/problem?id=3393一道题目挺长的模拟题,参考了网上大神的题解。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 int Month[13]={0,31,28,31,30,31,30,31,31,30,31,30,31}; 8 int Lmonth[13]={0,31,29,31,30,31,30,31,31,30,31,30,31}; 9 10 int check(int year) 11 { 12 if(year1... 阅读全文
posted @ 2014-01-17 23:05 水门 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 二分查找递归算法 1 #include 2 #include 3 #include 4 using namespace std; 5 #define MAXL 10000 6 7 int a[MAXL],key; 8 int BinarySearch(int low,int high) 9 ... 阅读全文
posted @ 2014-01-17 19:50 水门 阅读(248) 评论(0) 推荐(0) 编辑
摘要: 插入排序 1 #include 2 #include 3 #include 4 using namespace std; 5 #define MAXL 10000 6 7 void InsertSort(int a[],int n) 8 { 9 int i,j,temp;10 ... 阅读全文
posted @ 2014-01-17 19:47 水门 阅读(303) 评论(0) 推荐(0) 编辑