自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(63)
  • 资源 (3)
  • 收藏
  • 关注

原创 Ubuntu16.04手工搭建emscripten编译环境

Ubuntu16.04手工搭建emscripten编译环境官方手册:http://kripken.github.io/emscripten-site/docs/building_from_source/building_emscripten_from_source_on_linux.html#building-emscripten-on-linux1     安装依赖项sudo apt-get u...

2018-05-28 21:10:47 4268 10

原创 浙大 PAT Advanced level 1029. Median (25)

Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is 12, and the median of S2={9, 10, 15, 16, 17} is 15. The

2016-05-13 18:21:25 381

原创 浙大 PAT Advanced level 1028. List Sorting (25)

Excel can sort records according to any column. Now you are supposed to imitate this function.InputEach input file contains one test case. For each case, the first line contains two integers N

2016-05-13 18:19:39 415

原创 浙大 PAT Advanced level 1027. Colors in Mars (20)

People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 dig

2016-05-13 18:17:57 340

原创 浙大 PAT Advanced level 1026. Table Tennis (30)

A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open when they arrive, they will be assigned to the ava

2016-05-13 18:16:26 1540

原创 浙大 PAT Advanced level 1025. PAT Ranking (25)

Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in several places, and the ranklists w

2016-05-13 18:14:40 646

原创 浙大 PAT Advanced level 1024. Palindromic Number (25)

A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers

2016-05-13 18:13:12 325

原创 浙大 PAT Advanced level 1023. Have Fun with Numbers (20)

Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit number con

2016-05-13 18:11:38 255

原创 浙大 PAT Advanced level 1022. Digital Library (30)

A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number a

2016-05-13 18:10:35 305

原创 浙大 PAT Advanced level 1021. Deepest Root (25)

A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a highest tree. Such a root

2016-05-13 18:08:20 228

原创 浙大 PAT Advanced level 1020. Tree Traversals (25)

Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the cor

2016-05-13 18:06:07 298

原创 浙大 PAT Advanced level 1019. General Palindromic Number (20)

A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers

2016-05-13 18:04:57 310

原创 浙大 PAT Advanced level 1018. Public Bike Management (30)

There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any station and return it to any other stations in the

2016-05-13 18:03:28 363

原创 浙大 PAT Advanced level 1017. Queueing at Bank (25)

Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait in line behind the yellow li

2016-05-13 18:00:34 339

原创 浙大 PAT Advanced level 1016. Phone Bills (25)

A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of day when the call is made. Wh

2016-05-13 17:58:16 363

原创 浙大 PAT Advanced level 1015. Reversible Primes (20)

A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr

2016-05-13 17:56:51 280

原创 浙大 PAT Advanced level 1014. Waiting in Line (30)

Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:The spa

2016-05-13 17:54:00 367

原创 浙大 PAT Advanced level 1013. Battle Over Cities

It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we nee

2016-04-23 22:04:02 294

原创 浙大 PAT Advanced level 1012. The Best Rank

To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algebra), and E - Eng

2016-04-23 21:53:55 335

原创 浙大 PAT Advanced level 1011. World Cup Betting

With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Si

2016-04-23 21:44:07 300

原创 浙大 PAT Advanced level 1010. Radix

Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is a binary number.Now for any pair of positive

2016-04-23 20:48:10 415

原创 浙大 PAT Advanced level 1009. Product of Polynomials

This time, you are supposed to find A*B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the inf

2016-04-23 20:27:48 362

原创 浙大 PAT Advanced level 1008. Elevator

The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 sec

2016-04-23 20:18:09 318

原创 浙大 PAT Advanced level 1007. Maximum Subsequence Sum

Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1 <= i <= j <= K. The Maximum Subsequence is the continuous subsequence which

2016-04-23 20:04:47 350

原创 浙大 PAT Advanced level 1006. Sign In and Sign Out

At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in's and out's, you

2016-04-19 08:45:11 512

原创 浙大 PAT Advanced level 1005. Spell It Right

Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file contains one test case.

2016-04-16 11:32:28 387

原创 浙大 PAT Advanced level 1004. Counting Leaves

A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.InputEach input file contains one test case. Each case starts with a line

2016-04-16 11:30:27 313

原创 浙大 PAT Adavnced level 1003. Emergency

As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the l

2016-04-16 11:28:10 412

原创 浙大 PAT Advanced level 1002. A+B for Polynomials

This time, you are supposed to find A+B where A and B are two polynomials.InputEach input file contains one test case. Each case occupies 2 lines, and each line contains the information of a p

2016-04-16 11:21:30 320

原创 浙大 PAT Advanced level 1001. A+B Format

