Network Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge Andrew is working as system administrator and is planning to establish a new network in his company. There will be N hubs in the company, they can be connected to each other using cables. Since each worker of the company must have access to the whole network, each hub must be accessible by cables from any other hub (with possibly some intermediate hubs). Since cables of different types are available and shorter ones are cheaper, it is necessary to make such a plan of hub connection, that the maximum length of a single cable is minimal. There is another problem – not each hub can be connected to any other one because of compatibility problems and building geometry limitations. Of course, Andrew will provide you all necessary information about possible hub connections. You are to help Andrew to find the way to connect hubs so that all above conditions are satisfied. Input The first line of the input file contains two integer numbers: N – the number of hubs in the network (2 Process to the end of file. Output Output first the maximum length of a single cable in your hub connection plan (the value you should minimize). Then output your plan: first output P – the number of cables used, then output P pairs of integer numbers – numbers of hubs connected by the corresponding cable. Separate numbers by spaces and/or line breaks. Sample Input 4 6 Sample Output 1 Source: Northeastern Europe 2001, Northern Subregion
Copyright @ 思路:这题实际上就是最小树,因为最小树里了最长边,就是题目中所述的最短边。
|
Submit Status |
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.fwqtg.net
选择合适的指标 在构建机器学习模型时,我们首先要选择性能指标,然后测试模型的表现如何。相关的指标有多个,具体取决于我们要尝试解决的问题。 在可以选择性能指标之前,首先务必要认识到,机器学习研究的是如何学习根据数据进行预测。对于本课程和后续的“监督式机器学习…