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

请问这两段代码有何区别?(注释的和未注释的,一份ac,一份wa)

Posted by Christole at 2010-06-12 15:15:57 on Problem 2155
void modify(int x,int y,int delta){//这两段程序有区别?,为这个我错了2个小时!!!求教,这二者的区别!!! 
 int i,j,k;
   /* for (;x<=n;x+=lowbit(x))
         for (;y<=n;y+=lowbit(y))
             tree[x][y]+=delta;
 */
 for (i=x;i<=n;i+=lowbit(i))
         for (j=y;j<=n;j+=lowbit(j))
             tree[i][j]+=delta;
             
}

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