結果

問題 No.799 赤黒かーどげぇむ
コンテスト
ユーザー むらため
提出日時 2019-05-05 13:59:45
言語 Nim
(2.2.6)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 333 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,726 ms
コンパイル使用メモリ 67,620 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2026-03-23 02:50:56
合計ジャッジ時間 2,528 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "<stdio.h>" ,discardable.}
proc scan(): int =
  while true:
    let k = getchar_unlocked()
    if k < '0': return
    result = 10 * result + k.ord - '0'.ord

let a = scan()
let b = scan()
let c = scan()
let d = scan()
echo (b-a+1)*(d-c+1)-0.max(b.min(d)-a.max(c)+1)
0