摘要:
https://blog.csdn.net/Zhouzi_heng/article/details/115014059 阅读全文
posted @ 2021-09-15 15:36
傲珂
阅读(16)
评论(0)
推荐(0)
摘要:
思路:动态规划 #include <vector> #include <numeric> using namespace std; class Solution { public: int lastStoneWeightII(vector<int> &nums) { int sum = accumu 阅读全文
posted @ 2021-09-15 05:02
傲珂
阅读(79)
评论(0)
推荐(0)
摘要:
思路:和判断回文字符串差不多,双指针法 #include <string> using namespace std; class Solution { public: bool validPalindrome(string s) { return verify(s, 0, s.length() - 阅读全文
posted @ 2021-09-15 04:59
傲珂
阅读(500)
评论(0)
推荐(0)
摘要:
思路:无脑反转就行 #include <math.h> #include <string> using namespace std; int main() { Solution solution; string str; cin >> str; int k; cin >> k; int length 阅读全文
posted @ 2021-09-15 04:52
傲珂
阅读(98)
评论(0)
推荐(0)
摘要:
思路:回溯+剪枝 #include<vector> #include<string> #include<limits.h> using namespace std; class Solution { public: bool backtrack(vector<int>& list, string n 阅读全文
posted @ 2021-09-15 04:48
傲珂
阅读(322)
评论(0)
推荐(0)
摘要:
使用C++的整型上下限时报错: error: ‘INT_MAX’ was not declared in this scope 解决办法: 常量INT_MAX和INT_MIN定义在头文件limits中 所以添加头文件·#include<climits> 阅读全文
posted @ 2021-09-15 04:38
傲珂
阅读(1197)
评论(0)
推荐(0)

浙公网安备 33010602011771号