Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

这道题,不难,但有很多坑

Posted by witstorm at 2018-05-09 08:42:17 on Problem 1052
说下解题思路:
输入给的是三视图,没有固定关系,需要组合一下,,,坑
根据三视图生成立方体,这个思路很简单,每个位置枚举一下,能生成立方体的位置必定在每个视图中的位置为‘X’
生成立方体之后,再判断立方体的三视图是否和原来一样(因为可能在某个原视图中为‘X’,但是其他原视图为‘-’,导致生成的立方体不正确)
判断连通性,到了这一步就可以用BFS或DFS遍历立方体,遍历完成之后,判断立方体中是否有没有被访问到的位置

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator