L1-005. 考试座位号
来源:互联网 发布:淘宝客服语气词的使用 编辑:程序博客网 时间:2024/05/16 19:20
L1-005. 考试座位号
######问题描述:
java代码:
import java.util.Scanner;/**考试座位号 * Created by pc on 17-3-12. */public class Main { public static void main (String[] args){ Scanner input = new Scanner (System.in); int a=input.nextInt(); String b[]=new String [a]; int c[] = new int[a]; int d[]= new int[a]; for(int i= 0; i<a;i++){//依次存入信息 b[i]=input.next(); c[i]=input.nextInt(); d[i]=input.nextInt(); } int e=input.nextInt();//查找的个数 int f[]=new int[e]; for (int i=0 ; i<e;i++){ f[i]=input.nextInt();//要查找的试机号 } for(int i=0; i<e;i++){ for (int j=0;j<a;j++){ if(f[i]==c[j]){ System.out.println(b[j]+" "+d[j]); } } } }}
结果[结果部分显示超时,如果可以优化该代码,可以给我留言]
0 0
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号
- L1-005. 考试座位号(C++)
- [C++]L1-005. 考试座位号
- hadoop集群故障排除(定期更新)
- (51nod)1012
- Linux学习笔记之RedHat Enterprise Linux 6.4 使用 Centos 6 的yum源问题
- jQuery--1省市选择
- java.lang.NullPointerException:TextView.setText(java.lang.CharSequence)' on a null object reference
- L1-005. 考试座位号
- could not get a field value by reflection getter of
- Java 接收 URL文件流 保存本地 DEMO
- MATLAB作业
- 高效编写微信小程序
- margin、padding的属性值
- iOS基础——屏幕适配之autoResizing、autoLayout、sizeClass
- 轻舟已过万重山——真正的技术派公司是怎么联调、测试和发布的?
- 优化查询