Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- typedef long long ll;
- int main() {
- ll n, m, t;
- cin >> n >> m >> t;
- if (n < m)
- swap(n, m);
- ll r = n - m;
- ll h, w;
- if (m % 2 == 0)
- h = 2;
- else h = 1;
- w = h + r;
- while (n * m - w * h > t) {
- w += 2;
- h += 2;
- }
- cout << (n - w) / 2;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement