- 博客(11)
- 资源 (1)
- 收藏
- 关注
原创 Apache Hive在CentOS6上的安装与配置
最近在上Hadoop相关的课程,有一个实验要用到Hive这一组件,然而参考网络上的各种安装配置教程却老是出现问题,经过在网上找各种解决方案,终于配置成功能运行了,于是写下这篇文章记录一下,防止以后再踩坑。首先介绍一下Hive:hive是基于Hadoop的一个数据仓库工具,可以将结构化的数据文件映射为一张数据库表,并提供简单的sql查询功能,可以将sql语句转换为MapReduce任务进行运行。...
2018-10-26 14:42:54
246
原创 甲级PATA1138 Postorder Traversal
Suppose that all the keys in a binary tree are distinct positive integers. Given the preorder and inorder traversal sequences, you are supposed to output the first number of the postorder traversal se
2017-12-28 11:24:03
255
原创 C++ STL标准模板库vector的求长度size()-1的一个小坑
很久没有写博客了,因为成了一个考研狗T_T。 这次写文章主要是因为在写算法的过程中发现一个极坑的点,我在写程序的过程中,写了这样一段代码: for (int i = 0; i <v.size()-1; ++i) { 代码段A; } 其中v是一个变长数组vector类型,按照道理来说,当v的长度为0时,v.size()-1的值为-1,循环不会开始,代码段A
2017-09-11 16:49:14
11226
5
原创 Eratosthenes“埃氏筛法”求1000以内的素数C++
“埃氏筛法”是一种高效的求N以内素数的算法,时间复杂度为O(nloglogn),求100以内素数的“埃氏筛法”代码实现如下:#include#includeint num[1001] = {0};int primeCount = 0;int prime[1001];void findPrime() { for (int i = 2; i <= 1000; ++i) {
2017-04-18 23:01:33
3554
原创 甲级PATA1059 Prime Factors
Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1 * p2^k2 *…*pm^km.Input Specification:Each input file contains one test case
2017-04-18 20:51:43
358
原创 c/c++ memset函数的陷阱
在c语言编程中,memset函数的定义是void* __cdecl memset( _Out_writes_bytes_all_(_Size) void* _Dst, _In_ int _Val, _In_ size_t _Size );即把_Dst当前位
2017-03-31 21:25:08
1162
原创 2017浙江大学计算机和软件考研复试题C题 Infix Expression
Given a syntax tree (binary), you are supposed to output the corresponding infix expression, with parentheses reflecting the precedences of the operators.Input Specification:Each input file contai
2017-03-16 00:26:32
1115
原创 2017浙江大学计算机和软件考研复试题A题 N Queens Puzzle
The "eight queens puzzle" is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other. Thus, a solution requires that no two queens share the same row,
2017-03-15 22:20:03
479
原创 2017.3.4 pat甲级D题ZigZagging on a Tree
ZigZagging on a Tree时间限制 400 ms内存限制 65536 kB代码长度限制 8000 B判题程序 Standard 作者 CHEN, YueSuppose that all the keys in a binary tree are distinct positive
2017-03-11 13:08:15
551
原创 2017.3.4 pat甲级B题Chain the Ropes
2017.3.2 pat甲级B题Chain the Ropes (25)时间限制 200 ms内存限制 65536 kB代码长度限制 8000 B判题程序 Standard 作者 CHEN, YueGiven some segments of rope, you are supposed
2017-03-09 23:28:04
336
翻译 CentOS 7 64位安装Docker教程
1.首先卸载旧版本的Docker$ sudo yum -y remove docker docker-common container-selinux2.可能还要卸载旧版本的docker-selinux包,这个包与官方的docker-engine包相冲突了$ sudo yum -y remove docker-selinux注意旧版本docker中的镜像等内容都存放
2017-03-02 08:49:25
672
适用于mac或windows建模软件starum3.0.2破解的app.asar
2018-10-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人