Asia Hong Kong Regional Contest 2019
A. Axis of Symmetry
B. Binary Tree
- n 的奇偶性决定胜负。
C. Constructing Ranches
- 路径上点权之和大于,极大值两倍,这是路径上点能拼出多边形的充要条件。
- 树分治,进行路径统计即可。
- 有请 F0_0H 讲解下怎样卡常。
D. Defining Labels
签到
E. Erasing Numbers
- 考虑第 \(i\) 位的答案,因为我们只关心被删掉的元素和 \(a[i]\) 大小关系,把比 \(a[i]\) 小的元素设为 0,比 \(a[i]\) 大的元素设为 1.
- 先对前缀,后缀进行消除。考虑一个序列消除的结果可以分为三类 【全0】【全1】【01都有】
F. Falling Objects
G. Game Design
- \(f(u)\) 为考虑 \(u\) 为根节点子树最优解方案数。
- \(f(u)=f(lson)*f(rson)\) 或者 \(f(lson)*f(rson)+1\) 或者 \(1\)
- 根据 \(K\) 的二进制表示构造即可。
H. Hold the Line
I. Incoming Asteroids
idea
- 对于 type 1,总共需要 y,有 k 个星球。分一下锅,每个星球需要 \([\frac{y}{k}]\) 的目标。
- 当某个星球完成目标时,把剩下的 job 再均摊下去,我们发现这次分锅的总工作量是上次 2/3
- 用堆去维护锅,然后写卜了,样例死循环【卜】。
J. Junior Mathematician
- 从高位到低位决策,记录模 \(m\) 系下,\(f(x)-x\) 与各数位之和,数位 DP。
K. Key Project
summary and replay
Asia Hong Kong Regional Contest 2019的更多相关文章
- Asia Hong Kong Regional Contest 2016
A. Colourful Graph 可以在$2n$步之内实现交换任意两个点的颜色,然后就可以构造出方案. #include <bits/stdc++.h> using namespace ...
- 2019-2020 ICPC Asia Hong Kong Regional Contest
题解: https://files.cnblogs.com/files/clrs97/19HKEditorial-V1.zip Code:(Part) A. Axis of Symmetry #inc ...
- 2019-2020 ICPC Asia Hong Kong Regional Contest J. Junior Mathematician 题解(数位dp)
题目链接 题目大意 要你在[l,r]中找到有多少个数满足\(x\equiv f(x)(mod\; m)\) \(f(x)=\sum_{i=1}^{k-1} \sum_{j=i+1}^{k}d(x,i) ...
- Asia Jakarta Regional Contest 2019 I - Mission Possible
cf的地址 因为校强, "咕咕十段"队获得了EC-final的参赛资格 因为我弱, "咕咕十段"队现在银面很大 于是咕咕十段决定进行训练. 周末vp了一场, 这 ...
- 2020.5.16-ICPC Central Europe Regional Contest 2019
A. ABB #include <bits/stdc++.h> using namespace std; #define PB push_back #define ZERO (1e-10) ...
- 2020.5.4-ICPC Pacific Northwest Regional Contest 2019
A. Radio Prize All boring tree-shaped lands are alike, while all exciting tree-shaped lands are exci ...
- Hong Kong Regional Online Preliminary 2016 C. Classrooms
Classrooms 传送门 The new semester is about to begin, and finding classrooms for orientation activities ...
- 回文自动机 + DFS --- The 2014 ACM-ICPC Asia Xi’an Regional Contest Problem G.The Problem to Slow Down You
The Problem to Slow Down You Problem's Link: http://acm.hust.edu.cn/vjudge/problem/viewProblem.actio ...
- 2013 Asia acm Hangzhou Regional Contest 杭州现场赛
B Stealing Harry Potter's Precious 题目大意:给定一个n*m的地图,某些点可以走,某些点可以走某些点不可以走,给定一个起点,又给出了k个点k<=4,要求从起点 ...
随机推荐
- PAT甲级——A1145 HashingAverageSearchTime【25】
The task of this problem is simple: insert a sequence of distinct positive integers into a hash tabl ...
- Spring入门之生命周期
好几日没有读东西了,今天本来要读mybatis原理部分,但是看到作者讲,只是学会用不用学那么深,遂直接开干spring,工作中一直用springboot,框架都是领导搭好的,每天的任务就是增删改查,挺 ...
- 【题解】sweet
题目描述 为了防止糖果被小猫偷吃,John把他的糖果放在了很多的高台上,一个高台可以认为是一段平行于X轴的线段,并且高台的y坐标都是大于0的,每个高台都有左端点和高台的长度,每个高台都有糖果.所有的高 ...
- flask获取参数
<!DOCTYPE html> body, html { width: 100%; height: 100%; } , ::after, ::before { -webkit-box-si ...
- oracle中hint 详解
Hint概述 基于代价的优化器是很聪明的,在绝大多数情况下它会选择正确的优化器,减轻了DBA的负担.但有时它也聪明反被聪明误,选择了很差的执行计划,使某个语句的执行变得奇慢无比. 此时就需要DBA进行 ...
- ReentrantLock的相关方法使用
获取锁定 void lock():常用获取锁定的方法 void lockInterruptibly():如果当前线程未被中断,则获取锁定:如果当前线程被中断,则出现异常 boolean tryLock ...
- LeetCode Array Easy121. Best Time to Buy and Sell Stock
Description Say you have an array for which the ith element is the price of a given stock on day i. ...
- 在linux上安装jdk
一.环境 1. VMware虚拟机 2. Linux系统(centos7) 安装步骤: 1. 先安装VMtools 2. 查看是否有openjdk,若有先将系统内的openJDK删除(采用 r ...
- 【CSS】水平居中与垂直居中
有宽度的div水平居中 1.左右margin设为auto即可 .center { width: 960px; margin-left: auto; margin-right: auto; } 2.绝对 ...
- Windows——关于Word2016/2019提示需要修复问题处理
一.问题描述 打开Word提示 很抱歉此功能看似已中断,并需要修复.请使用Windows控制面板中的“程序和功能”选项修复Microsoft Office. 二.解决方法 运行 regedit 进入注 ...