PE508
真是日了苟了我之前还以为那个递归会炸状态..我真他妈胆小啊..
= =
明确一下,这个可以构成所有高斯整数(唯一),构造方法大概就是先看曼哈顿距离,然后判断要不要减1,然后再/(1-i)
我们考虑在末尾乘上一个1-i它会转成一个45deg的东西我们会很难受,那我们来两位两位考虑,然后我们按最后两位切割成四个小矩形的方案递归一下..
那四个小矩形不是完全一样的..但是稍微有点脑子的人就能发现那些小矩形其实位置也就在+-1之间..很接近的..
大力跑一发状态数特别少,大概是log的...= =
然后就做完了..
PE508的更多相关文章
随机推荐
- 多GPU设备处理点积示例
多GPU设备处理点积示例,项目打包下载 /* * Copyright 1993-2010 NVIDIA Corporation. All rights reserved. * * NVIDIA Cor ...
- 移动端rem匹配
Rem是相对于根元素font-size大小的单位 记inphone5屏幕宽度是 320px font-size16px 1rem=16px <html> <head> ...
- react属性校验
https://reactjs.org/docs/typechecking-with-proptypes.html 1.安装:cnpm i prop-types -S import PropTypes ...
- 【计数】cf223C. Partial Sums
考试时候遇到这种题只会找规律 You've got an array a, consisting of n integers. The array elements are indexed from ...
- Spring Framework(框架)整体架构 变迁
Spring Framework(框架)整体架构 2018年04月24日 11:16:41 阅读数:1444 标签: Spring框架架构 更多 个人分类: Spring框架 版权声明:本文为博主 ...
- Spring+ ApplicationListener
有时候 需要在容器初始化完成后,加载些 代码字典或不常变的信息 放入缓存之类的,这里使用spring 初始化bean,并实例化 1.创建一个ApplicationListener类 import o ...
- 火狐IE event和target的兼容
一.event对象 IE 中可以直接使用 window.event 对象,而 FF 中则不可以,解决方法之一如下: var theEvent = window.event || arguments.c ...
- hive的常用HQL语句
1.过滤条件 where .limit. distinct. between and . null. is not nullselect * from emp where sal > 3000; ...
- Birthday Paradox
Birthday Paradox Sometimes some mathematical results are hard to believe. One of the common problems ...
- 数据库sql中distinct用法注意事项
在写sql中去重复等操作,需要用到distinct. 在使用distinct的时候要注意,尤其是在有行列转换的时候.要把sql运行出来看看是不是与你想要的结果一样. 通过自己试验,distinct有从 ...