Skip to content
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

課題2 #161

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

課題2 #161

wants to merge 8 commits into from

Conversation

mina1102
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.

apple.c spear.c works.c が正しくありません.
もう一度確認してみてください.

@mina1102
Copy link
Author

mina1102 commented Jul 8, 2022

ターミナルから変更ができなくて、giyhubに直接アップロードしたのですが、新しいものはプルリクエストされているでしょうか?よろしくお願いします。work.cはまだわからないので出来次第提出します。

@nanashima
Copy link

変更はちゃんと反映されています.

@mina1102
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.

apple spear workが正しい答えを返していないです.
またspearは計算時間かかりすぎてます.資料を参考に計算量を改善してください.

src/apple.c Outdated
return m;
else if (l>r)
return m+1;
else if (a[m]<x)

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);

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(){

Choose a reason for hiding this comment

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

ちょっと追えませんでした.
これは二分探索ですか?

else{
lb = mid;
}
}

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];

Choose a reason for hiding this comment

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

pの中身だったりlb ubの初期値だったり色々怪しそうです.

@mina1102
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.

appleは正しい答えを返していないです(おそらく資料中のケースでも)
spearworksはコンパイルエラー出てます.

@mina1102
Copy link
Author

mina1102 commented Aug 5, 2022

何度もすみません。一応自分のパソコン上では正しくできたものです。お願いします。

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