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
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
This program simulates the bit-error-rate (BER) performance of OSTBC with L=4 antennas over the frequency flat Rayleigh block fading channel The code is developed for real orthogonal design, code rate 1/2 modulation- 16 QAM with gray coding resulting in 2 bits/sec/Hz.
标签: bit-error-rate performance simulates the
上传时间: 2014-01-13
上传用户:whenfly
说明: Virtual51是一个动态可视化的MCS-51全功能模拟程序,可以让你在Virtual51上运行MCS-51程序就如同在硬体上一 样。提供8KB的程序空间,256字节的RAM,16KB的XRAM,2个16位的定时/计数器(T0 和 T1),一个实时时钟,一个 5X6的小键盘,一个128X64点阵的LCD,一个音频发生器,一个串口(未连接至电脑串口),一个打印口(连接至电脑 打印口),和5个有两个优先级的中断源。 Virtual51不可以载入大于8KB的51程序和大于16KB的XRAM数据文件,并且程序以固定的12Mhz时钟运行,编写程序时留意。 XRAM载入数据文件的实际大小,可从XRAMSH 和 XRAMSL 寄存器中读取。 例子说明: KeyPad---------简单演示KeyPad的使用; Music----------Virtual51演奏音乐; Picture--------LCD图形演示; Proc24c02------使用Virtual51从电脑打印口读写24C02A
上传时间: 2016-05-18
上传用户:wfeel
液晶显示器以其微功耗、体积小、显示内容丰富、超薄轻巧的诸多优点,在袖珍式仪表和低功耗应用系统中得到越来越广泛的应用。 这里介绍的字符型液晶模块是一种用5x7点阵图形来显示字符的液晶显示器,根据显示的容量可以分为1行16个字、2行16个字、2行20个字等等,这里以常用的2行16个字的1602液晶模块来介绍它的编程方法。
上传时间: 2014-01-25
上传用户:cc1015285075
USB-Blaster_驱动安装方法 1、WIN XP 系统使用 QUARTUS自带的驱动程序,驱动路径选择 C:\altera\11.0\quartus\drivers,可以参考USB-Blaster_驱动安装方法&USBBALSTER.exe。 2、WIN 7 32位系统使用本目录USB_Blaster_WIN7 32下面的驱动,驱动路径选择 USB_Blaster_WIN7 32\CDM 2.04.16 WHQL Certified 3、WIN 7 64系统使用 QUARTUS自带的驱动程序驱动路径选择 C:\altera\11.0\quartus\drivers
上传时间: 2015-06-06
上传用户:qweasdex
实验源代码 //Warshall.cpp #include<stdio.h> void warshall(int k,int n) { int i , j, t; int temp[20][20]; for(int a=0;a<k;a++) { printf("请输入矩阵第%d 行元素:",a); for(int b=0;b<n;b++) { scanf ("%d",&temp[a][b]); } } for(i=0;i<k;i++){ for( j=0;j<k;j++){ if(temp[ j][i]==1) { for(t=0;t<n;t++) { temp[ j][t]=temp[i][t]||temp[ j][t]; } } } } printf("可传递闭包关系矩阵是:\n"); for(i=0;i<k;i++) { for( j=0;j<n;j++) { printf("%d", temp[i][ j]); } printf("\n"); } } void main() { printf("利用 Warshall 算法求二元关系的可传递闭包\n"); void warshall(int,int); int k , n; printf("请输入矩阵的行数 i: "); scanf("%d",&k); 四川大学实验报告 printf("请输入矩阵的列数 j: "); scanf("%d",&n); warshall(k,n); }
上传时间: 2016-06-27
上传用户:梁雪文以
STC12C5A60S2单片机是深圳宏晶科技有限公司的典型单片机产品,采用了增强型8051内核,片内集成了60KB程序Flash、1KB数据Flash(EEPROM)、1280字节RAM、2个16位定时/计数器、44根I/O口线、2个全双工异步串行口(UART)、高速同步通信端口(SPI)、8通道10位ADC、2通道PWM/可编程计数器阵列/捕获/比较单元(PWM/PCA/CCU)、MAX810专用复位电路和硬件看门狗等资源。STC12C5A60S2指令系统完全兼容8051单片机,并具有在系统可编程(ISP)功能和在系统调试(ISD)功能,可以省去价格较高的专门编程器,开发环境的搭建非常容易。STC12C5A60S2的所有指令和标准的8051内核完全兼容,具有良好的兼容性和很强的数据处理能力,所以,原来讲解8051单片机的师资力量可以充分发挥以前讲解单片机原理及应用课程的经验;对于具有8051单片机知识的读者,不存在转型困难的问题。本书介绍了STC12C5A60S2单片机的硬件结构、汇编语言程序设计,并详细介绍了应用于单片机的C语言程序设计,以KeiluVision集成开发环境作为程序设计和调试环境介绍了程序的调试方法。以目前流行的智能车竞寒中的智能汽车控制器以及压力测控系统两个综合设计实例为背景,介绍了单片机中各部分的硬件功能和应用设计以及相关的汇编语言、C语言程序设计与调试;特别介绍了嵌入式操作系统以C/OS-IⅡ的裁减和应用。教材的每一章都给出了相应的习题,便于教学。与教材配套的电子教案、书中的所有实例以及最后一章的应用系统设计相关内容都可以从站上下载。
上传时间: 2022-06-25
上传用户:
专辑类-电子基础类专辑-153册-2.20G 21世纪大学新型参考教材系列-集成电路B-荒井-159页-2.8M.pdf
上传时间: 2013-05-16
上传用户:pkkkkp
产品型号:VK2C21A/B/C/D 产品品牌:VINKA/永嘉微/永嘉微电 封装形式:SOP28/24/20/16 裸片:DICE(邦定COB)/COG(邦定玻璃用) 产品年份:新年份 联 系 人:许硕 原厂直销,工程服务,技术支持,价格最具优势!QT446 VK2C21A/B/C/D概述: VK2C21是一个点阵式存储映射的LCD驱动器,可支持最大80点(20SEGx4COM)或者最大128点(16SEGx8COM)的LCD屏。单片机可通过I2C接口配置显示参数和读写显示数据,也可通过指令进入省电模式。其高抗干扰,低功耗的特性适用于水电气表以及工控仪表类产品。 特点: ★ 工作电压 2.4-5.5V ★ 内置32 kHz RC振荡器 ★ 偏置电压(BIAS)可配置为1/3、1/4 ★ COM周期(DUTY)可配置为1/4、1/8 ★ 内置显示RAM为20x4位、16x8位 ★ 帧频可配置为80Hz、160Hz ★ 省电模式(通过关显示和关振荡器进入)
标签: VK2C 21 LCD 应用于 抗干扰 环境 液晶驱动
上传时间: 2022-06-07
上传用户:2937735731