Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
没有问题,你的程序应该是被系统判了不响应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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator