#include <iostream>
#include <vector> using namespace std;
int main(){
int n,k,cnt = ;
cin >> n >>k;
for( int i = ; i < n ; ++ i ){
int a;
vector<int> goodNum(k+,);
cin >> a;
while(a){
if(a%<=k) goodNum[a%]++;
a/=;
}
int j = ;
for(j = ; j < k+; ++ j)
if(!goodNum[j]) break;
if(j >= k +) cnt++;
}
cout<<cnt<<endl;
return ;
}

Codeforces Round #213 (Div. 2) A. Good Number的更多相关文章

  1. Codeforces Round #427 (Div. 2) B. The number on the board

    引子: A题过于简单导致不敢提交,拖拖拉拉10多分钟还是决定交,太冲动交错了CE一发,我就知道又要错过一次涨分的机会.... B题还是过了,根据题意目测数组大小开1e5,居然蒙对,感觉用vector更 ...

  2. Codeforces Round #585 (Div. 2) B. The Number of Products(DP)

    链接: https://codeforces.com/contest/1215/problem/B 题意: You are given a sequence a1,a2,-,an consisting ...

  3. Codeforces Round #411 div 2 D. Minimum number of steps

    D. Minimum number of steps time limit per test 1 second memory limit per test 256 megabytes input st ...

  4. Codeforces Round #491 (Div. 2) E - Bus Number + 反思

    E - Bus Number 最近感觉打CF各种车祸.....感觉要反思一下, 上次读错题,这次想当然地以为18!肯定暴了longlong 而没有去实践, 这个题我看到就感觉是枚举每个数字的个数,但是 ...

  5. Codeforces Round #460 (Div. 2)-B. Perfect Number

    B. Perfect Number time limit per test2 seconds memory limit per test256 megabytes Problem Descriptio ...

  6. Codeforces Round #209 (Div. 2) C - Prime Number

    传送门 题意 给出n个数及x,求 \[\frac{\sum _{i=1}^n x^{a_1+a_2+...+a_{i-1}+a_{i+1}+...a_n}}{\prod_{i=1}^n x^{a_i} ...

  7. Codeforces Round #608 (Div. 2) E. Common Number

    链接: https://codeforces.com/contest/1271/problem/E 题意: At first, let's define function f(x) as follow ...

  8. Codeforces Round #460 (Div. 2) B Perfect Number(二分+数位dp)

    题目传送门 B. Perfect Number time limit per test 2 seconds memory limit per test 256 megabytes input stan ...

  9. Codeforces Round #555 (Div. 3) B. Long Number 【仔细读题】

    B. Long Number time limit per test 2 seconds memory limit per test 256 megabytes input standard inpu ...

随机推荐

  1. Sort List

    采用归并排序,通过定义快.慢两个指针来找到中点,再采用之前的排序算法进行归并. ListNode *listSort(ListNode *head) { //定义快慢指针,找到链表中心 ListNod ...

  2. Insertion Sort List

    对链表进行插入排序,比对数组排序麻烦一点. ListNode *insertSortList(ListNode *head) { ListNode dummy(-); for (ListNode *c ...

  3. java对象与json对象间的相互转换

    工程中所需的jar包,因为在网上不太好找,所以我将它放到我的网盘里了,如有需要随便下载. 点击下载 1.简单的解析json字符串 首先将json字符串转换为json对象,然后再解析json对象,过程如 ...

  4. python-twisted系列(1)

    前言: 这不是一个入门教程.而是知识点的梳理. 开胃图: 这是一个TCP server的“交互图”. reactor 它是Twisted事件处理的核心.包括一些处理网络通讯,线程和事件分派的接口. 一 ...

  5. 【SpringMVC】SpringMVC系列13之关于 mvc:annotation-driven

    13.关于 mvc:annotation-driven 13.1.概述      会自动注册RequestMappingHandlerMapping.RequestMappingHandlerAdap ...

  6. bootbox显示中文的按钮

    $("selector").on('click',function(){ bootbox.confirm({ title : "请确认", buttons: { ...

  7. C++ traits

    [本文链接] http://www.cnblogs.com/hellogiser/p/cplusplus-traits.html [分析] 什么是traits?其实它并不是一个新的概念,上个世纪90年 ...

  8. java用代理访问

    Properties prop = System.getProperties(); prop.setProperty("http.proxyHost", "localho ...

  9. JqueryEasyUI教程

    第一章EasyUI中弹出框dialog的使用为div标签加上class="easyui-dialog"即可使用一.引入文件介绍jquery.min.js:jquery核心文件,不再 ...

  10. php 获取当前时间

    <?php echo $showtime=date("Y-m-d H:i:s");?>