Invitation to SpyBits, Udyam'21 - IIT (BHU) Varanasi (Rated for Div. 2 & Div. 3)

Thanks for reporting. It is updated now. Can you please confirm?
Apologies for the issue.

Can someone point out mistake in my D.Pilgrism D

1 Like

Please can someone help me with idea for Mission Gotham

I’m just asking this to experienced ones. I solved 4 problems today and got 116 rank, was the problems today easy as compared to regular cookoff? I’ve not participated in cookoffs in last 3-months or so.

I used nearly brute force with use of a map. Stored all index and available seats in map. Given a query using lower_bound found the required match then iterated. If seat become 0 then remove it from map. C

1 Like

Yes, it’s fixed now. Thanks!!

1 Like

it passed after correcting this. Sed lyf.

I can’t seem to figure it out. Check out my solution. It looks a little like yours. You might be able to figure something out.

Oh great. Thanks

We will look into it

Problems were a bit on the easier end for sure. But considering the number of solves - 5th problem (initially 6th) wasn’t an easy one for people competing. But I’d say problems up until 5th one are of difficulty of regular 4 (maybe 4th would be a bit more difficult than the 5th one today though, it really depands).

1 Like

can somebody help with with problem C (GOTHAM):
Its showing TLE : MY CODE

GOTHAM
I did not submit this thinking my TLE was due to multiset :frowning:
PILGRIMS
Here, completely ignored that i’m not skipping counting capital city :frowning:
F

How to solve F, stone ones?

My idea was first to store index of building (left to current one) such that we can see current building from that index and then use fenwick tree for offline queries to find out in given range how many values are less than or equal to A, since less than or equal to A building will signify that we can see buildings from both A and B. Would it work? I was just not sure.

Can someone help me with this problem for Problem D Pilgrims?
Here is my solution giving WA https://www.codechef.com/viewsolution/45072902

What i did is, did dfs to calculate cost of all nodes untill all were visited and when a leaf was found, inserted it into answer vector. Finally greedily assigned maximum energies people to maximum cost that was possible for them

What if node 1 has only 1 node attached to it?

where r editorials @adikr_singh

you mean this test case?
1
2 4
190 20 10 50
1 2 10

but here both nodes are leaves and cost(1)=0 and cost(2)=10 so we can assign 2 people right?

Hey , in your last loop calculating the answer, your condition is i <N instead of i<X.size() . Because special cities will be less than n.
Here is corrected solution. (I also made int long long)
https://www.codechef.com/viewsolution/45075152

1 Like

all of them in a few hours