随笔分类 - 贪心
摘要:题意 给定两个长度为1e5的数组a、b,在对a、b数组分别重新排序后,求相同长度的数组c,使得c[i]=a[i] xor b[i],使得数组 c 的字典序最小。 思路 分别对a、b建字典树,能走$11/00$就走,否则就走$01/10$,找出最小的n个数,从小到大排序之后即为所求数组。 Code c
阅读全文
摘要:A. Commentary Boxestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBerland Footb...
阅读全文
摘要:D. Bookshelves time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output D. Bookshelves time limit
阅读全文

浙公网安备 33010602011771号