摘要: Description给出1~n的一个排列,统计该排列有多少个长度为奇数的连续子序列的中位数是b。中位数是指把所有元素从小到大排列后,位于中间的数。Input第一行为两个正整数n和b ,第二行为1~n 的排列。Output输出一个整数,即中位数为b的连续子序列个数。Sample Input7 45 ... 阅读全文
posted @ 2015-12-17 13:15 wzj_is_a_juruo 阅读(259) 评论(0) 推荐(0) 编辑
摘要: DescriptionInputOutputSample Input3 2 02 1 21 11 3Sample Output03HINTM,N#include#include#include#include#include#define rep(i,s,t) for(int i=s;i=t;i--... 阅读全文
posted @ 2015-12-17 12:54 wzj_is_a_juruo 阅读(224) 评论(0) 推荐(0) 编辑