static class InputReader {
public BufferedReader Reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
Reader = new BufferedReader(new InputStreamReader(System.in), 32768);
tokenizer = null;
}
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 int nextInt() {
return Integer.parseInt(next());
}
public long nextLong() {
return Long.parseLong(next());
}
public float nextFloat() {
return Float.parseFloat(next());
}
public double nextDouble() {
return Double.parseDouble(next());
}
}
Java快速读入法(from Petr)
最新推荐文章于 2024-03-02 23:40:55 发布
关键词由CSDN通过智能技术生成