对于计算机而言,颜色不过是像素点对应的一个24位的数值.现给定一幅分辨率为MxN的画,要求你找出万绿丛中的一点红,即有独一无二颜色的那个像素点,并且该点的颜色与其周围8个相邻像素的颜色差充分大. 输入格式: 输入第一行给出三个正整数,分别是M和N(<= 1000),即图像的分辨率:以及TOL,是所求像素点与相邻点的颜色差阈值,色差超过TOL的点才被考虑.随后N行,每行给出M个像素的颜色值,范围在[0, 224)内.所有同行数字间用空格或TAB分开. 输出格式: 在一行中按照“(x, y): co…
对于计算机而言,颜色不过是像素点对应的一个 24 位的数值.现给定一幅分辨率为 M×N 的画,要求你找出万绿丛中的一点红,即有独一无二颜色的那个像素点,并且该点的颜色与其周围 8 个相邻像素的颜色差充分大. 输入格式: 输入第一行给出三个正整数,分别是 M 和 N(≤ 1000),即图像的分辨率:以及 TOL,是所求像素点与相邻点的颜色差阈值,色差超过 TOL 的点才被考虑.随后 N 行,每行给出 M 个像素的颜色值,范围在 [0,2^​24) 内.所有同行数字间用空格或 TAB 分开. 输出格…
1068 万绿丛中一点红(20 分) 对于计算机而言,颜色不过是像素点对应的一个 24 位的数值.现给定一幅分辨率为 M×N 的画,要求你找出万绿丛中的一点红,即有独一无二颜色的那个像素点,并且该点的颜色与其周围 8 个相邻像素的颜色差充分大. 输入格式: 输入第一行给出三个正整数,分别是 M 和 N(≤ 1000),即图像的分辨率:以及 TOL,是所求像素点与相邻点的颜色差阈值,色差超过 TOL 的点才被考虑.随后 N 行,每行给出 M 个像素的颜色值,范围在 [0,2​24​​) 内.所有同…
1035 Password(20 分) To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l (L in lowercase), or 0 (zero) fro…
1035 Password (20 分)   To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l (L in lowercase), or 0 (zero)…
1088 三人行(20 分) 子曰:"三人行,必有我师焉.择其善者而从之,其不善者而改之." 本题给定甲.乙.丙三个人的能力值关系为:甲的能力值确定是 2 位正整数:把甲的能力值的 2 个数字调换位置就是乙的能力值:甲乙两人能力差是丙的能力值的 X 倍:乙的能力值是丙的 Y 倍.请你指出谁比你强应"从之",谁比你弱应"改之". 输入格式: 输入在一行中给出三个数,依次为:M(你自己的能力值).X 和 Y.三个数字均为不超过 1000 的正整数.…
1077 Kuchiguse(20 分) The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker's personality. Such a preference is called "Kuchiguse" and is often…
1008 Elevator(20 分) The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up o…
1077 Kuchiguse (20 分)   The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker's personality. Such a preference is called "Kuchiguse" and is of…
1061 Dating (20 分)   Sherlock Holmes received a note with some strange strings: Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minute to figure out that those strange strings are actually referring to the cod…