查找学生信息 题解:
哈希表计数法
#include <stdio.h>
#include <string.h>
#include<iostream>
using namespace std;
int main() {
int n,m;
while(cin>>n>>m){
int list[220]={0};
int map[220]={0};
for(int i=0;i<n;i++){
int t;
cin>>t;
if(t<=m){
list[i]=t;
map[t]++;
}
}
for(int i=0;i<n;i++){...
登录后发布评论
暂无评论,来抢沙发