【CS Round #44 (Div. 2 only) A】Frequent Numbers
2024-09-28 05:58:39
【链接】h在这里写链接
【题意】
在这里写题意
【题解】
大水题
【错的次数】
0
【反思】
在这了写反思
【代码】
/* */
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <cstdlib>
#include <cmath>
using namespace std;
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define LL long long
#define rep1(i,a,b) for (int i = a;i <= b;i++)
#define rep2(i,a,b) for (int i = a;i >= b;i--)
#define mp make_pair
#define pb emplace_back
#define fi first
#define se second
#define ld long double
#define ms(x,y) memset(x,y,sizeof x)
#define ri(x) scanf("%d",&x)
#define rl(x) scanf("%lld",&x)
#define rs(x) scanf("%s",x)
#define rf(x) scnaf("%lf",&x)
#define oi(x) printf("%d",x)
#define ol(x) printf("%lld",x)
#define oc putchar(' ')
#define os(x) printf(x)
#define all(x) x.begin(),x.end()
#define Open() freopen("F:\\rush.txt","r",stdin)
#define Close() ios::sync_with_stdio(0)
#define sz(x) ((int) x.size())
#define ld long double typedef pair<int,int> pii;
typedef pair<LL,LL> pll; //mt19937 myrand(time(0));
//int get_rand(int n){return myrand()%n + 1;}
const int dx[9] = {0,1,-1,0,0,-1,-1,1,1};
const int dy[9] = {0,0,0,-1,1,-1,1,-1,1};
const double pi = acos(-1.0);
const int N = 1000; int a[N+10],n,k; int main(){
//Open();
//Close();
ri(n),ri(k);
int cnt = 0;
rep1(i,1,n){
int x;
ri(x);
a[x]++;
if (a[x]==k) cnt++;
}
oi(cnt);puts("");
return 0;
}
最新文章
- CentOS 7 下安装redis步骤
- c#的dllimport使用方法详解,调试找不到dll的方法
- JavaScript 之 document对象
- iOS禁用第三方键盘
- MySQL functions, IF, CASE
- C#反射的应用
- Task schedule 分类: 比赛 HDU 查找 2015-08-08 16:00 2人阅读 评论(0) 收藏
- CSS3属性box-shadow使用教程,css3box-shadow
- CleanMyMac 1.10.8
- directshow filter 调试步骤
- Effective Java2读书笔记-对于所有对象都通用的方法(二)
- android开发MD5加密工具类(一)
- MD5和Base64
- Python 对Twitter中指定话题的Tweet基本元素的频谱分析
- Java核心技术卷一基础知识-第11章-异常、断言、日志和调试-读书笔记
- JBoss 7 里一个EJB依赖其他jar的几种方式
- HDU5420 : Victor and Proposition
- [py]约瑟夫问题-循环队列
- C#中如何创建xml文件 增、删、改、查 xml节点信息
- HDU 6201 2017沈阳网络赛 树形DP或者SPFA最长路