<commit_before>// Copyright 2016 UALR ACM

#include <iostream>
#include <tuple>

int min_changes(std::string s);

int min_changes(std::string s) {
  int c;
  for (c = 0;; c++) {
    size_t i = s.find("010");
    if (i == -1) {
      return c;
    }
    s[i + 2] = '1';
  }
}

int main() {
  // read & return number/string as tuple
  auto input = [&]() -> std::tuple<int, std::string> {
    auto i = int{};
    std::cin >> i;
    auto str = std::string{};
    std::cin >> str;
    return std::make_tuple(i, str);
  };

  // loop while stdin is open
  while (!std::cin.eof()) {
    // pass string to min_changes, print output
    std::cout << min_changes(std::get<1>(input())) << std::endl;
  }
}<commit_msg>More standard declaration syntax<commit_after>// Copyright 2016 UALR ACM

#include <iostream>
#include <tuple>

int min_changes(std::string s);

int min_changes(std::string s) {
  int c;
  for (c = 0;; c++) {
    size_t i = s.find("010");
    if (i == -1) {
      return c;
    }
    s[i + 2] = '1';
  }
}

int main() {
  // read & return number/string as tuple
  auto input = [&]() -> std::tuple<int, std::string> {
    int i;
    std::cin >> i;
    std::string str;
    std::cin >> str;
    return std::make_tuple(i, str);
  };

  // loop while stdin is open
  while (!std::cin.eof()) {
    // pass string to min_changes, print output
    std::cout << min_changes(std::get<1>(input())) << std::endl;
  }
}
{'fraction_non_alphanumeric': 0.19391365888181175, 'fraction_numerical': 0.016985138004246284, 'mean_word_length': 2.7807486631016043, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6151864', 'n_tokens_mistral': 552, 'n_tokens_neox': 530, 'n_words': 145}