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 frkstyc at 2008-03-23 17:29:25 on Problem 3544
In Reply To:这个题的输入数据格式是否有问题? Posted by:faen at 2008-03-23 17:18:31
> 我用Java搞得,我把除了初始化数据的地方都try,catch了,还是runtime error。
> 贴我数据读入部分:
>         BufferedReader cin = new BufferedReader(new InputStreamReader(System.in));
>         PrintWriter out = new PrintWriter(System.out);
>         StringTokenizer st = new StringTokenizer(cin.readLine().trim());
>         int n = Integer.parseInt(st.nextToken());
>         long t = Long.parseLong(st.nextToken());
>         long[] w = new long[n];
>         long[] d = new long[n];
>         long[] p = new long[n];
>         st = new StringTokenizer(cin.readLine().trim());
>         for (int i = 0; i < n; i++) {
>             w[i] = Long.parseLong(st.nextToken());
>         }
>         st = new StringTokenizer(cin.readLine().trim());
>         for (int i = 0; i < n; i++) {
>             d[i] = Long.parseLong(st.nextToken());
>         }
>         st = new StringTokenizer(cin.readLine().trim());
>         for (int i = 0; i < n; i++) {
>             p[i] = Long.parseLong(st.nextToken());
>         }
>         long[][] cap = new long[n][n];
>         for (int i = 0; i < n; i++) {
>             for (int j = 0; j < n; j++) {
>                 cap[i][j] = (w[i] * p[j] - d[j] * w[i] * t);
>             }
>         }
>         try {
>             //计算部分
>         } catch (Throwable e) {
>         }
> 
>         out.flush();
>     }

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