Blankj's Blog

select * from utils


  • 首页

  • 关于

  • 分类

  • 标签

  • 归档

  • 我的星球

  • 面经

  • 我的开源库

  • Go 速查

  • GitBook

  • 小伙伴们

  • 内推

  • 搜索

1006. Sign In and Sign Out (25)

发表于 2015-08-19 | 分类于 OJ , PAT | 阅读次数:

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 are supposed to find the ones who have unlocked and locked the door on that day.

阅读全文 »

1005. Spell It Right (20)

发表于 2015-08-19 | 分类于 OJ , PAT | 阅读次数:

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.

阅读全文 »

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操作输出你所求出的结果。

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

布兰柯基

160 日志
37 分类
84 标签
GitHub 简书 掘金 CSDN 微博
0%
© 2020 布兰柯基