#include <stdio.h>
float sum(float *p, int n) {
if (n == 1) return *p;
for (int i = 0; i < n/2; i++) {
p[i] += p[i+n/2];
}
return sum(p, n/2);
}
int main(void) {
float x[1024*1024];
for (int i = 0; i < 1024*1024; i++) {
x[i] = 30504.00005f;
}
float acc = sum(x, 1024*1024);
acc /= (1024*1024);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgpmbG9hdCBzdW0oZmxvYXQgKnAsIGludCBuKSB7CiAgICBpZiAobiA9PSAxKSByZXR1cm4gKnA7CiAgICBmb3IgKGludCBpID0gMDsgaSA8IG4vMjsgaSsrKSB7CiAgICAgICAgcFtpXSArPSBwW2krbi8yXTsKICAgIH0KICAgIHJldHVybiBzdW0ocCwgbi8yKTsKfQoKaW50IG1haW4odm9pZCkgewogICAgZmxvYXQgeFsxMDI0KjEwMjRdOwogICAgZm9yIChpbnQgaSA9IDA7IGkgPCAxMDI0KjEwMjQ7IGkrKykgewogICAgICAgIHhbaV0gPSAzMDUwNC4wMDAwNWY7CiAgICB9CiAgICAKICAgIGZsb2F0IGFjYyA9IHN1bSh4LCAxMDI0KjEwMjQpOwogICAgCiAgICBhY2MgLz0gKDEwMjQqMTAyNCk7CiAgICBwcmludGYoIiVmXG4iLCBhY2MpOwogICAgcmV0dXJuIDA7Cn0=