随笔分类 -  STL

67. Add Binary
摘要:Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 模拟二进制相加,右对齐,然后每位相加....不知道字符串左加和右加对性能有没有影响 阅读全文
posted @ 2017-07-20 13:45 Beserious 阅读(114) 评论(0) 推荐(0) 编辑
35. Search Insert Position
摘要:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2017-07-19 20:08 Beserious 阅读(91) 评论(0) 推荐(0) 编辑
20. Valid Parentheses
摘要:Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brackets must close in the 阅读全文
posted @ 2017-07-18 13:55 Beserious 阅读(115) 评论(0) 推荐(0) 编辑
Codeforces Round #354 (Div. 2) C. Vasya and String
摘要:C. Vasya and String time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output High school student V 阅读全文
posted @ 2016-05-26 16:42 Beserious 阅读(187) 评论(0) 推荐(0) 编辑
UVAlive 6611 Alice's Print Service 二分
摘要:Alice is providing print service, while the pricing doesn't seem to be reasonable, so people using her print service found some tricks to save money.F... 阅读全文
posted @ 2015-10-15 20:41 Beserious 阅读(597) 评论(0) 推荐(0) 编辑