回答編集履歴
3
修正
answer
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
int main(void) {
|
8
8
|
int n = 10;
|
9
|
-
std::vector<int> vec(n,
|
9
|
+
std::vector<int> vec(n, 0);
|
10
10
|
|
11
11
|
for(auto e: vec) {
|
12
12
|
std::cout << e << ", ";
|
@@ -15,7 +15,7 @@
|
|
15
15
|
}
|
16
16
|
```
|
17
17
|
|
18
|
-
**実行結果** [Wandbox](https://wandbox.org/permlink/
|
18
|
+
**実行結果** [Wandbox](https://wandbox.org/permlink/ZSuGGvXJtPOeLDnU)
|
19
19
|
```
|
20
20
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
21
21
|
```
|
2
修正
answer
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
int main(void) {
|
8
8
|
int n = 10;
|
9
|
-
std::vector<int> vec
|
9
|
+
std::vector<int> vec(n, 10);
|
10
10
|
|
11
11
|
for(auto e: vec) {
|
12
12
|
std::cout << e << ", ";
|
@@ -15,7 +15,7 @@
|
|
15
15
|
}
|
16
16
|
```
|
17
17
|
|
18
|
-
**実行結果** [Wandbox](https://wandbox.org/permlink/
|
18
|
+
**実行結果** [Wandbox](https://wandbox.org/permlink/HrTTnlHjRLU1uYmB)
|
19
19
|
```
|
20
20
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
21
21
|
```
|
1
修正
answer
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
int main(void) {
|
8
8
|
int n = 10;
|
9
|
-
std::vector vec = std::vector(n, 0);
|
9
|
+
std::vector<int> vec = std::vector(n, 0);
|
10
10
|
|
11
11
|
for(auto e: vec) {
|
12
12
|
std::cout << e << ", ";
|
@@ -15,7 +15,7 @@
|
|
15
15
|
}
|
16
16
|
```
|
17
17
|
|
18
|
-
**実行結果** [Wandbox](https://wandbox.org/permlink/
|
18
|
+
**実行結果** [Wandbox](https://wandbox.org/permlink/dbd0dgVdpTB5wefw)
|
19
19
|
```
|
20
20
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
21
21
|
```
|