| 
 | 
вернуться в форумC++ solution! #include <iostream> using namespace std; int main() {     unsigned long long n,m;     cin>>n>>m;     if(m>=n) cout<<2*(n-1)<<endl;     if(n>m) cout <<2*(m-1)+1<<endl; return 0; } Re: C++ solution! Orz...My solution is so complex... Re: C++ solution! You can even simpler))   #include <iostream> using namespace std; int main() {     unsigned long long iN, iM;     cin >> iN >> iM;     cout << min(2 * (iN - 1), 2 * (iM - 1) + 1); return 0; } Re: C++ solution! You don't really need unsigned long long.   Got AC with unsigned int.  |  
  | 
|