摘要: 一、题目描述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... 阅读全文
posted @ 2016-06-16 17:03 chenximcm 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 一、题目描述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... 阅读全文
posted @ 2016-06-16 13:23 chenximcm 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 一、题目描述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... 阅读全文
posted @ 2016-06-16 10:02 chenximcm 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 一、题目描述Given a sequence A = , let sequence B = be a subsequence of A if there exists a strictly increasing sequence ( i1 is a subsequence of... 阅读全文
posted @ 2016-06-16 09:51 chenximcm 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 一、题目描述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... 阅读全文
posted @ 2016-06-16 00:10 chenximcm 阅读(222) 评论(0) 推荐(0) 编辑