母牛问题由递归到循环的解法 摘要:解题思路:首先想到的是递归解法,但是运行后发现内存超限了,之后考虑递归优化(包括尾优化,支持的编译器和语言太少,其他优化方法我不会),然后就转到循环,其实一开始觉得可以用循环写,但是又觉得很晦涩,用递…… 题解列表 2022年03月14日 0 点赞 0 评论 385 浏览 评分:7.0
高精度加法 摘要:```cpp #include using namespace std; vector add_num(vector&a, vector&b){ if(a.size() < b.si…… 题解列表 2022年03月14日 0 点赞 0 评论 504 浏览 评分:0.0
信息学奥赛一本通T1320-均分纸牌 摘要:```cpp #include using namespace std; typedef long long ll; const int N=100+5; int n; int a[N];…… 题解列表 2022年03月14日 0 点赞 0 评论 666 浏览 评分:9.9
短作业优先-答疑 摘要:```cpp #include using namespace std; typedef long long ll; const int N=1e3+5; int n; struct no…… 题解列表 2022年03月14日 0 点赞 0 评论 695 浏览 评分:9.9
判断死锁了属于是-盾神与积木游戏 摘要:丐版银行家算法 ```cpp #include using namespace std; typedef long long ll; const int N=1e4+5; int m; …… 题解列表 2022年03月14日 0 点赞 0 评论 624 浏览 评分:9.9
编写题解 1053: 二级C语言-平均值计算 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a[10]; int count=0; in…… 题解列表 2022年03月14日 0 点赞 0 评论 452 浏览 评分:0.0
1205: 字符串的修改 C++ 动态规划 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; string s1; string s2; int L1,L2; …… 题解列表 2022年03月14日 0 点赞 0 评论 435 浏览 评分:0.0
归并排序!!! 摘要:```cpp #include using namespace std; const int L = 100000 + 2; int q[L]; int tmp[L]; int n; …… 题解列表 2022年03月13日 0 点赞 0 评论 588 浏览 评分:0.0
素数判断小小加强写法 摘要:解题思路:1、输入数字小于2直接退出2、大于2直接输出2,为了后面来判断的数字都是基数做个小铺垫,应为偶数不可能是素数嘛3、比较范围上限用根号更好节省时空注意事项:参考代码:#include<iost…… 题解列表 2022年03月13日 0 点赞 0 评论 442 浏览 评分:0.0
快速排序!!! 摘要:```cpp #include using namespace std; const int L = 100000 + 2; int q[L]; int n; void quick_s…… 题解列表 2022年03月13日 0 点赞 0 评论 479 浏览 评分:0.0