摘要:
const string roman[]={ "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", & 阅读全文
摘要:
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.思考:罗马数字有I,V,X,L,C,D,M。其中4,9左减,其他右加。class Solution {public: string intToRoman(int num) { // IMPORTANT: Please reset any member data you declared, as // the same Solution instance... 阅读全文
摘要:
Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpo... 阅读全文