結果
問題 |
No.166 マス埋めゲーム
|
ユーザー |
|
提出日時 | 2019-01-04 19:31:41 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 401 bytes |
コンパイル時間 | 250 ms |
コンパイル使用メモリ | 5,504 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-23 23:15:14 |
合計ジャッジ時間 | 1,013 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
print((function (f) return f() and "YES" or "NO" end)((function (M) M.cdef 'int scanf(const char *, ...);' local C,f = M.C,M.typeof("long[1]") local h,w,n,k = f(),f(),f(),f() return function () C.scanf("%ld%ld%ld%ld",h,w,n,k) local t=h[0]*w[0] if t<=n[0] then return t==k[0] end if (t%n[0]==k[0]) or (n[0]==k[0] and t%n[0]==0) then return true end return false end end)(require'ffi')))