摘要: (div.pas/c/cpp) 128MB 1s 给出一个长度为n的序列A,请你找出一个最长的区间使得这个区间内存在一个数字能被区间内所有数字整除(即存在 对于所有 ,使得 )。最长的区间可能有多个,所以还要输出最长的区间的个数。 输入格式 第1行为一个正整数 n。 第2行n个数为Ai。 输出格式 阅读全文
posted @ 2017-08-09 21:09 友人Aqwq 阅读(327) 评论(0) 推荐(0) 编辑
摘要: Xor路 (xor.pas/c/cpp)128MB1s 给定一棵有N个点和N-1条边的树,请你求出树中的最长路径,以及总共有多少条最长路径。 这里路径长度是用xor定义的,即若经过的边的权值为a1, a2, a3,...,an,则这条路径的总权值为 a1 xor a2 xor a3 ... xor 阅读全文
posted @ 2017-08-09 19:50 友人Aqwq 阅读(232) 评论(0) 推荐(0) 编辑
摘要: D. The Bakery time limit per test 2.5 seconds memory limit per test 256 megabytes input standard input output standard output D. The Bakery time limit 阅读全文
posted @ 2017-08-09 16:33 友人Aqwq 阅读(177) 评论(0) 推荐(0) 编辑