[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 ...
随机推荐
- 新的学习历程-python1 Hello World
1 print('hello world!') 2 if 2 > 0: 3 print('ok') 4 print('yes') 5 6 x = 3; y = 4 7 print(x + y) ...
- WDA学习(27):RoadMap使用
1.20 UI Element:RoadMap使用 本实例测试创建RoadMap; 运行结果: 点击2,Input显示输入航班Id 点击3,根据input输入,查询航班信息 1.创建Component ...
- vue 传参跳转 iview、element组件
方法一1.本页vue跳转链接. <router-link :to="{path:'/details_page',query: {type:items.types,id: items.i ...
- 【Frida】启动手机上的Frida插件
运行以下命令可以保证Frida一直在手机上运行,不关机,Frida就不关 adb shell su -c "./data/local/frida-server-15.2.2-android- ...
- 查看docker 运行的参数 pip3 install runlike runlike 容器ID
- Fiddler 抓包转成*.har文件在httprunner执行
1.Fiddler 抓包转成*.har 参考:https://blog.csdn.net/hou_angela/article/details/91837007 2.生成httprunner项目结构 ...
- win10系统每次重启桌面图标排列都会改动怎么办
鼠标右键点击个性化>主题>找到桌面图标设置>把计算机 回收站 用户的文件 控制面板 网络等前面框复选框全部勾选掉,然后在桌面新建文件夹把桌面所有的图标剪切到新建文件里面,然后把新建文 ...
- 多个if...else和switch...case语句的区别和分析
1.场景: 当我们有一个判断条件的时候,显然用if语句比较方便有效. 但当判断条件很多的时候,我们可以使用if语句或者if....eles 语句和switch case 语句. 2.如何选择 一般情 ...
- 负载均衡集群ipvsadm常见参数以及基本用法
---- 固定调度 rr:论调 wrr:加权论调 weight,加权 sh:source hash ,源地址hash 动态调度lc:最少链接 active*256+inactivewlc:加权最少链接 ...
- Python 切片/列表/字符串之间装换
1. 怎么实现字符串变为list 使用split(),把字符串拆分再存入数组: 例子 input="ni si shi" output=input.split(" &qu ...