Last active
December 1, 2021 12:38
-
-
Save HappyCerberus/a7af4df435c26368f689f7a342f9e2c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int main(int argc, char *argv[]) { | |
if (argc != 2) { | |
std::cerr << "This program expects one parameter that is the input file to read.\n"; | |
return 1; | |
} | |
std::ifstream input(argv[1]); | |
if (!input.is_open()) { | |
std::cerr << "Failed to open file.\n"; | |
return 1; | |
} | |
std::cout << "The measured depth averaged over a sliding window of 3 elements increased in " | |
<< count_increasing_windows(input) << " cases.\n"; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment