結果

問題 No.1137 Circles
ユーザー ikkunjyanaikaikkunjyanaika
提出日時 2020-08-02 15:37:07
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 988 bytes
コンパイル時間 2,199 ms
コンパイル使用メモリ 200,096 KB
実行使用メモリ 6,240 KB
最終ジャッジ日時 2023-09-25 19:04:33
合計ジャッジ時間 4,679 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
6,088 KB
testcase_01 AC 22 ms
5,908 KB
testcase_02 AC 4 ms
6,076 KB
testcase_03 AC 13 ms
5,908 KB
testcase_04 AC 18 ms
6,080 KB
testcase_05 AC 6 ms
6,132 KB
testcase_06 WA -
testcase_07 AC 10 ms
6,020 KB
testcase_08 AC 20 ms
6,076 KB
testcase_09 WA -
testcase_10 AC 12 ms
6,096 KB
testcase_11 AC 12 ms
6,096 KB
testcase_12 AC 24 ms
6,216 KB
testcase_13 AC 9 ms
5,992 KB
testcase_14 AC 23 ms
5,980 KB
testcase_15 AC 11 ms
6,136 KB
testcase_16 WA -
testcase_17 AC 6 ms
6,240 KB
testcase_18 WA -
testcase_19 AC 9 ms
6,032 KB
testcase_20 AC 8 ms
5,976 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef pair<ll,ll> P;
typedef vector<P> vp;
typedef vector<string> vs;
typedef vector<bool> vb;

const ll mod=1e9+7;
const ll inf=1e16;

#define rep(i,m,n) for(ll i=m;i<n;i++)
#define repr(i,m,n) for(ll i=m-1;i>=n;i--)
#define fi first
#define se second
#define chmax(x,y) x=max(x,y)
#define chmin(x,y) x=min(x,y)
#define eb(x) emplace_back(x)
#define pb(x) pop_back(x)
#define all(x) x.begin(),x.end()
#define allr(x) x.rbegin(),x.rend()
#define sum(x) accumulate(all(x),0)
#define pc(x) __builtin_popcount(x)
#define gll greater<ll>()

const ll m=200005;
vll imos(2*m,0);

void solve(){
  ll n;
  cin >> n;
  rep(i,0,n){
   ll x,r;
    cin >> x >> r;
    x+=m;
    imos[x-r]++;
    imos[x+r+1]--;
  }
  rep(i,1,2*m-1) imos[i]+=imos[i-1];
  
  cout << *max_element(all(imos)) << endl;
}

int main(){
   cin.tie(nullptr);
  ios::sync_with_stdio(false);
  solve();
}
0