欢迎来到PJCK的博客

共 15 页: 上一页 1 2 3 4 5 6 下一页 末页
摘要:【问题描述】 kotori在一个n*m迷宫里,迷宫的最外层被岩浆淹没,无法涉足,迷宫内有k个出口。kotori只能上下左右四个方向移动。她想知道有多少出口是她能到达的,最近的出口离她有多远? 【输入】 第一行为两个整数n和m,代表迷宫的行和列数 (1≤n,m≤30) 后面紧跟着n行长度为m的字符串来 阅读全文
posted @ 2019-05-17 22:40 PJCK 阅读 (22) 评论 (0) 编辑
摘要:In a town, there are N people labelled from 1 to N. There is a rumor that one of these people is secretly the town judge. If the town judge exists, th 阅读全文
posted @ 2019-05-17 19:19 PJCK 阅读 (8) 评论 (0) 编辑
摘要:There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct 阅读全文
posted @ 2019-05-17 16:27 PJCK 阅读 (22) 评论 (0) 编辑
摘要:There are N rooms and you start in room 0. Each room has a distinct number in 0, 1, 2, ..., N-1, and each room may have some keys to access the next r 阅读全文
posted @ 2019-05-17 09:56 PJCK 阅读 (16) 评论 (0) 编辑
摘要:An image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from 0 to 65535). Given a coordinate (sr, 阅读全文
posted @ 2019-05-16 20:58 PJCK 阅读 (12) 评论 (0) 编辑
摘要:Given a 2D array A, each cell is 0 (representing sea) or 1 (representing land) A move consists of walking from one land square 4-directionally to anot 阅读全文
posted @ 2019-05-15 21:19 PJCK 阅读 (13) 评论 (0) 编辑
摘要:迷宫问题 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 41913 Accepted: 23240 Description 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 阅读全文
posted @ 2019-05-15 13:08 PJCK 阅读 (12) 评论 (0) 编辑
摘要:Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2019-05-15 08:59 PJCK 阅读 (14) 评论 (0) 编辑
摘要:Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and r 阅读全文
posted @ 2019-05-14 22:33 PJCK 阅读 (7) 评论 (0) 编辑
摘要:Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum pro 阅读全文
posted @ 2019-05-14 21:51 PJCK 阅读 (5) 评论 (0) 编辑
摘要:You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. Now, we define a pair (c, d) can follow an 阅读全文
posted @ 2019-05-10 21:15 PJCK 阅读 (10) 评论 (0) 编辑
摘要:Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Note: There may be more than one LIS combination, it 阅读全文
posted @ 2019-05-10 21:01 PJCK 阅读 (9) 评论 (0) 编辑
摘要:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the fo 阅读全文
posted @ 2019-05-10 19:19 PJCK 阅读 (8) 评论 (0) 编辑
摘要:Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. Example 1: E 阅读全文
posted @ 2019-05-10 19:03 PJCK 阅读 (7) 评论 (0) 编辑
摘要:Given a 2D binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. Example: 这是一个DP题,好像是线性DP吧。 官方题解有DP的 阅读全文
posted @ 2019-05-10 12:30 PJCK 阅读 (10) 评论 (0) 编辑
共 15 页: 上一页 1 2 3 4 5 6 下一页 末页