个人思路:

每轮会删掉除选定节点外的所有叶子节点。

黑白染色,但是不会推 SG 函数。

然后就不会了。

正解:

每次直径长度 \(-1\) 或 \(-2\)。\(0\) 必胜,\(1\) 必败,\(2\) 必胜,\(3\) 必胜。

显然,直径长度 \(-1\) 模 \(3\) 余 \(0\) 先手必败,否则必胜。

[AGC033C] Removing Coins的更多相关文章

  1. 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 ...

  2. Gym 101047M Removing coins in Kem Kadrãn

    给定一个序列,只能拿走D,隔壁的会翻转,问能否全部拿走. 注意到如果能拿走的话,拿D的顺序是没关系的.模拟即可 #include <cstdio> #include <cstdlib ...

  3. AtCoder刷题记录

    构造题都是神仙题 /kk ARC066C Addition and Subtraction Hard 首先要发现两个性质: 加号右边不会有括号:显然,有括号也可以被删去,答案不变. \(op_i\)和 ...

  4. Codeforces & Atcoder神仙题做题记录

    鉴于Codeforces和atcoder上有很多神题,即使发呆了一整节数学课也是肝不出来,所以就记录一下. AGC033B LRUD Game 只要横坐标或者纵坐标超出范围就可以,所以我们只用看其中一 ...

  5. AGC 033

    目录 A. Darker and Darker B. LRUD Game 题面 题解 代码 C. Removing Coins 题面 题解 代码 D. Complexity 题面 题解 代码 E. G ...

  6. 【AtCoder】AGC033(A-F)

    AGC033 A - Darker and Darker 直接BFS #include <bits/stdc++.h> #define fi first #define se second ...

  7. [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 ...

  8. 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 ...

  9. 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 ...

  10. csuoj 1119: Collecting Coins

    http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1119 1119: Collecting Coins Time Limit: 3 Sec  Memo ...

随机推荐

  1. 两个jsp界面之间使用window.location.href使用?传递参数以及接受参数

    这篇文章如果能给你带来帮助,不胜荣幸,如果有不对的地方也欢迎批评指正. 网上有很多方法是讲怎么截取字符串啊等等的方法来获取参数,说实话,看着我就觉得费劲,咱们可以换一种思路来思考.一般跳转界面多为前段 ...

  2. 洛谷 P4048更新题面

    [JSOI2010]冷冻波 题目描述 WJJ 喜欢"魔兽争霸"这个游戏.在游戏中,巫妖是一种强大的英雄,它的技能 Frozen Nova 每次可以杀死一个小精灵.我们认为,巫妖和小 ...

  3. Unity 保存截图功能

    1.下面是实现代码 using System.Collections; using System.Collections.Generic; using UnityEditor; using Unity ...

  4. 免费节假日 API

    转载地址:http://timor.tech/api/holiday 获取指定日期的节假日信息 接口地址:http://timor.tech/api/holiday/info/$date@params ...

  5. 使用layui+jQuery实现点击删除单行数据

    使用layui+jQuery实现点击删除单行数据 首先要用到layui的官网手册 地址:https://www.layui.com/ 注意1.  此功能是在使用layui展示数据的基础上实现 3.  ...

  6. Linux下安装MongoDB的Database Tools并配置

    安装tools以使用导入导出功能.解决mongodump: command not found #下载 wget https://fastdl.mongodb.org/tools/db/mongodb ...

  7. android root app 无法umount

    app已经有root权限了. 在执行umount /sbin时候总是不成功,但是在adb 的shell 里是可以的. 研究半天后发现,原来app的mount 空间被修改了. 用以下方法解决问. ech ...

  8. 将本地文件推送到Gitee仓库

    完整的步骤 1.在gitee中创建仓库 2.下载.安装git 3.推送文件到gitee 推送文件到gitee 1.在要上传的文件夹空白处,点击右键,选择 git bash here 2.输入 git ...

  9. 【RUNOOB】C语言学习之指针

    资料来源: (1) runoob; (2) C语言程序设计; 注1:Runoob中对于指针的讲述比较清晰简单,摘录出来(后续补充指针与结构体,指针与函数参数); 1.指针与变量的内存位置 (1) 每个 ...

  10. C# DataGrid嵌套DataGrid动态隐藏显示行

    前端代码: <Window x:Class="DataGridPractice.MainWindow" xmlns="http://schemas.microsof ...