AARYABHATTA_THE_GREAT's blog

By AARYABHATTA_THE_GREAT, history, 5 weeks ago, In English

Can Someone please help me out with optimizing my solution?

Question Link -> https://codeforces.me/contest/2037/problem/G

My Solution -> https://codeforces.me/contest/2037/submission/298945671

Its obvious what I am trying to do. I simply create DAG by adding edges between indexes where transition is possible. Then I run Kahn's algo to sort the nodes and then its simple dp to find number of ways to reach the ending node.

Full text and comments »

By AARYABHATTA_THE_GREAT, history, 6 weeks ago, In English

The Question is -> https://codeforces.me/contest/2013/problem/D

My approach is as follows :

My Approach

If someone could help me out it would be greatly appreciated.

My submission for ref -> https://codeforces.me/contest/2013/submission/297131396

Thanks!!

Full text and comments »

By AARYABHATTA_THE_GREAT, history, 3 months ago, In English

This is the question. https://codeforces.me/contest/1974/problem/E

AC submission -> https://codeforces.me/contest/1974/submission/287177874

WA submission -> https://codeforces.me/contest/1974/submission/287176403

In both my submissions, i have the exact same approach, only diff being in 1 case i use the current dp state to update the next dp states(in the WA submission) and in the AC submission i use previous dp states to update current dp states.

Where am i going wrong?

*Edit -> Resolved

Full text and comments »

By AARYABHATTA_THE_GREAT, history, 4 months ago, In English

Problem Link -> https://codeforces.me/contest/776/problem/D

My submission -> https://codeforces.me/contest/776/submission/285238557

Its pretty obvious from my code what i am trying to do. My Question is that is the logic correct? Where am I going wrong?

I just take cases of whether the door is locked or not and accordingly I build the adj list for the corresponding switch combinations.

*Edit -> Resolved now.

Full text and comments »