摘要: 1 #include <iostream> 2 using namespace std; 3 4 const int MaxSize = 10; //图中最多顶点个数 5 int visited[MaxSize] = { 0 }; //全局数组变量visited初始化 6 7 class MGrap 阅读全文
posted @ 2020-12-16 23:40 丁帅帅dss 阅读(739) 评论(0) 推荐(0)
摘要: 1 //约瑟夫环 2 #include <iostream> 3 using namespace std; 4 struct list 5 { 6 int number; 7 list *next; 8 }; 9 int main() 10 { 11 list *head, *s, *p, *q; 阅读全文
posted @ 2020-12-16 23:13 丁帅帅dss 阅读(70) 评论(0) 推荐(0)
摘要: 1 //折半查找 2 #include<iostream> 3 #include <algorithm> 4 using namespace std; 5 int zheban(int a[], int n, int k) 6 { 7 int low = 1, high = n - 1, mid; 阅读全文
posted @ 2020-12-16 00:04 丁帅帅dss 阅读(71) 评论(0) 推荐(0)