摘要: 1 //两遍bfs 2 #include 3 4 using namespace std; 5 6 const int MAXN = 1010; 7 8 int n,m; 9 char G[MAXN][MAXN]; 10 int fire[MAXN][MAXN]; 11 int Time[MAXN][MAXN]; 12 int dir[4][2] ... 阅读全文
posted @ 2018-05-07 21:52 ouyang_wsgwz 阅读(267) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 const int maxn = 105; 9 10 char f[10][10] ={ "FILL(1)","FILL(2)","DROP(1)","DROP(2)","POUR(1,2)","POU... 阅读全文
posted @ 2018-05-07 20:25 ouyang_wsgwz 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 using namespace std; 3 4 const int maxn = 2*1e5+5; 5 vectorp[maxn]; 6 vectorc; 7 bool check[maxn]; 8 9 10 void dfs(int x) { 11 check[x] = true; 12 c.push_back(x); 13... 阅读全文
posted @ 2018-05-07 20:22 ouyang_wsgwz 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 5 const int maxn = 1e5 + 5; 6 int a[maxn]; 7 8 int main(){ 9 int t; 10 cin >> t; 11 while(t--){ 12 int n; 13 ci... 阅读全文
posted @ 2018-05-07 16:24 ouyang_wsgwz 阅读(233) 评论(0) 推荐(0) 编辑