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

非常诡异的问题,呼唤大牛

Posted by MaJia008 at 2009-11-12 00:10:44 on Problem 2229
用Java写的,写成

Scanner sc = new Scanner(System.in);
long n = sc.nextLong();
int[] dp = new int[(int) (n + 1)];

就会有Runtime Error

如果一开始就定义数组的话,写成

Scanner sc = new Scanner(System.in);
int dp[] = new int[1000001];
long n = sc.nextLong();

就会直接AC
不知道哪位大牛能解释下

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