佛系的青年
佛系的青年
全部文章
分类
归档
标签
去牛客网
登录
/
注册
佛系的青年的博客
全部文章
(共89篇)
题解 | 求最小公倍数
笑死 C++库里面已经有这个库函数了 直接拿来就用了 #include <iostream> #include <bits/stdc++.h> using namespace std; int main() { int a, b; cin >>...
2025-03-15
0
33
题解 | 字符逆序
#include <iostream> #include <algorithm> using namespace std; int main() { string s; getline(cin, s); reverse(s.begin(), s.en...
2025-03-15
0
38
题解 | 构造A+B
#include <iostream> using namespace std; int main() { int n, k; cin >> n >> k; cout << (n > k ? "YES"...
2025-03-15
1
32
题解 | Redraiment的走法
转换成求最长递增子序列 使用一维动态规划即可 #include <iostream> #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; ...
2025-03-14
0
39
题解 | 字符统计
#include <iostream> #include <vector> #include <map> #include <algorithm> using namespace std; int main() { string s; ...
2025-03-13
0
32
题解 | 自守数
转换成字符串去比较 #include <iostream> using namespace std; bool is_automorph(int n) { if(n == 0) return true; long square = n * n; string s...
2025-03-13
0
38
题解 | 喜欢切数组的红
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> vec(n); ...
2025-03-13
0
35
题解 | 记负均正
#include <iostream> #include <vector> #include <iomanip> using namespace std; int main() { int n; cin >> n; vecto...
2025-03-13
0
27
题解 | 表示数字
有一个需要注意的点:t += ('*' + '5');是错的 因为'*'和'5'是两个字符 试图将两个字符相加得到的是整数,而不是想要的'*5',所以要分别t += '*'; t += '5'; #include <cctype> #include <iostream> us...
2025-03-13
0
33
题解 | 记票统计
unordered_map是无序的容器,它不会保留插入顺序,所以要定义一个vector来存储输入的顺序 不算难 #include <iostream> #include <unordered_map> #include <vector> using namespa...
2025-03-13
0
35
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页