Since the last blog about codechef Algorithmist was deleted, we can discuss it here.
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 166 |
2 | maomao90 | 163 |
2 | Um_nik | 163 |
4 | atcoder_official | 161 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | nor | 153 |
9 | Dominater069 | 153 |
Since the last blog about codechef Algorithmist was deleted, we can discuss it here.
Name |
---|
I've tried local variables,global variables,cin/cout,scanf/printf and still assert(n>0); fails everytime.
How are people getting AC? (I'm pretty sure there is no problem with assert function since assert(n<=100) does not give RTE)
do you know, what did I try?
I assumed, that t and n are incorrect, but at least they are placed in right lines. But when I asserted (s.size() <= 2) for odd lines(where should be n), it failed.
Me and Bedge were just guessing the number of cases in the input is not same as the value of t. But seems like it is more than that OMG
I know, how they generated the testcases.
Output 0 for n<=0. (I don't know why, but it pass all test)
I hope they rejudge all the solutions after correcting the errors.
rohit_0809 and renesmee, please do so.
When they said:
And after a long explanation...
And they suggested us...
Wrong usage of meme.
Should have taken screenshots of the comments on the previous one before it got deleted. :D
And here it comes... :D (I knew it, rohit_0809)
P.S. Not the newest version, sorry.
How did you solved LUCKY PAIRS ? I solved it with storing vectors in a each segment tree node and then binary searching the values less than for any x, but I think there is some simpler approach because it got so fast submissions.
I didn't solve it and I can't submit it, but here is part of code:
The part of code with O(n2) can be simply done with segtree. We need to answer for each i = 0... n - 1, how many numbers in pref[0, i - 1] are greater, than suf[i].
I did this too. I did that segtree stuff by storing vectors for each node and then sorting and binary search on them. I am just wondering if there is simpler version of that segtree.
My solution
Why do you need so hard segtree? We need only 2 operations on segtree:
for i in 0... n - 1:
Even fenwick tree will fit fine there.
Suffixing the original array based on the length of q points which you can perform and just build a segment tree or Fenwick tree.
Now start with prefixed and start updating the segment tree with new length which will be left if we remove ith element from some suffix.
Suppose you had 2 2 2 2 initially, Now when you remove 2nd 2 from beginning you would have reduced a 3 size suffix to 2 this you need to update same in segment tree by decrementing number of suffixes of size 3 by 1.
Hope it helps.
These things happen when problem setters blindly copy paste everything like course assignments.
So can somebody give AC solution for the task with "fine testcases"?
Here
I don't know what the issue was because mine passed in a single run.
ok, I got it, for negative n it outputs 0. My code was outputting the answer from last adequate queue.
You are talking about problem A — Chaos Is A Ladder?
Expand the "Successful Submissions" bar on the right. link
I solved A without memoising my dp then too it passed alongwith the case n<0 :P
Surprised, it seems that the data was updated and submissions of problem A were rejudged.
Yeah, it seems they did. Kudos to them for not ignoring the problem.
Also congrats for first place!
Thanks, now I am curious about the distribution of prizes haha.
I too apologize for the inconvenience caused..we'l make sure this does not occur ever again...and congratulations to the top performers !
Thanks bro for showing kindness!! First of all heartiest Congratulations for all top performers.Secondly,I am very very sorry for whatever happened yesterday.Because of solutions getting accepted and our tester was bit over confident about his test file, i was ignoring the matter. But, at the last moment (nearly 30 minutes were left towards the end of contest), we came to realize that there was serious glitch in test file.I was seriously dumbstruck at that moment.It was very much depressing and unexpected for me.I deeply apologize to all the coders who suffered because of me.Being the organizer, i know i am the culprit.Please please forgive me for this blunder.I know, i wasted your precious time and being a coder, i can understand how it feels.Your anger is totally acceptable for me.I am extremely sorry and, i will ensure that it never happen in future.
Just to minimize our fault, we have rejudged all the solutions of ALGOA. Rank-list has been updated.Prize distributions will be announced soon on our Facebook page.Again, i will say, i deeply regret for all the inconvenience caused.