はまやんはまやんはまやん

hamayanhamayan's blog

2019-09-23から1日間の記事一覧

Powerful Sum [Kodamanと愉快な仲間たち T]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/powerful-sum 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/powerful-sum/submissions/code/1316487336 Nがとても大きいので、普通に計算するんじゃないんだ…

Three Girls [Kodamanと愉快な仲間たち R]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/three-girls 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/three-girls/submissions/code/1316482864 3つ選択する部分があるが、3つ選ぶ系は真ん中を固定する…

Let's Shoot! [Kodamanと愉快な仲間たち L]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/lets-shoot 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/lets-shoot/submissions/code/1316478561 dpで解けそう。 添字も小さいし、こんなDPで解けるんじゃ…

異世界転生2 [Kodamanと愉快な仲間たち J]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/2-82 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/2-82/submissions/code/1316477943 パっと見てDPな感じ。 区間で、最大値で、かぶってはいけない。 今まで…

Mad Time Traveler [Kodamanと愉快な仲間たち M]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/mad-time-traveler 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/mad-time-traveler/submissions/code/1316478991 まず、時間旅行の移動を有向グラフの有向辺…

is this tournament correct? [Kodamanと愉快な仲間たち I]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/i-is-this-tournament-correct 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/i-is-this-tournament-correct/submissions/code/1316477775 クエリ問題になって…

Break PGC [Kodamanと愉快な仲間たち H]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/break-pgc 前提知識 二分探索 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/break-pgc/submissions/code/1316477241 問題文に最大値は最小でいくつになります…

disastrous gemini [Kodamanと愉快な仲間たち F]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/disastrous-gemini 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/disastrous-gemini/submissions/code/1316476143 クーラーをつけないとAi秒、つけているとBi…

Osmium_1008と時間旅行 [Kodamanと愉快な仲間たち G]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/osmium1008-and-timetravel 前提知識 最大最小系DP(メモリ節約も) 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/disastrous-gemini/submissions/code/13164…

1337 [Kodamanと愉快な仲間たち E]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/e-1337 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/e-1337/submissions/code/1316475979 すべての文字について、数値かどうか判定する。 C++だとisdigitと…

tv_program [Kodamanと愉快な仲間たち D]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/tv-program 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/tv-program/submissions/code/1316475865 とりあえず、Dが平日か週末かで場合分けしよう。 与えられ…

remainder of modulo [Kodamanと愉快な仲間たち C]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/remainder-of-modulo 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/rolled-egg/submissions/code/1316475415 入力は1018なので、C++ならlong longで取ること…

Rolled Egg [Kodamanと愉快な仲間たち B]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/rolled-egg 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/rolled-egg/submissions/code/1316475415 6個入りパックを2個か、12個入りパックを1個が最適なので…

Imaging... [Kodamanと愉快な仲間たち A]

https://www.hackerrank.com/contests/kodamanwithothers/challenges/imaging 解説 https://www.hackerrank.com/contests/kodamanwithothers/challenges/imaging/submissions/code/1316475027 ボケたい衝動を抑えて、100を出力すると満点が取れる。 void _ma…