题目链接:http://ac.jobdu.com/problem.php?pid=1018

详解链接:https://github.com/zpfbuaa/JobduInCPlusPlus

参考代码:

//
// 1018.cpp
// oj
//
// Created by PengFei_Zheng on 05/04/2017.
// Copyright © 2017 PengFei_Zheng. All rights reserved.
//
//ios::sync_with_stdio(false); #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <string.h> using namespace std; int n,temp,grade;
int score[]={}; int main(){ while(scanf("%d",&n)&&n!=){
memset(score,,sizeof(score));
for(int i = ; i < n ; i++){
scanf("%d",&temp);
score[temp]++;
}
scanf("%d",&grade);
printf("%d\n",score[grade]) ;
}
} /**************************************************************
Problem: 1018
User: zpfbuaa
Language: C++
Result: Accepted
Time:10 ms
Memory:1520 kb

最新文章

  1. [LeetCode] Matchsticks to Square 火柴棍组成正方形
  2. mongo group by
  3. Pow 算法
  4. PHP 语言需要避免的 10 大误区
  5. linux系统使用密钥登录设置
  6. 微软提供了三个核心服务:Windows+Office 365+Azure
  7. Kinect的学习笔记发展(一)Kinect引进和应用
  8. wuzhi 五指 伪静态
  9. HDU 4006 The kth great number 优先队列、平衡树模板题(SBT)
  10. ionic,Angular 开发实践
  11. hadoop2.8和spark2.1完全分布式搭建
  12. 如何将外部的obj模型导入OpenGL
  13. 求小于n的素数个数
  14. java Arrays.asList方法注意事项
  15. 团队作业—预则立&amp;&amp;他山之石
  16. [luogu3648][bzoj3675][APIO2014]序列分割【动态规划+斜率优化】
  17. Http和RPC区别
  18. [No0000166]CPU的组成结构及其原理
  19. Tomcat性能优化之(一) 启动GZIP压缩
  20. React Native踩坑之启动android模拟器失败

热门文章

  1. ALSA学习资料
  2. 1.Linux进程--进程标识号
  3. 4、搭建Python环境
  4. MySQL查看当前的连接信息
  5. 【转发】centos 7开启FTP以及添加用户配置权限,只允许访问自身目录,不能跳转根目录
  6. Oracle 12c中文乱码,修改字符集的方法
  7. Redis系列--内存淘汰机制(含单机版内存优化建议)
  8. mongodb用户管理和服务安装
  9. [Aaronyang] 写给自己的WPF4.5 笔记7[三巴掌-ItemsControl数据绑定详解与binding二次处理 3/3]
  10. lua -- 所有UI组件的基类