fork(6) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. public class Main
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. InputReader in=new InputReader(System.in);
  13. //code from here. Use this InputReader just as you use Scanner.
  14. // and use the out just as you use System.out
  15.  
  16.  
  17.  
  18.  
  19. out.flush();
  20. }
  21. }
  22.  
  23. class InputReader{
  24. private InputStream stream;
  25. private byte[] buf = new byte[1024];
  26. private int curChar;
  27. private int numChars;
  28.  
  29. public InputReader(InputStream stream) {
  30. this.stream = stream;
  31. }
  32.  
  33. public int read() {
  34. if (numChars == -1)
  35. throw new UnknownError();
  36. if (curChar >= numChars) {
  37. curChar = 0;
  38. try {
  39. numChars = stream.read(buf);
  40. } catch (IOException e) {
  41. throw new UnknownError();
  42. }
  43. if (numChars <= 0)
  44. return -1;
  45. }
  46. return buf[curChar++];
  47. }
  48.  
  49.  
  50. public int nextInt() {
  51. return Integer.parseInt(next());
  52. }
  53.  
  54. public long nextLong() {
  55. return Long.parseLong(next());
  56. }
  57.  
  58. public String nextString() {
  59. return next();
  60. }
  61.  
  62. public String next() {
  63. int c = read();
  64. while (isSpaceChar(c))
  65. c = read();
  66. do {
  67. res.appendCodePoint(c);
  68. c = read();
  69. } while (!isSpaceChar(c));
  70.  
  71. return res.toString();
  72. }
  73.  
  74. public String nextLine() {
  75. int c = read();
  76. while (c != '\n' && c != -1) {
  77. if (c != '\r')
  78. buf.appendCodePoint(c);
  79. c = read();
  80. }
  81. return buf.toString();
  82. }
  83. public int peek() {
  84. if (numChars == -1)
  85. return -1;
  86. if (curChar >= numChars) {
  87. curChar = 0;
  88. try {
  89. numChars = stream.read(buf);
  90. } catch (IOException e) {
  91. return -1;
  92. }
  93. if (numChars <= 0)
  94. return -1;
  95. }
  96. return buf[curChar];
  97. }
  98.  
  99. public boolean hasNext() {
  100. int value;
  101. while (isSpaceChar(value = peek()) && value != -1)
  102. read();
  103. return value != -1;
  104. }
  105.  
  106. private boolean isSpaceChar(int c) {
  107. return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
  108. }
  109. }
Success #stdin #stdout 0.04s 2184192KB
stdin
Standard input is empty
stdout
Standard output is empty