CF120G.Boom
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
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: ai1,bi1,ai2,bi2 (1<=aij,bij<=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 ck ( 1<=ck<=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 si the number of points the i -th team wins. Then print si 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