Codeforces 1047 B. Cover Points Solution

Solve in C++:

  1. ///**********ALLAH IS ALMIGHTY************///
  2. ///AH Tonmoy
  3. ///Department of CSE
  4. ///Islamic University,Bangladesh
  5. #include<iostream>
  6. #include<math.h>
  7. #include<algorithm>
  8. using namespace std;
  9. int main()
  10. {
  11. int a,b,i,n,mx=0,c;
  12. while(cin>>n)
  13. {
  14. for(i=0; i<n; i++)
  15. {
  16. cin>>a>>b;
  17. mx=max(mx,a+b);
  18. }
  19. cout<<mx<<endl;
  20. }
  21. }

No comments

Most View Post

Recent post

RESTful APIs with CRUD Operations in Laravel 12| (2025)

  RESTful APIs serve as the foundation of modern web development. They follow a set of rules called Representational State Transfer (REST) t...

Powered by Blogger.