摘要:题目链接: Problem: Query on the tree Time limit: 1s Mem limit: 64 MB Problem Description There is a tree with n node, labeled from 1 to n, and the root of
阅读全文
摘要:A: Anton and Polyhedrons(水题) B: Anton and Classes(水题) C: Anton and Fairy Tale(二分) 思路:m>=n时 ans=n;m<n时 前m天都能补满,第m+1天时就要开始减少了,n-m-(x+1)*x/2是m天后第x天的剩余,二分
阅读全文
摘要:A: Andryusha and Socks(模拟) B: The Meeting Place Cannot Be Changed(三分) 思路:时间关于位置是一个凹函数,直接三分求极值就行; C: Andryusha and Colored Balloons(dfs) 思路:k是最大的度数+1,然
阅读全文