Add .clang-format and apply it

This commit is contained in:
2021-12-02 07:18:16 +00:00
parent e58dede1b6
commit cd5e2538df
103 changed files with 2714 additions and 2132 deletions

View File

@@ -7,7 +7,8 @@
#include <string>
#include <variant>
int parse_numbers(std::string const &s) {
int parse_numbers(std::string const& s)
{
static const std::regex re("-?\\d+");
std::string left = s;
std::smatch m;
@@ -20,7 +21,8 @@ int parse_numbers(std::string const &s) {
return acc;
}
int main(int argc, char **argv) {
int main(int argc, char** argv)
{
int acc = 0;
for (std::string line; std::getline(std::cin, line);) {
acc += parse_numbers(line);