导航菜单
首页 >  » 正文

蓝桥杯web组真题 求蓝桥杯真题,答案及编译器

ltstdio.hgt
#define SIZE 100

struct data
{
unsigned long height
unsigned long time
unsigned long angry
}

struct data children[SIZE]
struct data temp

int main()
{
unsigned number=0,total_angry=0
unsigned i,out,in//for loop
scanf("%lu",ampnumber)

for(i=0iltnumberi )
for(in=0inltnumber-1-outin )
if(children[in].heightgtchildren[in 1].height)
{
temp=children[in]
children[in]=children[in 1]
children[in 1]=temp

children[in].angry = children[in].time
children[in 1].angry = children[in 1].time
}

for(i=0iltnumberi )
total_angry =children[i].angry

printf("%lu",total_angry)
return 0
}

这是C的代码,我手动算的答案是对的。但就是卡在评测系统那里了。。。。。

相关推荐: