結果

問題 No.1137 Circles
ユーザー okkuukenken
提出日時 2022-08-20 15:57:12
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 179 ms / 2,000 ms
コード長 679 bytes
コンパイル時間 1,588 ms
コンパイル使用メモリ 152,908 KB
実行使用メモリ 9,984 KB
最終ジャッジ日時 2024-10-09 08:33:48
合計ジャッジ時間 4,802 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<iomanip>
#include<numeric>
#include<queue>
#include<deque>
#include<stack>
#include<set>
#include<map>
#include<random>
#include<bitset>
#include<cassert>
#include<complex>
#include<fstream>
#include<cstdlib>
#include<functional>
#include<array>
using namespace std;
typedef long long ll;
const int mod=998244353;
const int dx[]={1,0,0,-1},dy[]={0,1,-1,0};
int main(){
	int n,x,r;
	cin>>n;
	map<int,int>mp;
	while(cin>>x>>r){
		mp[x-r]++;
		mp[x+r]--;
	}
	int sum=0,ans=0;
	for(auto e:mp){
		sum+=e.second;
		if(sum>ans)
			ans=sum;
	}
	cout<<ans<<endl;
}
0