Codeforces Round #124 (Div. 2)
A. Plate Game
- 如果可以放置一个圆的情况下,先手将圆放置在矩形正中心,那么根据对称性,先手只要放后手的对称的位置即可,也就是先手必胜,否则后手胜。
B. Limit
- 讨论\(n,m\)的大小关系。
- 虚拟场时当\(n \gt m\)的情况写错了,应该根据\(a_0b_0\)的正负性判断是正无穷还是负无穷。
C. Lexicographically Maximum Subsequence
- 从后往前扫,递增的取。
D. Infinite Maze
- 假设原地图为\(M\),则扩展成\[MM\\MM\]
- 从\(S\)开始遍历扩展地图,如果能走到\[(S_x + n, S_y)、(S_x, S_y + m)、(S_x + n, S_y + m)\]其中一个位置,显然能无限走下去。
E. Paint Tree
- 注意题目保证任意三点不共线。
- 可以每次取左下角的点做当前顶点,其余点极角排序下,顺序扫过去,每次取子树大小的点数,则化为一个新的子问题,递归求解即可。
Codeforces Round #124 (Div. 2)的更多相关文章
- Codeforces Round #124 (Div. 1) C. Paint Tree(极角排序)
C. Paint Tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input ...
- Codeforces Round #366 (Div. 2) ABC
Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate ...
- Codeforces Round #354 (Div. 2) ABCD
Codeforces Round #354 (Div. 2) Problems # Name A Nicholas and Permutation standard input/out ...
- Codeforces Round #368 (Div. 2)
直达–>Codeforces Round #368 (Div. 2) A Brain’s Photos 给你一个NxM的矩阵,一个字母代表一种颜色,如果有”C”,”M”,”Y”三种中任意一种就输 ...
- cf之路,1,Codeforces Round #345 (Div. 2)
cf之路,1,Codeforces Round #345 (Div. 2) ps:昨天第一次参加cf比赛,比赛之前为了熟悉下cf比赛题目的难度.所以做了round#345连试试水的深浅..... ...
- Codeforces Round #279 (Div. 2) ABCDE
Codeforces Round #279 (Div. 2) 做得我都变绿了! Problems # Name A Team Olympiad standard input/outpu ...
- Codeforces Round #262 (Div. 2) 1003
Codeforces Round #262 (Div. 2) 1003 C. Present time limit per test 2 seconds memory limit per test 2 ...
- Codeforces Round #262 (Div. 2) 1004
Codeforces Round #262 (Div. 2) 1004 D. Little Victor and Set time limit per test 1 second memory lim ...
- Codeforces Round #371 (Div. 1)
A: 题目大意: 在一个multiset中要求支持3种操作: 1.增加一个数 2.删去一个数 3.给出一个01序列,问multiset中有多少这样的数,把它的十进制表示中的奇数改成1,偶数改成0后和给 ...
随机推荐
- 踏着前人的脚印学Hadoop——RPC源码
A simple RPC mechanism.A protocol is a Java interface. All parameters and return types must be one ...
- Oracle Database 11g express edition
commands : show sys connect sys as sysdba or connect system as sysdba logout or disc clear screen or ...
- Quartz之CronExpression
一 Cron Expression 的格式 Quartz的cronExpression见官网文档说明: http://www.docjar.com/docs/api/org/quartz/CronEx ...
- C++全局变量在多个源代码文件中的使用
在比较大的项目中,如果需要使用全局变量,那么就需要注意一些全局变量声明.使用不当引起的问题了. 本篇文章主要内容有两个:普通全局变量.静态全局变量.全局常量. 1.普通全局变量:假设我们需要在多个不同 ...
- 在shell脚本中使用函数
转载请标明:http://www.cnblogs.com/winifred-tang94/ 对于在脚本中重复使用的功能模块,可以封装成为函数. shell脚本中函数的定义可以使用如下两种方式: a. ...
- [流媒体]live555简介(转)
live555简介 Live555 是一个为流媒体提供解决方案的跨平台的C++开源项目,它实现了对标准流媒体传输协议如RTP/RTCP.RTSP.SIP等的支持.Live555实现 了对多种音视频编码 ...
- [pjsip]板砖理解pjsip体系结构
在pjsip的官方开发向导中给出两张体系结构图,分别是消息流程图和类图,如下所示: 图1:消息流程图 图2:类图
- Android Studio 使用genymotion 模拟器运行app时 提示找不到任何设备
原因是使用了genymotion 默认的Android toos .打开genymotion 选择设置 ADB 使用自己的SDKtools 选择Android Studio 使用的SDK位置就行 ...
- php的分页查询建立分页类
创建一个分页类 <?php /** file: page.class.php 完美分页类 Page */ class Page { private $total; //数据表中总记录数 priv ...
- 关押罪犯(noip2010)
解法: (1)搜索(30分) (2)二分(此题属于最大值最小问题) (3)贪心+并查集 下面着重说一下“贪心+并查集” 因为有A.B两座监狱,每个犯人不是在A,就是在B监狱. 至于每个犯人在那个监狱, ...