Partial Sum Accepted : Submit : Time Limit : MS Memory Limit : KB Partial Sum Bobo has a integer sequence a1,a2,…,an of length n. Each time, he selects two ends ≤l<r≤n and add |∑rj=l+1aj|−C into a counter which is zero initially. He repeats the selec
丽娃河的狼人传说 Time limit per test: 1.0 seconds Time limit all tests: 1.0 seconds Memory limit: megabytes 丽娃河是华师大著名的风景线.但由于学校财政紧缺,丽娃河边的路灯年久失修,一到晚上就会出现走在河边要打着手电的情况,不仅非常不方便,而且影响安全:已经发生了大大小小的事故多起. 方便起见,丽娃河可以看成是从 到 n 的一条数轴.为了美观,路灯只能安装在整数点上,每个整数点只能安装一盏路灯.经专业勘测,
Necklace Time Limit: 15000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4604 Accepted Submission(s): 1581 Problem Description Mery has a beautiful necklace. The necklace is made up of N magic balls. Each b
DQUERY - D-query #sorting #tree English Vietnamese Given a sequence of n numbers a1, a2, ..., an and a number of d-queries. A d-query is a pair (i, j) (1 ≤ i ≤ j ≤ n). For each d-query (i, j), you have to return the number of distinct elements in the
Radar Installation Time Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other) Total Submission(s) : 22 Accepted Submission(s) : 9 Problem Description Assume the coasting is an infinite straight line. Land is in one side of coa
Cleaning Shifts Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2743 Accepted: 955 Description Farmer John's cows, pampered since birth, have reached new heights of fastidiousness. They now require their barn to be immaculate. Farmer J