涉及知识点

1.拓扑排序
2.Dijkstra求最短路
3.Dijkstra变形
4.Bellman_Ford算法

题目

1.拓扑排序

描述
由于今天上课的老师讲的特别无聊,小Hi和小Ho偷偷地聊了起来。小Ho:小Hi,你这学期有选什么课么?小Hi:挺多的,比如XXX1,XXX2还有XXX3。本来想选YYY2的,但是好像没有先选过YYY1,不能选YYY2。小Ho:先修课程真是个麻烦的东西呢。小Hi:没错呢。好多课程都有先修课程,每次选课之前都得先查查有没有先修。教务公布的先修课程记录都是好多年前的,不但有重复的信息,好像很多都不正确了。小Ho:课程太多了,教务也没法整理吧。他们也没法一个一个确认有没有写错。小Hi:这不正是轮到小Ho你出马的时候了么!小Ho:哎??我们都知道大学的课程是可以自己选择的,每一个学期可以自由选择打算学习的课程。唯一限制我们选课是一些课程之间的顺序关系:有的难度很大的课程可能会有一些前置课程的要求。比如课程A是课程B的前置课程,则要求先学习完A课程,才可以选择B课程。大学的教务收集了所有课程的顺序关系,但由于系统故障,可能有一些信息出现了错误。现在小Ho把信息都告诉你,请你帮小Ho判断一下这些信息是否有误。错误的信息主要是指出现了"课程A是课程B的前置课程,同时课程B也是课程A的前置课程"这样的情况。当然"课程A是课程B的前置课程,课程B是课程C的前置课程,课程C是课程A的前置课程"这类也是错误的。提示:拓扑排序×
提示:拓扑排序
小Ho拿出纸笔边画边说道:如果把每一门课程看作一个点,那么顺序关系也就是一条有向边了。错误的情况也就是出现了环。我知道了!这次我们要做的是判定一个有向图是否有环。小Hi:小Ho你有什么想法么?<小Ho思考了一会儿>小Ho:一个直观的算法就是每次删除一个入度为0的点,直到没有入度为0的点为止。如果这时还有点没被删除,这些没被删除的点至少组成一个环;反之如果所有点都被删除了,则有向图中一定没有环。小Hi:Good Job!那赶快去写代码吧!小Ho又思考了一会儿,挠了挠头说:每次删除一个点之后都要找出当前入度为0的点,这一步我没想到高效的方法。通过扫描一遍剩余的边可以找所有出当前入度为0的点,但是每次删除一个节点之后都扫描一遍的话复杂度很高。小Hi赞许道:看来你已经养成写代码前分析复杂度的意识了!这里确实需要一些实现技巧,才能把复杂度降为O(N+M),其中N和M分别代表点数和边数。我给你一个提示:如果我们能维护每个点的入度值,也就是在删除点的同时更新受影响的点的入度值,那么是不是就能快速找出入度为0的点了呢?小Ho:我明白了,这个问题可以这样来解决:1. 计算每一个点的入度值deg[i],这一步需要扫描所有点和边,复杂度O(N+M)。2. 把入度为0的点加入队列Q中,当然有可能存在多个入度为0的点,同时它们之间也不会存在连接关系,所以按照任意顺序加入Q都是可以的。3. 从Q中取出一个点p。对于每一个未删除且与p相连的点q,deg[q] = deg[q] - 1;如果deg[q]==0,把q加入Q。4. 不断重复第3步,直到Q为空。最后剩下的未被删除的点,也就是组成环的点了。小Hi:没错。这一过程就叫做拓扑排序。小Ho:我懂了。我这就去实现它!< 十分钟之后 >小Ho:小Hi,不好了,我的程序写好之后编译就出诡异错误了!小Hi:诡异错误?让我看看。小Hi凑近电脑屏幕看了看小Ho的源代码,只见小Ho写了如下的代码:int edge[ MAXN ][ MAXN ];
小Hi:小Ho,你有理解这题的数据范围么?小Ho:N最大等于10万啊,怎么了?小Hi:你的数组有10万乘上10万,也就是100亿了。算上一个int为4个字节,这也得400亿字节,将近40G了呢。小Ho:啊?!那我应该怎么?QAQ小Hi:这里就教你一个小技巧好了:这道题目中N的数据范围在10万,若采用邻接矩阵的方式来储存数据显然是会内存溢出。而且每次枚举一个点时也可能会因为枚举过多无用的而导致超时。因此在这道题目中我们需要采用邻接表的方式来储存我们的数据:常见的邻接表大多是使用的指针来进行元素的串联,其实我们可以通过数组来模拟这一过程。int head[ MAXN + 1] = {0}; // 表示头指针,初始化为0
int p[ MAXM + 1];      // 表示指向的节点
int next[ MAXM + 1] = {0};    // 模拟指针,初始化为0
int edgecnt;            // 记录边的数量void addedge(int u, int v) {   // 添加边(u,v)++edgecnt;p[ edgecnt ] = v;next[ edgecnt ] = head[u];head[u] = edgecnt;
}// 枚举边的过程,u为起始点
for (int i = head[u]; i; i = next[i]) {v = p[i];...
}
小Ho:原来还有这种办法啊?好咧。我这就去改进我的算法=v=Close
输入
第1行:1个整数T,表示数据的组数T(1 <= T <= 5)
接下来T组数据按照以下格式:
第1行:2个整数,N,M。N表示课程总数量,课程编号为1..N。M表示顺序关系的数量。1 <= N <= 100,000. 1 <= M <= 500,000
第2..M+1行:每行2个整数,A,B。表示课程A是课程B的前置课程。输出
第1..T行:每行1个字符串,若该组信息无误,输出"Correct",若该组信息有误,输出"Wrong"。Sample Input
2
2 2
1 2
2 1
3 2
1 2
1 3
Sample Output
Wrong
Correct

