QOJ.ac

QOJ

时间限制: 1 s - 2 s 内存限制: 1024 MB 总分: 20

#5858. 空当接龙统计

统计

我今天玩了 $D$ ($D > 0$) 局空当接龙(FreeCell)。每局游戏的结果只有两种:赢或输。我已经玩了很多年,到目前为止总共玩了 $G$ 局(显然,$G \ge D$)。

在一天结束时,我查看了游戏统计数据,想看看我表现如何。结果显示,我今天玩的 $D$ 局游戏中,有 $P_D$ 的百分比获胜;而在我玩过的所有 $G$ 局游戏中,有 $P_G$ 的百分比获胜。奇迹般的是,不需要进行任何四舍五入——这两个百分比都是精确的!遗憾的是,我不记得今天玩的具体局数 ($D$),也不记得总共玩的具体局数 ($G$)。但我知道,我今天玩的局数不可能超过 $N$ ($D \le N$)。

请问显示的百分比是否可能成立,还是游戏统计计算器坏了?

输入格式

输入的第一行包含测试用例的数量 $T$。接下来有 $T$ 行,每行包含 3 个整数:$N$、$P_D$ 和 $P_G$。

输出格式

对于每个测试用例,输出一行 "Case #x: y",其中 $x$ 是用例编号(从 1 开始),$y$ 为 "Possible" 或 "Broken"。

样例

输入格式 1

3
1 100 50
10 10 100
9 80 56

输出格式 1

Case #1: Possible
Case #2: Broken
Case #3: Possible

说明

在样例 3 中,我今天可能玩了 5 局 ($D = 5$),总共玩了 25 局 ($G = 25$),今天赢了 4 局(5 局的 80%),总共赢了 14 局(25 局的 56%)。

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.