W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
#include
#include
#include
using namespace std; int main() { vector
numbers = {1, 7, 3, 5, 9, 2}; auto it = is_sorted_until(numbers.begin(), numbers.end()); int position = it - numbers.begin(); cout << "前 " << position << " 个元素是按升序排列的。"; return 0; }