九度考研真题 浙大 2006-2浙大 统计同成绩人数 hash
来源:互联网 发布:淘宝售假限制发布商品 编辑:程序博客网 时间:2024/05/17 08:33
//统计同成绩学生人数
#include<iostream>
#include<string.h>
using namespace std;
int main(){
int N;
int num[101];
int score;
int t;
while(cin>>N&&N!=0){
memset(num,0,sizeof(num));
while(N--){
cin>>score;
num[score]++;
}
cin>>t;
cout<<num[t]<<endl;
}
}
#include<iostream>
#include<string.h>
using namespace std;
int main(){
int N;
int num[101];
int score;
int t;
while(cin>>N&&N!=0){
memset(num,0,sizeof(num));
while(N--){
cin>>score;
num[score]++;
}
cin>>t;
cout<<num[t]<<endl;
}
}
1 0
- 九度考研真题 浙大 2006-2浙大 统计同成绩人数 hash
- 九度考研真题 浙大 2007-1浙大 题目1021:统计字符 字符串输入
- 九度考研真题 浙大 2006-1浙大1015:还是A+B 比较
- 九度考研真题 浙大 2006-3浙大 简单计算器 堆操作
- 九度考研真题 浙大 2005-2浙大1014:排名 多重排序
- 九度考研真题 浙大 2007-2浙大 题目1020:最小长方形 取最大最小值
- 九度考研真题 浙大 2008-2浙大 题目1029:魔咒词典 字符串比较
- 九度考研真题 浙大 2010-2浙大1006:ZOJ问题
- 九度考研真题 浙大 2011-2浙大1002:Grading
- 九度考研真题 浙大 2012-2浙大1468:Sharing
- 九度考研真题 浙大 2005-1浙大1013:开门人和关门人 排序
- 九度考研真题 浙大 2005-3浙大1012:畅通工程
- 九度考研真题 浙大 2007-3浙大游船出租 结构体
- 九度考研真题 浙大 2007-浙大1023:EXCEL排序 排序
- 九度考研真题 浙大 2008-3浙大1028:继续畅通工程
- 九度考研真题 浙大 2009-1浙大1031:xxx定律
- 九度考研真题 浙大 2010-1浙大1003:A+B
- 九度考研真题 浙大 2011-1浙大1001:A+B for Matrices
- 从前台到后台再到数据库,中文字符乱码的问题
- 在hadoop中运行自带例子wordcount的步骤
- 数据结构_索引表
- 招标投标中各流程时间期限的规定
- iOS 通知的使用,以及场景(未确定版本)
- 九度考研真题 浙大 2006-2浙大 统计同成绩人数 hash
- java中interface的详解
- 安卓 自带主题 theme
- java学习笔记(一)
- Item 43:访问模板基类中的名称 Effective C++笔记
- JAVA IO流中BufferedReader用法讲解
- [转]亿级Web系统搭建——单机到分布式集群
- 数据结构_线性表
- Could notconnect to ASM due to following error ORA-01031:insufficientprivileges