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

感谢LyuuSyouHa,感谢大家的讨论,不过有一个小问题。

Posted by baicaited at 2009-02-22 20:12:26 on Problem 1050
这个dp的方式好,比我自己想到的4个参数强多了!我的1stdp完结了

但是,开内存问题,用new开二维数组好像很麻烦,
这有个三维数组的例子,不知道有没有简单点的方法。欢迎大家mail我。
int main()
  {
  int ***array;
  int i,j;
  int side=5,height=6,width=7;
  array=new int**[side];//申请side个面
  for(i=0;i
  {
  array[i]=new int*[height];
  for(j=0;j
  array[i][j]=new int[width];
  }
  //测试用
  array[0][0][0]=9;
  cout<
  return 0;
  } 

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