CyberAoao
CyberAoao
全部文章
分类
归档
标签
去牛客网
登录
/
注册
CyberAoao的博客
全部文章
(共8篇)
题解 | #字符串匹配#
#include<bits/stdc++.h> using namespace std; void toLower(string &s) { for (int i = 0; i < s.size(); i++) { s[i] = tolower(s[i]); } retu...
2023-03-28
1
291
题解 | #围圈报数#
#include<bits/stdc++.h> using namespace std; // N 个人围成一圈顺序编号,从1 号开始按1、2、3 顺序报数,报3者退出圈外,其余的人再从1、2、3 开始报数,报3 的人再退出圈外,依次类推。 // 请按退出顺序输出每个退出人的原序号。要求...
2023-03-26
1
327
题解 | #大整数排序#
直接给每个数字前面添0到相同长度,再直接比较字符串,简单粗暴_(:з」∠)_ #include <iostream> #include <string> #include <vector> #include <algorithm> using name...
2023-03-20
4
278
题解 | #合并k个已排序的链表#
class Solution { public: ListNode *mergeKLists(vector<ListNode *> &lists) { if (lists.empty()) { return NULL; } ...
2023-03-17
0
246
题解 | #字符串排序#
利用unordered_map和stable_sort()函数实现自定义的稳定排序 #include <iostream> #include <string> #include <vector> #include <algorithm> #includ...
2023-03-13
1
286
题解 | #计算表达式#
#include <iostream> #include <cstdio> #include <cctype> #include <string> #include <stack> using namespace std; int Pr...
2023-03-05
0
237
题解 | #堆栈的使用#
#include <stack> #include <map> #include <string> #include <iostream> using namespace std; // 对于每组测试数据,第一行是一个正整数 n(0 < n &l...
2023-03-05
0
250
题解 | #Old Bill#
#include <iostream> using namespace std; bool match(int sum, int x, int y, int z) { bool flag = true; sum = sum / 10; if (sum % 10 !...
2023-02-22
0
222