📜  模板竞技编程java代码示例

📅  最后修改于: 2022-03-11 14:52:29.210000             🧑  作者: Mango

代码示例1
static class FastScanner {
        BufferedReader br;
        StringTokenizer st;
        
        FastScanner(){
            br=new BufferedReader(new InputStreamReader(System.in));
            st=new StringTokenizer("");
        }
        
        String next() {
            while (!st.hasMoreTokens())
                try { 
                                        st=new StringTokenizer(br.readLine());                               
                                } catch (IOException e) {}
            return st.nextToken();
        }
        
        String nextLine(){
            return br.nextLine();
        }
        
        String[] nextArray(){
            return br.nextLine().split(" ");
        }
        
        int nextInt() {
            return Integer.parseInt(next());
        }
        
        long nextLong() {
            return Long.parseLong(next());
        }
    }