Für Vorlesungen, bitte die Webseite verwenden. https://flavigny.de/lecture
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

24 linhas
366B

  1. #include<vector>
  2. #include<iostream>
  3. #include"Heap.hh"
  4. #include"Zufall.cc"
  5. int main ()
  6. {
  7. Zufall z(87123);
  8. Heap<int> h;
  9. for (int i=0; i<10; i=i+1) {
  10. int k = z.ziehe_zahl();
  11. std::cout << k << std::endl;
  12. h.push(k);
  13. if (i==5) h.pop();
  14. }
  15. std::cout << std::endl;
  16. while (!h.empty()) {
  17. std::cout << h.top() << std::endl;
  18. h.pop();
  19. }
  20. }