题意:给你一个函数和一些系数,给你一堆询问,求函数值. 根据s的符号,分成两组讨论,函数值与比x小的系数数量有关,二分输出答案. #include<cstdio> #include<algorithm> using namespace std; +; int A[maxn]; int B[maxn]; int sz1,sz2; int main() { // freopen("in.txt","r",stdin); int n; scanf(…
M. Heaviside Function Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100187/problem/M Description Heaviside function is defined as the piecewise constant function whose value is zero for negative argument and one for non-negat…
Time Limit: 7000/3500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2229 Accepted Submission(s): 252 Problem Description The shorter, the simpler. With this problem, you should be convinced of this truth. Y…
传送门 A. Ariel time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output King Triton really likes watching sport competitions on TV. But much more Triton likes watching live competitions. So Triton de…
A - Luggage DistributionTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87493#problem/A Description All provident tourists know about low-cost airlines. Those who used them at least once also know th…
J - Sockets Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Valera has only one electrical socket in his flat. He also has m devices which require electricity to work. He's got n plug multipliers to plug the devices, the…