算法
NyankoKaro
这个作者很懒,什么都没留下…
展开
-
分治法解决棋盘覆盖问题
#include<stdio.h> #include<math.h> #define size1 32 int t=0; int board[size1][size1]={0}; int main (void) { ChessBoard(0,0,27,25,size1); for(int i=0;i<原创 2019-03-29 20:24:59 · 430 阅读 · 0 评论 -
C++实现大根堆排序
#include <iostream> using namespace std; void Siftheap(int a[], int i, int n){ int j = 2 * i + 1, temp;//i指向分叉结点,j指向i的左结点 while (j < n) { if (j < n-1 && a[j] < a[j + 1])//...原创 2019-03-29 20:35:05 · 526 阅读 · 0 评论