G2A Many GEOs
SHARE
TWEET

Untitled

a guest Feb 24th, 2013 255 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Created with IntelliJ IDEA.
  3.  * User: Fcdkbear
  4.  * Date: 11.02.13
  5.  * Time: 16:48
  6.  * To change this template use File | Settings | File Templates.
  7.  */
  8.  
  9. import java.util.Scanner;
  10. public class test {
  11.         public static void main(String [] args)
  12.         {
  13.                 Scanner sc=new Scanner(System.in);
  14.                 int n=sc.nextInt();
  15.                 int T=sc.nextInt();
  16.                 int res=-2000000000;
  17.                 for (int i = 0; i<n; ++i)
  18.                 {
  19.                         int f=sc.nextInt();
  20.                         int t=sc.nextInt();
  21.                         int cur=f;
  22.                         if (t>T)
  23.                                 cur-=(t-T);
  24.                         res=Math.max(res,cur);
  25.                 }
  26.                 System.out.println(res);
  27.         }
  28. }
RAW Paste Data
Ledger Nano X - The secure hardware wallet
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top