H - Solve this interesting problem Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 5323 Appoint description: System Crawler (2015-07-28) Description Have you learned something about segment tr…
Have you learned something about segment tree? If not, don't worry, I will explain it for you. Segment Tree is a kind of binary tree, it can be defined as this: - For each node u in Segment Tree, u has two values: $L_u$ and $R_u$. - If $L_u = R_u$…
MZL's Border Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 909 Accepted Submission(s): 297 Problem Description As is known to all, MZL is an extraordinarily lovely girl. One day, MZL was playing…
#include <cstdio> #include <iostream> #include <cstring> #include <queue> #include <vector> using namespace std; #define INF 0x7fffffff struct edge { int t; long long d; }; vector<edge> g[20005]; int n, m, p, q; void Sp…
#include <cstdio> #include <iostream> #include <cstring> using namespace std; const int INF = 0x3fffffff; int g[1005][1005]; int m; void Floyd() { int i, j, k; for (k=1;k<=m;k++) { for (i=1;i<=m;i++) { for (j=1;j<=m;j++) { if (g…
#include <cstdio> #include <iostream> #include <cstring> using namespace std; const int INF = 0x3fffffff; int g[1005][1005]; int m; int Dijkstra(int s,int t) { bool visit[1005]; int dis[1005]; for(int i = 1; i <= m; ++i) { visit[i] =…
D - Painter Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 5319 Appoint description: Description Mr. Hdu is an painter, as we all know, painters need ideas to innovate , one day, he got stuck in rut an…