摘要: const string roman[]={ "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", & 阅读全文
posted @ 2013-11-08 18:11 七年之后 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2013-11-08 11:45 七年之后 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 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... 阅读全文
posted @ 2013-11-08 00:52 七年之后 阅读(153) 评论(0) 推荐(0) 编辑