登录
首页 » WINDOWS » item3

item3

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

  • 汇编原码“案例20七段电子表显示.rar
    汇编原码“案例20七段电子表显示.rar-compilation of the original code "20 cases in paragraph 107 electronic table shows. Rar
    2022-02-12 18:30:34下载
    积分:1
  • 六自由度圆柱体建模资料
    圆柱体的生成以及旋转 拟合 以及一些论文资料料料料(The generation of the cylinder, the rotation fitting and the material material of some papers)
    2020-08-14 14:58:35下载
    积分:1
  • matlab fft
    说明:  使用傅里叶变换来寻找隐藏在噪声中的信号的频率成分。 ADC fft(Use the Fourier transform to find the frequency components of the signal hidden in the noise and do the FFT)
    2020-01-16 14:30:31下载
    积分:1
  • BORLAND公司C语言对话框开发程序,有点用
    BORLAND公司C语言对话框开发程序,有点用-company BORLAND C language dialog development process, with a bit
    2022-06-01 14:22:19下载
    积分:1
  • matlab程序
    能够从信号中提取时域参数,包括:均值、峰值、均方根值、偏斜度、峭度等。(The time domain parameters can be extracted from the signal, including mean, peak, RMS, skewness, kurtosis, etc.)
    2017-11-22 20:09:21下载
    积分:1
  • Rational rose 编程设计流程指导
    Rational rose 编程设计流程指导-Programming Rational rose design process to guide
    2022-11-22 09:35:05下载
    积分:1
  • Windows上的挖地雷游戏.rar
    Windows上的挖地雷游戏.rar-Windows dug mines on the game. Rar
    2022-02-01 10:25:48下载
    积分:1
  • 反向泵浦拉曼
    说明:  反向泵浦拉曼放大器,内含代码,同时还有反向多波长打靶算法的相关论文,非常有用(Reverse Pumped Raman Amplifier with code and related papers on reverse multi-wavelength shooting algorithm are very useful.)
    2019-05-25 22:49:27下载
    积分:1
  • Hex2c
    Hex文件转换为 C 文件, 比较实用的一个小工具。(Convert HEX files to C files)
    2010-05-20 17:58:46下载
    积分:1
  • Hirose_fpc_hf23
    Hirose_fpc_hf23 Hirose_fpc_hf23 Hirose_fpc_hf23 Hirose_fpc_hf23
    2022-08-17 20:09:23下载
    积分:1
  • 696518资源总数
  • 105717会员总数
  • 10今日下载