SurajSP's blog

By SurajSP, history, 22 months ago, In English

Problem link: https://codeforces.me/contest/1618/problem/D

Wrong answer submission: https://codeforces.me/contest/1618/submission/189086969

Correct answer submission: https://codeforces.me/contest/1618/submission/189088442

Approach for correct answer is, we combine n-2*k and n-k (0-indexed), then n-2*k+1 and n-k+1 and so on... till n-k-1 and n-1

I feel like same thing I am doing with stack as well in wrong answer submission, what I am doing is, I am combining current element with a next element that is different using stack, so that when divide we get 0. And finally when there are still elements present, count of it will be obviously even, so just count/2 times 1 will be added. But it is showing wrong answer.

Example

3 3 4 4 5 5 6 6

Combining 3 and 4,then 3 and 4, then 5 and 6, then 5 and 6.

In which case this fails?

Full text and comments »

  • Vote: I like it
  • +8
  • Vote: I do not like it

By SurajSP, history, 2 years ago, In English

Hi Guys. When a Contest Ends I See a Lot of People Asking "How to Solve C Problem" or Any Problem. And Since Comment Section is Huge, Sometimes Its Hard to Find Where it is, Because Sometimes People Ask This Same Question in a Different Way/Sentence. So Searching Through That FIND Option is Harder.

So In a Contest, There is Two Things in Right Corner. They are 1) Announcement 2) Editorial. I Suggest to Add One More Thing Like "Contestant's Editorial" or Call it any Name. So it Would Like This 1) Announcement 2) Official Editorial 3) Contestant's Editorial.

This Contestant's Editorial Section Should Be Opened Immediately, Once The Contest Ends. And in That, Comment Section Opened For Each And Every Problem Asked In That Contest. Like Problem A Should Have Dedicated Comment Section For it, Problem B Should Have Dedicated Comment Section For it and so on ....... For Each and Every Problem. And Also it Should Have Upvotes option.

Making This Would Actually Help A Lot For All People. So I Request MikeMirzayanov To Add This Feature.

Full text and comments »

  • Vote: I like it
  • +234
  • Vote: I do not like it