fork(8) download
  1. #include <iostream>
  2. #include <cstdio>
  3. using namespace std;
  4.  
  5. int main(){
  6. #ifndef ONLINE_JUDGE
  7. freopen("date.in","r",stdin);
  8. freopen("date.out","w",stdout);
  9. #endif
  10. int n, s;
  11. cin.sync_with_stdio(false);
  12. cin >> n >> s;
  13. int sol = 100;
  14. bool ok = 0;
  15. for(int i = 1;i <= n; ++i){
  16. int x, y;
  17. cin >> x >> y;
  18. if(x < s){
  19. if(y)
  20. sol = min(sol,y);
  21. }
  22. if(x < s || (x==s && y==0))
  23. ok = 1;
  24. }
  25. if(!ok)
  26. cout<<"-1\n";
  27. else
  28. cout<<100-sol<<"\n";
  29. return 0;
  30. }
  31.  
Success #stdin #stdout 0s 3476KB
stdin
Standard input is empty
stdout
-1