http://acm.hust.edu.cn/vjudge/contest/view.action?cid=102271#problem/B Description Kevin Sun has just finished competing in Codeforces Round #334! The round was 120 minutes long and featured five problems with maximum point values of 500, 1000, 1500,…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Kevin Sun has just finished competing in Codeforces Round #334! The round was 120 minutes long and featured five problems with maximum point valu…
codeforces 633E Startup Funding 题意 枚举左端点,对于每个左端点求一个最大的右端点使得最大. 对于得到的这个数组,随机选择k个数,求最小值期望. 题解 对于每个左端点,右端点右移时,是在一个递增.一个递减的函数中取min,二分即可解决. 接下来的问题也很好解决,可以先取log避免精度上溢 代码 #include<bits/stdc++.h> using namespace std; #define fi first #define se second #defi…
C. Ancient Berland Circus time limit per test 2 seconds memory limit per test 64 megabytes input standard input output standard output Nowadays all circuses in Berland have a round arena with diameter 13 meters, but in the past things were different.…
B. Marathon time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Valera takes part in the Berland Marathon. The marathon race starts at the stadium that can be represented on the plane as a squa…