首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
easymoney
2024年3月16日 10:51
查找学生信息2 题解:
P1476
回复 0
|
赞 2
|
浏览 880
#include <stdio.h> #include <algorithm> #include <iostream> #include <map> using namespace std; struct student{ string num; string name; string sex; int age; }; int main(){ ...
Cookie‘s AE86
2024年3月16日 09:23
查找学生信息2 题解:c++ map实现
P1476
回复 0
|
赞 1
|
浏览 770
#include<bits/stdc++.h> using namespace std ; struct node { string id ; string name ; string sex ; string age ; } ; int main() { int n ; cin >> n ; node tmp ; map <string ,node> students ; for(int i = 0 ;i < n ;i++){ ...
williams
2024年3月14日 19:35
查找学生信息2 题解:c
P1476
回复 2
|
赞 5
|
浏览 1.3k
#include <stdio.h> #include <string.h> struct student{ int age; char num[5],name[20],sex[20]; }; int main(){ int n,m; scanf("%d",&n); struct student student[n+1]; for(int i=0;i<n;i++) scanf("%s %s %s %d",student[i].num,student[i].name,stu...
promising
2024年3月8日 21:39
查找学生信息2 题解:
P1476
回复 0
|
赞 1
|
浏览 861
#include<stdio.h> #include<string.h> int main() { typedef struct stu { char id[10];//学号如果用int之类的数组存放的话 02 的0 会被吞掉 所以要用char char name[10]; ...
小王桐学
2024年2月6日 15:30
查找学生信息2 题解:C
P1476
回复 0
|
赞 0
|
浏览 942
#include <stdio.h> #include <string.h> #define M 10000 #define N 1000 typedef struct{ char num[10]; char s[10]; char sex[10]; int age; }Student; int main() { Student stu[N]; int n,m,i,j; char t[M][10]; scanf("%d",&n); for(i = 0; i < n; i++) sca...
孙某人
2024年1月18日 23:10
查找学生信息2 题解:易错点总结
P1476
回复 0
|
赞 1
|
浏览 1.2k
#include<iostream> #include <string.h> using namespace std; int main(){ struct cc{ char a[10]; char b[10]; char c[10]; int d; }cc1[1000]; int m=0,n=0; char e[10000][10]; for(int i=0;i<10000;i++) for(int j=0;j<10;j++) e[i][j]=0; for(int i...
peterzhou
2023年7月12日 21:58
查找学生信息2 题解:
P1476
回复 0
|
赞 2
|
浏览 1.1k
#include <bits/stdc++.h> using namespace std; struct student{ string num; string name; string sex; int age; }; int main() { int N,M; map<string,student>s; while( cin>>N)...
零壹
2023年3月21日 16:10
c-查找学生信息
P1476
回复 0
|
赞 0
|
浏览 5.1k
将所有的的信息存入一个结构体数组中 #define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string.h> #include<stdlib.h> struct stu { char num[50]; char name[50]; char sex[50]; int age; }; void out(struct stu s[], int n, char num[]) { int count = 0; for (int i = 0; i...
阔赛英
2023年2月3日 19:18
map
P1476
回复 0
|
赞 1
|
浏览 3.8k
#include <iostream> #include <map> #include <string.h> using namespace std; struct Student { string id; string name; string sex; int age; }; int main() { int n; int m; while (cin >> n) { map<string, Student> M...
术小白
2022年4月24日 13:34
c
P1476
回复 0
|
赞 2
|
浏览 5.3k
#include <stdio.h> #include <stdlib.h> #include <string.h> //学生信息结构体 struct stu{ char num[50]; char name[50]; char sex[50]; int yea...
1
2
题目
查找学生信息2
题解数量
20
发布题解
在线答疑
热门题解
1
查找学生信息2 题解:解释id只能用string类型的原因(超清晰,丁真看了都要抽一根瑞克五代)
2
需要注意!有中英文的区别不然只有33.3%通过率
3
查找学生信息2 题解:
4
查找学生信息2 题解:正确率只有33%,id不要用int类型改用string过了。我也不知道为什么。
5
查找学生信息2 题解:运行超时通过率33%
6
查找学生信息2 题解:只对了33%,求教
7
查找学生信息2 题解:c
8
查找学生信息2(结构体数组) 题解:
9
查找学生信息2 题解:map的基本用法
10
查找学生信息2 题解: