立花泷之介
立花泷之介
全部文章
分类
归档
标签
去牛客网
登录
/
注册
立花泷之介的博客
全部文章
(共56篇)
题解 | 小红的字符串
#include <algorithm> #include <iostream> using namespace std; int main() { string s; cin >> s; int cnt = 0; int s1,...
2026-02-21
1
26
题解 | 清楚姐姐买竹鼠
这道题代入到现实生活我们买东西的逻辑即可,肯定先能想到一般三个一起买的价格会低于一个买的价格乘3,那么这就是正常商人;如果是奸商,那么就是三个一起买的价格还要高于一个买的价格乘3;而如果是笨商,那就是三个买的价格竟然比一个买的价格还要便宜 #include <algorithm> #in...
2026-02-21
2
34
题解 | 01序列
小小序列,一个遍历直接拿下 #include <iostream> #include <vector> using namespace std; int main() { int m; cin >> m; vector<int>...
2026-02-21
1
25
题解 | 小红背单词
#include <iostream> #include <set> #include <unordered_map> #include <vector> using namespace std; // struct Word{ // str...
2026-02-18
1
34
题解 | 支付宝消费打折
#include <algorithm> #include <iostream> #include <vector> using namespace std; // 要想买到最多东西,言外之意就是买最便宜的东西 int main() { int n,k;...
2026-02-17
1
41
题解 | 小苯送礼物
n个人只选k个送礼物。排序标准是先降序排列支持力度,再降序排列收藏数,再升序排列编号选择结构体数组,加上自定义sort即可解题 #include <algorithm> // 调用sort #include <iostream> #include <vector>...
2026-02-17
1
34
题解 | 分数线划定
小心第 t 个人实际上是下标 t-1 !序列是从0开始的!向下取整因为范围是正数,因此直接int强制类型转换将小数抹去多关键字序列使用结构体数组vector<Student>进行存储多关键字排序使用自定义sort函数分别升序降序排列,联动lambda [](const Student &...
2026-02-15
1
33
题解 | 回文日期
#include <cstddef> #include <iostream> #include <string> using namespace std; // 从 a 到 b, 两边闭区间 int main() { string s1, s2...
2026-02-15
1
39
题解 | 穷哈哈~
描述"你叉叉,唱日出,穷哈哈,唱日落.....",小哈开心地哼着小调,因此小哈是一个爱笑的人,每次笑都很有魔性,调皮地小哼记录了小哈的一次说的话,其中里面可能包含了小哈的笑声,并以为字符串来记录小哈的话。已知,小哈的笑声是字母aa和hh交替的序列,例如:ahahahahahah,...
2026-02-12
1
49
题解 | 田忌赛马
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { vector<int>king(3), ji(3); ...
2026-02-12
1
44
首页
上一页
1
2
3
4
5
6
下一页
末页