摘要: #include "stdio.h" /* 5 5 2 3 2 1 2 -3 1 5 5 4 5 2 3 4 3 0 -3 2 -1 2 4 */ int main() { int a[10][10],dis[10],book[10], u[10], v[10], w[10] ,n, m; int 阅读全文
posted @ 2021-04-17 14:53 荣荣荣荣荣荣 阅读(46) 评论(0) 推荐(0)
摘要: 并查集 - 擒贼先擒王 #include "stdio.h" int f[1005], n, m; void init(){ int i; for(i = 1; i <= n; i++){ f[i] = i; } } int find(int x){ if(f[x] == x)return x; e 阅读全文
posted @ 2021-04-17 14:47 荣荣荣荣荣荣 阅读(31) 评论(0) 推荐(0)
摘要: #include <stdio.h> #define Max(x, y) x > y ? x : y; #define Min(x, y) x > y ? y : x; int n, m, ans = -99999; int a[405][405], sum[405][405]; int main( 阅读全文
posted @ 2021-04-17 14:46 荣荣荣荣荣荣 阅读(125) 评论(0) 推荐(0)