提出 #24414821


ソースコード 拡げる

W,H,N = gets.split.map(&:to_i)
l,r,d,u = 0,W,0,H
N.times{
	x,y,a = gets.split.map(&:to_i)
	case a
	when 1; l = x if l<x
	when 2; r = x if x<r
	when 3; d = y if d<y
	when 4; u = y if y<u
	end
}
p [r-l,0].max*[u-d,0].max

提出情報

提出日時
問題 B - すぬけ君の塗り絵 2 イージー
ユーザ ds14050
言語 Ruby (2.7.1)
得点 200
コード長 231 Byte
結果 AC
実行時間 71 ms
メモリ 14204 KiB

ジャッジ結果

セット名 sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 3
AC × 13
セット名 テストケース
sample sample_01.txt, sample_02.txt, sample_03.txt
All dir_01.txt, dir_02.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, sample_01.txt, sample_02.txt, sample_03.txt, small_01.txt, small_02.txt, small_03.txt, small_04.txt
ケース名 結果 実行時間 メモリ
dir_01.txt AC 71 ms 14096 KiB
dir_02.txt AC 57 ms 14180 KiB
random_01.txt AC 56 ms 13928 KiB
random_02.txt AC 57 ms 14204 KiB
random_03.txt AC 55 ms 14008 KiB
random_04.txt AC 57 ms 14200 KiB
sample_01.txt AC 58 ms 14100 KiB
sample_02.txt AC 59 ms 14148 KiB
sample_03.txt AC 58 ms 14164 KiB
small_01.txt AC 58 ms 14160 KiB
small_02.txt AC 56 ms 13952 KiB
small_03.txt AC 56 ms 14148 KiB
small_04.txt AC 57 ms 14184 KiB