[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 ...
随机推荐
- SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory 解决办法
[oracle@localhost oracle]$ ./sqlplus Error 6 initializing SQL*Plus Message file sp1<lang>.msb ...
- ubuntu下安装lua和tolua++
先安装lua,然后安装toluapp 1.官网下载lua5.3或者5.2的版本 2.readline开发包安装 apt-get install libreadline-dev 3.解压源码包来编译安装 ...
- u盘重装系统后怎么恢复成普通u盘使用,U盘启动盘还原的方法
1.先将u盘插入到电脑,然后在电脑上按下win+r快捷键打开运行菜单,输入"cmd"回车确定打开命令提示符页面. 2. 然后在命令提示符输入"diskpart&quo ...
- vue路由跳转当前路由刷新
在app.vue里面定义 reload() { this.isRouterAlive = false this.$nextTick(function () { ...
- 1、docker 安装
1 准备三台linux服务器 2 docker安装 三台机器全部执行docker安装操作 2.1 移除以前docker相关包 sudo yum remove docker \ docker-clien ...
- ENGG1310 P2.1 Intro to CE Computer Systems, Programming & Networking
课程内容笔记,自用,不涉及任何 assignment,exam 答案 Notes for self-use, do not include any assignments or exams H/W & ...
- [localhost-startStop-1]
第一次遇到Tomcat在Linux服务器启动卡住的情况,情况很简单,tomcat启动以后卡在INFO: Deploying web application directory ......这句话,具体 ...
- pkill 直接对进程对名字进行操作,可以同时杀死多个进程。
Linux pkill 命令 Linux 命令大全 Linux pkill 用于杀死一个进程,与 kill 不同的是它会杀死指定名字的所有进程,类似于 killall 命令. kill 命令杀死指定 ...
- Metasploit渗透测试框架二
Metasploit基本使用方法 Metasploit基本命令 Metasploit程序需要使用Postgresql数据库. Postgresql是一种特性齐全的自由软件的对象-关系型数据库管理系统( ...
- IE和FireFox 对FORM enctype属性的认识存在差异
IE和FireFox 对FORM enctype属性的认识存在差异,一般来说对于动态创建的form,如果因为要上传文件的原因很自然的会使用类似如下的代码: 1 //create form 2 th ...