两个窗口的最大值之和
运行下面这段程序:
#include <algorithm>
#include <deque>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<int> a = {1, 3, 2};
cout << max(a[0], a[1]) + max(a[1], a[2]) << endl;
}
(本题用 g++ -std=c++17 -O0 编译。)
全部评论