-
/*作为一个软件专业的学生,zcy总是对二进制特别感兴趣,有一天他发现了一个有趣的序列:一个长度为N的序列,该序列只含有0或1两个数字,并且该序列不包含连续3个...
/*作为一个软件专业的学生,zcy总是对二进制特别感兴趣,有一天他发现了一个有趣的序列:一个长度为N的序列,该序列只含有0或1两个数字,并且该序列不包含连续3个1,
例如N=3时有7种不同序列,分别是000, 001, 010, 011, 100, 101, 110。111包含3个连续的1所以不是。
现在zcy想知道,对于长为n的一个二进制串,有多少满足条件的01串。
Input
第一行是整数t,表示多少个case,
每行有一个数n,表示串的长度(n
- 2022-08-23 01:27:03下载
- 积分:1
-
汉字显示程序Display HanZI
汉字显示程序Display HanZI-Chinese character display program Display HanZI
- 2023-06-29 19:00:04下载
- 积分:1
-
这个模块封装了文件系统对象的很多功能。它允许你做很多事情。...
这个模块封装了文件系统对象的很多功能。它允许你做很多事情。-the file system object many functions. It allows you to do a lot of things.
- 2022-01-23 11:27:16下载
- 积分:1
-
DELPHI如何支持多国语言
DELPHI如何支持多国语言-DELPHI how to support multiple languages
- 2022-03-14 11:43:39下载
- 积分:1
-
This is an algorithm to achieve the lift, two elevators, six floors to VC 6.0
这是一个电梯算法的实现,有两部电梯,六层楼,以VC++6.0实现-This is an algorithm to achieve the lift, two elevators, six floors to VC 6.0
- 2022-06-27 22:44:50下载
- 积分:1
-
实现阶乘运算! 非常好用
实现阶乘运算! 非常好用-achieve factorial Operational! Very handy
- 2022-08-06 17:28:36下载
- 积分:1
-
实现方法: 用MFC的程序向导生成一个常规DLL,在常规DLL内有一派生自CWinApp的实例,再用MFC的程序向导生成一个MFC EXE应用程序,把MFC E...
实现方法: 用MFC的程序向导生成一个常规DLL,在常规DLL内有一派生自CWinApp的实例,再用MFC的程序向导生成一个MFC EXE应用程序,把MFC EXE应用程序中 CAppView,CMainFrame,CAppDocument的文挡和RES目录下的资源拷贝到常规DLL项目中,添加到项目中,编译生成一DLL,在另外一个WIN32应用程序中,启动一线程,在线程函数中显式装载该DLL,取的该DLL内的当前线程, CWinThread *pThread=GetCurrentThread() pThread->Run() 就可装载启动常规DLL内应用程序框架.-method: a normal DLL file has been created with the program wizard and there is an instance generated from CWinApp in the DLL file.Create another MFC EXE appliaction and copy CAppView,CMainFram,CAppDocument and the resources in RES directory to the normal DLL and add to the projec and compile and generate a DLL. In a Win32 application, start a thread which loads the DLL with codes, get the running thread, ie.CWinThread*pThread=GetCurrentThread(), then,pThread->Run() executes the loading and start the execution of the application framework in the normal DLL file.
- 2022-07-13 07:36:52下载
- 积分:1
-
这VB6代码DRM数字广播mondile,非常好,
This the VB6 code for DRM Digital Radio Mondile, very nice,-This is the VB6 code for DRM Digital Radio Mondile, very nice,
- 2022-08-10 17:32:05下载
- 积分:1
-
此程序是RFID中使用的一种CRC16校验原理,采用了移位法,查表法做好后再上传。此外,下载解压后要把文件后缀名改为.c !...
此程序是RFID中使用的一种CRC16校验原理,采用了移位法,查表法做好后再上传。此外,下载解压后要把文件后缀名改为.c !-This procedure is the use of RFID as a CRC16 checksum principle, the use of the displacement method, look-up table method to do a good job and then upload. In addition, the downloaded file to extract the suffix after the name change. C!
- 2022-02-05 01:00:18下载
- 积分:1
-
提出一种改进的禁忌搜索算法来求解背包问题。该算法基于禁忌搜索技术,并采用I&D策略,同时设计了两种针对局
部最优解的变异算子。改进后的算法能有效地弥补标准...
提出一种改进的禁忌搜索算法来求解背包问题。该算法基于禁忌搜索技术,并采用I&D策略,同时设计了两种针对局
部最优解的变异算子。改进后的算法能有效地弥补标准禁忌算法对初始解依赖的缺陷,同时也避免了搜索停滞的现象。通过对具
体实例和随机问题的测试,表明改进后的禁忌搜索算法有更好的性能。
关-An improved tabu search algorithm to solve knapsack problem. The algorithm is based on tabu search techniques, using I & D strategies, while designed for the local optimal solution of the two kinds of mutation operator. The improved algorithm can effectively compensate for the standard tabu search algorithm depends on the initial solution defect, but also to avoid the phenomenon of search stagnation. Through specific examples and random-question test, indicating that the improved tabu search algorithm has better performance. Guan
- 2022-05-24 04:09:08下载
- 积分:1