結果
| 問題 | No.8132 Max Cover |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-01 23:16:03 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 120 ms / 2,000 ms |
| コード長 | 486 bytes |
| 記録 | |
| コンパイル時間 | 654 ms |
| コンパイル使用メモリ | 92,400 KB |
| 実行使用メモリ | 98,672 KB |
| 最終ジャッジ日時 | 2026-04-01 23:16:16 |
| 合計ジャッジ時間 | 4,780 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 15 |
ソースコード
#include<iostream>
#include<cassert>
#include<atcoder/lazysegtree>
using namespace std;
long op(long a,long b){return min(a,b);}
long e(){return(long)1e18;}
long mp(long f,long x){return f+x;}
long id(){return 0L;}
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int Q,L;
cin>>Q>>L;
atcoder::lazy_segtree<long,op,e,long,mp,mp,id>seg(vector<long>(L,0));
for(;Q--;)
{
int t,l,r,c;cin>>t>>l>>r>>c;
if(t==2)c=-c;
seg.apply(l,r,c);
cout<<seg.all_prod()<<"\n";
}
}