首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
上岸课程
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
阿灿
2025年3月22日 15:16
查找1 题解:map++
P1388
回复 0
|
赞 2
|
浏览 98
#include<bits/stdc++.h> using namespace std; int main(){ int n,i,x; while(cin>>n){ map<int,int>num; for(i=0;i<n;i++){ cin>>x; num[x]++; } int m; cin>>m; while(m--){ cin>>x; if(num.find(x)!=num.end()){ cout<&l...
可可爱爱草莓派
2024年8月30日 16:28
教的map用的map
P1388
回复 0
|
赞 25
|
浏览 1.5k
#include<bits/stdc++.h> using namespace std; int main(){ int n; map<int,int> mp; while(cin >> n){ int x; for(int i = 0;i < n;i++){ &nbs...
18919717626
2024年8月16日 16:17
查找1 题解:bool数组标记+map标记
P1388
回复 0
|
赞 1
|
浏览 594
bool数组标记 #include <iostream> #include <string.h> using namespace std; int n,m,a[1000],x,f[1000]; int main(){ int n; while(cin >> n){ memset(f,0,sizeof(f)); for(int i = 0;i < n;i ++){ cin >> a[i]; f[a[i]] ++; } cin >> m;...
Candour
2024年4月27日 00:21
查找1 (C++ 11)题解:
P1388
回复 0
|
赞 4
|
浏览 706
#include<bits/stdc++.h> using namespace std; unordered_map<int, bool> st; int n, m; int main() { while(cin >> n) { for(auto k : st) st[k.first] = false; while(n --) { int x; cin >> x; ...
easymoney
2024年3月17日 09:00
查找1 题解:
P1388
回复 0
|
赞 0
|
浏览 889
#include <stdio.h> #include <algorithm> #include <iostream> #include <string> #include <map> using namespace std; int main(){ int n; int a[100]; int m; int b[100]; map<int,int> M; cin >> n; for(int i = 0;i < n;i++){ cin >>...
小酒
2024年3月16日 17:29
查找1 题解:
P1388
回复 0
|
赞 1
|
浏览 658
1388解题思路 #include <bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n) { int a[105]={0}; for(int i=0;i<n;i++) { scanf("%d",&a[i]); } int m; scanf("%d",&m); int b[105]={0}; for(int j=0;j<m;j++) { scanf("%d...
promising
2024年3月9日 14:04
查找1 题解:
P1388
回复 0
|
赞 5
|
浏览 775
暴力解法 #include<stdio.h> int main() { int n,m; int i,j; int a[100]; int b[100]; scanf("%d",&n); for(i=0;i<n;i++) { &n...
1935569240
2024年3月6日 10:49
查找1 题解:
P1388
回复 0
|
赞 0
|
浏览 617
#include<iostream> #include<algorithm> #include<string> using namespace std; int main() { int n; int a[100]; while (cin >> n) { int flag[105] = { 0 };//标记是否存在 &...
orderrr
2024年2月28日 15:25
查找1 题解:很奇怪,c语言没考虑多个输入实例,而c++必须得考虑否则
P1388
回复 1
|
赞 0
|
浏览 723
#include <bits/stdc++.h> using namespace std; int main() { map<int, int> M; int n; while (cin >> n) { for (int i = 0; i < n; i++) { int value; cin >> value; M[value] = value; } int m; cin >> m; for (...
halo_777
2024年2月20日 17:58
查找1 题解:
P1388
回复 0
|
赞 0
|
浏览 788
#include<bits/stdc++.h> using namespace std; int a[10010]; int b[10010]; int main() { int n, m; while (cin >> n) { for (int i = 0; i < n; i++) { int tmp; cin >> tmp; a[tmp]++; } cin >&g...
1
2
题目
查找1
题解数量
20
发布题解
在线答疑
热门题解
1
教的map用的map
2
查找1 题解:
3
查找1 (C++ 11)题解:
4
查找1 题解:map++
5
查找1 题解:C
6
查找1 题解:bool数组标记+map标记
7
查找1 题解:使用map
8
查找1 题解:
9
P1388 查找1
10
P1388 解题思路分享