Language: Java

AIZU ONLINE JUDGE
PAGETOP
??
???????????????
??
??????????????°
??
???????????????
??
???????????????
??
?????????
??
??
?????°??¢??????
??????????¨????
??\??¬??? ?? ??±??? 
My Status
?????????????????????????????
HOME- 
Notes 
#2581835 
Solution for ITP1_7_D: Matrix Multiplication by masahito0821
?????????????????? ??????????????? ???????????±?????? 
?????? ??¢?????????: public ?????? ?????§??°: 0 ?????? 
00.27 sec ??????40136 KB ??????126 lines ?????? 4109 bytes ??????2017-10-26 14:09 
?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
??
public class Main {
????????public static void main(String[] args) throws IOException {
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
??
????????????????// A,B,C??????????????????¨????????±?????????????
????????????????String first_line = input.readLine();
??
????????????????// ??\???????????´?
????????????????String[] array_of_lo_col = first_line.split(" ");
??
????????????????// ??????A,C?????????????????????
????????????????int low_n = Integer.parseInt(array_of_lo_col[0]);
??
????????????????// ??????A???????????????B?????????????????????
????????????????int column_or_row_m = Integer.parseInt(array_of_lo_col[1]);
??
????????????????// ??????B,C?????????????????????
????????????????int column_l = Integer.parseInt(array_of_lo_col[2]);
??
????????????????// ??????A????????¬??????????
????????????????long[][] matrix_A = new long[low_n][column_or_row_m];
??
????????????????// ??????B????????¬??????????
????????????????long[][] matrix_B = new long[column_or_row_m][column_l];
??
????????????????// ??????C????????¬??????????
????????????????long[][] matrix_C = new long[low_n][column_l];
??
????????????????// ??????C???Ci????????????¨?????????A?????\???????????????°???????????´?
????????????????for (int low_spot = 0; low_spot < low_n; low_spot++) {
??
????????????????????????// ??????A????????´???\???
????????????????????????String elements_A = input.readLine();
??
????????????????????????// ??\??????????????????A????????´????array_elements_A????????´?
????????????????????????String[] array_elements_A = elements_A.split(" ");
??
????????????????????????// ??????A????????´?????????´?
????????????????????????for (int column_spot = 0; column_spot < column_or_row_m; column_spot++) {
??
????????????????????????????????// array_elements_A????????´?????????????°??????long??????
????????????????????????????????long element_A = Long.parseLong(array_elements_A[column_spot]);
??
????????????????????????????????// ?????´??????????A????????´?
????????????????????????????????matrix_A[low_spot][column_spot] = element_A;
??
????????????????????????}
??
????????????????}
??
????????????????// ??????C???Ci????????????¨?????????B?????\???????????????°???????????´?
????????????????for (int low_spot = 0; low_spot < column_or_row_m; low_spot++) {
??
????????????????????????// ??????B????????´???\???
????????????????????????String elements_B = input.readLine();
??
????????????????????????// ??\??????????????????B????????´????array_elements_A????????´?
????????????????????????String[] array_elements_B = elements_B.split(" ");
??
????????????????????????// ??????B????????´?????????´?
????????????????????????for (int column_spot = 0; column_spot < column_l; column_spot++) {
??
????????????????????????????????// array_elements_B????????´?????????????°??????long??????
????????????????????????????????long element_B = Long.parseLong(array_elements_B[column_spot]);
??
????????????????????????????????// ?????´??????????B????????´?
????????????????????????????????matrix_B[low_spot][column_spot] = element_B;
??
????????????????????????}
??
????????????????}
??
????????????????// C??????????????´????¨
????????????????long Ci = 0;
??
????????????????// ??????C????????´?
????????????????for (int low_spot = 0; low_spot < low_n; low_spot++) {
??
????????????????????????// ??????C??????????????´?
????????????????????????for (int column_spot = 0; column_spot < column_l; column_spot++) {
??
????????????????????????????????// C??????????????´????A?????????¨B?????????????????????
????????????????????????????????for (int m_term = 0; m_term < column_or_row_m; m_term++) {
??
??
????????????????????????????????????????// Ci????????´??????????matrixA,B??????????????¶?????????????
????????????????????????????????????????Ci += matrix_A[low_spot][m_term] * matrix_B[m_term][column_spot];
??
????????????????????????????????}
??
??
????????????????????????????????// ?????´?C???Ci????????´?
????????????????????????????????matrix_C[low_spot][column_spot] = Ci;
??
????????????????????????????????// ??????
????????????????????????????????System.out.print(matrix_C[low_spot][column_spot]);
??
????????????????????????????????//AOJ????????????¨
????????????????????????????????int remove_blank_last=column_l-1;
??
????????????????????????????????//????????????????????´?????????????????????¶??????????
????????????????????????????????if(column_spot < remove_blank_last){
??
????????????????????????????????System.out.print(" ");
??
????????????????????????????????}
??
????????????????????????????????//Ci????????????
????????????????????????????????Ci=0;
??
????????????????????????}
??
????????????????????????// ????????????
????????????????????????System.out.println("");
??
????????????????}
??
????????}
??
}
Compile Error Logs:


