I'm guessing that by B, you mean the max degree?
Why is the solution O(NB)? Isn't it just O(N)? I'm trying to figure out why the max degree constraint is given in the problem, but can't think of any natural solution which needs it.
I'm guessing that by B, you mean the max degree?
Why is the solution O(NB)? Isn't it just O(N)? I'm trying to figure out why the max degree constraint is given in the problem, but can't think of any natural solution which needs it.
Given that it's going to be conducted on codechef, I think whatever is supported on the site will be allowed. So I'd suggest just trying there and checking if whatever you want is available. It's unlikely that there will be any extra restrictions placed just for ZCO.
Apologies for the error. It's been fixed now and all submissions re-judged.
Hey abhinav,
The IOI regulations state: "Students who are studying abroad may represent the Country of their nationality."
--http://www.ioinformatics.org/rules/reg16.pdf
So, if you are an Indian citizen, then theoretically there should not be an issue. But there are practical issues like where to give the first rounds of the contest, etc. You'll have to get in touch with ICO regarding this. Send an email to ico@iarcs.org.in detailing your situation.
There has been at least one instance in the past where an Indian citizen residing outside the country went on to IOI, representing India. So this is not a very rare situation.
The expected solution is O(N*M + K*(N+M)).
Hint 1:
Hint 2:
Hint 3:
Hint 4:
Hint 5:
There had been a mistake while uploading the testdata onto CodeChef. It's now been fixed, and all submissions to this problem have been re-evaluated.
Let me know if some stupid solutions still get 100.