已知稀疏矩阵采用带行表的三元组表表示,其形式说明如下:
define MaxRow 100 //稀疏矩阵的最大行数
typedef struct{
int i,j,v; //行号、列号、元素值
}TriTupleNode;
typedef struct{
TriTupleNode data[MaxSize];
int RowTab[MaxRow+1]; //行表
int m,n,t; //矩阵的行数、列数和非零元个数
}RTriTupleTable; 下列算法f31的功能是,以行优先的顺序输入稀疏矩阵的非零元(行号、列号、元素值),建立稀疏矩阵的带行表的三元组表存储结构。请在空缺处填入合适内容,使其成为一个完整的算法。(注:矩阵的行、列下标均从1起计)
void f31(RTriTupleTable*R)
{ int i,k;
scanf("%d%d%d",&R—>m,&R—>n,&LR—>t);
R—>RowTab[1]=0;
k=1; //k指示当前输入的非零元的行号
for(i=0;[ ① ];i++)
{ scanf("%d%d%d",[ ② ],[ ③ ],&R—>data[i].v);
while(k<R->data[i].i)
{[ ④ ];
R—>RowTab[k]=i;
}
}
}
查看答案
数学史有助于数学课程内容的安排,可以培养学生的远见卓识。 ()
阿道尔夫·第斯多惠认为唯有有教养的人才能领会兴趣。 ()
听力原文: Traveling with Australian Airlines just got easier with the expansion of E-ticketing and online booking.
Australian Airlines Chief Executive Andrea Staines believed that easy access to flight schedules, bookings and ticketing was important to customers.
Customers will be issued with E-tickets rather than traditional paper tickets when booking directly with the airline or with their local travel agent for travel to and from all Australian Airlines ports, except Singapore.
E-tickets give customers the convenience of making a booking over the phone, through their travel agent or online with no paper ticket to collect. It saves customers a lot of time and trouble.
Customers can just walk into almost any travel agent in Australia and be issued with an E-ticket for Australian Airlines flights to some big cities like Sydney, Melbourne, the Gold Coast, Cairns, Darwin, Osaka, Hong Kong or Bali.
It also makes life easier for travel agents -- a majority of whom use the Amadeus, Galileo, Apollo, Sabre or Abacus reservation systems -- who can now issue E-tickets for Australian Airlines flights or a combination of Australian Airlines and Qantas destinations where E-ticketing is available. Chances of making errors decrease to a large extent.
The second major enhancement is the ability to book online for flights between Australian cities in the airline's network. Travelers can travel by plane from one place to another without worrying about their tickets.
It's essential these days for the clever traveler to have the ability to book competitive domestic fares, and international fares, online via Australian airlines, com at any time of the day or night. It offers travelers a great variety of options to choose airlines, departure and arrival time. Travelers may also have the options of flying with Australian Airlines between Sydney and Cairns, Melbourne and Sydney, the Gold Coast and Cairns and, from May 2004, Darwin and Cairns. All these flights depart from the international terminal.
?Look at the notes about online booking of Australian Airlines.
?Some information is missing.
?You will hear part of a presentation by the officer from Australian Airlines.
?For each question 16-22, fill in the missing information in the numbered space using one or two words.
?You will hear the presentation twice.
Online Booking
E-tickets
available with (16) airlines or ______
bring (17) ______
enable customers to go to (18) many ______
decrease chances of (19) ______
enable travelers to
book in the (20) airline's ______
book competitive (21) ______
offer many (22) ______
(16)