diff --git a/09xxx/09398.cpp b/09xxx/09398.cpp new file mode 100644 index 00000000..62df4ea4 --- /dev/null +++ b/09xxx/09398.cpp @@ -0,0 +1,33 @@ +#include +#include +using namespace std; + +bool check(const string &s) { + bool a = false, b = false, c = false; + for (int i=0; i> s; + + for (int i=6; i<=s.length(); i++) { + for (int j=0; j<=s.length()-i; j++) { + if (check(s.substr(j, i))) return i; + } + } + return 0; +} + +int main(void) { + ios::sync_with_stdio(false); + cin.tie(nullptr); + + int n; cin >> n; + while (n--) cout << solve() << "\n"; + return 0; +} \ No newline at end of file