UVa/Volume4
Last-modified: 2008-05-23 (金) 11:15:37
Volume4
- 401:Palindromes
- String?
- 回文、だけど問題独特の定義もあるので注意.
- 406:Prime Cuts
- Mathematics? - Prime Number? - Eratosthenes' Sieve?
- 素数がらみの問題はやることが似てるから、ライブラリ化しておくと良い.
これはEratosthenes' Sieve?を使う.
- 412:Uniform Generator
- Mathematics?
- 擬似乱数生成の問題.
擬似乱数が繰り返しになる前に、全ての種類が出てればGood Choice.
- 412:Pi
- Mathematics?
- 言われた通りやれば解ける.
組み合わせは約分を忘れずに.
- 413:Up and Down Sequence
- Mathematics?
- if~elseでupかdownか調べておく.
- 414:Machined Surfaces
- String?
- Xの文字数を数えて、最大のものからそれ以外のものの差の合計を出力する.
- 424:Integer Inquiry
- Mathematics? - Big Integer?
- 多倍長の練習問題.
- 438:The Circumference of the Circle
- Computational Geometry?
- 円の中心を求める.
- 439:Knight Moves
- Backtracking?
- 最小の移動回数を探す.
- 443:Humble Numbers
- Mathematics?
- Ugly Numberの要領でやる. 出力の序数詞に注意.
- 444:Encoder and Decoder
- String?
- 数字をひっくり返したりするのがめんどいけど、がんばれば解ける.
- 446:Kibbles'n'Bits'n'Bits'n'Bits
- Mathematics? - Base Numbers?
- そのままですがな.
- 450:Little Black Book
- Sorting?
- ただし、安定なソートでないとダメ.
- 455:Periodic Strings
- String?
- 10298と似てるけど、こっちは文字列の最大長が80なので、Brute Force?で解ける.
- 459:Graph Connectivity
- Graph? + Union-Find?
- Union-Find?クラスを作っておくと良い.
- 474:Heads / Tails Probability
- Mathematics?
- ひたすら2で割っていく.
- 476:Points in Figures: Rectangles
- Computational Geometry?
- その一.
- 477:Points in Figures: Rectangles and Circles
- Computational Geometry?
- その二.
- 478:Points in Figures: Rectangles, Circles, and Triangles
- Computational Geometry?
- その三.
- 484:The Department of Redundancy Department
- 489:Hangman Judge
- String?
- 二つ目の文字列のなかで、一つ目の文字列に含まれる文字を調べる.
- 494:Kindergarten Counting Game
- 495:Fibonacci Freeze
- Mathematics?
- Big Integer?とFibonacci Number?.
- 497:Strategic Defense Initiative
- Dynamic Programming?
- LCSっぽい問題だけど、CommonじゃないからLS?
とにかく、一番長い昇順の列になるようにデータを選んでいく.
231と超似ている.231は降順.
- 499:What's The Frequency, Kenneth?