http://www.bc-cn.net/Article/kfyy/cyy/jc/200409/5_4.html float aver(float a[5]) { int i float av,s=a[0] for(i=1 i<5 i++) s=s+a[i] av=s/5 return av } void main() { float sco[5],av int i
標簽: float Article 200409 bc-cn
上傳時間: 2014-01-08
上傳用戶:zsjzc
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
UCS (Ultra Corba Simulator) is one more powerful corba client/servant simulator tool than other similar products(e.g. Telcopro s MtSim, or OpenFusion s Corba Explorer, or eaiBridge s CAST). It doesn t need idl-related helper class or IR service.
標簽: Simulator simulator powerful servant
上傳時間: 2016-01-17
上傳用戶:hustfanenze
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
由三星的2442修改而來,正確引導eboot,請注意用三星公版的硬件配置,具體可以參考QQ2440,因為我在些平臺上跑過,具體操作 1.target settings : post-linker:選擇為 ARM fromELF 2.ARM assembler與 ARM c Compiler 的 architecture or processor 選擇為:ARM920T 3.ARM linker的 output:RO base為 0x00000000 (當仿真時為:0x30000000),layout的 object/sysmbol:為2440init.o section:Init 4.ARM fromELF 的 output:format:plain binary , output file name:nboot.bin 下面為全部源碼,注意用ADS編譯 2442addr.h 2442addr.inc 2442init.s 2442lib.c 2442lib.h 2442loader-1208.c 2442slib.h 2442slib.s Def.h k9s1208_s.s Memcfg.inc Nand.h Nand_mini.c Option.h Option.inc
標簽: post-linker settings target eboot
上傳時間: 2016-05-06
上傳用戶:moshushi0009
基于LPC2148的U盤實現,實現U盤的基本功能,上傳速度2.2Mb/S,下載1.2Mb/s
上傳時間: 2016-05-07
上傳用戶:waitingfy
本程序執行后,創建一個能夠加載文字的面板,文字的內容是本地主機的IP地址的動態顯示。跑馬燈文字的大小和跑馬燈文字顯示的速度都可以在GatutTextCrawler.html文件里通過參數進行設置。 編程思路:首先,本練習因為要制作偵測IP的跑馬燈的實例,所以首先要生成程序界面:在函數public void init()中,首先通過語句s = getParameter("fontSize")和fontSize = s != null ? Integer.valueOf(s).intValue() : 12設置文字字體大小,然后進行字體設置和顯示速度設置,最后通過語句msgText = getParameter("preText")得到GatutTextCrawler.html文件中的字符串值。然后,得到主機IP地址,首先通過函數adds = InetAddress.getLocalHost().toString()得到主機的IP地址,最后在更新屏幕函數public void update(Graphics g)中通過實現跑馬燈效果。
標簽: 程序
上傳時間: 2016-06-06
上傳用戶:miaochun888
CELP (CELl Processing) is a functional programming package for Matlab. It is often better to use FP instead of loops: - it s more compact - it s more clear.
標簽: programming Processing functional package
上傳時間: 2013-12-19
上傳用戶:netwolf
MSP-FET430P140 Demo - USART0, SPI Interface to HC165/164 Shift Registers Description: Demonstrate USART0 in two-way SPI mode. Data are read from an HC165, and same data written back to the HC164. ACLK = n/a MCLK = SMCLK = default DCO = UCLK0 = DCO/2 * USART0 control bits are in different SFR s from other MSP430 s *
標簽: Description Demonstrate Interface Registers
上傳時間: 2013-12-28
上傳用戶:懶龍1988
根據曼徹斯***的編碼原則(參見本刊2001年第一期《一種采用曼碼調制的非接觸IC卡讀寫程序編制》),非接觸ID卡采用上升沿對應著位數據“0”,下降沿對應著位數據“1”,微控制器通過檢測U2270B輸出數據位的跳變來實現對曼徹斯***的譯碼。在現實工作中,數據信號會受到調制、解調、噪聲各種效應的影響,其上升沿和下降沿存在抖動,可采用鍵盤消抖的辦法來消除抖動的影響。根據非接觸ID卡64位數據循環發送以及其數據緒構特點,即數據流中第64位為“0”,第1位至第9位為“1”。據此,將“0111111111”作為讀數據的起始標識,如圖2所示。在確定了數據起始標識后,采用延時大于0.5T采樣數據位的方法,如圖3所示,來避開曼徹斯***編碼中的空跳對數據譯碼造成的影響,簡化了譯碼程序。 通過實驗得到:480μs≤1T≤520μs,220μs≤0.5T≤280μs,由此取Tnext=300μs。為了便于對讀出數據進行奇校驗,讀出數據每5位作為一個字節。因此確定起始標識和讀取數據對時鐘有嚴格要求,所以尋找起始標識和讀取數據部分程序采用匯編語言編寫。數據讀以后,根據前面所提到的非接觸ID卡的數據結構,通過比較奇校驗算法與讀出數據中的奇校驗位來驗證出數據的正確性。
上傳時間: 2016-10-14
上傳用戶:xhz1993