欢迎来到PJCK的博客

摘要: 【问题描述】 kotori在一个n*m迷宫里,迷宫的最外层被岩浆淹没,无法涉足,迷宫内有k个出口。kotori只能上下左右四个方向移动。她想知道有多少出口是她能到达的,最近的出口离她有多远? 【输入】 第一行为两个整数n和m,代表迷宫的行和列数 (1≤n,m≤30) 后面紧跟着n行长度为m的字符串来 阅读全文
posted @ 2019-05-17 22:40 PJCK 阅读(247) 评论(0) 推荐(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 阅读(100) 评论(0) 推荐(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 阅读(234) 评论(0) 推荐(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 阅读(131) 评论(0) 推荐(0) 编辑