题目链接 Problem Description A while ago I had trouble sleeping. I used to lie awake, staring at the ceiling, for hours and hours. Then one day my grandmother suggested I tried counting sheep after I'd gone to bed. As always when my grandmother suggests…
Counting Sheep Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2060 Accepted Submission(s): 1359 Problem Description A while ago I had trouble sleeping. I used to lie awake, staring at the c…
[题目链接:HDOJ-2952] Counting Sheep Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2476 Accepted Submission(s): 1621 Problem Description A while ago I had trouble sleeping. I used to lie awake,…
Counting sheep... Description: Consider an array of sheep where some sheep may be missing from their place. We need a function that counts the number of sheep present in the array (true means present). For example, [true, true, true, false, true, tru…
Counting Sheep Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 14 Accepted Submission(s) : 12 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description A while ago I had trou…
HDU 3046 Pleasant sheep and big big wolf 题目链接 题意:一个n * m平面上,1是羊.2是狼,问最少要多少围墙才干把狼所有围住,每有到达羊的路径 思路:有羊和狼.要分成两个集合互不可达.显然的最小割.建图源点连狼,容量无穷,羊连汇点,容量无穷.然后相邻格子连边.容量为1 代码: #include <cstdio> #include <cstring> #include <queue> #include <algorithm…
HDU 5862 Counting Intersections(离散化+树状数组) 题目链接http://acm.split.hdu.edu.cn/showproblem.php?pid=5862 Description Given some segments which are paralleled to the coordinate axis. You need to count the number of their intersection. The input data guarant…
Counting Sheep Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 35 Accepted Submission(s) : 24 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description A while ago I had trou…