摘要:
临近考试,又把之前的上机的题目看了一遍,自己又尝试着敲代码,发现好多之前的代码现在看来都被自己复杂化了许多,于是把现在重写的代码再贴出来。 之前的题目和代码 "戳这里" include include using namespace std; int main() { queue q; int n; 阅读全文
摘要:
1、题目: 2、代码: include include include using namespace std; struct edge { int u; int v; int w; } e[500005]; int father[10005]; bool cmp1(edge e1,edge e2) 阅读全文
摘要:
1、题目: 2、AC代码: include include define size 1000003 //哈希表的长度,离1000000最近的素数 define n 6 struct Value{ char val; Value next; }; char name[size][n]; Value h 阅读全文
摘要:
1、题目: 2、代码: include define maxn 50007 int pre[maxn]; int que[maxn]; int m,n,k,i; int find(int x)//查找 { int t; if(x!=pre[x]) { t=pre[x]; pre[x]=find(pr 阅读全文