April Fools Day Contest 2016 G. You're a Professional
G. You're a Professional
题目连接:
http://www.codeforces.com/contest/656/problem/G
Description
A simple recommendation system would recommend a user things liked by a certain number of their friends. In this problem you will implement part of such a system.
You are given user's friends' opinions about a list of items. You are also given a threshold T — the minimal number of "likes" necessary for an item to be recommended to the user.
Output the number of items in the list liked by at least T of user's friends.
Input
The first line of the input will contain three space-separated integers: the number of friends F (1 ≤ F ≤ 10), the number of items I (1 ≤ I ≤ 10) and the threshold T (1 ≤ T ≤ F).
The following F lines of input contain user's friends' opinions. j-th character of i-th line is 'Y' if i-th friend likes j-th item, and 'N' otherwise.
Output
Output an integer — the number of items liked by at least T of user's friends.
Sample Input
3 3 2
YYY
NNN
YNY
Sample Output
2
Hint
题意
有m个人,有n个人给他Y或者N,如果大于等于T个人的话,这个人就很厉害。
问你有多少个人很厉害。
题解:
水题,但是特别迷……
你第一发肯定是wa的,然后第二发得和第一发的语言不一样
交上去之后发现代码长度过长了,然后缩代码
然后发现要加一个kitten
然后就ac了
代码
f,I,T=map(int,input().split())
s=[];
for i in range(f):
s.append(input())
print(sum(sum((s[i][j] == 'Y' for i in range(f)))>=T for j in range(I)))
#kitten
April Fools Day Contest 2016 G. You're a Professional的更多相关文章
- CF #April Fools Day Contest 2016 E Out of Controls
题目连接:http://codeforces.com/problemset/problem/656/E 愚人节专场的E,整个其实就是个Floyd算法,但是要求代码中不能包含 definedoforfo ...
- April Fools Day Contest 2016 D. Rosetta Problem
D. Rosetta Problem 题目连接: http://www.codeforces.com/contest/656/problem/D Description ++++++++[>+& ...
- April Fools Day Contest 2016 F. Ace It!
F. Ace It! 题目连接: http://www.codeforces.com/contest/656/problem/F Description Input The only line of ...
- April Fools Day Contest 2016 E. Out of Controls
E. Out of Controls 题目连接: http://www.codeforces.com/contest/656/problem/E Description You are given a ...
- April Fools Day Contest 2016 C. Without Text 信号与系统
C. Without Text 题目连接: http://www.codeforces.com/contest/656/problem/C Description You can preview th ...
- April Fools Day Contest 2016 B. Scrambled
B. Scrambled 题目连接: http://www.codeforces.com/contest/656/problem/B Description Btoh yuo adn yuor roo ...
- April Fools Day Contest 2016 A. Da Vinci Powers
A. Da Vinci Powers 题目连接: http://www.codeforces.com/contest/656/problem/A Description The input conta ...
- April Fools Day Contest 2014
April Fools Day Contest 2014 A.C.H三道题目 ============================================================= ...
- 坑爹CF April Fools Day Contest题解
H - A + B Strikes Back A + B is often used as an example of the easiest problem possible to show som ...
随机推荐
- python之supervisor进程管理工具
supervisor是python写的一个管理进程运行的工具,可以很方便的监听.启动.停止.重启一个或多个进程:有了supervisor后,就不用字节写启动和监听的shell脚本了,非常方便. sup ...
- geoserver-manager发布style失败
当参数给定没有错误时,最有可能的原因就是: sld文件格式应该以UTF-8无BOM格式编码(自己生成的sld文件多数情况下是以UTF-8格式编码).
- ASCII-->Ansi-->Unicode-->UTF8 关于编码 自己的总结
各种不同的编码 无非就是效率 最大化. 我猜测编码的进化流程: ASCII(American Standard Code for Information Interchange)----满足了美国和西 ...
- ISSCC 2017论文导读 Session 14 Deep Learning Processors,DNPU: An 8.1TOPS/W Reconfigurable CNN-RNN
转载请注明,本文出自Bin的专栏http://blog.csdn.net/xbinworld,谢谢! DNPU: An 8.1TOPS/W Reconfigurable CNN-RNN Process ...
- hdu 5877(树状数组+dfs)
Weak Pair Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total ...
- js基础练习(四)
练习: 通过循环按行顺序为一个5×5的二维数组a赋1到25的自然数,然后输出该数组的左下半三角.试编程. 2 3 4 5 6 7 8 9 10 11 12 13 14 ...
- CSU 1355 地雷清除计划
题目链接:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1355 好题,根本想不到是网络流. 模型如图: 假想从右上角到左下角有一条阻拦线,我们就是 ...
- 783. Minimum Distance Between BST Nodes
Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the ...
- PHP 权威代码风格规范
1.常规 尽量统一ide 比如phpstream 配置文件(Settings → Code Style → PHP → Set from... → Predefined Style → PSR1/PS ...
- .NET 社区汇总
英文社区: 名称:MSDN 地址:http://msdn.microsoft.com/zh-cn/default.aspx 描述:这个网站是大家学.Net的初始网站,也是.net方面官方和权威的资料, ...