2027: 临时记忆 摘要:解题思路:首先理解题意,题目的意思是不断往前记忆,遇到记忆中没有的元素就要看一次书注意事项:参考代码:两种方法,一种用数组表示最大记忆大小,一种用队列表示最大记忆大小,其实思路都是一样的,但是用队列算…… 题解列表 2022年03月06日 0 点赞 0 评论 297 浏览 评分:8.0
cpp简单易懂_超直观的解题思路-回文日期 摘要:不能一天一天枚举,否则会超时;转换一下思路,不必判断这一天是不是回文数,而是给出前四位数去构造后四位数从而得到回文数;这样就从一天一天枚举变成一年一年枚举,时间复杂度就降低了很多;构造好回文数后只需要…… 题解列表 2022年03月06日 0 点赞 1 评论 701 浏览 评分:8.0
Hifipsysta-2088-蓝桥杯算法提高VIP-快速幂(C++代码) 摘要:```cpp #include using namespace std; typedef unsigned long long ull; ull quickExp(ull x, ull …… 题解列表 2022年03月07日 0 点赞 0 评论 410 浏览 评分:8.0
信息学奥赛一本通T1268-完全背包问题 摘要:#include<iostream>using namespace std;int dp[10000];int w[205],c[205];int main(){ int m,n; cin…… 题解列表 2022年03月08日 0 点赞 0 评论 397 浏览 评分:8.0
编写题解 1116: IP判断 摘要:解题思路:split可以设定分隔符,非常好用。注意事项:参考代码:while True: l = input().split('.') if l == 'E…… 题解列表 2022年03月09日 0 点赞 0 评论 426 浏览 评分:8.0
优质题解 O(VN)_一维数组完全背包 摘要:基于一维的01背包首先想想为什么01背包中要按照v=V..0的逆序来循环。这是因为要保证第i次循环中的状态fi是由状态f[i-1] [v-c[i]]递推而来。换句话说,这正是为了保证每件物品只选一次,…… 题解列表 2022年03月09日 0 点赞 0 评论 640 浏览 评分:8.0
1507: 蓝桥杯算法提高VIP-去注释 摘要:解题思路:注意事项:参考代码:s=0 while True: try: st=input() if '/*' in st:   题解列表 2022年03月11日 0 点赞 0 评论 473 浏览 评分:8.0
字符串的输入输出处理(Java语言) 摘要:解题思路:注意事项:nextInt只取到数字,后面还有换行符,需用nextLine获取并自动丢弃,才可继续取下一行。参考代码:import java.io.*; import java.util.*…… 题解列表 2022年03月12日 0 点赞 0 评论 881 浏览 评分:8.0
[递归]母牛的故事 摘要:解题思路:注意事项:参考代码:while True: n = int(input()) a = b= c = 0 sum = d = 1 for i in range(n-1)…… 题解列表 2022年03月12日 0 点赞 0 评论 719 浏览 评分:8.0
快速排序!!!!! 摘要:```cpp #include using namespace std; const int L = 10 + 2; int q[L]; int len; void quick_sort(…… 题解列表 2022年03月13日 0 点赞 0 评论 380 浏览 评分:8.0