diff --git a/Medium/Day12/Solution.cpp b/Medium/Day12/Solution.cpp index fc13810..8deaa4a 100644 --- a/Medium/Day12/Solution.cpp +++ b/Medium/Day12/Solution.cpp @@ -1 +1,30 @@ -// Write Your Code Here \ No newline at end of file +// Write Your Code Here +#include +#include +#include +typedef long long int ll; +#define MOD 998244353 +using namespace std; + + +int main(){ + int t; + cin>>t; + while(t--){ + string s; + cin>>s; + + int n=s.length(); + vector vec(n); + vec[0]=1; + vec[1]= vec[0]+ (s[0]!=s[1]); + for(int i=2; i