#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
const unsigned int RESULTING_SEQUENCE_SIZE = 10;
int main() {
double currentMember;
vector <double> inputSequence;
double resultingSequence[RESULTING_SEQUENCE_SIZE]{0};
// Adds a new element to the vector to the end of the input stream
while (cin >> currentMember) {
inputSequence.push_back(currentMember);
}
sort(inputSequence.begin(), inputSequence.end()); // Sort ascending initial sequence
for (int i = 0; i < RESULTING_SEQUENCE_SIZE; i++) {
// Accumulate the sum of suitable elements to the corresponding member of the result sequence
for (auto currentMember : inputSequence) {
resultingSequence[i] += (i < currentMember && currentMember <= i + 1 ? currentMember : 0);
}
}
// Output the sequence
for (auto currentMember : resultingSequence) {
cout << currentMember << " ";
}
return 0;
}
I2luY2x1ZGUgPHZlY3Rvcj4KI2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgdW5zaWduZWQgaW50IFJFU1VMVElOR19TRVFVRU5DRV9TSVpFID0gMTA7CgppbnQgbWFpbigpIHsKCWRvdWJsZSBjdXJyZW50TWVtYmVyOwoJdmVjdG9yIDxkb3VibGU+IGlucHV0U2VxdWVuY2U7CiAgICBkb3VibGUgcmVzdWx0aW5nU2VxdWVuY2VbUkVTVUxUSU5HX1NFUVVFTkNFX1NJWkVdezB9OwogICAgLy8gQWRkcyBhIG5ldyBlbGVtZW50IHRvIHRoZSB2ZWN0b3IgdG8gdGhlIGVuZCBvZiB0aGUgaW5wdXQgc3RyZWFtCiAgICB3aGlsZSAoY2luID4+IGN1cnJlbnRNZW1iZXIpIHsKICAgIAlpbnB1dFNlcXVlbmNlLnB1c2hfYmFjayhjdXJyZW50TWVtYmVyKTsKICAgIH0gCiAgICBzb3J0KGlucHV0U2VxdWVuY2UuYmVnaW4oKSwgaW5wdXRTZXF1ZW5jZS5lbmQoKSk7IC8vIFNvcnQgYXNjZW5kaW5nIGluaXRpYWwgc2VxdWVuY2UKICAgIG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