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
解power flow CODE(學電力系統必備的東西)(內含詳細註解)
上傳時間: 2013-11-29
上傳用戶:wab1981
MT6305B GSM Power Management System
標簽: Management System 6305B Power
上傳時間: 2013-12-25
上傳用戶:a673761058
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