Problem: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 遍历一次输入的字符串,如果不满足类似4或者9的就直接加相应的数,否则减去相应的数.其中对应如下”IVXLCDM“对应{1,5,10,50,100,500,1000} class Solution { public: int romanToInt(string s)…