自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

技术博客

  • 博客(81)
  • 资源 (11)
  • 收藏
  • 关注

原创 1065. A+B and C (64bit) (20)

Given three integers A, B and C in [-263, 263], you are supposed to tell whether A+B > C.Input Specification:The first line of the input gives the positive number of test cases, T (<=10). The...

2018-02-28 21:17:56 180

原创 1067. Sort with Swap(0,*) (25)

Given any permutation of the numbers {0, 1, 2,..., N-1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operation that is allowed to use? For example, to sort {4, ...

2018-02-28 20:01:07 176

原创 1062. Talent and Virtue (25)

 About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theory, a man being outstanding in both talent and ...

2018-02-28 16:19:27 228

原创 1069. The Black Hole of Numbers (20)

For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decreasing order, a new number can be obtained by tak...

2018-02-28 14:52:54 292

原创 1070. Mooncake (25)

Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional mooncakes according to the region's culture. ...

2018-02-28 12:58:18 178

原创 1063. Set Similarity (25)

Given two sets of integers, the similarity of the sets is defined to be Nc/Nt*100%, where Nc is the number of distinct common numbers shared by the two sets, and Nt is the total number of distinct n...

2018-02-28 12:14:22 211

原创 1066. Root of AVL Tree (25)

An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing...

2018-02-28 10:53:20 201

原创 1064. Complete Binary Search Tree (30)

A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node's key. The right sub...

2018-02-28 09:42:17 200

转载 代码如诗

你可不可以成为我的main函数做我此生必须有且只能有一个的入口——————————我愿为自己加上private在你的class中只有你能调用——————————————代 码 如 诗 。...

2018-02-27 21:24:31 759

原创 随笔(2018/2/27)

走过了人生的20多个春夏秋冬,始终找不到人生的方向。不知道自己是谁,准确的说不知道自己现在是谁,将来又能成为谁;不知道自己为什么而生,生而又能做什么;不知道自己的真正目标是什么,没有前进的动力。浑浑噩噩度过这么长时间却一无所为,直到今天好像明白了点什么,但具体是什么也说不清。就是觉得自己应该去做点什么了,也明白了点道理:人往往后悔的是,不是因为自己做了什么而后悔而是因为没做什么而后悔。有梦就去追至...

2018-02-27 21:21:55 190

原创 1060. Are They Equal (25)

If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123*105 with simple chopping. Now given the number of signif...

2018-02-27 21:04:44 189

原创 1055. The World's Richest (25)

Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to simulate this job, but concentrate only on the pe...

2018-02-27 16:16:04 167

原创 1057. Stack (30)

Stack is one of the most fundamental data structures, which is based on the principle of Last In First Out (LIFO). The basic operations include Push (inserting an element onto the top position) and...

2018-02-27 14:16:46 236

原创 1052. Linked List Sorting (25)

A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key and a Next pointer to the next structure. Now ...

2018-02-26 21:25:13 198

原创 1059. Prime Factors (25)

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 wh...

2018-02-26 18:03:45 194

原创 1053. Path of Equal Weight (30)

Given a non-empty tree with root R, and with weight Wi assigned to each tree node Ti. The weight of a path from R to L is defined to be the sum of the weights of all the nodes along the path from R...

2018-02-26 16:27:34 203

原创 1054. The Dominant Color (20)

Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is called th...

2018-02-26 13:26:00 181

原创 1056. Mice and Rice (25)

Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given map. The goal of each mouse is to eat as much r...

2018-02-26 12:50:42 198

原创 1058. A+B in Hogwarts (20)

If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explained it to Harry, "Seventeen silver Sickles to a Galleon and twenty-nine Knuts to a ...

2018-02-25 22:07:53 210

原创 1044. Shopping in Mars (25)

Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). When making the payment, the chain can be cut at any posi...

2018-02-25 21:50:19 225

原创 1047. Student List for Course (25)

Zhejiang University has 40000 students and provides 2500 courses. Now given the registered course list of each student, you are supposed to output the student name lists of all the courses.Input Sp...

2018-02-25 17:10:13 203

原创 1046. Shortest Distance (20)

The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Input Specification:Each input file contain...

2018-02-25 16:15:50 175

原创 1045. Favorite Color Stripe (30)

Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her favorite order by cutting off those unwanted pieces and sewing the remaining pa...

2018-02-25 14:58:40 207

转载 动态规划 最长公共子序列 过程图解

1.基本概念      首先需要科普一下,最长公共子序列(longest common sequence)和最长公共子串(longest common substring)不是一回事儿。什么是子序列呢?即一个给定的序列的子序列,就是将给定序列中零个或多个元素去掉之后得到的结果。什么是子串呢?给定串中任意个连续的字符组成的子序列称为该串的子串。给一个图再解释一下:       如上图,给定的字符序列...

2018-02-25 13:04:02 312

原创 1048. Find Coins (25)

Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. Howe...

2018-02-25 11:13:33 181

原创 1049. Counting Ones (30)

The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. For example, given N being 12, there are five 1'...

2018-02-25 10:31:20 167

原创 1043. Is It a Binary Search Tree (25)

A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes with keys less than the node's key. The right sub...

2018-02-24 18:55:33 197

原创 1050. String Subtraction (20)

Given two strings S1 and S2, S = S1 - S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to calculate S1 - S2 for any given strings. Howeve...

2018-02-24 16:10:58 152

原创 1051. Pop Sequence (25)

Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence ...

2018-02-24 13:35:50 189

原创 1039. Course List for Student (25)

Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who come...

2018-02-24 11:47:18 235

原创 1032. Sharing (25)

To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same suffix. For exam...

2018-02-24 10:36:18 195

原创 1034. Head of a Gang (30)

One way that the police finds the head of a gang is to check people's phone calls. If there is a phone call between A and B, we say that A and B is related. The weight of a relation is defined to ...

2018-02-23 20:18:54 195

转载 C++中的STL中map用法详解

Map是STL的一个关联容器,它提供一对一(其中第一个可以称为关键字,每个关键字只能在map中出现一次,第二个可能称为该关键字的值)的数据 处理能力,由于这个特性,它完成有可能在我们处理一对一数据的时候,在编程上提供快速通道。这里说下map内部数据的组织,map内部自建一颗红黑树(一 种非严格意义上的平衡二叉树),这颗树具有对数据自动排序的功能,所以在map内部所有的数据都是有序的,后边我们会见识...

2018-02-23 19:02:35 141

原创 1033. To Fill or Not to Fill (25)

With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Differen...

2018-02-23 16:46:16 232

原创 1038. Recover the Smallest Number (30)

Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given {32, 321, 3214, 0229, 87}, we can recover many numbers such like 32-321-3214-0229...

2018-02-23 11:09:08 259

转载 C++中string、char *、char[]的转换

一、string转char*。  主要有三种方法可以将str转换为char*类型,分别是:data(); c_str(); copy();  1.data()方法,如:1 string str = "hello";2 const char* p = str.data();//加const 或者用char * p=(char*)str.data();的形式  同时有一点需要说明,这里在devc+...

2018-02-23 10:58:58 3701

原创 1035. Password (20)

To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l ...

2018-02-22 18:23:22 186

原创 1042. Shuffling Machine (20)

Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "inside jobs" where employees collaborate with gamb...

2018-02-22 17:18:15 175

原创 1041. Be Unique (20)

Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1, 104]. The first one who bets...

