結果

問題 No.11 カードマッチ
ユーザー むらためむらため
提出日時 2017-07-31 00:08:12
言語 Nim
(2.0.2)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 477 bytes
コンパイル時間 717 ms
コンパイル使用メモリ 69,780 KB
最終ジャッジ日時 2024-04-27 02:28:29
合計ジャッジ時間 1,020 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 50) Warning: Use the new 'sugar' module instead; future is deprecated [Deprecated]
/home/judge/data/code/Main.nim(1, 62) Error: cannot open file: queues

ソースコード

diff #

import sequtils,strutils,strscans,algorithm,math,future,sets,queues,tables
template get():string = stdin.readLine()
template times(n:int,body:untyped): untyped = (for _ in 0..<n: body)

let
  W = get().parseInt
  H = get().parseInt
  N = get().parseInt
  cards = newSeqWith(N,get().split().map(parseInt))
  xs = cards.mapIt(it[0])
  ys = cards.mapIt(it[1])
  x_sum = xs.deduplicate().len()
  y_sum = ys.deduplicate().len()
  res = W * H - (W - x_sum) * (H - y_sum) - N
echo res
0