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:请教高手:为什么在vc通过,在这里提交会出现“run time error”?

Posted by hawk at 2003-11-18 01:13:30 on Problem 1006
In Reply To:请教高手:为什么在vc通过,在这里提交会出现“run time error”? Posted by:90301118 at 2003-11-17 22:28:58
1。不看你程序回答如下:你在vc过了sample就过了的话,为什么还要提交来测?就因为我这边有复杂的多的测试数据,一般来说,sample是最简单的情况,过sample是很容易的事情,意义不大。
2。看了你程序:题目告诉你只有10组数据吗?你开了j[10],如果测试数据中大于是10组,你就数组越界,在c++中就是内存访问错,当然是runtime error
3。题目之所以不告诉你有几组,就因为不需要知道。输入和输出是两个流,你没必要都保存下来再输出,算出一个就可以输出一个了。

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