解決時鐘問題,acm競賽題 A weird clock marked from 0 to 59 has only a minute hand. It won t move until a special coin is thrown into its box. There are different kinds of coins as your options. However once you make your choice, you cannot use any other kind. There are infinite number of coins of each kind, each marked with a number d ( 0 <= 1000 ), meaning that this coin will make the minute hand move d times clockwise the current time. For example, if the current time is 45, and d = 2. Then the minute hand will move clockwise 90 minutes and will be pointing to 15. Now you are given the initial time s ( 0 <= s <= 59 ) and the coin s type d. Write a program to find the minimum number of d-coins needed to turn the minute hand back to 0.
標簽: 時鐘
上傳時間: 2015-05-21
上傳用戶:rishian
這個例子如果運行,將在仿真的PC窗口中的第1,2,3行顯示一些信息后,在隨機位置顯示 1 ~ 5 .由于keil c51默認不支持重入函數,它的重入函數使用仿真的重入棧而不使用系統棧,而Small RTOS 51沒有進行重入棧管理,所以在TaskA~TaskE雖然及其相似,但不能合并. 注意:(1)在KEIL C51 工程中,我已經把輸出文件目錄設在e:\temp中,您可以在Project->Options for Target "Target 1"的output頁點擊Select Folder for Objects...和Listing頁點擊Select Folder for Listing...改變. (2)編譯時會有5個警告,其中一個是因為沒有使用一個系統函數OSSendSignal引起,它可以忽略.另4個是禁止任務間變量覆蓋分析引起,必須忽略.感謝網友John X. Liu,在這個例子中我使用了他編寫的仿真(dllPc51Emu.dll),這個dll原來是為他移植的Ucos-ii for keil c51的例子編寫. (3)Pc51Emu.dll在KEIL C51 V6.23 V7.00工作不正常.
上傳時間: 2015-05-29
上傳用戶:無聊來刷下
這個例子是例子2的另一種寫法(但任務數量不同),它使用了最高優先級任務作為顯示任務,全局變量ShowChar作為參數.函數TaskB是優先級1~10的任務函數,因為沒有使用局部變量,這些任務可以用一個函數. 注意:(1)在KEIL C51 工程中,我已經把輸出文件目錄設在e:\temp中,您可以在Project->Options for Target "Target 1"的output頁點擊Select Folder for Objects...和Listing頁點擊Select Folder for Listing...改變. 感謝網友John X. Liu,在這個例子中我使用了他編寫的仿真dll(Pc51Emu.dll),這個dll原來是為他移植的Ucos-ii for keil c51的例子編寫. (2)Pc51Emu.dll在KEIL C51 V6.23 V7.00工作不正常.
上傳時間: 2015-05-29
上傳用戶:asddsd
Tiny C Compiler - C Scripting Everywhere - The Smallest ANSI C compiler Installation on a i386 Linux host (for Windows read win32/readme.txt) ./configure make make test make install By default, tcc is installed in /usr/local/bin. ./configure --help shows configuration options.
標簽: Installation Everywhere Scripting Compiler
上傳時間: 2013-12-19
上傳用戶:zhangzhenyu
% [BestPop,Trace]=fmaxga(FUN,LB,UB,eranum,popsize,pcross,pmutation) % Finds a maximum of a function of several variables. % fmaxga solves problems of the form: % max F(X) subject to: LB <= X <= UB % BestPop--------最優的群體即為最優的染色體群 % Trace----------最佳染色體所對應的目標函數值 % FUN------------目標函數 % LB-------------自變量下限 % UB-------------自變量上限 % eranum---------種群的代數,取100--1000(默認1000) % popsize--------每一代種群的規模;此可取50--100(默認50) % pcross---------交叉的概率,此概率一般取0.5--0.85之間較好(默認0.8) % pmutation------變異的概率,該概率一般取0.05-0.2左右較好(默認0.1) % options--------1×2矩陣,options(1)=0二進制編碼(默認0),option(1)~=0十進制編碼,option(2)設定求解精度(默認1e-4)
標簽: pmutation BestPop popsize maximum
上傳時間: 2015-07-16
上傳用戶:Altman
LibTorrent is a BitTorrent library written in C++ for *nix, with a focus on high performance and good code. The library differentiates itself from other implementations by transfering directly from file pages to the network stack. On high-bandwidth connections it is able to seed at 3 times the speed of the official client. The client uses ncurses and is ideal for use with screen or dtach. It supports saving of sessions and allows the user to add and remove torrents.
標簽: performance LibTorrent BitTorrent library
上傳時間: 2015-07-24
上傳用戶:冇尾飛鉈
使用方法:用文本方式打開FlashFXP文件夾下的Sites.dat文件你會發現許多如下字段: [ftp://www.2ky.cn] Created=37525.5835161227 IP=www.realoveyou.com User=software Pass=45C170E56C99BB1A47 Port=21 Options=30033330000330011 將Pass=45C170E56C99BB1A47中等號后面的字串復制到FlashFXP密碼解密器里,按解密按鈕就得到真正的FTP明文密碼。 【MD5值:540ff30708aeaf8a33fdf4bd2fbd6006】
標簽: 37525.5835161227 FlashFXP Created Sites
上傳時間: 2014-01-27
上傳用戶:亞亞娟娟123
When created, this DLL does not export any symbols. As a result, it will not produce a .lib file when it is built. If you wish this project to be a project dependency of some other project, you will either need to add code to export some symbols from the DLL so that an export library will be produced, or you can check the "doesn t produce lib" checkbox in the Linker settings page for this project.
標簽: not created symbols produce
上傳時間: 2015-09-01
上傳用戶:asdkin
這是Small RTOS 51 在DP-51下載仿真實驗儀上使用CAT24WC02驅動程序的例子。本例程序按照相應的的通訊協議接收一個數據,并將接收到的數據顯示到LED數碼顯示器上。然后將接收到的數據寫入Cat24Wc02中,再在同一位置將數據讀出,并將讀出的數據通過串口發送回來。通訊協議參考rtos隨想曲和test.ini。 注意:(1)在KEIL C51 工程中,我已經把輸出文件目錄設在e:\temp中,您可以在Project->Options for Target "Target 1"的output頁點擊Select Folder for Objects...和Listing頁點擊Select Folder for Listing...改變. (2)編譯時會有4個警告,可以忽略. (3)DP-51下載仿真實驗儀的所有跳線選取默認值。
上傳時間: 2015-09-03
上傳用戶:wweqas
這是Small RTOS 51 DP-51下載仿真實驗儀上實現一個鬧鐘的源代碼。它可以使用k1~k4調整時間,使用串口設置一個報警時間。由于僅僅是一個例子而非產品,有一些細節沒有完善。如調整完時間后第一次顯示的時間是錯誤的(由于共享TimeData引起);沒有使用串行eeprom存儲多個報警時間等;刪除報警代碼沒有編寫。不過,程序已經可以使用,讀者可以自行完善它。通訊協議參考rtos隨想曲和test.ini。 注意:(1)在KEIL C51 工程中,我已經把輸出文件目錄設在e:\temp中,您可以在Project->Options for Target "Target 1"的output頁點擊Select Folder for Objects...和Listing頁點擊Select Folder for Listing...改變. (2)編譯時會有6個警告,可以忽略. (3)除與pcf8563相關的跳線和蜂鳴器的跳線外,DP-51下載仿真實驗儀的所有跳線選取默認值。
上傳時間: 2015-09-03
上傳用戶:jyycc