摘要: 8 4 5 1 2 1 3 1 1 #include<bits/stdc++.h>using namespace std;typedef struct tree{ int data; struct tree* Lchild; struct tree* Rchild;}Tree,*Huffman;Hu 阅读全文
posted @ 2023-11-13 22:10 mo寒流xing 阅读(53) 评论(0) 推荐(0)
摘要: #include<iostream>#include<string.h>using namespace std;typedef struct { int id; string name;}Node;//结点定义typedef struct { Node* element;//基地址(动态长度) in 阅读全文
posted @ 2023-09-17 19:34 mo寒流xing 阅读(22) 评论(0) 推荐(0)
摘要: 520-3 不要怕,爱!!! 古代少女有了心上人时,会悄悄折一条树枝,揪那枝上的叶子,揪一片叶子念一句“爱我”,再揪一片念一句“不爱我”…… 这样揪落最后一片叶子的时候,看看是停在“爱”还是“不爱”。 本题就请你根据枝条上叶子的片数,告诉你的用户应该从“爱”还是“不爱”开始,最后一定停在“爱”上。 阅读全文
posted @ 2023-05-20 22:02 mo寒流xing 阅读(20) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h>using namespace std;class Dog{ private: int age; int weight; public: Dog(int a,int b):age(a),weight(b){};//带参数的构造函数; Dog(){};// 阅读全文
posted @ 2023-05-19 11:22 mo寒流xing 阅读(36) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h>using namespace std;class Dog{ private: int weight; int old; public: Dog(int a,int b):weight(a),old(b){}; int Weight(){ return 阅读全文
posted @ 2023-05-16 19:33 mo寒流xing 阅读(17) 评论(0) 推荐(0)
摘要: //原图 //加密 #include<bits/stdc++.h>using namespace std;int main(){ fstream in;// fstream out;// in.open("star.png",ios::binary|ios::in); out.open("star- 阅读全文
posted @ 2023-05-14 20:32 mo寒流xing 阅读(52) 评论(0) 推荐(0)
摘要: 给定一个正整数�n,求[1,�][1,n]中因子数量为奇数的正整数的个数。 第一行包含一个正整数TTT (1≤T≤103)(1\leq T \leq 10^3)(1≤T≤103),表示数据组数。每组数据只有一行,包含一个正整数nnn (1≤n≤4×103)(1 \leq n \leq 4 \time 阅读全文
posted @ 2023-05-12 20:39 mo寒流xing 阅读(55) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; #define MAXSIZE 50 typedef int KeyType; typedef struct { KeyType key; } ElemType; typedef struct { ElemType * 阅读全文
posted @ 2023-05-11 20:54 mo寒流xing 阅读(24) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h>using namespace std; typedef struct { int id; string name;} Data;typedef struct { Data nodeData; struct Node *nextNode;}CLtype; 阅读全文
posted @ 2023-05-10 20:51 mo寒流xing 阅读(15) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h>using namespace std;template<class T>T maxn(T x[], int len) { int i = 1; T max = x[0]; for (i; i < len; i++) { bool n = max < 阅读全文
posted @ 2023-05-05 11:36 mo寒流xing 阅读(25) 评论(1) 推荐(1)