1001. A+B Format (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueCalculate a + b and output the sum in standard

2016-04-15 11:58:35 410

原创 浙大 PAT Advanced level 1001--1115 说明

三天打鱼两天晒网,终于把PAT Advanced level 刷完了,接下来我会花一个月左右简单写一下各个题目的解题思路。可以AC的全部代码github: https://github.com/fanxingzju/PAT_advanced百度网盘: http://pan.baidu.com/s/1o8MmLlw

2016-04-15 10:53:29 860

原创 【数据结构】 串的模式匹配算法KMP

/*========================================================================================== 串的模式匹配算法 By~fanxingzju 2014.04.271.Judge(T, pos, num)函数判断String开头的num个元素组成的字符串与pos位置前的num个元素组成的

2014-04-29 14:04:04 685

原创 【数据结构】 串的基本操作

/*========================================================================================== 串的基本操作 By~fanxingzju 2014.04.231.StrAssign(&T, chars)初始条件:chars是字符串常量操作结果:生成一个其值等于chars的串T2.S

2014-04-25 22:54:27 14369 1

原创 【数据结构】 队列的基本操作

/*========================================================================================== 队列的基本操作 By~fanxingzju 2014.04.171.构造一个空队列Q2.销毁队列Q,Q不再存在3.将Q清为空队列4.若队列Q为空,则返回true,否则换回false5.用l

2014-04-25 22:52:48 820

原创 【数据结构】 栈的基本操作

/*=============================================================================================== 栈的基本操作 By~fanxingzju 2014-04-141.构造一个空栈Stack2.销毁栈Stack3.把Stack置为空栈4.若栈Stack为空栈,则返回true,否则返

2014-04-25 22:50:41 777

原创 【数据结构】 链表的19种基本操作(完整版)

基于这篇文章: http://www.cnblogs.com/lifuqing/archive/2011/08/20/List.html作者最后只给出了前面12中操作的代码,这里我帮他补全链表快速排序的思想参考了: http://blog.csdn.net/pinkrobin/article/details/5456094转载本文前请注明出处,谢谢~如果想测试的话,可以在控制台窗口

2014-04-03 17:11:21 2954

原创 【算法导论】 第二章 插入排序、分治排序

#include using namespace std;//假定A[p..q]、A[q+1..r]均已经排序;p<=q<r;void MERGE(int A[], int p, int q, int r){ const int maxnum = 2147483647; int n1 = q-p+1; int n2 = r-q; int *L = new int[n1+1];

2014-03-31 14:00:49 538

原创 浙大 pat Basic Level 1025

1025. 反转链表 (25)给定一个常数K以及一个单链表L,请编写程序将L中每K个结点反转。例如:给定L为1→2→3→4→5→6,K为3,则输出应该为3→2→1→6→5→4;如果K为4,则输出应该为4→3→2→1→5→6,即最后不到K个元素不反转。输入格式: 每个输入包含1个测试用例。每个测试用例第1行给出第1个结点的地址、结点总个数正整数N(5)、以及正整数K(接下来有N行

2014-03-10 14:23:59 753

原创 浙大 pat Basic Level 1024

1024. 科学计数法 (20)科学计数法是科学家用来表示很大或很小的数字的一种方便的方法,其满足正则表达式[+-][1-9]"."[0-9]+E[+-][0-9]+,即数字的整数部分只有1位,小数部分至少有1位,该数字及其指数部分的正负号即使对正数也必定明确给出。现以科学计数法的格式给出实数A,请编写程序按普通数字表示法输出A,并保证所有有效位都被保留。输入格式: 每个输

2014-03-07 09:10:59 538

原创 浙大 pat Basic Level 1023

1023. 组个最小数 (20)给定数字0-9各若干个。你可以以任意顺序排列这些数字,但必须全部使用。目标是使得最后得到的数尽可能小(注意0不能做首位)。例如:给定两个0,两个1,三个5,一个8,我们得到的最小的数就是10015558。现给定数字,请编写程序输出能够组成的最小的数。输入格式: 每个输入包含1个测试用例。每个测试用例在一行中给出10个非负整数,顺序表示我们

2014-03-07 09:09:18 429

torch(git clone https://github.com/torch/distro.git ~/torch --recursive)

torch 项目完整代码,公司无法使用git,所以放了个备份在csdn上 (git clone https://github.com/torch/distro.git ~/torch --recursive)

2017-11-06

链表的19个基本操作

整合了这篇文章,补全了所有的基本操作(该文中只给出了其中12种,这里提供完整的19种功能)http://www.cnblogs.com/lifuqing/archive/2011/08/20/List.html 快速排序部分参考了 http://blog.csdn.net/pinkrobin/article/details/5456094 1.初始化线性表,即置单链表的表头指针为空 2.创建线性表,此函数输入负数终止读取数据 3.打印链表,链表的遍历 4.清除线性表L中的所有元素,即释放单链表L中所有的结点,使之成为一个空表 5.返回单链表的长度 6.检查单链表是否为空,若为空则返回1,否则返回0 7.返回单链表中第pos个结点中的元素,若pos超出范围,则停止程序运行 8.从单链表中查找具有给定值x的第一个元素,若查找成功则返回该结点data域的存储地址,否则返回NULL 9.把单链表中第pos个结点的值修改为x的值,若修改成功返回1,否则返回0 10.向单链表的表头插入一个元素 11.向单链表的末尾添加一个元素 12.向单链表中第pos个结点位置插入元素为x的结点,若插入成功返回1,否则返回0 13.向有序单链表中插入元素x结点,使得插入后仍然有序 14.从单链表中删除表头结点,并把该结点的值返回,若删除失败则停止程序运行 15.从单链表中删除表尾结点并返回它的值,若删除失败则停止程序运行 16.从单链表中删除第pos个结点并返回它的值,若删除失败则停止程序运行 17.从单链表中删除值为x的第一个结点,若删除成功则返回1,否则返回0 18.交换2个元素的位置 19.将线性表进行快速排序

2014-04-03

MFC利用ODBC连接数据库

很好的mfc 连接odbc 实现编程,每个部分的讲解都非常细致,附有完成的代码,非常适合初学者。

2013-04-28

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除