资源说明:2017 CCPC Final Contest
Onsite Round, Sunday, December 3rd, 2017
Problem A. Dogs and Cages
Jerry likes dogs. He has N dogs numbered 0, 1, . . . , N − 1. He also has N cages numbered 0, 1, . . . , N − 1.
Everyday he takes all his dogs out and walks them outside. When he is back home, as dogs can’t recognize
the numbers, each dog just randomly selects a cage and enters it. Each cage can hold only one dog.
One day, Jerry noticed that some dogs were in the cage with the same number of themselves while others
were not. Jerry would like to know what’s the expected number of dogs that are NOT in the cage with
the same number of themselves.
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。