Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <algorithm>
- #include <vector>
- using namespace std;
- template <class T> T inline input(string s = ""){
- T _data;
- cout << s;
- cin >> _data;
- return _data;
- }
- int main(){
- int n = input<int>(), m = input<int>();
- cout << min(n, m) * 2 - 1 - ((n + m) % 2 == 0 && n != m? 1 : 0);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement