📄 13-03-03-1.cpp
字号:
#include <iostream>#include <algorithm>#include <iterator>using namespace std;int main(){ int A[] = {1, 2, 3, 4, 5, 6}; const int N = sizeof(A) / sizeof(int); make_heap(A, A+N); cout << "Before pop: "; copy(A, A+N, ostream_iterator<int>(cout, " ")); pop_heap(A, A+N); cout << endl << "After pop: "; copy(A, A+N-1, ostream_iterator<int>(cout, " ")); cout << endl << "A[N-1] = " << A[N-1] << endl;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -