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 CSUST_14 at 2013-01-10 23:46:03 on Problem 2200
弄清题意得天下
题意为:一副牌按AC,AD,AH,AS,1C...排列。现今魔术的有五张牌,如果给一张牌给观众,魔术则能猜中这一张牌。
    给你五张牌,要你求出第一张是缺失的牌,缺失的牌与后边的四张牌有一个关系就是缺失牌去第二张牌同一花色,缺失牌的值是第二张牌+(后三张牌中最小的牌排第几位则加几,后三张牌中的两个较大的顺序相反则加3,否则不加)
如题中实例:4D 5H 10C 10D QH
排好后便是:5H QH 10D 10C 4D 缺失牌:5H,H为第二张牌QH的花色,10D,10C,4D中的最小牌排第3位,则在第二张牌QH的值Q上加3--->2 而这三张牌中两个较大的牌为10D,10C,顺序相反,故还应加3,即2+3=5,故而 缺失牌为5H.

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