Problem 2737 --String - Card Game

2737: String - Card Game

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $20$ 正确数量 $13$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 STL 字符串

Card Game 

Taro and Hanako are playing card games. They have n cards each, and they compete n turns. At each turn Taro and Hanako respectively puts out a card. The name of the animal consisting of alphabetical letters is written on each card, and the bigger one in lexicographical order becomes the winner of that turn. The winner obtains 3 points. In the case of a draw, they obtain 1 point each. 

Write a program which reads a sequence of cards Taro and Hanako have and reports the final scores of the game.

In the first line, the number of cards n is given. In the following n lines, the cards for n turns are given respectively. For each line, the first string represents the Taro's card and the second one represents Hanako's card.
Print the final scores of Taro and Hanako respectively. Put a single space character between them.
3
cat dog
fish fish
lion tiger
1 7

n ≤ 1000 

The length of the string ≤ 100

推荐代码 查看2737 所有题解 上传题解视频得图灵币

本题记录 用 户(点击查看用户) 运行号(点击购买题解) 时 间
算法最快[$0 $ms] +_+ 450004 2019-07-30 14:56:33
内存最少[$2016 $KB] 请问一下安科怎么走 449816 2019-07-29 15:12:17
第一AC 刘成健 321675 2018-11-20 21:52:30
第一挑战 刘成健 321675 2018-11-20 21:52:30

赛题来源/所属竞赛 会津大学《C++ Programming I》 C++程序设计(入门)

竞赛编号 竞赛名称 竞赛时间 访问比赛
1489 2019年安徽科技学院《ACM程序设计》第50周赛 2019-12-15 16:00:00 请登录