Mamba_Back
Mamba_Back
全部文章
题解
归档
标签
去牛客网
登录
/
注册
Mamba_Back的博客
全部文章
/ 题解
(共8篇)
题解 | #遍历链表#
#include #include using namespace std; typedef struct linknode{ int data; linknode * next; }linknode, *node; int Partition(vector &a,int left,in...
C++
2022-01-19
0
404
题解 | #成绩排序#
#include using namespace std; typedef struct stu { string name; int age; int score; }stu, * s; s scoresort(s sheet, int num) { for (int i = 0; i <...
C++
2022-01-19
0
455
题解 | #二叉树遍历#
#include using namespace std; void buildtree(string preo, string ino){ if(preo.size() == 0) return; int pos = ino.find(preo[0]); buildtree(preo.subst...
C++
2022-01-18
0
418
题解 | #排序#
#include #include using namespace std; int Partition(vector &a,int left,int right){ int pivot = a[left]; while(left < right){ while(a[right] ...
C++
2022-01-18
0
351
题解 | #字符串连接#
#include using namespace std; int main(){ string s, r; getline(cin, s); for(int i = 0; i < s.size(); i++){ while(s[i] == ' ') i++; if(s[i] != ' ')...
C++
2022-01-18
0
344
题解 | #二叉排序树#
#include using namespace std; typedef struct BiNode{ int data; BiNode *left; BiNode *right; int dad; }BiNode, *BiTree; void Insert(BiTree t, BiTree n...
C++
2022-01-18
0
469
题解 | #统计单词#
#include #include using namespace std; int main() { string c; getline(cin, c); //输入带空格字符串 int j = 0; do{ int i = j; int counter = 0; while (c[i] != ...
C++
2022-01-17
1
342
题解 | #矩阵转置#
#include using namespace std; int main(){ int n; cin >> n; int a[100][100]; //建立二维数组 for(int i = 0; i < n; i++){ for(int j = 0; j < n; j+...
C++
2022-01-17
0
423