Comments
On pinely → Pinely Round 2, 3 years ago
-14

How do you debug for a large testcase, lets say 1000 size input array.

Ruled it out, thinking it would/should TLE.

I couldn't solve it, but this is pretty interesting. It is not that hard, just think about it.

I missed that by 4 problems.

Think of it in this way, let's say you have $$$2$$$ components (graph) of even indexes and odd indexes. Reaching from one node to another means you can swap these $$$2$$$ indexes in the original string. Now if, $$$K$$$ is even that means you have an edge between the $$$2$$$ components of graph making it a single big component, while if $$$K$$$ is odd, parity of swapped indexes will not change, and they will still lie in the same component as their original one.

+1

Can someone hack this F solution for the case when water and fire > 1e5? https://codeforces.me/contest/1862/submission/220284156

Your code for B doesn't even work for sample inputs.

+28

Don't

I miss +ve $$$\Delta$$$

On Kevin114514 → I'm Kevin114514, AMA!, 3 years ago
+13

Are you the youngest LGM?

Hint
Solution

Getting Div2. C2 accepted is a proof in itself, you can't get that problem AC without a proof.

+123 -111 +202 in last 3 contests. My ratings are on a roller coaster.

Had to wait a few minutes after each submission just to see WA on test 2.

+123 Delta in Recent Div.3 Contest and -121 Expected Delta in this Contest

I have just simulated the whole process according to the question. For a given number $$$N$$$ at $$$k$$$ th position, I am brutally checking if it is possible to have some number $$$x$$$ $$$(0 \lt = x \lt = N)$$$ at $$$(k - 1)th$$$ position.

Check function is really simple, if we just fix $$$(k - 1)th$$$ number and $$$k$$$ th number in a fibo sequence, we can easily determine that $$$(k - 2)th$$$ number will be the difference of $$$k$$$ th number and $$$(k - 1)th$$$ number. With that we can easily determine if the sequence we are getting by fixing those $$$2$$$ numbers is a valid sequence or not by recursively calling the same function with different values of $$$N$$$ and $$$K$$$. Sequence is Valid if $$$k = 0$$$ and $$$N \gt = 0$$$ otherwise if $$$N$$$ become negative, the assumed fibo sequence is inValid.

I came up with a pretty easy and intuitive solution for div2 B after about an hour.

Div2 B

:

Swap(C,D), D was very straightforward unlike C.

No, Master is the limit.

For me implementing DP was easier than coming up with the greedy solution.

+3

I miss participating in Div 3 contests.

+4

Linearly assign numbers from 1 to n * m. If m is non — prime, that would be your answer. If m is prime, reorder rows such that the difference is multiple of m.

Thanks man :)

Master on ALT, CM on main account?

Thanks for the round, finally blue!

Could you share any resource for the same?

You were trying to access out of bound, there will be less than n elements in your vector v incase of duplicates.

yep, preprocess with sliding window after sorting them.

+3

Toughest A or Easiest C?

For me, A was tougher than B and C.

On culver0412 → Codeforces Round 865, 4 years ago
+19

Me having my worst contest :(

CF — Let's make him happy :)

Edit : He changed his original comment

+1

You're not welcome in Japan.

How does that clock hack that you used in F2 work?

+14

Swap(C,D)

0

Did something similar 198269402

0

F with simulation

Solution
+24

2 tests failed, +20 minute penalty

+1

Going to be my first unofficial round.

is that common?

do you have the same for Amritapuri regionals?

I'm going newbie again!

I'm done with the payment but do we have to fill a form or ping them to update our team status?

Just like Kanpur, Is there any registration form for updating payment information for Amritapuri?

And you got runtime error in B. Sad noise

0

This aged well!

Sum of first n natural number is n * (n + 1) / 2 So, if you do 13 * (13 + 1) / 2 = 91

Got it just after contest, I was taking mutliplication instead of LCM. Damn me!

What do you think could be the rating of E?

Is E based on Inclusion — Exclusion principle?

Can you prove B?

Why is C easier than A and B?

more like observation forces

It was most likely div 2.5, what do you think?

It works!

Code
On tourist → Codeforces Round #850, 4 years ago
+21

Guess I'm too Indian to understand this.

On tourist → Codeforces Round #850, 4 years ago
+3

I don't get it.

On tourist → Codeforces Round #850, 4 years ago
+5

YES ~ tourist probably

0

~ think in same way
hnmm that makes sense

0

What's Segment tree doing in a div 4 round ?

Okay that makes sense, but there are still 2e7 operations at max which I think is a lot for 2 seconds when doing recursion.

Isn't the worst case time complexity for C : O(2kn)

0

Looking at other's solution after contest gave me more clarity about problem B than the problem statement itself.

Probably because of collisions in unordered_map<>. Try doing the same thing with map<> or use custom hash with unordered_map<>

What did you test?

Monkeytype for practice

Haha, I got 4 TLE in practice and got frustrated after map got AC in 1. This is new to me!

Did you participate? Was it rated for you? Just curious

I wish I could say this in some rounds.

Happening to me too :(

On O--O → SPEEDFORCES, 4 years ago
0

How do find more updates on these unrated contests?

Wow! Good Explanation. Thanks man

No one replied!

On awoo → Codeforces Round #839 (Div. 3), 4 years ago
0

Hack them

Can someone explain C? Why suffix though?

Damn clever!

+11

And those 2 upvotes are from your other ids.

Mathforces!

Looks like a bug, I'm sure am not the only one.

Cyan be waiting for too long now.

How long will cyan have to wait to take over green?

Okay, thanks. But I notice my rank is still increasing, is it because of virtual particpants?

Do we get or lose points for hacking in this round?

Hint for D ?

On Imakf → Codeforces Global Round 24, 4 years ago
0

Only solved till C but my best div 2 round so far.

I get it, my bad. Thanks though

Please help me figure out what's wrong with my C https://codeforces.me/contest/1758/submission/182541955

-8

Ohh.. is that why my solution got hacked? Damn, I thought they have O(1) in all cases. Well, according to the approach I have used what would have been a more preferred data structure ?

-13

Ok cool

Why the hell did I use topological sort in C ?

0

I blundered

Great!

Hey Vito, could you please tell me the difficulty of Codeforces round. Are global rounds comparatively tougher than div3, div4 or equivalent to div2 or div1 ?

Okay thanks

It was my first contest. I could only solve 1, what is the rating of the first problem?