[Aizu1410]Draw in Straight Lines】的更多相关文章

注意到当操作确定后,显然操作顺序总是涂黑色的1操作->涂白色的1操作->2操作 用$b/w_{r/c}(i,j)$表示$(i,j)$是否被黑色/白色 横着/竖着 涂过(1表示涂过,0表示没有),注意到当这些信息被确定后,已经可以确定是否可行以及对应的代价 具体的,考虑一个格子$(i,j)$,对其进行分析-- 注意到$b_{r}(i,j)=w_{r}(i,j)=1$一定不优秀(严格,$c$类似),证明对其分三类讨论: 1.若对应的两次操作不相互包含,则可以缩短黑色操作 2.若其中白色操作包含黑色…
题目描述 You are given n n n points on Cartesian plane. Every point is a lattice point (i. e. both of its coordinates are integers), and all points are distinct. You may draw two straight lines (not necessarily distinct). Is it possible to do this in suc…
You are given n points on Cartesian plane. Every point is a lattice point (i. e. both of its coordinates are integers), and all points are distinct. You may draw two straight lines (not necessarily distinct). Is it possible to do this in such a way t…
题目描述 You are given nn points on Cartesian plane. Every point is a lattice point (i. e. both of its coordinates are integers), and all points are distinct. You may draw two straight lines (not necessarily distinct). Is it possible to do this in such a…
D. Pair Of Lines time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given n points on Cartesian plane. Every point is a lattice point (i. e. both of its coordinates are integers), and…
最近打的比较少...就只有这么点题解了. A. Tetris time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given a following process. There is a platform with n columns. 1 × 1 squares are appearing one after a…
We write the integers of A and B (in the order they are given) on two separate horizontal lines. Now, we may draw a straight line connecting two numbers A[i] and B[j] as long as A[i] == B[j], and the line we draw does not intersect any other connecti…
135. Drawing Lines time limit per test: 0.25 sec. memory limit per test: 4096 KB Little Johnny likes to draw a lot. A few days ago he painted lots of straight lines on his sheet of paper. Then he counted in how many zones the sheet of paper was split…
http://codeforces.com/contest/872/problem/E E. Points, Lines and Ready-made Titles time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given n distinct points on a plane with integral…
题目如下: We write the integers of A and B (in the order they are given) on two separate horizontal lines. Now, we may draw connecting lines: a straight line connecting two numbers A[i] and B[j] such that: A[i] == B[j]; The line we draw does not intersec…