QOJ.ac

QOJ

Time Limit: 3.0 s Memory Limit: 512 MB Total points: 100 Hackable ✓

#8623. 元数据

Statistics

在编程竞赛中,团队协作至关重要!在开始实现之前,团队成员之间有效的沟通和方案讨论是关键。有时,团队成员可能会选择错误的方案并花费过多的时间进行编码。而另一些时候,有人可能会提出更直接、更简单的方案。

一个由三名成员组成的团队正在参加比赛。对于每位团队成员,已知他们实现每道题目所需的时间。然而,他们共用一台电脑,因此他们一次只能处理一道题目。比赛时长为 300 分钟。你的任务是计算该团队最多能解决多少道不同的题目。你可以忽略切换题目所需的时间——如果解决题目所需的总时间不超过 300 分钟,他们就能在规定时间内完成。

让我们看看样例: 第一位团队成员喜欢几何,在实现“3D”或“JigsawPuzzle”等题目时效率最高。 第二位团队成员喜欢构造题,最擅长解决“EqualStrings”、“GeoSharding”或“InteractiveCasino”等题目。虽然“AplusB”题目实现起来可能并不耗时,但其解题思路并不直观,因此其他团队成员根本无法解决它。该成员使用 Java 编程,由于严格的时间限制,无法解决“FastTreeQueries”。 * 最后一位团队成员拥有一个已经实现了数据结构的良好代码库,因此他们实现“TheBestWife”等题目比其他人更快。

输入格式

第一行包含一个整数 $n$ ($1 \le n \le 14$),表示比赛中的题目数量。

接下来的 $n$ 行,每行包含题目的描述:题目名称 $t_1$ $t_2$ $t_3$ ($-1 \le t_i \le 300$),即题目名称以及每位参赛者实现该题目所需的分钟数。题目名称由最多 30 个字母数字字符组成。如果 $t_i$ 等于 $-1$,则表示该团队成员无法实现此题目。

输出格式

输出一个整数,表示团队在比赛期间最多能解决的题目数量。

样例

样例输入 1

13
AplusB -1 20 -1
TheBestWife 80 90 60
Cardinality 40 50 30
3D 40 -1 70
EqualStrings 25 15 20
FastTreeQueries 120 -1 40
GeoSharding 25 20 30
HaveYouSeenThisSubarray 80 90 60
InteractiveCasino 50 20 30
JigsawPuzzle 40 50 80
Knapsack -1 40 200
LondonUnderground -1 200 40
Meta 5 7 10

样例输出 1

10

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.