5分钟搭建UE4SS游戏Mod环境:终极虚幻引擎脚本系统指南
2026/6/8 15:04:59
acwing过过一遍,不用就会淡忘,好消息是再看一眼就能想起来了😇
lc1908
nim游戏:把所有堆的数量异或,结果非零则当前玩家能赢
非零先手玩家只用将其变为0,然后镜像后手玩家操作,后手必败
class Solution {
public:
bool nimGame(vector<int>& piles) {
int t = 0;
for(int p : piles){
t ^= p;
}
return t != 0;
}
};