結果
問題 | No.1801 Segment Game |
ユーザー |
👑 |
提出日時 | 2022-05-18 22:36:23 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 98 ms / 2,000 ms |
コード長 | 431 bytes |
コンパイル時間 | 103 ms |
コンパイル使用メモリ | 6,940 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-17 02:22:49 |
合計ジャッジ時間 | 2,660 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 10 |
ソースコード
local llmmi = function(a, b) return a < b and a or b end local t = io.read("*n") for i = 1, t do local h, w, d = io.read("*n", "*n", "*n") h = 1LL * h w = 1LL * w d = 1LL * d local a = 0LL if h % 2LL == 0LL then a = w * w else a = 1LL + w * w end if w % 2LL == 0LL then a = llmmi(a, h * h) else a = llmmi(a, 1LL + h * h) end if a <= d * d then print("N") else print("S") end end