F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39229712_13341\Main.java:1: 错误: 解析时已到达文件结尾
import java.io.*; import java.util.*; import java.math.*;  public class Main {     public static void main(String[] args) {         InputStream inputStream = System.in;         OutputStream outputStream = System.out;         InputReader in = new InputReader(inputStream);         PrintWriter out = new PrintWriter(outputStream);         TaskA solver = new TaskA();         solver.solve(1, in, out);         out.close();     }      static class TaskA {          static HashMap<Integer, Integer> map = new HashMap<>();          class P{             int a,b,c;         }           public void solve(int testNumber, InputReader in, PrintWriter out) {             int  t=in.nextInt();             while (t-->0){                 int n = in.nextInt();                 int q = in.nextInt();                 P[] p = new P[n];                 for (int i = 0; i < n; i++) {                     p[i] = new P();                     p[i].a = in.nextInt();                     p[i].b = in.nextInt();                     p[i].c = in.nextInt();                 }                 for (int i = 0; i < q; i++) {                     int x = in.nextInt();                     int y = in.nextInt();                     int max = 0;                     for (int j = 0; j < n; j++) {                         max = Math.max(max,Math.min(p[j].c,Math.abs(x-p[j].a)+Math.abs(y-p[j].b)));                     }                     out.println(max);                 }             }         }     }      static class InputReader {         public BufferedReader reader;         public StringTokenizer tokenizer;          public InputReader(InputStream stream) {             reader = new BufferedReader(new InputStreamReader(stream), 32768);             tokenizer = null;         }          boolean hasNext() {             while (tokenizer == null || !tokenizer.hasMoreTokens()) {                 try {                     tokenizer = new StringTokenizer(reader.readLine());                 } catch (Exception e) {                     return false;                     // TODO: handle exception                 }             }             return true;         }          public String next() {             while (tokenizer == null || !tokenizer.hasMoreTokens()) {                 try {                     tokenizer = new StringTokenizer(reader.readLine());                 } catch (IOException e) {                     throw new RuntimeException(e);                 }             }             return tokenizer.nextToken();         }          public String nextLine() {             String str = null;             try {                 str = reader.readLine();             } catch (IOException e) {                 e.printStackTrace();             }             return str;         }          public int nextInt() {             return Integer.parseInt(next());         }          public double nextDouble() {             return Double.parseDouble(next());         }          public long nextLong() {             return Long.parseLong(next());         }          public BigInteger nextBigInteger() {             return new BigInteger(next());         }          public BigDecimal nextBigDecimal() {             return new BigDecimal(next());         }      } }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ^
0_0_39229712_13341\Main.java:1: 错误: 解析时已到达文件结尾
import java.io.*; import java.util.*; import java.math.*;  public class Main {     public static void main(String[] args) {         InputStream inputStream = System.in;         OutputStream outputStream = System.out;         InputReader in = new InputReader(inputStream);         PrintWriter out = new PrintWriter(outputStream);         TaskA solver = new TaskA();         solver.solve(1, in, out);         out.close();     }      static class TaskA {          static HashMap<Integer, Integer> map = new HashMap<>();          class P{             int a,b,c;         }           public void solve(int testNumber, InputReader in, PrintWriter out) {             int  t=in.nextInt();             while (t-->0){                 int n = in.nextInt();                 int q = in.nextInt();                 P[] p = new P[n];                 for (int i = 0; i < n; i++) {                     p[i] = new P();                     p[i].a = in.nextInt();                     p[i].b = in.nextInt();                     p[i].c = in.nextInt();                 }                 for (int i = 0; i < q; i++) {                     int x = in.nextInt();                     int y = in.nextInt();                     int max = 0;                     for (int j = 0; j < n; j++) {                         max = Math.max(max,Math.min(p[j].c,Math.abs(x-p[j].a)+Math.abs(y-p[j].b)));                     }                     out.println(max);                 }             }         }     }      static class InputReader {         public BufferedReader reader;         public StringTokenizer tokenizer;          public InputReader(InputStream stream) {             reader = new BufferedReader(new InputStreamReader(stream), 32768);             tokenizer = null;         }          boolean hasNext() {             while (tokenizer == null || !tokenizer.hasMoreTokens()) {                 try {                     tokenizer = new StringTokenizer(reader.readLine());                 } catch (Exception e) {                     return false;                     // TODO: handle exception                 }             }             return true;         }          public String next() {             while (tokenizer == null || !tokenizer.hasMoreTokens()) {                 try {                     tokenizer = new StringTokenizer(reader.readLine());                 } catch (IOException e) {                     throw new RuntimeException(e);                 }             }             return tokenizer.nextToken();         }          public String nextLine() {             String str = null;             try {                 str = reader.readLine();             } catch (IOException e) {                 e.printStackTrace();             }             return str;         }          public int nextInt() {             return Integer.parseInt(next());         }          public double nextDouble() {             return Double.parseDouble(next());         }          public long nextLong() {             return Long.parseLong(next());         }          public BigInteger nextBigInteger() {             return new BigInteger(next());         }          public BigDecimal nextBigDecimal() {             return new BigDecimal(next());         }      } }
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-23 06:38:34, Gzip enabled