摘要:
给一颗n个点的有点权的树,有m个询问,对于每个询问u,v,k,首先将点u到点v的最短路径上的所有点按顺序编号,u的编号为1,求树链上所有点的新编号cnt满足cnt%k==0的点的权值的最大值。n,m,k<=10^5 根据k的大小分成两部分处理。原问题可转化为 deep[i] % k = a / b 阅读全文
摘要:
Johnny is a brilliant mathematics student. He loves mathematics since he was a child, now he is working on his PhD thesis. He faces a small mathematic 阅读全文
摘要:
F(x) Time Limit: 1000/500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3530 Accepted Submission(s): 1317 Problem Des 阅读全文