Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<algorithm>
- #include<cstring>
- #include<map>
- #include<set>
- #include<queue>
- #include<cmath>
- using namespace std;
- int main(){
- int ans=-1;
- int n;
- int s;
- cin>>n>>s;
- int ans1=-1;
- for(int i=0;i<n;++i){
- int t1,t2;
- cin>>t1>>t2;
- if(s>t1 & t2>0 && ans<100-t2)ans=100-t2,ans1=t2;
- if(s==t1 && t2==0&& ans==-1)ans=0,ans1=0;
- }
- cout<<ans1;
- //system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement