- 博客(5)
- 收藏
- 关注
转载 hdu 1241 (dfs基础)
#include<iostream> #include<string.h> #include <stdio.h> using namespace std; //1,0,-1,0,0-1,0,1,1,1,1,-1,-1,1,-1,-1 int st[8][2]={-1,-1,-1,0,-1,1,0,-1,0,1,1,-1,1,0,1,1},...
2018-05-10 16:30:00 75
转载 哈夫曼树的构建和编码实现
数据结构(第二版) 严蔚敏 #include<iostream> #include<cstring> #include<algorithm> using namespace std; #define inf 9999999 int n,m; typedef char **huffmancode; typedef struct { ...
2018-05-01 16:36:00 707
转载 c++ stl中队列(queue)的使用
入队,如例:q.push(x); 将x 接到队列的末端。出队,如例:q.pop(); 弹出队列的第一个元素,注意,并不会返回被弹出元素的值。访问队首元素,如例:q.front(),即最早被压入队列的元素。访问队尾元素,如例:q.back(),即最后被压入队列的元素。判断队列空,如例:q.empty(),当队列空时,返回true。 #include <cstdlib&g...
2018-05-01 16:12:00 366
转载 字母次数
题意是输入一串字符串 通过删除单个字符使得字符串只有2个及以下不同字母 问删除次数 思路:分别存储字符串的每个字符出现情况 将字符种类-2即可 1 #include <stdio.h> 2 #include <math.h> 3 char a[105]; 4 int sum[105]; 5 int main() 6...
2018-04-24 19:18:00 113
转载 hdu 2051 Bitset(十进制到二进制)
Give you a number on base ten,you should output it on base two.(0 < n < 1000) 多组输入 利用数组 先对2取模放入数组 再将原数除以2 倒序输出 #include <iostream>#define z 1005 using namespace std;int mai...
2018-04-22 23:08:00 99
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人