Codeforces Round #411 (Div. 2), problem: (D) Minimum number of steps Solution In C/C++ ✎ Admin 666 July 24, 2017 Codeforces Round #411 (Div. 2), problem: (D) Minimum number of steps Solution In C/C++ FacebookXPinterestWhatsApp #include<bits/stdc++.h> using namespace std; int c,d,i,n,m,k,x,j=1000000007; string s; main(){ cin>>s; for(i=s.size()-1;i>=0;i–){ if(s[i]==’b’)c++;else{ k+=c;c*=2;k%=j;c%=j; } } cout<<k; } TagsCodeforces Round #411 (Div. 2)problem: (D) Minimum number of steps Solution In C/C++problem: (D) Minimum number of steps Solve In C/C++ Oakley Brings Back the... Lifestyle May 25, 2026 Oakley is renowned for pushing the boundaries of eyewear... Read more Why Everyone is Obsessed... Shopping May 24, 2026 Are... Read more Why Everyone is Obsessed... Shopping May 24, 2026 Are... Read more Kathy Griffin Shares She... Entertainment May 24, 2026 Comedian Kathy Griffin has never been one to shy... Read more Why Everyone is Obsessed... Shopping May 23, 2026 Are... Read more Why Everyone is Obsessed... Shopping May 23, 2026 Are... Read more Oakley Brings Back the FatCat from the Archive Oakley is renowned for pushing the boundaries of eyewear design, and now they are digging deep into their historical vault to bring back a... Why Everyone is Obsessed with the Reusable Water Balloon Set Are you tired of dealing with everyday frustrations that slow down your routine? We've all been... Why Everyone is Obsessed with the Emergency Keychain Power Bank Are you tired of dealing with everyday frustrations that slow down your routine? We've all been... Kathy Griffin Shares She Was Hospitalized Over Complications From Colonoscopy Comedian Kathy Griffin has never been one to shy away from sharing the raw, unfiltered details of her life. In her latest health update,... Why Everyone is Obsessed with the Mini Handheld Pocket Fan Are you tired of dealing with everyday frustrations that slow down your routine? We've all been... Why Everyone is Obsessed with the Electric Power Scrubber Kit Are you tired of dealing with everyday frustrations that slow down your routine? We've all been... Mikie Sherrill wants Nets back in New Jersey, but team ‘perfectly happy in Brooklyn’ The political arena and the sports world have collided once again in the tri-state area. New Jersey's newly elected Governor, Mikie Sherrill, has raised... Why Everyone is Obsessed with the Earbud Cleaning Pen Tool Are you tired of dealing with everyday frustrations that slow down your routine? We've all been... Why Everyone is Obsessed with the Powerful Electric Air Duster Are you tired of dealing with everyday frustrations that slow down your routine? We've all been... Previous articleCodeforces Round #411 (Div. 2), problem: (C) Find Amir Solution In C/C++Next articleCodeforces Round #411 (Div. 2), problem: (E) Ice cream coloring Solution In C/C++