分析:用一个需要判环的spfa算法解题

//#pragma GCC optimize(2)
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<string>
#include<algorithm>
#include<cmath>
#include<queue>
#include<vector>
#include<map>
#include<stack>
#include<set>
#include<bitset>
#include<ctime>
#include<cstring>
#include<list>
#define ll long long
#define ull unsigned long long
#define INF 0x3f3f3f3f
#define mem(a,b) memset(a,b,sizeof(a))
using namespace std;
typedef  pair<int, int> PII;
const int N = 1e6 + 7;int t, n, m;
int e[N], ne[N], h[N], id = 1;
int d[N];
int ch[N];
void add(int a, int b)
{e[id] = b;ne[id] = h[a];h[a] = id;id++;d[b]++;
}void topo()
{int sum = 0;queue<int>q;for (int i = 1; i <= n; i++){if (d[i] == 0)q.push(i),ch[i]=true,sum++;}while (!q.empty()){int te = q.front();q.pop();for (int j = h[te]; j != -1; j = ne[j]){int k = e[j];if (!ch[k]){ch[k] = true;q.push(k);sum++;}}}if (sum == n)cout << "Correct" << endl;elsecout << "Wrong" << endl;
}void solve()
{cin >> t;while (t--){mem(h, -1);mem(e, 0);mem(ne, 0);mem(d, 0);id = 1;cin >> n >> m;for (int i = 0; i < m; i++){int a, b;cin >> a >> b;add(a, b);}topo();}
}int main()
{std::ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);solve();return 0;
}

2.MPI Maelstrom

BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hierarchical communication subsystem. Valentine McKee's research advisor, Jack Swigert, has asked her to benchmark the new system.
``Since the Apollo is a distributed shared memory machine, memory access and communication times are not uniform,'' Valentine told Swigert. ``Communication is fast between processors that share the same memory subsystem, but it is slower between processors that are not on the same subsystem. Communication between the Apollo and machines in our lab is slower yet.''``How is Apollo's port of the Message Passing Interface (MPI) working out?'' Swigert asked.``Not so well,'' Valentine replied. ``To do a broadcast of a message from one processor to all the other n-1 processors, they just do a sequence of n-1 sends. That really serializes things and kills the performance.''``Is there anything you can do to fix that?''``Yes,'' smiled Valentine. ``There is. Once the first processor has sent the message to another, those two can then send messages to two other hosts at the same time. Then there will be four hosts that can send, and so on.''``Ah, so you can do the broadcast as a binary tree!''``Not really a binary tree -- there are some particular features of our network that we should exploit. The interface cards we have allow each processor to simultaneously send messages to any number of the other processors connected to it. However, the messages don't necessarily arrive at the destinations at the same time -- there is a communication cost involved. In general, we need to take into account the communication costs for each link in our network topologies and plan accordingly to minimize the total time required to do a broadcast.''
Input
The input will describe the topology of a network connecting n processors. The first line of the input will be n, the number of processors, such that 1 <= n <= 100.The rest of the input defines an adjacency matrix, A. The adjacency matrix is square and of size n x n. Each of its entries will be either an integer or the character x. The value of A(i,j) indicates the expense of sending a message directly from node i to node j. A value of x for A(i,j) indicates that a message cannot be sent directly from node i to node j.Note that for a node to send a message to itself does not require network communication, so A(i,i) = 0 for 1 <= i <= n. Also, you may assume that the network is undirected (messages can go in either direction with equal overhead), so that A(i,j) = A(j,i). Thus only the entries on the (strictly) lower triangular portion of A will be supplied.The input to your program will be the lower triangular section of A. That is, the second line of input will contain one entry, A(2,1). The next line will contain two entries, A(3,1) and A(3,2), and so on.
Output
Your program should output the minimum communication time required to broadcast a message from the first processor to all the other processors.
Sample Input
5
50
30 5
100 20 50
10 x x 10
Sample Output
35

题目大意:
实验室有很多台计算机,由于每个人计算机的性能不同,导致计算机之间发送信息的速度不同,所以花费时间不同。

消息从第一台电脑发送到第二台电脑后,这两台电脑能再向其他电脑发送消息,就是一种类似二叉树的结构。
当然并不是真正的二叉树——我们的计算机有一些特殊的特性,我们应该加以利用。
我们的计算机允许同时向连接到它的任意数量的其他计算机发送消息。
然而,消息不一定同时到达目的地——这涉及到计算机配置。

一般来说,我们需要考虑到拓扑结构中每个计算机的时间成本,并相应地计划将消息传播所需的总时间降到最低。
涂爷需要经常给其他人发消息,她想要知道如果她发出一个消息,至少要等多久全部的人才可以都收到通知

Input

第一行输入一个n,表示有多少台计算机(涂爷当然是一号机啦~)。
随后n-1行,以邻接矩阵的形式给出计算机(1~n)之间通讯需要的时间。
由于两台计算机相互通信时间相等,且计算机自己和自己不需要通信,所以只给出了矩阵的下三角。
ps:x表示由于部分计算机之间存在特殊的磁场并不能通信。
ps2:该题所有数据范围0~100。

题目分析:求最短路的最大值

