diff --git a/.gitignore b/.gitignore index 10dfe84..74ecf6f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ target/ .* .clang-tidy + +build/ \ No newline at end of file diff --git a/daily/Aug18.cc b/daily/Aug18.cc new file mode 100644 index 0000000..c361a43 --- /dev/null +++ b/daily/Aug18.cc @@ -0,0 +1,16 @@ +#include +using namespace std; + +class Solution { + public: + /** + * @brief LC: 551: Student Attendance Record I [E] + * Just use the CPP feature, Time: O(N), Space: O(1) + * + * @param s + * @return true, false + */ + bool checkRecord(string s) { + return ranges::counts(s, 'A') && s.find("LLL") == string::npos; + } +}; \ No newline at end of file