HBC223541[NOIP2002]字串变换,广度优先搜索(BFS),搜索CheckList题解

旧巴黎 算法基础篇 57 0
题库丰富多样,涵盖各个领域,全网最全C++题库,让您在练习中不断成长!
When test driving a vehicle, you are asked to make a checkmark on a tablet. Uponinspection, you have noticed many fingerprints on the screen. Aside from the rushof disgust, you notice that the fingerprints on the screen can be represented by aseries of 2D points on a standard Cartesian grid. You know that checkmarks can beuniquely defined by three points; these three points have distinct x coordinates andthe three points also have distinct y coordinates. The leftmost point must be lower than therightmost point and higher than the middle point. Now you want to know how many uniquecheckmarks you can make using the 2D points. Let’s consider some examples. The three points (1,2), (2,1), and (3,2) do not form a validcheckmark because the leftmost and rightmost points are at the same height. The three points (1,2), (2,1), and (2,3) do not form a valid checkmark because two points have the same x coordinates. The three points (1,2), (3,1), and (4,9) do form a valid checkmark. Given a list of 2D points, determine the number of unique checkmarks that can be formed fromthem.

When test driving a vehicle, you are asked to make a checkmark on a tablet. Upon inspection, you have noticed many fingerprints on the screen. Aside from the rush of disgust, you notice that the fingerprints on the screen can be represented by a series of 2D points on a standard Cartesian grid. You know that checkmarks can be uniquely defined by three points; these three points have distinct x coordinates and the three points also have distinct y coordinates. The leftmost point must be lower than the rightmost point and higher than the middle point. Now you want to know how many unique checkmarks you can make using the 2D points.  Let’s consider some examples. The three points (1,2), (2,1), and (3,2) do not form a valid checkmark because the leftmost and rightmost points are at the same height. The three points (1,2), (2,1), and (2,3) do not form a valid checkmark because two points have the same x coordinates. The three points (1,2), (3,1), and (4,9) do form a valid checkmark. Given a list of 2D points, determine the number of unique checkmarks that can be formed from them.

HBC223541[NOIP2002]字串变换,广度优先搜索(BFS),搜索CheckList题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
想要在职场中立于不败之地?那就来试试全网最全C++题库,让您在练习中快速提升技能。

标签: HBC223541[NOIP2002]字串变换 广度优先搜索(BFS) 搜索CheckList题解