摘要: 官方题解: https://blog.csdn.net/qq_62464995/article/details/127493921 # 题目大意 给出数组a[i],将a分成两个数组x和y,使得$\forall x[i]\% y[j]$都相等($|x|,|y|>0$) 构造一组$|y|$最大的方案 n 阅读全文
posted @ 2023-05-08 14:58 gmh77 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 官方题解:https://blog.csdn.net/qq_62464995/article/details/127493921 # 题目大意 给出一棵边权为1的树,构造排列p,使得 ①p[1]=1 ②dis(p[i],p[i+1])=3时,一定有解,考虑构造: 把树上的点**按层黑白黑白染色**, 阅读全文
posted @ 2023-05-08 12:04 gmh77 阅读(124) 评论(0) 推荐(0) 编辑