Blankj's Blog

select * from learn


  • 首页

  • 关于

  • 分类

  • 标签

  • 归档

  • GitBook

  • 小伙伴们

  • 搜索

1004. Counting Leaves (30)

发表于 2015-08-19 | 分类于 OJ , PAT

A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.

阅读全文 »

1003. Emergency (25)

发表于 2015-08-09 | 分类于 OJ , PAT

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 length of each road between any pair of cities are marked on the map. When there is an emergency call to you from some other city, your job is to lead your men to the place as quickly as possible, and at the mean time, call up as many hands on the way as possible.

阅读全文 »

1002. A+B for Polynomials (25)

发表于 2015-08-09 | 分类于 OJ , PAT

This time, you are supposed to find A+B where A and B are two polynomials.

阅读全文 »

1001. A+B Format (20)

发表于 2015-08-09 | 分类于 OJ , PAT

Calculate a + b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less than four digits).

阅读全文 »

数据结构-图的邻接矩阵表示

发表于 2015-07-27 | 分类于 数据结构

给出邻接矩阵描述的图,顶点数<26,求

1、边数

2、无向图各顶点度数

3、求两个顶点最短路径

阅读全文 »

三种递归遍历二叉树

发表于 2015-07-20 | 分类于 数据结构

题目描述

给定一颗二叉树,要求输出二叉树的前序遍历、后序遍历、中序遍历二叉树得到的序列。本题假设二叉树的结点数不超过1000。

阅读全文 »

KMP模式匹配

发表于 2015-07-18 | 分类于 数据结构

题目描述

输入一个主串和一个子串,若匹配成功,则找出匹配的趟数和在子串在主串中的位置,若匹配不成功,则输出0

阅读全文 »

操作格子

发表于 2015-05-26 | 分类于 OJ

问题描述

有n个格子,从左到右放成一排,编号为1-n。

共有m次操作,有3种操作类型:

1.修改一个格子的权值,

2.求连续一段格子权值和,

3.求连续一段格子的最大值。

对于每个2、3操作输出你所求出的结果。

阅读全文 »

Java对结构体的排序

发表于 2015-04-01 | 分类于 OJ

题目描述

输入若干个学生的信息(学号、姓名、成绩),输入学号为0时结束,用单向链表组织这些学生的信息后,再按成绩由低到高顺序输出。

阅读全文 »

Blocks

发表于 2015-03-24 | 分类于 OJ

Description

Donald wishes to send a gift to his new nephew, Fooey. Donald is a bit of a traditionalist, so he has chosen to send a set of N classic baby blocks. Each block is a cube, 1 inch by 1 inch by 1 inch. Donald wants to stack the blocks together into a rectangular solid and wrap them all up in brown paper for shipping. How much brown paper does Donald need?

阅读全文 »
1…131415
布兰柯基

布兰柯基

148 日志
34 分类
76 标签
GitHub 简书 掘金 CSDN 微博
0%
© 2018 布兰柯基