Created
October 8, 2015 02:32
-
-
Save kunishi/34897733ed4b879b9c48 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @JUDGE_ID: 26089N problem_no Java "" | |
import java.io.*; | |
import java.util.*; | |
class Main { | |
static String readLn(int max) { | |
byte lin[] = new byte[max]; | |
int l = 0; | |
int car = -1; | |
String line = ""; | |
try { | |
while (l < max) { | |
car = System.in.read(); | |
if ((car < 0) || (car == '\n')) | |
break; | |
lin[l ++] += car; | |
} | |
} catch (IOException e) { | |
return null; | |
} | |
if ((car < 0) && (l == 0)) | |
return null; | |
return (new String(lin, 0, l)); | |
} | |
public static void main(String args) { | |
Main mywork = new Main(); | |
myWork.begin(); | |
} | |
void begin() { | |
String input; | |
StringTokenizer idata; | |
while ((input = Main.readLn(255)) != null) { | |
idata = new StringTokenizer(input); | |
// processing input data | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment