Skip to content

Conversation

@TakumiHirose11
Copy link

No description provided.

Copy link

@nanashima nanashima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array.c apple.c spear.c が正しく動いていません.

src/array.c Outdated
}


lb=0;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

初期値が不適切です.

src/spear.c Outdated


lb=0;
ub=1000000000;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

初期値が不適切です.

@TakumiHirose11
Copy link
Author

修正しました。

Copy link

@nanashima nanashima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

基礎課題が全て正しい答えを返していないです.
(ざっくり見て気付けた点のみコメントしました.)



lb=-1;
ub=n+1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

初期値が不適切です.

for (int t=0;t<n;t++){
res+=(A[t]+x-1)/x;
}
return res;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここはなにか真偽値を返すべきなのでは?

}


lb=-1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lbの初期値が改善できます.(number_of_spearでゼロ割が起こります.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants