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