Ex4-22 单射函数问题 « 问题描述: 设函数f将点集S = {0,1, , n -1}映射为f (S) = { f (i) | iÎ S} Í S 。单射函数问题要 从S中选取最大子集X Í S 使f (X )是单射函数。 例如,当n=7, f (S) = {1,0,0,2,2,3,6} Í S 时, X = {0,1,6} Í S 是所求的最大子集。 « 编程任务: 对于给定的点集S = {0,1, , n -1}上函数f,试用抽象数据类型队列,设计一个O(n)时 间算法,计算f的最大单射子集。 « 数据输入: 由文件input.txt 提供输入数据。文件的第1 行有1 个正整数n,表示给定的点集 S = {0,1, , n -1}。第2 行是f (i)的值,0 £ i < n。 « 结果输出: 程序运行结束时,将计算出的f的最大单射子集的大小输出到output.txt中。 输入文件示例 输出文件示例 input.txt 7 1 0 0 2 2 3 6 output.txt 3
上传时间: 2016-05-28
上传用户:tyler
This software transmits data (using TCP/IP) from I/O pins (of the Tini Board - from Dallas Semiconductors) to a specific IP address.
标签: from Semicondu transmits software
上传时间: 2016-05-29
上传用户:zhangzhenyu
I/O Buffer Information Specification (IBIS) models for AT91SAM7SE512/256 in LQFP pacakge with VDDIO at 3.3V.
标签: Specification Information pacakge Buffer
上传时间: 2013-12-24
上传用户:zhyiroy
I made a lot of changed on this object,such as * // 1.Encapsulates all code in one userobjet,since PB does not * // support "Address of Function" , so we can not set new * // WndProc, just makes the object more easy to use. * // 2.Uses structure array instead of Datastore * // 3.Calc width of menuitem at runtime(MEASUREITEM) * // 4.Draw disabled status
标签: Encapsulates userobjet changed object
上传时间: 2014-01-14
上传用户:lx9076
对STR710的I/O操作的典型例子程序,使用KEIL编译.采用MDK3.05操作系统.
上传时间: 2013-12-30
上传用户:Breathe0125
ARM调试笔记 包含I/O输出试验、ISP实验、 I2C接口实验等内容 压缩文件中还含有keil_uVision2的入门pdf
标签: keil_uVision ARM ISP I2C
上传时间: 2013-12-11
上传用户:hakim
I developed an algorithm for using local ICA in denoising multidimensional data. It uses delay embedded version of the data, clustering and ICA for the separation between data and noise.
标签: multidimensional developed algorithm denoising
上传时间: 2016-06-01
上传用户:cc1915
This example project shows how to use the IAR Embedded Workbench for ARM to develop code for the IAR-STM32-SK evaluation board. It shows basic use of I/O, timer and the interrupt controllers. Displays running lights on the board LED s.
标签: Workbench for the Embedded
上传时间: 2013-12-20
上传用户:Breathe0125
FDTD的一维和三维i算法,可以实现时域有限差分的实现,最后生成一幅图像。
上传时间: 2016-06-04
上传用户:sammi
51单片机的一些c语言编译 I/O口识别和一些中断
上传时间: 2016-06-05
上传用户:小宝爱考拉