蓝域小兵
蓝域小兵
全部文章
分类
题解(12)
归档
标签
去牛客网
登录
/
注册
蓝域小兵的博客
全部文章
(共12篇)
膜拜前面各位大佬,写一个最简单的辣鸡深度遍历
#include <bits/stdc++.h> using namespace std; int N = 0, M = 0; int pathlen = INT_MAX; vector<vector<bool>> rec; vector<pair<...
2020-09-04
0
708
用递归,感觉还行..
#include <bits/stdc++.h> using namespace std; vector<string> other = {"zero","one","two","three","four", \ "five","six","seven","ei...
2020-09-04
13
1426
这种题真的没意思...
不是说简单,是说学不到啥新知识,全靠debug,真的烦。 #include <bits/stdc++.h> using namespace std; int main() { string alb("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); str...
2020-09-03
1
946
纯C,写个快排
#include <stdio.h> #include <string.h> #include <stdlib.h> using namespace std; const int maxnum = 1024; void qs(char d[], int le...
2020-09-03
2
923
笔试题一定要善用STL,直接用sort函数和lambda表达式排序,用Unique函数去重
#include <bits/stdc++.h> using namespace std; int main() { vector<string> inputI; vector<string> inputR; int nI(0); ...
2020-08-31
1
741
利用字符流进行数据读入真的是非常方便
#include<bits/stdc++.h> using namespace std; void vecip2usn(vector<int> ip, unsigned int &rtn) { rtn = 0; // 将点分十进制的ip字符串转换为...
2020-08-25
0
683
分组背包问题,转化为0-1背包问题
看了各个大佬的分析,终于写出了我自己的代码,其实知道了如何进行状态转移,就基本大差不差 #include <bits/stdc++.h> using namespace std; int main() { // 带条件的0-1背包问题 // 创建dp数组 in...
2020-08-24
4
1185
string比较大小就是按照字典序比较的,所以可以直接使用sort
#include <bits/stdc++.h> using namespace std; int main() { int n; /* bool (*strcompare)(const string &a, const string &b) = [...
2020-08-22
0
805
直接使用map去重复
#include<bits/stdc++.h> using namespace std; int main() { map<int,int> data; int num; int m(0),n(0); while(cin>>n...
2020-08-22
1
723
直接用STL的set的话就太简单了。。
#include <bits/stdc++.h> using namespace std; int main() { int n(0); while(cin>>n){ set<int> data; while(n...
2020-08-21
20
1092
首页
上一页
1
2
下一页
末页