???????????????
Judge: 18/18 
JAVA 
CPU: 00.27 sec 
Memory: 40136 KB 
Length: 4109 B 
2017-10-26 14:09 
2017-10-26 14:09 
???????????±?????????????????????
Case #
Verdict
CPU Time
Memory
In
Out
Case Name
Case #1:
: Accepted 
00.03 sec
24152 KB
30 B
20 B
00_sample_00.in
Case #2:
: Accepted 
00.04 sec
24220 KB
22 B
12 B
01_small_00.in
Case #3:
: Accepted 
00.04 sec
24276 KB
42 B
19 B
01_small_01.in
Case #4:
: Accepted 
00.04 sec
24248 KB
42 B
19 B
01_small_02.in
Case #5:
: Accepted 
00.03 sec
24320 KB
46 B
9 B
01_small_03.in
Case #6:
: Accepted 
00.05 sec
24216 KB
10 B
2 B
02_corner_00.in
Case #7:
: Accepted 
00.04 sec
24076 KB
49 B
4 B
02_corner_01.in
Case #8:
: Accepted 
00.04 sec
24208 KB
50 B
278 B
02_corner_02.in
Case #9:
: Accepted 
00.03 sec
23984 KB
22 B
8 B
02_corner_03.in
Case #10:
: Accepted 
00.04 sec
24348 KB
22 B
8 B
02_corner_04.in
Case #11:
: Accepted 
00.06 sec
24220 KB
162 B
60 B
03_rand_00.in
Case #12:
: Accepted 
00.04 sec
24188 KB
470 B
208 B
03_rand_01.in
Case #13:
: Accepted 
00.06 sec
25092 KB
2709 B
1875 B
03_rand_02.in
Case #14:
: Accepted 
00.07 sec
25932 KB
7450 B
7200 B
03_rand_03.in
Case #15:
: Accepted 
00.06 sec
25136 KB
2709 B
1875 B
04_large_00.in
Case #16:
: Accepted 
00.07 sec
25720 KB
7450 B
7200 B
04_large_01.in
Case #17:
: Accepted 
00.24 sec
32672 KB
97822 B
110000 B
05_maximum_00.in
Case #18:
: Accepted 
00.27 sec
40136 KB
120012 B
120000 B
05_maximum_01.in
< prev |
1
/ 
18
| next > 
??

??: Accepted ???????????? 00.03 sec ???????????? 24152 KB
??
Judge Input #1 ( in1.txt | 30 B)

Judge Output #1 ( out1.txt | 20 B)
3 2 3
1 2
0 3
4 5
1 2 1
0 3 2

1 8 5
0 9 6
4 23 14
Comments
??
????\????????§?????? 
??
Categories
??


Add Category: 



* Note for the classification

??
Free Tags
??


Add Tag: 


Please add a tag related to 'algorithm'.
??

??



????
 
??

Aizu Online Judge
follow us on Twitter


About us 
ContactSystem InfoThe University of AizuUniv. of Aizu Competitive Programming Club
Tools 
WEB Board ToolsVirtual ArenaAPI ReferenceTutorial
Links 
ACM/ICPCACM/ICPC Asia JapanACM-ICPC OB/OG Alumni GroupPC KoshienJOI
AtCoderTopCoderCodeForces
Uva Online judgesACM-ICPC Live ArchivePKU JudgeOnline 
Aizu IT Arena 
Best viewed using Firefox, Google Chrome
Aizu Online Judge Version 1.0 ?? 2004 - 2016 Univ. of Aizu Competitive Programming Club (ICPCPC), Database Systems Lab. University of Aizu
??

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
AIZU ONLINE JUDGE
^
Main.java:6: error: illegal character: '\u00b0'
???????????????
              ^
Main.java:15: error: illegal character: '\u00b0'
???????????????
     ^
Main.java:16: error: illegal character: '\u00a8'
???????????????
          ^
Main.java:17: error: illegal character: '\'
??\?????? ?? ?????? 
  ^
Main.java:17: error: illegal character: '\u00ac'
??\?????? ?? ?????? 
     ^
Main.java:17: error: illegal character: '\u00b1'
??\?????? ?? ?????? 
               ^
Main.java:22: error: illegal character: '#'
#2581835 
^
Main.java:24: error: illegal character: '\u00b1'
?????????????????? ??????????????? ?????????????????? 
                                              ^
Main.java:25: error: class, interface, enum, or record expected
?????? ????????????: public ?????? ?????????: 0 ?????? 
                            ^
Main.java:25: error: illegal character: '\u00a7'
?????? ????????????: public ?????? ?????????: 0 ?????? 
                                        ^
Main.java:25: error: illegal character: '\u00b0'
?????? ????????????: public ?????? ?????????: 0 ?????? 
                                           ^
Main.java:153: error: class, interface, enum, or record expected
import java.io.IOException;
^
Main.java:154: error: class, interface, enum, or record expected
import java.io.InputStreamReader;
^
Main.java:155: error: class, interface, enum, or record expected
??
^
Main.java:157: error: illegal start of type
????????public static void main(String[] args) throws IOException {
^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
 ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
  ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
   ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
    ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
     ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
      ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
       ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
         ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
          ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
           ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
            ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
             ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
              ^
Main.java:158: error: illegal start of expression
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
               ^
Main.java:158: error: : expected
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
                              ^
Main.java:158: error: : expected
????????????????BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
                                                                                           ^
Main.java:159: error: illegal start of expression
??
^
Main.java:159: error: illegal start of expression
??
 ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
 ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
  ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
   ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
    ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
     ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
      ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
       ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
        ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
         ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
          ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
           ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
            ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
             ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
              ^
Main.java:160: error: illegal start of expression
????????????????// A,B,C?????????????????????????????????????????
               ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
 ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
  ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
   ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
    ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
     ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
      ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
       ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
        ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
         ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
          ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
           ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
            ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
             ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
              ^
Main.java:161: error: illegal start of expression
????????????????String first_line = input.readLine();
               ^
Main.java:161: error: : expected
????????????????String first_line = input.readLine();
                      ^
Main.java:161: error: : expected
????????????????String first_line = input.readLine();
                                                    ^
70 errors
printing javac parameters to: /w/javac.20260128_044020.args