Ideal Path Time Limit: 10000MS Memory Limit: 65536K Total Submissions: 1754 Accepted: 240 Description New labyrinth attraction is open in New Lostland amusement park. The labyrinth consists of n rooms connected by m passages. Each passage is colo…
Problem UVA1599-Ideal Path Time Limit: 3000 mSec Problem Description New labyrinth attraction is open in New Lostland amusement park. The labyrinth consists of n rooms connected by m passages. Each passage is colored into some color ci. Visitors of t…
http://acm.hdu.edu.cn/showproblem.php?pid=3567 Eight II Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 130000/65536 K (Java/Others)Total Submission(s): 4541 Accepted Submission(s): 990 Problem Description Eight-puzzle, which is also calle…
HDOJ 1312 Red and Black http://acm.hdu.edu.cn/showproblem.php?pid=1312 很裸的dfs,在dfs里面写上ans++,能到几个点就调了几次dfs,最后ans就是答案 #include<cstdio> #include<iostream> using namespace std; ][]; int n,m,si,sj,ans; ][] = {{,}, {-,}, {,-}, {,}}; int dfs(int x, i…
Prob.1 生活大爆炸版 石头剪刀布 模拟.代码: #include<cstdio> #include<cstring> #include<iostream> using namespace std; const int mp[5][5]={{0,0,1,1,0}, {1,0,0,1,0}, {0,1,0,0,1}, {0,0,1,0,1}, {1,1,0,0,0}}; int A[205],B[205]; int n,lA,lB,ansA,ansB; int mai…
Marriage Match II http://acm.hdu.edu.cn/showproblem.php?pid=3081 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5420 Accepted Submission(s): 1739 Problem Description Presumably, you all have…