結果

問題 No.1137 Circles
ユーザー CleyLCleyL
提出日時 2023-06-29 13:15:55
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 676 ms
コンパイル使用メモリ 81,504 KB
実行使用メモリ 10,076 KB
最終ジャッジ日時 2023-09-20 08:42:25
合計ジャッジ時間 4,517 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 137 ms
9,460 KB
testcase_02 AC 3 ms
4,380 KB
testcase_03 AC 57 ms
6,796 KB
testcase_04 AC 92 ms
8,100 KB
testcase_05 AC 13 ms
4,376 KB
testcase_06 AC 109 ms
8,700 KB
testcase_07 AC 42 ms
6,044 KB
testcase_08 AC 112 ms
8,948 KB
testcase_09 AC 27 ms
5,140 KB
testcase_10 AC 50 ms
6,444 KB
testcase_11 AC 60 ms
6,896 KB
testcase_12 AC 163 ms
10,076 KB
testcase_13 AC 30 ms
5,344 KB
testcase_14 AC 156 ms
9,752 KB
testcase_15 AC 35 ms
5,620 KB
testcase_16 AC 61 ms
7,032 KB
testcase_17 AC 6 ms
4,376 KB
testcase_18 AC 115 ms
8,836 KB
testcase_19 AC 32 ms
5,528 KB
testcase_20 AC 22 ms
4,992 KB
testcase_21 AC 1 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <map>
using namespace std;

int main(){
  int n;cin>>n;
  map<int,int> A;
  for(int i = 0; n > i; i++){
    int x,y;cin>>x>>y;
    A[(x-y)]++;
    A[(x+y)]--;
  }
  int nw = 0;
  int ans = 0;
  for(auto z: A) {
    nw += z.second;
    ans = max(nw,ans);
  }
  cout << ans << endl;
}
0