Advertisement
Guest User

Untitled

a guest
Aug 30th, 2014
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #include<iostream>
  2. #include<algorithm>
  3. #include<cstring>
  4. #include<map>
  5. #include<set>
  6. #include<queue>
  7. #include<cmath>
  8. using namespace std;
  9.  
  10. int main(){
  11. int ans=-1;
  12. int n;
  13. int s;
  14. cin>>n>>s;
  15. int ans1=-1;
  16. for(int i=0;i<n;++i){
  17. int t1,t2;
  18. cin>>t1>>t2;
  19. if(s>t1 & t2>0 && ans<100-t2)ans=100-t2,ans1=t2;
  20. if(s==t1 && t2==0&& ans==-1)ans=0,ans1=0;
  21. }
  22. cout<<ans1;
  23. //system("pause");
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement