文章

326

粉丝

4

获赞

503

访问

62.8k

头像
查找学生信息 题解:
P1177 北京大学上机题
发布于2026年1月24日 17:21
阅读数 175

map

#include<stdio.h>
#include<map>
using namespace std;
int main()
{
    int m,n;
    while(scanf("%d %d",&m,&n)!=EOF)
    {
    map<int,int> hash;
    for(int i=0;i<m;i++)
    {
        int k;
        scanf("%d",&k);
        hash[i]=k;
    }
    for(int i=0;i<m;i++)
    {
        int kk=hash[i];
        int count=0;
        for(int j=0;j<m;j++)
        {
            if(hash[j]==kk)
            {
                ...

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发