結果

問題 No.2650 [Cherry 6th Tune *] セイジャク
ユーザー 👑 p-adic
提出日時 2024-02-24 00:21:46
言語 cLay
(20241019-1)
結果
AC  
実行時間 341 ms / 2,500 ms
コード長 373 bytes
コンパイル時間 2,768 ms
コンパイル使用メモリ 185,168 KB
実行使用メモリ 27,136 KB
最終ジャッジ日時 2024-09-29 09:34:27
合計ジャッジ時間 11,394 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

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;auto i=Z.begin(),e=Z.end();for(;i!=e;i++)i->second=s++;rep[X](x,N)x=Z[x];rep[W](w,T*2)w=Z[w];VI 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)x=t+1;rep[B](x,m,n)x=t+1;rep[A](x,max(a,n*M),r)x=t+1;}rep[X](x,N)wt(max(A[x],B[x/M]));
0