結果
問題 | No.1716 Bonus Nim |
ユーザー |
👑 |
提出日時 | 2022-03-29 20:26:56 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 345 ms / 2,000 ms |
コード長 | 343 bytes |
コンパイル時間 | 476 ms |
コンパイル使用メモリ | 5,376 KB |
実行使用メモリ | 9,088 KB |
最終ジャッジ日時 | 2024-11-08 18:50:46 |
合計ジャッジ時間 | 9,492 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 26 |
ソースコード
local q = io.read("*n")for iq = 1, q dolocal n = io.read("*n")local a = {}for i = 1, n doa[i] = io.read("*n")endtable.sort(a)if n % 2 == 1 thenprint("Alice")elselocal f = falsefor i = 1, n - 1, 2 doif a[i] ~= a[i + 1] then f = true break endendprint(f and "Alice" or "Bob")endend