1715A---- A better Approach

Revision en1, by Aayuushh19, 2022-08-21 05:22:44

https://mirror.codeforces.com/contest/1715/problem/A

void solve(){ ll n,m;cin>>n>>m; if(n==1 and m==1){ cout<<0<<endl; return; } ll a = m-1; ll b = n-1; ll c = min(n,m)-1; cout<<a+b+c+1<<endl;

}

Tags maths, constructive algorithms, *800

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Aayuushh19 2022-08-21 05:22:44 275 Initial revision (published)