随笔分类 - 位运算
摘要:题目描述 AK掉五校联考的题目后,鑫鑫在研究二进制在数论中的应用。鑫鑫给了你n个数,每次你可以从这其中选择两个数a和b,将它们的值分别赋为a and b和a or b(均为二进制位运算)。这样的操作,你可以执行任意多次。鑫鑫希望最终这些数的平方和尽量的大,你能帮他求出这个最大值吗? 输入 第一行一个
阅读全文
摘要:题目描述 双十一就要来啦!而Yuno刚刚获得了一笔X元的奖金。那么是不是应该清空下购物车呢?购物车总共有N个物品,每个物品的价格为Vi,Yuno想尽可能地把手头的奖金给花光,所以她要精心挑选一些商品,使得其价格总和最接近但又不会超过奖金的金额。那么Yuno最后最少可以剩下多少钱呢? 输入 第一行,两
阅读全文
摘要:题目描述 There is an integer sequence of length 2^N: A0,A1,…,A2^N−1. (Note that the sequence is 0-indexed.)For every integer K satisfying 1≤K≤2^N−1, solve
阅读全文
摘要:题目描述 Taro has been hooked on making lunch boxes recently. Taro has obtained a new lunch box recipe book today, and wants to try as many of the recipes
阅读全文
摘要:题目描述 In this problem, we consider floating-point number formats, data representation formats to approximate real numbers on computers.Scientific notat
阅读全文

浙公网安备 33010602011771号