Evil Chris
CodeChefOpen on judge ↗
Fluffy the squirrel lives in Udayland. There are n schools in Udayland, and each school initially have ci students. There are m bidirectional roads in Udayland, where the i-th road connects schools ui and vi. We define the happiness of a student in school i as the number of other students (i.e. including himself) that he can meet. A student can meet a student if he is from his school or from a sc
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start