Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.93 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.*;
  3. import java.lang.*;
  4.  
  5.  
  6. class Solution {
  7.  
  8.     public static void main(String[] args) throws IOException{
  9.         //BufferedReader f = new BufferedReader(new FileReader(""));
  10.         //PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("")));
  11.         BufferedReader f = new BufferedReader(new InputStreamReader(System.in));
  12.  
  13.      
  14.        
  15.         //out.close();
  16.     }
  17.  
  18. }
  19.  
  20. Arrays.sort(sorted, new Comparator<Integer>(){
  21.   public int compare(Integer i1, Integer i2){
  22.     return Double.compare(yVal[index[i1]], yVal[index[i2]]);
  23.   }
  24. });
  25.  
  26. class pair{
  27.     int x, y;
  28.     public pair(int x, int y){
  29.         this.x = x;
  30.         this.y = y;
  31.     }
  32.  
  33.     public int getx(){
  34.         return x;
  35.     }
  36.  
  37.     public int gety(){
  38.         return y;
  39.     }
  40.  
  41.     public void setx(int x){
  42.         this.x = x;
  43.     }
  44.  
  45.     public void sety(int y){
  46.         this.y = y;
  47.     }
  48.  
  49.     public String toString(){
  50.         return "(" + x + ", " + y + ")";
  51.     }
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement