import java.io.*;import java.util.*; class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String[] input = in.readLine().split(" "); long first = Long.parseLong(input[0]); long second = Long.parseLong(input[1]); long multiply = first * second; while(second != 0) { long temp = first; first = second; seco..
import java.io.*;import java.util.*; class Main { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int count = Integer.parseInt(in.readLine()); String[] array = new String[count]; for(int i=0; i lengthOfSecond) { return 1; } else { if(lengthOfFirst == lengthOfSecond) { return o1.compareTo(o2); } else { return -1..
import java.io.*;import java.util.*; class Main { static ArrayList[] arrayList; static boolean[] isChecked; public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); String[] firstLine = in.readLine().split(" "); final int numberOfVertex = Integer.parseInt(firstLine[0]); final int numberOfEdge = Integer.parseInt(firstLin..