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的更多相关文章

  1. CF #April Fools Day Contest 2016 E Out of Controls

    题目连接:http://codeforces.com/problemset/problem/656/E 愚人节专场的E,整个其实就是个Floyd算法,但是要求代码中不能包含 definedoforfo ...

  2. April Fools Day Contest 2016 D. Rosetta Problem

    D. Rosetta Problem 题目连接: http://www.codeforces.com/contest/656/problem/D Description ++++++++[>+& ...

  3. 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 ...

  4. 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 ...

  5. April Fools Day Contest 2016 C. Without Text 信号与系统

    C. Without Text 题目连接: http://www.codeforces.com/contest/656/problem/C Description You can preview th ...

  6. April Fools Day Contest 2016 B. Scrambled

    B. Scrambled 题目连接: http://www.codeforces.com/contest/656/problem/B Description Btoh yuo adn yuor roo ...

  7. 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 ...

  8. April Fools Day Contest 2014

    April Fools Day Contest 2014 A.C.H三道题目 ============================================================= ...

  9. 坑爹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 ...

随机推荐

  1. linux initcall 介绍 (转自http://blog.csdn.net/fenzhikeji/article/details/6860143)

    现在以module_init为例分析initcall在内核中的调用顺序 在头文件init.h中,有如下定义: #define module_init(x)     __initcall(x); 很明显 ...

  2. elk系列1之入门安装与基本操作【转】

    preface 我们每天都要查看服务器的日志,一方面是为了开发的同事翻找日志,另一方面是巡检服务器查看日志,而随着服务器数量以及越来越多的业务上线,日志越来越多,人肉运维相当痛苦了,此时,参考现在非常 ...

  3. 【转载】C#异常Retry通用类

    //Retry机制 public static class Retry { /// <summary> /// 重试零个参数无返回值的方法 /// </summary> /// ...

  4. Docker practice

    Docker 实践 目标 创建一个基于最新版Ubuntu的镜像,在该镜像中更新apt包源并安装NTP package,最后将该新镜像提交到本地私有的registry中. 本地创建私有Registry ...

  5. group by的运用

    select a.* from zeai_photo a inner join (select max(id) mid,userid from zeai_photo group by userid) ...

  6. fedora16下更改网卡名字

    fedora16下更改网卡名字   今天由于网络启动出错的原因,在网上搜索,发现大部分人的网卡名字都是eth0,可是我的却是p3p1,所以想改成eth0.   然后google了下,发现设备命名什么的 ...

  7. LeetCode解题报告—— Minimum Window Substring && Largest Rectangle in Histogram

    1. Minimum Window Substring Given a string S and a string T, find the minimum window in S which will ...

  8. 邀请用户进TestFlight 体验 App 的测试版本

    iphone手机用户,在工作中常见到,APP版本现在是Beta阶段(iOS版本),需要邀请一些用户来体验新版本,在版本上线前提出更好的建议及时进行修改,此时用到了testflight,很方便的通过邀请 ...

  9. 趣味js【练习题】

    1.无限极函数递归,使每次的参数相乘 需求:add(1)(2)(3)(4)(5) 1.1首先要知道一个东西,就是function每次调用,都会默认执行tosting 1.2利用递归,每次返回的都是函数 ...

  10. lr11_Run-time Settings选项介绍:

    lr11_Run-time Settings选项介绍: ●Run Logic ●Pacing ●Log 下面对每个