B965:- import java.io.*;
- import java.util.*;
- public class B965 {
- B965()
- {
- StreamTokenizer cin = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
- PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
- try{
- while(cin.nextToken()!=StreamTokenizer.TT_EOF)
- {
- int r = (int)cin.nval;
- cin.nextToken();
- int c = (int)cin.nval;
- cin.nextToken();
- int m = (int)cin.nval;
- int[] mn = new int[m];
- int[][] b = new int[r][c];
- //r , c 行列數
- for(int i = 0; i < r; i++)
- {
-
- for(int j = 0; j < c; j++)
- {
- cin.nextToken();
- b[i][j] = (int)cin.nval;
- if(j != 0)
- out.print(" ");
- out.print(b[i][j]);
- }out.println();
- }
- for(int i = 0; i<mn.length; i++)
- {
- cin.nextToken();
- mn[i] = (int)cin.nval;
- }
- out.println();
- out.flush();
-
- }
- }catch(Exception e){}
-
-
- }
- public static void main(String[] args) {
- // TODO 自動產生的方法 Stub
- new B965();
-
- }
- }
複製代碼 |