poj
wlh1998
这个作者很懒,什么都没留下…
展开
-
POJ 3233 Matrix Power Series
//数据小于32768 #include #include #include using namespace std; const int maxn = 40; typedef long long ll; struct Mat { int mat[maxn][maxn]; int row,col; }; Mat mod_add(Mat a, Mat b, int p){ Mat ans原创 2017-07-20 18:36:03 · 145 阅读 · 0 评论 -
POJ 2431 Expedition
#include #include #include #include using namespace std; const int maxn = 3e4+5; struct node{ int dis; int fue; bool operator< (const node&I)const { //按照fue由da到xiao排列 return I.fue > fue; } };原创 2017-07-20 20:32:30 · 201 阅读 · 0 评论 -
POJ 1979 Red and Black
#include #include #include using namespace std; const int maxn = 1e3; char mp[maxn][maxn]; int vis[maxn][maxn]; int dx[10] = {0,0,-1,1,1,1,-1,-1}; int dy[10] = {1,-1,0,0,-1,1,-1,1}; struct node{ int原创 2017-07-21 15:35:09 · 143 阅读 · 0 评论 -
poj 2377Bad Cowtractors
#include #include const int INF = 0x3f3f3f3f; const int maxn = 1e3; int mp[maxn][maxn]; // 存图; int vis[maxn]; //是否在新图内; int dis[maxn]; //第i个顶点到新图最短距离; int prim(int n); int n,m; int main (){ i原创 2017-07-24 20:45:30 · 172 阅读 · 0 评论