摘要:
DescriptionWe are given a integer sequence, your job is find the length of the longest contiguous subsequence that is strictly increasing or strictly decreasing.InputFirst number, represent how many test cases.For each test case the first number is.Thenpositive integers are followed, all of them are 阅读全文
摘要:
DescriptionEggsAlec has a lot of eggs. One day, he want to sort them in a ascending sequence by weight. But he only can switch two eggs which are adjoining by each other because he has two hands only. Now he ask for your help, and you are enthusiastic. You decide help him calculate the total numbers 阅读全文