-
Notifications
You must be signed in to change notification settings - Fork 162
課題2 #161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
課題2 #161
Conversation
nanashima
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apple.c spear.c works.c が正しくありません.
もう一度確認してみてください.
|
ターミナルから変更ができなくて、giyhubに直接アップロードしたのですが、新しいものはプルリクエストされているでしょうか?よろしくお願いします。work.cはまだわからないので出来次第提出します。 |
|
変更はちゃんと反映されています. |
|
採点よろしくお願いします |
nanashima
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apple spear workが正しい答えを返していないです.
またspearは計算時間かかりすぎてます.資料を参考に計算量を改善してください.
src/apple.c
Outdated
| return m; | ||
| else if (l>r) | ||
| return m+1; | ||
| else if (a[m]<x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
条件違うと思います.
src/apple.c
Outdated
| else if (a[m]<x) | ||
| return binary_search(a,x,m+1,r); | ||
| else | ||
| return binary_search(a, x, l,m-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここも合っているかは自信ないです.
講義や資料の方法で書いた方がいいと思います.
src/spear.c
Outdated
| return ans; | ||
| } | ||
|
|
||
| int main(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ちょっと追えませんでした.
これは二分探索ですか?
| else{ | ||
| lb = mid; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
そもそも何も出力してないです.
| @@ -4,13 +4,42 @@ int n; | |||
| int k; | |||
| int A[100000]; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pの中身だったりlb ubの初期値だったり色々怪しそうです.
|
よろしくお願いいたします。 |
nanashima
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appleは正しい答えを返していないです(おそらく資料中のケースでも)
spearとworksはコンパイルエラー出てます.
|
何度もすみません。一応自分のパソコン上では正しくできたものです。お願いします。 |
No description provided.