competitive programming scripts on Linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.3 KiB

3 years ago
  1. import java.io.*;
  2. import java.util.*;
  3. public class Main {
  4. static PrintWriter out;
  5. static class FIO {
  6. BufferedReader in;
  7. StringTokenizer st;
  8. FIO() throws IOException {
  9. in = new BufferedReader(new InputStreamReader(System.in));
  10. out = new PrintWriter(System.out);
  11. }
  12. FIO(String name) throws IOException {
  13. in = new BufferedReader(new FileReader(name + ".in"));
  14. out = new PrintWriter(new FileWriter(name + ".out"));
  15. }
  16. String next() {
  17. while (st == null || !st.hasMoreTokens()) {
  18. try {
  19. st = new StringTokenizer(in.readLine());
  20. } catch (IOException e) {
  21. e.printStackTrace();
  22. }
  23. }
  24. return st.nextToken();
  25. }
  26. int ni() {
  27. return Integer.parseInt(next());
  28. }
  29. long nl() {
  30. return Long.parseLong(next());
  31. }
  32. double nd() {
  33. return Double.parseDouble(next());
  34. }
  35. }
  36. static FIO in;
  37. public static void main (String[] args) throws IOException {
  38. in = new FIO();
  39. new solver();
  40. out.close();
  41. }
  42. static class solver {
  43. solver() {
  44. }
  45. }
  46. }