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:RE many times when using java.

Posted by fishing_test at 2009-05-22 13:42:10 on Problem 2366
In Reply To:RE many times when using java. Posted by:fishing_test at 2009-05-22 13:41:19
 This is my java code for input:
        Scanner cin = new Scanner(System.in);
        int n = 0;
        try {
            //String line = stdin.readLine().trim();

            n = cin.nextInt();

            for (int i = 1; i <= n; i++) {

                //line = stdin.readLine().trim();
                a[i] = cin.nextInt();
            }

            //line = stdin.readLine().trim();

            int m = cin.nextInt();

            b = new int[m + 1];
            b[0] = -5000000;

            for (int i = 1; i <= m; i++) {
              //  line = stdin.readLine().trim();
                b[i] = cin.nextInt();
            }
        } catch (Exception e) {
            while (true) {
            }
        }

  
What is wrong?

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