回溯法

回溯法其实质就是一个带减枝DFS过程。 有时会遇到这样一类题目,它的问题可以分解,但是又不能得出明确的动态规划或是递归解法,又需要对整个问题进行遍历才可以得到答案时。 回溯问题一般有如下三种:

阅读全文

k210环境搭建_Linux

  1. 首先我使用的Deepin15.6系统,我拿到的板子是绿色的原版

  2. 我们找到官网,进入其中的资源下载

阅读全文

DBSCAN算法原理及实现

因为模式识别需要分组讲一个聚类算法,所以我挑选了这个算法。

阅读全文

aggressicecows

Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at positions x1,...,xN (0 <= xi <= 1,000,000,000).

His C (2 <= C <= N) cows don't like this barn layout and become aggressive towards each other once put into a stall. To prevent the cows from hurting each other, FJ want to assign the cows to the stalls, such that the minimum distance between any two of them is as large as possible. What is the largest minimum distance?

阅读全文

Boolean Expressions

描述

The objective of the program you are going to produce is to evaluate boolean expressions as the one shown next:
Expression: ( V | V ) & F & ( F | V )

where V is for True, and F is for False. The expressions may include the following operators: ! for not , & for and, | for or , the use of parenthesis for operations grouping is also allowed.

To perform the evaluation of an expression, it will be considered the priority of the operators, the not having the highest, and the or the lowest. The program must yield V or F , as the result for each expression in the input file.

阅读全文

c++成员函数中static变量

我最近在做郭炜老师的编程题目,这道题我实现的过程中出现了一些蛋疼的错误,进行一个记录.

阅读全文

字典序

直接上程序:

阅读全文

C语义转换

你有没有曾经对c语言的定义苦恼?

阅读全文

排序算法小集

直接上程序

阅读全文

哈夫曼树

其实早就应该写完这个哈夫曼树,只不过最近有点没有心情学习。对于哈夫曼树的构造,我总结了以下几步:

阅读全文