自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

莫天

莫愁前路无知己,天下谁人不识君.

  • 博客(56)
  • 资源 (2)
  • 收藏
  • 关注

原创 Lambda表达式

本质上是一个匿名的方法: 先看下面这个例子,一个传统的方法`public int add(int x,int y){ return x+y; }`转换为Lambda之后就是下面这个样子(int x,int y)->x+y //表达式(int x,int y)->{return x+y};//语句块lamdba表达式的组成:参数列表,箭头,以及一个语句块或者是表达

2018-06-23 22:18:34 6636 2

原创 Logback使用的一点小坑

最近在使用Logback时遇到的坑记录一下,避免再次遇到在logback中我们知道 日志的回滚策略有很多种。但是常用的就是 根据时间/文件大小来滚动记录,比如每天滚动一次,每小时,日志文件超过指定大小时等等。下面则是我想按照指定时间配置的logback.xml ,但是一直都没有生效 也就是日志文件一直都记录到一开始指定的文件中,没有滚动记录文件节选片段<appender na...

2018-05-14 13:09:44 1462

原创 排序的那些方法实现

冒泡,选择,排序,快排,归并,希尔,桶排

2017-07-24 18:23:31 345 1

原创 scanf冷门的格式控制符(%n%[])

一道小题,但能引发思路汉字统计 HDU-2030 统计给定文本文件中汉字的个数。Input输入文件首先包含一个整数n,表示测试实例的个数,然后是n段文本。 Output对于每一段文本,输出其中的汉字的个数,每个测试实例的输出占一行。 Hint:Hint:从汉字机内码的特点考虑~ Sample Input2WaHaHa! WaHaHa! 今年过节不说话要说只说普通话WaHaHa!

2017-07-20 10:46:32 3799

原创 关于zsh的一些配置

zsh是shell的一种,由于配置过于复杂,以至于很多人并不常用他。因为大多数Linux产品,默认使用的都是bash shell。直到一个开源项目的出现(oh-my-zsh) github来管理zsh的配置和支持更多插件,使得zsh配置变得更容易,使用起来更加强大。以至于他有了个外号—终极shell。安装zshsudo apt install zsh使用开源项目(oh-my-zsh)来帮我

2017-07-19 11:34:14 24863

原创 免试题(3)

首先,我们看到了一大段01串,但是却没有任何有效的信息。所以还是老套路,先看看源码里面有什么。 我们发现了一个压缩包,解压后得到了一个a.out文件,这是linux下的可执行文件。执行看看: 发现需要参数,可是参数是什么呢,联想到我们一开始看到的01串,可能这01串就是提供给我们的参数,再仔细发现01串是每8位一组,而常见的ascii码最多到127二进制也是八位,我们猜想这很可能就是

2017-04-28 17:30:13 328

原创 POJ 1847----Tram(Floyd)

DescriptionTram network in Zagreb consists of a number of intersections and rails connecting some of them. In every intersection there is a switch pointing to the one of the rails going out of the inte

2017-02-23 20:48:14 354 2

原创 POJ - 3660----Cow Contest (Floyd)

题目大意:有n头牛比赛,m种比赛结果,求一共有多少头牛的排名被确定了。 思路:如果一头牛与所有别的牛的比赛结果都确定,就是说这头牛的排名确定了,可用Floyd来做#include<algorithm>#include<iostream>#include<stdlib.h>#include<cstring>#include<cstdio>#include<cstdio>#include<

2017-02-21 20:05:47 329

原创 POJ - 1502----MPI Maelstrom(Dijkstra)

BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee’s research advis

2017-02-21 19:57:16 299

原创 POJ - 3259----Wormholes(Bellman-Ford)

While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that is

2017-02-20 19:57:12 317

原创 POJ - 3268----Silver Cow Party(Dijkstra)

