洛谷:P2895 [USACO08FEB]Meteor Shower S(bfs,)

題目: 分析:與時間有關的變化圖,沒有任何的思路。只能想到暴力搜: 看題解,本身思惟的錯誤點在於:即便有時間點的影響,也不可能重複到達其餘的點。 代碼: #include<bits/stdc++.h> using namespace std; int A[605][605]; int D1[5]={0,-1,1,0,0}; int D2[5]={0,0,0,-1,1}; void f(int x
相關文章
相關標籤/搜索