Lucas1101
Lucas1101
全部文章
题解
归档
标签
去牛客网
登录
/
注册
爱敲代码的小卜
全部文章
/ 题解
(共7篇)
题解 | #密码截取#
经典题目,注意代码规范 #include <bits/stdc++.h> using namespace std; int maxLength (const string str, int l, int r) { while (l >= 0 && r < ...
C++
2022-03-30
1
200
题解 | #合唱队#
动态规划,注意代码规范 #include <bits/stdc++.h> using namespace std; int main () { int n; cin >> n; vector<int> nums(n, 0); vector<int&g...
C++
2022-03-30
0
215
题解 | #求小球落地5次后所经历的路程和第5次反弹的高度#
这道题就很简单了,注意代码规范 #include <bits/stdc++.h> using namespace std; int main () { double n; cin >> n; double sum = 0; double tem = n; for (...
C++
2022-03-30
0
201
题解 | #查找兄弟单词#
这道题很多坑,详细看我的xd函数 #include <bits/stdc++.h> using namespace std; vector<string> xd (vector<string>& str, string s) { vector<st...
C++
2022-03-29
0
230
题解 | #计算某字符出现次数#
哈希表,极致占用内存,注意代码规范 #include <bits/stdc++.h> using namespace std; int main () { unordered_map<char, int>rec; string str; getline(cin, str...
C++
2022-03-28
0
188
题解 | #密码验证合格程序#
注意代码规范,自己写的(仅供参考) #include <bits/stdc++.h> using namespace std; bool chongFu (string str) { int n = str.size(); set<string> rec; for (i...
C++
2022-03-28
1
258
题解 | #坐标移动#
思路明确,注意代码规范 #include <bits/stdc++.h> using namespace std; void zbyd(int& j, int& k, char c, int m) { if (c == 'A') j -= m; if (c == 'S...
C++
2022-03-28
1
259