[AGC033C] Removing Coins
个人思路:
每轮会删掉除选定节点外的所有叶子节点。
黑白染色,但是不会推 SG 函数。
然后就不会了。
正解:
每次直径长度 \(-1\) 或 \(-2\)。\(0\) 必胜,\(1\) 必败,\(2\) 必胜,\(3\) 必胜。
显然,直径长度 \(-1\) 模 \(3\) 余 \(0\) 先手必败,否则必胜。
[AGC033C] Removing Coins的更多相关文章
- ACM: Gym 101047M Removing coins in Kem Kadrãn - 暴力
Gym 101047M Removing coins in Kem Kadrãn Time Limit:2000MS Memory Limit:65536KB 64bit IO Fo ...
- Gym 101047M Removing coins in Kem Kadrãn
给定一个序列,只能拿走D,隔壁的会翻转,问能否全部拿走. 注意到如果能拿走的话,拿D的顺序是没关系的.模拟即可 #include <cstdio> #include <cstdlib ...
- AtCoder刷题记录
构造题都是神仙题 /kk ARC066C Addition and Subtraction Hard 首先要发现两个性质: 加号右边不会有括号:显然,有括号也可以被删去,答案不变. \(op_i\)和 ...
- Codeforces & Atcoder神仙题做题记录
鉴于Codeforces和atcoder上有很多神题,即使发呆了一整节数学课也是肝不出来,所以就记录一下. AGC033B LRUD Game 只要横坐标或者纵坐标超出范围就可以,所以我们只用看其中一 ...
- AGC 033
目录 A. Darker and Darker B. LRUD Game 题面 题解 代码 C. Removing Coins 题面 题解 代码 D. Complexity 题面 题解 代码 E. G ...
- 【AtCoder】AGC033(A-F)
AGC033 A - Darker and Darker 直接BFS #include <bits/stdc++.h> #define fi first #define se second ...
- [LeetCode] Arranging Coins 排列硬币
You have a total of n coins that you want to form in a staircase shape, where every k-th row must ha ...
- Codeforces 2016 ACM Amman Collegiate Programming Contest A. Coins(动态规划/01背包变形)
传送门 Description Hasan and Bahosain want to buy a new video game, they want to share the expenses. Ha ...
- Swift 提示:Initialization of variable was never used consider replacing with assignment to _ or removing it
Swift 提示:Initialization of variable was never used consider replacing with assignment to _ or removi ...
- csuoj 1119: Collecting Coins
http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1119 1119: Collecting Coins Time Limit: 3 Sec Memo ...
随机推荐
- VUE学习-优化组件
组件(优化) 动态组件 keep-alive 当在这些组件之间切换的时候,你有时会想保持这些组件的状态,以避免反复重渲染导致的性能问题. 有时我们更希望那些标签的组件实例能够被在它们第一次被创建的时候 ...
- VSCODE 界面设置
如上图所示: 用插件background-cover ,再设置下图片路径即可,程序员专属的开发DIY界面随手可得 当然添加账号来同步,以后设置一次即可随时同步
- ERNIE1-2
ERNIE1.0 ERNIE: Enhanced Representation through Knowledge Integration提出了三种级别的masking:(1)word piece级别 ...
- 1414:【17NOIP普及组】成绩
1414:[17NOIP普及组]成绩 时间限制: 1000 ms 内存限制: 65536 KB提交数: 27975 通过数: 17779 [题目描述] 牛牛最近学习了 C++入 ...
- Linux Qt编译时出现has modification time int the future的解决方法
问题场景:我在window系统上合并完代码后,将代码通过TF卡拖到了Debian系统的开发板子上(为什么我不用Winscp或者xhttp传呢?因为网线被同事拿走了...),然后就报这个错. 网上查阅资 ...
- 设置导航栏的title
self.navigationController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObjectsAnd ...
- ElementUI Select下拉框定位问题!
今天遇到了下拉不跟随文本框滚动的问题 参考官方手册添加参数: popper-append-to-body="false" 无效[内心很无语]继续检查向上推,查看html样式,发现了 ...
- 使用 PSAPI 库枚举进程 EnumProcesses()函数
使用 PSAPI 库枚举进程 在 Windows NT 中,创建进程列表使用 PSAPI 函数,这些函数在 PSAPI.DLL 中.这个文件是随 Platform SDK 一起分发的: 使用这个库所需 ...
- 808.11ac的MAC层
MAC层是802.11的主要功能部分.上层应用通过调用MAC层提供的接口原语调用MAC层的功能. 在内部,MAC由除了函数还有数据,叫MIB,存储MAC的各种参数.SME是一个单独的模块,用来跟接口函 ...
- JQery easyUI 滚动分页
var s1 = new Date().getTime(); $(document).ready(function(){ var flag = true; //鼠标 ...