結果
問題 | No.1137 Circles |
ユーザー | mfbgjscz |
提出日時 | 2020-07-24 06:24:18 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 1,509 bytes |
コンパイル時間 | 2,072 ms |
コンパイル使用メモリ | 203,092 KB |
実行使用メモリ | 7,064 KB |
最終ジャッジ日時 | 2023-09-11 02:03:59 |
合計ジャッジ時間 | 4,552 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 5 ms
6,876 KB |
testcase_01 | AC | 26 ms
6,872 KB |
testcase_02 | AC | 5 ms
6,764 KB |
testcase_03 | AC | 14 ms
6,760 KB |
testcase_04 | AC | 19 ms
6,880 KB |
testcase_05 | AC | 7 ms
7,064 KB |
testcase_06 | AC | 20 ms
6,796 KB |
testcase_07 | AC | 12 ms
6,996 KB |
testcase_08 | AC | 22 ms
6,908 KB |
testcase_09 | AC | 10 ms
6,760 KB |
testcase_10 | AC | 13 ms
7,008 KB |
testcase_11 | AC | 15 ms
6,764 KB |
testcase_12 | AC | 27 ms
6,872 KB |
testcase_13 | AC | 10 ms
6,904 KB |
testcase_14 | AC | 25 ms
6,976 KB |
testcase_15 | AC | 11 ms
6,904 KB |
testcase_16 | AC | 14 ms
6,804 KB |
testcase_17 | AC | 6 ms
6,824 KB |
testcase_18 | AC | 22 ms
6,764 KB |
testcase_19 | AC | 11 ms
7,012 KB |
testcase_20 | AC | 9 ms
6,796 KB |
testcase_21 | AC | 5 ms
6,756 KB |
ソースコード
#include <bits/stdc++.h> /*#include <boost/multiprecision/cpp_dec_float.hpp> #include <boost/multiprecision/cpp_int.hpp> */#pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") using namespace std; /*namespace mp = boost::multiprecision; using Bint = mp::cpp_int; using Real = mp::number<mp::cpp_dec_float<1024>>; */ #define ll long long #define uli unsigned long long int #define INF 999999999999 #define rep(i,m,n) for(ll i = m;i < n;i++) #define rrep(i,m,n) for(ll i=m-1;i>=n;i--) #define pb(n) push_back(n) #define UE(N) N.erase(unique(N.begin(),N.end()),N.end()); #define Sort(n) sort(n.begin(), n.end()) #define Rev(n) reverse(n.begin(),n.end()) #define Out(S) cout << S << endl #define NeOut(S) cout << S #define HpOut(S) cout << setprecision(50) << S << endl #define Vec(K,L,N,S) vector<L> K(N,S) #define DV(K,L,N,M,S) vector<vector<L>> K(N,vector<L>(M,S)) #define TV(K,L,N,M,R,S) vector<vector<vector<L>>> K(N,vector<vector<L>>(M,vector<L>(R,S))) #define pint pair<lli,lli> #define paf(L,R) pair<L,R> #define mod 1000000007 #define MAX 10000000 #define ALL(a) a.begin(),a.end() #define chmax(a, b) a = (((a)<(b)) ? (b) : (a)) #define chmin(a, b) a = (((a)>(b)) ? (b) : (a)) int main(){ ios::sync_with_stdio(false); cin.tie(0); ll A,B,N,sum=0; Vec(dp,ll,500000,0); cin >> N; while(N--){ cin >> A >> B; dp[A-B+200000]++; dp[A+B+200000]--; } rep(i,1,500000)dp[i]+=dp[i-1]; rep(i,0,500000)chmax(sum,dp[i]); cout << sum << endl; }