Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int crawl(int n, int m)
- {
- int rows = n / 3;
- if (n % 3) ++rows;
- return (n - rows) * m;
- }
- int main()
- {
- int n, m;
- cin >> n >> m;
- cout << max(crawl(n, m), crawl(m, n));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement