当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5760:Palindrome Bo

题目描述
There is an array with $n$ elements named $a$.If $seq$ is a palindrome subsequence of $a$,whose elements are increasing from the middle to both ends,then we call it a BoBo sequence.

Two BoBo sequence are considered different if and only if they have different length or there is at least one position has a different number.

Your task is to calculate how many different longest BoBo sequence are there in $a$.
输入解释
There are several test cases.

The first line contains an integer $n$.

The second contains $n$ numbers indicating $a_i$.

$1\leq n\leq 5000,1\leq a_i\leq 20000$
输出解释
One line two number indicating the length of the longest BoBo sequence and the quantity of them.

answer mod 10^9+7
输入样例
5
1 1 1 1 1 
5
2 2 3 2 2
输出样例
5 1
4 1
来自杭电HDUOJ的附加信息
Author 绍兴一中
Recommend wange2014

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5760

最后修改于 2020-10-25T23:25:26+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
12000/6000MS(Java/Others) 524288/524288K(Java/Others)