I would like to know how this Solution for Biclique passed May cookoff

He didn’t even use the value of K, what is this godlike logic someone explain D:
https://www.codechef.com/viewsolution/24323626

11 Likes

Haha this is awesome. So now that it’s come to this, I’d like to ask, “How far do you plan to fall Codechef? Any intentions of getting back up?”. Earlier I used to only do Codechef contests, and when my friend would tell me, “Hey, there’s a codeforces round today!” I’d tell them, “I only do Codechef”. But now, when sometimes I retrospect, I feel like I was such an idiot.

7 Likes

Haha, this one made my day…

1 Like

This guy got +199…amazing

Of course he is a god , can you even fathom the logic used by god like coders ? !

wanna see some more magic??
copy paste the same solution and try to submit it

5 Likes

Codechef is a great OJ . Same code different result

3 Likes

My new strategy for Codechef Contests : - If not able to reach a solution for a problem, just write some buggy code and submit!
Who knows I might get AC!

4 Likes

Hahaha that might happen…
Only in short contests though

2 Likes

I wonder how this solution go ac. Isn’t it a O(n3) ???

Maybe loops breaks earlier

So jaa bhai… Muje gn bolke Codechef pe qns karraha hai…
Dhokha bhai…
Dhokha ho gya​:grin:

1 Like

1 Like

I don’t see this in worst case, coz ‘&’ is sure to take O(n) time.

1 Like

kaha cc Kiya !!

1 Like

Gn bola aapne. Fir aap Codechef pe chLe gaye sone. Bohot badhiya😂

2 Likes

This is fine, I guess. See that bitset takes only 2000 bits. So Its faster than an integer array of same size. Almost all top ranked coders in the contest have used bitset with O(n^3) code. If you see in bytes, it’s just of 250 bytes. So a bitset of size 2000 is almost as much as an array of size 250. And bitwise AND of a bitset is really faster.

That’s strange !!! I thought stackoverflow gives the correct explaination. I still wonder,if the time complexity isn’t n^3, what is it then ?

update : I think something is fishy here. The size is small because bitset is built in such a way that its representation takes less memory than same sized boolean array, but that doesn’t shorten its length. i.e. it still needs O(n) iterations for logical & .

1 Like