摘要:
[POI2014]KUR Couriers 题目描述 Byteasar works for the BAJ company, which sells computer games. The BAJ company cooperates with many courier companies that 阅读全文
摘要:
洛谷P2398 GCD SUM 题目描述 for i=1 to n for j=1 to n 给出n求sum. gcd(x,y)表示x,y的最大公约数. 输入输出格式 输入格式: n 输出格式: sum 输入输出样例 输入样例 1: 2 输出样例 1: 5 说明 数据范围 30% n define 阅读全文
摘要:
洛谷P2633/bzoj2588 Count on a tree 题目描述 给定一棵N个节点的树,每个点有一个权值,对于M个询问(u,v,k),你需要回答u xor lastans和v这两个节点间第K小的点权。其中lastans是上一个询问的答案,初始为0,即第一个询问的u是明文。 输入输出格式 输 阅读全文
摘要:
SP1487 PT07J Query on a tree III 题意翻译 你被给定一棵带点权的n个点的有根数,点从1到n编号。 定义查询 query(x,k): 寻找以x为根的k大点的编号(从小到大排序第k个点) 假设没有两个相同的点权。 输入格式: 第一行为整数n,第二行为点权,接下来n 1行为 阅读全文
摘要:
HDU3949 XOR Problem Description XOR is a kind of bit operator, we define that as follow: for two binary base number A and B, let C=A XOR B, then for e 阅读全文