机试三道题第一题:简单的数组题,具体内容忘了。只记得输出是类似“1 2 3”这样用空格隔开的一个个结果。我本来在循环中直接计算完每一个答案以后cout<<ans<<' '; 结果最后面多了一个空格答案不通过,无奈给最后一个结果单独输出。第二题:最大拓扑网络。给定n个节点(0~n-1),每个节点都有其对应的层级(1<=level<=1000)。节点之间有链路连接,比如{0,2}表示节点0和节点2之间可以连接,这个连接是双向的。每个节点可以有多条链路,但只能属于一个层级。最大拓扑网络表示在同一层级下,能用链路直接连接起来的最大节点数量。(比如共有3个节点,节点0...