学年

質問の種類

情報:IT 高校生

情報:高3 [ウ]の部分がなぜ③になるのか分かりません。 iが 1〜kazu-1 になるから jは 0〜kazu-2 までは考えられたのですが、ここから kazu-2 が kazu-1-i になるのはなぜでしょうか、、教えてください🙇🏻

次の生徒 (S) と先生 (T) の会話文を読み, 空欄 ア 解答群のうちから一つずつ選べ。 キ に入れるのに最も適当なものを、後の SAG (A) (6) T:データを昇順または降順に並べ替えるアルゴリズムのことをソートといいます。まずはじめに、バブルソー トというアルゴリズムを考えてみましょう。バブルソートは、配列の中の隣り合うデータの大小を比較し交 換を繰り返す方法です。 図1は、10個の要素を持つ配列 Data に対してバブルソートを行う場合の流れを 表しています。 グラムの4258 まず、配列の先頭とその次の要素を比較し,左の方が大きければ右と交換する。これを一つずつずらしなが ら配列の最後尾まで繰り返していき、最後尾まで繰り返したら1周目の比較が終了します。 S: つまり, 1周目の比較がすべて終了した段階で、配列の最後尾にはア | が入っているのですね。 T:その通りです。 2周目は、配列のイ を除いて1周目と同じように比較していきます。 これを繰り返 して,最後には配列が並び変わっているという具合ですね。図2はバブルソートのプログラムを表してい ます。 その通りです (SI) し 配列 Data 77 52 89 48 97 3 18 62 33 29 1周目/ 1回目の比較 が配列の中 77 52 89 48 97 3 18 62 33 29 交換する 1周目/ 2回目の比較 52 77 89 48 97 3 18 62 33 29 交換しない 4357 1周目/3回目の比較 52 77 89 48 97 交換する 3 18 62 33 29 図1 配列 Data に対するバブルソートの流れ 国の (1) (2) (3) (4) (5) (6)b Data = [77,5289,48,973 18,62,33,291 kazu= 要素数 (Data) JRS pin iを1からkazu-1まで1ずつ増やしながら繰り返す: inshid jを0から ウ まで1ずつ増やしながら繰り返す: もしData[j] > Data [j + 1] ならば: hokan エ Data[j] ① <[abia] ada rabid k == [abis) stad 0000 Data(+11 Anda > (7) (8) (7) Data[j + 1] = hokan 図2 バブルソートのプログラム (hidaes mig) S:図2のプログラムだと, もし仮に最初からデータが昇順に並んでいても, 配列 Data の場合と同じ回数だけ 比較を繰り返さないといけないですよね? T:いいところに気が付きましたね。 最初から昇順に整列された配列をバブルソートすると、交換回数は オ だけど比較回数は ので効率が悪いです。 それでは, データの整列が完了した段階で繰り返 しを抜けるように図1のプログラムを修正してみましょう。 まず, 変数 koukan を用意して初期化してお きます(図3の (3) 行目)。 次に, 交換が発生した場合, 変数 koukan に 「1」 を代入するようにしましょ (図3の (10) 行目)。 さて、ここで図4のプログラムを,図3のプログラムのどこに挿入すればいいか 分かりますか? S:繰り返しが1周終わるごとに変数 koukan の値を確認する必要がありますから、 T: 正解です! よくできました。 キ だと思います。 98 第3章 コンピュータとプログラミング もし kouk

回答募集中 回答数: 0
数学 高校生

赤線部分の意味が分かりません🙇🏻‍♀️

重要 例題 57 独立な試行の確率の最大 423 00000 さいころを続けて100回投げるとき,1の目がちょうど回 (0≦k≦100) 出る確 率は 100Ck × 解答 6100 であり,この確率が最大になるのはk= のときである。 [慶応大] 基本49 かし,確率は負の値をとらないことと nCr= や階乗が多く出てくることから, 比 pk+1 (ア) 求める確率をDとする。 1の目が回出るとき,他の目が100回出る。 (イ)確率pk の最大値を直接求めることは難しい。 このようなときは,隣接する2項 k+1とかの大小を比較する。大小の比較をするときは,差をとることが多い。し n! r!(n-r)! を使うため、式の中に累乗 をとり、1との大小を比べるとよい。 þk pk Dk+11pk<D+1 (増加), pk pk+1 <1⇔pk>ph+1 (減少) CHART 確率の大小比較 Et pk+1 をとり、1との大小を比べる pk さいころを100回投げるとき, 1の目がちょうど回出る 確率を とすると 6 Dk = 100 Ck ( 11 ) * ( 5 ) 100 * = 100 Cr× 75100-k 6100 pk+1 100!.599-k ここで × pk (k+1)!(99-k)! k!(100-k)! 100!-5100-k 出 k! (100-k)(99-k)! 599-k 100-k (k+1)k! 5.59-5(k+1) (99-k)! Dk+1 > 1 とすると >1 pk 5(k+1) 両辺に 5(k+1) [0] を掛けて100k5(k+1) 10月 「反復試行の確率。 pk+1=100C(+) X 5100-k+1) 6100 ・・・の代わりに +1とおく。 2章 独立な試行・反復試行の確率 95 これを解くと k<- =15.8··· 6 よって, 0≦k≦15のとき Pr<Pk+1 は 0100 を満たす 整数である。 Dk+1 <1 とすると 100-k<5(k+1) pk pkの大きさを棒で表すと 95 これを解いて k> -=15.8・・・ 最大 (C) 増加 減少 よって, 16のとき pk> Pk+1 したがって po<かく...... <か15<16, P16> D17>>P100 2012 よって, Dr が最大になるのはk=16のときである。 15 17 16 100/ 99

回答募集中 回答数: 0
数学 高校生

こちらの空白に入る答えがわかりません、、わかる方いらっしゃいましたら教えてほしいです。お願いします

問2 太郎さんと花子さんは次の問題について話し合っている。 問題ある2次方程式の2つの解を α, β とする。 α+β=4, a2+B2=-10 で あるように2次方程式を1つ定めよ。 以下の空らんを埋め, 太郎さんと花子さんの会話を完成させよ。 太郎: x2 の係数が1であるとき, 2 数α,βを解とする2次方程式は x2+ x+ |=0であるから, αβ の値がわかればいいんだよね。 花子: αβ を求めるために, α2+2=-10 が利用できそうだね。 太郎:本当だ。α+ βを2乗すると αβ が現れるから,aβをa+β,a2+β2 を用い て表すと αβ= |だね。 花子:数値を代入すると,αβ= だね。 つまり,答えの1つは 0 だね。 太郎:他に考え方はないかな。たとえば, α+β=4 から, 実数を用いて,求める 2次方程式をx2-4x+p=0 としてみたらどうだろう。 花子:解の公式を用いると,この2次方程式の解はx=2土 となるね。 たとえばα=2+ B=2- として,α2+β2=-'v からの値を求めるのはすごく大変だよ。 太郎 : 2次方程式の解と係数の関係を用いた最初の解答は,比較的簡単な計算で解け るんだね。 花子 : 求めた2次方程式の解はx=| となることから,解の種類に関わら ず解と係数の関係が成り立つ点も便利だね。 し

回答募集中 回答数: 0
古文 高校生

答えが分かりません。お願いします。

再読文字 として一だうために、下から返って再び ことにしている文字 (4) ~(セ)ず。 - まだ~(し)ない。 A 次に返りをして、その成り立ちを示せ 将来 当然 未熟 見羊を見て。 まだ羊を見ていない。 2 を参考にして、次の各文の送り仮名を補え (4) 38 封之賞。 [三]~(セントす。 というがない。 今にも(これから)~(し)ようとする。 入 楽 引酒飲 に入らんとす。 今にも) に入ろうとしていた。 引き寄せ、今にもそれを飲もうとした。) DO なんちノ ~~ 当日(応ニ)~(1) ペシ。 ~するべきだ。(主として当 きっと~(する)であろう。(主として「応」 当 を憎むべし。 タルハ 汝遠来応有意。 ▽あなたが遠くまで私を送って来てくれたのは、きっと考えがあってのことだ ろう。 ④男児当死中 A 男子は死の危険の中にあっても生きることを求めるべきだ。) 孔子礼於老子 (火) 人はわずかな時間も惜しむべきである。 ラク~(スペシ ぜひ〜する必要がある。 孔子は隣の国に行って、礼について 老子にたずねようとした。) 大須自省察 らく自ら察すべし。 人はぜひ自分で反省してよく考える必要がある。 シクー(スペシ 〜(する)のがよろしい。 宜しく語を慎むべし。 3 次の各文を書き下し文にし、 2220訳せよ。 関中。 取其 長所。 ( 言葉を慎むのがよろしい。 ノ (スル)ガとシ ちょうど~のよう (同じだ 不及 過ぎたるは及ばざるがごとし 行き過ぎているのは、ちょうど及ばないの と同じである。 ゾ~(セ)ざん。 どうして~(し)ないのか。 (~(し)てはどうか。) (1) (1) 父也。 4 書き下し文を参考にして、次のを用いて正しい文を作り、 返り点と送り仮名 を施せ 〔少年・惜・須・時)。 ざる。 あなたはどうして このことを 言わないのか。 らく少年の時を惜しむべし。

回答募集中 回答数: 0
英語 中学生

(1)の答えがD、(3)の答えがウ、(6)の答えがイ なんですけど、なんでそれになるかと、5⃣で3~5程の段落で分けるとしたらどこになるのか、またその段落はそれぞれどんな題名になるのかを教えて欲しいですm(_ _)m

学院) E J 5 次の英文を読んで、あとの問いに答えなさい。 < 星野改〉 High schools in Minnesota have a problem Many students are late to school. They are often tired. Some students fall asleep in class. They often get sick, too. The local governments take that as a problem. They make a small change.) It helps a school day a little later/ A lot! What do they do? They start the D- This small change makes a big difference. Why? Most teens are very tired early in the morning. They usually don't go to bed until after midnight In the morning, they wake up between 6:00 and 6:30 for school. So they don't get enough sleep! They are still tired early in the morning. But after the change/ teens are more awake and later start time is better for a teen's body clock I be ready/class/to/in). A be in ready class Everyone has a body clock. An adult's body clock works like this: most adults get tired between 9:00 and 11:00 at night. They usually go to bed before midnight. Adults can get up early in the morning. It's not a problem. But a teen's body clock is different. Teens don't get tired at midnight. They usually stay up later. But early in the morning, they need more sleep. B FO C The schools in Minnesota pay attention to the teen's body clock. They change the start of the school day from 7:20 a.m. to 8:40 a.m., 80 minutes later. Other schools in the United States change their start times too. Some schools change the time by only 30 minutes, but they still get good results. ( 2 ), the results are amazing! ③(Many) students are on time. Morning classes are easier to teach. Students are getting ①(good) grades. Students have fewer illnesses, so they are ⑤(little) absent. In Minnesota, there is another important effect: fewer students drop out of school or change schools. D Today, more and more high schools are starting later. Most schools can't start two hours later. But they can change the start time a little. A small change can make a very big difference! Just ask the students. Minnesota ミネソタ (アメリカ合衆国中央北部の州) (1) 次の英文を入れるのに最も適する位置を, 本文中のA~Dから1つ選びなさい。 Now the students are happier, and also the parents and teachers too. D(A) (2)下線部①の ( )内の語を並べかえて正しい英文を作るとき, 3番目にくるものをア~エから1つ選びなさい。 ア be イ ready ウ class I to (3) 20)( )に適するものを, ア~エから1つ選びなさい。 7 On the other hand (4) 3~50)( 1 However ウ In fact I Even so )内の語をそれぞれ比較級にかえなさい。 (3) much (5)本文の内容にあうものを,ア~エから1つ選びなさい。 more (T!) better ⑤⑤ fewer Less High school students in Minnesota are always taking classes seriously. Most teens usually go to bed as early as possible. Most adults don't stay up late because of their body clocks. I Some schools changed the school time but their students did not have good grades. 本文のタイトルとして最も適するものを,ア~エから1つ選びなさい。 7 Fewer Illnesses 1 Late Start Body Clock I Good Sleep イ (土)

回答募集中 回答数: 0
英語 中学生

(1)の答えがchoosing、(2)の答えがウ、(5)の答えがアで、それぞれなんでその答えになるのかと、 5⃣の本文を上から4行、4行、5行、4行、3行、2行で分けた時それぞれに題名を付けるとしたらどうなりますか? 教えて欲しいですm(_ _)m

5 次の英文を読んで, あとの問いに答えなさい。 <川越東改> Origami is the Japanese art of folding paper. To do origami, the artist starts with a square piece of paper. Some people like to use special origami paper that is two colors. The front of the paper is one color, and the back of the paper is another color. Other people like to use origami paper that has patterns on it. After ①(choose) your paper, you can find many instructions for folding the paper into different things. Many people enjoy (make) origami flowers, animals, or things ( 3 ). For all of these things, there are a few kinds of folds that you need to use. For example, sometimes you need to fold the paper in half. Sometimes, the paper must be folded from corner to corner. If you follow the directions carefully, you can create a beautiful paper flower or animal. However, origami is more than folding paper. First, origami is an important part of Japanese life. For example, nature is important in Japan. In Japan, people care about the seasons, weather, water, or other things in nature. Origami is also a part of nature. That is why the most popular origami shapes are things like animals. Birds, fish, flowers, and stars are all popular shapes. It is a quiet activity, and can calm the mind and body. People who do origami like the activity as much as the art. They like it because origami demands a lot of attention. When people think hard about creating something, they forget about their problems. This allows them ④ to calm down. ⑤ Origami is also good for teaching children. They also learn to work carefully. Also, origami has squares and triangles. These shapes are important in all kinds of learning. Origami helps children to learn about these shapes. Maybe you can try to do origami yourself. You only need some paper and a book of instructions. You can find instructions for many origami shapes on the Internet. instruction direction (1)①,②の( )内の語を適する形にかえなさい。 (2) 30( に適するものを, ア~エから1つ選びなさい。 (3) (4) 7 to paint with 1 to talk with 1 (2) making. to play with I to help with (イ) ④に適するものを,ア~エから1つ選びなさい。 Origami is also easy to learn. 1 Origami is also good for your imagination. Origami is also difficult to learn. I Origami is also good for your mind. ⑤にはA~Cの文が入ります。 自然な流れの文章になる配列を, ア~エから1つ選びなさい。 A Children must follow these steps exactly. B First, origami has many steps. C This way, children can learn to follow instructions. ア A-B-C イ A-C-B B-A-C I B-C-A (5)本文の内容にあうものを, ア~エから1つ選びなさい。 If you follow some instructions for paper folds, you can enjoy many different origami shapes. Learning origami gives us a good chance to help animals on the earth. You may feel tired if you try hard to do origami carefully. I The most important thing for children's education is origami. (土)

回答募集中 回答数: 0