Remove unnecessary braces
This commit is contained in:
parent
f909300c36
commit
26306cdefb
2 changed files with 4 additions and 8 deletions
|
@ -7,9 +7,8 @@ std::vector<int> read_input()
|
||||||
input.reserve(20000);
|
input.reserve(20000);
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (std::cin >> i) {
|
while (std::cin >> i)
|
||||||
input.push_back(i);
|
input.push_back(i);
|
||||||
}
|
|
||||||
|
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
@ -20,13 +19,11 @@ int read_node(std::vector<int>::iterator &it)
|
||||||
int meta_count = *it++;
|
int meta_count = *it++;
|
||||||
|
|
||||||
int value = 0;
|
int value = 0;
|
||||||
for (int i = 0; i < child_count; i++) {
|
for (int i = 0; i < child_count; i++)
|
||||||
value += read_node(it);
|
value += read_node(it);
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < meta_count; i++) {
|
for (int i = 0; i < meta_count; i++)
|
||||||
value += *it++;
|
value += *it++;
|
||||||
}
|
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,9 +27,8 @@ int read_node(std::vector<int>::iterator &it)
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> children;
|
std::vector<int> children;
|
||||||
for (int i = 0; i < child_count; i++) {
|
for (int i = 0; i < child_count; i++)
|
||||||
children.push_back(read_node(it));
|
children.push_back(read_node(it));
|
||||||
}
|
|
||||||
|
|
||||||
for (int i = 0; i < meta_count; i++) {
|
for (int i = 0; i < meta_count; i++) {
|
||||||
int index = *it++;
|
int index = *it++;
|
||||||
|
|
Loading…
Reference in a new issue