Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- import java.util.*;
- import java.lang.*;
- class Solution {
- public static void main(String[] args) throws IOException{
- //BufferedReader f = new BufferedReader(new FileReader(""));
- //PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("")));
- BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
- //out.close();
- }
- }
- Arrays.sort(sorted, new Comparator<Integer>(){
- public int compare(Integer i1, Integer i2){
- return Double.compare(yVal[index[i1]], yVal[index[i2]]);
- }
- });
- class pair{
- int x, y;
- public pair(int x, int y){
- this.x = x;
- this.y = y;
- }
- public int getx(){
- return x;
- }
- public int gety(){
- return y;
- }
- public void setx(int x){
- this.x = x;
- }
- public void sety(int y){
- this.y = y;
- }
- public String toString(){
- return "(" + x + ", " + y + ")";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement