結果
問題 | No.11 カードマッチ |
ユーザー | 👑 obakyan |
提出日時 | 2019-05-02 09:27:20 |
言語 | Lua (LuaJit 2.1.1734355927) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 327 bytes |
コンパイル時間 | 342 ms |
コンパイル使用メモリ | 6,952 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-31 13:10:12 |
合計ジャッジ時間 | 1,188 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
local ior = io.input()local w, h, n = ior:read("*n", "*n", "*n")local s, t = {}, {}for i = 1, n dolocal a, b = ior:read("*n", "*n")s[a], t[b] = true, trueendlocal snum, tnum = 0, 0for k, v in pairs(s) dosnum = snum + 1endfor k, v in pairs(t) dotnum = tnum + 1endprint(w * h - n - (w - snum) * (h - tnum))