結果
問題 | No.1801 Segment Game |
ユーザー | 👑 obakyan |
提出日時 | 2022-05-18 22:36:23 |
言語 | Lua (LuaJit 2.1.1696795921) |
結果 |
AC
|
実行時間 | 94 ms / 2,000 ms |
コード長 | 431 bytes |
コンパイル時間 | 49 ms |
コンパイル使用メモリ | 5,152 KB |
実行使用メモリ | 4,348 KB |
最終ジャッジ日時 | 2023-10-17 03:43:17 |
合計ジャッジ時間 | 3,560 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,348 KB |
testcase_01 | AC | 91 ms
4,348 KB |
testcase_02 | AC | 94 ms
4,348 KB |
testcase_03 | AC | 91 ms
4,348 KB |
testcase_04 | AC | 93 ms
4,348 KB |
testcase_05 | AC | 90 ms
4,348 KB |
testcase_06 | AC | 93 ms
4,348 KB |
testcase_07 | AC | 87 ms
4,348 KB |
testcase_08 | AC | 82 ms
4,348 KB |
testcase_09 | AC | 86 ms
4,348 KB |
testcase_10 | AC | 1 ms
4,348 KB |
ソースコード
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