Luftwaffe's blog

By Luftwaffe, history, 7 months ago, In English,

https://codeforces.com/problemset/problem/313/D Hello everyone. I've solved this problem by dynamic programming, yeah but my teacher after looking at the problem, he said it can be solved by using stack, I'm really "WTF" after what he said, I did ask him how to solve it like that but he explained it and I couldn't understand, so can anyone say whether it is possible to solve it by using stack, I'm kinda curious about that approach ? Thanks a lot.

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it

By Luftwaffe, history, 8 months ago, In English,

https://codeforces.com/contest/1076/submission/46059352

https://codeforces.com/problemset/problem/1076/D

I can't figure out why I get WA on test 9. My solution is run Dijkstra through all vertices, then BFS to get k edges or less. Please help me.

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it