摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->/** * @author phinecos * @since 2008/10/31 */ class EightQueen { static final int MAXSIZE = 8;...
阅读全文
摘要:计算几何题,使用的数学公式参考http://topic.csdn.net/t/20050329/22/3892541.html Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #incl...
阅读全文
摘要:计算几何问题,基本思想从要判断的点引一条射线看和多边形交点的个数,如果是奇数个,那么就在多边形内,否则在多边形外。先判断点是否在多边形边上的情况判掉,再判断线段相交。 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #in...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #include using namespace std; bool IsPalindrom(stack& s,const vector& v) {/...
阅读全文
摘要:最大矩阵和问题,简单DP Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> #include #include using namespace std; const int MAXSIZE = 100; int a[MAXSI...
阅读全文
摘要:典型的贪心算法,和前面1029一样也是工作时间调度问题。 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #include using namespace std; const int MAXSIZ...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #include using namespace std; const int TIMEPERMOVE = 10;//每次分钟 const int ...
阅读全文
摘要:原始版本: Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #include using namespace std; void ClearStack(stack& s) {//清空栈 wh...
阅读全文
摘要:简单的物理公式计算 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #include using namespace std; int main(void) { double v...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #include using namespace std; const int MAXSIZE = 100; int pos[100];//记录对应的...
阅读全文
摘要:这道题我觉得加法这里比较难懂,和分成高字和低字,分别存放在寄存器A和B中。 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include using namespace std; const int MAXSIZE = 2...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include #include using namespace std; int rotor[3][26];//密码表 int rround[3]; //加权轮转表 int totalL...
阅读全文
摘要:两道简单题,此外,1049有网友给出的计算公式是 Z=3.14*(x*x+y*y)/100.0+1.0,可惜我不明白其原理 ZOJ1045 HangOver Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include using nam...
阅读全文
摘要:这道题就是读懂题目太费劲了,非要扯到什么DNA上去,其实就是简单的数组处理,和上下左右的加加,然后查表把所得值加到当前项上来,若越界则处理下。 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include using namespace...
阅读全文
摘要:题目大意:整个游戏棋盘是50*50大小的,左上角在(1,1),贪吃蛇由20个节点组成,头部位置在(25,30),水平延展到(25,11),可以有四个运动方向:东,西,南,北。题目就是给你一个运动序列,判断最终结果是下面3种情况的哪一种:1)正常。2)头撞到自己身体。3)出界。 Code highlighting produced by Actipro CodeHighlighter (free...
阅读全文
摘要:简单题,就是输出时注意格式问题:输出一行结果后需要加入一个空白行。 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include using namespace std; int main() { int n; ...
阅读全文
摘要:在本文的上半部分《基于朴素贝叶斯分类器的文本分类算法(上)》一文中简单介绍了贝叶斯学习的基本理论,这一篇将展示如何将该理论运用到中文文本分类中来,具体的文本分类原理就不再介绍了,在上半部分有,也可以参见代码的注释。
阅读全文
摘要:本文缘起于最近在读的一本书-- Tom M.Mitchell的《机器学习》,书中第6章详细讲解了贝叶斯学习的理论知识,为了将其应用到实际中来,参考了网上许多资料,从而得此文。文章将分为上下两个部分,第一部分将介绍贝叶斯学习的相关理论(如果你对理论不感兴趣,请直接跳至第二部分)。第二部分讲如何将贝叶斯分类器应用到中文文本分类,随文附上示例代码。
阅读全文
摘要:Winpcap是一个强大的网络开发库,可以实现许多功能:获取可用的网络适配器;获取指定适配器信息(比如名称和描述信息);捕获指定网卡的数据封包;发送数据封包;过滤捕获的包以获取特定包等。 首先到http://www.winpcap.org/install/default.htm下载安装winpcap 驱动和DLL组件。 然后到http://...
阅读全文
摘要:都说《机器学习》是学计算机的人必须要看的一本书,确实不是浪得虚名。看了一章人工神经网络(ANN)中关于反向传播算法的内容,相比单个感知器而言,采用多层网络的反向传播算法能表示出更多种类的非线性曲面,下面总结下它基本的处理框架。 ANN核心数据结构: typedef struct { int input_n; /* number of input uni...
阅读全文
摘要:1,Win2000下动态加载DLL时遇到一个奇怪的问题, CString sdkPath = _T("C:\\WINDOWS\\system32"); ::SetCurrentDirectory(sdkPath); handle = ::LoadLibrary(_T("C:\\WINDOWS\\system32\\termb.dll")); if (handle == NULL)...
阅读全文
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include using namespace std;class ZBase64{public: /*编码 DataByte [in]输入的数据长度,以字节为单位 */...
阅读全文
摘要:国庆回家休息了几天,家里电脑是我本科时用的,最近出现一个奇怪的问题,xp系统无法进入,而且重装系统时总是会报错: An unexpected error(0) occurred at line 17763 in d:\xpsprtm\base\boot\setup\arcdisp.c.系统没有报警连续长鸣,应该不是内存条松动的原因,硬盘没有出现什么异常情况,用工具软件检查后也没有发现有坏道,主板...
阅读全文