C. Jury Marks 这个题目虽然是只有1600,但是还是挺思维的. 有点难想. 应该可以比较快的推出的是这个肯定和前缀和有关, x x+a1 x+a1+a2 x+a1+a2+a3... x+sum=b 所以我们可以通过b来枚举每一个x,如果这个x可以满足找到m个b,那就说明这个x是合理的. 但是要注意的是,这个sum的去重,为什么要去重呢,因为如果不去虫,就是找到两个相同的 因为x=b-sum 所以可以只要枚举b[1]即可,因为对于每一个b,其中一个确定之后,剩下的b的位置也固定了.…
C. Jury Marks time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Polycarp watched TV-show where k jury members one by one rated a participant by adding him a certain number of points (may be…
C. Jury Marks time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Polycarp watched TV-show where k jury members one by one rated a participant by adding him a certain number of points (may be…
B. School Marks time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Little Vova studies programming in an elite school. Vova and his classmates are supposed to writen progress tests, for each…
Polycarp watched TV-show where k jury members one by one rated a participant by adding him a certain number of points (may be negative, i. e. points were subtracted). Initially the participant had some score, and each the marks were one by one added…