A8350 | Boom
时间限制1s
内存限制256MB
通过 / 提交0/0
题目描述
The first line contains two integers $n,t$ $(1<=n,t<=100)$ , which correspondingly denote the number of teams and a turn's duration.
Next $n$ lines of the input file contain four integers each: $a_{i1},b_{i1},a_{i2},b_{i2}$ $(1<=a_{ij},b_{ij}<=100)$ — the skills of the first and the second player of the $i$ -th team. The teams are given in the order in which they play.
The next line of the input file contains integer $m$ $(1<=m<=100)$ the number of cards.
Next $2m$ lines contain the cards' descriptions. Two lines describe each card. The first line of the description contains the word that consists of no more than 20 characters. The words only contain small Latin letters. The second line of the description contains an integer $c_{k}$ ( $1<=c_{k}<=100$ ) — the complexity of the word written on the $k$ -th card. The cards are listed in the order in which the lie in the deck from top to bottom. The words on all cards are different.
Next $n$ lines of the input file contain four integers each: $a_{i1},b_{i1},a_{i2},b_{i2}$ $(1<=a_{ij},b_{ij}<=100)$ — the skills of the first and the second player of the $i$ -th team. The teams are given in the order in which they play.
The next line of the input file contains integer $m$ $(1<=m<=100)$ the number of cards.
Next $2m$ lines contain the cards' descriptions. Two lines describe each card. The first line of the description contains the word that consists of no more than 20 characters. The words only contain small Latin letters. The second line of the description contains an integer $c_{k}$ ( $1<=c_{k}<=100$ ) — the complexity of the word written on the $k$ -th card. The cards are listed in the order in which the lie in the deck from top to bottom. The words on all cards are different.
输入格式
Print $n$ lines. On the $i$ -th line first print number $s_{i}$ the number of points the $i$ -th team wins. Then print $s_{i}$ space-separated words — the words from the cards guessed by team $i$ in the order in which they were guessed.
输出格式
无
输入输出样例
输入 #1
2 2 1 1 1 1 1 1 1 1 3 home 1 car 1 brother 1
输出 #1
2 home car 1 brother
输入 #2
2 4 1 2 2 1 2 3 2 2 4 armchair 3 quetzalcoatl 10 pilotage 5 defibrillator 7
输出 #2
2 armchair quetzalcoatl 2 pilotage defibrillator
暂无题解
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted