摘要: 摘要: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed f 阅读全文
posted @ 2017-07-08 16:19 梦醒午夜 阅读(155) 评论(0) 推荐(0)
摘要: 摘要: Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum 阅读全文
posted @ 2017-07-08 16:05 梦醒午夜 阅读(162) 评论(0) 推荐(0)
摘要: 平时对标准输入端输入的整数求和,我们可以采用循环从输入端读到数据,然后求和。C++有实现好的迭代器和算法,能帮助我们更简洁的实现。 #include #include #include using namespace std; int main() { istream_i... 阅读全文
posted @ 2015-10-24 05:17 梦醒午夜 阅读(206) 评论(0) 推荐(0)