Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #define fto(i, l, r) for (int i=l; i<=r; ++i)
- using namespace std;
- int hs, hu, m[8], w[8], ans = 0;
- int d[] = {0, 500, 1000, 1500, 2000, 2500};
- float s[8];
- int main() {
- #ifndef ONLINE_JUDGE
- freopen("UncowedForces.inp", "r", stdin);
- #endif // ONLINE_JUDGE
- fto(i, 1, 5) scanf("%d", &m[i]);
- fto(i, 1, 5) scanf("%d", &w[i]);
- scanf("%d%d", &hs, &hu);
- fto(i, 1, 5)
- {
- float tmp = 0.3 * d[i];
- float _tmp = (1 - m[i]/250) * d[i] - 50 * w[i];
- cout << tmp << " " << _tmp << endl;
- if (tmp > _tmp) s[i] = tmp; else s[i] = _tmp;
- }
- fto(i, 1, 5) cout << s[i] << " "; cout << endl;
- fto(i, 1, 5) ans += (int) s[i];
- ans += 100 * hs - 50 * hu;
- cout << ans;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment