哪位大牛幫我看一下是哪兒錯了?

include

include

using namespace std;

struct Speed {

int num;

int maxspeed,minspeed;

};

int n,v,k;

Speed a[1000];

void printwrong()

{

coutv>>k;

for(int i=2;i>a[i].num;

}

void function()

{

a[1].maxspeed=a[1].minspeed=v;

for(int i=2;ia.minspeed) a[i].minspeed=a[i].num;

else a[i].minspeed=a.minspeed;

if (a.maxspeed>a[i].num+k+1) printwrong();

else if (a.maxspeed+1=2;i--) {

if (v+1>=a[i].minspeed&&v+1=a[i].minspeed&&v=a[i].minspeed&&v-1

2 条评论

  • 1

信息

ID
1594
难度
6
分类
动态规划 点击显示
标签
递交数
1057
已通过
318
通过率
30%
被复制
3
上传者