如果整數A的全部因子(包括1,不包括A本身)之和等于B;且整數B的全部因子(包括1,不包括B本身)之和等于A,則將整數A和B稱為親密數。求3000以內的全部親密數。 *題目分析與算法設計 按照親密數定義,要判斷數a是否有親密數,只要計算出a的全部因子的累加和為b,再計算b的全部因子的累加和為n,若n等于a則可判定a和b是親密數。計算數a的各因子的算法: 用a依次對i(i=1~a/2)進行模運算,若模運算結果等于0,則i為a的一個因子;否則i就不是a的因子。 *
標簽: 整數
上傳時間: 2015-04-24
上傳用戶:金宜
源代碼\用動態規劃算法計算序列關系個數 用關系"<"和"="將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
The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition
標簽: government streamline important alphabet
上傳時間: 2015-06-09
上傳用戶:weixiao99
A one-dimensional calibration object consists of three or more collinear points with known relative positions. It is generally believed that a camera can be calibrated only when a 1D calibration object is in planar motion or rotates around a ¯ xed point. In this paper, it is proved that when a multi-camera is observing a 1D object undergoing general rigid motions synchronously, the camera set can be linearly calibrated. A linear algorithm for the camera set calibration is proposed,and then the linear estimation is further re¯ ned using the maximum likelihood criteria. The simulated and real image experiments show that the proposed algorithm is valid and robust.
標簽: one-dimensional calibration collinear consists
上傳時間: 2014-01-12
上傳用戶:璇珠官人
三相步進電機的三相六拍工作方式,正轉的繞組通電順序:A、AB、B、BC、C、CA、A,反轉的通電順序:A、AC、C、CB、B、BA、B、A。 由于步進電機轉子有一定的慣性以及所帶負載的慣性,故步進電機的工作過程中不能及時的啟動和停止,在啟動時應慢慢的加速到預定速度,在停止前應逐漸減速到停止,否則,將產生失步現象。 步進電機的控制問題可總結為兩點: 1、產生工作方式需要的時序脈沖; 2、控制步進電機的速度,使它始終遵循加速、勻速、減速的規律工作。
上傳時間: 2015-12-01
上傳用戶:685
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
加密程序源代碼* A 變成 C,B 變成 D,a 變成 c,b 變成 d,Y 變成 A, * z 變成 b,以此類推。非字母字符不變。
上傳時間: 2013-12-28
上傳用戶:stvnash
華恒科技 HHCF5249-R3 技術手冊 第一章 產品簡介 第二章 軟件系統 第三章 硬件系統 第四章 機械特性 第五章 底板的硬件設計 第六章 售后服務及技術支持 附錄 附錄A 初始化 附錄B LINUX 常見術語 附錄C 常用LINUX 命令 附錄D GCC 與GDB 附錄E MAKEFILE 附錄F UCLINUX 系統分析 uClinux 簡介 uClinux 小型化的做法 uClinux 的開發環境 uClinux 的內存管理 工具及內核 附錄G 圖形界面(GUI)接口函數API 附錄H 參考資料
上傳時間: 2013-12-24
上傳用戶:a6697238
Thinking in Java, 3rd ed. Revision 4.0 Preface Introduction 1: Introduction to Objects 2: Everything is an Object 3: Controlling Program Flow 4: Initialization & Cleanup 5: Hiding the Implementation 6: Reusing Classes 7: Polymorphism 8: Interfaces & Inner Classes 9: Error Handling with Exceptions 10: Detecting Types 11: Collections of Objects 12: The Java I/O System 13: Concurrency 14: Creating Windows & Applets 15: Discovering Problems 16: Analysis and Design A: Passing & Returning Objects B: Java Programming Guidelines C: Supplements D: Resources Index
標簽: Introduction Thinking Revision Preface
上傳時間: 2014-07-13
上傳用戶:netwolf
SQL Server2000 in the database management system, using VC + + development tools to develop a memorandum of enterprise system database applications.
標簽: development management database develop
上傳時間: 2013-12-20
上傳用戶:LIKE