首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
Hegel
2023年3月20日 15:18
动态数组存储各个学生输入的书号
P1177
回复 0
|
赞 1
|
浏览 3.3k
#include <iostream> using namespace std; int main() { int n, m; while(cin >> n >> m){ int* a = new int[n], * b = new int[m+1]; for (int i = 0; i < m+1; i++) b[i] = 0; for (int i = 0; i < n; i++) { cin >> a[i]; b[a[i]]++; } for (int ...
阔赛英
2023年2月3日 20:10
map
P1177
回复 0
|
赞 1
|
浏览 4.8k
#include <iostream> #include <map> #include <string.h> using namespace std; int main() { int n, m; while (cin >> n >> m) { map<int, int> M;//图书编号---喜欢读的人数 int arr[n];//存储每个人喜欢的图书编号 for (int i = 0; i < n; i++) { ...
杨德胜
2021年3月9日 18:09
P1177 解题思路分享
P1177
回复 0
|
赞 2
|
浏览 10.0k
#include <bits/stdc++.h> using namespace std; int main() { int N,M; while(cin>>N>>M){ map<int,int> m; int a[N]; &nb...
849769205
2021年2月22日 16:16
这题的M是搞笑吗????
P1177
回复 0
|
赞 2
|
浏览 11.4k
这题的M是搞笑吗????
YDLin
2020年4月18日 19:41
C++Map集合用于查找
P1177
回复 0
|
赞 4
|
浏览 11.2k
#include <iostream> #include<bits/stdc++.h> using namespace std; int main() { int n,m; int stu[205]; while(cin>>n>>m){ map<int,int> M; for(int i=0;i<n;i++){ ...
varcha
2020年2月27日 16:28
在本地ide可以通过样例,提交却显示 wrong answer
P1177
回复 2
|
赞 2
|
浏览 11.6k
#include <bits/stdc++.h> #include <string.h> using namespace std; int main(){ int n, m; // cout << "Input person and book" << endl; cin >> n >> m; int temp; int loveBook[n]; map<int, int> M; for (int i = 0; i <...
1
2
3
题目
查找学生信息
题解数量
26
发布题解
在线答疑
热门题解
1
map解法
2
查找学生信息 题解:带有注释的C++题解
3
查找学生信息 题解:
4
查找学生信息 题解:暴力至高(map)
5
查找学生信息 题解:map
6
查找学生信息 题解:秒了
7
查找学生信息 纯C题解:
8
查找学生信息 题解:
9
C++Map集合用于查找
10
查找学生信息 题解:新学的用map来解决,AC