题意:变形的约瑟夫环模型,每个人有一个数字a,从第K个人开始出列,如果数字是正的,就往后数a个人出列,如果书负数,就往反方向数。然后用最基本的线段树处理约瑟夫环的方法即可但是题目要求的是第x个出列的人的名字,x为1-N中约数最多的数中的最小的那个。这里需要求反素数,即不大于N约数最多的。写起来比较多...
分类:
其他好文 时间:
2014-07-15 08:50:32
阅读次数:
241
There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi...
分类:
其他好文 时间:
2014-07-09 13:31:26
阅读次数:
239
Who Gets the Most Candies?
Time Limit: 5000MS
Memory Limit: 131072K
Total Submissions: 9416
Accepted: 2868
Case Time Limit: 2000MS
Description
N children are s...
分类:
其他好文 时间:
2014-07-09 12:46:35
阅读次数:
234
Problem Description:There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to...
分类:
其他好文 时间:
2014-07-07 16:22:28
阅读次数:
129
There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi...
分类:
其他好文 时间:
2014-07-01 23:57:55
阅读次数:
356
题目
There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these children subjected to the following requirements:
Each child must have...
分类:
其他好文 时间:
2014-06-30 17:18:04
阅读次数:
177
Candy
Total Accepted: 12392 Total
Submissions: 68386My Submissions
There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these childre...
分类:
其他好文 时间:
2014-06-29 23:15:17
阅读次数:
228
There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi...
分类:
其他好文 时间:
2014-06-26 20:46:27
阅读次数:
144
【题目】
There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these children subjected to the following requirements:
Each child must have at least one candy.
Children with a higher rating get more candie...
分类:
其他好文 时间:
2014-06-26 13:37:26
阅读次数:
265
There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requi...
分类:
其他好文 时间:
2014-06-22 13:19:27
阅读次数:
180