結果

問題 No.2218 Multiple LIS
ユーザー 👑 obakyanobakyan
提出日時 2023-02-18 00:42:02
言語 Lua
(LuaJit 2.1.1696795921)
結果
AC  
実行時間 136 ms / 3,000 ms
コード長 460 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-26 21:48:19
合計ジャッジ時間 3,510 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 3 ms
4,380 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 AC 3 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 3 ms
4,376 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 3 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 3 ms
4,376 KB
testcase_13 AC 3 ms
4,380 KB
testcase_14 AC 3 ms
4,380 KB
testcase_15 AC 3 ms
4,376 KB
testcase_16 AC 3 ms
4,384 KB
testcase_17 AC 3 ms
4,380 KB
testcase_18 AC 3 ms
4,376 KB
testcase_19 AC 3 ms
4,380 KB
testcase_20 AC 3 ms
4,380 KB
testcase_21 AC 8 ms
4,380 KB
testcase_22 AC 76 ms
4,380 KB
testcase_23 AC 68 ms
4,380 KB
testcase_24 AC 16 ms
4,380 KB
testcase_25 AC 76 ms
4,380 KB
testcase_26 AC 106 ms
4,380 KB
testcase_27 AC 108 ms
4,380 KB
testcase_28 AC 106 ms
4,376 KB
testcase_29 AC 108 ms
4,376 KB
testcase_30 AC 108 ms
4,380 KB
testcase_31 AC 46 ms
4,380 KB
testcase_32 AC 46 ms
4,380 KB
testcase_33 AC 46 ms
4,380 KB
testcase_34 AC 46 ms
4,376 KB
testcase_35 AC 46 ms
4,376 KB
testcase_36 AC 28 ms
4,380 KB
testcase_37 AC 136 ms
4,380 KB
testcase_38 AC 3 ms
4,376 KB
testcase_39 AC 2 ms
4,380 KB
testcase_40 AC 112 ms
4,376 KB
testcase_41 AC 113 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

local mmi, mma = math.min, math.max
local mfl = math.floor
local n = io.read("*n")
local lim = 100000
local t = {}
for i = 1, lim do
  t[i] = 0
end
for i = 1, n do
  local a = io.read("*n")
  local val = 0
  for j = 1, 320 do
    if a < j * j then break end
    if a % j == 0 then
      val = mma(val, t[j])
      val = mma(val, t[mfl(a / j)])
    end
  end
  t[a] = mma(t[a], val + 1)
end
local ret = 0
for i = 1, lim do
  ret = mma(ret, t[i])
end
print(ret)
0