📄 11-01-03-2.cpp
字号:
#include <iostream>#include <algorithm>#include <functional>using namespace std;int main(){ int A[] = {1, 2, 3, 4, 5, 6, 7, 8}; const int N = sizeof(A) / sizeof(int); const int* p = adjacent_find(A, A + N, greater<int>()); if (p == A + N) cout << "The range is sorted in ascending order." << endl; else cout << "Element " << p - A << " is out of order: " << *p << " > " << *(p + 1) << "." << endl;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -