摘要:
Description In an edge weighted tree, the xor length of a path p is defined as the xor sum of the weights of edges on p : ⊕ is the xor operator. We 阅读全文
摘要:
Description 一个串是有限个小写字符的序列,特别的,一个空序列也可以是一个串. 一个串P是串A的前缀, 当且仅当存在串B, 使得 A = PB. 如果 P A 并且 P 不是一个空串,那么我们说 P 是A的一个proper前缀. 定义Q 是A的周期, 当且仅当Q是A的一个proper 前缀 阅读全文
摘要:
题目地址 "题目链接" 题解 这题很有意思啊qwq。本来是写算出每个数的质约数的,然后写到一半发现,质约数互相不影响,有质约数的数肯定是合数。 所以合数染一种色,质数染一种色就好 include include include include include using namespace std; 阅读全文