結果
| 問題 |
No.2092 Conjugation
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-06 21:42:30 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 58 ms / 2,000 ms |
| コード長 | 877 bytes |
| コンパイル時間 | 24,080 ms |
| コンパイル使用メモリ | 356,444 KB |
| 最終ジャッジ日時 | 2025-02-20 01:26:27 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#include<atcoder/all>
using namespace std;
using namespace atcoder;
using ll=long long;
void IO(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
}
using S = long long;
using F = long long;
const S INF = 8e18;
S op(S a, S b){ return std::min(a, b); }
S e(){ return INF; }
S mapping(F f, S x){ return f+x; }
F composition(F f, F g){ return f+g; }
F id(){ return 0; }
int main(){
IO();
ll n;
cin>>n;
vector<ll> a(n);
for(ll i=0;i<n;i++){
cin>>a[i];
}
lazy_segtree<S,op,e,F,mapping,composition,id> seg(1e5+1);
for(ll i=0;i<=1e5;i++){
seg.set(i,0);
}
for(ll i=0;i<n;i++){
seg.apply(0,a[i],1);
}
for(ll i=0;i<=1e5;i++){
ll ans=seg.get(i);
if(ans==0){
break;
}
cout<<ans<<" ";
}
cout<<endl;
}