結果
問題 | No.2035 Tunnel |
ユーザー |
👑 |
提出日時 | 2022-08-12 22:27:49 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 20 ms / 2,000 ms |
コード長 | 295 bytes |
コンパイル時間 | 112 ms |
コンパイル使用メモリ | 6,688 KB |
実行使用メモリ | 7,168 KB |
最終ジャッジ日時 | 2024-09-23 03:06:07 |
合計ジャッジ時間 | 1,134 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 28 |
ソースコード
local mmi, mma = math.min, math.maxlocal n = io.read("*n", "*l")local s = io.read()local t = {}for i = 1, n doif s:sub(i, i) == "#" thentable.insert(t, i)endendlocal ret = -1local block = 1for i = #t, 1, -1 doret = mma(n + 1 - t[i], ret + 2)-- print(ret)endprint(ret)