[C++] Clean Code
\nclass Solution {\npublic:\n    int calPoints(vector<string>& ops) {\n        int sum = 0, score = 0;\n        vector<int> rounds;\n        for (string op : op
```\nclass Solution {\npublic:\n    int calPoints(vector<string>& ops) {\n        int sum = 0, score = 0;\n        vector<int> rounds;\n        for (string op : ops) {\n            if (op == "C") {\n                sum -= rounds.back();\n                rounds.pop_back();\n                continue;\n            }\n            if (op == "D") {\n                sum += score = rounds.back() * 2;\n            }\n            else if (op == "+") {\n                sum += score = rounds[rounds.size() - 1] + rounds[rounds.size() - 2];\n            }\n            else {\n                sum += score = stoi(op);\n            }\n            rounds.push_back(score);\n        }\n        return sum;\n    }\n};\n```
[]