Dastro
Dastro
全部文章
题解
归档
标签
去牛客网
登录
/
注册
Dastro的博客
全部文章
/ 题解
(共19篇)
题解 | #链表相加(二)#
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} ...
C++
2022-06-28
0
343
题解 | #两个链表的第一个公共结点#
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } };*/ class Solution { public: ListNode* FindF...
C++
2022-06-27
0
293
题解 | #对称的二叉树#
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(N...
C++
2022-06-27
0
326
题解 | #合并两个排序的链表#
class Solution { public: ListNode* Merge(ListNode* pHead1, ListNode* pHead2) { if(pHead1 == NULL && pHead2 == NULL){ ...
C++
2022-06-26
0
258
题解 | #参数解析#
需要截的情况 1.num % 2 == 0 并出现' ' 2.num % 2 == 0 并出现'"',是“开始的地方 3.num % 2 == 1 并出现'"',是”结束的地方 每个substr判断一下是不是空串防止空格和引号接连出现 循环结束还剩最后一个空格或右引号到末尾的子串没截取 #...
C++
2022-06-11
0
306
题解 | #成绩排序#
#include<bits/stdc++.h> using namespace std; struct stu{ string name; int score; int pos; }; vector<stu> vec; bool cmp_0(stu a...
C++
2022-06-08
3
307
题解 | #DNA序列#
#include<bits/stdc++.h> using namespace std; vector<string> vec; int main() { string str; int n; cin >> str >> n; ...
C++
2022-06-08
0
264
题解 | #高精度整数加法#
#include<bits/stdc++.h> using namespace std; const int maxn = 10010; int carry[maxn] = {0}; int res[maxn] = {0}; int main() { string a, b; ...
C++
2022-06-08
0
306
题解 | #公共子串计算#
#include<bits/stdc++.h> using namespace std; int main() { string str1, str2; cin >> str1 >> str2; int len1 = str1.length...
C++
2022-06-04
0
228
题解 | #MP3光标位置#
根据题意写的没有优化过,能看懂就行 #include<bits/stdc++.h> using namespace std; int main() { int n,top,tail,cur; string str; cin >> n >> ...
C++
2022-06-04
0
305
首页
上一页
1
2
下一页
末页