上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 36 下一页
摘要: 一:解题思路 二:完整代码示例 (C++版和Java版) C++代码: #include <iostream> #include <vector> #include <string> #include <map> using namespace std; int main() { string st 阅读全文
posted @ 2020-08-06 21:01 repinkply 阅读(355) 评论(0) 推荐(0)
摘要: 一:解题思路 二:完整代码示例 (C++版和Java版) C++代码: #include <iostream> #include <vector> #include <string> using namespace std; int main() { string str = ""; while ( 阅读全文
posted @ 2020-08-06 20:17 repinkply 阅读(387) 评论(0) 推荐(0)
摘要: 一:解题思路 二:完整代码示例 (C++版和Java版) C++代码: #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; bool isBrother(s 阅读全文
posted @ 2020-08-06 18:12 repinkply 阅读(271) 评论(0) 推荐(0)
摘要: 一:解题思路 二:完整代码示例 (C++版和Java版) C++代码: #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; void encryString 阅读全文
posted @ 2020-08-06 16:23 repinkply 阅读(322) 评论(0) 推荐(0)
摘要: 一:解题思路 这道题目和leetcode 151 有些类似,可以放在一起进行学习。 二:完整代码示例 (C++版和Java版) C++代码在牛客网上面 AC 90%,有点奇怪。 C++代码: #include <iostream> #include <string> #include <vector 阅读全文
posted @ 2020-08-06 11:18 repinkply 阅读(239) 评论(0) 推荐(0)
摘要: 一:解题思路 这道题目和 leetcode5 很类似,可以放在一起进行学习,这里给出 Time:O(n^2),Space:O(n^2) 动态规划版的解法。 二:完整代码示例 (C++版和Java版) C++代码: #include <iostream> #include <string> #incl 阅读全文
posted @ 2020-08-05 21:23 repinkply 阅读(348) 评论(0) 推荐(0)
摘要: 一:解题思路 二:完整代码示例 (C++版和Java版) C++代码: #include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string str = ""; whil 阅读全文
posted @ 2020-08-05 20:51 repinkply 阅读(426) 评论(0) 推荐(0)
摘要: 一:解题思路 二:完整代码示例 (C++版和Java版) C++代码: #include <iostream> using namespace std; int main() { int k = 0; int N = 0; int num = 0; while (cin >> k) { num = 阅读全文
posted @ 2020-08-05 20:46 repinkply 阅读(214) 评论(0) 推荐(0)
摘要: 一:解题思路 这道题目的本质就是求斐波那契数列的第n项。 二:完整代码示例 (C++版和Java版) C++代码: #include <iostream> using namespace std; int main() { int months = 0; while (cin >> months) 阅读全文
posted @ 2020-08-05 17:55 repinkply 阅读(510) 评论(0) 推荐(0)
摘要: 一:解题思路 二:完整代码示例 (C++版和Java版) C++代码: #include <iostream> #include <cmath> using namespace std; int main() { int n = 0; while (cin >> n) { double sum = 阅读全文
posted @ 2020-08-05 17:25 repinkply 阅读(176) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 36 下一页