Comments
On ADJA → Codeforces Round #294 (Div. 2), 12 years ago
+1

LCA tutorial on topcoder.

On ADJA → Codeforces Round #294 (Div. 2), 12 years ago
0

I missed the contest :-(. I thought it was at 16:00 local time.

+1

Because it's easier to throw a big number that doesn't exceed the time limit than thinking about the exact upper limit.

0

The problem was that reserve() leaves the vector uninitialized. I should have used resize() which sets all values to 0. D'oh :-(.

0
0

Same here. Worst performance ever!

0

That's why I'm asking. My solution passed all sample tests on my computer. It's very strange...

0

What is wrong with pretest #1 on problem B div2? I can't believe my solution didn't pass it.

On Rebryk → Codeforces Round #291 (Div. 2), 12 years ago
+1

The solution is embarrassingly similar to mine. Yet i get MLE. WOW! :-)

On Rebryk → Codeforces Round #291 (Div. 2), 12 years ago
+1

I got MLE on problem C at #19. I solved the problem using a Trie. Can anyone have a look on my submission, please?

On Rebryk → Codeforces Round #291 (Div. 2), 12 years ago
+1

I sorted the points by their slope with (x0,y0) and then compared p[i] and p[i-1] using (p[i].y-y0)*(p[i-1].x-x0) == (p[i-1].y-y0)*(p[i].x-x0). If False, increment the number of shots.

On Rebryk → Codeforces Round #291 (Div. 2), 12 years ago
0

You're right :-(. I didn't pay attention to '**exactly** one position'. Now it works. Thanks!

On Rebryk → Codeforces Round #291 (Div. 2), 12 years ago
0

It works on this case.

On Rebryk → Codeforces Round #291 (Div. 2), 12 years ago
+1

I got WA at #6 on problem C. Anyone knows what it is about?

I solved the problem using a Trie.

On Rebryk → Codeforces Round #291 (Div. 2), 12 years ago
+3

Unless you are a brogrammer.

On cgy4ever → Codeforces Round #290, 12 years ago
0

He asked for Div1-C, not Div2.

On cgy4ever → Codeforces Round #290, 12 years ago
+4

This problem can be solved by graph cycle detection, right? I didn't have time to finish the code.

On cgy4ever → Codeforces Round #290, 12 years ago
0

Get ready to rumble!

God, what a stupid mistake. Thanks!

What's the answer for:

50 50

Yes, I used long long for all variables.

Got WA at #9 on problem C. What is it about?

I used 1LL for shifting.

0

Can D be solved without dynamic programming? (like a combinatorial formula)

Seems like a lot of people got WA on problem C at #5 test.

Is the contest rated?

Oh, I missed that part. Thanks!

Does anyone know how to solve C?

I precomputed the sums for each position where a bishop could be placed in O(n^2), but I don't know how to find the pair of bishops without checking each possible pair.

XSS