1952: ArrayList 一
内存限制:128 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:27
解决:26
题目描述
define a student class including name,number,sex
define an arrayList to store students,and insert a student into the list
输入
there are many cases,for each case,input n to denote the number of students,and then input n students;
input an correct index and a student who is to be inserted,if the index is incorrect,output “Insertion failed”
finally,display the arrayList
输出
as required
样例输入 复制
2
zhangsan 20120866601 m
lishi 20120866603 f
2 wangwu 20120866604 m
2
zhangsan 20120866601 m
lishi 20120866603 f
3 wangwu 20120866604 m
样例输出 复制
the information of 3 students is:
zhangsan 20120866601 m
lishi 20120866603 f
wangwu 20120866604 m
Insertion failed