2018-02-22 15:39:33 219

原创 1040. Longest Symmetric String (25)

Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given "Is PAT&TAP symmetric?", the longest symmetric sub-string is "s PAT&TAP s", hence ...

2018-02-22 15:16:51 269

chromedriver最新版

chromedriver最新版

2024-08-28

chrome Linux最新版本

chrome Linux最新版本

2024-08-14

kindeditor集成jmeditor公式HTML富文本编辑器

kindeditor集成jmeditor公式HTML富文本编辑器,javaWeb版本,嵌入项目即可使用。

2018-05-11

个人资产管理系统

基于java、mysql的控制台小程序,开发工具eclipse、mysql数据库。

2018-02-01

生活助手平台

基于java、mysql的控制台小程序,开发工具eclipse、mysql数据库。

2018-02-01

android(登录、xml解释、适配器)

XML在各种开发中都广泛应用,Android也不例外。作为承载数据的一个重要角色,如何读写XML成为Android开发中一项重要的技能。

2017-12-07

在线考试系统

在线考试系统:语言:asp.net。开发工具:vs2010,SQL Server 2008。

2017-11-27

作业管理系统

作业管理系统:语言:asp.net。开发工具:vs2010,SQL Server 2008。

2017-11-27

学生在线考试系统

本系统实现了在线考试的目的,以减轻教师的工作负担及提高工作效率,并能激发学生的学习兴趣。

2017-11-27

手机安全管家

安全管家是一款集手机程序管理、VIP隐私保护、电话和信息过滤、安全防盗、来去电归属地显示等功能为一体的手机软件。

2017-11-27

图书出租系统

随着网络化时代的到来,图书出租信息的网络化可以大大节约人工和时间。为此可以开发出图书管理系统,广泛的应用于学校和工业、商业、企业、事业和行政等单位。实际上,该系统的实用性还是比较强的。

2017-11-27

图书租赁管理系统

2017-01-06

ImageSwitcher实现图片左右切换

2016-09-22

空空如也

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

TA关注的人

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