Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.util.*;
- public class __Solution {
- static final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
- public static void main(String[] args) {
- new __Solution().run();
- }
- BufferedReader in;
- PrintWriter out;
- StringTokenizer tok;
- void init() throws FileNotFoundException {
- if (false) {
- in = new BufferedReader(new InputStreamReader(System.in));
- out = new PrintWriter(System.out);
- } else {
- in = new BufferedReader(new FileReader("input.txt"));
- out = new PrintWriter("output.txt");
- }
- tok = new StringTokenizer("");
- }
- void run() {
- try {
- long timeStart = System.currentTimeMillis();
- init();
- solve();
- out.close();
- long timeEnd = System.currentTimeMillis();
- System.err.println("Time = " + (timeEnd - timeStart));
- } catch (Exception e) {
- e.printStackTrace();
- System.exit(-1);
- }
- }
- String readLine() throws IOException {
- return in.readLine();
- }
- String delimiter = " ";
- String readString() throws IOException {
- while (!tok.hasMoreTokens()) {
- String nextLine = readLine();
- if (null == nextLine) return null;
- tok = new StringTokenizer(nextLine);
- }
- return tok.nextToken(delimiter);
- }
- int readInt() throws IOException {
- return Integer.parseInt(readString());
- }
- long readLong() throws IOException {
- return Long.parseLong(readString());
- }
- public static int findMin(int[] array) {
- int min = array[0];
- for (int i = 0; i < array.length; i++) {
- if (array[i] < min) {
- min = array[i];
- }
- }
- return min;
- }
- public static int findMax(int[] array) {
- int max = array[0];
- for (int i = 0; i < array.length; i++) {
- if (array[i] > max) {
- max = array[i];
- }
- }
- return max;
- }
- void solve() throws IOException {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement