会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Loading
vacilie的记事本
人生如逆旅,我亦是行人.
新随笔
联系
管理
上一页
1
2
3
4
5
下一页
2022年3月14日
P1098 [NOIP2007 提高组] 字符串的展开
摘要: 题目链接 https://www.luogu.com.cn/problem/P1098 题目思路 模拟,注意记录偏移量来去掉 ''-'' 题目代码 最傻的模拟 #include <iostream> #include <algorithm> using namespace std; const in
阅读全文
posted @ 2022-03-14 17:50 vacilie
阅读(104)
评论(0)
推荐(0)
2022年3月13日
P1518 [USACO2.4]两只塔姆沃斯牛 The Tamworth Two
摘要: 题目链接 https://www.luogu.com.cn/problem/P1518 题目思路 模拟农夫和奶牛行动路线,为了避免死循环,当ans到一定值时跳出 题目代码 #include <iostream> #include <algorithm> using namespace std; ch
阅读全文
posted @ 2022-03-13 20:45 vacilie
阅读(109)
评论(0)
推荐(0)
AcWing4313. 满二叉树等长路径
摘要: 题目链接 https://www.acwing.com/problem/content/4316/ 题目思路 贪心 从最底层向高层遍历,同一分支的两个结点比较,将大值赋给父节点, ans += 最大值 + 最小值 #include <iostream> #include <algorithm> #i
阅读全文
posted @ 2022-03-13 19:56 vacilie
阅读(16)
评论(0)
推荐(0)
AcWing4312.出现次数
摘要: 题目链接 https://www.acwing.com/problem/content/4315/ 题目思路 KMP算法,再通过查询子串来计算出现次数 题目代码 #include <iostream> #include <algorithm> using namespace std; const i
阅读全文
posted @ 2022-03-13 17:28 vacilie
阅读(23)
评论(0)
推荐(0)
2022年3月12日
P1328 [NOIP2014 提高组] 生活大爆炸版石头剪刀布
摘要: 题目链接 https://www.luogu.com.cn/problem/P1328 题目思路 用二维数组存每种情况的得分情况,然后枚举来计算分数 #include <iostream> using namespace std; int main() { int vs[5][5] = {{0, 0
阅读全文
posted @ 2022-03-12 22:11 vacilie
阅读(33)
评论(0)
推荐(0)
2022年3月10日
P4924 [1007]魔法少女小Scarlet
摘要: 题目链接 https://www.luogu.com.cn/problem/P4924 题目思路 顺时针转是第$i$行第$j$列的数字转移到第$j$行倒数第$i$列 \(temp[n - m + j][n + m - i] = g[i][j]\) 逆时针转是第$i$行第$j$列的数字转移到倒数第$j
阅读全文
posted @ 2022-03-10 20:40 vacilie
阅读(78)
评论(0)
推荐(0)
2022年3月9日
P1009 [NOIP1998 普及组] 阶乘之和
摘要: 题目链接 https://www.luogu.com.cn/problem/P1009 题目思路 本题为高精度乘法 + 高精度加法 题目代码 #include <iostream> #include <algorithm> #include <cstring> using namespace std
阅读全文
posted @ 2022-03-09 20:54 vacilie
阅读(46)
评论(0)
推荐(0)
P1303 A*B Problem
摘要: 题目链接 https://www.luogu.com.cn/problem/P1303 题目思路 模板题 题目代码 #include <iostream> #include <algorithm> #include <vector> using namespace std; vector<int>
阅读全文
posted @ 2022-03-09 08:55 vacilie
阅读(25)
评论(0)
推荐(0)
P1601 A+B Problem(高精)
摘要: 题目链接 https://www.luogu.com.cn/problem/P1601 题目思路 模板 题目代码 #include <iostream> #include <algorithm> #include <vector> using namespace std; vector<int> a
阅读全文
posted @ 2022-03-09 08:51 vacilie
阅读(55)
评论(0)
推荐(0)
P1563 [NOIP2016 提高组] 玩具谜题
摘要: 题目链接 https://www.luogu.com.cn/problem/P1563 题目思路 当谜题方向与小人朝向相同时是逆时针,相反时是顺时针,求最终小人位置 题目代码 #include <iostream> #include <algorithm> using namespace std;
阅读全文
posted @ 2022-03-09 08:30 vacilie
阅读(37)
评论(0)
推荐(0)
上一页
1
2
3
4
5
下一页
公告