結果
問題 |
No.1137 Circles
|
ユーザー |
![]() |
提出日時 | 2020-08-17 21:49:08 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 831 ms / 2,000 ms |
コード長 | 542 bytes |
コンパイル時間 | 2,984 ms |
コンパイル使用メモリ | 74,284 KB |
実行使用メモリ | 53,820 KB |
最終ジャッジ日時 | 2024-10-11 11:19:36 |
合計ジャッジ時間 | 16,318 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
ソースコード
import java.util.*; public class Main { static final int BASE = 100000; public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] imos = new int[BASE * 4 + 1]; for (int i = 0; i < n; i++) { int x = sc.nextInt(); int r = sc.nextInt(); imos[x + BASE * 2 - r]++; imos[x + BASE * 2 + r]--; } int max = imos[0]; for (int i = 1; i < imos.length; i++) { imos[i] += imos[i - 1]; max = Math.max(max, imos[i]); } System.out.println(max); } }