摘要:
一、题目描述There is a permutation P with n integers from 1 to n. You have to calculate its inversion number, which is the number of pairs of Pi an... 阅读全文
摘要:
一、题目描述A thief has robbed a bank in city 1 and he wants to go to city N. The police know that the thief will choose the shortest path to get t... 阅读全文
摘要:
一、题目描述Let us define a regular brackets sequence in the following way:Empty sequence is a regular sequence.If S is a regular sequence, then (S... 阅读全文
摘要:
一、题目描述Given a sequence A = , let sequence B = be a subsequence of A if there exists a strictly increasing sequence ( i1 is a subsequence of... 阅读全文
摘要:
一、题目描述Given a polynomial and the value of the variable x, you task is to calculate the value of the polynomial.二、输入The first line of the inpu... 阅读全文