示例#1
0
文件: A.java 项目: hiroshi-cl/wakaba
 private static void setStream(String in, String out) {
   try {
     System.setIn(new BufferedInputStream(new FileInputStream(in)));
     System.setOut(new PrintStream(out));
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
示例#2
0
 /** @param args */
 public static void main(String[] args) throws Exception {
   File file = new File("input.txt");
   if (file.exists()) {
     System.setIn(new BufferedInputStream(new FileInputStream("input.txt")));
   }
   out = System.out;
   bw = new BufferedWriter(new PrintWriter(out));
   // sc =  new Scanner(System.in);
   br = new BufferedReader(new InputStreamReader(System.in));
   C231 t = new C231();
   t.solve();
   bw.close();
 }