//#pragma GCC optimize(2)
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<string>
#include<algorithm>
#include<cmath>
#include<queue>
#include<vector>
#include<map>
#include<stack>
#include<set>
#include<bitset>
#include<ctime>
#include<cstring>
#include<list>
#define ll long long
#define ull unsigned long long
#define INF 0x3f3f3f3f
#define mem(a,b) memset(a,b,sizeof(a))
using namespace std;
typedef  pair<int, int> PII;#define MAXN 100 + 2int V, E;
int w[MAXN][MAXN];
int vis[MAXN], dis[MAXN];int input() {                     //手写读入函数string str;cin>>str;if (str=="x") return INF;       //'x'代表两点无路径,用INF表示else {int ans = 0;int len = str.size();for (int i = 0; i < len; i++) {ans = ans * 10 + str[i] - '0';}return ans;}
}void dijkstra() {                         //dijkstra函数memset(vis, 0, sizeof(vis));         //预处理for (int i = 1; i <= V; i++) dis[i] = (i == 1 ? 0 : INF);for (int i = 1; i <= V; i++) {         //dijkstraint x, m = INF;for (int y = 1; y <= V; y++)if (!vis[y] && dis[y] <= m) {x = y;m = dis[x];}vis[x] = 1;for (int y = 1; y <= V; y++) dis[y] = min(dis[y], dis[x] + w[x][y]);         //松弛操作   }
}void solve()
{while (cin>>V) {for (int i = 1; i <= V; i++)         //读入数据for (int j = 1; j <= i; j++) {if (i == j) w[i][j] = 0;else  w[j][i] = w[i][j] = input();}dijkstra();                    //处理int ans = -INF;                //找其中的最大跳跃高度for (int i = 1; i <= V; i++) {if (ans < dis[i]) ans = dis[i];}printf("%d\n", ans);}}int main()
{//std::ios::sync_with_stdio(false);//cin.tie(0), cout.tie(0);solve();return 0;
}

3.Heavy Transportation

Background
Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his customer has build his giant steel crane to the place where it is needed on which all streets can carry the weight.
Fortunately he already has a plan of the city with all streets and bridges and all the allowed weights.Unfortunately he has no idea how to find the the maximum weight capacity in order to tell his customer how heavy the crane may become. But you surely know.Problem
You are given the plan of the city, described by the streets (with weight limits) between the crossings, which are numbered from 1 to n. Your task is to find the maximum weight that can be transported from crossing 1 (Hugo's place) to crossing n (the customer's place). You may assume that there is at least one path. All streets can be travelled in both directions.
Input
The first line contains the number of scenarios (city plans). For each city the number n of street crossings (1 <= n <= 1000) and number m of streets are given on the first line. The following m lines contain triples of integers specifying start and end crossing of the street and the maximum allowed weight, which is positive and not larger than 1000000. There will be at most one street between each pair of crossings.
Output
The output for every scenario begins with a line containing "Scenario #i:", where i is the number of the scenario starting at 1. Then print a single line containing the maximum allowed weight that Hugo can transport to the customer. Terminate the output for the scenario with a blank line.
Sample Input
1
3 3
1 2 3
1 3 4
2 3 5
Sample Output
Scenario #1:
4

题目大意:城市由公路连接,公路有不同的限重,问从起点到终点最大可以开多重的车。

注意:要关同步流,或者用scanf,否则会tle,以及注意输出格式

//#pragma GCC optimize(2)
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<string>
#include<algorithm>
#include<cmath>
#include<queue>
#include<vector>
#include<map>
#include<stack>
#include<set>
#include<bitset>
#include<ctime>
#include<cstring>
#include<list>
#define ll long long
#define ull unsigned long long
#define INF 0x3f3f3f3f
#define mem(a,b) memset(a,b,sizeof(a))
using namespace std;
typedef  pair<int, int> PII;
const int N = 1e6 + 7;
int t;
int n, m;
int dis[1111];
bool ch[1111];
int ma[1111][1111];void dijkstra(int s)
{mem(ch, 0);for (int i = 1; i <= n; i++)dis[i] = ma[s][i];for (int i = 1; i <= n; i++){int ans = 0;int v = 0;for (int j = 1; j <= n; j++){if (!ch[j] && dis[j] > ans){ans = dis[j];v = j;}}ch[v] = true;for (int j = 1; j <= n; j++)dis[j] = max(dis[j], min(dis[v], ma[v][j]));}
}void solve()
{cin >> t;for (int k = 1; k <= t; k++){mem(ma, 0);cin >> n >> m;for (int i = 0; i < m; i++){int a, b, c;cin >> a >> b >> c;if(c>0)ma[a][b] = ma[b][a] = c;}dijkstra(1);cout << "Scenario #" << k << ':' << endl;cout << dis[n] << endl;cout << endl;}
}int main()
{std::ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);solve();return 0;
}

4.Currency Exchange

Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. There can be several points specializing in the same pair of currencies. Each point has its own exchange rates, exchange rate of A to B is the quantity of B you get for 1A. Also each exchange point has some commission, the sum you have to pay for your exchange operation. Commission is always collected in source currency.
For example, if you want to exchange 100 US Dollars into Russian Rubles at the exchange point, where the exchange rate is 29.75, and the commission is 0.39 you will get (100 - 0.39) * 29.75 = 2963.3975RUR.
You surely know that there are N different currencies you can deal with in our city. Let us assign unique integer number from 1 to N to each currency. Then each exchange point can be described with 6 numbers: integer A and B - numbers of currencies it exchanges, and real RAB, CAB, RBA and CBA - exchange rates and commissions when exchanging A to B and B to A respectively.
Nick has some money in currency S and wonders if he can somehow, after some exchange operations, increase his capital. Of course, he wants to have his money in currency S in the end. Help him to answer this difficult question. Nick must always have non-negative sum of money while making his operations.
Input
The first line of the input contains four numbers: N - the number of currencies, M - the number of exchange points, S - the number of currency Nick has and V - the quantity of currency units he has. The following M lines contain 6 numbers each - the description of the corresponding exchange point - in specified above order. Numbers are separated by one or more spaces. 1<=S<=N<=100, 1<=M<=100, V is real number, 0<=V<=103.
For each point exchange rates and commissions are real, given with at most two digits after the decimal point, 10-2<=rate<=102, 0<=commission<=102.
Let us call some sequence of the exchange operations simple if no exchange point is used more than once in this sequence. You may assume that ratio of the numeric values of the sums at the end and at the beginning of any simple sequence of the exchange operations will be less than 104.
Output
If Nick can increase his wealth, output YES, in other case output NO to the output file.
Sample Input
3 2 1 20.0
1 2 1.00 1.00 1.00 1.00
2 3 1.10 1.00 1.10 1.00
Sample Output
YES

题目大意:有n种货币,m个货币交易点。每个交易点只能进行2种货币的兑换,有汇率和手续费。问你能否通过这些交易点让你的钱变多。

//#pragma GCC optimize(2)
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<string>
#include<algorithm>
#include<cmath>
#include<queue>
#include<vector>
#include<map>
#include<stack>
#include<set>
#include<bitset>
#include<ctime>
#include<cstring>
#include<list>
#define ll long long
#define ull unsigned long long
#define INF 0x3f3f3f3f
#define mem(a,b) memset(a,b,sizeof(a))
using namespace std;
typedef  pair<int, int> PII;
const int N = 1e6 + 7;
bool flag = false;struct node
{int a, b;double r, c;
}p[205];
int n, m, s;
double v, dis[100];void Bellman_Ford()
{mem(dis, 0);dis[s] = v;for (int i = 1; i <= n; i++){for (int j = 1; j <= 2 * m; j++){double w = (dis[p[j].a] - p[j].c) * p[j].r;if (w > dis[p[j].b]) dis[p[j].b] = w;}}for (int j = 1; j <= 2 * m; j++){double w = (dis[p[j].a] - p[j].c) * p[j].r;if (w > dis[p[j].b]) flag=true;}
}void solve()
{cin >> n >> m >> s >> v;for (int i = 1; i <= m; i++){int a, b;double r1, c1, r2, c2;cin >> a >> b >> r1 >> c1 >> r2 >> c2;p[i].a = a, p[i].b = b, p[i].r = r1, p[i].c = c1;p[i + m].a = b, p[i + m].b = a, p[i + m].r = r2, p[i + m].c = c2;}Bellman_Ford();if (flag)cout << "YES" << endl;elsecout << "NO" << endl;
}int main()
{std::ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);solve();return 0;
}

