大佬进来
#include <vector> int func(std::vector<int> vec) { static int k = 2; std::vector<int>::reverse_iterator it; for(it = vec.rbegin(); it != vec.rend(); ++it) { k += *it % 2 == 0 ? ++*it : (*it)++; } return k; } int main() { std::vector<int> vec; for(int i = 0; i < 4; ++i) { vec.push_back(i); cout<</int></int></int></vector>