[题目链接: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,…
--------------------------------------------- 这道题有点坑,也怪我总是有点马虎,按照正常人的思维0是表示有水池啊竟然是1表示有水池,最坑的是写反了竟然还能过样例一直以为是自己程序问题review了好多遍.... 图论基础题,染色法即可. AC代码: import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new…