C++完美演绎 经典算法 如 /* 头文件:my_Include.h */ #include <stdio.h> /* 展开C语言的内建函数指令 */ #define PI 3.1415926 /* 宏常量,在稍后章节再详解 */ #define circle(radius) (PI*radius*radius) /* 宏函数,圆的面积 */ /* 将比较数值大小的函数写在自编include文件内 */ int show_big_or_small (int a,int b,int c) { int tmp if (a>b) { tmp = a a = b b = tmp } if (b>c) { tmp = b b = c c = tmp } if (a>b) { tmp = a a = b b = tmp } printf("由小至大排序之后的结果:%d %d %d\n", a, b, c) } 程序执行结果: 由小至大排序之后的结果:1 2 3 可将内建函数的include文件展开在自编的include文件中 圆圈的面积是=201.0619264
标签: my_Include include define 3.141
上传时间: 2014-01-17
上传用户:epson850
【首语】 非常感谢你能够对季风流量统计系统感兴趣。不管你是JAVA的初学者、还是JAVA的高手,对我敢肯定的对你说,中国JAVA技术的方发展,甚至我们中国软件业的发展,就是靠我们这些对软件开发感兴趣的人。 【说明】 本系统源代码是完全公开,绝无保留,无需注册,完全免费。各位大虾们也可对源代码时行自由修改和优化,尽量能够推出更好的版本,为广大网友免费下载。本系统使用潇湘多用户统计系统(asp版)的图片,我在此感谢网上给论坛免费提供图标,源码的技术人员,谢谢你们。 【功能】 1:多用户统计系统,防止刷新,速度快,适用广泛 2:综合统计,最近访问,地区分析,地址分析,屏幕大小,来访页面,访问次数,操作系统,当前在线,IP地址,浏览器,年报表,月报表,周报表,历史报表,日报表等 3:可以精确的跟踪统计每一位来访者的IP与在线时间-同一IP在线每隔5分钟才能增加一个计数(你也可以修改时间,在stat.jsp页你把ExTime改为你想要的时间,即 int ExTime=5 )。 4:提供详细IP数据包,让你清楚的知道来访者是来是何方。
上传时间: 2013-11-30
上传用户:zl5712176
数字运算,判断一个数是否接近素数 A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum of its digits divides its value. Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not. Input Each line of input contains the base b, followed by a string of digits representing a positive integer in that base. There are no leading zeroes. The input is terminated by a line consisting of 0 alone. Output For each case, print "yes" on a line if the given number is a Niven number, and "no" otherwise. Sample Input 10 111 2 110 10 123 6 1000 8 2314 0 Sample Output yes yes no yes no
上传时间: 2015-05-21
上传用户:daguda
源代码\用动态规划算法计算序列关系个数 用关系"<"和"="将3个数a,b,c依次序排列时,有13种不同的序列关系: a=b=c,a=b<c,a<b=v,a<b<c,a<c<b a=c<b,b<a=c,b<a<c,b<c<a,b=c<a c<a=b,c<a<b,c<b<a 若要将n个数依序列,设计一个动态规划算法,计算出有多少种不同的序列关系, 要求算法只占用O(n),只耗时O(n*n).
上传时间: 2013-12-26
上传用户:siguazgb
c语言版的多项式曲线拟合。 用最小二乘法进行曲线拟合. 用p-1 次多项式进行拟合,p<= 10 x,y 的第0个域x[0],y[0],没有用,有效数据从x[1],y[1] 开始 nNodeNum,有效数据节点的个数。 b,为输出的多项式系数,b[i] 为b[i-1]次项。b[0],没有用。 b,有10个元素ok。
上传时间: 2014-01-12
上传用户:变形金刚
深入探讨JSP与WEB的结合,JSP书籍源码\JSP2_0技术手册
上传时间: 2015-12-27
上传用户:372825274
We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.
标签: represented integers group items
上传时间: 2016-01-17
上传用户:jeffery
在Java应用程序特别是Web应用中,经常遇到字符的编码问题。为了防止出现乱码,首先需要了解字符编码的基本概念以及Java是如何处理字符编码的,这样就可以有目的地在输入/输出环节中增加必要的转码。
上传时间: 2016-03-01
上传用户:784533221
利用一组样本之间的相关性,对这些样本(矢量)一起进行量化,每个样样本矢量用信号中经常出现的代表性的矢量(模式)代替。对量化参数进行二进制编码,实现压缩,以达到减少视频序列的码率的目的,以便能够在给定的通信信道上实时传输视频。
标签: 样本
上传时间: 2014-01-06
上传用户:siguazgb
用游标的方法实现对称差的计算,即 (A-B)+(B-A)
上传时间: 2016-05-23
上传用户:远远ssad