登录
首页 » WINDOWS » item3

item3

于 2018-01-11 发布 文件大小:1KB
0 260
下载积分: 1 下载次数: 18

代码说明:

  车轮上刻有一圈共n个英文小写字母,滚滚向前每碾过一圈就留下一条印迹,这类印迹都是长度为n的字符串。显然,从不同位置开始碾,可能得到不同的印迹。既然历史的车轮滚滚向前,故不必考虑向后碾的情况。于是,一个车轮最多对应于n条不同的印迹;反之,不同的印迹也可能来自相同的车轮。 也就是说,两条印迹若能通过循环移位相互转换,则它们来自同一条车轮。比如,所谓的循环左移k位,是指将字符串"s1 ... sk sk+1 ... sn"转换为"sk+1 ... sn s1 ... sk"。 现在,已知不同车轮的m条印迹,请你核对它们的所属的车轮。 输入   第一行有两个正整数,即车轮周长n和印迹总数m。 接下来的m行分别给出m条印迹,长度均为n。 输出   共m行,依次对应于m条印迹。   若第i条印迹与之前的第k条(0 < k < i)印迹来自同一车轮,则输出编号k;若存在多个这样的k,则输出最小者。否则(第i条印迹所来自的车轮不同于之前的所有车轮),则输出0。(If strip I imprinting and previous article K (0 < K < I) imprinted from the same wheel, the output number k is output; if there are many such K, the output is the smallest. Otherwise (the wheel from the I mark is different from all the previous wheels), the output is 0.)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • community.py
    Python codes for community detection
    2018-03-26 03:57:32下载
    积分:1
  • 这是我的计算机图形学的实验――梁友栋算法
    这是我的计算机图形学的实验――梁友栋算法-This is my experimental computer graphics-- friends of Liang Dong Algorithm
    2022-02-26 08:36:13下载
    积分:1
  • AraxisMerge
    软件编写的过程中,经常需要跟之前备份的做比较,这就是一款很不错的比较软件(In the process of software writing, it is often necessary to compare with the previous backup. This is a very good comparison software)
    2019-06-04 15:20:31下载
    积分:1
  • SMP
    说明:  用到的数据是2015微博用户画像比赛提供的数据,数据包含在文件中。这份代码能够实现完整的提取特征到训练模型,从而的出预测结果的功能。用到了sklearn及panda包。(The data used is provided by the user portrait competition of microblog in 2015. This code can complete the function of extracting features to the training model, thus producing the prediction results. Sklearn and panda packages are used.)
    2019-01-10 18:50:30下载
    积分:1
  • MP3 电路设计,学习中的好帮手,作为电路学习的基本知识
    MP3 电路设计,学习中的好帮手,作为电路学习的基本知识-MP3 circuit design, the study of extremely helpful in learning the circuit as a basic knowledge
    2022-06-29 20:17:19下载
    积分:1
  • ai-n-queens-master
    java n-queens problem
    2019-02-13 08:15:24下载
    积分:1
  • MyCalculator
    基于MFC编写的简单计算器Visual C++程序(Write a simple calculator based on MFC Visual C++ program)
    2010-08-20 12:59:39下载
    积分:1
  • MatLab_OCR
    A simple Matlab program for detecting and extracting text in the image.[JPEG format]. Which can be used for OCR.
    2009-10-08 17:58:26下载
    积分:1
  • 非常之好玩,可以考验你的耐心和手上的操作,简单上手,对机器的配置要求非常的低....
    非常之好玩,可以考验你的耐心和手上的操作,简单上手,对机器的配置要求非常的低.-very fun, a test of your patience and hands, the operation simple and thus the allocation of machines require very low.
    2022-03-05 02:04:35下载
    积分:1
  • Hinf-control-theory-and-application
    申铁龙的H无穷理论及应用,非常好的书,市面上已经不再出版。学习鲁棒控制的必备课本(Shen Tielong H-infinity theory and application, very good book, the market is no longer published. Robust control of essential learning textbooks)
    2013-10-20 21:40:29下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载