wrdoct
wrdoct
全部文章
题解
复习(44)
面经(1)
归档
标签
去牛客网
登录
/
注册
wrdoct的博客
全部文章
/ 题解
(共88篇)
题解 | #最大数#
class Solution { public: /** * 最大数 * @param nums int整型vector * @return string字符串 */ static bool cmp(const string& a, ...
C++
2022-06-01
0
281
题解 | #合并区间#
/** * Definition for an interval. * struct Interval { * int start; * int end; * Interval() : start(0), end(0) {} * Interval(int ...
C++
2022-06-01
0
319
题解 | #字符串加解密#
来自专栏
#include <bits/stdc++.h> using namespace std; //encoder void encoder(string str){ for(int i = 0; i < str.size(); i++){ if(isalp...
C++
2022-06-01
0
340
题解 | #字符串字符匹配#
来自专栏
#include <bits/stdc++.h> using namespace std; bool process(string s1, string s2){ unordered_set<char> s; for(int i = 0; i < ...
C++
2022-05-28
0
324
题解 | #挑7#
来自专栏
#include <bits/stdc++.h> using namespace std; bool is_7_beishu(int num){ if(num % 7 == 0){ return true; } return false; } ...
C++
2022-05-27
0
305
题解 | #DNA序列#
来自专栏
#include <bits/stdc++.h> using namespace std; void process(string str, int num, string& res){ vector<string> vec; //保存所有可能的字串 ...
C++
2022-05-26
0
355
题解 | #24点游戏算法#
来自专栏
#include <bits/stdc++.h> using namespace std; double num = 1e-6; int ANS = 24; int ADD = 0, SUB = 1, MUL = 2, DIV = 3; bool process(vector<...
C++
2022-05-26
0
322
题解 | #找出字符串中第一个只出现一次的字符#
来自专栏
#include <bits/stdc++.h> using namespace std; void process(string s, char& c){ unordered_map<char, int> m; for(char ch : s){...
C++
2022-05-26
0
286
题解 | #输入n个整数,输出其中最小的k个#
来自专栏
#include <bits/stdc++.h> using namespace std; int main(){ int n = 0, k = 0; while(cin>>n>>k){ vector<int> ve...
C++
2022-05-22
0
331
题解 | #统计每个月兔子的总数#
来自专栏
#include <bits/stdc++.h> using namespace std; int process(int n){ return n < 3 ? 1 : process(n - 1) + process(n - 2); } int main(){ ...
C++
2022-05-20
0
270
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页