数字运算,判断一个数是否接近素数 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
人工智能中模糊逻辑算法 FuzzyLib 2.0 is a comprehensive C++ Fuzzy Logic library for constructing fuzzy logic systems with multi-controller support. It supports all commonly used shape functions and hedges, with full support for the various types of Aggregation, Correlation, Alphacut, Composition, Defuzzification methods. The latest version of the C++ Fuzzy Logic Class Library contains all the C++ source code and comes complete with a usage example for building a multi-controllers fuzzy logic model.
标签: comprehensive constructing FuzzyLib library
上传时间: 2013-12-17
上传用户:dbs012280
With OpenSSL 0.9.6, a new component has been added to support external crypto devices, for example accelerator cards. The component is called ENGINE, and has still a pretty experimental status and almost no documentation. It s designed to be fairly easily extensible by the calling programs.
标签: component external OpenSSL devices
上传时间: 2015-10-01
上传用户:ryb
C++, although a marvelous language, isn t perfect. Matthew Wilson has been working with it for over a decade, and during that time he has found inherent limitations that require skillful workarounds. In this book, he doesn t just tell you what s wrong with C++, but offers practical techniques and tools for writing code that s more robust, flexible, efficient, and maintainable. He shows you how to tame C++ s complexity, cut through its vast array of paradigms, take back control over your code--and get far better results
标签: marvelous although language Matthew
上传时间: 2014-01-22
上传用户:妄想演绎师
The XML Toolbox converts MATLAB data types (such as double, char, struct, complex, sparse, logical) of any level of nesting to XML format and vice versa. For example, >> project.name = MyProject >> project.id = 1234 >> project.param.a = 3.1415 >> project.param.b = 42 becomes with str=xml_format(project, off ) "<project> <name>MyProject</name> <id>1234</id> <param> <a>3.1415</a> <b>42</b> </param> </project>" On the other hand, if an XML string XStr is given, this can be converted easily to a MATLAB data type or structure V with the command V=xml_parse(XStr).
标签: converts Toolbox complex logical
上传时间: 2016-02-12
上传用户:a673761058
a b\program is visible to a
上传时间: 2016-11-18
上传用户:gundan
We propose a technique that allows a person to design a new photograph with substantially less effort. This paper presents a method that generates a composite image when a user types in nouns, such as “boat” and “sand.” The artist can optionally design an intended image by specifying other constraints. Our algorithm formulates the constraints as queries to search an automatically annotated image database. The desired photograph, not a collage, is then synthesized using graph-cut optimization, optionally allowing for further user interaction to edit or choose among alternative generated photos. An implementation of our approach, shown in the associated video, demonstrates our contributions of (1) a method for creating specific images with minimal human effort, and (2) a combined algorithm for automatically building an image library with semantic annotations from any photo collection.
标签: substantially photograph technique propose
上传时间: 2016-11-24
上传用户:三人用菜
Imperfect C++ Practical Solutions for Real-Life Programming C++, although a marvelous language, isn t perfect. Matthew Wilson has been working with it for over a decade, and during that time he has found inherent limitations that require skillful workarounds. In this book, he doesn t just tell you what s wrong with C++, but offers practical techniques and tools for writing code that s more robust, flexible, efficient, and maintainable. He shows you how to tame C++ s complexity, cut through its vast array of paradigms, take back control over your code--and get far better results.
标签: Programming Imperfect Practical Solutions
上传时间: 2014-03-02
上传用户:songrui
Range imaging offers an inexpensive and accurate means for digitizing the shape of three-dimensional objects. Because most objects self occlude, no single range image suffices to describe the entire object. We present a method for combining a collection of range images into a single polygonal mesh that completely describes an object to the extent that it is visible from the outside.
标签: three-dimensiona inexpensive digitizing accurate
上传时间: 2016-11-29
上传用户:yxgi5