UVa/Volume3

Last-modified: 2008-05-23 (金) 11:15:17

Volume3

  • 300:Maya Calendar
    • Simulation?
    • それぞれのカレンダーに合わせて、日に直して計算すれば良い.
  • 301:Transportation
    • Backtracking?
    • 入力の最大数が少ないので見極め.
  • 305:Joseph
    • Mathematics?
    • 配列に結果ぶっこんでそのまま出力.
  • 311:Packets
    • Ad-hoc?
    • longを使うべし.あとは,3*3のときだけ注意が必要.
  • 324:Factorial Frequencies
    • Mathematics?
    • 階乗の値の各数字の個数を出力.
  • 326:Extrapolation Using a Difference Table
    • Simulation?
    • そのままやれば良い.
  • 343:What Base Is This?
    • Mathematics? - Base Numbers?
    • タイトル通りの基数変換問題
  • 344:Roman Digititis
    • String?
    • アラビア数字をローマ数字に変換する.一の位と十の位を分ける.
  • 348:Optimal Array Multiplication Sequence
    • Dynamic Programming? - Matrix-chain Multiplication Problem?
    • タイトル通り、連鎖行列の積の計算において、最小のスカラー乗算で解を出すための括弧の付け方を求める問題.典型的な例なので要テンプレ.
  • 350:Pseudo-Random Numbers
    • Mathematics? + Simulation?
    • 言われた通りにやれば良い.
  • 352:The Seasonal War
    • Backtracking?
    • 縦横斜めを調べるだけ.
  • 353:Pesky Palindromes
    • String?
    • 回文チェック.
  • 357:Let Me Count The Ways
    • Dynamic Programming? - Counting Change?
    • タイトル通りにCounting Change?の問題.
      だけどシミュレーションでもギリギリ(9.7秒くらい)で解けた.
  • 369:Combinations
    • Mathematics? - Combinatorics?
    • 組み合わせ用ライブラリが便利.
  • 371:Ackermann Functions
    • Mathematics?
    • Ackermanm Function?の問題.100と似ているが、100より定義がはっきりしてるから簡単.
  • 374:BigMod
    • Mathematics? - Power Mod?
    • タイトル通りBig Integer?のMod.ライブラリ化しておく方向で.
  • 382:Perfection
    • Mathematics?
    • 言われた通りに調べるだけ.
  • 386:Perfect Cubes
    • Mathematics?
    • x^3=a^3+b^3+c^3となるような、x,a,b,cの組を見つける.
      xを基準に考えるとたぶん遅いので、先にa,b,cをいじりながら
      xを見つけて配列に保存.
      最後に配列をソートする.
  • 389:Basically Speaking
    • Mathematics? - Base Numbers?
    • Base Numbers?問題はわりと多いので、慣れておく.
      慣れれば簡単.
  • 392:Polynomial Showdown
    • String?
    • 定義どおり.