Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
ac了,总结下这道题格式输入输出比较麻烦,要用long long(vc不支持,不过poj支持),_int64vc倒是支持,结果这里又不支持了。。。(我用c++,不知道g++怎么样) 要用O(nlogn)做,暴力肯定超时 先排序,再用o(n)做就可以了 不要忘记初始化,还有sum和数组都要用long long的 输入输出时用%I64d(重要!) cout和cin会超。。。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator