摘要: [https://atcoder.jp/contests/abc428/tasks/abc428_e](树的直径性质) 题意:给定一棵树,求出每个结点距离它最远且标号最大的结点 思路:距离每个结点最远的一定是一条直径的端点,而树的直径大小固定,端点不固定。找到两个端点标号最大的直径,每次比较距离即可 阅读全文
posted @ 2025-11-06 21:39 Marinaco 阅读(7) 评论(0) 推荐(0)
摘要: 从网上当的 //__int128的这个板子要关同步流 #define int __int128 #define gc getchar() #define cin(a) a=read() int read(){ int x=0;bool fl=0;char s=gc; while(!isdigit(s 阅读全文
posted @ 2025-11-06 16:20 Marinaco 阅读(13) 评论(0) 推荐(0)
//雪花飘落效果