传送门:The Flood 题意:当水的高度升为多少的时候,能够将这块区域分为两个部分. 分析:枚举高度,先从外围开始一次dfs,将水能淹没的标记,然后看非标记的是否已分为多块. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #define inf 0x7fffffff #define LL long long #define N 110 using nam…
来之不易的2017第一发ac http://poj.org/problem?id=2386 Lake Counting Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 31474 Accepted: 15724 Description Due to recent rains, water has pooled in various places in Farmer John's field, which is repr…
E. e-Government time limit per test:1 second memory limit per test:256 megabytes input:standard input output:standard output The best programmers of Embezzland compete to develop a part of the project called "e-Government" — the system of automa…
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 3192 Accepted Submission(s): 371 Problem Description You are given a rooted tree of N nodes, labeled from 1 to N. To the ith node a non-negat…
题目 Source http://acm.hdu.edu.cn/showproblem.php?pid=5937 Description Little Ruins is a studious boy, recently he learned addition operation! He was rewarded some number bricks of 1 to 9 and infinity bricks of addition mark '+' and equal mark '='. Now…