回答編集履歴
1
微修正
test
CHANGED
@@ -26,15 +26,15 @@
|
|
26
26
|
|
27
27
|
for ( i = 0; i < 6; ++i ) {
|
28
28
|
|
29
|
-
int value = a[i];
|
29
|
+
int value = a[i];
|
30
30
|
|
31
|
-
for ( j = 0; j < nvalues; ++j ) {
|
31
|
+
for ( j = 0; j < nvalues; ++j ) { // a[i] はvaluesに含まれるか?
|
32
32
|
|
33
33
|
if ( values[j] == value ) break;
|
34
34
|
|
35
35
|
}
|
36
36
|
|
37
|
-
if ( j == nvalues ) {
|
37
|
+
if ( j == nvalues ) { // 初出なら...
|
38
38
|
|
39
39
|
values[nvalues] = value;
|
40
40
|
|
@@ -42,7 +42,7 @@
|
|
42
42
|
|
43
43
|
++nvalues;
|
44
44
|
|
45
|
-
} else {
|
45
|
+
} else { // 既出なら...
|
46
46
|
|
47
47
|
++counts[j];
|
48
48
|
|