作者:Avalon·Demerzel

【解题报告】图论基础练习(一)相关推荐

  1. 解题报告——试题 基础练习 分解质因数——31行代码AC

    励志用少的代码做高效的表达 储备知识: 1.预处理: 预处理的意思是将可能用到的数据先行处理,形成一张表,如果想要调用某个数,直接去表里查找. 2.筛选法: 筛选法是预处理的一种. 一般用筛选法来求某 ...

  2. 【解题报告】2021牛客寒假算法基础集训营4

    [解题报告]2021牛客寒假算法基础集训营4 前面的话 A :九峰与签到题 | 模拟 (签到题) B: 武辰延的字符串 | exKMP D :温澈滢的狗狗 | 二分 E: 九峰与子序列 | d p d ...

  3. 程序设计算法竞赛基础——练习2解题报告

    程序设计算法竞赛基础--练习2解题报告 1001 sort Problem Description 给你n个整数,请按从大到小的顺序输出其中前m大的数. Input 每组测试数据有两行,第一行有两个数 ...

  4. 【解题报告】《LeetCode零基础指南》(第三讲) 循环

    ☘前言☘ 今天是九日集训第二天,我会记录一下学习内容和题解,争当课代表0.0. 注意!!!!题解的解法一是今天要掌握的解法,解法2是学有余力再研究,涉及到后面知识点0.0 链接:<LeetCod ...

  5. 洛谷【C++编程基础】递归函数初步 专题解题报告

    洛谷[C++编程基础]递归函数初步 专题解题报告 T1-T89304 递归求和 题目描述 用递归的方法求1+2+3+4+-+(n-1)+n的值. 输入格式 一个整数n.(1<=n<=100 ...

  6. 解题报告:线性规划与网络流24题

    目录 A.飞行员配对方案问题 (二分图最大匹配)(最大流)[提高+/省选- ] B.太空飞行计划问题(最大权闭合图转最小割.最小割方案输出)[省选/NOI- ] C.最小路径覆盖问题(有向无环图最小路 ...

  7. 2015 CQU 重庆大学程序设计竞赛 解题报告

    前言 儿童节快乐~~ 啊对了首先想带标程回家看的可以来这里:教主大大标程包 /我的现场赛代码 在校赛这样三人组队两台电脑的环境下,单挑的压力着实是十分之大--毕竟在同等条件下别人手速只要超过自己的一半 ...

  8. 【解题报告系列】超高质量题单 + 题解(ACM / OI)超高质量题解

    整理的算法模板合集: ACM模板 点我看算法全家桶系列!!! 实际上是一个全新的精炼模板整合计划 繁凡出品的全新系列:解题报告系列 -- 超高质量算法题单,配套我新写的超高质量的题解和代码,题目难度不 ...

  9. 解题报告(四)生成函数(ACM/ OI)

    整理的算法模板合集: ACM模板 点我看算法全家桶系列!!! 实际上是一个全新的精炼模板整合计划 繁凡出品的全新系列:解题报告系列 -- 超高质量算法题单,配套我写的超高质量的题解和代码,题目难度不一 ...

  10. 解题报告(一)E、(BZOJ4589)Hard Nim(博弈论 + FWT)

    繁凡出品的全新系列:解题报告系列 -- 超高质量算法题单,配套我写的超高质量题解和代码,题目难度不一定按照题号排序,我会在每道题后面加上题目难度指数(1∼51 \sim 51∼5),以模板题难度 11 ...

最新文章

  1. kettle安装部署及远程执行
  2. python图片的比例缩放、剪裁和下采样
  3. php -i | grep configure,PHP7中I/O模型内核剖析详解
  4. secure使用vi编辑远程机器文件出现4;m
  5. 测试nignx php请求并发数,nginx 优化(突破十万并发)
  6. python 添加绝对路径时用反斜杠和正斜杠的区别
  7. 如何设置打印的时候不加上页面链接_电子面单史上最全打印问题集合--【拼点管家软件】...
  8. c++ 合并2个txt_多个表达矩阵文件合并
  9. C# 启动停止SQLServer数据库服务器
  10. swift 有道 翻译文档(1 定义变量常量,数组字典)
  11. java判断 港(澳)台大陆身份证校验
  12. 职业规划-三大职业生涯阶段
  13. Prism4学习笔记(六):UI Composition
  14. springboot内嵌tomcat如何优雅开启http端口
  15. 常见apn类型说明及配置
  16. Java架构师 HR常见面试问题_Java架构师,常见的几个JEE面试问题, 感觉还是有些地方有点晕。 稀里糊涂,晒一下...
  17. nginx某条日志详解
  18. 输入一个字符串转换成十进制整数
  19. java--类单继承多实现,接口多继承
  20. 卸载 ibus 使Ubuntu16.04任务栏与桌面图标消失

热门文章

  1. WebSocket+HTML5实现在线聊天室
  2. ado.net 实体类_数据访问类
  3. CodeForces 650A Watchmen
  4. [C#]Main(String[] args)参数输入问题
  5. Android学习---解决Android Graphical Layout 界面效果不显示
  6. quartz job基本运用
  7. mysql 5.7.14 在 windows 下的配置
  8. 美图个性化推荐的实践与探索
  9. java中String的特点,字面对象和构造方法的区别
  10. ios 团购信息客户端demo(二)