Бодолт илгээх | Бүх бодолтууд | Шилдэг бодолтууд | Жагсаалт руу буцах |
RGB7926 - Crazy Fences |
After visiting a modern art museum, Farmer John decides to re-design his farm by moving all of the N (1 <= N <= 500) fences between his pastures! Each fence is describe by either a horizontal or a vertical line segment in the 2D plane. If two fences meet, they do so only at their endpoints. FJ has C cows (1 <= C <= 500) on his farm. Each cow resides at a point in the 2D plane that is not on any fence, and no two cows reside at the same point. Two cows are said to be in the same community if one could walk to the other without touching any fences. Please help FJ determine the size of the largest community.
Input
Input description...
Output
Output description...
Example
Input: etc. Output: etc.
Нэмсэн: | Bataa |
Огноо: | 2013-12-20 |
Хугацааны хязгаарлалт: | 1s |
Эх кодын хэмжээний хязгаарлалт: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Програмчлалын хэлүүд: | ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE |
Эх сурвалж: | USACO 2012 December Contest, Bronze |