1518
[P1518 [USACO2.4] 两只塔姆沃斯牛 The Tamworth Two]的解题思路
P1518 [USACO2.4] 两只塔姆沃斯牛 The Tamworth Two 初始思路 利用数字1~4代表方向; 利用两个循环来实现两个角色的行为,通过每一步break实现两个角色的同步。 由于题目本意是同步,而我这实质上是分步(牛在前Farmer John在后),所以用Farmer John ......
[CF1518D] XOR Counting
[XOR Counting](https://www.luogu.com.cn/problem/CF1815D) 由于 a 可以为非负整数并且不关心 a 的具体数值,所以 m 大了后填很多 0 即可。 分类讨论。 m=1 时直接输出 n 即可。 m>=3 时,注意到 xor 运算与加运算同奇偶,所以 ......
leetcode-1518-easy
Water Bottles ``` There are numBottles water bottles that are initially full of water. You can exchange numExchange empty water bottles from the marke ......