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

Codeforces Round 925 (Div. 3) 1931D. Divisible Pairs Solution

    Problem Link  :   https://codeforces.com/contest/1931/problem/D S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. ...

Powered by Blogger.