1919: Searching for students' Archives
内存限制:128 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:11
解决:10
题目描述
Define a Student class to reprensent a student,containing num,name,and grade
All students can be stored in an array of Student objects
There is a student to search for
输入
many cases,for each case,input a number "n",the number of students;then,input n students' information;
input a student to search for,if it is found,return the location,or output "can not find"
note: only if all data-field values of two students are equal,they are equal; you should override equals method in Student class to compare two student objects
输出
if the student searched is found,return its location in the student array,or "can not find"
样例输入 复制
1
20110101 Jame 498
20110102 Jame 498
5
20110201 Lilei 489
20110202 Dale 515
20110203 Edison 526
20110204 Jack 469
20110205 Macy 502
20110204 Jack 469
5
20110201 Lilei 489
20110202 Dale 515
20110203 Edison 526
20110204 Jack 469
20110205 Macy 502
20110204 JackEE 469
样例输出 复制
can not find
3
can not find