#include <iostream>
#include <iterator>
#include <numeric>
int main() {
int arr[5] = {100};
std::partial_sum(arr, std::end(arr), arr,
[](int a, int b) {
return a - 20;
});
for (auto n : arr)
std::cout << n << std::endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8aXRlcmF0b3I+CiNpbmNsdWRlIDxudW1lcmljPgoKaW50IG1haW4oKSB7CgogICAgaW50IGFycls1XSA9IHsxMDB9OwoKICAgIHN0ZDo6cGFydGlhbF9zdW0oYXJyLCBzdGQ6OmVuZChhcnIpLCBhcnIsCiAgICAgICAgICAgICAgICAgICAgIFtdKGludCBhLCBpbnQgYikgewogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYSAtIDIwOwogICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICBmb3IgKGF1dG8gbiA6IGFycikKICAgICAgICBzdGQ6OmNvdXQgPDwgbiA8PCBzdGQ6OmVuZGw7Cn0=