摘要: 问题 E: Massage 题目描述 JSZKC feels so bored in the classroom that he wants to send massages to his girl friend. However, he can’t move to his girl friend 阅读全文
posted @ 2018-06-06 10:34 NeilThang 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 问题 G: JS Window 题目描述 JSZKC has an array A of N integers. More over, he has a Window of length M which means the Window can contain M continuous intege 阅读全文
posted @ 2018-06-06 10:16 NeilThang 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 问题 G: Factors of Factorial 题目描述 You are given an integer N. Find the number of the positive divisors of N!, modulo 109+7.Constraints1≤N≤103 输入 The inp 阅读全文
posted @ 2018-06-01 22:03 NeilThang 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 6463: Tak and Hotels II 题目描述 N hotels are located on a straight line. The coordinate of the i-th hotel (1≤i≤N) is xi.Tak the traveler has the followin 阅读全文
posted @ 2018-05-20 11:18 NeilThang 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 时间限制: 6 Sec 内存限制: 128 MB 题目描述 In GGO, a world dominated by gun and steel, players are fighting for the honor of being the strongest gunmen. Player Shi 阅读全文
posted @ 2018-05-12 21:01 NeilThang 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Orz has two strings of the same length: A and B. Now she wants to transform A into an anagram of B (which means, a rearrangement of B) by changin 阅读全文
posted @ 2018-05-12 20:30 NeilThang 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 时间限制: 10 Sec 内存限制: 128 MB 题目描述 Given l1,r1,l2,r2,l3,r3,l4,r4, please count the number of four-tuples (x1,x2,x3,x4) such that li≤ xi≤ ri and x1≠x2,x2≠x 阅读全文
posted @ 2018-05-12 13:41 NeilThang 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 传送门 题目描述 某大学有N个职员,编号为1~N。他们之间有从属关系,也就是说他们的关系就像一棵以校长为根的树,父结点就是子结点的直接上司。现在有个周年庆宴会,宴会每邀请来一个职员都会增加一定的快乐指数Ri,但是呢,如果某个职员的上司来参加舞会了,那么这个职员就无论如何也不肯来参加舞会了。所以,请你 阅读全文
posted @ 2018-05-08 21:39 NeilThang 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 传送门 题意要你构造一个序列,使得该序列的每个位置上的最长上升子序列的长度能构成给定的序列。 构造序列的元素要求还要求满足给定的上下界 solution 我们可以把给出的最长上升子序列的长度按升序排列,长度相同的按下标降序排列。 排完序后第一个数可以贪心的取其下界,同一层(即长度相同)的下标小的取值 阅读全文
posted @ 2018-05-02 17:07 NeilThang 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 传送门 题意:给你一条直线的斜率a和截距b,和某一时刻n个在直线上的点的横坐标,以及沿坐标轴方向的速度。问你这些点在(-∞,+∞)的时间内的碰撞次数。 solution 设两个点在t时刻相碰,有: x1+vx1t=x2+vx2tx1+vx1t=x2+vx2t y1+vy1t=y2+vy2ty1+vy 阅读全文
posted @ 2018-05-02 12:54 NeilThang 阅读(122) 评论(0) 推荐(0) 编辑