摘要: Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.思路:从各位向前处理,当前字符代表的数比后面一位字符代表的数大(包括等于),就加,小就减... 阅读全文
posted @ 2015-02-05 17:24 穆穆兔兔 阅读(142) 评论(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等等表示的,其中I = 1;V = 5;X =... 阅读全文
posted @ 2015-02-05 17:03 穆穆兔兔 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ... 阅读全文
posted @ 2015-02-05 14:28 穆穆兔兔 阅读(278) 评论(0) 推荐(0) 编辑