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

注意 本题有大坑2个!!

Posted by suncongbo at 2017-02-27 20:40:57 on Problem 1083
(1)最基本的,起点l可能小于终点r
(2)对于每一个区间,一定是从一个奇数号开始加到一个偶数号,即
if(l%2 == 0) l--; ///若l为偶数号,则从它的前一个(奇数)开始加
if(r%2 == 1) r++; ///若r为奇数号,则加到它的后一个(偶数)

为此贡献WA 1次

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