Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:太出乎意料了。。。一次就AC了。。。

Posted by 2011339960140 at 2013-03-14 19:52:08 on Problem 2356
In Reply To:Re:太出乎意料了。。。一次就AC了。。。 Posted by:cssdnx at 2011-05-07 09:30:02
> 每次求前N项和,每个和对N取余,如果能出现0,那么就是答案,如果取了N次没有0,那么就有N个余数,余数的范围为1~n-1,所以必有两个相同的余数,那么取得这两个相同余数的前N项和的差就是答案~
说得好!

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator