个人思路:

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

黑白染色,但是不会推 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. python发送钉钉消息通用脚本

    1.使用shell生成需要发送的内容. 2.调用该脚本发送文本内容python3,其中的文件 /wj/sbjk,需要改成直接需要发送的文件. [root@manager dingding]# more ...

  2. SpecCPU2017 测试cpu性能

    SpecCPU介绍见: https://blog.csdn.net/qq_36287943/article/details/103601539 官网:https://spec.org/ 1.SpecC ...

  3. Section 2.1: Falsy VSTruthy Value and == VS ===

    Falsy VS Truthy Value and == VS === Falsy values: undefined, null, 0, '', NaN Truthy values: Not fal ...

  4. Python爬取三国演义章节标题和内容(bs4爬取,解决中文乱码)

    import os.path import requests from bs4 import BeautifulSoup if __name__ == '__main__': if not os.pa ...

  5. Java笔记_构造方法/构造器

    构造方法/构造器(constructor)   怎么来的?之前在创建对象时,是先把一个对象创建好后,再给这个对象的属性赋值,如果现在要求在创建一个对象时,就直接指定这个对象的属性,该怎么做?此时就可以 ...

  6. 网站提示:You Don’t Have Permission To Access

    测试 apache集成环境访问网站,突然出现错误提示"You don't have permission to access /index.php on this server." ...

  7. docker 搭建minio

    minio为开源的高可用分部署对象存储服务组件,已经提供了分布式部署的解决方案,实现高可靠.高可用的资源存储,MinIO以极简主义为指导进行设计,追求极致的维护精简性和卓越的读写性能表现. -dock ...

  8. 通过一个简单的实例来展示 Java 编程,创建文件 HelloWorld.java

    public class HelloWorld { public static void main(String[] args) { System.out.println("Hello Wo ...

  9. 《《《PLSQL Developer编辑器怎么设置圆括号高亮

    转载:PLSQL Developer编辑器怎么设置圆括号高亮-百度经验 (baidu.com) 为了在plsql中调代码好调 LSQL Developer编辑器怎么设置圆括号高亮?有时候对PLSQL ...

  10. delphi get post

    procedure GetDemo;var IdHttp : TIdHTTP; Url : string;//请求地址 ResponseStream : TStringStream; //返回信息 R ...