Codeforces Educational Round 168 Solution Discussion (ABDE)

preview_player
Показать описание
Codeforces Educational Round 168 Solution Discussion

Chapters -
00:00:00 Testing
00:02:40 A. Strong Password
00:13:00 B. Make Three Regions
00:26:25 C. Even Positions
00:44:45 D. Maximize the Root
01:03:15 E. Level Up
01:37:00 Chat QnA

Tags -
#icpc #ioi #codeforces #codeforcessolution #codeforcessolutions #codechef #codechefsolution #codechefsolutiontoday #atcoder #geekforgeeks #topcoder#hackerearth #hackerrank #hackerranksolution #hackerranksolutions #leetcode #leetcodesolutions #leetcodesolution #leetcodecontest
Рекомендации по теме
Комментарии
Автор

In c when you find an empty space you need to pair this with right closest close parenthesis which is not paired with anyone and when you find a open parenthesis you need to pair with right closest empty space.

SumanRoy-gulc
Автор

// solution for Problem C
// i observed some pattern and got accepted
void solve(int T)
{
int n;cin>>n;string s;cin>>s;
int temp = 0;
int ans = 0;
for(int i=0;i<n;i++){
temp++;
if(s[i]==')'){
ans += temp-1;
ans += temp/2-1;
temp = 0;
}
}
cout<<ans<<endl;
}

md.shazidalhasan
Автор

Thank You sir for Explaining E
It was helpful ❤❤

I was able to solve till D 🎉

vimalkumardubey
Автор

for E i also thought of the same solution in log^3 but how would it pass has = 8*10^8, wouldn't it tle?

paragggoyal
Автор

Don't you like recursion? I saw you write dfs in iterative approach that's why I am asking.

thans
Автор

Can you provide any source to read about merge sort tree please ?

kushmazumdar
Автор

bhai angrezi hi sunani hoti to aapke channel pr todi na aati, please hindi is our matrbhasha so please try to explain in hindi from next time

viga
Автор

damn i just missed the lazy ( here u have used "g") > 2e9 part and got Signed integer overflow

shriramdhamdhere