fork(1) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. const int RED = 2400;
  6.  
  7. int main() {
  8. int n;
  9. cin >> n;
  10. bool good = false;
  11. for (int i = 0; i < n; i++) {
  12. string handle;
  13. int before, after;
  14. cin >> handle >> before >> after;
  15. if (before >= RED && after > before) {
  16. good = true;
  17. break;
  18. }
  19. }
  20.  
  21. if (good) {
  22. cout << "YES";
  23. } else {
  24. cout << "NO";
  25. }
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0s 3464KB
stdin
Standard input is empty
stdout
NO