I am using the BinaryHeap offered by D language:
import std.stdio, std.container;
void main() {
auto q = heapify(Array!int([44, 22, 100, -1, 0, 5, 6, 7]));
while (!q.empty) {
write(q.front, " ");
q.removeFront;
}
}
In my machine (or even on ideone) I got the elements sorted. But in codeforces I got this strange ordering:
44 100 22 7 6 5 0 -1
===== Used: 0 ms, 2856 KB
The codeforces version of D (v2.069.2) is even newer than ideone (v2.067.1), but it is older than my installation (v2.071.0).
Do you know why is the reason? Thank you very much.