daydayup牛
daydayup牛
全部文章
题解
归档
标签
去牛客网
登录
/
注册
daydayup牛的博客
全部文章
/ 题解
(共96篇)
题解 | #二维数组操作#
题目说的还是清楚的啊,它只是想让你做个简单的判断而已啊,哈哈,注意输入的行列不是索引也就是说输入9行9列,但它的索引是0-8。插入的时候只有小于9行9列的才可以插入。 ```#include <iostream> #include <algorithm> #include &...
C++
2022-03-20
0
275
题解 | #字符串字符匹配#
注意set本身就是去重,而且自动升序排序,unordered_set没有顺序,也是去重的。 #include <algorithm> #include <set> using namespace std; int main() { string shorts,lo...
C++
2022-03-20
0
265
题解 | #整型数组合并#
用标准库stl的set自动排序加去重 #include <algorithm> #include <set> using namespace std; int main() { int n1,n2; while(cin>>n1){ ...
C++
2022-03-20
0
294
题解 | #火车进站#
这道题的dfs比较难理解,我认为主要困难的地方在于,进站的时候也要回溯这里,,每次进行dfs之后一定要回到原来的状态。最后用的set来排序。 #include <algorithm> #include <vector> #include <stack> #incl...
C++
2022-03-20
0
350
题解 | #尼科彻斯定理#
C++的^是异或我老是搞成幂符号,啊啊啊我去 #include <algorithm> #include <cmath> using namespace std; int main() { int x; while(cin>>x){ ...
C++
2022-03-19
0
262
题解 | #参数解析#
引号略坑哈哈 #include <algorithm> #include <sstream> #include <vector> using namespace std; int main() { string str; while(...
C++
2022-03-19
0
268
题解 | #计算日期到天数转换#
四年润,百年不润,四百年润😀 #include <algorithm> #include <vector> using namespace std; bool judge_leap(int year){ bool leap = false; if(yea...
C++
2022-03-19
0
293
题解 | #百钱买百鸡问题#
#include <algorithm> #include <vector> using namespace std; int main() { int n; vector<vector<int>> v; while(cin...
C++
2022-03-19
0
300
题解 | #成绩排序#
我用了map,但是map不能用sort排序,所以我把它拷到vector,在排序,排序用的sort要是稳定的排序,不然他位置可能有交换。 #include <algorithm> #include <sstream> #include <map> #include ...
C++
2022-03-19
0
313
题解 | #查找组成一个偶数最接近的两个素数#
标准库yyds #include <algorithm> #include <bitset> using namespace std; int main() { unsigned x; while(cin>>x){ bitset...
C++
2022-03-19
0
248
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页