登录
首页 » WINDOWS » item3

item3

于 2018-01-11 发布 文件大小:1KB
0 269
下载积分: 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 个回复

  • shandian
    一个模拟闪电击到避雷线的程序,基于有限元差分法。(A program to simulate lightning strikes the lightning conductor is based on the finite element difference method.)
    2021-03-23 10:59:16下载
    积分:1
  • 光伏发电系统预测模块 pv characteristic Curve
    说明:  光伏发电系统预测模块,能较好的实现温度对光伏发电的影响,可以借鉴(The prediction module of photovoltaic power generation system can better realize the influence of temperature on photovoltaic power generation, which can be used for reference.)
    2019-07-09 09:30:44下载
    积分:1
  • matlab下的三相异步电机模型,可用于仿真
    matlab下的三相异步电机模型,可用于仿真
    2022-04-01 06:34:16下载
    积分:1
  • 基于vc下的中国象棋代码,我是学人工只能的
    基于vc下的中国象棋代码,我是学人工只能的-vc on the Chinese chess code, I study the manual only
    2023-06-07 14:45:03下载
    积分:1
  • am0005
    am0005 redbana audition
    2019-02-23 07:36:33下载
    积分:1
  • MVDR
    波束形成算法,最大信噪比;请大家参考使用(Beamforming algorithm, maximum signal to noise ratio)
    2021-02-19 16:09:45下载
    积分:1
  • CAD
    说明:  自己编写的电路分析,优化程序,可求解电路响应,计算元件灵敏度,优化方法包括Powell法,模拟退火法,可部分实现滤波器设计的功能(I have written the circuit analysis, optimization procedures, can solve the circuit response, computing components sensitivity, and optimization methods including Powell method, simulated annealing algorithm, can be partially achieved filter design functions)
    2010-03-17 10:38:34下载
    积分:1
  • 7z1900-src
    说明:  7ZIP SDK / Full Source
    2020-11-05 21:59:50下载
    积分:1
  • ucgui 版本3.9,支持汉字显示,在VC++6.0环境下可以进行运行
    ucgui 版本3.9,支持汉字显示,在VC++6.0环境下可以进行运行-ucgui version 3.9, support for Chinese characters show that in VC++6.0 environment can be run
    2022-01-31 14:15:32下载
    积分:1
  • wenjuan
    python gui开发基础,一些简单的pythonGUI代码(the base of python GUI)
    2020-06-21 12:20:02下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载