摘要: 棋盘覆盖2^k的棋盘格子,有一个缺陷,用L形状的的拼图把棋盘覆盖。每次涂抹的时候先按照缺陷的四周涂抹……23333参考int dir[4][2] = {{0,0},{0,1},{1,0},{1,1}}; ///棋盘L形状对应的分别缺少那个格子int graph[10000][10000];void... 阅读全文
posted @ 2015-02-24 21:45 寒饼干 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 归并排序:(nlog(n) 小->大)1.将数组分成两部分2.将两部分分别排序3.将排完序的两部分合为一部分void merge_sort(int x,int y){ if(y-x = y || (p = y || (p = y) return; int k = a[x];... 阅读全文
posted @ 2015-02-24 13:26 寒饼干 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 如果求连续的乘积和就要考虑负数相乘和0的情况……!连续乘积子序列最大mi[1] = mx[1] = a[1]; for(int i = 2;i #include #include #include #include #include #include #include #include... 阅读全文
posted @ 2015-02-24 11:45 寒饼干 阅读(181) 评论(0) 推荐(0) 编辑