【LA 5059】 Playing With Stones|博弈论|SG函数
来源:互联网 发布:附加数据库错误5133 编辑:程序博客网 时间:2024/04/30 01:57
// 打表看规律!!!!!!!!!!!!!!!!!#include <cstdio>long long SG(long long x){if(x%2==0) return x/2;else return SG(x/2);}int main(){int T;scanf("%d",&T);while(T--){int n;long long x,ans=0;scanf("%d",&n);while(n--){scanf("%lld",&x);ans^=SG(x);}if(ans==0) puts("NO");else puts("YES");}return 0;}
0 0
- 【LA 5059】 Playing With Stones|博弈论|SG函数
- La 5059 - Playing With Stones
- uvalive 5059 Playing With Stones(组合游戏,SG函数)@
- UVA1482:Playing With Stones(SG)
- UVA-1482 Playing With Stones(SG函数打表找规律)
- UVALive/LA 5059 Play with Stones 组合游戏/SG定理
- UVA 1482 - Playing With Stones (SG博弈)
- UVA 1482 - Playing With Stones(SG打表规律)
- UVALive 5059 Play with Stones SG函数,难度较低
- UVALive 5059 C Playing With Stones
- LA5059 Playing With Stones
- Nim游戏的一个扩展——51nod 1661 黑板上的游戏+LA 5059 Playing With Stones
- UVA - 1482 Playing With Stones
- uva 1482 - Playing With Stones(Nim游戏)
- HDU_1536 博弈论-sg函数
- 博弈论之sg函数
- SG函数(博弈论)
- 博弈论中的SG函数
- 数据结构之双端(通用)链表的实现
- 【杭电】[1087]Super Jumping! Jumping! Jumping!
- 【杭电】[2544]最短路
- 【杭电】[1874]畅通工程续
- mybatis入门教程
- 【LA 5059】 Playing With Stones|博弈论|SG函数
- 1025. PAT Ranking (25)
- Scalaz(37)- Free :实践-DB Transaction free style
- MongoDB+Java
- Activity各个生命周期的回调
- 桌面图标全变成.lnk的图标(WIN7系统电脑除了计算机,网络,回收站以外(包括开始菜单)的图标全都变成后缀为.lnk的文件)
- 【BZOJ3048】Cow lineup,贪心+队列维护(或二分答案)
- Try using /USELOCALTIME
- 平衡树模板&&bzoj 3223&&Tyvj 1729 文艺平衡树