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 971 (Div. 4) 2009C. The Legend of Freya the Frog Solution

  Problem Link    https://codeforces.com/contest/2009/problem/C S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. h &g...

Powered by Blogger.