sleeep3
sleeep3
全部文章
分类
题解(15)
归档
标签
去牛客网
登录
/
注册
sleeep3的博客
全部文章
(共15篇)
题解 | #好串#
利用栈来进行模拟解决 #include<bits/stdc++.h> using namespace std; int main() { stack<char>s;//创建栈 string a; char b; cin>>a; ...
2025-11-28
0
7
题解 | #拼数#
利用两个数连接后再进行比较,以局部最优达到全局最优。 #include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; ...
2025-11-28
0
12
题解 | #牛牛的三角形#
三角形两边之和大于第三边,若较小两边相加大于第三边即成立。 #include<bits/stdc++.h> using namespace std; int main() { int n; long long arr[110]={0}; cin>>n;...
2025-11-28
0
12
题解 | #装进肚子#
利用差值来计算,详情见代码注释。 ```#include<bits/stdc++.h> using namespace std; int z[110000];//早上的甜蜜值 int w[110000];//晚上的甜蜜值 int x[110000];//早晚差值 int n,k; int...
C++
2025-11-28
0
5
题解 | #老子的全排列呢#
要求是输出1到8的全排列,我选择用递归和回溯解决。具体见代码注释。 ```#include<bits/stdc++.h> using namespace std; int arr[10];//用来存放每一次的排列 int bo[10]={0};//判断该数字是否被使用过 void fx(...
C++
2025-11-28
0
13
首页
上一页
1
2
下一页
末页