classSolution{public:intfinalValueAfterOperations(vector<string>& operations){int x =0;for(auto& op : operations){if(op[1]=='+'){++x;}else{--x;}}return x;}};
题目来源leetcode题目描述题目解析class Solution {public: int finalValueAfterOperations(vector<string>& operations) { int x = 0; for(auto & op : operations){ if(op[1] == '+'){ ++x; }else{