Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- double ma[2100], ans, mi[2100];
- int a, b, c;
- int main()
- {
- double m[71] = {0, 22, 44, 64.33, 84.67, 105, 124, 143, 162, 181, 200, 218, 236, 254, 272, 290, 308, 326, 344,
- 362, 380, 392.13, 404.25, 416.38, 428.5, 440.63, 452.75, 464.88, 477, 489.13, 501.25, 513.38, 525.5,
- 537.63, 549.75, 561.88, 574, 586.13, 598.25, 610.38, 622.5, 634.63, 646.75, 658.88, 671, 683.13, 695.25,
- 707.38, 719.5, 731.63, 743.75, 755.88, 768, 780.13, 792.25, 804.38, 816.5, 828.63, 840.75, 852.88, 865,
- 863.5, 862, 860.5, 859, 857.5, 856, 854.5, 853, 851.5, 850};
- cin >> a >> b >> c;
- ans = 1000000000;
- for (int i = 1; i <= 70; i++) {
- ma[i] = m[i];
- mi[i] = ma[i];
- }
- for (int i = 71; i <= 2012; i++) {
- ma[i] = ma[i - 1] + 15.71;
- mi[i] = ma[i];
- }
- for (int i = 70; i >= 59; --i) {
- mi[i] = 850;
- }
- for (int i = 0; i <= 2 * c; i++){
- double f = mi[b + i] + mi[a + 2 * c - i];
- if (mi[b + i] != 0) f += 10;
- if (mi[a + 2 *c - i] != 0) f += 10;
- double s = mi[a + i] + mi[b + 2*c - i];
- if (mi[a + i] != 0) s += 10;
- if (mi[b + 2 * c - i] != 0) s += 10;
- ans = min(ans, min(s, f));
- }
- cout << fixed << setprecision(4) << ans;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement