Doubt regarding this problem : http://codeforces.com/problemset/problem/194/A

Revision en1, by traynmslf, 2016-08-21 09:53:11

Hi Everyone,

I'm a newbie here.I just started solving Div 2 A problems. I solved the following problem using a brute force approach. http://codeforces.com/problemset/problem/194/A

I was looking at the editorial here — http://codeforces.com/blog/entry/4673 I don't understand the logic behind "3n-k" being used.

Can anyone please help?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English traynmslf 2016-08-21 09:53:11 431 Initial revision (published)