One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirectional (one-way roa

2017-02-20 19:49:19 570

原创 POJ - 1797----Heavy Transportation(Dijkstra)

Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his cus

2017-02-19 21:40:07 311

原创 POJ - 2387----Til the Cows Come Home(Dijkstra)

Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get ba

2017-02-19 21:36:18 284

原创 POJ 1679----The Unique MST(prim)

Problem Description Given a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of

2017-02-18 20:09:09 353

原创 POJ 1258----Agri-Net(prim)

Description Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your help, of course. Farmer John order

2017-02-18 20:04:37 272

原创 POJ - 1751----Highways(Kruskal)

The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already constructed a numbe

2017-02-17 19:47:54 325

原创 POJ - 2349----Arctic Network(prim)

Description The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the netw

2017-02-17 19:42:47 311

原创 POJ - 1789----Truck History(prim)

Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The company has its own code describing each type of a tru

2017-02-16 21:47:49 205

原创 POJ - 1287----Networking(prim)

You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may connect pairs of po

2017-02-16 21:40:55 242

原创 POJ - 1251----Jungle Roads(prim)

The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so

2017-02-15 22:08:51 580

原创 HDU - 1078----FatMouse and Cheese(dp制表)

FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At each grid location Fatmou

2017-02-15 22:01:37 350

原创 POJ - 3186----Treats for the Cows

FJ has purchased N (1 <= N <= 2000) yummy treats for the cows who get money for giving vast amounts of milk. FJ sells one treat per day and wants to maximize the money he receives over a given period t

2017-02-14 23:16:02 404

原创 POJ - 2533----Longest Ordered Subsequence

A numeric sequence of ai is ordered if a1 < a2 < … < aN. Let the subsequence of the given numeric sequence ( a1, a2, …, aN) be any sequence ( ai1, ai2, …, aiK), where 1 <= i1 < i2 < … < iK <= N. For ex

2017-02-14 23:08:11 355

原创 POJ - 1458----Common Subsequence

A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, …, xm > another sequence Z = < z1, z2, …, zk > is a subsequence of X

2017-02-13 20:33:17 235

原创 HDU - 1160----FatMouse's Speed

FatMouse believes that the fatter a mouse is, the faster it runs. To disprove this, you want to take the data on a collection of mice and put as large a subset of this data as possible into a sequence

2017-02-13 20:28:45 428

原创 HDU - 1257----最少拦截系统

某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹. 怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多少套拦截系统

2017-02-12 22:03:54 404

原创 HDU - 1260----Tickets

Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He is wandering when could he go back home as early as

2017-02-12 21:58:38 382

原创 HDU - 1176----免费馅饼

都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中是个身手敏捷的高手,但在现实中运动神经特别迟钝,

2017-02-11 20:26:25 357

原创 HDU - 1114----Piggy-Bank

Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea behind is simple.

2017-02-11 20:22:37 339

原创 HDU - 1087----Super Jumping! Jumping! Jumping!

Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now. The game can be

2017-02-09 22:24:56 328

原创 HDU - 1029----Ignatius and the Princess IV

“OK, you are not too bad, em… But you can never pass the next test.” feng5166 says. “I will tell you an odd number N, and then N integers. There will be a special integer among them, you have to tell m

2017-02-09 22:20:24 325

原创 HDU - 1024----Max Sum Plus Plus

Now I think you have got an AC in Ignatius.L’s “Max Sum” problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced with a more difficult problem. Given a

2017-02-07 14:57:20 316

原创 HDU - 1560----DNA sequence

The twenty-first century is a biology-technology developing century. We know that a gene is made of DNA. The nucleotide bases from which DNA is built are A(adenine), C(cytosine), G(guanine), and T(thym

2017-02-07 14:30:57 566

原创 HDU - 3533----Escape(BFS+预处理)

The students of the HEU are maneuvering for their military training. The red army and the blue army are at war today. The blue army finds that Little A is the spy of the red army, so Little A has to

2017-02-05 20:53:29 328

原创 HDU - 2181----哈密顿绕行世界问题

一个规则的实心十二面体,它的 20个顶点标出世界著名的20个城市,你从一个城市出发经过每个城市刚好一次后回到出发的城市。 Input前20行的第i行有3个数,表示与第i个城市相邻的3个城市.第20行以后每行有1个数m,m<=20,m>=1.m=0退出. Output输出从第m个城市出发经过每个城市1次又回到m的所有路线,如有多条路线,按字典序输出,每行1条路线.每行首先输出是第几条路线.然后个

2017-02-05 20:41:34 514

原创 HDU - 1495-----非常可乐

大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 (正好装满一瓶) ,它们三个之间可以相互倒可乐 (都是没有刻度的,且 S==N+M,101>S>0,N>

2017-02-04 13:49:02 779

原创 POJ - 3984----迷宫问题

定义一个二维数组: int maze[5][5] = {0, 1, 0, 0, 0,0, 1, 0, 1, 0,0, 0, 0, 0, 0,0, 1, 1, 1, 0,0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短路线。Input一个5 × 5的二维数组,表示一个迷宫。数据保证有唯一解。O

2017-02-04 13:45:18 373

原创 FZU - 2150----Fire Game(BFS+枚举)

Fat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this board is consisting of grass or just empty and then they start

2017-02-02 21:03:41 417

原创 POJ - 3414----Pots

You are given two pots, having the volume of A and B liters respectively. The following operations can be performed:FILL(i) fill the pot i (1 ≤ i ≤ 2) from the tap; DROP(i) empty the pot i

2017-02-02 20:42:47 377

原创 非启发式搜索

简单介绍一下非启发式搜索。 非启发式搜索是一种无信息搜索,一般只适用于求解比较简单的问题,通常是按预定的搜索策略进行搜索,而不会考虑到问题本身的特性(即就是不会利用问题本身的信息)。 常用的非启发式搜索有: 1,广度优先搜索(BFS) BFS通常借用队列来完成。 主要代码思想为:一张图G中(不一定是图,只要可以抽象成图的都可以) 1:初始节点S0开始入队并设访问标记

2017-01-31 15:07:34 1813

代码之殇_965d2

本书是《代码大全》的姊妹篇,资深软件开发专家30余年工作经验结晶,被誉为“软件行业的财富”,微软公司软件工程师必读之书。它从软件开发流程、技术、方法、项目管理、团队管理、人际沟通等多角度总结出90余个具有代表性的问题(大多数问题可能会给公司或软件项目带来毁灭性灾难),并给出了问题的解决方案和最佳实践,值得所有软件工程师和项目管理者研读。 [1] 本书将这90余个问题分为10章:第1章讨论如何通过管理风险、范围和沟通来保障项目按时完成;第2章介绍消除经验主义的大量过程改进的方法与技巧;第3章讨论消除低效率的策略;第4章主要讨论开发者与其他工种之间的关系;第5章重点阐释软件质量问题;第6章解析软件设计的基本原理和错综复杂的本性;第7章探讨如何规划职业生涯;第8章分析工作与生活中存在的缺点的原因与纠正措施;第9章讨论如何进行有效管理;第10章分析如何成功应对一个软件业务所面临的挑战。 [1]

2018-08-19

[ANDROID核心原理与系统应用高效开发].韩超.扫描版

《Android核心原理与系统级应用高效开发》是一本介绍Android核心开发的技术图书,主要目标是让Android的开发者更深入地理解Android系统,让开发的过程更正确、更有效率。本书主要由两大部分组成,第1篇自下而上介绍Android核心框架层的结构,并将开发的技巧和要点蕴含于其中;第2篇偏重系统级的应用层,关注Android开发过程中的重点方面。

2018-08-19

空空如也

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

TA关注的人

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