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. 记一次powershell反混淆(2)

    样本地址 https://www.hybrid-analysis.com/sample/4b4b8b13c264c8f7d7034060e0e4818a573bebc576a94d7b13b4c174 ...

  2. 【swupdate文档 三】SWUpdate: 嵌入式系统的软件升级

    SWUpdate: 嵌入式系统的软件升级 概述 本项目被认为有助于从存储媒体或网络更新嵌入式系统.但是,它应该主要作为一个框架来考虑,在这个框架中可以方便地向应用程序添加更多的协议或安装程序(在SWU ...

  3. nginx证书制作以及配置https并设置访问http自动跳转https(反向代理转发jboss)

    nginx证书制作以及配置https并设置访问http自动跳转https 默认情况下ssl模块并未被安装,如果要使用该模块则需要在编译时指定–with-http_ssl_module参数,安装模块依赖 ...

  4. CPU运行时间——time

    用途说明time命令常用于测量一个命令的运行时间,注意不是用来显示和修改系统时间的(这是date命令干的事情).但是今天我通过查看time命令的手册页,发现它能做的不仅仅是测量运行时间,还可以测量内存 ...

  5. mac 安装mongodb与常用操作

    1.安装 brew update brew install mongodb 2.启动mongo mongod --config /usr/local/etc/mongod.conf 3.启动 mong ...

  6. 基于AQS实现的Java并发工具类

    本文主要介绍一下基于AQS实现的Java并发工具类的作用,然后简单谈一下该工具类的实现原理.其实都是AQS的相关知识,只不过在AQS上包装了一下而已.本文也是基于您在有AQS的相关知识基础上,进行讲解 ...

  7. 实习day2:@2X图片,git,coding.net,

    @2X是5和6系列的图片,@3X是6P等大屏的图片 本公司目前只用@2X的图片适配. 比如20X27的图片 1x, 就是原始大小: 用2X, 就除以2,变成10X13.5: 如果用3X的, 就除以3, ...

  8. python基础(11)--面向对象

    1.概述 面向过程:根据业务的逻辑从上到下写代码 函数式:将某功能代码封装到函数中,日后便无需重复编写,仅调用函数即可 面向对象:对函数进行分类和封装,让开发更快更好更强 面向过程编程最易被初学者接受 ...

  9. 关于Android不同系统版本的市场占比情况详解

    一,google官方统计的不同Android版本市场的占比强开 google统计的数据情况 这个是google官方对于不同版本的市场占比情况.这个是针对全世界所有的Android手机占比情况. 二,友 ...

  10. entityframework删除时提示“DELETE 语句与 REFERENCE 约束”的解决方法。

    1.加入List对象的Include var entity = db.XinDes.Include("Reviews").First(); db.XinDes.Remove(ent ...