結果

問題 No.1137 Circles
ユーザー 小野寺健小野寺健
提出日時 2021-11-03 08:41:40
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 237 bytes
コンパイル時間 135 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 26,752 KB
最終ジャッジ日時 2024-04-20 22:11:47
合計ジャッジ時間 6,649 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
12,288 KB
testcase_01 AC 338 ms
26,368 KB
testcase_02 AC 84 ms
12,160 KB
testcase_03 AC 194 ms
18,816 KB
testcase_04 AC 248 ms
22,400 KB
testcase_05 AC 110 ms
13,824 KB
testcase_06 AC 291 ms
22,912 KB
testcase_07 AC 177 ms
16,896 KB
testcase_08 AC 296 ms
23,808 KB
testcase_09 WA -
testcase_10 AC 192 ms
18,048 KB
testcase_11 AC 206 ms
19,584 KB
testcase_12 AC 364 ms
26,752 KB
testcase_13 AC 154 ms
15,744 KB
testcase_14 AC 349 ms
26,752 KB
testcase_15 AC 153 ms
16,512 KB
testcase_16 WA -
testcase_17 AC 97 ms
12,672 KB
testcase_18 AC 307 ms
22,912 KB
testcase_19 AC 153 ms
16,384 KB
testcase_20 AC 131 ms
14,976 KB
testcase_21 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N = gets.to_i

coord = []

N.times {
	x, r = gets.split(" ").map{|s| s.to_i}
	coord << [x-r, 1]
	coord << [x+r, -1]
}

coord.sort_by!{|x| x[0]}

cnt = 0
maxcnt = -1
coord.each{|x, d|
	cnt += d
	maxcnt = cnt if cnt > maxcnt
}

puts maxcnt
0