ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

第二十三篇英文翻译

2022-02-18 23:02:50  阅读:224  来源: 互联网

标签:英文翻译 第二十三 Palindromic sequence 单峰 Unimodal 序列 回文


出处:https://acs.jxnu.edu.cn/problem/NOIOPJCH0405223

重点单词:

decomposition n.分解,腐烂,变质;

unimodal adj.单峰的;

UNIMODAL PALINDROMIC DECOMPOSITIONS

 1000ms  65536K

描述:

A sequence of positive integers is Palindromic if it reads the same forward and backward. For example:

一系列由正整数组成的序列如果不管是从前往后读还是从后往前读都相同那么其是回文的。举例如下:

23 11 15 1 37 37 1 15 11 23
1 1 2 3 4 7 7 10 7 7 4 3 2 1 1
A Palindromic sequence is Unimodal Palindromic if the values do not decrease up to the middle value and then (since the sequence is palindromic) do not increase from the middle to the end For example, the first example sequence above is NOT Unimodal Palindromic while the second example is.

如果从开始到中间值没有减少,且(因为序列是回文序列)从中间到结尾值没有增加,那么回文序列就是单峰回文序列。例如,上面的第一个示例序列不是单峰回文序列,而第二个示例是单峰回文序列。

A Unimodal Palindromic sequence is a Unimodal Palindromic Decomposition of an integer N, if the sum of the integers in the sequence is N. For example, all of the Unimodal Palindromic Decompositions of the first few integers are given below:

单峰回文序列是整数N的单峰回文分解,如果序列中的整数和为N。例如,前几个整数的所有单峰回文分解如下所示:
1: (1)
2: (2), (1 1)
3: (3), (1 1 1)
4: (4), (1 2 1), (2 2), (1 1 1 1)
5: (5), (1 3 1), (1 1 1 1 1)
6: (6), (1 4 1), (2 2 2), (1 1 2 1 1), (3 3),
(1 2 2 1), ( 1 1 1 1 1 1)
7: (7), (1 5 1), (2 3 2), (1 1 3 1 1), (1 1 1 1 1 1 1)
8: (8), (1 6 1), (2 4 2), (1 1 4 1 1), (1 2 2 2 1),
(1 1 1 2 1 1 1), ( 4 4), (1 3 3 1), (2 2 2 2),
(1 1 2 2 1 1), (1 1 1 1 1 1 1 1)

Write a program, which computes the number of Unimodal Palindromic Decompositions of an integer.

编写一个程序,计算整数的单峰回文分解数。

输入:

Input consists of a sequence of positive integers, one per line ending with a 0 (zero) indicating the end. 输入由一系列正整数组成,每行一个,以0(零)表示结束。

输出:

For each input value except the last, the output is a line containing the input value followed by a space, then the number of Unimodal Palindromic Decompositions of the input value. See the example on the next page. 对于除最后一个之外的每个输入值,输出是一行,包含输入值,后跟一个空格,然后是输入值的单峰回文分解数。请参见下一页的示例。

样例输入:

2
3
4
5
6
7
8
10
23
24
131
213
92
0

样例输出:

2 2
3 2
4 4
5 3
6 7
7 5
8 11
10 17
23 104
24 199
131 5010688
213 1055852590
92 331143

注释:

N < 250

Source: Greater New York 2002

标签:英文翻译,第二十三,Palindromic,sequence,单峰,Unimodal,序列,回文
来源: https://www.cnblogs.com/cilinmengye/p/15911520.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有