結果

問題 No.2650 [Cherry 6th Tune *] セイジャク
ユーザー 👑 p-adic
提出日時 2023-07-25 22:01:04
言語 cLay
(20241019-1)
結果
AC  
実行時間 600 ms / 2,500 ms
コード長 391 bytes
コンパイル時間 3,787 ms
コンパイル使用メモリ 187,096 KB
実行使用メモリ 27,136 KB
最終ジャッジ日時 2024-11-15 04:31:30
合計ジャッジ時間 17,355 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#define U x=max(x,t+1)
ll@N,@o,@X[N],@T,@W[T*2],M=548;map<ll,ll>Z;rep[X](x,N)Z[x];rep[W](w,T*2)Z[w];ll s=0;for(auto i=Z.begin(),e=Z.end();i!=e;i++)i->second=s++;rep[X](x,N)x=Z[x];rep[W](w,T*2)w=Z[w];vector<int>A(s,-1),B(M,-1);rep(t,T){ll a,n,m,l=W[t*2],r=W[t*2+1]+1;m=(l+M-1)/M;n=max(m,r/M);a=min(m*M,r);rep[A](x,l,a)U;rep[B](x,m,n)U;rep[A](x,max(a,n*M),r)U;}rep[X](x,N)wt(max(A[x],B[x/M]));
0