Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javafx.util.Pair;
- import java.io.*;
- import java.lang.reflect.Array;
- import java.nio.channels.InterruptedByTimeoutException;
- import java.util.*;
- import java.io.IOException;
- import java.io.InputStream;
- public class anime {
- public static void main(String[] args) throws IOException {
- InputStream inputStream = System.in;
- OutputStream outputStream = System.out;
- InputReader in = new InputReader(inputStream);
- PrintWriter out = new PrintWriter(outputStream);
- Task solver = new Task();
- int t = 1;
- for(int i = 0; i < t; i++) {
- solver.solve(in, out);
- }
- out.close();
- }
- static class Task {
- public void solve(InputReader in, PrintWriter out) throws IOException {
- }
- private long gcd(long a, long b) {
- while (b > 0) {
- long t = a % b;
- a = b;
- b = t;
- }
- return a;
- }
- }
- static class InputReader {
- public BufferedReader reader;
- public StringTokenizer tokenizer;
- public InputReader(InputStream stream) {
- reader = new BufferedReader(new InputStreamReader(stream), 32768);
- tokenizer = null;
- }
- public String next() {
- while (tokenizer == null || !tokenizer.hasMoreTokens()) {
- try {
- tokenizer = new StringTokenizer(reader.readLine());
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
- return tokenizer.nextToken();
- }
- public long nextLong() {
- return Long.parseLong(next());
- }
- public int nextInt() {
- return Integer.parseInt(next());
- }
- }
- static class pll implements Comparable<pll> {
- public long first;
- public long second;
- public static pll makePair(long first, long second) {
- return new pll(first, second);
- }
- public pll(long first, long second) {
- this.first = first;
- this.second = second;
- }
- public int equals(pll o) {
- if(o.first > this.first) return -1;
- if(o.first < this.first) return 1;
- if(o.first == this.first && o.second > this.second) return -1;
- if(o.first == this.first && o.second < this.second) return 1;
- return 0;
- }
- public int compareTo(pll o) {
- int value = Long.compare(first, o.first);
- if (value != 0) {
- return value;
- }
- return Long.compare(second, o.second);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement