登录
首页 » WINDOWS » item3

item3

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

  • c++面向对象程序设计-谭浩强
    说明:  c++面向对象程序设计-谭浩强-包含教材与答案(C + + Object Oriented Programming - Tan Haoqiang - includes teaching materials and answers)
    2021-01-12 16:47:01下载
    积分:1
  • kt0803l-master
    说明:  KT0803L is a low cost FM transmitter with I2C interface. Users can use it to build a small FM radio transmitter. The software provides interfaces to access registers in KT0803L and gives meaningful result to user.
    2020-04-02 07:10:25下载
    积分:1
  • 03-按键触发CoAP 协议数据
    说明:  按键触发coap协议,适用于nb95系列,主控芯片为stm32L4系列(The key trigger COAP protocol is suitable for nb95 series and the main control chip is stm32L4 series.)
    2019-04-17 09:08:59下载
    积分:1
  • poiss
    说明:  泊松随机过程,供信号处理的学习者参考,希望大家喜欢(Poisson stochastic process for the signal processing of the learner reference, hope you like)
    2008-11-04 09:46:30下载
    积分:1
  • NB
    说明:  用Java语言实现简单的朴素贝叶斯算法,进行机器学习。(Simple naive Bayesian algorithm is implemented in Java language for machine learning.)
    2019-04-25 21:18:40下载
    积分:1
  • visual basic program design of planetary gear
    visual basic程序实现行星轮设计-visual basic program design of planetary gear
    2022-02-01 17:25:57下载
    积分:1
  • 这个还是sap学习资料,提高sap使用水平
    这个还是sap学习资料,提高sap使用水平-The sap or learning materials, improve the use of the level of sap
    2023-08-10 02:45:05下载
    积分:1
  • buckp
    说明:  buck降压斩波电路 电力电子技术 pwm igbt(Buck step-down chopper circuit power electronic technology PWM IGBT)
    2019-06-04 19:01:09下载
    积分:1
  • L1G-R-hyperion-data-read-with-IDL
    L1GST或者L1R级Hyperion高光谱数据读取(L1GST or L1R grade Hyperion hyperspectral data read)
    2013-07-02 04:08:51下载
    积分:1
  • 最速下降法和牛顿法
    基于回溯线搜索的最速下降法和牛顿法,配数值算例(Steepest descent method and Newton method based on backtracking line search)
    2020-11-11 15:09:45下载
    积分:1
  • 696518资源总数
  • 106010会员总数
  • 4今日下载